platejs 54.0.0-beta.6 → 54.0.0-beta.7

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 (238) hide show
  1. package/dist/{AIChatRequestContext-BYpGufVe.d.ts → AIChatRequestContext-DVGOeWhQ.d.ts} +2 -2
  2. package/dist/{BaseSuggestionPlugin-C52LR8RN.d.ts → BaseSuggestionPlugin-BRFMMyEo.d.ts} +8 -7
  3. package/dist/{PlateStatic-DMClx-tH.d.ts → PlateStatic-DIwBAVqF.d.ts} +3 -3
  4. package/dist/ai/index.d.ts +1 -1
  5. package/dist/ai/react/AIChatPlugin.js +12 -6
  6. package/dist/ai/react/CopilotPlugin.js +10 -5
  7. package/dist/ai/react/index.d.ts +94 -82
  8. package/dist/ai/react/useAIChat.js +41 -36
  9. package/dist/authored/index.d.ts +4 -4
  10. package/dist/code-block/codemirror/index.d.ts +1 -1
  11. package/dist/{combobox-DgYdu5mZ.d.ts → combobox-CfCJYKT0.d.ts} +2 -2
  12. package/dist/{comparison-types-DBQFu7Rt-DYc2TC2H.d.ts → comparison-types-CsmDG5r2-z1s4gX06.d.ts} +1 -1
  13. package/dist/compiler/index.d.ts +2 -2
  14. package/dist/{core-CQKT9eNc.d.ts → core-Cqc_KzpG.d.ts} +409 -472
  15. package/dist/core.js +1 -2
  16. package/dist/diff/index.d.ts +2 -2
  17. package/dist/docs/annotations.md +37 -120
  18. package/dist/docs/api/core/plate-components.md +5 -4
  19. package/dist/docs/api/core/plate-plugin.md +1 -1
  20. package/dist/docs/api/core/plate-store.md +5 -5
  21. package/dist/docs/api/core.md +31 -64
  22. package/dist/docs/api/document-change.md +21 -0
  23. package/dist/docs/api/editor-api.md +19 -16
  24. package/dist/docs/api/editor-transforms.md +27 -8
  25. package/dist/docs/api/react-hooks.md +103 -130
  26. package/dist/docs/authored-changes.md +12 -13
  27. package/dist/docs/board.md +45 -35
  28. package/dist/docs/clipboard.md +11 -7
  29. package/dist/docs/decorations.md +3 -4
  30. package/dist/docs/dnd.md +1 -1
  31. package/dist/docs/docx.md +6 -4
  32. package/dist/docs/editor-methods.md +7 -16
  33. package/dist/docs/editor.md +22 -66
  34. package/dist/docs/field.md +120 -54
  35. package/dist/docs/find.md +36 -28
  36. package/dist/docs/footnote.md +14 -8
  37. package/dist/docs/history.md +166 -12
  38. package/dist/docs/ink.md +231 -0
  39. package/dist/docs/installation/plate-ui.md +16 -0
  40. package/dist/docs/llms.txt +5 -5
  41. package/dist/docs/markdown.md +4 -3
  42. package/dist/docs/roots.md +92 -28
  43. package/dist/docs/schema.md +5 -3
  44. package/dist/docs/suggestion.md +27 -14
  45. package/dist/docs/table.md +2 -2
  46. package/dist/docs/toc.md +2 -2
  47. package/dist/docx/export/index.d.ts +3 -3
  48. package/dist/docx/export/lib/comments.js +124 -44
  49. package/dist/docx/export/lib/exportDocx.js +31 -22
  50. package/dist/docx/export/lib/hostIndex.js +92 -0
  51. package/dist/docx/export/lib/reviewProjection.js +154 -55
  52. package/dist/docx/import/index.d.ts +4 -4
  53. package/dist/docx/paste/index.d.ts +4 -4
  54. package/dist/dom/index.d.ts +2 -2
  55. package/dist/dom/plite-dom.internal.js +2 -2
  56. package/dist/excalidraw/index.d.ts +3 -3
  57. package/dist/excalidraw/react/index.d.ts +3 -3
  58. package/dist/facade.js +3 -3
  59. package/dist/features/basic-nodes/lib/BaseHeadingPlugins.js +4 -2
  60. package/dist/features/basic-styles/lib/BaseFormattingPlugin.js +5 -2
  61. package/dist/features/board/index.d.ts +2 -2
  62. package/dist/features/board/index.js +2 -1
  63. package/dist/features/board/lib/BaseBoardPlugin.js +80 -22
  64. package/dist/features/board/lib/BaseBoardTextPlugin.js +12 -0
  65. package/dist/features/board/lib/boardArrow.internal.js +2 -2
  66. package/dist/features/board/lib/boardHeights.internal.js +57 -0
  67. package/dist/features/board/lib/boardHtml.internal.js +18 -1
  68. package/dist/features/board/lib/boardMember.internal.js +2 -2
  69. package/dist/features/board/lib/boardShape.internal.js +6 -1
  70. package/dist/features/board/lib/boardStyle.internal.js +5 -1
  71. package/dist/features/board/lib/boardTypes.internal.js +4 -1
  72. package/dist/features/callout/index.d.ts +3 -3
  73. package/dist/features/combobox/index.d.ts +2 -2
  74. package/dist/features/comments/BaseCommentsPlugin.js +47 -227
  75. package/dist/features/comments/comment-thread-index.internal.js +822 -0
  76. package/dist/features/comments/index.d.ts +2 -2
  77. package/dist/features/date/index.d.ts +3 -3
  78. package/dist/features/details/index.d.ts +3 -3
  79. package/dist/features/field/index.d.ts +2 -2
  80. package/dist/features/field/lib/BaseFieldPlugin.js +148 -51
  81. package/dist/features/field/lib/applyFieldValues.js +45 -26
  82. package/dist/features/field/lib/fieldRules.internal.js +518 -100
  83. package/dist/features/find/index.d.ts +15 -16
  84. package/dist/features/find/lib/BaseFindPlugin.js +871 -123
  85. package/dist/features/footnote/index.d.ts +1 -1
  86. package/dist/features/footnote/lib/BaseFootnotePlugin.js +35 -15
  87. package/dist/features/ink/index.d.ts +2 -2
  88. package/dist/features/ink/lib/BaseInkPlugin.js +411 -50
  89. package/dist/features/ink/lib/inkAnchor.internal.js +436 -0
  90. package/dist/features/ink/lib/inkGone.internal.js +8 -6
  91. package/dist/features/ink/lib/inkMatch.internal.js +262 -51
  92. package/dist/features/ink/lib/inkPlaces.internal.js +67 -26
  93. package/dist/features/ink/lib/inkReflow.internal.js +406 -0
  94. package/dist/features/layout/index.d.ts +1 -1
  95. package/dist/features/lint/index.d.ts +16 -16
  96. package/dist/features/list/lib/BaseListPlugin.js +2 -1
  97. package/dist/features/media/index.d.ts +1 -1
  98. package/dist/features/media/lib/media-embed/BaseMediaEmbedPlugin.js +2 -1
  99. package/dist/features/mention/index.d.ts +5 -5
  100. package/dist/features/suggestion/index.d.ts +1 -1
  101. package/dist/features/table/index.d.ts +1 -1
  102. package/dist/features/table/lib/BaseTablePlugin.js +284 -142
  103. package/dist/features/toc/index.d.ts +1 -1
  104. package/dist/features/upload/index.d.ts +1 -1
  105. package/dist/features/upload/lib/BaseUploadPlugin.js +5 -4
  106. package/dist/history/index.d.ts +3 -3
  107. package/dist/history/index.js +2 -1
  108. package/dist/html/index.d.ts +3 -3
  109. package/dist/html/server/index.d.ts +1 -1
  110. package/dist/{htmlTypes-8IFX0ezP.d.ts → htmlTypes-i_FBCMf2.d.ts} +2 -2
  111. package/dist/hyperscript/index.d.ts +1 -1
  112. package/dist/{index-Cp0QfjUV.d.ts → index-1PlYsibA.d.ts} +11 -12
  113. package/dist/{index-DbPoiwq_.d.ts → index-1rcWTB-o.d.ts} +3 -3
  114. package/dist/{index-C-5w6252.d.ts → index-B4ZhSQdk.d.ts} +41 -41
  115. package/dist/{index-DE1Mcccg.d.ts → index-BI0NS7kx.d.ts} +3 -3
  116. package/dist/{index-BIP1GoWI.d.ts → index-BWCC4DCP.d.ts} +2 -12
  117. package/dist/{index-D2w_9_tb.d.ts → index-Bv13FX9o.d.ts} +32 -32
  118. package/dist/{index-BTFrh2Cz.d.ts → index-By7BkzIN.d.ts} +2 -2
  119. package/dist/{index-B4oeyc99.d.ts → index-CJGkjkH6.d.ts} +1 -1
  120. package/dist/{index-BBsiQIzw.d.ts → index-CLNem74G.d.ts} +25 -8
  121. package/dist/{index-CrUMAwqm.d.ts → index-CS4G_W_R.d.ts} +1 -5
  122. package/dist/{index-PDROnF1G-Ds_dbJsr.d.ts → index-CTTjpWgb-Fdrn8NP4.d.ts} +1 -1
  123. package/dist/{index-BapA_uvI.d.ts → index-CVAHIQ3p.d.ts} +5 -5
  124. package/dist/{index-DUk2VZ_1.d.ts → index-Cc2ajXAd.d.ts} +7 -7
  125. package/dist/{index-BfHCmKG3.d.ts → index-CmISVYmz.d.ts} +127 -79
  126. package/dist/{index-BAz_KJSV.d.ts → index-CrJ9Km8W.d.ts} +2 -2
  127. package/dist/{index-Dh7pWHZo.d.ts → index-CxG1Atvg.d.ts} +298 -38
  128. package/dist/{index-BcuSI8EM.d.ts → index-DNXr_SN-.d.ts} +9 -7
  129. package/dist/{index-BbsVGwn8.d.ts → index-DfkFmApH.d.ts} +303 -387
  130. package/dist/{index-AOVPovEr.d.ts → index-KteL56rA.d.ts} +211 -224
  131. package/dist/{index-DM6z4D7q.d.ts → index-OMa7dlcS.d.ts} +35 -33
  132. package/dist/{index-DFMkcY5V.d.ts → index-uVbqCpDa.d.ts} +149 -130
  133. package/dist/index.d.ts +4 -4
  134. package/dist/index.js +1 -2
  135. package/dist/internal/plugin/compilePlateModel.js +15 -1
  136. package/dist/internal/plugin/plateChangeHandlers.js +1 -1
  137. package/dist/internal/plugin/resolvePlugin.js +10 -1
  138. package/dist/lib/editor/withPlite.js +33 -3
  139. package/dist/lib/plugins/dom/DOMPlugin.js +6 -2
  140. package/dist/lib/plugins/html/HtmlPlugin.js +5 -3
  141. package/dist/lib/plugins/input-rules/createInputRules.js +3 -3
  142. package/dist/lib/utils/getInjectMatch.js +1 -1
  143. package/dist/markdown/index.d.ts +1 -1
  144. package/dist/markdown/lib/deserializer/convertNodesDeserialize.js +2 -2
  145. package/dist/markdown/lib/internal/markdownConversion.js +7 -17
  146. package/dist/math/index.d.ts +3 -3
  147. package/dist/math/react/index.d.ts +4 -4
  148. package/dist/migrations/documentMigrations.js +23 -5
  149. package/dist/migrations/index.d.ts +3 -3
  150. package/dist/migrations/migratePlateV54Ast.internal.js +4 -1
  151. package/dist/migrations/migratePlateV54Profile.internal.js +0 -4
  152. package/dist/pagination/index.d.ts +1 -1
  153. package/dist/pagination/react/PagedEditorContent.js +6 -6
  154. package/dist/pagination/react/index.d.ts +16 -13
  155. package/dist/react/components/NodeSelection.js +129 -50
  156. package/dist/react/components/Plate.js +142 -119
  157. package/dist/react/components/PlateContainer.js +51 -47
  158. package/dist/react/components/PlateContent.js +3 -3
  159. package/dist/react/core.js +3 -4
  160. package/dist/react/editor/getPlateCorePlugins.internal.js +1 -1
  161. package/dist/react/editor/withPlate.js +10 -4
  162. package/dist/react/features/board/BoardPlugin.js +7 -1
  163. package/dist/react/features/board/BoardShape.js +214 -159
  164. package/dist/react/features/board/BoardSurface.js +2 -2
  165. package/dist/react/features/board/boardExport.internal.js +225 -80
  166. package/dist/react/features/board/boardGesture.internal.js +193 -33
  167. package/dist/react/features/board/boardIndex.internal.js +271 -26
  168. package/dist/react/features/board/boardKeys.internal.js +7 -3
  169. package/dist/react/features/board/boardPick.internal.js +3 -2
  170. package/dist/react/features/board/boardPreview.internal.js +56 -8
  171. package/dist/react/features/board/boardResize.internal.js +110 -28
  172. package/dist/react/features/board/boardSnap.internal.js +14 -9
  173. package/dist/react/features/board/boardView.internal.js +440 -24
  174. package/dist/react/features/board/boardVoice.internal.js +1 -0
  175. package/dist/react/features/board/index.d.ts +322 -42
  176. package/dist/react/features/board/index.js +2 -2
  177. package/dist/react/features/callout/index.d.ts +3 -3
  178. package/dist/react/features/combobox/index.d.ts +5 -5
  179. package/dist/react/features/comments/index.d.ts +66 -65
  180. package/dist/react/features/date/index.d.ts +4 -4
  181. package/dist/react/features/details/index.d.ts +5 -5
  182. package/dist/react/features/field/FieldPlugin.js +3 -3
  183. package/dist/react/features/field/index.d.ts +72 -92
  184. package/dist/react/features/footnote/index.d.ts +63 -60
  185. package/dist/react/features/format-painter/index.d.ts +4 -4
  186. package/dist/react/features/ink/InkContent.js +79 -51
  187. package/dist/react/features/ink/InkCopyView.js +13 -2
  188. package/dist/react/features/ink/InkPlugin.js +44 -10
  189. package/dist/react/features/ink/index.d.ts +217 -307
  190. package/dist/react/features/ink/inkCapture.internal.js +3 -1
  191. package/dist/react/features/ink/inkImages.internal.js +263 -0
  192. package/dist/react/features/ink/inkMeasure.internal.js +24 -11
  193. package/dist/react/features/ink/inkPaint.internal.js +31 -23
  194. package/dist/react/features/ink/inkPick.internal.js +45 -20
  195. package/dist/react/features/ink/inkPlacement.internal.js +182 -37
  196. package/dist/react/features/layout/index.d.ts +6 -6
  197. package/dist/react/features/list/ListPlugin.js +10 -6
  198. package/dist/react/features/media/index.d.ts +26 -26
  199. package/dist/react/features/mention/index.d.ts +6 -6
  200. package/dist/react/features/suggestion/index.d.ts +6 -6
  201. package/dist/react/features/suggestion/suggestion-view.internal.js +38 -36
  202. package/dist/react/features/suggestion/useSuggestion.js +17 -14
  203. package/dist/react/features/table/TablePlugin.js +12 -5
  204. package/dist/react/features/table/index.d.ts +20 -22
  205. package/dist/react/features/table/useTableResize.js +4 -4
  206. package/dist/react/features/toc/index.d.ts +2 -2
  207. package/dist/react/features/upload/index.d.ts +44 -44
  208. package/dist/react/index.d.ts +5 -6
  209. package/dist/react/index.js +3 -4
  210. package/dist/react/internal/plate-context.js +13 -42
  211. package/dist/react/internal/plite-components.js +2 -2
  212. package/dist/react/internal/usePlateModelRevision.js +2 -3
  213. package/dist/react/plite-react.js +2 -2
  214. package/dist/react/stores/element/useElementStore.js +78 -52
  215. package/dist/react/stores/plate/useEditor.js +70 -32
  216. package/dist/react/stores/plate/useEditorSelector.js +193 -53
  217. package/dist/react/utils/BlockPlaceholderPlugin.js +10 -4
  218. package/dist/react/virtualized.d.ts +4 -4
  219. package/dist/react/virtualized.js +2 -2
  220. package/dist/root.js +1 -2
  221. package/dist/{source-D5CyclpX.d.ts → source-Dcgqj5Mf.d.ts} +3 -3
  222. package/dist/static/components/PlateStatic.js +13 -2
  223. package/dist/static/index.d.ts +6 -6
  224. package/dist/static/internal/staticDocumentView.js +67 -1
  225. package/dist/static/pluginRenderTextStatic.internal.js +2 -1
  226. package/dist/tabbable/index.d.ts +1 -1
  227. package/dist/tabbable/react/index.d.ts +3 -3
  228. package/dist/testing/index.d.ts +2 -2
  229. package/dist/{index-DHt8nZQ6-NUTahb8N.d.ts → tx-only-1FM45FSj-D40jacZv.d.ts} +6913 -6640
  230. package/dist/yjs/index.d.ts +1 -1
  231. package/dist/yjs/react/index.d.ts +5 -5
  232. package/package.json +2 -6
  233. package/dist/docs/migration/plite-to-plate.md +0 -352
  234. package/dist/features/comments/plite-comments.internal.js +0 -2
  235. package/dist/index-BvQzYVAW-Jvz2iG8B.d.ts +0 -65
  236. package/dist/lib/plugins/element-id/ElementIdPlugin.js +0 -43
  237. package/dist/lib/plugins/element-id/elementIdAdmission.internal.js +0 -34
  238. package/dist/react/libs/jotai.js +0 -3
