@damiro/stylo 0.11.0 → 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 +10 -3
- package/dist/{InPlaceView-Dyf7I4XQ.js → InPlaceView-BWc06Jso.js} +419 -418
- package/dist/{InPlaceView-Dyf7I4XQ.js.map → InPlaceView-BWc06Jso.js.map} +1 -1
- package/dist/SplitView.d.ts +3 -2
- package/dist/SplitView.d.ts.map +1 -1
- package/dist/Stylo.d.ts.map +1 -1
- package/dist/editor/SourceView.d.ts +5 -3
- package/dist/editor/SourceView.d.ts.map +1 -1
- 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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/inplace/InPlaceView.d.ts +5 -3
- package/dist/inplace/InPlaceView.d.ts.map +1 -1
- package/dist/stylo.js +85 -80
- package/dist/stylo.js.map +1 -1
- package/dist/types.d.ts +26 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/{useCodeMirror-CjG9CwpB.js → useCodeMirror-BI1kEPRE.js} +370 -324
- package/dist/useCodeMirror-BI1kEPRE.js.map +1 -0
- package/package.json +1 -1
- package/dist/useCodeMirror-CjG9CwpB.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.
|
|
@@ -176,15 +178,20 @@ editing surface itself, below the find/replace panel and above the document
|
|
|
176
178
|
body, a seam `toolbar.render` can't reach since it wraps content before the
|
|
177
179
|
whole canvas. See [Canvas header](./docs/wiki/reference/props.md#canvas-header).
|
|
178
180
|
|
|
179
|
-
`inPlace`, `codeLanguages`, and `
|
|
180
|
-
surface mounts — give `<Stylo>` a `key` derived from the
|
|
181
|
-
change. Every other prop is fully reactive. See
|
|
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
|
|
182
184
|
[props · applied at mount](./docs/wiki/reference/props.md#config-applied-at-mount).
|
|
183
185
|
|
|
184
186
|
Pass `wikiLinkSource` — `(query) => { target, label? }[]`, sync or async — to
|
|
185
187
|
turn on `[[wikilink]]` autocomplete backed by your own index. See
|
|
186
188
|
[Wikilink autocomplete](./docs/wiki/reference/props.md#wikilink-autocomplete).
|
|
187
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
|
+
|
|
188
195
|
Pass `embedSource` — `(ref) => ReactNode`, sync or async — to resolve
|
|
189
196
|
`![[embed]]` transclusion on every rendered surface, the in-place canvas
|
|
190
197
|
included. Stylo detects the `![[…]]` (when it is alone on its line) and renders
|