@llui/markdown-editor 0.2.14 → 0.4.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 (70) hide show
  1. package/dist/editor.d.ts +22 -2
  2. package/dist/editor.d.ts.map +1 -1
  3. package/dist/editor.js +45 -6
  4. package/dist/editor.js.map +1 -1
  5. package/dist/effects.d.ts +0 -1
  6. package/dist/effects.d.ts.map +1 -1
  7. package/dist/effects.js +4 -1
  8. package/dist/effects.js.map +1 -1
  9. package/dist/index.d.ts +9 -4
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +18 -4
  12. package/dist/index.js.map +1 -1
  13. package/dist/plugins/block-drag.d.ts +73 -0
  14. package/dist/plugins/block-drag.d.ts.map +1 -0
  15. package/dist/plugins/block-drag.js +760 -0
  16. package/dist/plugins/block-drag.js.map +1 -0
  17. package/dist/plugins/code-language.d.ts +60 -0
  18. package/dist/plugins/code-language.d.ts.map +1 -0
  19. package/dist/plugins/code-language.js +308 -0
  20. package/dist/plugins/code-language.js.map +1 -0
  21. package/dist/plugins/frontmatter.d.ts +45 -0
  22. package/dist/plugins/frontmatter.d.ts.map +1 -0
  23. package/dist/plugins/frontmatter.js +281 -0
  24. package/dist/plugins/frontmatter.js.map +1 -0
  25. package/dist/plugins/overlay.d.ts +1 -0
  26. package/dist/plugins/overlay.d.ts.map +1 -1
  27. package/dist/plugins/overlay.js +7 -0
  28. package/dist/plugins/overlay.js.map +1 -1
  29. package/dist/plugins/table.d.ts.map +1 -1
  30. package/dist/plugins/table.js +77 -15
  31. package/dist/plugins/table.js.map +1 -1
  32. package/dist/plugins/wikilink.d.ts +91 -0
  33. package/dist/plugins/wikilink.d.ts.map +1 -0
  34. package/dist/plugins/wikilink.js +467 -0
  35. package/dist/plugins/wikilink.js.map +1 -0
  36. package/dist/styles/block-drag.css +63 -0
  37. package/dist/styles/editor.css +64 -6
  38. package/dist/theme.d.ts +2 -5
  39. package/dist/theme.d.ts.map +1 -1
  40. package/dist/theme.js +15 -11
  41. package/dist/theme.js.map +1 -1
  42. package/dist/transformers/code.d.ts +24 -0
  43. package/dist/transformers/code.d.ts.map +1 -0
  44. package/dist/transformers/code.js +167 -0
  45. package/dist/transformers/code.js.map +1 -0
  46. package/dist/transformers/gfm.d.ts +9 -1
  47. package/dist/transformers/gfm.d.ts.map +1 -1
  48. package/dist/transformers/gfm.js +16 -4
  49. package/dist/transformers/gfm.js.map +1 -1
  50. package/dist/transformers/registry.d.ts +3 -0
  51. package/dist/transformers/registry.d.ts.map +1 -1
  52. package/dist/transformers/registry.js +26 -0
  53. package/dist/transformers/registry.js.map +1 -1
  54. package/package.json +45 -31
  55. package/src/editor.ts +77 -9
  56. package/src/effects.ts +4 -2
  57. package/src/index.ts +61 -9
  58. package/src/plugins/block-drag.ts +912 -0
  59. package/src/plugins/code-language.ts +378 -0
  60. package/src/plugins/frontmatter.ts +324 -0
  61. package/src/plugins/overlay.ts +7 -0
  62. package/src/plugins/table.ts +87 -13
  63. package/src/plugins/wikilink.ts +553 -0
  64. package/src/styles/block-drag.css +63 -0
  65. package/src/styles/editor.css +64 -6
  66. package/src/theme.ts +15 -11
  67. package/src/transformers/code.ts +174 -0
  68. package/src/transformers/gfm.ts +16 -4
  69. package/src/transformers/registry.ts +27 -0
  70. package/dist/__llui_deps.json +0 -274
