quoin-editor 1.5.0 → 1.7.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 (148) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +4 -3
  3. package/dist/ai.cjs +21 -23
  4. package/dist/ai.js +1 -1
  5. package/dist/catalogue.cjs +18 -18
  6. package/dist/catalogue.d.cts +2 -0
  7. package/dist/catalogue.d.ts +2 -0
  8. package/dist/catalogue.js +11 -9
  9. package/dist/catalogue.js.map +1 -1
  10. package/dist/chunk-2SWLD6R5.cjs +0 -2
  11. package/dist/chunk-4T4TJ2QS.cjs +0 -2
  12. package/dist/{chunk-2AVGGPLT.js → chunk-5JEQZIRI.js} +3 -3
  13. package/dist/{chunk-2AVGGPLT.js.map → chunk-5JEQZIRI.js.map} +1 -1
  14. package/dist/{chunk-UUSZGUXJ.cjs → chunk-6T5YGCZ5.cjs} +1 -2
  15. package/dist/{chunk-B5OMWOVI.js → chunk-7GU25Z6L.js} +3 -3
  16. package/dist/{chunk-B5OMWOVI.js.map → chunk-7GU25Z6L.js.map} +1 -1
  17. package/dist/chunk-A6PGQVTR.cjs +0 -2
  18. package/dist/chunk-AZF7B2AE.cjs +0 -2
  19. package/dist/{chunk-FNZGXL3O.cjs → chunk-BF7733XS.cjs} +17 -19
  20. package/dist/chunk-BM2GRZNM.cjs +0 -2
  21. package/dist/{chunk-T7O3BROK.cjs → chunk-FNJOPGMN.cjs} +38 -40
  22. package/dist/chunk-H3C3MJW5.cjs +0 -2
  23. package/dist/{chunk-32OZ2WM2.js → chunk-HSLOPJVT.js} +3 -3
  24. package/dist/{chunk-32OZ2WM2.js.map → chunk-HSLOPJVT.js.map} +1 -1
  25. package/dist/{chunk-L6RB43YM.cjs → chunk-I722LBD3.cjs} +19 -21
  26. package/dist/{chunk-46JH34SR.cjs → chunk-JY5VUHKN.cjs} +7 -9
  27. package/dist/{chunk-TKCPXUPP.cjs → chunk-KDK2ATMB.cjs} +15 -17
  28. package/dist/chunk-LE5XMIFJ.cjs +0 -2
  29. package/dist/chunk-LKZJ2TDU.cjs +90 -0
  30. package/dist/{chunk-KF3KKN4N.js → chunk-MNA7MBCH.js} +3 -3
  31. package/dist/{chunk-KF3KKN4N.js.map → chunk-MNA7MBCH.js.map} +1 -1
  32. package/dist/{chunk-LOP66FVU.cjs → chunk-MZXW2HXP.cjs} +8 -10
  33. package/dist/{chunk-HVT5HAAZ.js → chunk-OJ4O6HWC.js} +4 -4
  34. package/dist/{chunk-HVT5HAAZ.js.map → chunk-OJ4O6HWC.js.map} +1 -1
  35. package/dist/{chunk-HT7OF52E.js → chunk-PLUMKN4B.js} +3 -3
  36. package/dist/{chunk-HT7OF52E.js.map → chunk-PLUMKN4B.js.map} +1 -1
  37. package/dist/{chunk-N2SCDXTI.js → chunk-PWUFFHAQ.js} +3 -3
  38. package/dist/{chunk-N2SCDXTI.js.map → chunk-PWUFFHAQ.js.map} +1 -1
  39. package/dist/chunk-QJ34MOFV.cjs +0 -2
  40. package/dist/chunk-QR2NIDUK.cjs +0 -2
  41. package/dist/chunk-RQXJKJ5S.js +88 -0
  42. package/dist/chunk-RQXJKJ5S.js.map +1 -0
  43. package/dist/chunk-STKGRXSA.cjs +0 -2
  44. package/dist/{chunk-O7XZFXPE.js → chunk-UZS3TW75.js} +3 -3
  45. package/dist/{chunk-O7XZFXPE.js.map → chunk-UZS3TW75.js.map} +1 -1
  46. package/dist/chunk-VZZPCYA3.cjs +0 -2
  47. package/dist/chunk-WN7BZDNH.cjs +0 -2
  48. package/dist/chunk-WZA5S5EJ.cjs +0 -2
  49. package/dist/chunk-XZ4NC3Q7.cjs +0 -2
  50. package/dist/{chunk-XFR7QGSN.cjs → chunk-YEFPH27F.cjs} +39 -41
  51. package/dist/comments.cjs +18 -20
  52. package/dist/comments.js +1 -1
  53. package/dist/diagram-extension-D573COJv.d.cts +38 -0
  54. package/dist/diagram-extension-Da7hp-tv.d.ts +38 -0
  55. package/dist/diagram.cjs +25 -0
  56. package/dist/diagram.d.cts +8 -0
  57. package/dist/diagram.d.ts +8 -0
  58. package/dist/diagram.js +10 -0
  59. package/dist/diagram.js.map +1 -0
  60. package/dist/diff.cjs +0 -2
  61. package/dist/docx.cjs +0 -2
  62. package/dist/embed.cjs +4 -6
  63. package/dist/embed.js +2 -2
  64. package/dist/emoji-data.cjs +0 -2
  65. package/dist/emoji.cjs +5 -7
  66. package/dist/emoji.js +2 -2
  67. package/dist/engine.cjs +0 -2
  68. package/dist/engine.d.cts +3 -15
  69. package/dist/engine.d.ts +3 -15
  70. package/dist/find.cjs +6 -8
  71. package/dist/find.js +2 -2
  72. package/dist/headless.cjs +0 -2
  73. package/dist/headless.d.cts +2 -1
  74. package/dist/headless.d.ts +2 -1
  75. package/dist/highlight.cjs +2 -4
  76. package/dist/highlight.js +1 -1
  77. package/dist/index.cjs +12 -14
  78. package/dist/index.d.cts +2 -1
  79. package/dist/index.d.ts +2 -1
  80. package/dist/index.js +1 -1
  81. package/dist/math.cjs +5 -7
  82. package/dist/math.js +3 -3
  83. package/dist/mention.cjs +4 -6
  84. package/dist/mention.js +2 -2
  85. package/dist/presence.cjs +1 -3
  86. package/dist/presence.js +1 -1
  87. package/dist/prism-grammars.cjs +0 -2
  88. package/dist/source.cjs +97 -0
  89. package/dist/source.d.cts +56 -0
  90. package/dist/source.d.ts +56 -0
  91. package/dist/source.js +94 -0
  92. package/dist/source.js.map +1 -0
  93. package/dist/stats.cjs +1 -3
  94. package/dist/stats.js +1 -1
  95. package/dist/styles.css +1 -1
  96. package/dist/table.cjs +21 -23
  97. package/dist/table.js +2 -2
  98. package/dist/to-markdown-BVOzhgVM.d.ts +17 -0
  99. package/dist/to-markdown-CFPMbbiX.d.cts +17 -0
  100. package/dist/toc.cjs +5 -7
  101. package/dist/toc.js +2 -2
  102. package/dist/view.cjs +0 -2
  103. package/dist/yjs.cjs +0 -2
  104. package/package.json +22 -2
  105. package/dist/ai.cjs.map +0 -1
  106. package/dist/catalogue.cjs.map +0 -1
  107. package/dist/chunk-2SWLD6R5.cjs.map +0 -1
  108. package/dist/chunk-46JH34SR.cjs.map +0 -1
  109. package/dist/chunk-4T4TJ2QS.cjs.map +0 -1
  110. package/dist/chunk-A6PGQVTR.cjs.map +0 -1
  111. package/dist/chunk-AZF7B2AE.cjs.map +0 -1
  112. package/dist/chunk-BM2GRZNM.cjs.map +0 -1
  113. package/dist/chunk-FNZGXL3O.cjs.map +0 -1
  114. package/dist/chunk-H3C3MJW5.cjs.map +0 -1
  115. package/dist/chunk-L6RB43YM.cjs.map +0 -1
  116. package/dist/chunk-LE5XMIFJ.cjs.map +0 -1
  117. package/dist/chunk-LOP66FVU.cjs.map +0 -1
  118. package/dist/chunk-QJ34MOFV.cjs.map +0 -1
  119. package/dist/chunk-QR2NIDUK.cjs.map +0 -1
  120. package/dist/chunk-STKGRXSA.cjs.map +0 -1
  121. package/dist/chunk-T7O3BROK.cjs.map +0 -1
  122. package/dist/chunk-TKCPXUPP.cjs.map +0 -1
  123. package/dist/chunk-UUSZGUXJ.cjs.map +0 -1
  124. package/dist/chunk-VZZPCYA3.cjs.map +0 -1
  125. package/dist/chunk-WN7BZDNH.cjs.map +0 -1
  126. package/dist/chunk-WZA5S5EJ.cjs.map +0 -1
  127. package/dist/chunk-XFR7QGSN.cjs.map +0 -1
  128. package/dist/chunk-XZ4NC3Q7.cjs.map +0 -1
  129. package/dist/comments.cjs.map +0 -1
  130. package/dist/diff.cjs.map +0 -1
  131. package/dist/docx.cjs.map +0 -1
  132. package/dist/embed.cjs.map +0 -1
  133. package/dist/emoji-data.cjs.map +0 -1
  134. package/dist/emoji.cjs.map +0 -1
  135. package/dist/engine.cjs.map +0 -1
  136. package/dist/find.cjs.map +0 -1
  137. package/dist/headless.cjs.map +0 -1
  138. package/dist/highlight.cjs.map +0 -1
  139. package/dist/index.cjs.map +0 -1
  140. package/dist/math.cjs.map +0 -1
  141. package/dist/mention.cjs.map +0 -1
  142. package/dist/presence.cjs.map +0 -1
  143. package/dist/prism-grammars.cjs.map +0 -1
  144. package/dist/stats.cjs.map +0 -1
  145. package/dist/table.cjs.map +0 -1
  146. package/dist/toc.cjs.map +0 -1
  147. package/dist/view.cjs.map +0 -1
  148. package/dist/yjs.cjs.map +0 -1