@@ -1,8 +1,8 @@
1
- import { Ca as NodeKey, Ci as Element, H as Descendant, Ht as EditorJsonValue, bc as SchemaPropertyTypeChangePolicy, es as PropertyEnumDescriptor, fs as PropertyValueOptions, gc as SchemaPropertyLandingPolicy, iu as TxDeclaredMethod, j as ContentSlice, lc as SchemaPropertyCopyPolicy, ls as PropertyValueDescriptor, qs as SchemaElementPropertyDefinition, rs as PropertyNumberDescriptor, ss as PropertyStringDescriptor, ts as PropertyJsonDescriptor, us as PropertyValueKind, vc as SchemaPropertyRole, yc as SchemaPropertySplitPolicy } from "../../../index-DHt8nZQ6-NUTahb8N.js";
2
- import "../../../htmlTypes-8IFX0ezP.js";
3
- import { _ as BasePlugin, ct as BlockInsertOptions, st as BasePluginInput } from "../../../core-CQKT9eNc.js";
4
- import { At as Plugin, tn as EditorElementProps } from "../../../index-BbsVGwn8.js";
5
- import { B as isBoardSize, C as BoardArrowEnd, E as isBoardArrowEnd, F as BoardPlace, G as BoardStyles, H as BOARD_ARROW_STYLES, I as BoardRestackDirection, L as BoardShapeInsertProps, M as BoardShapePlace, N as isBoardFramePlace, P as isBoardShapePlace, R as BoardSize, S as BoardArrowAnchor, T as BoardArrowSide, U as BOARD_STROKE_STYLES, V as isStackingKey, W as BoardStyleProperties, c as BoardStrokePoints, h as BoardGeo, k as BoardMemberEntry, l as isBoardStrokePoints, o as BoardInkPoint, s as BoardStrokePath, w as BoardArrowEnds, x as BoardArrowEndInput } from "../../../index-Dh7pWHZo.js";
1
+ import { Aa as NodeKey, Ac as SchemaPropertyLandingPolicy, Cc as SchemaPropertyCopyPolicy, H as Descendant, M as ContentSlice$1, Mc as SchemaPropertyRole, Nc as SchemaPropertySplitPolicy, Oi as Element, Pc as SchemaPropertyTypeChangePolicy, Wt as EditorJsonValue, _s as PropertyValueKind, as as PropertyBooleanDescriptor, cs as PropertyJsonDescriptor, gs as PropertyValueDescriptor, ms as PropertyStringDescriptor, sc as SchemaElementPropertyDefinition, ss as PropertyEnumDescriptor, us as PropertyNumberDescriptor, vu as TxDeclaredMethod, ys as PropertyValueOptions } from "../../../tx-only-1FM45FSj-D40jacZv.js";
2
+ import "../../../htmlTypes-i_FBCMf2.js";
3
+ import { ct as BasePluginInput, lt as BlockInsertOptions, v as BasePlugin } from "../../../core-Cqc_KzpG.js";
4
+ import { $t as EditorElementProps, kt as Plugin } from "../../../index-DfkFmApH.js";
5
+ import { B as BoardSize, C as BoardArrowEndInput, D as BoardArrowSide, E as BoardArrowEnds, F as isBoardFramePlace, G as BOARD_STROKE_STYLES, H as isBoardSize, I as isBoardShapePlace, K as BoardStyleProperties, L as BoardPlace, O as isBoardArrowEnd, P as BoardShapePlace, R as BoardRestackDirection, T as BoardArrowEnd, U as isStackingKey, W as BOARD_ARROW_STYLES, _ as BoardGeo, c as BoardInkPoint, d as isBoardStrokePoints, j as BoardMemberEntry, l as BoardStrokePath, q as BoardStyles, u as BoardStrokePoints, w as BoardArrowAnchor, z as BoardShapeInsertProps } from "../../../index-CxG1Atvg.js";
6
6
  import * as React from "react";
