@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 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 `wikiLinkSource` are read once, when the editing
180
- surface mounts — give `<Stylo>` a `key` derived from the config to apply a
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