platejs 54.0.0-beta.13 → 54.0.0-beta.14

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 (221) hide show
  1. package/dist/{EditorStatic-CKG5xM3y.d.ts → EditorStatic-eXOA489B.d.ts} +4 -4
  2. package/dist/ai/index.d.ts +2 -2
  3. package/dist/ai/lib/aiDraftSession.js +9 -7
  4. package/dist/ai/lib/aiPolicy.internal.js +43 -6
  5. package/dist/ai/lib/editorAgent.js +30 -21
  6. package/dist/ai/lib/editorAgentSync.internal.js +2 -2
  7. package/dist/ai/lib/lockedContext.js +5 -4
  8. package/dist/ai/react/copilotInline.internal.js +6 -5
  9. package/dist/ai/react/index.d.ts +7 -7
  10. package/dist/ai/react/useEditorAgent.js +14 -3
  11. package/dist/authored/index.d.ts +4 -4
  12. package/dist/{authored-CJL7S8qI-BxC9ip4d.d.ts → authored-qetvpvU--DSWESzxK.d.ts} +3 -3
  13. package/dist/clipboard-format-key-BBu85J9m-BLhtd159.d.ts +1 -0
  14. package/dist/code-block/codemirror/index.d.ts +2 -2
  15. package/dist/{comment-anchor.internal-DTBP1huU.d.ts → comment-anchor.internal-CoNK9gTD.d.ts} +2 -2
  16. package/dist/compiler/index.d.ts +3 -3
  17. package/dist/{core-CTB0OBoh.d.ts → core-By92GWYW.d.ts} +45 -20
  18. package/dist/diff/index.d.ts +2 -2
  19. package/dist/docs/agents/skills.md +6 -2
  20. package/dist/docs/agents.md +1 -1
  21. package/dist/docs/ai-agents.md +8 -4
  22. package/dist/docs/ai.md +5 -0
  23. package/dist/docs/api/plate.md +15 -7
  24. package/dist/docs/api/react-hooks.md +32 -2
  25. package/dist/docs/authored-changes.md +4 -0
  26. package/dist/docs/block-menu.md +4 -0
  27. package/dist/docs/board.md +4 -0
  28. package/dist/docs/callout.md +63 -9
  29. package/dist/docs/collaboration.md +6 -1
  30. package/dist/docs/combobox.md +9 -2
  31. package/dist/docs/comment.md +4 -0
  32. package/dist/docs/components/toolbar-buttons.md +1 -1
  33. package/dist/docs/copilot.md +4 -0
  34. package/dist/docs/deck.md +173 -0
  35. package/dist/docs/details.md +4 -0
  36. package/dist/docs/diff.md +4 -0
  37. package/dist/docs/discussion.md +4 -0
  38. package/dist/docs/dnd.md +4 -0
  39. package/dist/docs/docx.md +6 -0
  40. package/dist/docs/emoji.md +2 -2
  41. package/dist/docs/equation.md +4 -0
  42. package/dist/docs/examples/collaboration-example.md +4 -0
  43. package/dist/docs/examples/export.md +40 -28
  44. package/dist/docs/examples/merge.md +4 -0
  45. package/dist/docs/examples/version-history.md +4 -0
  46. package/dist/docs/field.md +4 -0
  47. package/dist/docs/footnote.md +4 -0
  48. package/dist/docs/format-painter.md +1 -1
  49. package/dist/docs/html.md +4 -0
  50. package/dist/docs/index.md +4 -0
  51. package/dist/docs/ink.md +6 -0
  52. package/dist/docs/installation/manual.md +2 -4
  53. package/dist/docs/installation/next.md +1 -3
  54. package/dist/docs/installation/plate-ui.md +6 -2
  55. package/dist/docs/installation/rsc.md +1 -1
  56. package/dist/docs/installation.md +4 -0
  57. package/dist/docs/link.md +4 -0
  58. package/dist/docs/llms.txt +3 -1
  59. package/dist/docs/lock.md +34 -2
  60. package/dist/docs/markdown.md +4 -0
  61. package/dist/docs/media.md +4 -0
  62. package/dist/docs/mention.md +5 -0
  63. package/dist/docs/pagination.md +4 -0
  64. package/dist/docs/prompt-editor.md +17 -1
  65. package/dist/docs/reference.md +192 -0
  66. package/dist/docs/roots.md +4 -0
  67. package/dist/docs/serializing.md +23 -0
  68. package/dist/docs/slash-command.md +58 -4
  69. package/dist/docs/static.md +29 -20
  70. package/dist/docs/suggestion.md +4 -0
  71. package/dist/docs/sync.md +4 -0
  72. package/dist/docs/table.md +31 -0
  73. package/dist/docs/toolbar.md +4 -0
  74. package/dist/docs/unit-testing.md +4 -0
  75. package/dist/docs/upload.md +4 -0
  76. package/dist/docx/export/index.d.ts +5 -5
  77. package/dist/docx/import/index.d.ts +5 -5
  78. package/dist/docx/paste/index.d.ts +4 -4
  79. package/dist/dom/index.d.ts +1 -1
  80. package/dist/features/basic-nodes/lib/BaseMarkPlugins.js +1 -1
  81. package/dist/features/basic-styles/lib/BaseFormattingPlugin.js +61 -28
  82. package/dist/features/basic-styles/lib/BaseStylePlugins.js +28 -7
  83. package/dist/features/board/index.d.ts +1 -1
  84. package/dist/features/callout/index.d.ts +2 -160
  85. package/dist/features/callout/lib/BaseCalloutPlugin.js +109 -9
  86. package/dist/features/column/index.d.ts +1 -1
  87. package/dist/features/comments/index.d.ts +2 -2
  88. package/dist/features/date/index.d.ts +3 -3
  89. package/dist/features/details/index.d.ts +3 -3
  90. package/dist/features/field/index.d.ts +1 -1
  91. package/dist/features/field/lib/BaseFieldPlugin.js +111 -53
  92. package/dist/features/field/lib/fieldCache.internal.js +9 -21
  93. package/dist/features/find/index.d.ts +3 -3
  94. package/dist/features/footnote/index.d.ts +3 -3
  95. package/dist/features/ink/index.d.ts +1 -1
  96. package/dist/features/link/lib/BaseLinkPlugin.js +5 -2
  97. package/dist/features/lint/index.d.ts +3 -3
  98. package/dist/features/list/lib/listKeyboard.internal.js +7 -2
  99. package/dist/features/lock/index.d.ts +1 -1
  100. package/dist/features/media/index.d.ts +1 -1
  101. package/dist/features/mention/index.d.ts +1 -1
  102. package/dist/features/reference/index.d.ts +236 -0
  103. package/dist/features/reference/index.js +2 -0
  104. package/dist/features/reference/lib/BaseReferencePlugin.js +589 -0
  105. package/dist/features/table/index.d.ts +2 -2
  106. package/dist/features/toc/index.d.ts +1 -1
  107. package/dist/features/upload/index.d.ts +1 -1
  108. package/dist/history/index.d.ts +1 -1
  109. package/dist/html/index.d.ts +4 -4
  110. package/dist/html/server/index.d.ts +2 -2
  111. package/dist/html/server/serverCssParser.internal.js +14 -25
  112. package/dist/html/server/serverCssStyle.internal.js +4 -7
  113. package/dist/{htmlConversion-Y-M6PLRi.d.ts → htmlConversion-CRnxMGw-.d.ts} +2 -2
  114. package/dist/{htmlTypes-CNhoCFjK.d.ts → htmlTypes-3laowz-3.d.ts} +3 -3
  115. package/dist/hyperscript/index.d.ts +1 -1
  116. package/dist/{index-B-8L9f6a2.d.ts → index-B3VOCxNR.d.ts} +5 -5
  117. package/dist/{index-B8JeECEk.d.ts → index-B9UlNijk.d.ts} +2 -2
  118. package/dist/{index-Bqva6PJc.d.ts → index-BJPT0Tv_.d.ts} +3 -3
  119. package/dist/{index-CWutqVQ_-BO-UgVeK.d.ts → index-BKPWmnLg-Bp_vItjr.d.ts} +1 -1
  120. package/dist/{index-BFWK852j.d.ts → index-BcD2RAB9.d.ts} +3 -3
  121. package/dist/{index-DhsryaAC.d.ts → index-C5Xw3JDc.d.ts} +1 -1
  122. package/dist/{index-BEXBAmJf.d.ts → index-CAshLTjV.d.ts} +3 -3
  123. package/dist/{index-qqrnWAk_.d.ts → index-CHlITvuq.d.ts} +7 -7
  124. package/dist/index-CKSwab_O.d.ts +1 -0
  125. package/dist/{index-DJhwDkfd.d.ts → index-CRQoHk18.d.ts} +3 -3
  126. package/dist/index-CyY3O6c7.d.ts +3 -0
  127. package/dist/index-D8EGVCeT.d.ts +305 -0
  128. package/dist/{index-B0R9sXv2-T1dxG9oM.d.ts → index-DAKucat0--VOaL_NN.d.ts} +4 -4
  129. package/dist/{index-UYpvOBXG.d.ts → index-DCTRNYwy.d.ts} +2 -2
  130. package/dist/{index-CXd5hwaH.d.ts → index-DQpHoxDX.d.ts} +1 -1
  131. package/dist/{index-BfJKfAwk.d.ts → index-DTd1D-BF.d.ts} +3 -3
  132. package/dist/index-DUhUT9bV.d.ts +1 -0
  133. package/dist/{index-B4aToRMv.d.ts → index-DXm_v0Qq.d.ts} +3 -3
  134. package/dist/{index-D3bhjdRz.d.ts → index-Djwcl0Ff.d.ts} +3 -3
  135. package/dist/{index-DYuqsDrP.d.ts → index-Dyw6BJx8.d.ts} +3 -3
  136. package/dist/{index-CLPMcGC5.d.ts → index-KG95XVaC.d.ts} +4 -4
  137. package/dist/{index-mcBtG6pK-CitQV9Bq.d.ts → index-LEcSTRgn-BR_p4GVY.d.ts} +2 -2
  138. package/dist/{index-D54VPeky.d.ts → index-k-wvVxKl.d.ts} +2 -2
  139. package/dist/{index-CHud6Aa-.d.ts → index-s34W6hUI.d.ts} +3 -3
  140. package/dist/{index-DXCdafUk.d.ts → index-wEkvA-wI.d.ts} +43 -20
  141. package/dist/index.d.ts +3 -3
  142. package/dist/internal/plugin/pluginInjectNodeProps.js +33 -5
  143. package/dist/internal/utils/urlPolicy.js +11 -1
  144. package/dist/lib/editor/withPlite.js +8 -6
  145. package/dist/lib/plugins/html/cssLexer.internal.js +126 -29
  146. package/dist/lib/plugins/html/cssSafety.internal.js +100 -0
  147. package/dist/lib/plugins/html/htmlDecode.internal.js +2 -2
  148. package/dist/lib/plugins/html/htmlMatcher.internal.js +1 -1
  149. package/dist/lib/plugins/html/htmlRules.internal.js +2 -13
  150. package/dist/lib/plugins/html/htmlSafety.js +17 -24
  151. package/dist/lib/plugins/html/htmlSerialize.internal.js +16 -2
  152. package/dist/lib/plugins/html/htmlStyleInline.internal.js +22 -23
  153. package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +27 -1
  154. package/dist/markdown/index.d.ts +1 -1
  155. package/dist/markdown/lib/internal/markdownAttributes.js +16 -7
  156. package/dist/markdown/lib/internal/markdownMappings.js +123 -16
  157. package/dist/markdown/lib/serializer/convertPhrasingSerialize.js +16 -1
  158. package/dist/math/index.d.ts +3 -3
  159. package/dist/math/react/index.d.ts +4 -4
  160. package/dist/migrations/index.d.ts +4 -4
  161. package/dist/migrations/migratePlateV54Urls.internal.js +63 -1
  162. package/dist/pagination/index.d.ts +1 -1
  163. package/dist/pagination/react/index.d.ts +3 -3
  164. package/dist/{protocol-CSuP7AWG-DAorqpaF.d.ts → protocol-Cp9xayOe-0OSfTMnt.d.ts} +1 -1
  165. package/dist/react/authored/index.d.ts +4 -4
  166. package/dist/react/components/PlateView.js +7 -1
  167. package/dist/react/features/board/index.d.ts +5 -5
  168. package/dist/react/features/callout/index.d.ts +93 -4
  169. package/dist/react/features/column/index.d.ts +5 -5
  170. package/dist/react/features/combobox/combobox.internal.js +35 -22
  171. package/dist/react/features/combobox/comboboxOwner.internal.js +29 -2
  172. package/dist/react/features/combobox/index.d.ts +8 -6
  173. package/dist/react/features/comments/index.d.ts +6 -6
  174. package/dist/react/features/date/index.d.ts +4 -4
  175. package/dist/react/features/details/index.d.ts +4 -4
  176. package/dist/react/features/field/FieldPlugin.js +2 -2
  177. package/dist/react/features/field/index.d.ts +5 -5
  178. package/dist/react/features/footnote/index.d.ts +4 -4
  179. package/dist/react/features/format-painter/FormatPainterPlugin.js +27 -34
  180. package/dist/react/features/format-painter/index.d.ts +4 -4
  181. package/dist/react/features/ink/index.d.ts +5 -5
  182. package/dist/react/features/lock/index.d.ts +5 -5
  183. package/dist/react/features/media/index.d.ts +5 -5
  184. package/dist/react/features/mention/index.d.ts +4 -4
  185. package/dist/react/features/table/index.d.ts +6 -6
  186. package/dist/react/features/toc/index.d.ts +2 -2
  187. package/dist/react/features/upload/index.d.ts +5 -5
  188. package/dist/react/index.d.ts +6 -6
  189. package/dist/react/virtualized.d.ts +3 -3
  190. package/dist/refusal-CwFxNUf7-BLhtd159.d.ts +1 -0
  191. package/dist/{registerEditorTools-Cl-o_Wnq.d.ts → registerEditorTools-D_3hPpTx.d.ts} +16 -8
  192. package/dist/shared-room-26tNRhZE-BLhtd159.d.ts +1 -0
  193. package/dist/skills/plate/SKILL.md +4 -3
  194. package/dist/skills/plate/references/ai-and-agents.md +2 -2
  195. package/dist/skills/plate/references/pricing.md +3 -3
  196. package/dist/skills/plate/references/setup.md +6 -0
  197. package/dist/skills/plate/references/ui-and-sync.md +4 -3
  198. package/dist/{source-DUP5aKcT.d.ts → source-BW7JD_oS.d.ts} +3 -3
  199. package/dist/static/index.d.ts +23 -9
  200. package/dist/static/internal/staticPendingMedia.internal.js +2 -1
  201. package/dist/static/internal/staticPresentation.js +1 -0
  202. package/dist/static/renderStaticHtml.js +85 -39
  203. package/dist/{storage-EzfLDqRy-Cu4DQ-Rf.d.ts → storage-C7xSH1I5-BJLoUfo9.d.ts} +2 -2
  204. package/dist/sync/cloudflare/index.d.ts +3 -3
  205. package/dist/sync/index.d.ts +4 -4
  206. package/dist/sync/postgres/index.d.ts +1 -1
  207. package/dist/sync/react/index.d.ts +6 -6
  208. package/dist/sync/server/index.d.ts +5 -5
  209. package/dist/tabbable/react/index.d.ts +4 -4
  210. package/dist/testing/index.d.ts +3 -3
  211. package/dist/{transport-DAforzBt-BFwAhC-N.d.ts → transport-B-ON68Y4-DCfT5-eN.d.ts} +1 -1
  212. package/dist/utils/plate-keys.js +1 -0
  213. package/dist/{widths-BjIZxtaJ.d.ts → widths-9NNziDRW.d.ts} +5 -5
  214. package/package.json +9 -2
  215. package/dist/clipboard-format-key-D9rnh20X-CR00YA0H.d.ts +0 -1
  216. package/dist/index-CKAkaSJK.d.ts +0 -3
  217. package/dist/index-CxyK4HrT.d.ts +0 -1
  218. package/dist/index-zcb_RtZC.d.ts +0 -1
  219. package/dist/refusal-DCzeB9nD-CR00YA0H.d.ts +0 -1
  220. package/dist/shared-room-Bg8qMvm1-CR00YA0H.d.ts +0 -1
  221. /package/dist/{tx-only-CWT-IURY-BqIFhy44.d.ts → tx-only-sIj7BcYh-BMFkGMuq.d.ts} +0 -0
