@damiro/stylo 0.10.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +15 -3
  2. package/dist/{InPlaceView-CkbMemAa.js → InPlaceView-BWc06Jso.js} +491 -486
  3. package/dist/InPlaceView-BWc06Jso.js.map +1 -0
  4. package/dist/{Preview-AaGGwLQP.js → Preview-DIsFdBFA.js} +3 -3
  5. package/dist/{Preview-AaGGwLQP.js.map → Preview-DIsFdBFA.js.map} +1 -1
  6. package/dist/SplitView.d.ts +8 -2
  7. package/dist/SplitView.d.ts.map +1 -1
  8. package/dist/Stylo.d.ts.map +1 -1
  9. package/dist/editor/SourceView.d.ts +10 -3
  10. package/dist/editor/SourceView.d.ts.map +1 -1
  11. package/dist/editor/canvas-header-panel.d.ts +27 -0
  12. package/dist/editor/canvas-header-panel.d.ts.map +1 -0
  13. package/dist/editor/extensions.d.ts +2 -2
  14. package/dist/editor/extensions.d.ts.map +1 -1
  15. package/dist/editor/tag-complete.d.ts +16 -0
  16. package/dist/editor/tag-complete.d.ts.map +1 -0
  17. package/dist/editor/useCodeMirror.d.ts +8 -3
  18. package/dist/editor/useCodeMirror.d.ts.map +1 -1
  19. package/dist/{embed-B2Dfkpd_.js → embed-Dsu6b-MV.js} +16 -9
  20. package/dist/embed-Dsu6b-MV.js.map +1 -0
  21. package/dist/frontmatter-DTCC0gaa.js +40 -0
  22. package/dist/frontmatter-DTCC0gaa.js.map +1 -0
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/inplace/InPlaceView.d.ts +10 -3
  26. package/dist/inplace/InPlaceView.d.ts.map +1 -1
  27. package/dist/inplace/table-widget.d.ts +10 -5
  28. package/dist/inplace/table-widget.d.ts.map +1 -1
  29. package/dist/inplace/theme-canvas.d.ts +7 -1
  30. package/dist/inplace/theme-canvas.d.ts.map +1 -1
  31. package/dist/render/Embed.d.ts.map +1 -1
  32. package/dist/styles.css +1 -1
  33. package/dist/stylo.js +200 -168
  34. package/dist/stylo.js.map +1 -1
  35. package/dist/toolbar/Toolbar.d.ts.map +1 -1
  36. package/dist/toolbar/commands.d.ts.map +1 -1
  37. package/dist/types.d.ts +38 -6
  38. package/dist/types.d.ts.map +1 -1
  39. package/dist/{useCodeMirror-CpE_Ncfn.js → useCodeMirror-BI1kEPRE.js} +402 -334
  40. package/dist/useCodeMirror-BI1kEPRE.js.map +1 -0
  41. package/package.json +1 -1
  42. package/dist/InPlaceView-CkbMemAa.js.map +0 -1
  43. package/dist/embed-B2Dfkpd_.js.map +0 -1
  44. package/dist/frontmatter-DGUkb9z-.js +0 -39
  45. package/dist/frontmatter-DGUkb9z-.js.map +0 -1
  46. package/dist/useCodeMirror-CpE_Ncfn.js.map +0 -1
package/README.md CHANGED
@@ -28,6 +28,8 @@ built in.
28
28
  - **`[[wikilinks]]`** — recognised, styled, and clickable, with an
29
29
  `onWikiLinkClick` callback and opt-in `[[` autocomplete from an index you
30
30
  supply (`wikiLinkSource`).
31
+ - **`#tags`** — opt-in `#` autocomplete from an index you supply (`tagSource`),
32
+ mirroring `wikiLinkSource`'s trigger-while-typing UX.
31
33
  - **`![[embed]]` transclusion** — opt-in on every rendered surface (`preview`,
32
34
  `split`, and the in-place canvas): pass `embedSource` and Stylo hands you the
33
35
  reference, you return the node to render in its place.
@@ -171,15 +173,25 @@ function Editor() {
171
173
  your own `ToolbarCustomItem` buttons, and a `render` slot to wrap it. See the
172
174
  [toolbar reference](./docs/wiki/reference/toolbar.md).
173
175
 
174
- `inPlace`, `codeLanguages`, and `wikiLinkSource` are read once, when the editing
175
- surface mounts — give `<Stylo>` a `key` derived from the config to apply a
176
- change. Every other prop is fully reactive. See
176
+ `canvasHeader` docks your own content — a frontmatter card, say — inside the
177
+ editing surface itself, below the find/replace panel and above the document
178
+ body, a seam `toolbar.render` can't reach since it wraps content before the
179
+ whole canvas. See [Canvas header](./docs/wiki/reference/props.md#canvas-header).
180
+
181
+ `inPlace`, `codeLanguages`, `wikiLinkSource`, and `tagSource` are read once,
182
+ when the editing surface mounts — give `<Stylo>` a `key` derived from the
183
+ config to apply a change. Every other prop is fully reactive. See
177
184
  [props · applied at mount](./docs/wiki/reference/props.md#config-applied-at-mount).
178
185
 
179
186
  Pass `wikiLinkSource` — `(query) => { target, label? }[]`, sync or async — to
180
187
  turn on `[[wikilink]]` autocomplete backed by your own index. See
181
188
  [Wikilink autocomplete](./docs/wiki/reference/props.md#wikilink-autocomplete).
182
189
 
190
+ Pass `tagSource` — `(query) => { tag }[]`, sync or async — to turn on `#tag`
191
+ autocomplete backed by your own index, the same trigger-while-typing UX as
192
+ `wikiLinkSource`. See
193
+ [Tag autocomplete](./docs/wiki/reference/props.md#tag-autocomplete).
194
+
183
195
  Pass `embedSource` — `(ref) => ReactNode`, sync or async — to resolve
184
196
  `![[embed]]` transclusion on every rendered surface, the in-place canvas
185
197
  included. Stylo detects the `![[…]]` (when it is alone on its line) and renders