`config.define` now propagates schema `default` values, so features like smart quotes no longer need their own fallback constants.
Adds `defineCategory` / `getCategories` for the upcoming configuration manager UI.
Extracts almost all codemirror keyboard shortcuts into proper SB
commands so they can be rebound
Bonus: renders prettier versions of keyboard shortcuts on Mac
No longer cache widget HTML content just widget heights, either way the
widgets will briefly flash as the widget is recalculated and this saves
storage space and reduces issues in Webkit
Now produce "markdown" (or <table> tags for tables) instead of pure
HTML. Hopefully doesn't introduce regressions. Added a test suite for
future iterations.
* Fine tunes a few behaviors (like not adding extra newlines, ever
(should fix#1629))
* When a list item ends with :, it automaticaly indents the next item
* Adds an extensive test suite with various cases
This needs some more testing, but should be a good starting point for
adding more tweaks later.
* tag.define now supports a `tagPage` attribute, allowing what page to
send the user to when clicking on a hash tag in the editor
* index.contentPages() and index.metaPages() are convenience wrappers
around the index.tag("page") collection that filter on content and
meta pages respectively.
Even though the service worker will proactively cache them in the
browser, the browser will not have to load them, parse them, interpret
them unless these languages are actually used. Less JS to load, less
waiting.
* Fix (tasks): Toggle dropdown on re-click and narrow mark decoration range
- Clicking the dropdown icon now dismisses the completion menu if it
is already open (`closeCompletion`).
- The `data-task-state` mark decoration now covers only the inner state
text (excluding brackets). This prevents CodeMirror cursor/editing
issues when the caret is inside the brackets and allows bracket-aware
CSS styling. Example:
```space-style
[data-task-state="DONE"] { color: green; }
[data-task-state="PLANNED"] { color: orange; }
[data-task-state] { font-weight: bold; }
```
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
* Refactor (tasks): Unify task state data attribute to `data-task-state`
Rename `data-state` to `data-task-state` on extended task state spans in
Markdown renderer and update the corresponding places.
Previously the editor (CodeMirror mark decoration) used
`data-task-state` while the widget HTML renderer used `data-state`,
requiring duplicate CSS selectors. Now a single attribute selector works
everywhere (for example tasks rendered using `template.taskItem` also
follow the styling now):
```css
[data-task-state="PLANNED"] { /* cool CSS here */; }
```
Note: Checkbox inputs (`[ ]`/`[x]`/`[X]`) still use `data-state` since
they follow a different code path.
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
---------
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>