quoin-editor 1.1.1 → 1.1.2

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 (122) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/ai.cjs +78 -78
  3. package/dist/ai.js +6 -6
  4. package/dist/catalogue.cjs +24 -24
  5. package/dist/catalogue.js +16 -16
  6. package/dist/{chunk-CKHKCPGL.js → chunk-36OSSZDK.js} +6 -6
  7. package/dist/{chunk-CKHKCPGL.js.map → chunk-36OSSZDK.js.map} +1 -1
  8. package/dist/{chunk-3BXUGX5F.js → chunk-3G4ZWUUY.js} +4 -16
  9. package/dist/chunk-3G4ZWUUY.js.map +1 -0
  10. package/dist/{chunk-VNRI5DAL.cjs → chunk-5DEPLPDS.cjs} +28 -28
  11. package/dist/{chunk-VNRI5DAL.cjs.map → chunk-5DEPLPDS.cjs.map} +1 -1
  12. package/dist/{chunk-2EQ6FKSK.js → chunk-5LWJDRWD.js} +3 -3
  13. package/dist/{chunk-2EQ6FKSK.js.map → chunk-5LWJDRWD.js.map} +1 -1
  14. package/dist/{chunk-WAGBELKA.js → chunk-5QNNF5ZJ.js} +5 -5
  15. package/dist/{chunk-WAGBELKA.js.map → chunk-5QNNF5ZJ.js.map} +1 -1
  16. package/dist/{chunk-AIS37SL2.cjs → chunk-6H76FAI3.cjs} +79 -7
  17. package/dist/chunk-6H76FAI3.cjs.map +1 -0
  18. package/dist/{chunk-KXRGY5LK.cjs → chunk-6QLA3JOU.cjs} +90 -90
  19. package/dist/{chunk-KXRGY5LK.cjs.map → chunk-6QLA3JOU.cjs.map} +1 -1
  20. package/dist/{chunk-7XQGOCUG.cjs → chunk-ABVSP2XR.cjs} +290 -291
  21. package/dist/chunk-ABVSP2XR.cjs.map +1 -0
  22. package/dist/{chunk-MUIPM26J.js → chunk-AQNVYFEU.js} +6 -6
  23. package/dist/{chunk-MUIPM26J.js.map → chunk-AQNVYFEU.js.map} +1 -1
  24. package/dist/{chunk-U5BSCAMP.cjs → chunk-BMEEEI43.cjs} +13 -13
  25. package/dist/{chunk-U5BSCAMP.cjs.map → chunk-BMEEEI43.cjs.map} +1 -1
  26. package/dist/{chunk-RIIXJWBR.cjs → chunk-E52VO5JT.cjs} +4 -4
  27. package/dist/{chunk-RIIXJWBR.cjs.map → chunk-E52VO5JT.cjs.map} +1 -1
  28. package/dist/{chunk-7NAONESM.cjs → chunk-EABO523V.cjs} +31 -31
  29. package/dist/{chunk-7NAONESM.cjs.map → chunk-EABO523V.cjs.map} +1 -1
  30. package/dist/{chunk-VBJY2CSK.js → chunk-EDKQQKQR.js} +6 -6
  31. package/dist/{chunk-VBJY2CSK.js.map → chunk-EDKQQKQR.js.map} +1 -1
  32. package/dist/{chunk-OKWER2RV.cjs → chunk-ES2QYHXL.cjs} +45 -45
  33. package/dist/{chunk-OKWER2RV.cjs.map → chunk-ES2QYHXL.cjs.map} +1 -1
  34. package/dist/{chunk-IEP7BPFN.js → chunk-G7HK4OHE.js} +4 -4
  35. package/dist/{chunk-IEP7BPFN.js.map → chunk-G7HK4OHE.js.map} +1 -1
  36. package/dist/{chunk-L4D23LM2.js → chunk-IVWFPFUG.js} +4 -4
  37. package/dist/{chunk-L4D23LM2.js.map → chunk-IVWFPFUG.js.map} +1 -1
  38. package/dist/{chunk-SFMORPWB.js → chunk-J37ORWSG.js} +7 -7
  39. package/dist/{chunk-SFMORPWB.js.map → chunk-J37ORWSG.js.map} +1 -1
  40. package/dist/{chunk-DYWU4SQ2.js → chunk-JEFQNZO4.js} +5 -6
  41. package/dist/chunk-JEFQNZO4.js.map +1 -0
  42. package/dist/{chunk-UEVR4B5S.js → chunk-JHA23OOK.js} +6 -6
  43. package/dist/{chunk-UEVR4B5S.js.map → chunk-JHA23OOK.js.map} +1 -1
  44. package/dist/{chunk-7FAVFJAS.js → chunk-JYO2T4MC.js} +3 -3
  45. package/dist/{chunk-7FAVFJAS.js.map → chunk-JYO2T4MC.js.map} +1 -1
  46. package/dist/{chunk-HQ43EIYO.cjs → chunk-K5HWMBWH.cjs} +9 -9
  47. package/dist/{chunk-HQ43EIYO.cjs.map → chunk-K5HWMBWH.cjs.map} +1 -1
  48. package/dist/{chunk-OM7E43ZN.cjs → chunk-KFIE4OJE.cjs} +15 -15
  49. package/dist/{chunk-OM7E43ZN.cjs.map → chunk-KFIE4OJE.cjs.map} +1 -1
  50. package/dist/{chunk-W7B4WQ3L.cjs → chunk-KKRQDVBJ.cjs} +24 -24
  51. package/dist/{chunk-W7B4WQ3L.cjs.map → chunk-KKRQDVBJ.cjs.map} +1 -1
  52. package/dist/{chunk-VFSVN5IQ.cjs → chunk-M5FREXRQ.cjs} +218 -218
  53. package/dist/{chunk-VFSVN5IQ.cjs.map → chunk-M5FREXRQ.cjs.map} +1 -1
  54. package/dist/{chunk-7SVKLWDT.cjs → chunk-OAAYF2EI.cjs} +13 -26
  55. package/dist/chunk-OAAYF2EI.cjs.map +1 -0
  56. package/dist/{chunk-HTLWPSMU.js → chunk-OIQAO7QU.js} +4 -4
  57. package/dist/{chunk-HTLWPSMU.js.map → chunk-OIQAO7QU.js.map} +1 -1
  58. package/dist/{chunk-3QRVAI53.cjs → chunk-P3T5XBYW.cjs} +6 -6
  59. package/dist/{chunk-3QRVAI53.cjs.map → chunk-P3T5XBYW.cjs.map} +1 -1
  60. package/dist/{chunk-EFRQMYZ6.cjs → chunk-PNMBRBAT.cjs} +4 -4
  61. package/dist/{chunk-EFRQMYZ6.cjs.map → chunk-PNMBRBAT.cjs.map} +1 -1
  62. package/dist/{chunk-RFLFRIPV.js → chunk-PRXIYHSX.js} +6 -6
  63. package/dist/{chunk-RFLFRIPV.js.map → chunk-PRXIYHSX.js.map} +1 -1
  64. package/dist/{chunk-JCEFSTVG.cjs → chunk-QAI3CM7V.cjs} +55 -55
  65. package/dist/{chunk-JCEFSTVG.cjs.map → chunk-QAI3CM7V.cjs.map} +1 -1
  66. package/dist/{chunk-L6OW2FL3.js → chunk-QLDXQOHQ.js} +79 -8
  67. package/dist/chunk-QLDXQOHQ.js.map +1 -0
  68. package/dist/{chunk-TYZSB7JT.js → chunk-RUC5OZXO.js} +3 -3
  69. package/dist/{chunk-TYZSB7JT.js.map → chunk-RUC5OZXO.js.map} +1 -1
  70. package/dist/{chunk-WH56EW3H.cjs → chunk-UGAOEZ3O.cjs} +15 -15
  71. package/dist/{chunk-WH56EW3H.cjs.map → chunk-UGAOEZ3O.cjs.map} +1 -1
  72. package/dist/{chunk-KZ6ZFCGO.js → chunk-V2ZBA5VC.js} +8 -8
  73. package/dist/{chunk-KZ6ZFCGO.js.map → chunk-V2ZBA5VC.js.map} +1 -1
  74. package/dist/{chunk-IGZRZIAF.cjs → chunk-VSUGJZ7G.cjs} +118 -118
  75. package/dist/{chunk-IGZRZIAF.cjs.map → chunk-VSUGJZ7G.cjs.map} +1 -1
  76. package/dist/{chunk-XAS7LANM.cjs → chunk-XJ32XESJ.cjs} +98 -98
  77. package/dist/{chunk-XAS7LANM.cjs.map → chunk-XJ32XESJ.cjs.map} +1 -1
  78. package/dist/{chunk-QSXPKZ2F.js → chunk-ZEQXMRJW.js} +3 -3
  79. package/dist/{chunk-QSXPKZ2F.js.map → chunk-ZEQXMRJW.js.map} +1 -1
  80. package/dist/{chunk-L2QA2UTY.js → chunk-ZPGA5UIY.js} +7 -7
  81. package/dist/{chunk-L2QA2UTY.js.map → chunk-ZPGA5UIY.js.map} +1 -1
  82. package/dist/comments.cjs +58 -58
  83. package/dist/comments.js +7 -7
  84. package/dist/diff.cjs +27 -27
  85. package/dist/diff.js +3 -3
  86. package/dist/docx.cjs +30 -30
  87. package/dist/docx.js +3 -3
  88. package/dist/embed.cjs +9 -9
  89. package/dist/embed.js +7 -7
  90. package/dist/emoji.cjs +9 -9
  91. package/dist/emoji.js +6 -6
  92. package/dist/engine.cjs +58 -58
  93. package/dist/engine.js +3 -3
  94. package/dist/find.cjs +10 -10
  95. package/dist/find.js +6 -6
  96. package/dist/headless.cjs +74 -74
  97. package/dist/headless.js +4 -4
  98. package/dist/index.cjs +86 -86
  99. package/dist/index.js +5 -5
  100. package/dist/math.cjs +10 -10
  101. package/dist/math.js +8 -8
  102. package/dist/mention.cjs +10 -10
  103. package/dist/mention.js +8 -8
  104. package/dist/presence.cjs +38 -38
  105. package/dist/presence.js +7 -7
  106. package/dist/stats.cjs +10 -10
  107. package/dist/stats.js +7 -7
  108. package/dist/table.cjs +25 -25
  109. package/dist/table.js +6 -6
  110. package/dist/toc.cjs +9 -9
  111. package/dist/toc.js +6 -6
  112. package/dist/view.cjs +4 -4
  113. package/dist/view.js +2 -2
  114. package/dist/yjs.cjs +119 -119
  115. package/dist/yjs.js +5 -5
  116. package/package.json +1 -1
  117. package/dist/chunk-3BXUGX5F.js.map +0 -1
  118. package/dist/chunk-7SVKLWDT.cjs.map +0 -1
  119. package/dist/chunk-7XQGOCUG.cjs.map +0 -1
  120. package/dist/chunk-AIS37SL2.cjs.map +0 -1
  121. package/dist/chunk-DYWU4SQ2.js.map +0 -1
  122. package/dist/chunk-L6OW2FL3.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Every release of `quoin-editor` is listed here, newest first, in the spirit of [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). From 1.0.0 the package follows [semantic versioning](https://semver.org/): a breaking change waits for the next major version. Until then, Quoin was 0.x and a minor version could contain breaking changes; those known at release were marked "Breaking". The 0.x sections are kept as they were released, "Docs" headings included. Moving from 0.4 to 1.0 is covered step by step in [MIGRATION.md](MIGRATION.md). Review finding ids such as F-17 are those of the 0.4.0 review in [#73](https://github.com/AmineSeboui/quoin-editor/issues/73).
4
4
 
5
+ ## 1.1.2 (2026-10-30)
6
+
7
+ ### Fixed
8
+ - A block whose content returns to what was stored is reported as the stored object, whether by undo or by retyping, so `getBlocks()` and `onChange` give back the host's own object. A block written in a legacy form, such as `*old style*`, is not rewritten as `_old style_`, and an intact 0.4 multi-paragraph group is emitted as the original block.
9
+ - A mark that spans more of the text is written outside the marks it contains, so nested emphasis such as `_a **b** c_` is stored without HTML tags in more cases. Inline code stays innermost.
10
+
5
11
  ## 1.1.1 (2026-10-29)
6
12
 
7
13
  ### Fixed
package/dist/ai.cjs CHANGED
@@ -2,13 +2,13 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkLE5XMIFJ_cjs = require('./chunk-LE5XMIFJ.cjs');
5
- var chunkEFRQMYZ6_cjs = require('./chunk-EFRQMYZ6.cjs');
6
- var chunk7XQGOCUG_cjs = require('./chunk-7XQGOCUG.cjs');
7
- var chunkIGZRZIAF_cjs = require('./chunk-IGZRZIAF.cjs');
5
+ var chunkPNMBRBAT_cjs = require('./chunk-PNMBRBAT.cjs');
6
+ var chunkABVSP2XR_cjs = require('./chunk-ABVSP2XR.cjs');
7
+ var chunkVSUGJZ7G_cjs = require('./chunk-VSUGJZ7G.cjs');
8
8
  require('./chunk-A6PGQVTR.cjs');
9
- var chunkVFSVN5IQ_cjs = require('./chunk-VFSVN5IQ.cjs');
10
- require('./chunk-7SVKLWDT.cjs');
11
- var chunkAIS37SL2_cjs = require('./chunk-AIS37SL2.cjs');
9
+ var chunkM5FREXRQ_cjs = require('./chunk-M5FREXRQ.cjs');
10
+ require('./chunk-OAAYF2EI.cjs');
11
+ var chunk6H76FAI3_cjs = require('./chunk-6H76FAI3.cjs');
12
12
  var lucideReact = require('lucide-react');
13
13
  var react = require('react');
14
14
  var jsxRuntime = require('react/jsx-runtime');
@@ -110,30 +110,30 @@ function closeStreaming(markdown) {
110
110
  // src/extensions/ai/ai-target.ts
111
111
  function targetOfBlocks(state, ids) {
112
112
  const { doc, schema } = state;
113
- const first = chunkAIS37SL2_cjs.blockById(doc, ids[0]);
114
- const last = chunkAIS37SL2_cjs.blockById(doc, ids[ids.length - 1]);
113
+ const first = chunk6H76FAI3_cjs.blockById(doc, ids[0]);
114
+ const last = chunk6H76FAI3_cjs.blockById(doc, ids[ids.length - 1]);
115
115
  if (first === void 0 || last === void 0) return null;
116
- const start = chunkVFSVN5IQ_cjs.primaryRegion(schema, first);
117
- const end = chunkVFSVN5IQ_cjs.primaryRegion(schema, last);
116
+ const start = chunkM5FREXRQ_cjs.primaryRegion(schema, first);
117
+ const end = chunkM5FREXRQ_cjs.primaryRegion(schema, last);
118
118
  if (start === null || end === null) return null;
119
119
  const from = { block: first.id, region: start, offset: 0 };
120
- return { from, to: { block: last.id, region: end, offset: chunkVFSVN5IQ_cjs.regionLength(last, end) }, selected: ids.length > 1 };
120
+ return { from, to: { block: last.id, region: end, offset: chunkM5FREXRQ_cjs.regionLength(last, end) }, selected: ids.length > 1 };
121
121
  }
122
122
  function targetOfSelection(state) {
123
123
  const { doc, selection } = state;
124
124
  if (selection === null) return null;
125
- if (selection.kind !== "text") return targetOfBlocks(state, chunkVFSVN5IQ_cjs.selectedBlockIds(doc, selection));
126
- const { from, to } = chunkVFSVN5IQ_cjs.orderedRange(doc, selection.anchor, selection.head);
127
- if (chunkVFSVN5IQ_cjs.comparePos(doc, from, to) !== 0) return { from, to, selected: true };
125
+ if (selection.kind !== "text") return targetOfBlocks(state, chunkM5FREXRQ_cjs.selectedBlockIds(doc, selection));
126
+ const { from, to } = chunkM5FREXRQ_cjs.orderedRange(doc, selection.anchor, selection.head);
127
+ if (chunkM5FREXRQ_cjs.comparePos(doc, from, to) !== 0) return { from, to, selected: true };
128
128
  const block = doc.blocks[doc.index.get(from.block)];
129
129
  const whole = { block: from.block, region: from.region };
130
- return { from: { ...whole, offset: 0 }, to: { ...whole, offset: chunkVFSVN5IQ_cjs.regionLength(block, from.region) }, selected: false };
130
+ return { from: { ...whole, offset: 0 }, to: { ...whole, offset: chunkM5FREXRQ_cjs.regionLength(block, from.region) }, selected: false };
131
131
  }
132
132
  function nearestKept(tr, target) {
133
133
  const { doc } = tr.before;
134
134
  const first = doc.index.get(target.from.block) ?? 0;
135
135
  const last = doc.index.get(target.to.block) ?? first;
136
- const kept = (block) => block && chunkAIS37SL2_cjs.blockById(tr.doc, block.id);
136
+ const kept = (block) => block && chunk6H76FAI3_cjs.blockById(tr.doc, block.id);
137
137
  for (let step = 1; first - step >= 0 || last + step < doc.blocks.length; step++) {
138
138
  const found = kept(doc.blocks[first - step]) ?? kept(doc.blocks[last + step]);
139
139
  if (found) return found;
@@ -142,10 +142,10 @@ function nearestKept(tr, target) {
142
142
  }
143
143
  function edgeOf(tr, target) {
144
144
  const point = tr.mapPos(target.from, -1);
145
- const block = chunkAIS37SL2_cjs.blockById(tr.doc, point.block) ?? nearestKept(tr, target);
145
+ const block = chunk6H76FAI3_cjs.blockById(tr.doc, point.block) ?? nearestKept(tr, target);
146
146
  if (block === void 0) return null;
147
- const region = chunkVFSVN5IQ_cjs.primaryRegion(tr.before.schema, block) ?? "";
148
- const length = region === "" ? 0 : chunkVFSVN5IQ_cjs.regionLength(block, region);
147
+ const region = chunkM5FREXRQ_cjs.primaryRegion(tr.before.schema, block) ?? "";
148
+ const length = region === "" ? 0 : chunkM5FREXRQ_cjs.regionLength(block, region);
149
149
  const offset = block.id === point.block ? Math.min(point.offset, length) : length;
150
150
  const after = offset > 0 || length === 0;
151
151
  const at = { block: block.id, region, offset: after ? length : 0 };
@@ -157,29 +157,29 @@ function mapTarget(tr, target) {
157
157
  const from = tr.mapPos(target.from, inside);
158
158
  const mapped2 = tr.mapPos(target.to, -inside);
159
159
  if (!tr.doc.index.has(from.block) || !tr.doc.index.has(mapped2.block)) return edgeOf(tr, target);
160
- const to = chunkVFSVN5IQ_cjs.comparePos(tr.doc, from, mapped2) > 0 ? from : mapped2;
160
+ const to = chunkM5FREXRQ_cjs.comparePos(tr.doc, from, mapped2) > 0 ? from : mapped2;
161
161
  return from === target.from && to === target.to ? target : { ...target, from, to };
162
162
  }
163
- var targetGone = (doc, target) => target.lost !== void 0 || target.selected && chunkVFSVN5IQ_cjs.comparePos(doc, target.from, target.to) === 0;
163
+ var targetGone = (doc, target) => target.lost !== void 0 || target.selected && chunkM5FREXRQ_cjs.comparePos(doc, target.from, target.to) === 0;
164
164
  function targetRanges(state, { from, to }) {
165
165
  const { doc, schema } = state;
166
166
  const start = doc.index.get(from.block);
167
167
  const end = doc.index.get(to.block);
168
168
  return doc.blocks.slice(start, end + 1).flatMap((block, i) => {
169
- const region = i === 0 ? from.region : block.id === to.block ? to.region : chunkVFSVN5IQ_cjs.primaryRegion(schema, block);
169
+ const region = i === 0 ? from.region : block.id === to.block ? to.region : chunkM5FREXRQ_cjs.primaryRegion(schema, block);
170
170
  if (region === null || !Object.hasOwn(block.regions, region)) return [];
171
171
  const left = i === 0 ? from.offset : 0;
172
- const right = block.id === to.block ? to.offset : chunkVFSVN5IQ_cjs.regionLength(block, region);
172
+ const right = block.id === to.block ? to.offset : chunkM5FREXRQ_cjs.regionLength(block, region);
173
173
  return right > left ? [{ block: block.id, region, from: left, to: right }] : [];
174
174
  });
175
175
  }
176
176
 
177
177
  // src/extensions/ai/ai-plugin.ts
178
- var aiKey = chunkVFSVN5IQ_cjs.createPluginKey("ai");
178
+ var aiKey = chunkM5FREXRQ_cjs.createPluginKey("ai");
179
179
  var AI = "ai";
180
180
  var IDLE = { target: null, menu: null, ghost: null, held: [] };
181
- var aiState = (state) => chunkVFSVN5IQ_cjs.getPluginState(state, aiKey);
182
- var aiTransaction = (state, act2) => new chunkVFSVN5IQ_cjs.Transaction(state).setMeta(AI, act2).setMeta("addToHistory", false);
181
+ var aiState = (state) => chunkM5FREXRQ_cjs.getPluginState(state, aiKey);
182
+ var aiTransaction = (state, act2) => new chunkM5FREXRQ_cjs.Transaction(state).setMeta(AI, act2).setMeta("addToHistory", false);
183
183
  function written(ghost, key, phase, output) {
184
184
  return ghost.key !== key ? ghost : { ...ghost, phase, output, shown: closeStreaming(output) };
185
185
  }
@@ -211,8 +211,8 @@ function caretBlock(state) {
211
211
  return selection?.kind === "text" ? selection.head.block : null;
212
212
  }
213
213
  function hasText(state, id) {
214
- const block = chunkAIS37SL2_cjs.blockById(state.doc, id);
215
- return block !== void 0 && Object.keys(block.regions).some((region) => chunkVFSVN5IQ_cjs.regionLength(block, region) > 0);
214
+ const block = chunk6H76FAI3_cjs.blockById(state.doc, id);
215
+ return block !== void 0 && Object.keys(block.regions).some((region) => chunkM5FREXRQ_cjs.regionLength(block, region) > 0);
216
216
  }
217
217
  function heldText(tr, value, before, after) {
218
218
  if (!tr.docChanged) return value.held;
@@ -310,13 +310,13 @@ function aroundSelection(text, start, end, limit = CONTEXT_LIMIT) {
310
310
  }
311
311
  var WHITESPACE_ENTITY = /(?<!\\)&#(32|9);/g;
312
312
  var plain = (markdown) => markdown.replace(WHITESPACE_ENTITY, (_, code) => code === "32" ? " " : " ");
313
- var markdownOf = (state, blocks) => chunkVFSVN5IQ_cjs.toMarkdown(blocks, { schema: state.schema, comments: false });
313
+ var markdownOf = (state, blocks) => chunkM5FREXRQ_cjs.toMarkdown(blocks, { schema: state.schema, comments: false });
314
314
  function rangeMarkdown(state, from, to) {
315
- const slice = chunkVFSVN5IQ_cjs.sliceFromSelection({ ...state, selection: chunkVFSVN5IQ_cjs.textSelection(from, to) }, chunkAIS37SL2_cjs.createBlockCodec(state.schema));
315
+ const slice = chunkM5FREXRQ_cjs.sliceFromSelection({ ...state, selection: chunkM5FREXRQ_cjs.textSelection(from, to) }, chunk6H76FAI3_cjs.createBlockCodec(state.schema));
316
316
  return slice === null ? "" : markdownOf(state, slice.blocks).replace(/\n$/, "");
317
317
  }
318
318
  function documentContext(state, target, selection) {
319
- const blocks = chunkAIS37SL2_cjs.createBlockCodec(state.schema).blocksFromDoc(state.doc);
319
+ const blocks = chunk6H76FAI3_cjs.createBlockCodec(state.schema).blocksFromDoc(state.doc);
320
320
  const full = plain(markdownOf(state, blocks));
321
321
  if (full.length <= CONTEXT_LIMIT) return full;
322
322
  const index = state.doc.index.get(target.from.block) ?? 0;
@@ -377,7 +377,7 @@ async function read(editor, link, run, stream, request) {
377
377
  } catch (error) {
378
378
  if (!live()) return;
379
379
  end("error");
380
- link.report(chunk7XQGOCUG_cjs.toError(error));
380
+ link.report(chunkABVSP2XR_cjs.toError(error));
381
381
  }
382
382
  }
383
383
  function startStream(editor, link, stream, request, replace) {
@@ -552,25 +552,25 @@ function resolveAiLabels(overrides) {
552
552
  var openOnSpace = (state, dispatch) => {
553
553
  const { selection, doc } = state;
554
554
  const ai = aiState(state);
555
- if (selection?.kind !== "text" || !chunkVFSVN5IQ_cjs.isCollapsed(selection) || ai.menu !== null || ai.ghost !== null) return false;
555
+ if (selection?.kind !== "text" || !chunkM5FREXRQ_cjs.isCollapsed(selection) || ai.menu !== null || ai.ghost !== null) return false;
556
556
  const { head } = selection;
557
557
  const block = doc.blocks[doc.index.get(head.block)];
558
558
  const paragraph = block.type === "MARKDOWN" && block.attrs.kind === "paragraph";
559
- if (!paragraph || chunkVFSVN5IQ_cjs.regionLength(block, head.region) > 0 || ai.held.includes(block.id)) return false;
559
+ if (!paragraph || chunkM5FREXRQ_cjs.regionLength(block, head.region) > 0 || ai.held.includes(block.id)) return false;
560
560
  dispatch?.(aiTransaction(state, { type: "open", target: { from: head, to: head, selected: false }, fromSpace: true }));
561
561
  return true;
562
562
  };
563
563
 
564
564
  // src/extensions/ai/ai-accept.ts
565
- var isParagraph = (block) => block?.type === "MARKDOWN" && chunkAIS37SL2_cjs.parseLine(String(block.data.markdown ?? "")).kind === "paragraph";
565
+ var isParagraph = (block) => block?.type === "MARKDOWN" && chunk6H76FAI3_cjs.parseLine(String(block.data.markdown ?? "")).kind === "paragraph";
566
566
  var DISCARD = { type: "discard" };
567
567
  function insertBeside(tr, schema, target, pieces, makeId) {
568
568
  const index = tr.doc.index.get(target.to.block);
569
- const at = target.lost?.after ? chunkVFSVN5IQ_cjs.descendantsEnd(tr.doc, index) : index;
570
- const fresh = chunkVFSVN5IQ_cjs.freshBlocks(pieces, tr.doc.blocks[index].indent, makeId);
571
- tr.step(chunkVFSVN5IQ_cjs.insertBlocksStep(at, fresh));
572
- chunkVFSVN5IQ_cjs.capIndents(tr, at, at + fresh.length);
573
- tr.setSelection(chunkVFSVN5IQ_cjs.endOf(tr.doc, schema, fresh[fresh.length - 1].id));
569
+ const at = target.lost?.after ? chunkM5FREXRQ_cjs.descendantsEnd(tr.doc, index) : index;
570
+ const fresh = chunkM5FREXRQ_cjs.freshBlocks(pieces, tr.doc.blocks[index].indent, makeId);
571
+ tr.step(chunkM5FREXRQ_cjs.insertBlocksStep(at, fresh));
572
+ chunkM5FREXRQ_cjs.capIndents(tr, at, at + fresh.length);
573
+ tr.setSelection(chunkM5FREXRQ_cjs.endOf(tr.doc, schema, fresh[fresh.length - 1].id));
574
574
  }
575
575
  function acceptAnswer(editor) {
576
576
  const { state } = editor;
@@ -578,7 +578,7 @@ function acceptAnswer(editor) {
578
578
  if (target === null || ghost === null || ghost.phase === "streaming" || ghost.phase === "error") return null;
579
579
  const { codec } = editor;
580
580
  const makeId = codec.context.newId;
581
- const blocks = chunkAIS37SL2_cjs.fromMarkdown(ghost.output, { newId: makeId });
581
+ const blocks = chunk6H76FAI3_cjs.fromMarkdown(ghost.output, { newId: makeId });
582
582
  const pieces = blocks.flatMap((block) => codec.toEngineBlocks(block));
583
583
  const tr = editor.createTransaction().setOrigin("ai").setMeta(AI, DISCARD);
584
584
  const gone = targetGone(state.doc, target);
@@ -588,12 +588,12 @@ function acceptAnswer(editor) {
588
588
  const { schema } = state;
589
589
  const open = { openStart: isParagraph(blocks[0]), openEnd: isParagraph(blocks[blocks.length - 1]) };
590
590
  if (ghost.replace || gone) {
591
- const caret = ghost.replace && !gone ? chunkVFSVN5IQ_cjs.deleteRange(tr, schema, target.from, target.to, makeId) : target.to;
592
- chunkVFSVN5IQ_cjs.pasteAtCaret(tr, schema, caret, open, pieces, makeId);
591
+ const caret = ghost.replace && !gone ? chunkM5FREXRQ_cjs.deleteRange(tr, schema, target.from, target.to, makeId) : target.to;
592
+ chunkM5FREXRQ_cjs.pasteAtCaret(tr, schema, caret, open, pieces, makeId);
593
593
  } else {
594
594
  const block = tr.doc.blocks[tr.doc.index.get(target.to.block)];
595
- const end = { ...target.to, offset: chunkVFSVN5IQ_cjs.regionLength(block, target.to.region) };
596
- chunkVFSVN5IQ_cjs.pasteAtCaret(tr, schema, end, { openStart: false, openEnd: false }, pieces, makeId);
595
+ const end = { ...target.to, offset: chunkM5FREXRQ_cjs.regionLength(block, target.to.region) };
596
+ chunkM5FREXRQ_cjs.pasteAtCaret(tr, schema, end, { openStart: false, openEnd: false }, pieces, makeId);
597
597
  }
598
598
  }
599
599
  editor.dispatch(tr);
@@ -608,12 +608,12 @@ function AiBar({ env, ghost, gone, barId }) {
608
608
  const [next, setNext] = react.useState("");
609
609
  const { phase } = ghost;
610
610
  const focusPrimary = () => content.current?.querySelector(`[${PRIMARY}]`)?.focus();
611
- chunkIGZRZIAF_cjs.useIsomorphicLayoutEffect(() => {
611
+ chunkVSUGJZ7G_cjs.useIsomorphicLayoutEffect(() => {
612
612
  const active = content.current?.ownerDocument.activeElement;
613
613
  inside.current = active == null || active === active.ownerDocument.body;
614
614
  if (inside.current) focusPrimary();
615
615
  }, []);
616
- chunkIGZRZIAF_cjs.useIsomorphicLayoutEffect(() => {
616
+ chunkVSUGJZ7G_cjs.useIsomorphicLayoutEffect(() => {
617
617
  const active = content.current?.ownerDocument.activeElement;
618
618
  if (inside.current && !content.current?.contains(active ?? null)) focusPrimary();
619
619
  }, [phase, ghost.key]);
@@ -661,21 +661,21 @@ function AiBar({ env, ghost, gone, barId }) {
661
661
  children: [
662
662
  phase === "streaming" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
663
663
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: labels.writing }),
664
- /* @__PURE__ */ jsxRuntime.jsx(chunk7XQGOCUG_cjs.Button, { ...primary, size: "sm", variant: "outline", onClick: () => stop(editor), children: labels.stop })
664
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABVSP2XR_cjs.Button, { ...primary, size: "sm", variant: "outline", onClick: () => stop(editor), children: labels.stop })
665
665
  ] }),
666
666
  phase === "error" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
667
667
  /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: labels.failed }),
668
- /* @__PURE__ */ jsxRuntime.jsx(chunk7XQGOCUG_cjs.Button, { ...primary, size: "sm", onClick: () => retry(editor, stream), children: labels.retry }),
669
- /* @__PURE__ */ jsxRuntime.jsx(chunk7XQGOCUG_cjs.Button, { size: "sm", variant: "ghost", onClick: onDiscard, children: labels.discard })
668
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABVSP2XR_cjs.Button, { ...primary, size: "sm", onClick: () => retry(editor, stream), children: labels.retry }),
669
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABVSP2XR_cjs.Button, { size: "sm", variant: "ghost", onClick: onDiscard, children: labels.discard })
670
670
  ] }),
671
671
  (phase === "done" || phase === "stopped") && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
672
672
  phase === "stopped" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: labels.stopped }),
673
673
  gone && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "w-full text-xs text-muted-foreground", children: labels.targetGone }),