@@ -83,12 +83,6 @@
83
83
  [data-lexical-editor] .md-strikethrough {
84
84
  text-decoration: line-through;
85
85
  }
86
- [data-lexical-editor] .md-underline {
87
- text-decoration: underline;
88
- }
89
- [data-lexical-editor] .md-underline-strikethrough {
90
- text-decoration: underline line-through;
91
- }
92
86
 
93
87
  /* Task-list items (li[role="checkbox"]) with a clickable checkbox. */
94
88
  [data-lexical-editor] li[role='checkbox'] {
@@ -351,6 +345,40 @@
351
345
  background: var(--md-surface-2);
352
346
  }
353
347
 
348
+ /* ── Code-block language badge ────────────────────────────────────────── */
349
+ [data-scope='md-code-language'][data-part='bar'] {
350
+ padding: 0.15rem;
351
+ background: var(--md-surface);
352
+ border: 1px solid var(--md-border);
353
+ border-radius: 6px;
354
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
355
+ }
356
+ [data-scope='md-code-language'][data-part='input'] {
357
+ font: inherit;
358
+ font-family: var(--md-mono);
359
+ font-size: 0.72rem;
360
+ width: 8rem;
361
+ padding: 0.1rem 0.3rem;
362
+ color: var(--md-text);
363
+ background: transparent;
364
+ border: none;
365
+ outline: none;
366
+ }
367
+ [data-scope='md-code-language'][data-part='input']::placeholder {
368
+ color: var(--md-muted);
369
+ }
370
+
371
+ /* ── Wiki links ───────────────────────────────────────────────────────── */
372
+ [data-scope='md-wikilink'][data-part='link'] {
373
+ color: var(--md-primary);
374
+ text-decoration: none;
375
+ border-bottom: 1px solid var(--md-primary-soft);
376
+ cursor: pointer;
377
+ }
378
+ [data-scope='md-wikilink'][data-part='link']:hover {
379
+ border-bottom-color: var(--md-primary);
380
+ }
381
+
354
382
  /* ── Math block ───────────────────────────────────────────────────────── */
355
383
  [data-scope='md-math'][data-part='root'] {
356
384
  display: flex;
@@ -375,6 +403,36 @@
375
403
  text-align: center;
376
404
  }
377
405
 
406
+ /* ── Frontmatter block ────────────────────────────────────────────────── */
407
+ [data-scope='md-frontmatter'][data-part='root'] {
408
+ display: flex;
409
+ flex-direction: column;
410
+ gap: 0.4rem;
411
+ margin: 0 0 0.9rem;
412
+ padding: 0.6rem 0.8rem;
413
+ border: 1px dashed var(--md-border);
414
+ border-radius: 8px;
415
+ background: var(--md-surface-2);
416
+ }
417
+ [data-scope='md-frontmatter'] [data-part='source'] {
418
+ width: 100%;
419
+ box-sizing: border-box;
420
+ border: 0;
421
+ padding: 0;
422
+ resize: vertical;
423
+ background: transparent;
424
+ font-family: var(--md-mono);
425
+ font-size: 0.82rem;
426
+ line-height: 1.5;
427
+ white-space: pre;
428
+ overflow-x: auto;
429
+ color: var(--md-muted);
430
+ outline: none;
431
+ }
432
+ [data-scope='md-frontmatter'] [data-part='source']:focus {
433
+ color: var(--md-text);
434
+ }
435
+
378
436
  /* ── Mermaid block ────────────────────────────────────────────────────── */
