edytor 4.0.0 → 6.0.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 (193) hide show
  1. package/README.md +2 -2
  2. package/dist/block/block.svelte.js +6 -21
  3. package/dist/block/inlineBlock.svelte.js +4 -6
  4. package/dist/clipboard/moveText.js +6 -8
  5. package/dist/cloudflare/DocumentRoom.d.ts +10 -3
  6. package/dist/cloudflare/index.d.ts +1 -1
  7. package/dist/cloudflare/room/access.d.ts +8 -3
  8. package/dist/cloudflare/room/access.js +44 -20
  9. package/dist/cloudflare/room/admission.js +28 -5
  10. package/dist/cloudflare/room/comments.js +28 -1
  11. package/dist/cloudflare/room/context.d.ts +106 -109
  12. package/dist/cloudflare/room/context.js +10 -3
  13. package/dist/cloudflare/room/forged.d.ts +14 -0
  14. package/dist/cloudflare/room/forged.js +30 -2
  15. package/dist/cloudflare/room/frames.d.ts +4 -0
  16. package/dist/cloudflare/room/frames.js +5 -1
  17. package/dist/cloudflare/room/purge.js +2 -1
  18. package/dist/cloudflare/room/replicas.d.ts +4 -2
  19. package/dist/cloudflare/room/replicas.js +8 -3
  20. package/dist/cloudflare/room/suggest.d.ts +7 -0
  21. package/dist/cloudflare/room/suggest.js +143 -0
  22. package/dist/cloudflare/routeDocumentSocket.d.ts +10 -1
  23. package/dist/cloudflare/routeDocumentSocket.js +5 -3
  24. package/dist/components/Content.svelte +9 -1
  25. package/dist/crdt/anchors.js +3 -2
  26. package/dist/crdt/attribution/attribution.d.ts +3 -0
  27. package/dist/crdt/attribution/attribution.js +3 -3
  28. package/dist/crdt/doc/funnel.d.ts +1 -1
  29. package/dist/crdt/doc/funnel.js +5 -2
  30. package/dist/crdt/doc/gate.d.ts +1 -1
  31. package/dist/crdt/doc/history.d.ts +6 -0
  32. package/dist/crdt/doc/history.js +79 -59
  33. package/dist/crdt/doc/ops.d.ts +81 -0
  34. package/dist/crdt/doc/ops.js +1898 -0
  35. package/dist/crdt/doc/reads.d.ts +2 -2
  36. package/dist/crdt/doc/reads.js +18 -28
  37. package/dist/crdt/doc/suggest.d.ts +167 -0
  38. package/dist/crdt/doc/suggest.js +579 -0
  39. package/dist/crdt/document.d.ts +10 -1
  40. package/dist/crdt/document.js +19 -11
  41. package/dist/crdt/edytor-doc.d.ts +294 -272
  42. package/dist/crdt/edytor-doc.js +123 -108
  43. package/dist/crdt/engine-api.d.ts +8 -2
  44. package/dist/crdt/engine.d.ts +2 -1
  45. package/dist/crdt/engine.js +3 -1
  46. package/dist/crdt/flow.d.ts +5 -47
  47. package/dist/crdt/flow.js +3 -269
  48. package/dist/crdt/index.d.ts +102 -108
  49. package/dist/crdt/index.js +3 -0
  50. package/dist/crdt/operations.d.ts +13 -4
  51. package/dist/crdt/parts.d.ts +43 -0
  52. package/dist/crdt/parts.js +44 -0
  53. package/dist/crdt/placement/display.d.ts +1 -1
  54. package/dist/crdt/placement/display.js +3 -3
  55. package/dist/crdt/placement/keys.d.ts +5 -0
  56. package/dist/crdt/placement/keys.js +5 -0
  57. package/dist/crdt/placement/resolve.d.ts +1 -1
  58. package/dist/crdt/placement/resolve.js +2 -1
  59. package/dist/crdt/protocol.d.ts +1 -1
  60. package/dist/crdt/protocol.js +1 -1
  61. package/dist/crdt/protocols/auth.d.ts +11 -1
  62. package/dist/crdt/protocols/auth.js +17 -1
  63. package/dist/crdt/protocols/awareness.js +46 -81
  64. package/dist/crdt/protocols/comments.d.ts +16 -1
  65. package/dist/crdt/protocols/comments.js +9 -1
  66. package/dist/crdt/providers/index.d.ts +12 -22
  67. package/dist/crdt/providers/index.js +3 -1
  68. package/dist/crdt/providers/indexeddb.d.ts +6 -10
  69. package/dist/crdt/providers/indexeddb.js +10 -16
  70. package/dist/crdt/providers/room.d.ts +11 -0
  71. package/dist/crdt/providers/room.js +26 -12
  72. package/dist/crdt/providers/websocket.d.ts +8 -12
  73. package/dist/crdt/providers/websocket.js +17 -19
  74. package/dist/crdt/purge.d.ts +7 -1
  75. package/dist/crdt/purge.js +32 -2
  76. package/dist/crdt/rangeDelete.d.ts +2 -47
  77. package/dist/crdt/rangeDelete.js +1 -169
  78. package/dist/crdt/restore.d.ts +2 -1
  79. package/dist/crdt/restore.js +9 -0
  80. package/dist/crdt/schema.d.ts +9 -1
  81. package/dist/crdt/schema.js +13 -3
  82. package/dist/crdt/structs.d.ts +2 -0
  83. package/dist/crdt/structs.js +2 -0
  84. package/dist/crdt/text/index/build.d.ts +125 -0
  85. package/dist/crdt/text/index/build.js +2895 -0
  86. package/dist/crdt/text/index/shared.d.ts +2 -6
  87. package/dist/crdt/text/index/shared.js +19 -19
  88. package/dist/crdt/text/model.d.ts +10 -0
  89. package/dist/crdt/text/model.js +10 -4
  90. package/dist/crdt/text/runs.d.ts +43 -42
  91. package/dist/crdt/text/runs.js +2 -165
  92. package/dist/crdt/vendor/yjs/UPSTREAM.md +83 -0
  93. package/dist/crdt/vendor/yjs/dts/index.d.ts +1 -1
  94. package/dist/crdt/vendor/yjs/dts/structs/Item.d.ts +6 -3
  95. package/dist/crdt/vendor/yjs/dts/ynode.d.ts +13 -2
  96. package/dist/crdt/vendor/yjs/src/index.js +1 -1
  97. package/dist/crdt/vendor/yjs/src/structs/Item.js +44 -5
  98. package/dist/crdt/vendor/yjs/src/ynode.js +29 -7
  99. package/dist/edytor.svelte.d.ts +1 -1
  100. package/dist/edytor.svelte.js +100 -75
  101. package/dist/events/beforeInputCommands.d.ts +2 -2
  102. package/dist/events/domTextOffset.d.ts +2 -0
  103. package/dist/events/domTextOffset.js +8 -0
  104. package/dist/events/nativeInteractiveControl.d.ts +11 -1
  105. package/dist/events/nativeInteractiveControl.js +41 -1
  106. package/dist/events/onBeforeInput.js +3 -3
  107. package/dist/events/onFocus.js +9 -11
  108. package/dist/export/forms.d.ts +75 -75
  109. package/dist/index.d.ts +4 -2
  110. package/dist/index.js +1 -1
  111. package/dist/labels.d.ts +8 -0
  112. package/dist/labels.js +6 -1
  113. package/dist/plugins/comments/CommentsController.svelte.d.ts +5 -1
  114. package/dist/plugins/comments/CommentsController.svelte.js +14 -4
  115. package/dist/plugins/find/search.js +2 -2
  116. package/dist/plugins/index.d.ts +1 -0
  117. package/dist/plugins/index.js +1 -0
  118. package/dist/plugins/richtext/RichTextPlugin.svelte +63 -61
  119. package/dist/plugins/richtext/richTextOperations.js +26 -32
  120. package/dist/plugins/suggestions/SuggestionBars.svelte +40 -23
  121. package/dist/plugins/suggestions/SuggestionBars.svelte.d.ts +3 -1
  122. package/dist/plugins/suggestions/SuggestionRuns.svelte +77 -0
  123. package/dist/plugins/suggestions/SuggestionRuns.svelte.d.ts +9 -0
  124. package/dist/plugins/suggestions/shared.svelte.d.ts +58 -0
  125. package/dist/plugins/suggestions/shared.svelte.js +421 -0
  126. package/dist/plugins/suggestions/suggestionsPlugin.d.ts +15 -4
  127. package/dist/selection/domSelection.d.ts +2 -0
  128. package/dist/selection/domSelection.js +6 -2
  129. package/dist/selection/pointer.svelte.js +75 -48
  130. package/dist/selection/replaceSelection.js +2 -6
  131. package/dist/selection/selection.svelte.d.ts +3 -3
  132. package/dist/selection/selection.svelte.js +39 -32
  133. package/dist/selection/selection.utils.d.ts +14 -0
  134. package/dist/selection/selection.utils.js +33 -11
  135. package/dist/session/commands.js +21 -11
  136. package/dist/session/composition.svelte.d.ts +5 -3
  137. package/dist/session/composition.svelte.js +21 -17
  138. package/dist/session/handles.d.ts +4 -17
  139. package/dist/session/handles.js +14 -44
  140. package/dist/session/navigation.js +6 -9
  141. package/dist/session/selection.d.ts +11 -5
  142. package/dist/session/selection.js +14 -48
  143. package/dist/session/suggestions.svelte.d.ts +38 -9
  144. package/dist/session/suggestions.svelte.js +37 -18
  145. package/dist/session/virtual.d.ts +1 -1
  146. package/dist/surface/attributes.d.ts +5 -0
  147. package/dist/surface/attributes.js +2 -2
  148. package/dist/surface/cells.d.ts +2 -26
  149. package/dist/surface/cells.js +2 -33
  150. package/dist/surface/observer.svelte.d.ts +6 -1
  151. package/dist/surface/observer.svelte.js +143 -111
  152. package/dist/surface/pin.svelte.d.ts +9 -9
  153. package/dist/surface/pin.svelte.js +15 -22
  154. package/dist/surface/projector.svelte.js +10 -16
  155. package/dist/text/text.svelte.js +14 -19
  156. package/dist/themes/notion.css +29 -0
  157. package/dist/utils.d.ts +5 -0
  158. package/dist/utils.js +7 -0
  159. package/package.json +3 -1
  160. package/dist/crdt/doc/capability.d.ts +0 -56
  161. package/dist/crdt/doc/capability.js +0 -211
  162. package/dist/crdt/doc/content.d.ts +0 -16
  163. package/dist/crdt/doc/content.js +0 -77
  164. package/dist/crdt/doc/delete.d.ts +0 -15
  165. package/dist/crdt/doc/delete.js +0 -84
  166. package/dist/crdt/doc/layout.d.ts +0 -9
  167. package/dist/crdt/doc/layout.js +0 -178
  168. package/dist/crdt/doc/meta.d.ts +0 -19
  169. package/dist/crdt/doc/meta.js +0 -199
  170. package/dist/crdt/doc/moves.d.ts +0 -21
  171. package/dist/crdt/doc/moves.js +0 -274
  172. package/dist/crdt/doc/split-merge.d.ts +0 -10
  173. package/dist/crdt/doc/split-merge.js +0 -179
  174. package/dist/crdt/doc/steps.d.ts +0 -65
  175. package/dist/crdt/doc/steps.js +0 -311
  176. package/dist/crdt/text/index/cache.d.ts +0 -16
  177. package/dist/crdt/text/index/cache.js +0 -175
  178. package/dist/crdt/text/index/claims.d.ts +0 -18
  179. package/dist/crdt/text/index/claims.js +0 -225
  180. package/dist/crdt/text/index/fold.d.ts +0 -21
  181. package/dist/crdt/text/index/fold.js +0 -656
  182. package/dist/crdt/text/index/layout.d.ts +0 -24
  183. package/dist/crdt/text/index/layout.js +0 -271
  184. package/dist/crdt/text/index/placement.d.ts +0 -47
  185. package/dist/crdt/text/index/placement.js +0 -741
  186. package/dist/crdt/text/index/records.d.ts +0 -13
  187. package/dist/crdt/text/index/records.js +0 -139
  188. package/dist/crdt/text/index/report.d.ts +0 -18
  189. package/dist/crdt/text/index/report.js +0 -337
  190. package/dist/crdt/text/index/state.d.ts +0 -197
  191. package/dist/crdt/text/index/state.js +0 -116
  192. package/dist/crdt/text/index/streams.d.ts +0 -25
  193. package/dist/crdt/text/index/streams.js +0 -248