674
- /* @__PURE__ */ jsxRuntime.jsx(chunk7XQGOCUG_cjs.Button, { ...primary, size: "sm", onClick: onAccept, children: labels.accept }),
675
- /* @__PURE__ */ jsxRuntime.jsx(chunk7XQGOCUG_cjs.Button, { size: "sm", variant: "ghost", onClick: onDiscard, children: labels.discard }),
676
- /* @__PURE__ */ jsxRuntime.jsx(chunk7XQGOCUG_cjs.Button, { size: "sm", variant: "ghost", onClick: () => retry(editor, stream), children: labels.retry }),
674
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABVSP2XR_cjs.Button, { ...primary, size: "sm", onClick: onAccept, children: labels.accept }),
675
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABVSP2XR_cjs.Button, { size: "sm", variant: "ghost", onClick: onDiscard, children: labels.discard }),
676
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABVSP2XR_cjs.Button, { size: "sm", variant: "ghost", onClick: () => retry(editor, stream), children: labels.retry }),
677
677
  /* @__PURE__ */ jsxRuntime.jsx("form", { className: "w-full", onSubmit: onFollowUp, children: /* @__PURE__ */ jsxRuntime.jsx(
678
- chunk7XQGOCUG_cjs.Input,
678
+ chunkABVSP2XR_cjs.Input,
679
679
  {
680
680
  "aria-label": labels.followUp,
681
681
  placeholder: labels.followUp,
@@ -696,8 +696,8 @@ function AiBar({ env, ghost, gone, barId }) {
696
696
  var reader = null;
697
697
  function readerOf() {
698
698
  if (reader === null) {
699
- const schema = chunkAIS37SL2_cjs.createSchema();
700
- reader = { schema, codec: chunkAIS37SL2_cjs.createBlockCodec(schema) };
699
+ const schema = chunk6H76FAI3_cjs.createSchema();
700
+ reader = { schema, codec: chunk6H76FAI3_cjs.createBlockCodec(schema) };
701
701
  }
702
702
  return reader;
703
703
  }
@@ -705,16 +705,16 @@ function fillGhost(ghost, markdown) {
705
705
  const doc = ghost.ownerDocument;
706
706
  const { schema, codec } = readerOf();
707
707
  const drawn2 = [];
708
- for (const block of chunkAIS37SL2_cjs.fromMarkdown(markdown)) {
708
+ for (const block of chunk6H76FAI3_cjs.fromMarkdown(markdown)) {
709
709
  for (const piece of codec.toEngineBlocks(block)) {
710
710
  const element = doc.createElement("div");
711
711
  element.className = "quoin-ai-ghost-block";
712
712
  element.dataset.kind = String(piece.attrs.kind ?? piece.type.toLowerCase());
713
713
  if (piece.attrs.level !== void 0) element.dataset.level = String(piece.attrs.level);
714
714
  if (piece.indent > 0) element.style.setProperty("--quoin-ai-indent", String(piece.indent));
715
- const region = chunkVFSVN5IQ_cjs.primaryRegion(schema, piece);
716
- if (region === null) element.textContent = chunkVFSVN5IQ_cjs.toPlainText([codec.toQuoin(piece)], { schema });
717
- else chunkIGZRZIAF_cjs.renderInline(element, piece.regions[region], []);
715
+ const region = chunkM5FREXRQ_cjs.primaryRegion(schema, piece);
716
+ if (region === null) element.textContent = chunkM5FREXRQ_cjs.toPlainText([codec.toQuoin(piece)], { schema });
717
+ else chunkVSUGJZ7G_cjs.renderInline(element, piece.regions[region], []);
718
718
  drawn2.push(element);
719
719
  }
720
720
  }
@@ -791,7 +791,7 @@ function clipAside(layer, text, areas, scale) {
791
791
  function useGhostPlace(controller, layer, block, region) {
792
792
  const placeNow = react.useRef(() => {
793
793
  });
794
- chunkIGZRZIAF_cjs.useIsomorphicLayoutEffect(() => {
794
+ chunkVSUGJZ7G_cjs.useIsomorphicLayoutEffect(() => {
795
795
  const root = controller.root;
796
796
  const element = layer.current;
797
797
  const view = root?.ownerDocument.defaultView;
@@ -830,7 +830,7 @@ function AiGhost({ env, ghost, target, gone, barId }) {
830
830
  const layer = react.useRef(null);
831
831
  const drawn2 = react.useRef(null);
832
832
  const place2 = useGhostPlace(env.controller, layer, target.to.block, target.to.region);
833
- chunkIGZRZIAF_cjs.useIsomorphicLayoutEffect(() => {
833
+ chunkVSUGJZ7G_cjs.useIsomorphicLayoutEffect(() => {
834
834
  const element = drawn2.current;
835
835
  if (element === null) return;
836
836
  element.setAttribute("inert", "");
@@ -844,7 +844,7 @@ function AiGhost({ env, ghost, target, gone, barId }) {
844
844
  }
845
845
  function useTargetAnchor(controller, target) {
846
846
  const latest = react.useRef(target);
847
- chunkIGZRZIAF_cjs.useIsomorphicLayoutEffect(() => {
847
+ chunkVSUGJZ7G_cjs.useIsomorphicLayoutEffect(() => {
848
848
  latest.current = target;
849
849
  });
850
850
  return react.useMemo(() => {
@@ -853,8 +853,8 @@ function useTargetAnchor(controller, target) {
853
853
  return { block: to.block, region: to.region, from: to.offset, to: to.offset };
854
854
  };
855
855
  return {
856
- current: chunk7XQGOCUG_cjs.virtualAnchor(
857
- () => chunk7XQGOCUG_cjs.rangeRect(controller, end()),
856
+ current: chunkABVSP2XR_cjs.virtualAnchor(
857
+ () => chunkABVSP2XR_cjs.rangeRect(controller, end()),
858
858
  () => controller.registry.get(end().block, end().region)
859
859
  )
860
860
  };
@@ -908,7 +908,7 @@ function AiMenu({ env, target, fromSpace }) {
908
908
  };
909
909
  const fieldLabel = asking === "tone" ? labels.tonePrompt : asking === "translate" ? labels.translatePrompt : labels.prompt;
910
910
  return /* @__PURE__ */ jsxRuntime.jsxs(
911
- chunk7XQGOCUG_cjs.Popover,
911
+ chunkABVSP2XR_cjs.Popover,
912
912
  {
913
913
  open: true,
914
914
  modal: false,
@@ -916,9 +916,9 @@ function AiMenu({ env, target, fromSpace }) {
916
916
  if (!next) closeMenu(controller.editor);
917
917
  },
918
918
  children: [
919
- /* @__PURE__ */ jsxRuntime.jsx(chunk7XQGOCUG_cjs.PopoverAnchor, { virtualRef: anchor }),
919
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABVSP2XR_cjs.PopoverAnchor, { virtualRef: anchor }),
920
920
  /* @__PURE__ */ jsxRuntime.jsxs(
921
- chunk7XQGOCUG_cjs.PopoverContent,
921
+ chunkABVSP2XR_cjs.PopoverContent,
922
922
  {
923
923
  "aria-label": labels.askAi,
924
924
  side: "bottom",
@@ -935,7 +935,7 @@ function AiMenu({ env, target, fromSpace }) {
935
935
  },
936
936
  children: [
937
937
  /* @__PURE__ */ jsxRuntime.jsx(
938
- chunk7XQGOCUG_cjs.Input,
938
+ chunkABVSP2XR_cjs.Input,
939
939
  {
940
940
  ref: field,
941
941
  role: "combobox",
@@ -959,7 +959,7 @@ function AiMenu({ env, target, fromSpace }) {
959
959
  id: optionId(index),
960
960
  role: "option",
961
961
  "aria-selected": index === current,
962
- className: chunk7XQGOCUG_cjs.cn(chunk7XQGOCUG_cjs.MENU_ITEM, index === current && "bg-accent text-accent-foreground"),
962
+ className: chunkABVSP2XR_cjs.cn(chunkABVSP2XR_cjs.MENU_ITEM, index === current && "bg-accent text-accent-foreground"),
963
963
  onMouseDown: (event) => event.preventDefault(),
964
964
  onClick: () => choose(choice),
965
965
  children: choice.label
@@ -977,17 +977,17 @@ var goneOf = (state) => {
977
977
  const { target, ghost } = aiState(state);
978
978
  return target !== null && ghost !== null && targetGone(state.doc, target);
979
979
  };
980
- var plainText = (markdown) => chunkVFSVN5IQ_cjs.toPlainText(chunkAIS37SL2_cjs.fromMarkdown(markdown));
980
+ var plainText = (markdown) => chunkM5FREXRQ_cjs.toPlainText(chunk6H76FAI3_cjs.fromMarkdown(markdown));
981
981
  function AiOverlay({ controller, stream, labels }) {
982
- const { onError } = chunk7XQGOCUG_cjs.useQuoin();
982
+ const { onError } = chunkABVSP2XR_cjs.useQuoin();
983
983
  const link = linkOf(controller.editor);
984
- chunkIGZRZIAF_cjs.useIsomorphicLayoutEffect(() => {
984
+ chunkVSUGJZ7G_cjs.useIsomorphicLayoutEffect(() => {
985
985
  link.report = onError;
986
986
  link.ended = (phase, output) => controller.announce((phase === "done" ? labels.written : labels.halted)(plainText(output)));
987
987
  }, [link, onError, controller, labels]);
988
- const value = chunkIGZRZIAF_cjs.useEditorState(controller, aiState);
989
- const gone = chunkIGZRZIAF_cjs.useEditorState(controller, goneOf);
990
- const readOnly = chunkIGZRZIAF_cjs.useReadOnly(controller);
988
+ const value = chunkVSUGJZ7G_cjs.useEditorState(controller, aiState);
989
+ const gone = chunkVSUGJZ7G_cjs.useEditorState(controller, goneOf);
990
+ const readOnly = chunkVSUGJZ7G_cjs.useReadOnly(controller);
991
991
  const env = react.useMemo(() => ({ controller, stream, labels }), [controller, stream, labels]);
992
992
  const barId = react.useId();
993
993
  const showing = value.ghost !== null;
@@ -1006,7 +1006,7 @@ function AiOverlay({ controller, stream, labels }) {
1006
1006
  const root = controller.root;
1007
1007
  if (!root) return;
1008
1008
  let away = true;
1009
- return chunkEFRQMYZ6_cjs.watchCanvasFocus(controller, root.ownerDocument, (inside, node) => {
1009
+ return chunkPNMBRBAT_cjs.watchCanvasFocus(controller, root.ownerDocument, (inside, node) => {
1010
1010
  if (!inside) away = true;
1011
1011
  else if (root.contains(node)) {
1012
1012
  if (away) noteFocus(controller.editor);
@@ -1042,7 +1042,7 @@ function aiExtension(options) {
1042
1042
  blockMenuItems: [aiBlockMenuItem(labels)],
1043
1043
  overlays: [Overlay]
1044
1044
  };
1045
- return chunkVFSVN5IQ_cjs.defineExtension({
1045
+ return chunkM5FREXRQ_cjs.defineExtension({
1046
1046
  name: "ai",
1047
1047
  plugins: [aiPlugin],
1048
1048
  decorations: aiDecorations,
package/dist/ai.js CHANGED
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import { clipBoxes } from './chunk-MQUCCSWG.js';
3
- import { watchCanvasFocus } from './chunk-QSXPKZ2F.js';
4
- import { useQuoin, Popover, PopoverAnchor, PopoverContent, Input, cn, MENU_ITEM, virtualAnchor, rangeRect, Button, toError } from './chunk-DYWU4SQ2.js';
5
- import { useIsomorphicLayoutEffect, useEditorState, useReadOnly, renderInline } from './chunk-IEP7BPFN.js';
3
+ import { watchCanvasFocus } from './chunk-ZEQXMRJW.js';
4
+ import { useQuoin, Popover, PopoverAnchor, PopoverContent, Input, cn, MENU_ITEM, virtualAnchor, rangeRect, Button, toError } from './chunk-JEFQNZO4.js';
5
+ import { useIsomorphicLayoutEffect, useEditorState, useReadOnly, renderInline } from './chunk-G7HK4OHE.js';
6
6
  import './chunk-HDJ653LM.js';
7
- import { createPluginKey, defineExtension, isCollapsed, regionLength, primaryRegion, getPluginState, Transaction, toPlainText, selectedBlockIds, orderedRange, comparePos, sliceFromSelection, textSelection, deleteRange, pasteAtCaret, toMarkdown, descendantsEnd, freshBlocks, insertBlocksStep, capIndents, endOf } from './chunk-L4D23LM2.js';
8
- import './chunk-3BXUGX5F.js';
9
- import { blockById, fromMarkdown, createSchema, createBlockCodec, parseLine } from './chunk-L6OW2FL3.js';
7
+ import { createPluginKey, defineExtension, isCollapsed, regionLength, primaryRegion, getPluginState, Transaction, toPlainText, selectedBlockIds, orderedRange, comparePos, sliceFromSelection, textSelection, deleteRange, pasteAtCaret, toMarkdown, descendantsEnd, freshBlocks, insertBlocksStep, capIndents, endOf } from './chunk-IVWFPFUG.js';
8
+ import './chunk-3G4ZWUUY.js';
9
+ import { blockById, fromMarkdown, createSchema, createBlockCodec, parseLine } from './chunk-QLDXQOHQ.js';
10
10
  import { Sparkles, PenLine } from 'lucide-react';
11
11
  import { useMemo, useId, useEffect, useState, useRef, useCallback } from 'react';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,23 +1,23 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkOKWER2RV_cjs = require('./chunk-OKWER2RV.cjs');
5
- var chunkWH56EW3H_cjs = require('./chunk-WH56EW3H.cjs');
6
- var chunkXAS7LANM_cjs = require('./chunk-XAS7LANM.cjs');
7
- var chunkKXRGY5LK_cjs = require('./chunk-KXRGY5LK.cjs');
8
- var chunkJCEFSTVG_cjs = require('./chunk-JCEFSTVG.cjs');
9
- require('./chunk-3QRVAI53.cjs');
10
- var chunkW7B4WQ3L_cjs = require('./chunk-W7B4WQ3L.cjs');
11
- var chunkVNRI5DAL_cjs = require('./chunk-VNRI5DAL.cjs');
12
- require('./chunk-RIIXJWBR.cjs');
13
- require('./chunk-U5BSCAMP.cjs');
14
- var chunk7NAONESM_cjs = require('./chunk-7NAONESM.cjs');
15
- require('./chunk-7XQGOCUG.cjs');
16
- require('./chunk-IGZRZIAF.cjs');
4
+ var chunkES2QYHXL_cjs = require('./chunk-ES2QYHXL.cjs');
5
+ var chunkUGAOEZ3O_cjs = require('./chunk-UGAOEZ3O.cjs');
6
+ var chunkXJ32XESJ_cjs = require('./chunk-XJ32XESJ.cjs');
7
+ var chunk6QLA3JOU_cjs = require('./chunk-6QLA3JOU.cjs');
8
+ var chunkQAI3CM7V_cjs = require('./chunk-QAI3CM7V.cjs');
9
+ require('./chunk-P3T5XBYW.cjs');
10
+ var chunkKKRQDVBJ_cjs = require('./chunk-KKRQDVBJ.cjs');
11
+ var chunk5DEPLPDS_cjs = require('./chunk-5DEPLPDS.cjs');
12
+ require('./chunk-E52VO5JT.cjs');
13
+ require('./chunk-BMEEEI43.cjs');
14
+ var chunkEABO523V_cjs = require('./chunk-EABO523V.cjs');
15
+ require('./chunk-ABVSP2XR.cjs');
16
+ require('./chunk-VSUGJZ7G.cjs');
17
17
  require('./chunk-A6PGQVTR.cjs');
18
- require('./chunk-VFSVN5IQ.cjs');
19
- require('./chunk-7SVKLWDT.cjs');
20
- require('./chunk-AIS37SL2.cjs');
18
+ require('./chunk-M5FREXRQ.cjs');
19
+ require('./chunk-OAAYF2EI.cjs');
20
+ require('./chunk-6H76FAI3.cjs');
21
21
 
22
22
  // src/extensions/create-catalogue.ts
23
23
  function createCatalogue(features2) {
@@ -29,14 +29,14 @@ function createCatalogue(features2) {
29
29
 
30
30
  // src/catalogue.ts
31
31
  var features = {
32
- table: chunkXAS7LANM_cjs.tableExtension,
33
- embed: chunkKXRGY5LK_cjs.embedExtension,
34
- math: chunkJCEFSTVG_cjs.mathExtension,
35
- toc: chunkW7B4WQ3L_cjs.tocExtension,
36
- mention: chunkVNRI5DAL_cjs.mentionExtension,
37
- emoji: chunk7NAONESM_cjs.emojiExtension,
38
- find: chunkOKWER2RV_cjs.findExtension,
39
- stats: chunkWH56EW3H_cjs.statsExtension
32
+ table: chunkXJ32XESJ_cjs.tableExtension,
33
+ embed: chunk6QLA3JOU_cjs.embedExtension,
34
+ math: chunkQAI3CM7V_cjs.mathExtension,
35
+ toc: chunkKKRQDVBJ_cjs.tocExtension,
36
+ mention: chunk5DEPLPDS_cjs.mentionExtension,
37
+ emoji: chunkEABO523V_cjs.emojiExtension,
38
+ find: chunkES2QYHXL_cjs.findExtension,
39
+ stats: chunkUGAOEZ3O_cjs.statsExtension
40
40
  };
41
41
  var catalogue = createCatalogue(features);
42
42
 
package/dist/catalogue.js CHANGED
@@ -1,21 +1,21 @@
1
1
  'use client';
2
- import { findExtension } from './chunk-CKHKCPGL.js';
3
- import { statsExtension } from './chunk-UEVR4B5S.js';
4
- import { tableExtension } from './chunk-MUIPM26J.js';
5
- import { embedExtension } from './chunk-SFMORPWB.js';
6
- import { mathExtension } from './chunk-KZ6ZFCGO.js';
7
- import './chunk-7FAVFJAS.js';
8
- import { tocExtension } from './chunk-RFLFRIPV.js';
9
- import { mentionExtension } from './chunk-L2QA2UTY.js';
10
- import './chunk-TYZSB7JT.js';
11
- import './chunk-WAGBELKA.js';
12
- import { emojiExtension } from './chunk-VBJY2CSK.js';
13
- import './chunk-DYWU4SQ2.js';
14
- import './chunk-IEP7BPFN.js';
2
+ import { findExtension } from './chunk-36OSSZDK.js';
3
+ import { statsExtension } from './chunk-JHA23OOK.js';
4
+ import { tableExtension } from './chunk-AQNVYFEU.js';
5
+ import { embedExtension } from './chunk-J37ORWSG.js';
6
+ import { mathExtension } from './chunk-V2ZBA5VC.js';
7
+ import './chunk-JYO2T4MC.js';
8
+ import { tocExtension } from './chunk-PRXIYHSX.js';
9
+ import { mentionExtension } from './chunk-ZPGA5UIY.js';
10
+ import './chunk-RUC5OZXO.js';
11
+ import './chunk-5QNNF5ZJ.js';
12
+ import { emojiExtension } from './chunk-EDKQQKQR.js';
13
+ import './chunk-JEFQNZO4.js';
14
+ import './chunk-G7HK4OHE.js';
15
15
  import './chunk-HDJ653LM.js';
16
- import './chunk-L4D23LM2.js';
17
- import './chunk-3BXUGX5F.js';
18
- import './chunk-L6OW2FL3.js';
16
+ import './chunk-IVWFPFUG.js';
17
+ import './chunk-3G4ZWUUY.js';
18
+ import './chunk-QLDXQOHQ.js';
19
19
 
20
20
  // src/extensions/create-catalogue.ts
21
21
  function createCatalogue(features2) {
@@ -1,7 +1,7 @@
1
- import { Input, Button } from './chunk-DYWU4SQ2.js';
2
- import { useReadOnly, useEditorState, isComposingKey } from './chunk-IEP7BPFN.js';
3
- import { createPluginKey, Transaction, replaceInlineStep, defineExtension, comparePos, getPluginState, selectionRange, selectedBlockIds, textSelection, keyName, normalizeKey, undo, redo } from './chunk-L4D23LM2.js';
4
- import { compareRegionNames, blockById, sliceInline, text, indexOfBlock } from './chunk-L6OW2FL3.js';
1
+ import { Input, Button } from './chunk-JEFQNZO4.js';
2
+ import { useReadOnly, useEditorState, isComposingKey } from './chunk-G7HK4OHE.js';
3
+ import { createPluginKey, Transaction, replaceInlineStep, defineExtension, comparePos, getPluginState, selectionRange, selectedBlockIds, textSelection, keyName, normalizeKey, undo, redo } from './chunk-IVWFPFUG.js';
4
+ import { compareRegionNames, blockById, sliceInline, text, indexOfBlock } from './chunk-QLDXQOHQ.js';
5
5
  import { useCallback, useEffect, useMemo, useState, useRef } from 'react';
6
6
  import { createPortal } from 'react-dom';
7
7
  import { ChevronUp, ChevronDown, X, CaseSensitive, WholeWord, Regex } from 'lucide-react';
@@ -536,5 +536,5 @@ function findExtension(options = {}) {
536
536
  }
537
537
 
538
538
  export { englishFindLabels, findExtension, findMatches, replaceMatches };
539
- //# sourceMappingURL=chunk-CKHKCPGL.js.map
540
- //# sourceMappingURL=chunk-CKHKCPGL.js.map
539
+ //# sourceMappingURL=chunk-36OSSZDK.js.map
540
+ //# sourceMappingURL=chunk-36OSSZDK.js.map