7
7
  import "rbush";
8
8
  declare const BoardPlugin: Plugin<Readonly<{
@@ -421,6 +421,133 @@ declare const BoardPlugin: Plugin<Readonly<{
421
421
  board: NodeKey;
422
422
  }>) => string | undefined>;
423
423
  };
424
+ }>> & Readonly<Record<never, never>>, BasePlugin<Readonly<{
425
+ readonly __pluginWritableProperties: Readonly<{
426
+ descriptor: PropertyBooleanDescriptor<{
427
+ readonly default: true;
428
+ }>;
429
+ key: "autoSize";
430
+ localId: "autoSize";
431
+ ownerName: "boardText";
432
+ placement: "element";
433
+ unaliased: true;
434
+ value: boolean;
435
+ }> | Readonly<{
436
+ descriptor: PropertyNumberDescriptor<Readonly<{
437
+ default: number;
438
+ }> & Readonly<{
439
+ validate: (value: unknown) => value is number;
440
+ validationVersion: 1;
441
+ }>>;
442
+ key: "opacity";
443
+ localId: "opacity";
444
+ ownerName: "boardText";
445
+ placement: "element";
446
+ unaliased: true;
447
+ value: number;
448
+ }> | Readonly<{
449
+ descriptor: PropertyEnumDescriptor<readonly ["l", "m", "s", "xl"], Readonly<{
450
+ default: "l" | "m" | "s" | "xl";
451
+ }>>;
452
+ key: "textSize";
453
+ localId: "textSize";
454
+ ownerName: "boardText";
455
+ placement: "element";
456
+ unaliased: true;
457
+ value: "l" | "m" | "s" | "xl";
458
+ }>;
459
+ readonly schema: {
460
+ readonly element: {
461
+ readonly blockContent: false;
462
+ readonly content: Readonly<{
463
+ allowed: Readonly<{
464
+ kind: 'types';
465
+ types: readonly string[];
466
+ }>;
467
+ prefix?: readonly Readonly<{
468
+ element: string | Readonly<{
469
+ source: string;
470
+ type: string;
471
+ }>;
472
+ properties?: Readonly<Record<string, EditorJsonValue>>;
473
+ }>[] | undefined;
474
+ } & {
475
+ readonly default: {
476
+ type: string;
477
+ };
478
+ readonly min: 1;
479
+ } & Readonly<{
480
+ '~schema.content.rule'?: Readonly<{
481
+ kind: 'types';
482
+ types: readonly string[];
483
+ }> | undefined;
484
+ }>>;
485
+ readonly object: true;
486
+ readonly properties: {
487
+ readonly autoSize: PropertyBooleanDescriptor<{
488
+ readonly default: true;
489
+ }>;
490
+ } & BoardStyleProperties<{
491
+ readonly opacity: 1;
492
+ readonly textSize: 'm';
493
+ }>;
494
+ };
495
+ };
496
+ readonly targetPlugins: readonly [BasePlugin<Readonly<{
497
+ formats: true;
498
+ rules: true;
499
+ }> & Readonly<{
500
+ name: "paragraph";
501
+ }> & Readonly<Record<never, never>> & Readonly<{
502
+ __pluginWritableProperties: never;
503
+ schema: {
504
+ readonly element: Readonly<{
505
+ content: Readonly<{
506
+ allowed: Readonly<{
507
+ kind: 'any';
508
+ rules: readonly [Readonly<{
509
+ kind: 'text';
510
+ }>, Readonly<{
511
+ group: 'inline';
512
+ kind: 'group';
513
+ }>];
514
+ }>;
515
+ prefix?: readonly Readonly<{
516
+ element: string | Readonly<{
517
+ source: string;
518
+ type: string;
519
+ }>;
520
+ properties?: Readonly<Record<string, EditorJsonValue>>;
521
+ }>[] | undefined;
522
+ } & Readonly<{
523
+ default: 'text';
524
+ min: 1;
525
+ }> & Readonly<{
526
+ '~schema.content.rule'?: Readonly<{
527
+ kind: 'any';
528
+ rules: readonly [Readonly<{
529
+ kind: 'text';
530
+ }>, Readonly<{
531
+ group: 'inline';
532
+ kind: 'group';
533
+ }>];
534
+ }> | undefined;
535
+ }>>;
536
+ }>;
537
+ };
538
+ }>>, "heading"];
539
+ readonly name: "boardText";
540
+ readonly formats: true;
541
+ readonly update: {
542
+ insert: TxDeclaredMethod<(props: BoardShapeInsertProps<{
543
+ readonly autoSize: boolean;
544
+ } & {
545
+ opacity: number;
546
+ textSize: "l" | "m" | "s" | "xl";
547
+ }>, options: Readonly<{
548
+ board: NodeKey;
549
+ }>) => string | undefined>;
550
+ };
424
551
  }>> & Readonly<Record<never, never>>, BasePlugin<Readonly<{
425
552
  readonly __pluginWritableProperties: Readonly<{
426
553
  descriptor: PropertyEnumDescriptor<readonly ["dashed", "dotted", "solid"], Readonly<{
@@ -597,6 +724,18 @@ declare const BoardPlugin: Plugin<Readonly<{
597
724
  }>) => string | undefined>;
598
725
  };
599
726
  }>> & Readonly<Record<never, never>>, BasePlugin<Readonly<{
727
+ readonly update: {
728
+ readonly insert: TxDeclaredMethod<({ children, frame, height, width, x, y }: Readonly<{
729
+ children: readonly [Descendant];
730
+ frame?: string;
731
+ height?: number;
732
+ width?: number;
733
+ x: number;
734
+ y: number;
735
+ }>, { board }: Readonly<{
736
+ board: NodeKey;
737
+ }>) => string | undefined>;
738
+ };
600
739
  readonly __pluginWritableProperties: never;
601
740
  readonly schema: {
602
741
  readonly element: {
@@ -628,18 +767,6 @@ declare const BoardPlugin: Plugin<Readonly<{
628
767
  readonly targetPlugins: readonly ["image", "upload"];
629
768
  readonly name: "boardImage";
630
769
  readonly formats: true;
631
- readonly update: {
632
- readonly insert: TxDeclaredMethod<({ children, frame, height, width, x, y }: Readonly<{
633
- children: readonly [Descendant];
634
- frame?: string;
635
- height?: number;
636
- width?: number;
637
- x: number;
638
- y: number;
639
- }>, { board }: Readonly<{
640
- board: NodeKey;
641
- }>) => string | undefined>;
642
- };
643
770
  }>> & Readonly<Record<never, never>>, BasePlugin<Readonly<{
644
771
  readonly __pluginWritableProperties: Readonly<{
645
772
  descriptor: PropertyEnumDescriptor<readonly ["dashed", "dotted", "solid"], Readonly<{
@@ -1007,13 +1134,13 @@ declare const BoardPlugin: Plugin<Readonly<{
1007
1134
  readonly read: {
1008
1135
  readonly arrowEnds: (id: string) => BoardArrowEnds | null;
1009
1136
  readonly shape: (id: string) => BoardMemberEntry | null;
1010
- readonly slice: (ids: readonly string[]) => ContentSlice | null;
1137
+ readonly slice: (ids: readonly string[]) => ContentSlice$1 | null;
1011
1138
  readonly shapes: (board: NodeKey) => BoardMemberEntry[];
1012
1139
  readonly strokePath: (id: string) => BoardStrokePath | null;
1013
1140
  };
1014
1141
  readonly readMiddleware: true;
1015
1142
  readonly update: {
1016
- readonly insertCopy: TxDeclaredMethod<(slice: ContentSlice, { board, place }: Readonly<{
1143
+ readonly insertCopy: TxDeclaredMethod<(slice: ContentSlice$1, { board, place }: Readonly<{
1017
1144
  board: NodeKey;
1018
1145
  place?: BoardPlace;
1019
1146
  }>) => string[] | undefined>;
@@ -1690,12 +1817,44 @@ declare const BoardStrokePlugin: Plugin<Readonly<{}> & Readonly<{
1690
1817
  };
1691
1818
  }>>;
1692
1819
  /**
1693
- * A picture on a board, holding at most one image element or upload draft. The
1694
- * board keeps it selected as an object, since it holds no text a caret can
1695
- * enter.
1820
+ * Free text on a board, growing with its content while `autoSize` is true
1821
+ * until resized.
1696
1822
  */
1697
- declare const BoardImagePlugin: Plugin<Readonly<{
1698
- readonly __pluginWritableProperties: never;
1823
+ declare const BoardTextPlugin: Plugin<Readonly<{
1824
+ readonly __pluginWritableProperties: Readonly<{
1825
+ descriptor: PropertyBooleanDescriptor<{
1826
+ readonly default: true;
1827
+ }>;
1828
+ key: "autoSize";
1829
+ localId: "autoSize";
1830
+ ownerName: "boardText";
1831
+ placement: "element";
1832
+ unaliased: true;
1833
+ value: boolean;
1834
+ }> | Readonly<{
1835
+ descriptor: PropertyNumberDescriptor<Readonly<{
1836
+ default: number;
1837
+ }> & Readonly<{
1838
+ validate: (value: unknown) => value is number;
1839
+ validationVersion: 1;
1840
+ }>>;
1841
+ key: "opacity";
1842
+ localId: "opacity";
1843
+ ownerName: "boardText";
1844
+ placement: "element";
1845
+ unaliased: true;
1846
+ value: number;
1847
+ }> | Readonly<{
1848
+ descriptor: PropertyEnumDescriptor<readonly ["l", "m", "s", "xl"], Readonly<{
1849
+ default: "l" | "m" | "s" | "xl";
1850
+ }>>;
1851
+ key: "textSize";
1852
+ localId: "textSize";
1853
+ ownerName: "boardText";
1854
+ placement: "element";
1855
+ unaliased: true;
1856
+ value: "l" | "m" | "s" | "xl";
1857
+ }>;
1699
1858
  readonly schema: {
1700
1859
  readonly element: {
1701
1860
  readonly blockContent: false;
@@ -1712,8 +1871,10 @@ declare const BoardImagePlugin: Plugin<Readonly<{
1712
1871
  properties?: Readonly<Record<string, EditorJsonValue>>;
1713
1872
  }>[] | undefined;
1714
1873
  } & {
1715
- readonly max: 1;
1716
- readonly min: 0;
1874
+ readonly default: {
1875
+ type: string;
1876
+ };
1877
+ readonly min: 1;
1717
1878
  } & Readonly<{
1718
1879
  '~schema.content.rule'?: Readonly<{
1719
1880
  kind: 'types';
@@ -1721,11 +1882,78 @@ declare const BoardImagePlugin: Plugin<Readonly<{
1721
1882
  }> | undefined;
1722
1883
  }>>;
1723
1884
  readonly object: true;
1885
+ readonly properties: {
1886
+ readonly autoSize: PropertyBooleanDescriptor<{
1887
+ readonly default: true;
1888
+ }>;
1889
+ } & BoardStyleProperties<{
1890
+ readonly opacity: 1;
1891
+ readonly textSize: 'm';
1892
+ }>;
1724
1893
  };
1725
1894
  };
1726
- readonly targetPlugins: readonly ["image", "upload"];
1727
- readonly name: "boardImage";
1895
+ readonly targetPlugins: readonly [BasePlugin<Readonly<{
1896
+ formats: true;
1897
+ rules: true;
1898
+ }> & Readonly<{
1899
+ name: "paragraph";
1900
+ }> & Readonly<Record<never, never>> & Readonly<{
1901
+ __pluginWritableProperties: never;
1902
+ schema: {
1903
+ readonly element: Readonly<{
1904
+ content: Readonly<{
1905
+ allowed: Readonly<{
1906
+ kind: 'any';
1907
+ rules: readonly [Readonly<{
1908
+ kind: 'text';
1909
+ }>, Readonly<{
1910
+ group: 'inline';
1911
+ kind: 'group';
1912
+ }>];
1913
+ }>;
1914
+ prefix?: readonly Readonly<{
1915
+ element: string | Readonly<{
1916
+ source: string;
1917
+ type: string;
1918
+ }>;
1919
+ properties?: Readonly<Record<string, EditorJsonValue>>;
1920
+ }>[] | undefined;
1921
+ } & Readonly<{
1922
+ default: 'text';
1923
+ min: 1;
1924
+ }> & Readonly<{
1925
+ '~schema.content.rule'?: Readonly<{
1926
+ kind: 'any';
1927
+ rules: readonly [Readonly<{
1928
+ kind: 'text';
1929
+ }>, Readonly<{
1930
+ group: 'inline';
1931
+ kind: 'group';
1932
+ }>];
1933
+ }> | undefined;
1934
+ }>>;
1935
+ }>;
1936
+ };
1937
+ }>>, "heading"];
1938
+ readonly name: "boardText";
1728
1939
  readonly formats: true;
1940
+ readonly update: {
1941
+ insert: TxDeclaredMethod<(props: BoardShapeInsertProps<{
1942
+ readonly autoSize: boolean;
1943
+ } & {
1944
+ opacity: number;
1945
+ textSize: "l" | "m" | "s" | "xl";
1946
+ }>, options: Readonly<{
1947
+ board: NodeKey;
1948
+ }>) => string | undefined>;
1949
+ };
1950
+ }>>;
1951
+ /**
1952
+ * A picture on a board, holding at most one image element or upload draft. The
1953
+ * board keeps it selected as an object, since it holds no text a caret can
1954
+ * enter.
1955
+ */
1956
+ declare const BoardImagePlugin: Plugin<Readonly<{
1729
1957
  readonly update: {
1730
1958
  readonly insert: TxDeclaredMethod<({ children, frame, height, width, x, y }: Readonly<{
1731
1959
  children: readonly [Descendant];
@@ -1738,6 +1966,37 @@ declare const BoardImagePlugin: Plugin<Readonly<{
1738
1966
  board: NodeKey;
1739
1967
  }>) => string | undefined>;
1740
1968
  };
1969
+ readonly __pluginWritableProperties: never;
1970
+ readonly schema: {
1971
+ readonly element: {
1972
+ readonly blockContent: false;
1973
+ readonly content: Readonly<{
1974
+ allowed: Readonly<{
1975
+ kind: 'types';
1976
+ types: readonly string[];
1977
+ }>;
1978
+ prefix?: readonly Readonly<{
1979
+ element: string | Readonly<{
1980
+ source: string;
1981
+ type: string;
1982
+ }>;
1983
+ properties?: Readonly<Record<string, EditorJsonValue>>;
1984
+ }>[] | undefined;
1985
+ } & {
1986
+ readonly max: 1;
1987
+ readonly min: 0;
1988
+ } & Readonly<{
1989
+ '~schema.content.rule'?: Readonly<{
1990
+ kind: 'types';
1991
+ types: readonly string[];
1992
+ }> | undefined;
1993
+ }>>;
1994
+ readonly object: true;
1995
+ };
1996
+ };
1997
+ readonly targetPlugins: readonly ["image", "upload"];
1998
+ readonly name: "boardImage";
1999
+ readonly formats: true;
1741
2000
  }>>;
1742
2001
  /**
1743
2002
  * One member of a board, painted at its stacking rank while the DOM keeps the
@@ -1751,9 +2010,26 @@ declare const BoardImagePlugin: Plugin<Readonly<{
1751
2010
  * such as its name, and a stroke only on its line, which its component draws
1752
2011
  * from `useStrokePath`. A selected member shows `data-selected`, one the
1753
2012
  * eraser will remove on release shows `data-erasing`, and the one under the
1754
- * picking cursor that Space starts shows `data-board-cursor`.
2013
+ * picking cursor that Space starts shows `data-board-cursor`. Those marks,
2014
+ * `className` and `style` go on the member's root, which fills a `div` that
2015
+ * carries the member's box, paint rank and drag `translate` (read inline
2016
+ * `left`, `top`, `width`, `height`, `z-index`, `translate`, `offsetLeft` and
2017
+ * `offsetTop` on `root.parentElement`). A note's root grows down past its
2018
+ * stored height when its text needs the room, and a free-text shape's root
2019
+ * grows in both width and height while `autoSize` is true (or down past its
2020
+ * stored height once resized), without changing stored size. A private
2021
+ * `@layer board-shapes` style rule makes the wrapper take no press and
2022
+ * restores `pointer-events: auto` on the root so host CSS layers and classes
2023
+ * still override `pointer-events`; to disable pointer input on an ancestor of
2024
+ * a board, set `inert`. The root's `position` is `relative`, so its absolute
2025
+ * children place against it, and `style` cannot change its `all`,
2026
+ * `boxSizing`, `height`, `inset`, `margin`, `position`, `width`, their sides
2027
+ * or logical forms, its grid placement and self-alignment properties,
2028
+ * `minHeight`, `minBlockSize`, `maxHeight` and `maxBlockSize` on a note or
2029
+ * free-text shape, or `minWidth`, `minInlineSize`, `maxWidth` and
2030
+ * `maxInlineSize` on auto-sized free text.
1755
2031
  */
1756
- declare function BoardShape({ className, style, ...props }: EditorElementProps<typeof BoardArrowPlugin | typeof BoardFramePlugin | typeof BoardGeoPlugin | typeof BoardImagePlugin | typeof BoardNotePlugin | typeof BoardStrokePlugin> & {
2032
+ declare function BoardShape({ className, ref, style, ...props }: EditorElementProps<typeof BoardArrowPlugin | typeof BoardFramePlugin | typeof BoardGeoPlugin | typeof BoardImagePlugin | typeof BoardNotePlugin | typeof BoardStrokePlugin | typeof BoardTextPlugin> & {
1757
2033
  className?: string;
1758
2034
  style?: React.CSSProperties;
1759
2035
  }): React.JSX.Element;
@@ -1808,7 +2084,7 @@ type BoardShapeDescription = Readonly<{
1808
2084
  end: BoardShapeDescription | null;
1809
2085
  }>;
1810
2086
  }> | Readonly<{
1811
- kind: 'frame' | 'geo' | 'note' | 'shape' | 'stroke';
2087
+ kind: 'frame' | 'geo' | 'note' | 'shape' | 'stroke' | 'text';
1812
2088
  text: string;
1813
2089
  }>;
1814
2090
  /**
@@ -1993,15 +2269,19 @@ type BoardCamera = Readonly<{
1993
2269
  * dot at a click, and stays the tool after it draws. `eraser` marks every note,
1994
2270
  * shape, arrow and pen line a click or drag passes over, but never a frame, and
1995
2271
  * removes them as one undo step on release, and stays the tool. A marked shape
1996
- * shows `data-erasing`. `frame`, `geo` and `note` draw a frame, a shape of the
1997
- * next style's geo kind or a note over a drag, or add one of the tool's
1998
- * default size centered at a click, over empty board or over other shapes.
1999
- * During the drag Shift keeps the sides equal and Alt centers the box on the
2000
- * press point. `select` acts on an empty part of the board, which includes the
2001
- * inside of a frame: it selects the shapes a mouse or pen drag's box holds
2272
+ * shows `data-erasing`. `frame`, `geo`, `note` and `text` draw a frame, a
2273
+ * shape of the next style's geo kind, a note or free text over a drag, or add
2274
+ * one of the tool's default size at a click, over empty board or over other
2275
+ * shapes. Clicking with `text` adds auto-sized free text and begins editing
2276
+ * it, while dragging with `text` adds fixed-width free text and begins editing
2277
+ * it. During the drag Shift keeps the sides equal and Alt centers the box on
2278
+ * the press point. `select` acts on an empty part of the board, which includes
2279
+ * the inside of a frame: it selects the shapes a mouse or pen drag's box holds
2002
2280
  * wholly, adding them to the selection with Shift, and pans on a touch drag.
2281
+ * Double-clicking empty board with `select` adds auto-sized free text at that
2282
+ * point and begins editing it.
2003
2283
  */
2004
- type BoardTool = 'arrow' | 'eraser' | 'frame' | 'geo' | 'hand' | 'note' | 'pen' | 'select';
2284
+ type BoardTool = 'arrow' | 'eraser' | 'frame' | 'geo' | 'hand' | 'note' | 'pen' | 'select' | 'text';
2005
2285
  /**
2006
2286
  * Board styles by name, as a pick sets them or as the next shape a board view
2007
2287
  * adds gets them. A shape takes the styles its kind stores, and `geo`, the
@@ -2049,9 +2329,9 @@ type BoardViewState = Readonly<{
2049
2329
  takesPictureFiles: boolean;
2050
2330
  tool: BoardTool;
2051
2331
  /**
2052
- * Whether the note, shape, frame and arrow tools stay picked after they add
2053
- * a shape. Off when the view mounts, kept per view and never stored. The
2054
- * pen and eraser stay picked either way.
2332
+ * Whether the note, text, shape, frame and arrow tools stay picked after
2333
+ * they add a shape. Off when the view mounts, kept per view and never
2334
+ * stored. The pen and eraser stay picked either way.
2055
2335
  */
2056
2336
  toolLocked: boolean;
2057
2337
  /** Whether the view can write: false when it is read-only or a preview. */
@@ -2193,4 +2473,4 @@ declare function BoardSurface({ height, messages, toolbar, ...props }: EditorEle
2193
2473
  declare const useBoardView: <T>(selector: (view: BoardViewState) => T) => T;
2194
2474
  /** Change the surrounding board view's tool, next style and camera. */
2195
2475
  declare const useBoardActions: () => BoardViewActions;
2196
- export { BoardArrowLabel, BoardArrowPath, BoardArrowPlugin, BoardArrowhead, type BoardCamera, type BoardCorner, BoardFramePlugin, BoardGeoPlugin, BoardImagePlugin, type BoardMessages, BoardNotePlugin, type BoardPickState, type BoardPicture, type BoardPictureOptions, type BoardPictureWarning, BoardPlugin, BoardShape, type BoardShapeDescription, BoardStrokePlugin, type BoardStyle, BoardSurface, type BoardTool, type BoardViewActions, type BoardViewState, useBoardActions, useBoardView, useStrokePath };
2476
+ export { BoardArrowLabel, BoardArrowPath, BoardArrowPlugin, BoardArrowhead, type BoardCamera, type BoardCorner, BoardFramePlugin, BoardGeoPlugin, BoardImagePlugin, type BoardMessages, BoardNotePlugin, type BoardPickState, type BoardPicture, type BoardPictureOptions, type BoardPictureWarning, BoardPlugin, BoardShape, type BoardShapeDescription, BoardStrokePlugin, type BoardStyle, BoardSurface, BoardTextPlugin, type BoardTool, type BoardViewActions, type BoardViewState, useBoardActions, useBoardView, useStrokePath };
@@ -1,4 +1,4 @@
1
- import { BoardArrowPlugin, BoardFramePlugin, BoardGeoPlugin, BoardImagePlugin, BoardNotePlugin, BoardPlugin, BoardStrokePlugin } from "./BoardPlugin.js";
1
+ import { BoardArrowPlugin, BoardFramePlugin, BoardGeoPlugin, BoardImagePlugin, BoardNotePlugin, BoardPlugin, BoardStrokePlugin, BoardTextPlugin } from "./BoardPlugin.js";
2
2
  import { BoardSurface, useBoardActions, useBoardView } from "./BoardSurface.js";
3
3
  import { BoardArrowLabel, BoardArrowPath, BoardArrowhead, BoardShape, useStrokePath } from "./BoardShape.js";
4
- export { BoardArrowLabel, BoardArrowPath, BoardArrowPlugin, BoardArrowhead, BoardFramePlugin, BoardGeoPlugin, BoardImagePlugin, BoardNotePlugin, BoardPlugin, BoardShape, BoardStrokePlugin, BoardSurface, useBoardActions, useBoardView, useStrokePath };
4
+ export { BoardArrowLabel, BoardArrowPath, BoardArrowPlugin, BoardArrowhead, BoardFramePlugin, BoardGeoPlugin, BoardImagePlugin, BoardNotePlugin, BoardPlugin, BoardShape, BoardStrokePlugin, BoardSurface, BoardTextPlugin, useBoardActions, useBoardView, useStrokePath };
@@ -1,6 +1,6 @@
1
- import { Ht as EditorJsonValue, fs as PropertyValueOptions, ss as PropertyStringDescriptor } from "../../../index-DHt8nZQ6-NUTahb8N.js";
2
- import "../../../htmlTypes-8IFX0ezP.js";
3
- import { At as Plugin } from "../../../index-BbsVGwn8.js";
1
+ import { Wt as EditorJsonValue, ms as PropertyStringDescriptor, ys as PropertyValueOptions } from "../../../tx-only-1FM45FSj-D40jacZv.js";
2
+ import "../../../htmlTypes-i_FBCMf2.js";
3
+ import { kt as Plugin } from "../../../index-DfkFmApH.js";
4
4
  declare const CalloutPlugin: Plugin<Readonly<{
5
5
  formats: true;
6
6
  rules: true;
@@ -1,8 +1,8 @@
1
- import { ps as Range } from "../../../index-DHt8nZQ6-NUTahb8N.js";
2
- import "../../../htmlTypes-8IFX0ezP.js";
3
- import { Co as PluginReference, Ct as PluginTransaction, qa as DefinitionOf, so as InferPluginStoreState } from "../../../core-CQKT9eNc.js";
4
- import "../../../index-BbsVGwn8.js";
5
- import { n as ComboboxState } from "../../../combobox-DgYdu5mZ.js";
1
+ import { bs as Range } from "../../../tx-only-1FM45FSj-D40jacZv.js";
2
+ import "../../../htmlTypes-i_FBCMf2.js";
3
+ import { Ba as DefinitionOf, eo as InferPluginStoreState, go as PluginReference, wt as PluginTransaction } from "../../../core-Cqc_KzpG.js";
4
+ import "../../../index-DfkFmApH.js";
5
+ import { n as ComboboxState } from "../../../combobox-CfCJYKT0.js";
6
6
  import React$1 from "react";
7
7
  /** The open query an autocomplete popup offers options for. */
8
8
  type ComboboxMatch = Readonly<{