@@ -168,18 +168,18 @@ export type MathML = (tex: string, display: boolean) => string;
168
168
  export declare const equationForms: (mathml?: MathML) => {
169
169
  blocks: {
170
170
  equation: {
171
- itemKind?: string;
171
+ lines?: boolean;
172
172
  island?: boolean;
173
- defaultChild?: string;
174
173
  rendersContent: boolean;
174
+ defaultChild?: string;
175
175
  void: boolean;
176
- lines?: boolean;
177
176
  html?: string | ((block: JSONBlock, content: string, children: string) => string);
178
177
  markdown?: (block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string;
179
178
  plain?: (block: JSONBlock, content: string, children: string) => string;
180
179
  parse?: (element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined;
181
180
  element?: import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement);
182
181
  contentElement?: import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement);
182
+ itemKind?: string;
183
183
  };
184
184
  };
185
185
  inlineBlocks: {
@@ -232,48 +232,48 @@ export declare const bundledRead: () => {
232
232
  level: "h1" | "h2" | "h3";
233
233
  };
234
234
  }[];
235
- itemKind?: string | undefined;
235
+ lines?: boolean | undefined;
236
236
  island?: boolean | undefined;
237
- defaultChild?: string | undefined;
238
237
  rendersContent?: boolean | undefined;
238
+ defaultChild?: string | undefined;
239
239
  void?: boolean | undefined;
240
- lines?: boolean | undefined;
241
240
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
242
241
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
243
242
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
244
243
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
245
244
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
246
245
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
246
+ itemKind?: string | undefined;
247
247
  };