@@ -365,3 +365,7 @@ Pass `propertyValues` in options when a custom plugin declares a required
365
365
  property with a runtime `validate` function that cannot be inferred from the
366
366
  JSON contract alone. Compose with `fast-check` using
367
367
  `fc.integer().map(arbitrary.generate)`.
368
+
369
+ ## Pro and Business
370
+
371
+ Plate Pro ships `@plate-pro/playwright-suite`, a customer-runnable Playwright browser proof suite covering typing, IME composition, slash commands, table navigation, two-tab sync, Ink draw-and-send, and mobile viewports. Plate Business adds `@plate-business/security-proof` adversarial canaries and `plate verify` CI for schema-derived fuzzing, shrunk counterexamples, and zero-PII PR verification. See [Pricing](/pricing).
@@ -370,3 +370,7 @@ URL and ordinary media fields. JSON preserves unresolved drafts; external HTML,
370
370
  Markdown, and static rendering omit them. An editor that loads drafts for
371
371
  static rendering must include `BaseUploadPlugin`; completed media alone needs only the media
372
372
  plugins.
373
+
374
+ ## Pro and Business
375
+
376
+ Plate Pro includes Cloudflare R2 `files-sdk` upload wiring inside the `Potion v2` flagship template and `plate-deploy-cloudflare` deploy skill. Plate Business adds `@plate-business/compliance-pdf` for SSRF-hardened raster media inlining into zero-network compliance PDFs. See [Pricing](/pricing).
@@ -1,8 +1,8 @@
1
- import { Eo as PluginReference, _t as EditorDocumentValue } from "../../tx-only-CWT-IURY-BqIFhy44.js";
2
- import { h as EditorApplicationSchema } from "../../htmlTypes-CNhoCFjK.js";
3
- import { o as Editor } from "../../core-CTB0OBoh.js";
4
- import { i as DocxErrorDiagnostic, n as DocxComment, r as DocxDiagnostic, s as DocxWarningDiagnostic, t as DocxSource } from "../../source-DUP5aKcT.js";
5
- import "../../widths-BjIZxtaJ.js";
1
+ import { Eo as PluginReference, _t as EditorDocumentValue } from "../../tx-only-sIj7BcYh-BMFkGMuq.js";
2
+ import { h as EditorApplicationSchema } from "../../htmlTypes-3laowz-3.js";
3
+ import { o as Editor } from "../../core-By92GWYW.js";
4
+ import { i as DocxErrorDiagnostic, n as DocxComment, r as DocxDiagnostic, s as DocxWarningDiagnostic, t as DocxSource } from "../../source-BW7JD_oS.js";
5
+ import "../../widths-9NNziDRW.js";
6
6
  /**
7
7
  * Character-level visual styling for Word runs in `DocxExportStyles`.
8
8
  * All color values accept CSS hex, rgb/rgba, hsl/hsla, or standard CSS named colors.
@@ -1,8 +1,8 @@
1
- import { Eo as PluginReference, Wl as Value, _t as EditorDocumentValue } from "../../tx-only-CWT-IURY-BqIFhy44.js";
2
- import { h as EditorApplicationSchema } from "../../htmlTypes-CNhoCFjK.js";
3
- import { o as Editor } from "../../core-CTB0OBoh.js";
4
- import { y as CommentRemoteUpsert } from "../../index-CLPMcGC5.js";
5
- import { a as DocxImportLimits, i as DocxErrorDiagnostic, n as DocxComment, o as DocxSourceLocation, r as DocxDiagnostic, s as DocxWarningDiagnostic, t as DocxSource } from "../../source-DUP5aKcT.js";
1
+ import { Eo as PluginReference, Wl as Value, _t as EditorDocumentValue } from "../../tx-only-sIj7BcYh-BMFkGMuq.js";
2
+ import { h as EditorApplicationSchema } from "../../htmlTypes-3laowz-3.js";
3
+ import { o as Editor } from "../../core-By92GWYW.js";
4
+ import { y as CommentRemoteUpsert } from "../../index-KG95XVaC.js";
5
+ import { a as DocxImportLimits, i as DocxErrorDiagnostic, n as DocxComment, o as DocxSourceLocation, r as DocxDiagnostic, s as DocxWarningDiagnostic, t as DocxSource } from "../../source-BW7JD_oS.js";
6
6
  /** Author profile generated for one imported Word comment. */
