@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.
- package/README.md +15 -3
- package/dist/{InPlaceView-CkbMemAa.js → InPlaceView-BWc06Jso.js} +491 -486
- package/dist/InPlaceView-BWc06Jso.js.map +1 -0
- package/dist/{Preview-AaGGwLQP.js → Preview-DIsFdBFA.js} +3 -3
- package/dist/{Preview-AaGGwLQP.js.map → Preview-DIsFdBFA.js.map} +1 -1
- package/dist/SplitView.d.ts +8 -2
- package/dist/SplitView.d.ts.map +1 -1
- package/dist/Stylo.d.ts.map +1 -1
- package/dist/editor/SourceView.d.ts +10 -3
- package/dist/editor/SourceView.d.ts.map +1 -1
- package/dist/editor/canvas-header-panel.d.ts +27 -0
- package/dist/editor/canvas-header-panel.d.ts.map +1 -0
- package/dist/editor/extensions.d.ts +2 -2
- package/dist/editor/extensions.d.ts.map +1 -1
- package/dist/editor/tag-complete.d.ts +16 -0
- package/dist/editor/tag-complete.d.ts.map +1 -0
- package/dist/editor/useCodeMirror.d.ts +8 -3
- package/dist/editor/useCodeMirror.d.ts.map +1 -1
- package/dist/{embed-B2Dfkpd_.js → embed-Dsu6b-MV.js} +16 -9
- package/dist/embed-Dsu6b-MV.js.map +1 -0
- package/dist/frontmatter-DTCC0gaa.js +40 -0
- package/dist/frontmatter-DTCC0gaa.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/inplace/InPlaceView.d.ts +10 -3
- package/dist/inplace/InPlaceView.d.ts.map +1 -1
- package/dist/inplace/table-widget.d.ts +10 -5
- package/dist/inplace/table-widget.d.ts.map +1 -1
- package/dist/inplace/theme-canvas.d.ts +7 -1
- package/dist/inplace/theme-canvas.d.ts.map +1 -1
- package/dist/render/Embed.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/stylo.js +200 -168
- package/dist/stylo.js.map +1 -1
- package/dist/toolbar/Toolbar.d.ts.map +1 -1
- package/dist/toolbar/commands.d.ts.map +1 -1
- package/dist/types.d.ts +38 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/{useCodeMirror-CpE_Ncfn.js → useCodeMirror-BI1kEPRE.js} +402 -334
- package/dist/useCodeMirror-BI1kEPRE.js.map +1 -0
- package/package.json +1 -1
- package/dist/InPlaceView-CkbMemAa.js.map +0 -1
- package/dist/embed-B2Dfkpd_.js.map +0 -1
- package/dist/frontmatter-DGUkb9z-.js +0 -39
- package/dist/frontmatter-DGUkb9z-.js.map +0 -1
- 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
|
-
`
|
|
175
|
-
surface
|
|
176
|
-
|
|
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
|