248
248
  'bulleted-list-item': {
249
249
  presets: {}[];
250
- itemKind?: string | undefined;
250
+ lines?: boolean | undefined;
251
251
  island?: boolean | undefined;
252
- defaultChild?: string | undefined;
253
252
  rendersContent?: boolean | undefined;
253
+ defaultChild?: string | undefined;
254
254
  void?: boolean | undefined;
255
- lines?: boolean | undefined;
256
255
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
257
256
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
258
257
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
259
258
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
260
259
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
261
260
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
261
+ itemKind?: string | undefined;
262
262
  };
263
263
  'numbered-list-item': {
264
264
  presets: {}[];
265
- itemKind?: string | undefined;
265
+ lines?: boolean | undefined;
266
266
  island?: boolean | undefined;
267
- defaultChild?: string | undefined;
268
267
  rendersContent?: boolean | undefined;
268
+ defaultChild?: string | undefined;
269
269
  void?: boolean | undefined;
270
- lines?: boolean | undefined;
271
270
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
272
271
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
273
272
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
274
273
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
275
274
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
276
275
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
276
+ itemKind?: string | undefined;
277
277
  };
278
278
  'todo-item': {
279
279
  presets: {
@@ -284,18 +284,18 @@ export declare const bundledRead: () => {
284
284
  };
285
285
  toggle: {
286
286
  presets: {}[];
287
- itemKind?: string | undefined;
287
+ lines?: boolean | undefined;
288
288
  island?: boolean | undefined;
289
- defaultChild?: string | undefined;
290
289
  rendersContent?: boolean | undefined;
290
+ defaultChild?: string | undefined;
291
291
  void?: boolean | undefined;
292
- lines?: boolean | undefined;
293
292
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
294
293
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
295
294
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
296
295
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
297
296
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
298
297
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
298
+ itemKind?: string | undefined;
299
299
  };
300
300
  'toggle-heading': {
301
301
  presets: {
@@ -303,91 +303,91 @@ export declare const bundledRead: () => {
303
303
  level: "h1" | "h2" | "h3";
304
304
  };
305
305
  }[];
306
- itemKind?: string | undefined;
306
+ lines?: boolean | undefined;
307
307
  island?: boolean | undefined;
308
- defaultChild?: string | undefined;
309
308
  rendersContent?: boolean | undefined;
309
+ defaultChild?: string | undefined;
310
310
  void?: boolean | undefined;
311
- lines?: boolean | undefined;
312
311
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
313
312
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
314
313
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
315
314
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
316
315
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
317
316
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
317
+ itemKind?: string | undefined;
318
318
  };
319
319
  callout: {
320
320
  presets: {}[];
321
- itemKind?: string | undefined;
321
+ lines?: boolean | undefined;
322
322
  island?: boolean | undefined;
323
- defaultChild?: string | undefined;
324
323
  rendersContent?: boolean | undefined;
324
+ defaultChild?: string | undefined;
325
325
  void?: boolean | undefined;
326
- lines?: boolean | undefined;
327
326
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
328
327
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
329
328
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
330
329
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
331
330
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
332
331
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
332
+ itemKind?: string | undefined;
333
333
  };
334
334
  quote: {
335
335
  presets: {}[];
336
- itemKind?: string | undefined;
336
+ lines?: boolean | undefined;
337
337
  island?: boolean | undefined;
338
- defaultChild?: string | undefined;
339
338
  rendersContent?: boolean | undefined;
339
+ defaultChild?: string | undefined;
340
340
  void?: boolean | undefined;
341
- lines?: boolean | undefined;
342
341
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
343
342
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
344
343
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
345
344
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
346
345
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
347
346
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
347
+ itemKind?: string | undefined;
348
348
  };
349
349
  divider: {
350
350
  presets: {}[];
351
- itemKind?: string | undefined;
351
+ lines?: boolean | undefined;
352
352
  island?: boolean | undefined;
353
- defaultChild?: string | undefined;
354
353
  rendersContent: boolean;
354
+ defaultChild?: string | undefined;
355
355
  void: boolean;
356
- lines?: boolean | undefined;
357
356
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
358
357
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
359
358
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
360
359
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
361
360
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
362
361
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
362
+ itemKind?: string | undefined;
363
363
  };
364
364
  'ordered-list': {
365
- itemKind?: string | undefined;
365
+ lines?: boolean | undefined;
366
366
  island?: boolean | undefined;
367
- defaultChild: string;
368
367
  rendersContent: boolean;
368
+ defaultChild: string;
369
369
  void?: boolean | undefined;
370
- lines?: boolean | undefined;
371
370
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
372
371
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
373
372
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
374
373
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
375
374
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
376
375
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
376
+ itemKind?: string | undefined;
377
377
  };
378
378
  'unordered-list': {
379
- itemKind?: string | undefined;
379
+ lines?: boolean | undefined;
380
380
  island?: boolean | undefined;
381
- defaultChild: string;
382
381
  rendersContent: boolean;
382
+ defaultChild: string;
383
383
  void?: boolean | undefined;
384
- lines?: boolean | undefined;
385
384
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
386
385
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
387
386
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
388
387
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
389
388
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
390
389
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
390
+ itemKind?: string | undefined;
391
391
  };
392
392
  'list-item': Form;
393
393
  code: {
@@ -398,202 +398,202 @@ export declare const bundledRead: () => {
398
398
  };
399
399
  codeLine: {};
400
400
  table: {
401
- itemKind?: string | undefined;
401
+ lines?: boolean | undefined;
402
402
  island?: boolean | undefined;
403
- defaultChild: string;
404
403
  rendersContent: boolean;
404
+ defaultChild: string;
405
405
  void?: boolean | undefined;
406
- lines?: boolean | undefined;
407
406
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
408
407
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
409
408
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
410
409
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
411
410
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
412
411
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
412
+ itemKind?: string | undefined;
413
413
  table: true;
414
414
  };
415
415
  tableRow: {
416
- itemKind?: string | undefined;
416
+ lines?: boolean | undefined;
417
417
  island?: boolean | undefined;
418
- defaultChild: string;
419
418
  rendersContent: boolean;
419
+ defaultChild: string;
420
420
  void?: boolean | undefined;
421
- lines?: boolean | undefined;
422
421
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
423
422
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
424
423
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
425
424
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
426
425
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
427
426
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
427
+ itemKind?: string | undefined;
428
428
  };
429
429
  tableCell: {
430
- itemKind?: string | undefined;
430
+ lines?: boolean | undefined;
431
431
  island: boolean;
432
- defaultChild?: string | undefined;
433
432
  rendersContent?: boolean | undefined;
433
+ defaultChild?: string | undefined;
434
434
  void?: boolean | undefined;
435
- lines?: boolean | undefined;
436
435
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
437
436
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
438
437
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
439
438
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
440
439
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
441
440
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
441
+ itemKind?: string | undefined;
442
442
  };
443
443
  image: {
444
- itemKind?: string | undefined;
444
+ lines?: boolean | undefined;
445
445
  island?: boolean | undefined;
446
- defaultChild?: string | undefined;
447
446
  rendersContent?: boolean | undefined;
447
+ defaultChild?: string | undefined;
448
448
  void: boolean;
449
- lines?: boolean | undefined;
450
449
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
451
450
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
452
451
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
453
452
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
454
453
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
455
454
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
455
+ itemKind?: string | undefined;
456
456
  };
457
457
  embed: {
458
- itemKind?: string | undefined;
458
+ lines?: boolean | undefined;
459
459
  island?: boolean | undefined;
460
- defaultChild?: string | undefined;
461
460
  rendersContent?: boolean | undefined;
461
+ defaultChild?: string | undefined;
462
462
  void: boolean;
463
- lines?: boolean | undefined;
464
463
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
465
464
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
466
465
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
467
466
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
468
467
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
469
468
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
469
+ itemKind?: string | undefined;
470
470
  };
471
471
  bookmark: {
472
- itemKind?: string | undefined;
472
+ lines?: boolean | undefined;
473
473
  island?: boolean | undefined;
474
- defaultChild?: string | undefined;
475
474
  rendersContent?: boolean | undefined;
475
+ defaultChild?: string | undefined;
476
476
  void: boolean;
477
- lines?: boolean | undefined;
478
477
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
479
478
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
480
479
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
481
480
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
482
481
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
483
482
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
483
+ itemKind?: string | undefined;
484
484
  };
485
485
  file: {
486
- itemKind?: string | undefined;
486
+ lines?: boolean | undefined;
487
487
  island?: boolean | undefined;
488
- defaultChild?: string | undefined;
489
488
  rendersContent?: boolean | undefined;
489
+ defaultChild?: string | undefined;
490
490
  void: boolean;
491
- lines?: boolean | undefined;
492
491
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
493
492
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
494
493
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
495
494
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
496
495
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
497
496
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
497
+ itemKind?: string | undefined;
498
498
  };
499
499
  video: {
500
- itemKind?: string | undefined;
500
+ lines?: boolean | undefined;
501
501
  island?: boolean | undefined;
502
- defaultChild?: string | undefined;
503
502
  rendersContent?: boolean | undefined;
503
+ defaultChild?: string | undefined;
504
504
  void: boolean;
505
- lines?: boolean | undefined;
506
505
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
507
506
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
508
507
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
509
508
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
510
509
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
511
510
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
511
+ itemKind?: string | undefined;
512
512
  };
513
513
  audio: {
514
- itemKind?: string | undefined;
514
+ lines?: boolean | undefined;
515
515
  island?: boolean | undefined;
516
- defaultChild?: string | undefined;
517
516
  rendersContent?: boolean | undefined;
517
+ defaultChild?: string | undefined;
518
518
  void: boolean;
519
- lines?: boolean | undefined;
520
519
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
521
520
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
522
521
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
523
522
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
524
523
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
525
524
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
525
+ itemKind?: string | undefined;
526
526
  };
527
527
  page: {
528
- itemKind?: string | undefined;
528
+ lines?: boolean | undefined;
529
529
  island?: boolean | undefined;
530
- defaultChild?: string | undefined;
531
530
  rendersContent: boolean;
531
+ defaultChild?: string | undefined;
532
532
  void: boolean;
533
- lines?: boolean | undefined;
534
533
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
535
534
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
536
535
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
537
536
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
538
537
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
539
538
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
539
+ itemKind?: string | undefined;
540
540
  };
541
541
  toc: {
542
- itemKind?: string | undefined;
542
+ lines?: boolean | undefined;
543
543
  island?: boolean | undefined;
544
- defaultChild?: string | undefined;
545
544
  rendersContent: boolean;
545
+ defaultChild?: string | undefined;
546
546
  void: boolean;
547
- lines?: boolean | undefined;
548
547
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
549
548
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
550
549
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
551
550
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
552
551
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
553
552
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
553
+ itemKind?: string | undefined;
554
554
  };
555
555
  equation: {
556
- itemKind?: string | undefined;
556
+ lines?: boolean | undefined;
557
557
  island?: boolean | undefined;
558
- defaultChild?: string | undefined;
559
558
  rendersContent: boolean;
559
+ defaultChild?: string | undefined;
560
560
  void: boolean;
561
- lines?: boolean | undefined;
562
561
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
563
562
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
564
563
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
565
564
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
566
565
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
567
566
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
567
+ itemKind?: string | undefined;
568
568
  };
569
569
  columns: {
570
- itemKind?: string | undefined;
570
+ lines?: boolean | undefined;
571
571
  island?: boolean | undefined;
572
- defaultChild: string;
573
572
  rendersContent: boolean;
573
+ defaultChild: string;
574
574
  void?: boolean | undefined;
575
- lines?: boolean | undefined;
576
575
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
577
576
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
578
577
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
579
578
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
580
579
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
581
580
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
581
+ itemKind?: string | undefined;
582
582
  layout: true;
583
583
  };
584
584
  column: {
585
- itemKind?: string | undefined;
585
+ lines?: boolean | undefined;
586
586
  island?: boolean | undefined;
587
- defaultChild?: string | undefined;
588
587
  rendersContent: boolean;
588
+ defaultChild?: string | undefined;
589
589
  void?: boolean | undefined;
590
- lines?: boolean | undefined;
591
590
  html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
592
591
  markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
593
592
  plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
594
593
  parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
595
594
  element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
596
595
  contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
596
+ itemKind?: string | undefined;
597
597
  };
598
598
  };
599
599
  marks: Record<string, MarkForms>;
package/dist/index.d.ts CHANGED
@@ -42,7 +42,7 @@ export type { CommandResult } from './session/commands.js';
42
42
  export { convertToKind, turnCommands, wrapBlocks, wrappable, type KindRow } from './kinds.js';
43
43
  export { textToBlocks, type TextToBlocksOptions } from './clipboard/textBlocks.js';
44
44
  export type { Suggestion, Suggestions, SuggestionAt, SuggestionContent, SuggestionOptions, SuggestionRange, SuggestionStatus, SuggestionsAt, ResolvedAt } from './session/suggestions.svelte.js';
45
- export { createRichTextPlugin, richTextOperations, richTextPlaceholder, CALLOUT_ICONS, createCalloutIconsPlugin, type CalloutIconPicker, type CalloutIconsOptions, type RichTextPluginOptions, type TodoCheckboxPayload, type CalloutIconPayload, type EmptyBodyPayload, createArrowMovePlugin, createCodePlugin, CODE_LANGUAGES, loadCodeLanguage, type CodeLanguage, type CodePluginOptions, type CodeHeader, type LanguageMenu, type LanguageMenuItem, type LanguageRow, createMarkdownShortcutsPlugin, createMentionPlugin, type MentionItem, type MentionData, type MentionPluginOptions, createPageLinkPlugin, type PageLinkItem, type PageLinkData, type PageLinkPluginOptions, type TriggerMenuController, withRulesAndTriggers, BLOCK_ACTIVATE_EVENT, BLOCK_ADD_EVENT, type BlockActivation, type BlockAddition, createBlockHandlesPlugin, type BlockHandlesOptions, type BlockHandleSnippetPayload, type BlockHandleController, createSlashMenuPlugin, type SlashMenuOptions, type SlashMenuController, createToolbarPlugin, type ToolbarOptions, type ToolbarController, createBlockMenuPlugin, type BlockMenuOptions, type BlockMenuController, type BlockMenuAction, type BlockMenuColor, createSuggestionsPlugin, createSuggestionBarPlugin, type SuggestionBarOptions, type SuggestionBarPayload, createImagePlugin, type ImagePluginOptions, safeImageSrc, storableImageSrc, MAX_INLINE_IMAGE_BYTES, createColumnsPlugin, type ColumnsPluginOptions, createEmbedPlugin, EMBED_PROVIDERS, EMBED_SANDBOX, EMBED_ALLOW, embedSourceOf, type EmbedProvider, type EmbedPluginOptions, type EmbedFallbackPayload, createBookmarkPlugin, type BookmarkPluginOptions, type BookmarkPreview, type BookmarkCardPayload, createFilePlugin, type FilePluginOptions, type FileRowPayload, createVideoPlugin, type VideoPluginOptions, createAudioPlugin, type AudioPluginOptions, safeWebUrl, safeMediaSrc, type MediaKind, createMediaEmptyPlugin, type MediaEmptyOptions, createImageToolbarPlugin, type ImageToolbar, type ImageToolbarOptions, type MediaEmptyController, type MediaEmptyFailure, type UrlPasteController, type UrlPasteOffer, type UrlPasteOption, type ImageControls, type ImageBox, type ChromeAnchor, type MenuItemPayload, createFindPlugin, findController, findMatches, type FindPluginOptions, type FindController, type ReplaceMatches, type FindMatch, type FindOptions, createMarqueePlugin, type MarqueePluginOptions, type MarqueeBoxPayload, createCommentsPlugin, commentsController, type CommentsPluginOptions, type CommentCardPayload, type CommentsController, type CommentDraft, type CommentNotice, type CommentUser, type PlacedThread, createPagePlugin, type PagePluginOptions, type PageBlockLinkPayload, createTocPlugin, type TocPluginOptions, type TocHeadingLevel, type TocEntryPayload, type TocEmptyPayload, createTablePlugin, type TablePluginOptions, insertTableRow, deleteTableRows, insertTableColumn, deleteTableColumn, moveTableColumn, moveTableRows, fillTableCell, type TableChrome, type TableMenu, type TableMenuRow, type TableMenuItem, type TableGripPayload, type TableAddPayload, tableBlock, type TableBlockOptions, createEquationPlugin, KATEX_CDN, KATEX_VERSION, type EquationPluginOptions, type EquationData, type EquationEditor, type EquationErrorPayload, type EquationPlaceholderPayload, type EquationTarget, type KatexLike, type KatexLoader } from './plugins/index.js';
45
+ export { createRichTextPlugin, richTextOperations, richTextPlaceholder, CALLOUT_ICONS, createCalloutIconsPlugin, type CalloutIconPicker, type CalloutIconsOptions, type RichTextPluginOptions, type TodoCheckboxPayload, type CalloutIconPayload, type EmptyBodyPayload, createArrowMovePlugin, createCodePlugin, CODE_LANGUAGES, loadCodeLanguage, type CodeLanguage, type CodePluginOptions, type CodeHeader, type LanguageMenu, type LanguageMenuItem, type LanguageRow, createMarkdownShortcutsPlugin, createMentionPlugin, type MentionItem, type MentionData, type MentionPluginOptions, createPageLinkPlugin, type PageLinkItem, type PageLinkData, type PageLinkPluginOptions, type TriggerMenuController, withRulesAndTriggers, BLOCK_ACTIVATE_EVENT, BLOCK_ADD_EVENT, type BlockActivation, type BlockAddition, createBlockHandlesPlugin, type BlockHandlesOptions, type BlockHandleSnippetPayload, type BlockHandleController, createSlashMenuPlugin, type SlashMenuOptions, type SlashMenuController, createToolbarPlugin, type ToolbarOptions, type ToolbarController, createBlockMenuPlugin, type BlockMenuOptions, type BlockMenuController, type BlockMenuAction, type BlockMenuColor, createSuggestionsPlugin, createSuggestionBarPlugin, type SuggestionBarOptions, type SuggestionBarPayload, createSharedSuggestionsPlugin, sharedSuggestionsController, type SharedSuggestionsController, type SharedSuggestionOptions, createImagePlugin, type ImagePluginOptions, safeImageSrc, storableImageSrc, MAX_INLINE_IMAGE_BYTES, createColumnsPlugin, type ColumnsPluginOptions, createEmbedPlugin, EMBED_PROVIDERS, EMBED_SANDBOX, EMBED_ALLOW, embedSourceOf, type EmbedProvider, type EmbedPluginOptions, type EmbedFallbackPayload, createBookmarkPlugin, type BookmarkPluginOptions, type BookmarkPreview, type BookmarkCardPayload, createFilePlugin, type FilePluginOptions, type FileRowPayload, createVideoPlugin, type VideoPluginOptions, createAudioPlugin, type AudioPluginOptions, safeWebUrl, safeMediaSrc, type MediaKind, createMediaEmptyPlugin, type MediaEmptyOptions, createImageToolbarPlugin, type ImageToolbar, type ImageToolbarOptions, type MediaEmptyController, type MediaEmptyFailure, type UrlPasteController, type UrlPasteOffer, type UrlPasteOption, type ImageControls, type ImageBox, type ChromeAnchor, type MenuItemPayload, createFindPlugin, findController, findMatches, type FindPluginOptions, type FindController, type ReplaceMatches, type FindMatch, type FindOptions, createMarqueePlugin, type MarqueePluginOptions, type MarqueeBoxPayload, createCommentsPlugin, commentsController, type CommentsPluginOptions, type CommentCardPayload, type CommentsController, type CommentDraft, type CommentNotice, type CommentUser, type PlacedThread, createPagePlugin, type PagePluginOptions, type PageBlockLinkPayload, createTocPlugin, type TocPluginOptions, type TocHeadingLevel, type TocEntryPayload, type TocEmptyPayload, createTablePlugin, type TablePluginOptions, insertTableRow, deleteTableRows, insertTableColumn, deleteTableColumn, moveTableColumn, moveTableRows, fillTableCell, type TableChrome, type TableMenu, type TableMenuRow, type TableMenuItem, type TableGripPayload, type TableAddPayload, tableBlock, type TableBlockOptions, createEquationPlugin, KATEX_CDN, KATEX_VERSION, type EquationPluginOptions, type EquationData, type EquationEditor, type EquationErrorPayload, type EquationPlaceholderPayload, type EquationTarget, type KatexLike, type KatexLoader } from './plugins/index.js';
46
46
  export { BLOCK_COLORS, setBlockColor, type BlockColorField } from './block/colors.js';
47
47
  export { englishLabels, type Labels, type PartialLabels } from './labels.js';
48
48
  export { EdytorDocument, createDocument, loadDocument, attachDocument, defaultSemantics, semanticsOf, mergeSemantics, SemanticConflictError, DocumentNotReadyError, DocumentDestroyedError, SchemaMismatchError, UndecodableUpdateError, SyncRefusedError, type CreateDocumentOptions, type LoadDocumentOptions, type DocumentActor, type DocumentReadiness, type KindSemantics, type JSONDoc, type JSONBlock, type JSONText, type JSONInlineBlock, type OpResult, type Plan, type Prepared, type DocChange } from './crdt/index.js';
@@ -51,7 +51,9 @@ export { createCommentsClient, createMemoryCommentsClient, CommentRequestError,
51
51
  export { VersionHistory, createHistoryClient, HistoryRequestError, versionDiff, type HistoryClient, type HistoryClientOptions, type HistoryRestoreResult, type HistoryUndoResult, type HistoryVersion, type VersionHistoryStatus, type VersionHistoryOptions, type VersionChange, type VersionDiff } from './collaboration/history/index.js';
52
52
  export type { EdytorProps } from './components/Edytor.svelte';
53
53
  export type { EdytorOptions } from './edytor.svelte.js';
54
- export type { BlockMenuLabels, CodeLabels, ColumnsLabels, CommentsLabels, EditorLabels, EquationLabels, ImageLabels, MediaLabels, PageLabels, PageLinkLabels, RichTextLabels, TableLabels, TocLabels } from './labels.js';
54
+ export type { BlockMenuLabels, CodeLabels, ColumnsLabels, CommentsLabels, EditorLabels, EquationLabels, ImageLabels, MediaLabels, PageLabels, PageLinkLabels, RichTextLabels, SuggestionsLabels, TableLabels, TocLabels } from './labels.js';
55
+ export type { SuggestedChange } from './crdt/doc/suggest.js';
56
+ export type { AnySuggestion, SharedSuggestion } from './session/suggestions.svelte.js';
55
57
  export type { BlockElement, BlockView, InitializedPlugin, InlineBlockView, PluginDefinitions, PluginOperations } from './plugins.js';
56
58
  export type { Dispatcher } from './session/commands.js';
57
59
  export type { PresenceSelection, SelectionPoint, SelectionProjection, SelectionSegment, SelectionValue } from './session/selection.js';
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ export { PreventionError, isPrevention } from './utils.js';
35
35
  export { convertToKind, turnCommands, wrapBlocks, wrappable } from './kinds.js';
36
36
  export { textToBlocks } from './clipboard/textBlocks.js';
37
37
  // ── The bundled plugins ────────────────────────────────────────────────
38
- export { createRichTextPlugin, richTextOperations, richTextPlaceholder, CALLOUT_ICONS, createCalloutIconsPlugin, createArrowMovePlugin, createCodePlugin, CODE_LANGUAGES, loadCodeLanguage, createMarkdownShortcutsPlugin, createMentionPlugin, createPageLinkPlugin, withRulesAndTriggers, BLOCK_ACTIVATE_EVENT, BLOCK_ADD_EVENT, createBlockHandlesPlugin, createSlashMenuPlugin, createToolbarPlugin, createBlockMenuPlugin, createSuggestionsPlugin, createSuggestionBarPlugin, createImagePlugin, safeImageSrc, storableImageSrc, MAX_INLINE_IMAGE_BYTES, createColumnsPlugin, createEmbedPlugin, EMBED_PROVIDERS, EMBED_SANDBOX, EMBED_ALLOW, embedSourceOf, createBookmarkPlugin, createFilePlugin, createVideoPlugin, createAudioPlugin, safeWebUrl, safeMediaSrc, createMediaEmptyPlugin, createImageToolbarPlugin, createFindPlugin, findController, findMatches, createMarqueePlugin, createCommentsPlugin, commentsController, createPagePlugin, createTocPlugin, createTablePlugin, insertTableRow, deleteTableRows, insertTableColumn, deleteTableColumn, moveTableColumn, moveTableRows, fillTableCell, tableBlock, createEquationPlugin, KATEX_CDN, KATEX_VERSION } from './plugins/index.js';
38
+ export { createRichTextPlugin, richTextOperations, richTextPlaceholder, CALLOUT_ICONS, createCalloutIconsPlugin, createArrowMovePlugin, createCodePlugin, CODE_LANGUAGES, loadCodeLanguage, createMarkdownShortcutsPlugin, createMentionPlugin, createPageLinkPlugin, withRulesAndTriggers, BLOCK_ACTIVATE_EVENT, BLOCK_ADD_EVENT, createBlockHandlesPlugin, createSlashMenuPlugin, createToolbarPlugin, createBlockMenuPlugin, createSuggestionsPlugin, createSuggestionBarPlugin, createSharedSuggestionsPlugin, sharedSuggestionsController, createImagePlugin, safeImageSrc, storableImageSrc, MAX_INLINE_IMAGE_BYTES, createColumnsPlugin, createEmbedPlugin, EMBED_PROVIDERS, EMBED_SANDBOX, EMBED_ALLOW, embedSourceOf, createBookmarkPlugin, createFilePlugin, createVideoPlugin, createAudioPlugin, safeWebUrl, safeMediaSrc, createMediaEmptyPlugin, createImageToolbarPlugin, createFindPlugin, findController, findMatches, createMarqueePlugin, createCommentsPlugin, commentsController, createPagePlugin, createTocPlugin, createTablePlugin, insertTableRow, deleteTableRows, insertTableColumn, deleteTableColumn, moveTableColumn, moveTableRows, fillTableCell, tableBlock, createEquationPlugin, KATEX_CDN, KATEX_VERSION } from './plugins/index.js';
39
39
  export { BLOCK_COLORS, setBlockColor } from './block/colors.js';
40
40
  // ── Localization ───────────────────────────────────────────────────────
41
41
  export { englishLabels } from './labels.js';
package/dist/labels.d.ts CHANGED
@@ -27,6 +27,11 @@ export type EditorLabels = {
27
27
  moved: (what: string) => string;
28
28
  deleted: (what: string) => string;
29
29
  };
30
+ /** The shared suggestions plugin's words (`createSharedSuggestionsPlugin`). */
31
+ export type SuggestionsLabels = {
32
+ /** Announced when a change is refused because the view is suggesting (a move, a merge, a retype, a data change, a format). */
33
+ notSuggested: string;
34
+ };
30
35
  /** The rich text kinds and marks: their names, the document's own words, placeholders. */
31
36
  export type RichTextLabels = {
32
37
  /** Each preset's label: the slash menu, Turn into, the handles' names. */
@@ -204,6 +209,7 @@ export type Labels = {
204
209
  comments: CommentsLabels;
205
210
  table: TableLabels;
206
211
  equation: EquationLabels;
212
+ suggestions: SuggestionsLabels;
207
213
  };
208
214
  /** The entries of a section to replace: any of them, and any entry of a nested group. */
209
215
  type Overrides<L> = {
@@ -222,6 +228,8 @@ export type PartialLabels = {
222
228
  };
223
229
  /** The `editor` section in English. */
224
230
  export declare const editorEnglish: EditorLabels;
231
+ /** The `suggestions` section in English. */
232
+ export declare const suggestionsEnglish: SuggestionsLabels;
225
233
  /** The `richText` section in English. */
226
234
  export declare const richTextEnglish: RichTextLabels;
227
235
  /** The `blockMenu` section in English. */
package/dist/labels.js CHANGED
@@ -50,6 +50,10 @@ export const editorEnglish = /* @__PURE__ */ frozen({
50
50
  moved: (what) => `Moved ${what}`,
51
51
  deleted: (what) => `Deleted ${what}`
52
52
  });
53
+ /** The `suggestions` section in English. */
54
+ export const suggestionsEnglish = /* @__PURE__ */ frozen({
55
+ notSuggested: 'Only text and blocks can be suggested'
56
+ });
53
57
  /** The `richText` section in English. */
54
58
  export const richTextEnglish = /* @__PURE__ */ frozen({
55
59
  kinds: {
@@ -184,7 +188,8 @@ export const englishLabels = /* @__PURE__ */ frozen({
184
188
  pageLink: pageLinkEnglish,
185
189
  comments: commentsEnglish,
186
190
  table: tableEnglish,
187
- equation: equationEnglish
191
+ equation: equationEnglish,
192
+ suggestions: suggestionsEnglish
188
193
  });
189
194
  /** Each view's sections, merged once: its `labels` over the English ones. */
190
195
  const merged = new WeakMap();
@@ -80,7 +80,11 @@ export declare class CommentsController {
80
80
  * place itself (the sidebar places its cards in the margin).
81
81
  */
82
82
  readonly anchor: import("../chrome.js").ChromeAnchor;
83
- /** The view may write: it may start, answer, resolve and delete comments. */
83
+ /**
84
+ * The view may start, answer, resolve and delete comments: it may write,
85
+ * or its user may comment without writing (`document.access` `comment`,
86
+ * a readonly view's: the room writes a new thread's anchor).
87
+ */
84
88
  get canComment(): boolean;
85
89
  /** One thread, by id. */
86
90
  thread(id: string): PlacedThread | undefined;
@@ -112,9 +112,14 @@ export class CommentsController {
112
112
  : [];
113
113
  return rect && new DOMRect(rect.left, rect.top, rect.width, rect.height);
114
114
  }, () => this.edytor.node);
115
- /** The view may write: it may start, answer, resolve and delete comments. */
115
+ /**
116
+ * The view may start, answer, resolve and delete comments: it may write,
117
+ * or its user may comment without writing (`document.access` `comment`,
118
+ * a readonly view's: the room writes a new thread's anchor).
119
+ */
116
120
  get canComment() {
117
- return this.edytor.dispatcher.permits();
121
+ const { access } = this.edytor.document;
122
+ return access === 'comment' || access === 'suggest' || this.edytor.dispatcher.permits();
118
123
  }
119
124
  /** One thread, by id. */
120
125
  thread(id) {
@@ -275,18 +280,23 @@ export class CommentsController {
275
280
  const draft = this.draft;
276
281
  if (!draft || !body.trim())
277
282
  return false;
283
+ // A user who may comment but not write sends its anchors: the room writes the mark.
284
+ const { access } = this.edytor.document;
285
+ const commentOnly = access === 'comment' || access === 'suggest';
278
286
  const result = await this.#send({
279
287
  op: 'add',
280
288
  thread: draft.id,
281
289
  body,
282
290
  quote: draft.quote,
283
- block: draft.block
291
+ block: draft.block,
292
+ ...(commentOnly && { anchors: draft.spans })
284
293
  });
285
294
  if (!result)
286
295
  return false;
287
296
  if (this.draft === draft)
288
297
  this.draft = null;
289
- this.#anchor(draft.id, this.draftRuns(draft));
298
+ if (!commentOnly)
299
+ this.#anchor(draft.id, this.draftRuns(draft));
290
300
  this.active = draft.id;
291
301
  this.#refocus();
292
302
  return true;