7
7
  type DocxCommentUser = Readonly<{
8
8
  id: string;
@@ -1,7 +1,7 @@
1
- import { Wl as Value, gt as EditorDocumentRecords } from "../../tx-only-CWT-IURY-BqIFhy44.js";
2
- import { d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, r as HtmlDocumentParseResult } from "../../htmlTypes-CNhoCFjK.js";
3
- import { fo as PluginReference, p as BasePlugin, uo as PluginDependency } from "../../core-CTB0OBoh.js";
4
- import "../../index-CKAkaSJK.js";
1
+ import { Wl as Value, gt as EditorDocumentRecords } from "../../tx-only-sIj7BcYh-BMFkGMuq.js";
2
+ import { d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, r as HtmlDocumentParseResult } from "../../htmlTypes-3laowz-3.js";
3
+ import { fo as PluginReference, p as BasePlugin, uo as PluginDependency } from "../../core-By92GWYW.js";
4
+ import "../../index-CyY3O6c7.js";
5
5
  /** Normalizes Word clipboard payloads before the installed HTML parser runs. */
6
6
  declare const WordPastePlugin: BasePlugin<Readonly<{
7
7
  readonly dependencies: readonly [PluginReference<"html"> & PluginDependency<Readonly<{
@@ -1,2 +1,2 @@
1
- import { A as DOMVisualPoint, B as ScrollMargin, C as DOMElement, D as DOMSelection, E as DOMRange, F as DataTransferFormat, G as HotkeyMatchOptions, H as dataTransferFormats, I as DataTransferSchemaClaim, J as KeyboardEventLike, K as HotkeyPlatform, L as DataTransferSnapshot, M as DataTransferDecodeContext, N as DataTransferDiagnostic, O as DOMStaticRange, P as DataTransferEncodeContext, R as ScrollIntoViewOptions, T as DOMPoint, U as domCommands, V as ViewportRect, W as writeDataTransferFragment, Y as ariaKeyShortcuts, _ as DOMDragStart, a as usesAppleDOMHotkeys, b as DOMDropTargetInput, c as DOMApi, g as DOMDragApi, i as isHotkey, j as DOMVisualPointOptions, k as DOMText, l as DOMClipboardApi, o as ClipboardSliceRead, q as HotkeySpec, r as DropIndicator, s as ClipboardSliceWrite, v as DOMDropEdge, w as DOMNode, x as DOMDropTargetOptions, y as DOMDropTarget, z as ScrollIntoViewTarget } from "../index-B8JeECEk.js";
1
+ import { A as DOMVisualPoint, B as ScrollMargin, C as DOMElement, D as DOMSelection, E as DOMRange, F as DataTransferFormat, G as HotkeyMatchOptions, H as dataTransferFormats, I as DataTransferSchemaClaim, J as KeyboardEventLike, K as HotkeyPlatform, L as DataTransferSnapshot, M as DataTransferDecodeContext, N as DataTransferDiagnostic, O as DOMStaticRange, P as DataTransferEncodeContext, R as ScrollIntoViewOptions, T as DOMPoint, U as domCommands, V as ViewportRect, W as writeDataTransferFragment, Y as ariaKeyShortcuts, _ as DOMDragStart, a as usesAppleDOMHotkeys, b as DOMDropTargetInput, c as DOMApi, g as DOMDragApi, i as isHotkey, j as DOMVisualPointOptions, k as DOMText, l as DOMClipboardApi, o as ClipboardSliceRead, q as HotkeySpec, r as DropIndicator, s as ClipboardSliceWrite, v as DOMDropEdge, w as DOMNode, x as DOMDropTargetOptions, y as DOMDropTarget, z as ScrollIntoViewTarget } from "../index-B9UlNijk.js";
2
2
  export { type ClipboardSliceRead, type ClipboardSliceWrite, type DOMApi, type DOMClipboardApi, type DOMDragApi, type DOMDragStart, type DOMDropEdge, type DOMDropTarget, type DOMDropTargetInput, type DOMDropTargetOptions, type DOMElement, type DOMNode, type DOMPoint, type DOMRange, type DOMSelection, type DOMStaticRange, type DOMText, type DOMVisualPoint, type DOMVisualPointOptions, type DataTransferDecodeContext, type DataTransferDiagnostic, type DataTransferEncodeContext, type DataTransferFormat, type DataTransferSchemaClaim, type DataTransferSnapshot, type DropIndicator, type HotkeyMatchOptions, type HotkeyPlatform, type HotkeySpec, type KeyboardEventLike, type ScrollIntoViewOptions, type ScrollIntoViewTarget, type ScrollMargin, type ViewportRect, ariaKeyShortcuts, dataTransferFormats, domCommands, isHotkey, usesAppleDOMHotkeys, writeDataTransferFragment };
@@ -272,7 +272,7 @@ const BaseKbdPlugin = definePlugin(PLUGINS.kbd, {
272
272
  }),
273
273
  component: "kbd",
274
274
  rules: { selection: { affinity: "hard" } }
275
- });
275
+ }).extend((context) => ({ contributions: [inputRuleVeto.of({ mark: context.schema.key })] }));
276
276
  /** Enables subscript and superscript through one enum-valued mark. */