package/dist/engine.cjs CHANGED
@@ -226,5 +226,3 @@ Object.defineProperty(exports, "text", {
226
226
  enumerable: true,
227
227
  get: function () { return chunkWZA5S5EJ_cjs.text; }
228
228
  });
229
- //# sourceMappingURL=engine.cjs.map
230
- //# sourceMappingURL=engine.cjs.map
package/dist/engine.d.cts CHANGED
@@ -2,6 +2,7 @@ import { A as Attrs, M as Mark, c as AtomNode, m as InlineNode, I as Inline, T a
2
2
  export { d as Assoc, B as BlockAttrs, f as BlockContent, g as BlockFlow, l as InlineCodec, o as MarkdownExportContext, q as PosMap, b as Selection, t as StepResult } from './types-CQ8Vw_7N.cjs';
3
3
  import { b as Command, I as InputRule, o as TextStats, E as Extension } from './types-DXF9p4qV.cjs';
4
4
  export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, D as Decoration, a as Editor, j as EditorOptions, c as EditorState, F as FromHTMLOptions, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, T as Transaction, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-DXF9p4qV.cjs';
5
+ export { T as ToMarkdownOptions, t as toMarkdown } from './to-markdown-CFPMbbiX.cjs';
5
6
  export { E as EmbedProvider, a as EmbedUrl } from './embed-provider-jXwlRmnp.cjs';
6
7
  export { H as HTMLOptions, t as toHTML } from './to-html-1oD-CDle.cjs';
7
8
 
@@ -73,19 +74,6 @@ type FromMarkdownOptions = {
73
74
  };
74
75
  declare function fromMarkdown(markdown: string, options?: FromMarkdownOptions): QuoinBlock[];
75
76
 
76
- type ToMarkdownOptions = {
77
- schema?: Schema;
78
- resolveAssetUrl?: (storageKey: string) => string;
79
- comments?: boolean;
80
- /**
81
- * Write every block that markdown cannot hold in full as a quoin comment, so that fromMarkdown reads back all of its
82
- * data. Plain export, the default, writes native markdown and drops what that form cannot carry: block-level align,
83
- * colour, background and other extra keys, the indent no container explains, and the data of the other block types.
84
- */
85
- lossless?: boolean;
86
- };
87
- declare function toMarkdown(blocks: readonly QuoinBlock[], options?: ToMarkdownOptions): string;
88
-
89
77
  declare function parseInline(markdown: string, options?: ParseInlineOptions): Inline;
90
78
 
91
79
  declare function serializeInline(inline: Inline, options?: SerializeInlineOptions): string;
@@ -144,5 +132,5 @@ declare function diffBlocks(a: readonly QuoinBlock[], b: readonly QuoinBlock[],
144
132
 
145
133
  declare function defineExtension<E extends Extension>(extension: E): E;
146
134
 
147
- export { AtomNode, AtomSpec, Attrs, BlockRangeSelection, BlockSpec, CodecContext, Command, CreatedBlock, EngineBlock, EngineDoc, Extension, Inline, InlineNode, InputRule, Mark, MarkSpec, NodeSelection, PALETTE, ParseInlineOptions, Pos, QuoinBlock, Schema, SerializeInlineOptions, Step, StepJSON, TextNode, TextSelection, TextStats, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toMarkdown, toPlainText, typographyRules, undo };
148
- export type { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, ToMarkdownOptions };
135
+ export { AtomNode, AtomSpec, Attrs, BlockRangeSelection, BlockSpec, CodecContext, Command, CreatedBlock, EngineBlock, EngineDoc, Extension, Inline, InlineNode, InputRule, Mark, MarkSpec, NodeSelection, PALETTE, ParseInlineOptions, Pos, QuoinBlock, Schema, SerializeInlineOptions, Step, StepJSON, TextNode, TextSelection, TextStats, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo };
136
+ export type { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput };
package/dist/engine.d.ts CHANGED
@@ -2,6 +2,7 @@ import { A as Attrs, M as Mark, c as AtomNode, m as InlineNode, I as Inline, T a
2
2
  export { d as Assoc, B as BlockAttrs, f as BlockContent, g as BlockFlow, l as InlineCodec, o as MarkdownExportContext, q as PosMap, b as Selection, t as StepResult } from './types-CQ8Vw_7N.js';
3
3
  import { b as Command, I as InputRule, o as TextStats, E as Extension } from './types-BjLcmV00.js';
4
4
  export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, D as Decoration, a as Editor, j as EditorOptions, c as EditorState, F as FromHTMLOptions, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, T as Transaction, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-BjLcmV00.js';
5
+ export { T as ToMarkdownOptions, t as toMarkdown } from './to-markdown-BVOzhgVM.js';
5
6
  export { E as EmbedProvider, a as EmbedUrl } from './embed-provider-jXwlRmnp.js';
6
7
  export { H as HTMLOptions, t as toHTML } from './to-html-CLRBCX0I.js';
7
8
 
@@ -73,19 +74,6 @@ type FromMarkdownOptions = {
73
74
  };
74
75
  declare function fromMarkdown(markdown: string, options?: FromMarkdownOptions): QuoinBlock[];
75
76
 
76
- type ToMarkdownOptions = {
77
- schema?: Schema;
78
- resolveAssetUrl?: (storageKey: string) => string;
79
- comments?: boolean;
80
- /**
81
- * Write every block that markdown cannot hold in full as a quoin comment, so that fromMarkdown reads back all of its
82
- * data. Plain export, the default, writes native markdown and drops what that form cannot carry: block-level align,
83
- * colour, background and other extra keys, the indent no container explains, and the data of the other block types.
84
- */
85
- lossless?: boolean;
86
- };
87
- declare function toMarkdown(blocks: readonly QuoinBlock[], options?: ToMarkdownOptions): string;
88
-
89
77
  declare function parseInline(markdown: string, options?: ParseInlineOptions): Inline;
90
78
 
91
79
  declare function serializeInline(inline: Inline, options?: SerializeInlineOptions): string;
@@ -144,5 +132,5 @@ declare function diffBlocks(a: readonly QuoinBlock[], b: readonly QuoinBlock[],
144
132
 
145
133
  declare function defineExtension<E extends Extension>(extension: E): E;
146
134
 
147
- export { AtomNode, AtomSpec, Attrs, BlockRangeSelection, BlockSpec, CodecContext, Command, CreatedBlock, EngineBlock, EngineDoc, Extension, Inline, InlineNode, InputRule, Mark, MarkSpec, NodeSelection, PALETTE, ParseInlineOptions, Pos, QuoinBlock, Schema, SerializeInlineOptions, Step, StepJSON, TextNode, TextSelection, TextStats, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toMarkdown, toPlainText, typographyRules, undo };
148
- export type { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, ToMarkdownOptions };
135
+ export { AtomNode, AtomSpec, Attrs, BlockRangeSelection, BlockSpec, CodecContext, Command, CreatedBlock, EngineBlock, EngineDoc, Extension, Inline, InlineNode, InputRule, Mark, MarkSpec, NodeSelection, PALETTE, ParseInlineOptions, Pos, QuoinBlock, Schema, SerializeInlineOptions, Step, StepJSON, TextNode, TextSelection, TextStats, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo };
136
+ export type { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput };
package/dist/find.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkTKCPXUPP_cjs = require('./chunk-TKCPXUPP.cjs');
5
- require('./chunk-UUSZGUXJ.cjs');
4
+ var chunkKDK2ATMB_cjs = require('./chunk-KDK2ATMB.cjs');
5
+ require('./chunk-6T5YGCZ5.cjs');
6
6
  require('./chunk-QJ34MOFV.cjs');
7
7
  require('./chunk-A6PGQVTR.cjs');
8
8
  require('./chunk-VZZPCYA3.cjs');
@@ -13,19 +13,17 @@ require('./chunk-WZA5S5EJ.cjs');
13
13
 
14
14
  Object.defineProperty(exports, "englishFindLabels", {
15
15
  enumerable: true,
16
- get: function () { return chunkTKCPXUPP_cjs.englishFindLabels; }
16
+ get: function () { return chunkKDK2ATMB_cjs.englishFindLabels; }
17
17
  });
18
18
  Object.defineProperty(exports, "findExtension", {
19
19
  enumerable: true,
20
- get: function () { return chunkTKCPXUPP_cjs.findExtension; }
20
+ get: function () { return chunkKDK2ATMB_cjs.findExtension; }
21
21
  });
22
22
  Object.defineProperty(exports, "findMatches", {
23
23
  enumerable: true,
24
- get: function () { return chunkTKCPXUPP_cjs.findMatches; }
24
+ get: function () { return chunkKDK2ATMB_cjs.findMatches; }
25
25
  });
26
26
  Object.defineProperty(exports, "replaceMatches", {
27
27
  enumerable: true,
28
- get: function () { return chunkTKCPXUPP_cjs.replaceMatches; }
28
+ get: function () { return chunkKDK2ATMB_cjs.replaceMatches; }
29
29
  });
30
- //# sourceMappingURL=find.cjs.map
31
- //# sourceMappingURL=find.cjs.map
package/dist/find.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- export { englishFindLabels, findExtension, findMatches, replaceMatches } from './chunk-N2SCDXTI.js';
3
- import './chunk-32OZ2WM2.js';
2
+ export { englishFindLabels, findExtension, findMatches, replaceMatches } from './chunk-PWUFFHAQ.js';
3
+ import './chunk-HSLOPJVT.js';
4
4
  import './chunk-XFEDJEJF.js';
5
5
  import './chunk-HDJ653LM.js';
6
6
  import './chunk-OS2O6IKX.js';
package/dist/headless.cjs CHANGED
@@ -288,5 +288,3 @@ Object.defineProperty(exports, "text", {
288
288
  enumerable: true,
289
289
  get: function () { return chunkWZA5S5EJ_cjs.text; }
290
290
  });
291
- //# sourceMappingURL=headless.cjs.map
292
- //# sourceMappingURL=headless.cjs.map
@@ -6,7 +6,8 @@ import { D as Decoration, c as EditorState, E as Extension, T as Transaction } f
6
6
  export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, b as Command, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, a as Editor, j as EditorOptions, F as FromHTMLOptions, I as InputRule, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, o as TextStats, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-DXF9p4qV.cjs';
7
7
  import * as react from 'react';
8
8
  import { ComponentType, ReactNode } from 'react';
9
- export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, PALETTE, SchemaInput, ToMarkdownOptions, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toMarkdown, toPlainText, typographyRules, undo } from './engine.cjs';
9
+ export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, PALETTE, SchemaInput, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo } from './engine.cjs';
10
+ export { T as ToMarkdownOptions, t as toMarkdown } from './to-markdown-CFPMbbiX.cjs';
10
11
  export { E as EmbedProvider, a as EmbedUrl } from './embed-provider-jXwlRmnp.cjs';
11
12
  export { H as HTMLOptions, t as toHTML } from './to-html-1oD-CDle.cjs';
12
13
 
@@ -6,7 +6,8 @@ import { D as Decoration, c as EditorState, E as Extension, T as Transaction } f
6
6
  export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, b as Command, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, a as Editor, j as EditorOptions, F as FromHTMLOptions, I as InputRule, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, o as TextStats, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-BjLcmV00.js';
7
7
  import * as react from 'react';
8
8
  import { ComponentType, ReactNode } from 'react';
9
- export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, PALETTE, SchemaInput, ToMarkdownOptions, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toMarkdown, toPlainText, typographyRules, undo } from './engine.js';
9
+ export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, PALETTE, SchemaInput, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo } from './engine.js';
10
+ export { T as ToMarkdownOptions, t as toMarkdown } from './to-markdown-BVOzhgVM.js';
10
11
  export { E as EmbedProvider, a as EmbedUrl } from './embed-provider-jXwlRmnp.js';