379
437
  [data-scope='md-mermaid'][data-part='root'] {
380
438
  display: flex;
package/src/theme.ts CHANGED
@@ -2,10 +2,19 @@
2
2
  //
3
3
  // Lexical styles most inline formats through semantic tags that carry
4
4
  // browser-default styling — bold→<strong>, italic→<em>, code→<code>. But
5
- // `strikethrough` (and `underline`) render as a bare <span> whose ONLY styling
6
- // hook is a `theme.text.<format>` class. With no theme the format is applied to
7
- // the model but is visually invisible. This default theme supplies those class
8
- // names; the bundled `styles/editor.css` gives them their `text-decoration`.
5
+ // `strikethrough` renders as a bare <span> whose ONLY styling hook is a
6
+ // `theme.text.strikethrough` class. With no theme the format is applied to the
7
+ // model but is visually invisible. This default theme supplies that class name;
8
+ // the bundled `styles/editor.css` gives it its `text-decoration`.
9
+ //
10
+ // `underline` is deliberately NOT themed here: the GFM markdown dialect this
11
+ // editor serializes has no underline representation (Lexical's text-format
12
+ // transformers require a SYMMETRIC delimiter, and there is no standard symmetric
13
+ // underline syntax), so an applied underline would be silently stripped on save.
14
+ // To keep the WYSIWYG surface and the serialized dialect in lock-step, the
15
+ // underline command is also intercepted at the editor seam (see editor.ts) — so
16
+ // underline can be neither applied nor lost. Add it back (theme + transformer +
17
+ // command) only alongside a dialect that can round-trip it.
9
18
  //
10
19
  // Consumers can override any entry via `markdownEditor({ theme })` — the user's
11
20
  // theme is merged over this default (see `mergeTheme`).
@@ -13,22 +22,17 @@
13
22
  import type { EditorThemeClasses } from 'lexical'
14
23
 
15
24
  export const STRIKETHROUGH_CLASS = 'md-strikethrough'
16
- export const UNDERLINE_CLASS = 'md-underline'
17
- export const UNDERLINE_STRIKETHROUGH_CLASS = 'md-underline-strikethrough'
18
25
 
19
26
  /** The class hooks Lexical needs for text-decoration formats it renders as a
20
- * plain <span>. (`underlineStrikethrough` is Lexical's special composite key for
21
- * the case where both apply — both want `text-decoration`.) */
27
+ * plain <span>. */
22
28
  export const defaultTheme: EditorThemeClasses = {
23
29
  text: {
24
30
  strikethrough: STRIKETHROUGH_CLASS,
25
- underline: UNDERLINE_CLASS,
26
- underlineStrikethrough: UNDERLINE_STRIKETHROUGH_CLASS,
27
31
  },
28
32
  }
29
33
 
30
34
  /** Merge a consumer theme over the default. `text` is merged per-key so a
31
- * consumer overriding (say) `strikethrough` keeps the default `underline`.
35
+ * consumer overriding (say) `strikethrough` keeps the other default entries.
32
36
  *
33
37
  * Always returns a FRESH theme (never the shared `defaultTheme` singleton):
34
38
  * Lexical caches resolved class arrays by MUTATING the `text` object it is
@@ -0,0 +1,174 @@
1
+ // The fenced-code-block transformer.
2
+ //
3
+ // ## Why this package does not use `@lexical/markdown`'s `CODE`
4
+ //
5
+ // Upstream's `CODE_START_REGEX` captures the info string with `([\w-]+)?`, i.e.
6
+ // a SINGLE word-ish token. Everything after that token stays on the line and is
7
+ // pushed into the code block's CONTENT:
8
+ //
9
+ // ```lance table → language 'lance', body 'table\nsum(x)' (corrupt)
10
+ // ```c++ → language 'c', body '++\nint main()' (corrupt)
11
+ //
12
+ // That is silent data loss on perfectly ordinary markdown. CommonMark defines
13
+ // the info string as *the rest of the line*, trimmed — so
14
+ // {@link CODE_INFO_TRANSFORMER} captures exactly that and hands it to
15
+ // `CodeNode.setLanguage` untouched.
16
+ //
17
+ // This lives in `transformers/` (not in `plugins/code-language.ts`) so that it
18
+ // is the DEFAULT in `GFM_TRANSFORMERS` rather than an opt-in a consumer has to
19
+ // remember to order ahead of `corePlugin()`. `codeLanguagePlugin()` contributes
20
+ // this same object reference, so the registry's reference de-duplication
21
+ // collapses the two contributions into one and plugin order cannot change the
22
+ // parse. See `test/composition.test.ts`.
23
+ //
24
+ // ## The language is an opaque label
25
+ //
26
+ // The package depends on `@lexical/code-core`, not `@lexical/code`, to keep
27
+ // Prism out of the bundle. Nothing interprets the info string — it is stored,
28
+ // shown, edited, and re-emitted verbatim. That opacity is precisely what lets an
29
+ // arbitrary token like `lance table` survive a round-trip.
30
+
31
+ import { $createTextNode, type ElementNode, type LexicalNode } from 'lexical'
32
+ import { $createCodeNode, $isCodeNode, CodeNode } from '@lexical/code-core'
33
+ import type { MultilineElementTransformer } from '@lexical/markdown'
34
+
35
+ /**
36
+ * Canonicalize a fence info string.
37
+ *
38
+ * CommonMark's info string is the remainder of the opening-fence line with the
39
+ * surrounding whitespace stripped; a blank one means "no language". Two
40
+ * characters are removed rather than preserved, because keeping them would emit
41
+ * markdown that no longer re-imports to the same block:
42
+ *
43
+ * - a backtick — illegal in a backtick-fenced info string (it would terminate
44
+ * or corrupt the fence);
45
+ * - a newline — it would end the fence line entirely.
46
+ *
47
+ * Everything else survives verbatim, including spaces (`'lance table'`) and
48
+ * punctuation (`'c++'`, `'objective-c'`).
49
+ */
50
+ export function normalizeCodeInfo(raw: string | null | undefined): string | null {
51
+ if (raw === null || raw === undefined) return null
52
+ const cleaned = raw
53
+ .replace(/`/g, '')
54
+ .replace(/[\r\n]+/g, ' ')
55
+ .trim()
56
+ return cleaned === '' ? null : cleaned
57
+ }
58
+
59
+ /** The opening fence: its backtick run, then the raw info string (rest of line). */
60
+ const FENCE_START = /^([ \t]*`{3,})(.*)$/
61
+ /** A closing fence of at least `length` backticks on a line of its own. */
62
+ const fenceEndFor = (length: number): RegExp => new RegExp(`^[ \\t]*\`{${length},}[ \\t]*$`)
63
+
64
+ /**
65
+ * The narrowest fence that can enclose `code` without being terminated early:
66
+ * one backtick longer than the longest fence-like run inside it.
67
+ */
68
+ function fenceFor(code: string): string {
69
+ const runs = code.match(/`{3,}/g)
70
+ const longest = runs ? Math.max(...runs.map((run) => run.length)) : 0
71
+ return '`'.repeat(Math.max(3, longest + 1))
72
+ }
73
+
74
+ /**
75
+ * A self-closing opening fence (```` ```code``` ````): the closing run sits on
76
+ * the SAME line, so the span between the fences is CONTENT and there is no info
77
+ * string. Returns that content, or `null` when the line is an ordinary opening
78
+ * fence.
79
+ *
80
+ * Shared by BOTH directions on purpose. It used to live only in
81
+ * `handleImportAfterStartMatch`, so the import path and the typed-shortcut
82
+ * `replace` path parsed the same text two different ways: importing
83
+ * '```inline```' gave a language-less block containing `inline`, while TYPING it
84
+ * and pressing Enter gave an EMPTY block labelled 'inline' — the word was gone.
85
+ * The divergence was reachable because `FENCE_START`'s `(.*)$` consumes the
86
+ * whole line, which always satisfies the shortcut engine's `match[0].length ===
87
+ * matchLength` gate. (Upstream's narrower `CODE_START_REGEX` never matched this
88
+ * shape, so widening the capture is what introduced it.)
89
+ */
90
+ function singleLineFenceContent(fence: string, rest: string): string | null {
91
+ const closing = rest.match(new RegExp(`\`{${fence.length},}[ \t]*$`))
92
+ return closing && closing.index !== undefined ? rest.slice(0, closing.index) : null
93
+ }
94
+
95
+ /** Append a code block carrying `language` and `lines` to `parent`. */
96
+ function $appendCodeNode(
97
+ parent: ElementNode,
98
+ language: string | null,
99
+ lines: readonly string[],
100
+ ): void {
101
+ const node = $createCodeNode(language ?? undefined)
102
+ const code = lines.join('\n')
103
+ if (code !== '') node.append($createTextNode(code))
104
+ parent.append(node)
105
+ }
106
+
107
+ /**
108
+ * A drop-in replacement for `@lexical/markdown`'s `CODE` that treats the whole
109
+ * remainder of the opening-fence line as the info string (CommonMark's rule)
110
+ * instead of a single `[\w-]+` token.
111
+ */
112
+ export const CODE_INFO_TRANSFORMER: MultilineElementTransformer = {
113
+ dependencies: [CodeNode],
114
+ export: (node: LexicalNode): string | null => {
115
+ if (!$isCodeNode(node)) return null
116
+ const code = node.getTextContent()
117
+ const fence = fenceFor(code)
118
+ const info = normalizeCodeInfo(node.getLanguage()) ?? ''
119
+ return fence + info + (code === '' ? '' : '\n' + code) + '\n' + fence
120
+ },
121
+ handleImportAfterStartMatch: ({ lines, rootNode, startLineIndex, startMatch }) => {
122
+ const fence = (startMatch[1] ?? '```').trim()
123
+ const rest = startMatch[2] ?? ''
124
+
125
+ // Single-line form (```code```) — see `singleLineFenceContent`. Matches
126
+ // `@lexical/markdown`, and matches CommonMark, which forbids a backtick
127
+ // inside the info string.
128
+ const inline = singleLineFenceContent(fence, rest)
129
+ if (inline !== null) {
130
+ $appendCodeNode(rootNode, null, [inline])
131
+ return [true, startLineIndex]
132
+ }
133
+
134
+ const language = normalizeCodeInfo(rest)
135
+ const fenceEnd = fenceEndFor(fence.length)
136
+ for (let i = startLineIndex + 1; i < lines.length; i++) {
137
+ if (fenceEnd.test(lines[i] as string)) {
138
+ $appendCodeNode(rootNode, language, lines.slice(startLineIndex + 1, i))
139
+ return [true, i]
140
+ }
141
+ }
142
+ // Unterminated fence: consume to the end of the document.
143
+ $appendCodeNode(rootNode, language, lines.slice(startLineIndex + 1))
144
+ return [true, lines.length - 1]
145
+ },
146
+ regExpEnd: { optional: true, regExp: /^[ \t]*`{3,}[ \t]*$/ },
147
+ regExpStart: FENCE_START,
148
+ // Import is fully handled above; `replace` serves the typed-shortcut path
149
+ // (`registerMarkdownShortcuts` calls it with the trailing siblings) and the
150
+ // paste path (`children === null`, lines supplied).
151
+ replace: (rootNode, children, startMatch, _endMatch, linesInBetween, isImport) => {
152
+ const fence = (startMatch[1] ?? '```').trim()
153
+ const rest = startMatch[2] ?? ''
154
+ // The SAME single-line rule the import path applies, so the two agree.
155
+ const inline = singleLineFenceContent(fence, rest)
156
+ if (inline !== null) {
157
+ const node = $createCodeNode()
158
+ if (inline !== '') node.append($createTextNode(inline))
159
+ rootNode.replace(node)
160
+ if (!isImport) node.select(0, 0)
161
+ return
162
+ }
163
+ const language = normalizeCodeInfo(rest)
164
+ if (!children) {
165
+ $appendCodeNode(rootNode, language, linesInBetween ?? [])
166
+ return
167
+ }
168
+ const node = $createCodeNode(language ?? undefined)
169
+ node.append(...children)
170
+ rootNode.replace(node)
171
+ if (!isImport) node.select(0, 0)
172
+ },
173
+ type: 'multiline-element',
174
+ }
@@ -15,7 +15,6 @@ import {
15
15
  UNORDERED_LIST,
16
16
  ORDERED_LIST,
17
17
  CHECK_LIST,
18
- CODE,
19
18
  BOLD_ITALIC_STAR,
20
19
  BOLD_ITALIC_UNDERSCORE,
21
20
  BOLD_STAR,
@@ -27,6 +26,7 @@ import {
27
26
  HIGHLIGHT,
28
27
  LINK,
29
28
  } from '@lexical/markdown'
29
+ import { CODE_INFO_TRANSFORMER } from './code.js'
30
30
 
31
31
  /** Node classes required to render the GFM superset. */
32
32
  export const GFM_NODES: ReadonlyArray<Klass<LexicalNode>> = [
@@ -39,9 +39,18 @@ export const GFM_NODES: ReadonlyArray<Klass<LexicalNode>> = [
39
39
  LinkNode,
40
40
  ]
41
41
 
42
+ /** The `==highlight==` transformer. NOT part of the default GFM set: `==..==` is
43
+ * not GFM, so exporting it produces non-standard markdown other renderers won't
44
+ * understand. Offered as an opt-in a consumer can add to a plugin's transformers. */
45
+ export const HIGHLIGHT_TRANSFORMER: Transformer = HIGHLIGHT
46
+
42
47
  /** Inline text-format transformers (no block nodes, no node registration). These
43
48
  * are the only transformers a single-block / inline-only editor needs; `LINK` is
44
- * kept separate since it requires `LinkNode` to be registered. */
49
+ * kept separate since it requires `LinkNode` to be registered.
50
+ *
51
+ * `HIGHLIGHT` is deliberately excluded: it round-trips as the non-GFM `==..==`
52
+ * syntax, so it would silently emit markdown outside the editor's stated dialect.
53
+ * Opt in with {@link HIGHLIGHT_TRANSFORMER}. */
45
54
  export const INLINE_TEXT_TRANSFORMERS: readonly Transformer[] = [
46
55
  BOLD_ITALIC_STAR,
47
56
  BOLD_ITALIC_UNDERSCORE,
@@ -51,7 +60,6 @@ export const INLINE_TEXT_TRANSFORMERS: readonly Transformer[] = [
51
60
  ITALIC_UNDERSCORE,
52
61
  STRIKETHROUGH,
53
62
  INLINE_CODE,
54
- HIGHLIGHT,
55
63
  ]
56
64
 
57
65
  /** Markdown ↔ node transformers for the GFM superset. */
@@ -63,7 +71,11 @@ export const GFM_TRANSFORMERS: readonly Transformer[] = [
63
71
  CHECK_LIST,
64
72
  UNORDERED_LIST,
65
73
  ORDERED_LIST,
66
- CODE,
74
+ // NOT `@lexical/markdown`'s `CODE`: that one captures the info string as a
75
+ // single `[\w-]+` token and pushes the remainder of the fence line into the
76
+ // code body, silently corrupting ```c++ and ```lance table. See
77
+ // `transformers/code.ts`.
78
+ CODE_INFO_TRANSFORMER,
67
79
  ...INLINE_TEXT_TRANSFORMERS,
68
80
  LINK,
69
81
  ]
@@ -15,6 +15,28 @@ const TYPE_RANK: Record<string, number> = {
15
15
  'text-match': 3,
16
16
  }
17
17
 
18
+ /**
19
+ * Explicit ordering between transformers of the SAME rank.
20
+ *
21
+ * Within a rank Lexical falls back to array position, which for text-match
22
+ * transformers means `findOutermostTextMatchTransformer` breaks a tie — two
23
+ * transformers matching at the SAME start index — by plugin array order. That
24
+ * makes round-trip fidelity depend on the order a consumer happens to list
25
+ * plugins in, which is exactly the failure mode the registry exists to prevent.
26
+ *
27
+ * A transformer that must be consulted ahead of a same-rank peer declares a
28
+ * LOWER precedence here (default 0). This is a side table rather than a field on
29
+ * the transformer because the colliding peers include upstream's `LINK`, which
30
+ * this package does not own and cannot annotate.
31
+ */
32
+ const precedence = new WeakMap<Transformer, number>()
33
+
34
+ /** Declare that `transformer` must be consulted before same-rank peers with a
35
+ * higher value. Call at module scope, beside the transformer's definition. */
36
+ export function setTransformerPrecedence(transformer: Transformer, value: number): void {
37
+ precedence.set(transformer, value)
38
+ }
39
+
18
40
  /** Stable-sort transformers into the order Lexical expects. */
19
41
  export function orderTransformers(transformers: readonly Transformer[]): Transformer[] {
20
42
  return [...transformers].sort((a, b) => {
@@ -25,6 +47,11 @@ export function orderTransformers(transformers: readonly Transformer[]): Transfo
25
47
  // Longer trigger (`***`) before shorter (`**`, `*`).
26
48
  return b.tag.length - a.tag.length
27
49
  }
50
+ const pa = precedence.get(a) ?? 0
51
+ const pb = precedence.get(b) ?? 0
52
+ if (pa !== pb) return pa - pb
53
+ // Equal precedence: `Array.prototype.sort` is specified stable, so the
54
+ // plugin array order is preserved — the documented default.
28
55
  return 0
29
56
  })
30
57
  }
@@ -1,274 +0,0 @@
1
- {
2
- "compilerVersion": "0.3.0",
3
- "components": {},
4
- "helpers": {
5
- "editor#markdownEditor": {
6
- "helperLocalPaths": [],
7
- "kind": "view-helper",
8
- "viaParams": [
9
- {
10
- "index": 0,
11
- "reads": [
12
- "changeDebounceMs",
13
- "collab",
14
- "defaultValue",
15
- "namespace",
16
- "onChange",
17
- "onFormatChange",
18
- "pasteMarkdown",
19
- "placeholder",
20
- "plugins",
21
- "plugins.length",
22
- "readonly",
23
- "theme",
24
- "toolbar",
25
- "value"
26
- ],
27
- "shape": "state-value"
28
- }
29
- ]
30
- },
31
- "format#computeFormatState": {
32
- "helperLocalPaths": [],
33
- "kind": "view-helper",
34
- "viaParams": [
35
- {
36
- "index": 0,
37
- "shape": "opaque"
38
- },
39
- {
40
- "index": 1,
41
- "reads": [
42
- "canRedo",
43
- "canUndo"
44
- ],
45
- "shape": "state-value"
46
- }
47
- ]
48
- },
49
- "plugins/callout#calloutPlugin": {
50
- "helperLocalPaths": [],
51
- "kind": "view-helper",
52
- "viaParams": [
53
- {
54
- "index": 0,
55
- "reads": [
56
- "defaultKind"
57
- ],
58
- "shape": "state-value"
59
- }
60
- ]
61
- },
62
- "plugins/emoji#emojiPlugin": {
63
- "helperLocalPaths": [],
64
- "kind": "view-helper",
65
- "viaParams": [
66
- {
67
- "index": 0,
68
- "reads": [
69
- "emoji"
70
- ],
71
- "shape": "state-value"
72
- }
73
- ]
74
- },
75
- "plugins/image#imagePlugin": {
76
- "helperLocalPaths": [],
77
- "kind": "view-helper",
78
- "viaParams": [
79
- {
80
- "index": 0,
81
- "reads": [
82
- "upload"
83
- ],
84
- "shape": "state-value"
85
- }
86
- ]
87
- },
88
- "plugins/link#linkPlugin": {
89
- "helperLocalPaths": [],
90
- "kind": "view-helper",
91
- "viaParams": [
92
- {
93
- "index": 0,
94
- "reads": [
95
- "defaultUrl"
96
- ],
97
- "shape": "state-value"
98
- }
99
- ]
100
- },
101
- "plugins/math#mathPlugin": {
102
- "helperLocalPaths": [],
103
- "kind": "view-helper",
104
- "viaParams": [
105
- {
106
- "index": 0,
107
- "reads": [
108
- "render"
109
- ],
110
- "shape": "state-value"
111
- }
112
- ]
113
- },
114
- "plugins/mention#mentionPlugin": {
115
- "helperLocalPaths": [],
116
- "kind": "view-helper",
117
- "viaParams": [
118
- {
119
- "index": 0,
120
- "reads": [
121
- "source"
122
- ],
123
- "shape": "state-value"
124
- }
125
- ]
126
- },
127
- "plugins/mermaid#mermaidPlugin": {
128
- "helperLocalPaths": [],
129
- "kind": "view-helper",
130
- "viaParams": [
131
- {
132
- "index": 0,
133
- "reads": [
134
- "render"
135
- ],
136
- "shape": "state-value"
137
- }
138
- ]
139
- },
140
- "plugins/overlay#overlayRoot": {
141
- "helperLocalPaths": [],
142
- "kind": "view-helper",
143
- "viaParams": [
144
- {
145
- "index": 0,
146
- "reads": [
147
- "attrs",
148
- "before",
149
- "open",
150
- "transform",
151
- "x",
152
- "y",
153
- "zIndex"
154
- ],
155
- "shape": "state-value"
156
- }
157
- ]
158
- },
159
- "plugins/single-block#singleBlockPlugin": {
160
- "helperLocalPaths": [],
161
- "kind": "view-helper",
162
- "viaParams": [
163
- {
164
- "index": 0,
165
- "reads": [
166
- "allowLineBreaks",
167
- "formats",
168
- "link"
169
- ],
170
- "shape": "state-value"
171
- }
172
- ]
173
- },
174
- "plugins/ui#definePluginUI": {
175
- "helperLocalPaths": [],
176
- "kind": "view-helper",
177
- "viaParams": [
178
- {
179
- "index": 0,
180
- "reads": [
181
- "init",
182
- "onEffect",
183
- "update",
184
- "view"
185
- ],
186
- "shape": "state-value"
187
- }
188
- ]
189
- },
190
- "state#init": {
191
- "helperLocalPaths": [],
192
- "kind": "view-helper",
193
- "viaParams": [
194
- {
195
- "index": 0,
196
- "reads": [
197
- "collab",
198
- "readonly",
199
- "value",
200
- "value.length"
201
- ],
202
- "shape": "state-value"
203
- }
204
- ]
205
- },
206
- "state#update": {
207
- "helperLocalPaths": [],
208
- "kind": "view-helper",
209
- "viaParams": [
210
- {
211
- "index": 0,
212
- "shape": "opaque"
213
- },
214
- {
215
- "index": 1,
216
- "reads": [
217
- "charCount",
218
- "connected",
219
- "format",
220
- "id",
221
- "overlay",
222
- "peers",
223
- "query",
224
- "readonly",
225
- "synced",
226
- "type",
227
- "value",
228
- "wordCount",
229
- "x",
230
- "y"
231
- ],
232
- "shape": "state-value"
233
- }
234
- ]
235
- },
236
- "surfaces/link-dialog#linkDialog": {
237
- "helperLocalPaths": [],
238
- "kind": "view-helper",
239
- "viaParams": [
240
- {
241
- "index": 0,
242
- "reads": [
243
- "dialog",
244
- "id",
245
- "onDialog",
246
- "url"
247
- ],
248
- "shape": "state-value"
249
- }
250
- ]
251
- },
252
- "surfaces/toolbar#toolbar": {
253
- "helperLocalPaths": [],
254
- "kind": "view-helper",
255
- "viaParams": [
256
- {
257
- "index": 0,
258
- "reads": [
259
- "aria-label",
260
- "blockSelect",
261
- "collab",
262
- "format",
263
- "glyphs",
264
- "groups",
265
- "items",
266
- "send"
267
- ],
268
- "shape": "state-value"
269
- }
270
- ]
271
- }
272
- },
273
- "version": 2
274
- }