@lyads/visual-editor 0.0.0-stage → 1.0.1

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 (258) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +8 -0
  4. package/README.md +135 -2
  5. package/THIRD_PARTY_NOTICES.md +21259 -0
  6. package/dist/application/block-placement.d.ts +30 -0
  7. package/dist/application/block-session.d.ts +135 -0
  8. package/dist/application/content-service.d.ts +73 -0
  9. package/dist/application/document-commands.d.ts +51 -0
  10. package/dist/application/document-metadata.d.ts +30 -0
  11. package/dist/application/document-presentation.d.ts +35 -0
  12. package/dist/application/email-insertion.d.ts +76 -0
  13. package/dist/application/host.d.ts +36 -0
  14. package/dist/application/image-link.d.ts +36 -0
  15. package/dist/application/section-layout.d.ts +25 -0
  16. package/dist/application/session.d.ts +128 -0
  17. package/dist/assets/browser-worker-D56tNvnb.js +1014 -0
  18. package/dist/assets/browser-worker-D56tNvnb.js.map +1 -0
  19. package/dist/block-controller-RjYGvOcn.js +2468 -0
  20. package/dist/block-controller-RjYGvOcn.js.map +1 -0
  21. package/dist/block-factory-C5oHi4Fm.js +5397 -0
  22. package/dist/block-factory-C5oHi4Fm.js.map +1 -0
  23. package/dist/blocks/block-checks.d.ts +34 -0
  24. package/dist/blocks/block-inspector.d.ts +55 -0
  25. package/dist/blocks/block-output.d.ts +28 -0
  26. package/dist/blocks/block-type.d.ts +124 -0
  27. package/dist/blocks/content-guard.d.ts +52 -0
  28. package/dist/blocks/conversion.d.ts +22 -0
  29. package/dist/blocks/definitions.d.ts +43 -0
  30. package/dist/blocks/device-styles.d.ts +31 -0
  31. package/dist/blocks/email-generator.d.ts +22 -0
  32. package/dist/blocks/email-preview.d.ts +23 -0
  33. package/dist/blocks/email-renderer.d.ts +20 -0
  34. package/dist/blocks/fields.d.ts +34 -0
  35. package/dist/blocks/page-generator.d.ts +16 -0
  36. package/dist/blocks/render-context.d.ts +58 -0
  37. package/dist/blocks/styles.d.ts +54 -0
  38. package/dist/blocks/types/embed.d.ts +40 -0
  39. package/dist/blocks/types/layout.d.ts +41 -0
  40. package/dist/blocks/types/media.d.ts +53 -0
  41. package/dist/blocks/types/structure.d.ts +44 -0
  42. package/dist/blocks/types/text.d.ts +88 -0
  43. package/dist/blocks/values.d.ts +64 -0
  44. package/dist/browser.js +69 -0
  45. package/dist/browser.js.map +1 -0
  46. package/dist/canvas-runtime/action-bar.d.ts +19 -0
  47. package/dist/canvas-runtime/auto-scroll.d.ts +10 -0
  48. package/dist/canvas-runtime/block-drag.d.ts +29 -0
  49. package/dist/canvas-runtime/bridge.d.ts +6 -0
  50. package/dist/canvas-runtime/context.d.ts +53 -0
  51. package/dist/canvas-runtime/document-sync.d.ts +21 -0
  52. package/dist/canvas-runtime/drop-targets.d.ts +34 -0
  53. package/dist/canvas-runtime/embed-markers.d.ts +15 -0
  54. package/dist/canvas-runtime/file-guard.d.ts +12 -0
  55. package/dist/canvas-runtime/image-tools.d.ts +31 -0
  56. package/dist/canvas-runtime/keyboard.d.ts +18 -0
  57. package/dist/canvas-runtime/main.d.ts +1 -0
  58. package/dist/canvas-runtime/messages.d.ts +26 -0
  59. package/dist/canvas-runtime/morph.d.ts +21 -0
  60. package/dist/canvas-runtime/navigation.d.ts +29 -0
  61. package/dist/canvas-runtime/overlay.d.ts +15 -0
  62. package/dist/canvas-runtime/pointer-intents.d.ts +14 -0
  63. package/dist/canvas-runtime/selection-layer.d.ts +16 -0
  64. package/dist/canvas-runtime/shared/shortcuts.d.ts +27 -0
  65. package/dist/canvas-runtime/text-editor.d.ts +55 -0
  66. package/dist/canvas-runtime/text-session.d.ts +39 -0
  67. package/dist/canvas-runtime/variable-marks.d.ts +20 -0
  68. package/dist/canvas-runtime/viewport.d.ts +10 -0
  69. package/dist/codecs/css.d.ts +74 -0
  70. package/dist/codecs/html.d.ts +81 -0
  71. package/dist/compilation/browser-compiler.d.ts +14 -0
  72. package/dist/compilation/browser-worker.d.ts +1 -0
  73. package/dist/compilation/compile-lanes.d.ts +18 -0
  74. package/dist/compilation/generated-mjml.d.ts +25 -0
  75. package/dist/compilation/guard.d.ts +40 -0
  76. package/dist/compilation/node-compiler.d.ts +17 -0
  77. package/dist/compilation/node-worker.d.ts +1 -0
  78. package/dist/composition/block-factory.d.ts +84 -0
  79. package/dist/composition/browser.d.ts +48 -0
  80. package/dist/composition/factory.d.ts +48 -0
  81. package/dist/composition/server.d.ts +43 -0
  82. package/dist/core/any-document.d.ts +16 -0
  83. package/dist/core/block-document.d.ts +215 -0
  84. package/dist/core/budget.d.ts +32 -0
  85. package/dist/core/canvas-contract.d.ts +29 -0
  86. package/dist/core/canvas-layout.d.ts +66 -0
  87. package/dist/core/catalog.d.ts +35 -0
  88. package/dist/core/document-presentation.d.ts +21 -0
  89. package/dist/core/document.d.ts +99 -0
  90. package/dist/core/history.d.ts +26 -0
  91. package/dist/core/html-content-model.d.ts +32 -0
  92. package/dist/core/html-escape.d.ts +2 -0
  93. package/dist/core/rich-text-format.d.ts +14 -0
  94. package/dist/core/rich-text-markup.d.ts +28 -0
  95. package/dist/core/section-layout.d.ts +83 -0
  96. package/dist/generated-mjml-CtzE-f3v.js +1235 -0
  97. package/dist/generated-mjml-CtzE-f3v.js.map +1 -0
  98. package/dist/identity-CJHb6l9N.js +13759 -0
  99. package/dist/identity-CJHb6l9N.js.map +1 -0
  100. package/dist/renderers/canvas-bridge.d.ts +75 -0
  101. package/dist/renderers/canvas-icons.d.ts +1 -0
  102. package/dist/renderers/canvas-runtime.generated.d.ts +3 -0
  103. package/dist/renderers/element-source.d.ts +13 -0
  104. package/dist/renderers/email-renderer.d.ts +14 -0
  105. package/dist/renderers/marked-preview.d.ts +34 -0
  106. package/dist/renderers/markup-tree.d.ts +36 -0
  107. package/dist/renderers/page-renderer.d.ts +15 -0
  108. package/dist/renderers/preview-document.d.ts +39 -0
  109. package/dist/renderers/preview-frame.d.ts +102 -0
  110. package/dist/renderers/section-scaffold.d.ts +16 -0
  111. package/dist/renderers/selection-preview.d.ts +47 -0
  112. package/dist/rich-text/command-executor.d.ts +26 -0
  113. package/dist/rich-text/commands.d.ts +36 -0
  114. package/dist/rich-text/document-builder.d.ts +52 -0
  115. package/dist/rich-text/formatting.d.ts +17 -0
  116. package/dist/rich-text/projection-export.d.ts +17 -0
  117. package/dist/rich-text/projection-rules.d.ts +13 -0
  118. package/dist/rich-text/schema.d.ts +50 -0
  119. package/dist/rich-text/whitespace.d.ts +7 -0
  120. package/dist/security/bounded-parser.d.ts +18 -0
  121. package/dist/security/conditional-comment.d.ts +30 -0
  122. package/dist/security/content-inventory.d.ts +78 -0
  123. package/dist/security/email-sanitizer.d.ts +36 -0
  124. package/dist/security/identity.d.ts +6 -0
  125. package/dist/security/markup-rules.d.ts +31 -0
  126. package/dist/security/policy.d.ts +61 -0
  127. package/dist/security/preview-message.d.ts +317 -0
  128. package/dist/security/rich-text-projection.d.ts +19 -0
  129. package/dist/security/sha256.d.ts +6 -0
  130. package/dist/security/source-markup.d.ts +53 -0
  131. package/dist/security/text-presentation.d.ts +19 -0
  132. package/dist/security/url-policy.d.ts +23 -0
  133. package/dist/server-worker.js +17 -0
  134. package/dist/server-worker.js.map +1 -0
  135. package/dist/server.js +79 -0
  136. package/dist/server.js.map +1 -0
  137. package/dist/templates/blank-email.d.ts +6 -0
  138. package/dist/templates/blocks/catalog.d.ts +31 -0
  139. package/dist/templates/catalog.d.ts +31 -0
  140. package/dist/visual-editor.css +2 -0
  141. package/dist/vue/block-controller.d.ts +106 -0
  142. package/dist/vue/block-workbench.d.ts +70 -0
  143. package/dist/vue/canvas/canvas-theme.d.ts +8 -0
  144. package/dist/vue/canvas/file-drop.d.ts +38 -0
  145. package/dist/vue/canvas/frame-window.d.ts +26 -0
  146. package/dist/vue/canvas/inline-text.d.ts +98 -0
  147. package/dist/vue/canvas/palette-drag.d.ts +55 -0
  148. package/dist/vue/canvas/piece-requests.d.ts +48 -0
  149. package/dist/vue/canvas/strip-reserve.d.ts +14 -0
  150. package/dist/vue/canvas-content-label.d.ts +5 -0
  151. package/dist/vue/components/BlockVisualEditor.vue.d.ts +44 -0
  152. package/dist/vue/components/CanvasSurface.vue.d.ts +11 -0
  153. package/dist/vue/components/CodeEditor.vue.d.ts +22 -0
  154. package/dist/vue/components/EditorBlockMenus.vue.d.ts +3 -0
  155. package/dist/vue/components/EditorBlockPalette.vue.d.ts +3 -0
  156. package/dist/vue/components/EditorDiagnostics.vue.d.ts +3 -0
  157. package/dist/vue/components/EditorDialogs.vue.d.ts +16 -0
  158. package/dist/vue/components/EditorDocumentMetadata.vue.d.ts +3 -0
  159. package/dist/vue/components/EditorDocumentStyles.vue.d.ts +15 -0
  160. package/dist/vue/components/EditorImageSizeControls.vue.d.ts +23 -0
  161. package/dist/vue/components/EditorLayoutControls.vue.d.ts +16 -0
  162. package/dist/vue/components/EditorLeftPanel.vue.d.ts +3 -0
  163. package/dist/vue/components/EditorNoticeIndicator.vue.d.ts +3 -0
  164. package/dist/vue/components/EditorPreview.vue.d.ts +8 -0
  165. package/dist/vue/components/EditorProperties.vue.d.ts +14 -0
  166. package/dist/vue/components/EditorRichTextControls.vue.d.ts +25 -0
  167. package/dist/vue/components/EditorSelectionPath.vue.d.ts +11 -0
  168. package/dist/vue/components/EditorShortcutHelp.vue.d.ts +3 -0
  169. package/dist/vue/components/EditorSourcePane.vue.d.ts +3 -0
  170. package/dist/vue/components/EditorStructureTree.vue.d.ts +3 -0
  171. package/dist/vue/components/EditorTemplateGallery.vue.d.ts +15 -0
  172. package/dist/vue/components/EditorTopBar.vue.d.ts +33 -0
  173. package/dist/vue/components/RichTextEditor.vue.d.ts +47 -0
  174. package/dist/vue/components/SelectionPreviewFrame.vue.d.ts +212 -0
  175. package/dist/vue/components/VisualEditor.vue.d.ts +53 -0
  176. package/dist/vue/components/blocks/BlockCanvas.vue.d.ts +15 -0
  177. package/dist/vue/components/blocks/BlockFieldControl.vue.d.ts +39 -0
  178. package/dist/vue/components/blocks/BlockGlobalStyles.vue.d.ts +3 -0
  179. package/dist/vue/components/blocks/BlockPalette.vue.d.ts +6 -0
  180. package/dist/vue/components/blocks/BlockProperties.vue.d.ts +5 -0
  181. package/dist/vue/components/blocks/BlockReview.vue.d.ts +5 -0
  182. package/dist/vue/components/properties/EditorPropertyAdvanced.vue.d.ts +8 -0
  183. package/dist/vue/components/properties/EditorPropertyContent.vue.d.ts +13 -0
  184. package/dist/vue/components/properties/EditorPropertyStyle.vue.d.ts +8 -0
  185. package/dist/vue/components/ui/EditorAnchoredMenu.vue.d.ts +36 -0
  186. package/dist/vue/components/ui/EditorBadge.vue.d.ts +18 -0
  187. package/dist/vue/components/ui/EditorButton.vue.d.ts +28 -0
  188. package/dist/vue/components/ui/EditorCheckbox.vue.d.ts +13 -0
  189. package/dist/vue/components/ui/EditorColorInput.vue.d.ts +27 -0
  190. package/dist/vue/components/ui/EditorConfirmDialog.vue.d.ts +35 -0
  191. package/dist/vue/components/ui/EditorContextMenu.vue.d.ts +27 -0
  192. package/dist/vue/components/ui/EditorContextPopover.vue.d.ts +33 -0
  193. package/dist/vue/components/ui/EditorEmpty.vue.d.ts +8 -0
  194. package/dist/vue/components/ui/EditorField.vue.d.ts +24 -0
  195. package/dist/vue/components/ui/EditorGroup.vue.d.ts +16 -0
  196. package/dist/vue/components/ui/EditorIcon.vue.d.ts +6 -0
  197. package/dist/vue/components/ui/EditorIconButton.vue.d.ts +19 -0
  198. package/dist/vue/components/ui/EditorInput.vue.d.ts +41 -0
  199. package/dist/vue/components/ui/EditorKeys.vue.d.ts +6 -0
  200. package/dist/vue/components/ui/EditorMeasurement.vue.d.ts +34 -0
  201. package/dist/vue/components/ui/EditorMenu.vue.d.ts +56 -0
  202. package/dist/vue/components/ui/EditorNotice.vue.d.ts +30 -0
  203. package/dist/vue/components/ui/EditorPropertyGroup.vue.d.ts +22 -0
  204. package/dist/vue/components/ui/EditorRecoveryDialog.vue.d.ts +23 -0
  205. package/dist/vue/components/ui/EditorScrollArea.vue.d.ts +13 -0
  206. package/dist/vue/components/ui/EditorSelect.vue.d.ts +25 -0
  207. package/dist/vue/components/ui/EditorSeparator.vue.d.ts +8 -0
  208. package/dist/vue/components/ui/EditorSidePanel.vue.d.ts +26 -0
  209. package/dist/vue/components/ui/EditorSwitch.vue.d.ts +12 -0
  210. package/dist/vue/components/ui/EditorTabs.vue.d.ts +28 -0
  211. package/dist/vue/components/ui/EditorTemplatePreview.vue.d.ts +9 -0
  212. package/dist/vue/components/ui/EditorTextToolbar.vue.d.ts +16 -0
  213. package/dist/vue/components/ui/EditorTree.vue.d.ts +37 -0
  214. package/dist/vue/components/ui/EditorUiProvider.vue.d.ts +13 -0
  215. package/dist/vue/components/ui/EditorVariablePicker.vue.d.ts +20 -0
  216. package/dist/vue/components/ui/color-style-value.d.ts +9 -0
  217. package/dist/vue/components/ui/composition-dismissal.d.ts +1 -0
  218. package/dist/vue/components/ui/editor-dialog-focus.d.ts +6 -0
  219. package/dist/vue/components/ui/numeric-style-value.d.ts +15 -0
  220. package/dist/vue/controller.d.ts +115 -0
  221. package/dist/vue/font-options.d.ts +6 -0
  222. package/dist/vue/icon-data.d.ts +233 -0
  223. package/dist/vue/icons.d.ts +5 -0
  224. package/dist/vue/locale.d.ts +7 -0
  225. package/dist/vue/outline.d.ts +26 -0
  226. package/dist/vue/projection-key.d.ts +7 -0
  227. package/dist/vue/properties/selection-properties.d.ts +40 -0
  228. package/dist/vue/properties/style-fields.d.ts +30 -0
  229. package/dist/vue/public.d.ts +14 -0
  230. package/dist/vue/recovery.d.ts +30 -0
  231. package/dist/vue/responsive-panel.d.ts +1 -0
  232. package/dist/vue/rich-text-commands.d.ts +29 -0
  233. package/dist/vue/services/block-command-definitions.d.ts +14 -0
  234. package/dist/vue/services/block-commands.d.ts +114 -0
  235. package/dist/vue/services/block-menu.d.ts +12 -0
  236. package/dist/vue/services/block-palette.d.ts +21 -0
  237. package/dist/vue/services/block-presentation.d.ts +16 -0
  238. package/dist/vue/services/diagnostic-groups.d.ts +25 -0
  239. package/dist/vue/services/image-requests.d.ts +80 -0
  240. package/dist/vue/services/live-change.d.ts +26 -0
  241. package/dist/vue/services/property-commands.d.ts +28 -0
  242. package/dist/vue/services/saved-blocks.d.ts +32 -0
  243. package/dist/vue/services/selection-path.d.ts +20 -0
  244. package/dist/vue/services/shortcuts.d.ts +39 -0
  245. package/dist/vue/services/structure-tree.d.ts +38 -0
  246. package/dist/vue/services/template-application.d.ts +33 -0
  247. package/dist/vue/services/tree-drag.d.ts +28 -0
  248. package/dist/vue/session/blocks.d.ts +44 -0
  249. package/dist/vue/session/guard.d.ts +13 -0
  250. package/dist/vue/session/structure.d.ts +36 -0
  251. package/dist/vue/session/text.d.ts +23 -0
  252. package/dist/vue/session/transfer.d.ts +23 -0
  253. package/dist/vue/theme.d.ts +20 -0
  254. package/dist/vue/variables.d.ts +21 -0
  255. package/dist/vue/workbench.d.ts +100 -0
  256. package/dist/vue.js +71418 -0
  257. package/dist/vue.js.map +1 -0
  258. package/package.json +125 -4
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ };
4
+ declare var __VLS_8: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_8) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ name: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ icon: string;
3
+ label: string;
4
+ /** Keys of the shortcut, shown in the tip: `['meta', 'Z']`. */
5
+ kbds?: readonly string[];
6
+ disabled?: boolean;
7
+ active?: boolean | undefined;
8
+ intent?: 'neutral' | 'primary' | 'destructive';
9
+ size?: 'xs' | 'sm' | 'md';
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ size: "xs" | "sm" | "md";
13
+ intent: "neutral" | "primary" | "destructive";
14
+ disabled: boolean;
15
+ active: boolean | undefined;
16
+ kbds: readonly string[];
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,41 @@
1
+ type __VLS_Props = {
2
+ modelValue?: string;
3
+ id?: string;
4
+ disabled?: boolean;
5
+ type?: 'text' | 'url' | 'number' | 'search';
6
+ placeholder?: string;
7
+ min?: number | undefined;
8
+ max?: number | undefined;
9
+ step?: number | 'any' | undefined;
10
+ invalid?: boolean;
11
+ label?: string;
12
+ icon?: string;
13
+ /** Emits `change` shortly after each keystroke instead of waiting for Enter or blur. */
14
+ live?: boolean;
15
+ };
16
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ blur: () => any;
18
+ change: (value: string) => any;
19
+ focus: () => any;
20
+ "update:modelValue": (value: string) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onBlur?: () => any;
23
+ onChange?: (value: string) => any;
24
+ onFocus?: () => any;
25
+ "onUpdate:modelValue"?: (value: string) => any;
26
+ }>, {
27
+ type: "text" | "url" | "number" | "search";
28
+ id: string;
29
+ min: number | undefined;
30
+ max: number | undefined;
31
+ label: string;
32
+ invalid: boolean;
33
+ icon: string;
34
+ modelValue: string;
35
+ disabled: boolean;
36
+ placeholder: string;
37
+ step: number | "any" | undefined;
38
+ live: boolean;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ keys: readonly string[];
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import type { EditorLocale } from '../../locale';
2
+ type __VLS_Props = {
3
+ modelValue: string;
4
+ id: string;
5
+ locale: EditorLocale;
6
+ units?: readonly string[];
7
+ minimum?: number;
8
+ maximum?: number;
9
+ maximumByUnit?: Readonly<Record<string, number>>;
10
+ disabled?: boolean;
11
+ label?: string;
12
+ mixed?: boolean;
13
+ inherited?: boolean;
14
+ inheritedLabel?: string;
15
+ resetLabel?: string;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ change: (value: string) => any;
19
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onChange?: (value: string) => any;
21
+ }>, {
22
+ label: string;
23
+ mixed: boolean;
24
+ disabled: boolean;
25
+ inherited: boolean;
26
+ inheritedLabel: string;
27
+ resetLabel: string;
28
+ units: readonly string[];
29
+ minimum: number;
30
+ maximum: number;
31
+ maximumByUnit: Readonly<Record<string, number>>;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
@@ -0,0 +1,56 @@
1
+ export interface EditorMenuItem {
2
+ readonly id: string;
3
+ readonly label: string;
4
+ readonly icon?: string;
5
+ readonly description?: string;
6
+ readonly disabled?: boolean;
7
+ readonly danger?: boolean;
8
+ readonly kbds?: readonly string[];
9
+ /** Items with the same group stay together, between separators. */
10
+ readonly group?: number | string;
11
+ /** A heading instead of a choice. */
12
+ readonly heading?: boolean;
13
+ /** An option which is on or off; choosing it keeps the menu open. */
14
+ readonly checked?: boolean;
15
+ /** With `checked`: one choice among the items of its group, with the state the primitive draws. */
16
+ readonly radio?: boolean;
17
+ }
18
+ type __VLS_Props = {
19
+ items: readonly EditorMenuItem[];
20
+ label: string;
21
+ open?: boolean | undefined;
22
+ /** A search field above the items. */
23
+ filter?: boolean;
24
+ filterPlaceholder?: string;
25
+ align?: 'start' | 'center' | 'end';
26
+ side?: 'top' | 'bottom' | 'left' | 'right';
27
+ disabled?: boolean;
28
+ };
29
+ declare var __VLS_11: {}, __VLS_14: {};
30
+ type __VLS_Slots = {} & {
31
+ default?: (props: typeof __VLS_11) => any;
32
+ } & {
33
+ empty?: (props: typeof __VLS_14) => any;
34
+ };
35
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ select: (id: string) => any;
37
+ "update:open": (open: boolean) => any;
38
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
39
+ onSelect?: (id: string) => any;
40
+ "onUpdate:open"?: (open: boolean) => any;
41
+ }>, {
42
+ filter: boolean;
43
+ open: boolean | undefined;
44
+ align: "start" | "center" | "end";
45
+ disabled: boolean;
46
+ side: "top" | "bottom" | "left" | "right";
47
+ filterPlaceholder: string;
48
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
49
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
50
+ declare const _default: typeof __VLS_export;
51
+ export default _default;
52
+ type __VLS_WithSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
@@ -0,0 +1,30 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ tone?: 'warning' | 'error' | 'info';
4
+ icon?: string;
5
+ /** Label of the button which dismisses the notice; without it the notice stays. */
6
+ dismissLabel?: string;
7
+ };
8
+ declare var __VLS_11: {}, __VLS_14: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_11) => any;
11
+ } & {
12
+ actions?: (props: typeof __VLS_14) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ dismiss: () => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onDismiss?: () => any;
18
+ }>, {
19
+ icon: string;
20
+ tone: "warning" | "error" | "info";
21
+ dismissLabel: string;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,22 @@
1
+ export interface EditorPropertyGroupItem {
2
+ readonly id: string;
3
+ readonly label: string;
4
+ readonly openByDefault?: boolean;
5
+ }
6
+ type __VLS_Props = {
7
+ groups: readonly EditorPropertyGroupItem[];
8
+ contextId: string;
9
+ };
10
+ declare var __VLS_12: string, __VLS_13: {};
11
+ type __VLS_Slots = {} & {
12
+ [K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,23 @@
1
+ import type { EditorLocale } from '../../locale';
2
+ type __VLS_Props = {
3
+ open: boolean;
4
+ html: string;
5
+ readOnly: boolean;
6
+ locale: EditorLocale;
7
+ invalid: boolean;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ download: () => any;
11
+ "update:open": (open: boolean) => any;
12
+ apply: () => any;
13
+ "update:html": (html: string) => any;
14
+ discard: () => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ onDownload?: () => any;
17
+ "onUpdate:open"?: (open: boolean) => any;
18
+ onApply?: () => any;
19
+ "onUpdate:html"?: (html: string) => any;
20
+ onDiscard?: () => any;
21
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,25 @@
1
+ export interface EditorSelectItem {
2
+ readonly label: string;
3
+ readonly value: string;
4
+ readonly disabled?: boolean;
5
+ }
6
+ type __VLS_Props = {
7
+ modelValue: string;
8
+ items: readonly EditorSelectItem[];
9
+ id?: string;
10
+ disabled?: boolean;
11
+ label?: string;
12
+ invalid?: boolean;
13
+ };
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ change: (value: string) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onChange?: (value: string) => any;
18
+ }>, {
19
+ id: string;
20
+ label: string;
21
+ invalid: boolean;
22
+ disabled: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ orientation?: 'horizontal' | 'vertical';
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
+ orientation: "horizontal" | "vertical";
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ id: string;
3
+ open: boolean;
4
+ mobile: boolean;
5
+ label: string;
6
+ closeLabel: string;
7
+ returnFocus?: HTMLElement | undefined;
8
+ side?: 'left' | 'right';
9
+ };
10
+ declare var __VLS_7: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_7) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "update:open": (open: boolean) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onUpdate:open"?: (open: boolean) => any;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ modelValue: boolean;
3
+ label: string;
4
+ disabled?: boolean;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: boolean) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ "onUpdate:modelValue"?: (value: boolean) => any;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,28 @@
1
+ export interface EditorTabItem {
2
+ readonly value: string;
3
+ readonly label: string;
4
+ readonly icon?: string;
5
+ readonly disabled?: boolean;
6
+ }
7
+ type __VLS_Props = {
8
+ modelValue: string;
9
+ items: readonly EditorTabItem[];
10
+ label: string;
11
+ };
12
+ declare var __VLS_12: string, __VLS_13: {};
13
+ type __VLS_Slots = {} & {
14
+ [K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ "update:modelValue": (value: string) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ "onUpdate:modelValue"?: (value: string) => any;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,9 @@
1
+ import type { DocumentKind } from '../../../core/document';
2
+ type __VLS_Props = {
3
+ html: string;
4
+ kind: DocumentKind;
5
+ title: string;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import type { RichTextToggleName } from '../../../rich-text/commands';
2
+ import type { EditorLocale } from '../../locale';
3
+ type __VLS_Props = {
4
+ locale: EditorLocale;
5
+ readonly: boolean;
6
+ allowBlocks: boolean;
7
+ minimal: boolean;
8
+ active: readonly RichTextToggleName[];
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ command: (command: "undo" | "redo" | "bold" | "italic" | "underline" | "strike" | "color" | "fontFamily" | "fontSize" | "lineHeight" | "cancel" | "superscript" | "subscript" | "bulletList" | "orderedList" | "backgroundColor" | "clearFormatting" | "setLink" | "unsetLink" | "insertText" | "finish") => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onCommand?: (command: "undo" | "redo" | "bold" | "italic" | "underline" | "strike" | "color" | "fontFamily" | "fontSize" | "lineHeight" | "cancel" | "superscript" | "subscript" | "bulletList" | "orderedList" | "backgroundColor" | "clearFormatting" | "setLink" | "unsetLink" | "insertText" | "finish") => any;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,37 @@
1
+ export interface EditorTreeNode {
2
+ readonly id: string;
3
+ readonly label: string;
4
+ readonly detail?: string;
5
+ readonly icon: string;
6
+ readonly children?: EditorTreeNode[];
7
+ }
8
+ declare const __VLS_export: <T extends EditorTreeNode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
9
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
10
+ items: T[];
11
+ selectedId?: string | undefined;
12
+ expanded: string[];
13
+ label: string;
14
+ /** Draws only the rows on screen; for pieces with hundreds of blocks. */
15
+ virtualize?: boolean;
16
+ /** A click was the end of a drag: it neither selects nor folds. */
17
+ suppressClick?: () => boolean;
18
+ } & {
19
+ onSelect?: (id: string) => any;
20
+ "onUpdate:expanded"?: (ids: string[]) => any;
21
+ }> & (typeof globalThis extends {
22
+ __VLS_PROPS_FALLBACK: infer P;
23
+ } ? P : {});
24
+ expose: (exposed: {}) => void;
25
+ attrs: any;
26
+ slots: {};
27
+ emit: ((evt: "select", id: string) => void) & ((evt: "update:expanded", ids: string[]) => void);
28
+ }>) => import("vue").VNode & {
29
+ __ctx?: Awaited<typeof __VLS_setup>;
30
+ };
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
34
+ [K in keyof T]: T[K];
35
+ } : {
36
+ [K in keyof T as K]: T[K];
37
+ }) & {};
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,20 @@
1
+ import type { EditorLocale } from '../../locale';
2
+ import type { EditorVariable } from '../../variables';
3
+ export type { EditorVariable } from '../../variables';
4
+ type __VLS_Props = {
5
+ variables: readonly EditorVariable[];
6
+ purpose: 'text' | 'url';
7
+ locale: EditorLocale;
8
+ disabled: boolean;
9
+ /** Why nothing can be inserted right now; shown instead of a control which only looks off. */
10
+ hint?: string;
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ insert: (key: string) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onInsert?: (key: string) => any;
16
+ }>, {
17
+ hint: string;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,9 @@
1
+ /** Normalizes bounded inert colors without replacing source values the picker cannot represent. */
2
+ export declare class ColorStyleValue {
3
+ private readonly hexadecimal;
4
+ normalize(input: string): string | undefined;
5
+ opaque(input: string): string | undefined;
6
+ preserveAlpha(input: string, source: string): string | undefined;
7
+ opacity(input: string): number;
8
+ withOpacity(input: string, opacity: number): string | undefined;
9
+ }
@@ -0,0 +1 @@
1
+ export declare const preserveComposingEscape: (event: KeyboardEvent) => void;
@@ -0,0 +1,6 @@
1
+ export declare class EditorDialogFocus {
2
+ private previous;
3
+ private content;
4
+ open(event: Event, initialSelector?: string): void;
5
+ close(event: Event, preferred?: HTMLElement): void;
6
+ }
@@ -0,0 +1,15 @@
1
+ export interface NumericStyle {
2
+ readonly amount: number;
3
+ readonly unit: string;
4
+ }
5
+ /** Numeric controls preserve unsupported CSS until the user changes the value. */
6
+ export declare class NumericStyleValue {
7
+ private readonly units;
8
+ private readonly minimum;
9
+ private readonly maximum;
10
+ private readonly maximumByUnit;
11
+ constructor(units: readonly string[], minimum?: number, maximum?: number, maximumByUnit?: Readonly<Record<string, number>>);
12
+ parse(input: string): NumericStyle | undefined;
13
+ create(amount: string, unit: string): string | undefined;
14
+ private valid;
15
+ }
@@ -0,0 +1,115 @@
1
+ import type { EditorSession } from '../application/session';
2
+ import type { DocumentStyleProperty, ImageSizeSettings } from '../application/document-presentation';
3
+ import type { AssetReference } from '../application/host';
4
+ import type { SectionLayoutContext, SectionLayoutPatch } from '../core/section-layout';
5
+ import type { ImageLinkContext, ImageLinkOptions } from '../application/image-link';
6
+ import type { DocumentKind, SourceInput } from '../core/document';
7
+ import { BlockCatalog } from '../core/catalog';
8
+ import { CanvasLayout } from '../core/canvas-layout';
9
+ import type { CanvasMovementTarget, CanvasPlacement } from '../core/canvas-layout';
10
+ import type { TemplateCatalog } from '../templates/catalog';
11
+ import type { HtmlAssemblyPort } from '../renderers/preview-document';
12
+ import { UrlPolicy } from '../security/url-policy';
13
+ import type { PropertyCapabilities } from './session/structure';
14
+ export type EditorViewState = ReturnType<EditorSession['getState']>;
15
+ /**
16
+ * Translates presentation actions to application commands; owns no document state. It is the
17
+ * facade the shell and the host know: each group of commands lives in a collaborator of its own
18
+ * (`session/structure`, `text`, `blocks`, `transfer`, `guard`).
19
+ */
20
+ export declare class EditorController {
21
+ readonly session: EditorSession;
22
+ private readonly templates;
23
+ private readonly assembler;
24
+ private readonly urls;
25
+ private readonly structure;
26
+ private readonly texts;
27
+ private readonly blockCommands;
28
+ private readonly transfer;
29
+ private readonly guard;
30
+ constructor(session: EditorSession, templates: TemplateCatalog, assembler: HtmlAssemblyPort, urls?: UrlPolicy,
31
+ /** The catalog and the layout of the editor it serves; its own when used alone. */
32
+ shared?: {
33
+ readonly catalog?: BlockCatalog;
34
+ readonly layout?: CanvasLayout;
35
+ });
36
+ state(): EditorViewState;
37
+ subscribe(listener: (state: EditorViewState) => void): () => void;
38
+ entries(): readonly import("./outline").OutlineEntry[];
39
+ canvasRegions(): readonly import("../core/canvas-layout").CanvasRegion[];
40
+ resolveSelection(id: string): import("../core/canvas-layout").CanvasRegion | undefined;
41
+ movementTargets(sourceId: string): readonly CanvasMovementTarget[];
42
+ /** Where a new block may be dropped, by block and side; the command validates again. */
43
+ insertionTargets(): readonly CanvasMovementTarget[];
44
+ /** The closest selectable block which contains `id`. */
45
+ parentOf(id: string): string | undefined;
46
+ selected(): import("./outline").OutlineEntry | undefined;
47
+ propertyCapabilities(): PropertyCapabilities | undefined;
48
+ text(): string;
49
+ richText(): string | undefined;
50
+ richTextFor(id: string): string | undefined;
51
+ richTextAllowsBlocks(): boolean;
52
+ richTextAllowsBlocksFor(id: string): boolean;
53
+ beginRichText(id: string): boolean;
54
+ updateRichTextDraft(html: string): boolean;
55
+ commitRichText(): boolean;
56
+ cancelRichText(): void;
57
+ inlineStyles(id: string): Readonly<Record<string, string>>;
58
+ style(property: string, fallback?: string): string;
59
+ linkPolicy(): UrlPolicy;
60
+ templateList(): readonly import("../templates/catalog").TemplateDescriptor[];
61
+ templatePreview(id: string): Promise<string>;
62
+ blocks(kind: DocumentKind): readonly string[];
63
+ applyTemplate(id: string): Promise<boolean>;
64
+ addBlock(type: string, targetId?: string, placement?: CanvasPlacement): Promise<boolean>;
65
+ /** Adds a block at the end of the content, whatever is selected. */
66
+ appendBlock(type: string): Promise<boolean>;
67
+ /** Inserts markup next to a block: the paste of a copied block. */
68
+ insertSource(source: SourceInput, targetId?: string, placement?: CanvasPlacement): boolean;
69
+ /** Inserts markup at the end of the content, whatever is selected. */
70
+ appendSource(source: SourceInput): boolean;
71
+ /** Replaces the whole source through the ordinary import: one validated history step. */
72
+ replaceSource(source: SourceInput): boolean;
73
+ addBlockAt(type: string, targetId: string, placement?: CanvasPlacement): Promise<boolean>;
74
+ setDraft(field: keyof SourceInput, value: string): void;
75
+ applyDraft(): boolean;
76
+ discardDraft(): void;
77
+ setMode(mode: 'visual' | 'html'): boolean;
78
+ select(id: string): boolean;
79
+ imageSize(): import("../application/document-presentation").ImageSizeContext | undefined;
80
+ updateImageSize(settings: ImageSizeSettings): boolean;
81
+ /** A resize made on the piece: the stored proportion wins over the measured height. */
82
+ resizeImage(id: string, width: number, height: number): boolean;
83
+ documentStyles(): import("../application/document-presentation").DocumentStyleContext | undefined;
84
+ /** Title and, in an e-mail, the preview text shown next to the subject. */
85
+ documentMetadata(): import("../application/document-metadata").DocumentMetadata | undefined;
86
+ updateTitle(value: string): boolean;
87
+ updatePreheader(value: string): boolean;
88
+ updateDocumentStyle(property: DocumentStyleProperty, value: string): boolean;
89
+ updateText(value: string): boolean;
90
+ updateRichText(value: string): boolean;
91
+ updateRichTextFor(id: string, value: string): boolean;
92
+ updateAttribute(name: string, value: string): boolean;
93
+ connectFormReference(reference: string, nodeId?: string): boolean;
94
+ attachAsset(asset: AssetReference, nodeId?: string): boolean;
95
+ imageLink(): ImageLinkContext | undefined;
96
+ updateImageLink(href: string, options?: ImageLinkOptions): boolean;
97
+ layoutSettings(): SectionLayoutContext | undefined;
98
+ updateLayout(patch: SectionLayoutPatch): Promise<boolean>;
99
+ updateStyle(property: string, value: string): boolean;
100
+ duplicate(): boolean;
101
+ remove(): boolean;
102
+ move(direction: -1 | 1): boolean;
103
+ moveTo(sourceId: string, targetId: string, placement: CanvasPlacement): boolean;
104
+ applyCanvasAction(id: string, action: 'duplicate' | 'remove' | 'up' | 'down'): boolean;
105
+ drop(sourceId: string, targetId: string): boolean;
106
+ undo(): boolean;
107
+ redo(): boolean;
108
+ exportSource(): SourceInput;
109
+ exportHtml(): string;
110
+ previewHtml(): string;
111
+ exportJson(): string;
112
+ exportRecovery(): string;
113
+ importFile(file: File): Promise<boolean>;
114
+ importRecovery(value: unknown): boolean;
115
+ }