11
12
  export { H as HTMLOptions, t as toHTML } from './to-html-CLRBCX0I.js';
12
13
 
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunk2SWLD6R5_cjs = require('./chunk-2SWLD6R5.cjs');
5
- var chunkUUSZGUXJ_cjs = require('./chunk-UUSZGUXJ.cjs');
5
+ var chunk6T5YGCZ5_cjs = require('./chunk-6T5YGCZ5.cjs');
6
6
  require('./chunk-QJ34MOFV.cjs');
7
7
  require('./chunk-A6PGQVTR.cjs');
8
8
  require('./chunk-VZZPCYA3.cjs');
@@ -15,7 +15,7 @@ var NEAREST = { dockerfile: "docker", html: "markup", xml: "markup", shell: "bas
15
15
  function grammarName(language) {
16
16
  const key = language.trim().toLowerCase();
17
17
  if (key === "") return void 0;
18
- const known = chunkUUSZGUXJ_cjs.CODE_LANGUAGES.find(({ id, aliases = [] }) => id === key || aliases.includes(key));
18
+ const known = chunk6T5YGCZ5_cjs.CODE_LANGUAGES.find(({ id, aliases = [] }) => id === key || aliases.includes(key));
19
19
  return known && (NEAREST[known.id] ?? known.id);
20
20
  }
21
21
 
@@ -96,5 +96,3 @@ function usePrismHighlighter() {
96
96
  }
97
97
 
98
98
  exports.usePrismHighlighter = usePrismHighlighter;
99
- //# sourceMappingURL=highlight.cjs.map
100
- //# sourceMappingURL=highlight.cjs.map
package/dist/highlight.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { lazyLoad } from './chunk-KTUOPDVO.js';
3
- import { CODE_LANGUAGES } from './chunk-32OZ2WM2.js';
3
+ import { CODE_LANGUAGES } from './chunk-HSLOPJVT.js';
4
4
  import './chunk-XFEDJEJF.js';
5
5
  import './chunk-HDJ653LM.js';
6
6
  import './chunk-OS2O6IKX.js';
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkUUSZGUXJ_cjs = require('./chunk-UUSZGUXJ.cjs');
4
+ var chunk6T5YGCZ5_cjs = require('./chunk-6T5YGCZ5.cjs');
5
5
  var chunkQJ34MOFV_cjs = require('./chunk-QJ34MOFV.cjs');
6
6
  var chunkA6PGQVTR_cjs = require('./chunk-A6PGQVTR.cjs');
7
7
  var chunkVZZPCYA3_cjs = require('./chunk-VZZPCYA3.cjs');
@@ -12,47 +12,47 @@ var chunkWZA5S5EJ_cjs = require('./chunk-WZA5S5EJ.cjs');
12
12
 
13
13
  Object.defineProperty(exports, "BlockCanvas", {
14
14
  enumerable: true,
15
- get: function () { return chunkUUSZGUXJ_cjs.BlockCanvas; }
15
+ get: function () { return chunk6T5YGCZ5_cjs.BlockCanvas; }
16
16
  });
17
17
  Object.defineProperty(exports, "FilePickerButton", {
18
18
  enumerable: true,
19
- get: function () { return chunkUUSZGUXJ_cjs.FilePickerButton; }
19
+ get: function () { return chunk6T5YGCZ5_cjs.FilePickerButton; }
20
20
  });
21
21
  Object.defineProperty(exports, "QuoinProvider", {
22
22
  enumerable: true,
23
- get: function () { return chunkUUSZGUXJ_cjs.QuoinProvider; }
23
+ get: function () { return chunk6T5YGCZ5_cjs.QuoinProvider; }
24
24
  });
25
25
  Object.defineProperty(exports, "UploadField", {
26
26
  enumerable: true,
27
- get: function () { return chunkUUSZGUXJ_cjs.UploadField; }
27
+ get: function () { return chunk6T5YGCZ5_cjs.UploadField; }
28
28
  });
29
29
  Object.defineProperty(exports, "coreBlocks", {
30
30
  enumerable: true,
31
- get: function () { return chunkUUSZGUXJ_cjs.coreBlocks; }
31
+ get: function () { return chunk6T5YGCZ5_cjs.coreBlocks; }
32
32
  });
33
33
  Object.defineProperty(exports, "englishLabels", {
34
34
  enumerable: true,
35
- get: function () { return chunkUUSZGUXJ_cjs.englishLabels; }
35
+ get: function () { return chunk6T5YGCZ5_cjs.englishLabels; }
36
36
  });
37
37
  Object.defineProperty(exports, "formatShortcut", {
38
38
  enumerable: true,
39
- get: function () { return chunkUUSZGUXJ_cjs.formatShortcut; }
39
+ get: function () { return chunk6T5YGCZ5_cjs.formatShortcut; }
40
40
  });
41
41
  Object.defineProperty(exports, "resolveLabels", {
42
42
  enumerable: true,
43
- get: function () { return chunkUUSZGUXJ_cjs.resolveLabels; }
43
+ get: function () { return chunk6T5YGCZ5_cjs.resolveLabels; }
44
44
  });
45
45
  Object.defineProperty(exports, "useAutosave", {
46
46
  enumerable: true,
47
- get: function () { return chunkUUSZGUXJ_cjs.useAutosave; }
47
+ get: function () { return chunk6T5YGCZ5_cjs.useAutosave; }
48
48
  });
49
49
  Object.defineProperty(exports, "useLabels", {
50
50
  enumerable: true,
51
- get: function () { return chunkUUSZGUXJ_cjs.useLabels; }
51
+ get: function () { return chunk6T5YGCZ5_cjs.useLabels; }
52
52
  });
53
53
  Object.defineProperty(exports, "useQuoin", {
54
54
  enumerable: true,
55
- get: function () { return chunkUUSZGUXJ_cjs.useQuoin; }
55
+ get: function () { return chunk6T5YGCZ5_cjs.useQuoin; }
56
56
  });
57
57
  Object.defineProperty(exports, "BlockShell", {
58
58
  enumerable: true,
@@ -346,5 +346,3 @@ Object.defineProperty(exports, "text", {
346
346
  enumerable: true,
347
347
  get: function () { return chunkWZA5S5EJ_cjs.text; }
348
348
  });
349
- //# sourceMappingURL=index.cjs.map
350
- //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -7,13 +7,14 @@ export { d as Assoc, c as AtomNode, e as AtomSpec, A as Attrs, B as BlockAttrs,
7
7
  import { E as Extension, a as Editor, c as EditorState, b as Command } from './types-DXF9p4qV.cjs';
8
8
  export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, D as Decoration, j as EditorOptions, F as FromHTMLOptions, I as InputRule, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, o as TextStats, T as Transaction, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-DXF9p4qV.cjs';
9
9
  import { PALETTE } from './engine.cjs';
10
- export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, ToMarkdownOptions, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toMarkdown, toPlainText, typographyRules, undo } from './engine.cjs';
10
+ export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo } from './engine.cjs';
11
11
  import { A as AnyBlockDefinition, U as UploadFn, a as UploadResult } from './registry-DZ8LIGt5.cjs';
12
12
  export { B as BlockDefinition, b as BlockEditorProps, c as BlockPreviewProps, e as blockByType, d as defineBlock, p as paletteBlocks } from './registry-DZ8LIGt5.cjs';
13
13
  import { V as ViewController, R as RenderOptions } from './view-controller-BfVSNZYZ.cjs';
14
14
  export { A as AtomRenderer, K as KeyInterceptor, a as ViewControllerOptions, W as WidgetRenderer, h as hostKey } from './view-controller-BfVSNZYZ.cjs';
15
15
  import { BlockRenderer } from './headless.cjs';
16
16
  export { BlockLabel, BlockPlaceholder, BlockRenderProps, BlockShell, DomMap, DomPoint, EditableRegion, EditableRegionProps, EditorView, EditorViewProps, SelectionSink, UseQuoinEditorOptions, VoidBlockFallback, caretFromPoint, defaultRenderers, domMapOf, isCrossSelection, renderInline, useEditorState, useQuoinEditor, useViewController } from './headless.cjs';
17
+ export { T as ToMarkdownOptions, t as toMarkdown } from './to-markdown-CFPMbbiX.cjs';
17
18
  export { E as EmbedProvider, a as EmbedUrl } from './embed-provider-jXwlRmnp.cjs';
18
19
  export { H as HTMLOptions, t as toHTML } from './to-html-1oD-CDle.cjs';
19
20
 
package/dist/index.d.ts CHANGED
@@ -7,13 +7,14 @@ export { d as Assoc, c as AtomNode, e as AtomSpec, A as Attrs, B as BlockAttrs,
7
7
  import { E as Extension, a as Editor, c as EditorState, b as Command } from './types-BjLcmV00.js';
8
8
  export { A as Align, B as BlockStructureOptions, e as BoundCommands, f as Chain, C as CommandFactories, g as CoreCommands, h as CoreExtensionOptions, i as DOMParserLike, D as Decoration, j as EditorOptions, F as FromHTMLOptions, I as InputRule, k as InputRuleContext, l as InputRuleRange, m as InsertTextOptions, K as KeyLike, M as MarkdownOptions, n as PasteRule, P as PluginKey, d as PluginSpec, S as Slice, o as TextStats, T as Transaction, p as TransactionOrigin, q as applyTransaction, r as coreExtensions, s as createEditor, t as createPluginKey, u as createState, v as fromHTML, w as getPluginState, x as insertBlockAfter, y as insertText, z as insertTextWithRules, G as keyName, H as normalizeKey, J as setBlockType, L as toggleMark } from './types-BjLcmV00.js';
9
9
  import { PALETTE } from './engine.js';
10
- export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, ToMarkdownOptions, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toMarkdown, toPlainText, typographyRules, undo } from './engine.js';
10
+ export { AttrsPatch, BlockChange, BlockCodec, BlockDiff, FromMarkdownOptions, InlineChange, SchemaInput, addMarkStep, atom, blockInputRules, blockRangeSelection, coreBlockSpecs, countDoc, countText, createBlockCodec, createSchema, defineExtension, diffBlocks, diffInline, fromMarkdown, insertBlocksStep, joinBlocksStep, markInputRules, moveBlocksStep, nodeSelection, normalizeInline, parseInline, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, sanitizeHref, serializeInline, setAttrsStep, setIndentStep, splitBlockStep, stepFromJSON, text, textSelection, toPlainText, typographyRules, undo } from './engine.js';
11
11
  import { A as AnyBlockDefinition, U as UploadFn, a as UploadResult } from './registry-DZ8LIGt5.js';
12
12
  export { B as BlockDefinition, b as BlockEditorProps, c as BlockPreviewProps, e as blockByType, d as defineBlock, p as paletteBlocks } from './registry-DZ8LIGt5.js';
13
13
  import { V as ViewController, R as RenderOptions } from './view-controller-p-2x3J7Y.js';
14
14
  export { A as AtomRenderer, K as KeyInterceptor, a as ViewControllerOptions, W as WidgetRenderer, h as hostKey } from './view-controller-p-2x3J7Y.js';
15
15
  import { BlockRenderer } from './headless.js';
16
16
  export { BlockLabel, BlockPlaceholder, BlockRenderProps, BlockShell, DomMap, DomPoint, EditableRegion, EditableRegionProps, EditorView, EditorViewProps, SelectionSink, UseQuoinEditorOptions, VoidBlockFallback, caretFromPoint, defaultRenderers, domMapOf, isCrossSelection, renderInline, useEditorState, useQuoinEditor, useViewController } from './headless.js';
17
+ export { T as ToMarkdownOptions, t as toMarkdown } from './to-markdown-BVOzhgVM.js';
17
18
  export { E as EmbedProvider, a as EmbedUrl } from './embed-provider-jXwlRmnp.js';
18
19
  export { H as HTMLOptions, t as toHTML } from './to-html-CLRBCX0I.js';
19
20
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- export { BlockCanvas, FilePickerButton, QuoinProvider, UploadField, coreBlocks, englishLabels, formatShortcut, resolveLabels, useAutosave, useLabels, useQuoin } from './chunk-32OZ2WM2.js';
2
+ export { BlockCanvas, FilePickerButton, QuoinProvider, UploadField, coreBlocks, englishLabels, formatShortcut, resolveLabels, useAutosave, useLabels, useQuoin } from './chunk-HSLOPJVT.js';
3
3
  export { BlockShell, EditableRegion, EditorView, SelectionSink, ViewController, VoidBlockFallback, caretFromPoint, defaultRenderers, domMapOf, hostKey, isCrossSelection, renderInline, useEditorState, useQuoinEditor, useViewController } from './chunk-XFEDJEJF.js';
4
4
  export { blockByType, defineBlock, paletteBlocks } from './chunk-HDJ653LM.js';
5
5
  export { Transaction, addMarkStep, applyTransaction, blockInputRules, blockRangeSelection, coreExtensions, countDoc, countText, createEditor, createPluginKey, createState, defineExtension, fromHTML, getPluginState, insertBlockAfter, insertBlocksStep, insertText, insertTextWithRules, joinBlocksStep, keyName, markInputRules, moveBlocksStep, nodeSelection, normalizeKey, redo, removeBlocksStep, removeMarkStep, replaceBlockStep, replaceDocStep, replaceInlineStep, setAttrsStep, setBlockType, setIndentStep, splitBlockStep, stepFromJSON, textSelection, toHTML, toMarkdown, toPlainText, toggleMark, typographyRules, undo } from './chunk-OS2O6IKX.js';
package/dist/math.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkFNZGXL3O_cjs = require('./chunk-FNZGXL3O.cjs');
5
- require('./chunk-XZ4NC3Q7.cjs');
4
+ var chunkBF7733XS_cjs = require('./chunk-BF7733XS.cjs');
6
5
  require('./chunk-AZF7B2AE.cjs');
7
- require('./chunk-UUSZGUXJ.cjs');
6
+ require('./chunk-XZ4NC3Q7.cjs');
7
+ require('./chunk-6T5YGCZ5.cjs');
8
8
  require('./chunk-QJ34MOFV.cjs');
9
9
  require('./chunk-A6PGQVTR.cjs');
10
10
  require('./chunk-VZZPCYA3.cjs');
@@ -15,11 +15,9 @@ require('./chunk-WZA5S5EJ.cjs');
15
15
 
16
16
  Object.defineProperty(exports, "englishMathLabels", {
17
17
  enumerable: true,
18
- get: function () { return chunkFNZGXL3O_cjs.englishMathLabels; }
18
+ get: function () { return chunkBF7733XS_cjs.englishMathLabels; }
19
19
  });
20
20
  Object.defineProperty(exports, "mathExtension", {
21
21
  enumerable: true,
22
- get: function () { return chunkFNZGXL3O_cjs.mathExtension; }
22
+ get: function () { return chunkBF7733XS_cjs.mathExtension; }
23
23
  });
24
- //# sourceMappingURL=math.cjs.map
25
- //# sourceMappingURL=math.cjs.map
package/dist/math.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- export { englishMathLabels, mathExtension } from './chunk-HVT5HAAZ.js';
3
- import './chunk-AD3NY7NA.js';
2
+ export { englishMathLabels, mathExtension } from './chunk-OJ4O6HWC.js';
4
3
  import './chunk-QOIVLYMW.js';
5
- import './chunk-32OZ2WM2.js';
4
+ import './chunk-AD3NY7NA.js';
5
+ import './chunk-HSLOPJVT.js';
6
6
  import './chunk-XFEDJEJF.js';
7
7
  import './chunk-HDJ653LM.js';
8
8
  import './chunk-OS2O6IKX.js';
package/dist/mention.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunk46JH34SR_cjs = require('./chunk-46JH34SR.cjs');
4
+ var chunkJY5VUHKN_cjs = require('./chunk-JY5VUHKN.cjs');
5
5
  require('./chunk-H3C3MJW5.cjs');
6
6
  require('./chunk-AZF7B2AE.cjs');
7
- require('./chunk-UUSZGUXJ.cjs');
7
+ require('./chunk-6T5YGCZ5.cjs');
8
8
  require('./chunk-QJ34MOFV.cjs');
9
9
  require('./chunk-A6PGQVTR.cjs');
10
10
  require('./chunk-VZZPCYA3.cjs');
@@ -15,11 +15,9 @@ require('./chunk-WZA5S5EJ.cjs');
15
15
 
16
16
  Object.defineProperty(exports, "englishMentionLabels", {
17
17
  enumerable: true,
18
- get: function () { return chunk46JH34SR_cjs.englishMentionLabels; }
18
+ get: function () { return chunkJY5VUHKN_cjs.englishMentionLabels; }
19
19
  });
20
20
  Object.defineProperty(exports, "mentionExtension", {
21
21
  enumerable: true,
22
- get: function () { return chunk46JH34SR_cjs.mentionExtension; }
22
+ get: function () { return chunkJY5VUHKN_cjs.mentionExtension; }
23
23
  });
24
- //# sourceMappingURL=mention.cjs.map
25
- //# sourceMappingURL=mention.cjs.map
package/dist/mention.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- export { englishMentionLabels, mentionExtension } from './chunk-B5OMWOVI.js';
2
+ export { englishMentionLabels, mentionExtension } from './chunk-7GU25Z6L.js';
3
3
  import './chunk-GHNQKJMD.js';
4
4
  import './chunk-QOIVLYMW.js';
5
- import './chunk-32OZ2WM2.js';
5
+ import './chunk-HSLOPJVT.js';
6
6
  import './chunk-XFEDJEJF.js';
7
7
  import './chunk-HDJ653LM.js';
8
8
  import './chunk-OS2O6IKX.js';
package/dist/presence.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  var chunkLE5XMIFJ_cjs = require('./chunk-LE5XMIFJ.cjs');
5
5
  var chunkQR2NIDUK_cjs = require('./chunk-QR2NIDUK.cjs');
6
- require('./chunk-UUSZGUXJ.cjs');
6
+ require('./chunk-6T5YGCZ5.cjs');
7
7
  var chunkQJ34MOFV_cjs = require('./chunk-QJ34MOFV.cjs');
8
8
  var chunkA6PGQVTR_cjs = require('./chunk-A6PGQVTR.cjs');
9
9
  var chunkWN7BZDNH_cjs = require('./chunk-WN7BZDNH.cjs');
@@ -522,5 +522,3 @@ function presenceExtension(collaboration, options = {}) {
522
522
 
523
523
  exports.englishPresenceLabels = englishPresenceLabels;
524
524
  exports.presenceExtension = presenceExtension;
525
- //# sourceMappingURL=presence.cjs.map
526
- //# sourceMappingURL=presence.cjs.map
package/dist/presence.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { clipBoxes } from './chunk-MQUCCSWG.js';
3
3
  import { ownsNode, watchCanvasFocus } from './chunk-R7MYG522.js';
4
- import './chunk-32OZ2WM2.js';
4
+ import './chunk-HSLOPJVT.js';
5
5
  import { useEditorState, useIsomorphicLayoutEffect, listen, domMapOf } from './chunk-XFEDJEJF.js';
6
6
  import { devWarn } from './chunk-HDJ653LM.js';
7
7
  import { sharedOf, sharedChange, absolute, relative } from './chunk-G25FMFEZ.js';
@@ -54,5 +54,3 @@ var tokenize = (code, grammar) => {
54
54
  };
55
55
 
56
56
  exports.tokenize = tokenize;
57
- //# sourceMappingURL=prism-grammars.cjs.map
58
- //# sourceMappingURL=prism-grammars.cjs.map
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ require('./chunk-6T5YGCZ5.cjs');
5
+ require('./chunk-QJ34MOFV.cjs');
6
+ require('./chunk-A6PGQVTR.cjs');
7
+ var chunkVZZPCYA3_cjs = require('./chunk-VZZPCYA3.cjs');
8
+ require('./chunk-BM2GRZNM.cjs');
9
+ require('./chunk-WZA5S5EJ.cjs');
10
+ var react = require('react');
11
+ var jsxRuntime = require('react/jsx-runtime');
12
+
13
+ // src/extensions/source/source-labels.ts
14
+ var englishSourceLabels = { region: "Markdown source" };
15
+ function resolveSourceLabels(overrides) {
16
+ if (overrides === void 0) return englishSourceLabels;
17
+ const given = Object.entries(overrides).filter(([, value]) => value !== void 0);
18
+ return given.length === 0 ? englishSourceLabels : { ...englishSourceLabels, ...Object.fromEntries(given) };
19
+ }
20
+
21
+ // src/extensions/source/source-lines.ts
22
+ var lineCount = (text) => text.split("\n").length - 1;
23
+ var withoutTrailingNewlines = (text) => text.replace(/\n+$/, "");
24
+ function blockLines(blocks, index, options) {
25
+ if (!Number.isInteger(index) || index < 0 || index >= blocks.length) return null;
26
+ const before = withoutTrailingNewlines(chunkVZZPCYA3_cjs.toMarkdown(blocks.slice(0, index), options));
27
+ const through = chunkVZZPCYA3_cjs.toMarkdown(blocks.slice(0, index + 1), options);
28
+ const separator = /^\n*/.exec(through.slice(before.length))?.[0].length ?? 0;
29
+ return { from: lineCount(before) + separator, to: lineCount(withoutTrailingNewlines(through)) };
30
+ }
31
+
32
+ // src/extensions/source/use-editor-source.ts
33
+ function sourceOf(editor, given) {
34
+ const blocks = editor.getBlocks();
35
+ const options = { ...given, schema: editor.state.schema };
36
+ const [id] = chunkVZZPCYA3_cjs.selectedBlockIds(editor.state.doc, editor.state.selection);
37
+ const index = id === void 0 ? -1 : blocks.findIndex((block) => block.id === id);
38
+ return { markdown: chunkVZZPCYA3_cjs.toMarkdown(blocks, options), active: blockLines(blocks, index, options) };
39
+ }
40
+ var sameSource = (a, b) => a.markdown === b.markdown && a.active?.from === b.active?.from && a.active?.to === b.active?.to;
41
+ function useEditorSource(controller, options = {}) {
42
+ const { comments, lossless, resolveAssetUrl } = options;
43
+ const settings = react.useMemo(
44
+ () => ({ comments, lossless, resolveAssetUrl }),
45
+ [comments, lossless, resolveAssetUrl]
46
+ );
47
+ const [source, setSource] = react.useState(() => sourceOf(controller.editor, settings));
48
+ react.useEffect(() => {
49
+ const { editor } = controller;
50
+ let frame = 0;
51
+ const reread = () => {
52
+ frame = 0;
53
+ const next = sourceOf(editor, settings);
54
+ setSource((current) => sameSource(current, next) ? current : next);
55
+ };
56
+ reread();
57
+ const stop = editor.subscribe(() => {
58
+ if (frame === 0) frame = requestAnimationFrame(reread);
59
+ });
60
+ return () => {
61
+ stop();
62
+ cancelAnimationFrame(frame);
63
+ };
64
+ }, [controller, settings]);
65
+ return source;
66
+ }
67
+ function QuoinSource({ controller, options, labels: given, className, ...props }) {
68
+ const labels = react.useMemo(() => resolveSourceLabels(given), [given]);
69
+ const { markdown, active } = useEditorSource(controller, options);
70
+ const lines = react.useMemo(() => markdown === "" ? [] : markdown.replace(/\n$/, "").split("\n"), [markdown]);
71
+ return /* @__PURE__ */ jsxRuntime.jsx(
72
+ "div",
73
+ {
74
+ ...props,
75
+ role: "region",
76
+ "aria-label": labels.region,
77
+ tabIndex: 0,
78
+ className: className === void 0 ? "quoin-source" : `quoin-source ${className}`,
79
+ children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "quoin-source-text", children: lines.map((line, index) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
80
+ /* @__PURE__ */ jsxRuntime.jsx(
81
+ "span",
82
+ {
83
+ "data-quoin-source-line": index,
84
+ className: active && index >= active.from && index <= active.to ? "quoin-source-active" : void 0,
85
+ children: line
86
+ }
87
+ ),
88
+ "\n"
89
+ ] }, index)) })
90
+ }
91
+ );
92
+ }
93
+
94
+ exports.QuoinSource = QuoinSource;
95
+ exports.blockLines = blockLines;
96
+ exports.englishSourceLabels = englishSourceLabels;
97
+ exports.useEditorSource = useEditorSource;
@@ -0,0 +1,56 @@
1
+ import * as react from 'react';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ import { ViewController } from './headless.cjs';
4
+ import { ToMarkdownOptions } from './engine.cjs';
5
+ import { QuoinBlock } from './engine.cjs';
6
+ import './types-DXF9p4qV.cjs';
7
+
8
+ /** Every string the markdown source pane shows or speaks. */
9
+ type SourceLabels = {
10
+ /** The accessible name of the pane. */
11
+ region: string;
12
+ };
13
+ declare const englishSourceLabels: SourceLabels;
14
+
15
+ /** The lines of the document's markdown a block is drawn on, both ends counted from zero and both inside the block. */
16
+ type LineSpan = {
17
+ readonly from: number;
18
+ readonly to: number;
19
+ };
20
+ /**
21
+ * Where a block lands in the markdown of the whole document, read from the length of the document's prefixes: the
22
+ * markdown of the blocks before it is a prefix of the whole, so the lines it adds are the block's own, less the blank
23
+ * lines that separate it from the block above. Blocks are not serialised one by one, because a list item reads the
24
+ * items above it and so spells itself differently alone.
25
+ */
26
+ declare function blockLines(blocks: readonly QuoinBlock[], index: number, options?: ToMarkdownOptions): LineSpan | null;
27
+
28
+ /** The document as markdown, and the lines of it the caret's block is drawn on. */
29
+ type EditorSource = {
30
+ readonly markdown: string;
31
+ readonly active: LineSpan | null;
32
+ };
33
+ /** How the pane writes the markdown. Pass what the canvas was given, so the pane reads as the document is stored. */
34
+ type SourceOptions = Pick<ToMarkdownOptions, 'comments' | 'lossless' | 'resolveAssetUrl'>;
35
+ /**
36
+ * The markdown of the document of `controller`, the one a canvas handle or `useViewController()` gives, as `onChange`
37
+ * would hand it back, with the lines the caret's block is drawn on. Read again at most once per animation frame
38
+ * however many edits or caret moves it holds.
39
+ */
40
+ declare function useEditorSource(controller: ViewController, options?: SourceOptions): EditorSource;
41
+
42
+ type QuoinSourceProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
43
+ controller: ViewController;
44
+ /** How the markdown is written. Pass what the canvas was given, so the pane reads as the document is stored. */
45
+ options?: SourceOptions;
46
+ /** Every string the pane shows or speaks, English by default. A key left out stays English. */
47
+ labels?: Partial<SourceLabels>;
48
+ };
49
+ /**
50
+ * The document of `controller` as the markdown it is stored as, read only, with the block holding the caret marked.
51
+ * Place it beside or below the canvas; the controller is the one a `BlockCanvas` handle gives.
52
+ */
53
+ declare function QuoinSource({ controller, options, labels: given, className, ...props }: QuoinSourceProps): react.JSX.Element;
54
+
55
+ export { QuoinSource, blockLines, englishSourceLabels, useEditorSource };
56
+ export type { EditorSource, LineSpan, QuoinSourceProps, SourceLabels };