277
277
  const BaseScriptPlugin = definePlugin(PLUGINS.script, {
278
278
  schema: { mark: property.enum(scriptValues) },
@@ -1,9 +1,9 @@
1
- import { MAIN_ROOT_KEY, definePluginPoint, getPluginContributions, landNodePropertiesAt, vetoesWrite } from "../../../facade.js";
1
+ import { MAIN_ROOT_KEY, definePluginPoint, getPluginContributions, hasNonWritableAt, landNodePropertiesAt, resolveLocationRoot, vetoesWrite } from "../../../facade.js";
2
2
  import { getCompiledPlatePlugin } from "../../../internal/plugin/compilePlateModel.js";
3
3
  import { definePlugin } from "../../../lib/plugin/definePlugin.js";
4
4
  import { BaseParagraphPlugin } from "../../../lib/plugins/paragraph/BaseParagraphPlugin.js";
5
5
  import { PLUGINS } from "../../../utils/plate-keys.js";
6
- import { NodeApi, PathApi, RangeApi, locateAt, txLocate } from "../../../core.js";
6
+ import { NodeApi, PathApi, PointApi, RangeApi, locateAt, txLocate } from "../../../core.js";
7
7
  //#region src/features/basic-styles/lib/BaseFormattingPlugin.ts
8
8
  /**
9
9
  * Contribute the block properties clear formatting removes, and the blocks
@@ -37,6 +37,17 @@ const BaseFormattingPlugin = definePlugin(PLUGINS.formatting, {
37
37
  capture: (options = {}) => {
38
38
  const source = options.at ?? state.selection();
39
39
  if (!source || !RangeApi.isRange(source)) return void 0;
40
+ const sourceRoot = resolveLocationRoot(editor, source);
41
+ const rootChildren = sourceRoot === MAIN_ROOT_KEY ? state.children() : state.root(sourceRoot);
42
+ if (!rootChildren) return void 0;
43
+ const nodeAt = (path) => {
44
+ let current = rootChildren[path[0] ?? -1];
45
+ for (let i = 1; i < path.length; i += 1) {
46
+ if (!current || !NodeApi.isElement(current)) return void 0;
47
+ current = current.children[path[i]];
48
+ }
49
+ return current;
50
+ };
40
51
  const start = RangeApi.start(source);
41
52
  const collapsed = RangeApi.isCollapsed(source);
42
53
  const first = state.nodes.entries({
@@ -44,17 +55,18 @@ capture: (options = {}) => {
44
55
  match: (node, path) => {
45
56
  if (!NodeApi.isText(node)) return false;
46
57
  if (!collapsed && PathApi.equals(path, start.path) && start.offset === node.text.length) return false;
47
- const [parent] = state.nodes.parent(path) ?? [];
58
+ const parent = nodeAt(PathApi.parent(path));
48
59
  return !!parent && NodeApi.isElement(parent) && (!state.schema.isVoid(parent) || state.schema.isMarkableVoid(parent));
49
60
  },
50
61
  voids: true
51
62
  }).next().value;
52
63
  if (!first || !NodeApi.isText(first[0])) return void 0;
53
64
  const [leaf, leafPath] = first;
54
- const types = Array.from(state.nodes.levels({
55
- at: PathApi.parent(leafPath),
56
- reverse: true
57
- })).flatMap(([node]) => NodeApi.isElement(node) ? [node.type] : []);
65
+ const types = PathApi.ancestors(leafPath, { reverse: true }).flatMap((ancestorPath) => {
66
+ if (ancestorPath.length === 0) return [];
67
+ const ancestor = nodeAt(ancestorPath);
68
+ return ancestor && NodeApi.isElement(ancestor) ? [ancestor.type] : [];
69
+ });
58
70
  const text = Object.fromEntries(Object.entries(leaf).filter(([key]) => key !== "text" && state.schema.property({
59
71
  ancestors: types.slice(1),
60
72
  key,
@@ -72,11 +84,13 @@ capture: (options = {}) => {
72
84
  });
73
85
  const [block, blockPath] = covered;
74
86
  const contributions = getPluginContributions(editor, formatting);
87
+ const parentPath = PathApi.parent(blockPath);
88
+ const parentBlock = parentPath.length > 0 ? nodeAt(parentPath) : void 0;
75
89
  const entry = {
76
90
  index: blockPath.at(-1) ?? 0,
77
91
  node: block,
78
92
  path: blockPath,
79
- siblings: state.nodes.children(PathApi.parent(blockPath))
93
+ siblings: parentPath.length === 0 ? rootChildren : parentBlock && NodeApi.isElement(parentBlock) ? parentBlock.children : []
80
94
  };
81
95
  const kept = (key) => contributions.some((contribution) => contribution.keeps?.[key]?.(entry));
82
96
  const settings = Object.fromEntries([...new Set(contributions.flatMap((contribution) => contribution.block ?? []))].filter((key) => key in block && !kept(key)).map((key) => [key, block[key]]));
@@ -136,10 +150,11 @@ capture: (options = {}) => {
136
150
  };
137
151
  });
138
152
  };
139
- const isStyledText = (isInside) => (node, path) => {
153
+ const isWritablePath = (path, root) => !hasNonWritableAt(editor, path, { root });
154
+ const isStyledText = (isInside, root) => (node, path) => {
140
155
  if (!NodeApi.isText(node) || !isInside(path)) return false;
141
156
  const [parent] = tx.nodes.parent(path) ?? [];
142
- return !!parent && NodeApi.isElement(parent) && (!tx.schema.isVoid(parent) || tx.schema.isMarkableVoid(parent));
157
+ return !!parent && NodeApi.isElement(parent) && (!tx.schema.isVoid(parent) || tx.schema.isMarkableVoid(parent)) && isWritablePath(path, root);
143
158
  };
144
159
  const patchTexts = (target, match, write, pending) => {
145
160
  if (!target.resolve) {
@@ -170,13 +185,13 @@ capture: (options = {}) => {
170
185
  voids: true
171
186
  });
172
187
  };
173
- const clearTexts = (target, isInside) => {
174
- const styled = isStyledText(isInside);
188
+ const clearTexts = (target, isInside, root) => {
189
+ const styled = isStyledText(isInside, root);
175
190
  const uniform = /* @__PURE__ */ new Set();
176
191
  const contextual = /* @__PURE__ */ new Set();
177
192
  for (const [text] of tx.nodes.entries({
178
193
  at: target.at,
179
- match: (node, path) => NodeApi.isText(node) && isInside(path),
194
+ match: (node, path) => NodeApi.isText(node) && styled(node, path),
180
195
  voids: true
181
196
  })) for (const key of Object.keys(text)) {
182
197
  if (key === "text") continue;
@@ -194,12 +209,13 @@ capture: (options = {}) => {
194
209
  unset([...uniform], styled);
195
210
  for (const key of contextual) unset([key], (node, path) => styled(node, path) && roleAt(key, PathApi.parent(path)) === "content");
196
211
  };
197
- const clearBlocks = (entries) => {
198
- const blockAt = regionOf(entries.map(({ node, path }) => [node, path]));
212
+ const clearBlocks = (entries, root) => {
213
+ const writable = entries.filter((entry) => isWritablePath(entry.path, root));
214
+ const blockAt = regionOf(writable.map(({ node, path }) => [node, path]));
199
215
  if (!blockAt) return;
200
216
  const { blockKeys, keeps } = keepRules();
201
217
  const writes = /* @__PURE__ */ new Map();
202
- for (const entry of entries) {
218
+ for (const entry of writable) {
203
219
  const keys = blockKeys.filter((key) => key in entry.node && !keeps.some(([keptKey, keep]) => keptKey === key && keep(entry)));
204
220
  if (keys.length === 0) continue;
205
221
  const group = JSON.stringify(keys);
@@ -233,6 +249,24 @@ capture: (options = {}) => {
233
249
  const data = capturedFormats.get(format);
234
250
  const target = options.at ?? tx.selection();
235
251
  if (!data || !target || !options.at && tx.selection.nodeMode() !== null || RangeApi.isCollapsed(target)) return false;
252
+ const root = resolveLocationRoot(editor, target);
253
+ const styled = isStyledText(() => true, root);
254
+ const entries = data.block ? toEntries(tx.nodes.blocks({
255
+ at: target,
256
+ coverage: "full",
257
+ mode: "lowest"
258
+ })).filter((entry) => isWritablePath(entry.path, root)) : [];
259
+ const [start, end] = RangeApi.edges(target);
260
+ const crossesTexts = !PathApi.equals(start.path, end.path);
261
+ if (!!tx.nodes.entries({
262
+ at: target,
263
+ match: (node, path) => {
264
+ if (!NodeApi.isText(node)) return false;
265
+ if (crossesTexts && (PathApi.equals(path, start.path) && start.offset === node.text.length || PathApi.equals(path, end.path) && end.offset === 0)) return false;
266
+ return styled(node, path);
267
+ },
268
+ voids: true
269
+ }).next().done && entries.length === 0) return false;
236
270
  tx.history.newBatch();
237
271
  const anchor = tx.anchor(target, {
238
272
  association: "inward",
@@ -242,13 +276,8 @@ capture: (options = {}) => {
242
276
  at: target,
243
277
  resolve: () => anchor.resolve()
244
278
  };
245
- const entries = data.block ? toEntries(tx.nodes.blocks({
246
- at: target,
247
- coverage: "full",
248
- mode: "lowest"
249
- })) : [];
250
- clearTexts(textTarget, () => true);
251
- clearBlocks(entries);
279
+ clearTexts(textTarget, () => true, root);
280
+ clearBlocks(entries, root);
252
281
  const blockAt = regionOf(entries.map(({ node, path }) => [node, path]));
253
282
  const { keeps } = keepRules();
254
283
  const kept = (key, entry) => keeps.some(([keptKey, keep]) => keptKey === key && keep(entry));
@@ -271,7 +300,6 @@ capture: (options = {}) => {
271
300
  level: identity.level,
272
301
  type: headingType
273
302
  } : null;
274
- const root = tx.view.root() ?? MAIN_ROOT_KEY;
275
303
  const retyped = /* @__PURE__ */ new Set();
276
304
  if (data.block && blockAt) {
277
305
  const shape = (type) => {
@@ -317,8 +345,7 @@ capture: (options = {}) => {
317
345
  mode: "all"
318
346
  });
319
347
  }
320
- if (retyped.size > 0) clearTexts(textTarget, isWithin(retyped));
321
- const styled = isStyledText(() => true);
348
+ if (retyped.size > 0) clearTexts(textTarget, isWithin(retyped), root);
322
349
  const looks = /* @__PURE__ */ new Map();
323
350
  const lookAt = (path) => {
324
351
  const types = ancestorTypes(path);
@@ -361,8 +388,14 @@ capture: (options = {}) => {
361
388
  clear: txLocate(locateAt(0), (options = {}) => {
362
389
  const target = options.at ?? tx.selection();
363
390
  if (!target) return;
391
+ const root = resolveLocationRoot(editor, target);
364
392
  const blockSelection = !options.at && tx.selection.nodeMode() !== null;
365
393
  if (!blockSelection && RangeApi.isCollapsed(target)) {
394
+ if (hasNonWritableAt(editor, target, { root })) return;
395
+ if (options.at) {
396
+ const currentSelection = tx.selection();
397
+ if (!currentSelection || !RangeApi.isRange(currentSelection) || !RangeApi.isCollapsed(currentSelection) || !PointApi.equals(currentSelection.anchor, target.anchor) || resolveLocationRoot(editor, currentSelection) !== root) return;
398
+ }
366
399
  const marks = tx.marks();
367
400
  if (!marks) return;
368
401
  const parentPath = PathApi.parent(target.anchor.path);
@@ -383,9 +416,9 @@ capture: (options = {}) => {
383
416
  clearTexts({
384
417
  at: textAt,
385
418
  resolve: anchor ? () => anchor.resolve() : void 0
386
- }, blockSelection ? isWithin(new Set(selectedEntries.map(([, path]) => pathKey(path)))) : () => true);
419
+ }, blockSelection ? isWithin(new Set(selectedEntries.map(([, path]) => pathKey(path)))) : () => true, root);
387
420
  }
388
- clearBlocks(toEntries(covered));
421
+ clearBlocks(toEntries(covered), root);
389
422
  })
390
423
  };
391
424
  }
@@ -1,5 +1,6 @@
1
1
  import { hasNonWritableAt } from "../../../facade.js";
2
2
  import { definePlugin } from "../../../lib/plugin/definePlugin.js";
3
+ import { isSafeStyleValue } from "../../../lib/plugins/html/cssSafety.internal.js";
3
4
  import { BaseParagraphPlugin } from "../../../lib/plugins/paragraph/BaseParagraphPlugin.js";
4
5
  import { getInjectMatch } from "../../../lib/utils/getInjectMatch.js";
5
6
  import { PLUGINS } from "../../../utils/plate-keys.js";
@@ -48,7 +49,7 @@ const ALIGNMENTS = [
48
49
  const isAlignment = (value) => typeof value === "string" && ALIGNMENTS.some((alignment) => alignment === value);
49
50
  const docsPastes = /* @__PURE__ */ new WeakMap();
50
51
  const markDocsPaste = ({ document }) => {
51
- docsPastes.set(document, document.body.querySelector("[id^=\"docs-internal-guid\"]") !== null);
52
+ docsPastes.set(document, Boolean(document.body?.querySelector("[id^=\"docs-internal-guid\"]")));
52
53
  };
53
54
  const docsBlack = ["#000000", "rgb(0,0,0)"];
54
55
  const docsNormal = {
@@ -85,10 +86,25 @@ const docsDefaults = (context, key) => {
85
86
  return context.registry.has(PLUGINS.heading) ? headingStyle.asHeading[key] : headingStyle.asParagraph[key];
86
87
  };
87
88
  const hasBackground = (element) => !!element?.style.backgroundColor && !isDocsDefault(element.style.backgroundColor, docsNormal.backgroundColor);
89
+ const CSS_STYLE_NAMES = {
90
+ backgroundColor: "background-color",
91
+ color: "color",
92
+ fontFamily: "font-family",
93
+ fontSize: "font-size"
94
+ };
88
95
  const decodeTextStyle = (context, key) => {
89
- const { element, registry } = context;
96
+ const { element, registry, report } = context;
90
97
  const value = element.style[key];
91
- if (!value || docsPastes.get(element.ownerDocument) !== true) return value || void 0;
98
+ if (!value) return void 0;
99
+ if (!isSafeStyleValue(value)) {
100
+ report({
101
+ action: "dropped",
102
+ kind: "style",
103
+ message: `HTML style "${CSS_STYLE_NAMES[key]}" has an unsupported value; it was omitted.`
104
+ });
105
+ return;
106
+ }
107
+ if (docsPastes.get(element.ownerDocument) !== true) return value;
92
108
  if (element.tagName !== "SPAN") return void 0;
93
109
  if (key === "color" && (registry.has(PLUGINS.backgroundColor) && hasBackground(element) || registry.has(PLUGINS.tableCell) && hasBackground(element.closest("td, th")))) return value;
94
110
  return isDocsDefault(value, docsDefaults(context, key)) ? void 0 : value;
@@ -104,8 +120,13 @@ const parseFontSizePt = (value) => {
104
120
  if (unit === "em" || unit === "rem") return amount * 12;
105
121
  return amount;
106
122
  };
123
+ const isSafeStyleString = (value) => typeof value === "string" && isSafeStyleValue(value);
124
+ const safeStyleMark = property.string({
125
+ validate: isSafeStyleString,
126
+ validationVersion: 1
127
+ });
107
128
  const BaseFontBackgroundColorPlugin = definePlugin(PLUGINS.backgroundColor, {
108
- schema: { mark: property.string() },
129
+ schema: { mark: safeStyleMark },
109
130
  formats: ({ defineFormats }) => defineFormats({
110
131
  docx: {
111
132
  decode: ({ value }) => value,
@@ -129,7 +150,7 @@ const BaseFontBackgroundColorPlugin = definePlugin(PLUGINS.backgroundColor, {
129
150
  inject: { nodeProps: { styleKey: "backgroundColor" } }
130
151
  });
131
152
  const BaseFontColorPlugin = definePlugin(PLUGINS.color, {
132
- schema: { mark: property.string() },
153
+ schema: { mark: safeStyleMark },
133
154
  formats: ({ defineFormats }) => defineFormats({
134
155
  docx: {
135
156
  decode: ({ value }) => value,
@@ -153,7 +174,7 @@ const BaseFontColorPlugin = definePlugin(PLUGINS.color, {
153
174
  inject: { nodeProps: { styleKey: "color" } }
154
175
  });
155
176
  const BaseFontFamilyPlugin = definePlugin(PLUGINS.fontFamily, {
156
- schema: { mark: property.string() },
177
+ schema: { mark: safeStyleMark },
157
178
  formats: ({ defineFormats }) => defineFormats({
158
179
  docx: { encode: ({ value }) => typeof value === "string" && value.trim().length > 0 ? { fontFamily: value } : null },
159
180
  html: {
@@ -173,7 +194,7 @@ const BaseFontFamilyPlugin = definePlugin(PLUGINS.fontFamily, {
173
194
  inject: { nodeProps: { styleKey: "fontFamily" } }
174
195
  });
175
196
  const BaseFontSizePlugin = definePlugin(PLUGINS.fontSize, {
176
- schema: { mark: property.string() },
197
+ schema: { mark: safeStyleMark },
177
198
  formats: ({ defineFormats }) => defineFormats({
178
199
  docx: { encode: ({ value }) => {
179
200
  const fontSizePt = typeof value === "string" ? parseFontSizePt(value) : void 0;
@@ -1,2 +1,2 @@
1
- import { A as BoardArrowEnd, C as BoardArrowElement, F as BoardFrameEntry, H as BoardPlace, I as BoardMemberEntry, L as BoardShapeEntry, M as BoardArrowSide, P as BoardArrowEntry, R as BoardFramePlace, S as BaseBoardArrowPlugin, U as BoardRestackDirection, W as BoardSize, _ as BoardGeoElement, a as BaseBoardPlugin, b as BaseBoardFramePlugin, c as BoardStrokePath, d as BaseBoardNotePlugin, f as BoardNoteElement, g as BoardGeo, h as BaseBoardGeoPlugin, i as BoardStrokeElement, j as BoardArrowEnds, k as BoardArrowAnchor, m as BoardImageElement, n as BoardTextElement, o as BoardElement, p as BaseBoardImagePlugin, r as BaseBoardStrokePlugin, t as BaseBoardTextPlugin, w as BoardArrowEndInput, x as BoardFrameElement, y as defineBoardShape, z as BoardShapePlace } from "../../index-DYuqsDrP.js";
1
+ import { A as BoardArrowEnd, C as BoardArrowElement, F as BoardFrameEntry, H as BoardPlace, I as BoardMemberEntry, L as BoardShapeEntry, M as BoardArrowSide, P as BoardArrowEntry, R as BoardFramePlace, S as BaseBoardArrowPlugin, U as BoardRestackDirection, W as BoardSize, _ as BoardGeoElement, a as BaseBoardPlugin, b as BaseBoardFramePlugin, c as BoardStrokePath, d as BaseBoardNotePlugin, f as BoardNoteElement, g as BoardGeo, h as BaseBoardGeoPlugin, i as BoardStrokeElement, j as BoardArrowEnds, k as BoardArrowAnchor, m as BoardImageElement, n as BoardTextElement, o as BoardElement, p as BaseBoardImagePlugin, r as BaseBoardStrokePlugin, t as BaseBoardTextPlugin, w as BoardArrowEndInput, x as BoardFrameElement, y as defineBoardShape, z as BoardShapePlace } from "../../index-Dyw6BJx8.js";
2
2
  export { BaseBoardArrowPlugin, BaseBoardFramePlugin, BaseBoardGeoPlugin, BaseBoardImagePlugin, BaseBoardNotePlugin, BaseBoardPlugin, BaseBoardStrokePlugin, BaseBoardTextPlugin, type BoardArrowAnchor, BoardArrowElement, type BoardArrowEnd, BoardArrowEndInput, type BoardArrowEnds, type BoardArrowEntry, type BoardArrowSide, BoardElement, BoardFrameElement, type BoardFrameEntry, type BoardFramePlace, BoardGeo, BoardGeoElement, BoardImageElement, type BoardMemberEntry, BoardNoteElement, type BoardPlace, type BoardRestackDirection, type BoardShapeEntry, type BoardShapePlace, type BoardSize, BoardStrokeElement, type BoardStrokePath, BoardTextElement, defineBoardShape };
@@ -1,160 +1,2 @@
1
- import { Bi as Location, Da as NodeSelection, Es as SchemaContentRule, Mt as EditorJsonValue, Qo as PropertyValueOptions, Vl as TxDeclaredMethod, gs as SchemaContentDefault, qo as PropertyStringDescriptor, wi as ElementOf } from "../../tx-only-CWT-IURY-BqIFhy44.js";
2
- import "../../htmlTypes-CNhoCFjK.js";
3
- import { fo as PluginReference, lt as BlockUpsertOptions, p as BasePlugin, uo as PluginDependency } from "../../core-CTB0OBoh.js";
4
- type CalloutProps = Readonly<{
5
- backgroundColor?: string;
6
- icon?: string;
7
- variant?: string;
8
- }>;
9
- type CalloutWrapOptions = CalloutProps & Readonly<{
10
- at?: Location | NodeSelection;
11
- }>;
12
- /** Enables multi-block callout containers with optional icon, variant, and background color. */
13
- declare const BaseCalloutPlugin: BasePlugin<Readonly<{
14
- formats: true;
15
- rules: true;
16
- }> & Readonly<{
17
- name: "callout";
18
- }> & Readonly<{
19
- dependencies: readonly [PluginReference<"paragraph"> & PluginDependency<Readonly<{
20
- name: "paragraph";
21
- }> & Readonly<{
22
- __pluginWritableProperties: never;
23
- }> & Readonly<Record<"schema", {
24
- readonly element: Readonly<{
25
- content: Readonly<{
26
- allowed: Readonly<{
27
- kind: 'any';
28
- rules: readonly [Readonly<{
29
- kind: 'text';
30
- }>, Readonly<{
31
- group: 'inline';
32
- kind: 'group';
33
- }>];
34
- }>;
35
- prefix?: readonly Readonly<{
36
- element: string | Readonly<{
37
- source: string;
38
- type: string;
39
- }>;
40
- properties?: Readonly<Record<string, EditorJsonValue>>;
41
- }>[] | undefined;
42
- } & Readonly<{
43
- default: 'text';
44
- min: 1;
45
- }> & Readonly<{
46
- '~schema.content.rule'?: Readonly<{
47
- kind: 'any';
48
- rules: readonly [Readonly<{
49
- kind: 'text';
50
- }>, Readonly<{
51
- group: 'inline';
52
- kind: 'group';
53
- }>];
54
- }> | undefined;
55
- }>>;
56
- }>;
57
- }>> & Readonly<Record<never, never>>> & Pick<BasePlugin<Readonly<{
58
- formats: true;
59
- rules: true;
60
- }> & Readonly<{
61
- name: "paragraph";
62
- }> & Readonly<Record<never, never>> & Readonly<{
63
- __pluginWritableProperties: never;
64
- schema: {
65
- readonly element: Readonly<{
66
- content: Readonly<{
67
- allowed: Readonly<{
68
- kind: 'any';
69
- rules: readonly [Readonly<{
70
- kind: 'text';
71
- }>, Readonly<{
72
- group: 'inline';
73
- kind: 'group';
74
- }>];
75
- }>;
76
- prefix?: readonly Readonly<{
77
- element: string | Readonly<{
78
- source: string;
79
- type: string;
80
- }>;
81
- properties?: Readonly<Record<string, EditorJsonValue>>;
82
- }>[] | undefined;
83
- } & Readonly<{
84
- default: 'text';
85
- min: 1;
86
- }> & Readonly<{
87
- '~schema.content.rule'?: Readonly<{
88
- kind: 'any';
89
- rules: readonly [Readonly<{
90
- kind: 'text';
91
- }>, Readonly<{
92
- group: 'inline';
93
- kind: 'group';
94
- }>];
95
- }> | undefined;
96
- }>>;
97
- }>;
98
- };
99
- }>>, "~schema.plugins">];
100
- }> & Readonly<Record<never, never>> & Readonly<{
101
- update: {
102
- readonly toggle: TxDeclaredMethod<(options?: CalloutWrapOptions) => boolean>;
103
- readonly unwrap: TxDeclaredMethod<({ at }?: {
104
- at?: Location | NodeSelection;
105
- }) => boolean>;
106
- readonly upsert: TxDeclaredMethod<(data?: CalloutProps, options?: BlockUpsertOptions) => boolean>;
107
- readonly wrap: TxDeclaredMethod<({ at, ...rest }?: CalloutWrapOptions) => boolean>;
108
- };
109
- }> & Readonly<{
110
- __pluginWritableProperties: Readonly<{
111
- descriptor: PropertyStringDescriptor<PropertyValueOptions<string>>;
112
- key: "backgroundColor";
113
- localId: "backgroundColor";
114
- ownerName: "callout";
115
- placement: "element";
116
- unaliased: true;
117
- value: string;
118
- }> | Readonly<{
119
- descriptor: PropertyStringDescriptor<PropertyValueOptions<string>>;
120
- key: "icon";
121
- localId: "icon";
122
- ownerName: "callout";
123
- placement: "element";
124
- unaliased: true;
125
- value: string;
126
- }> | Readonly<{
127
- descriptor: PropertyStringDescriptor<PropertyValueOptions<string>>;
128
- key: "variant";
129
- localId: "variant";
130
- ownerName: "callout";
131
- placement: "element";
132
- unaliased: true;
133
- value: string;
134
- }>;
135
- schema: {
136
- readonly element: {
137
- content: Readonly<{
138
- allowed: SchemaContentRule;
139
- prefix?: readonly Readonly<{
140
- element: string | Readonly<{
141
- source: string;
142
- type: string;
143
- }>;
144
- properties?: Readonly<Record<string, EditorJsonValue>>;
145
- }>[] | undefined;
146
- } & Readonly<{
147
- default?: SchemaContentDefault;
148
- max?: number;
149
- min?: number;
150
- }>>;
151
- properties: {
152
- backgroundColor: PropertyStringDescriptor<PropertyValueOptions<string>>;
153
- icon: PropertyStringDescriptor<PropertyValueOptions<string>>;
154
- variant: PropertyStringDescriptor<PropertyValueOptions<string>>;
155
- };
156
- };
157
- };
158
- }>>;
159
- type CalloutElement = ElementOf<typeof BaseCalloutPlugin>;
160
- export { BaseCalloutPlugin, CalloutElement };
1
+ import { n as CalloutAction, r as CalloutElement, t as BaseCalloutPlugin } from "../../index-D8EGVCeT.js";
2
+ export { BaseCalloutPlugin, CalloutAction, CalloutElement };