@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,98 @@
1
+ import type { Ref } from 'vue';
2
+ import type { RichTextCommandName } from '../../rich-text/commands';
3
+ import type { CanvasTextState } from '../../security/preview-message';
4
+ import type { EditorController } from '../controller';
5
+ /**
6
+ * The owner of the text transaction: the controller of an HTML document, or of a block piece.
7
+ * Both open a text, take its drafts, confirm or cancel it.
8
+ */
9
+ export interface InlineTextOwner {
10
+ linkPolicy(): ReturnType<EditorController['linkPolicy']>;
11
+ state(): {
12
+ readonly pendingRichText?: {
13
+ readonly id: string;
14
+ } | undefined;
15
+ readonly document: {
16
+ readonly revision: number;
17
+ };
18
+ readonly readOnly: boolean;
19
+ };
20
+ select(id: string): boolean;
21
+ beginRichText(id: string): boolean;
22
+ updateRichTextDraft(html: string): boolean;
23
+ commitRichText(): boolean;
24
+ cancelRichText(): void;
25
+ }
26
+ import { RemoteRichTextCommands } from '../rich-text-commands';
27
+ /** What the coordinator asks of the preview frame; all of it travels as typed messages. */
28
+ export interface InlineTextFrame {
29
+ textCommand(command: RichTextCommandName, value: string | null): void;
30
+ rejectText(nodeId: string, reason: 'begin' | 'draft' | 'commit'): void;
31
+ openText(nodeId: string): void;
32
+ focusText(): void;
33
+ refresh(): void;
34
+ }
35
+ export interface InlineTextPorts {
36
+ controller(): InlineTextOwner;
37
+ frame(): InlineTextFrame | undefined;
38
+ readOnly(): boolean;
39
+ /** The edition began on a block: the shell follows the selection. */
40
+ selected(id: string): void;
41
+ changed(): void;
42
+ failed(): void;
43
+ }
44
+ /**
45
+ * The host side of a text edited in its own element inside the frame. The frame holds the latest
46
+ * text; the session holds the transaction. This class keeps both in step: it opens and closes the
47
+ * transaction, hands drafts over and waits for the frame before another command touches the
48
+ * document.
49
+ */
50
+ export declare class InlineTextCoordinator {
51
+ #private;
52
+ private readonly ports;
53
+ readonly editingId: Ref<string | undefined>;
54
+ readonly fidelity: Ref<number | undefined>;
55
+ readonly remote: RemoteRichTextCommands;
56
+ constructor(ports: InlineTextPorts);
57
+ private settle;
58
+ private leave;
59
+ private fail;
60
+ /** Without an answer from the frame, the session confirms the last text it received. */
61
+ private confirmOwnCopy;
62
+ /**
63
+ * Concludes the edition before another command. The frame holds the latest text, so the host
64
+ * asks it to finish and waits for its commit; the session's own copy is only the fallback.
65
+ */
66
+ flush(): Promise<boolean>;
67
+ cancel(): void;
68
+ begin(id: string): Promise<void>;
69
+ /** Text only travels inside the transaction which text-begin opened for that same node. */
70
+ private drafting;
71
+ textBegin(id: string): void;
72
+ textDraft(value: {
73
+ nodeId: string;
74
+ html: string;
75
+ }): void;
76
+ textCommit(value: {
77
+ nodeId: string;
78
+ html: string;
79
+ }): void;
80
+ textCancel(id: string): void;
81
+ textState(value: {
82
+ nodeId: string;
83
+ state: CanvasTextState;
84
+ }): void;
85
+ /** The window was rebuilt: the editor inside it is gone and its text stays with the session. */
86
+ frameReset(): void;
87
+ /**
88
+ * The session is the truth: when its transaction ends by any other path (a panel change, a
89
+ * selection, a save), the host leaves the edition and tells the frame to leave it too.
90
+ */
91
+ sessionMoved(pendingId: string | undefined): void;
92
+ /** Another controller took the editor: the text of the one being left is never dropped. */
93
+ ownerChanged(previous: InlineTextOwner): void;
94
+ canHistory(direction: 'undo' | 'redo'): boolean;
95
+ history(direction: 'undo' | 'redo'): boolean;
96
+ insertText(value: string): boolean;
97
+ dispose(): void;
98
+ }
@@ -0,0 +1,55 @@
1
+ import type { ShallowRef } from 'vue';
2
+ export interface PaletteFrame {
3
+ /** `file`: an image file is dragged, which replaces an image it is dropped on. */
4
+ trackInsertion(point: {
5
+ x: number;
6
+ y: number;
7
+ }, file?: boolean): void;
8
+ commitInsertion(point: {
9
+ x: number;
10
+ y: number;
11
+ }, file?: boolean): void;
12
+ cancelInsertion(): void;
13
+ getFrameElement(): HTMLIFrameElement | undefined;
14
+ }
15
+ export interface PaletteDragPorts {
16
+ frame(): PaletteFrame | undefined;
17
+ readOnly(): boolean;
18
+ accepts(type: string): boolean;
19
+ /** The gesture begins: a text being edited is concluded and the valid destinations are sent. */
20
+ begin(): void;
21
+ }
22
+ interface Gesture {
23
+ readonly type: string;
24
+ readonly pointerId: number;
25
+ readonly x: number;
26
+ readonly y: number;
27
+ readonly active: boolean;
28
+ readonly capture: HTMLElement;
29
+ }
30
+ /**
31
+ * A block dragged from the palette to the piece. The pointer stays with the palette button; the
32
+ * frame only receives points and answers with the destination it found under the last one.
33
+ */
34
+ export declare class PaletteDrag {
35
+ #private;
36
+ private readonly ports;
37
+ readonly gesture: ShallowRef<Gesture | undefined>;
38
+ constructor(ports: PaletteDragPorts);
39
+ /** The type waiting for the answer of the frame after a drop. */
40
+ get pendingType(): string | undefined;
41
+ get active(): boolean;
42
+ private listen;
43
+ private release;
44
+ cancel(): void;
45
+ private interrupted;
46
+ private key;
47
+ private point;
48
+ private track;
49
+ private finish;
50
+ /** A press on a palette block: it becomes a drag only after the pointer travels. */
51
+ start(type: string, event: PointerEvent): void;
52
+ /** True once after a drag, so the click which ends it does not insert a second block. */
53
+ dragged(): boolean;
54
+ }
55
+ export {};
@@ -0,0 +1,48 @@
1
+ import type { CanvasBlockAction } from '../../core/canvas-contract';
2
+ import type { CanvasBounds } from '../../security/preview-message';
3
+ import type { BlockCommandService } from '../services/block-commands';
4
+ import type { ImageRequestService } from '../services/image-requests';
5
+ export interface PieceRequestPorts {
6
+ commands: BlockCommandService;
7
+ images: ImageRequestService;
8
+ readOnly(): boolean;
9
+ /** A rectangle of the frame in the coordinates of the page. */
10
+ pageRect(bounds: CanvasBounds): CanvasBounds | undefined;
11
+ /** The image file whose destination the frame has just answered; taken once. */
12
+ takeFile(): File | undefined;
13
+ /** Gives the keyboard back to the selected block in the frame, unless it went elsewhere. */
14
+ returnFocus(origin: Element | null): void;
15
+ }
16
+ /**
17
+ * What the frame of the piece asks the shell to open or do for a block: its menu, the block
18
+ * picker, an action of its bar, a file dropped on an image. Every request of the keyboard brings
19
+ * the keyboard back to the piece when the shell is done with it.
20
+ */
21
+ export declare class PieceRequests {
22
+ private readonly ports;
23
+ constructor(ports: PieceRequestPorts);
24
+ /**
25
+ * Gives the keyboard back once the layers of the shell are gone: the primitives put it on
26
+ * their own triggers as they close, a frame or two later.
27
+ */
28
+ private giveBack;
29
+ action(value: {
30
+ nodeId: string;
31
+ action: CanvasBlockAction;
32
+ }): void;
33
+ /** The "+" of a block or Alt + Enter: the picker opens next to the block. */
34
+ insert(value: {
35
+ nodeId: string;
36
+ bounds: CanvasBounds;
37
+ keyboard: boolean;
38
+ }): void;
39
+ /** The menu of a block; asked with the keyboard, its first item takes the keyboard. */
40
+ menu(value: {
41
+ nodeId: string;
42
+ x: number;
43
+ y: number;
44
+ keyboard: boolean;
45
+ }): void;
46
+ /** An image file dropped over an image: the upload of the host replaces that image. */
47
+ imageDrop(nodeId: string): void;
48
+ }
@@ -0,0 +1,14 @@
1
+ import type { Ref } from 'vue';
2
+ /**
3
+ * The height the formatting strip keeps, at the width it has. Its controls change with the text
4
+ * being edited (blocks, links) and wrap differently in each engine. Were the strip to shrink when
5
+ * an edition ends, the piece under it would jump up between the press and the release of the
6
+ * click which ended it, and that click would land on another element than the one pressed: the
7
+ * engine then sends it to their common ancestor, and the text clicked does not open.
8
+ */
9
+ export declare class StripReserve {
10
+ #private;
11
+ readonly height: Ref<number>;
12
+ watch(strip: HTMLElement): void;
13
+ dispose(): void;
14
+ }
@@ -0,0 +1,5 @@
1
+ import type { CanvasRegion } from '../core/canvas-layout';
2
+ /** Names structural selections by their editing role without exposing HTML tags. */
3
+ export declare class CanvasContentLabel {
4
+ key(region: CanvasRegion): string;
5
+ }
@@ -0,0 +1,44 @@
1
+ import type { BlockDocumentData } from '../../core/block-document';
2
+ import type { SelectionPreviewRenderer } from '../../renderers/selection-preview';
3
+ import type { BlockEditorController } from '../block-controller';
4
+ import type { EditorMessages } from '../locale';
5
+ import type { EditorThemeOptions } from '../theme';
6
+ import type { EditorImagePicker } from '../services/image-requests';
7
+ import type { EditorSavedBlocks } from '../services/saved-blocks';
8
+ import type { EditorVariable } from '../variables';
9
+ /**
10
+ * The editor of a block piece (schema 2): the palette and templates on the left, the piece in
11
+ * the editing frame, generated from the blocks, and the panel of the selected block (or of the
12
+ * global styles) on the right. It sits beside `VisualEditor`, which edits HTML documents.
13
+ */
14
+ type __VLS_Props = {
15
+ controller: BlockEditorController;
16
+ selectionRenderer: SelectionPreviewRenderer;
17
+ messages?: EditorMessages;
18
+ theme?: EditorThemeOptions;
19
+ imagePicker?: EditorImagePicker;
20
+ /** Blocks saved in the library of the host to use again; without it the palette has no such section. */
21
+ savedBlocks?: EditorSavedBlocks;
22
+ variables?: readonly EditorVariable[];
23
+ /** Test mode of the frame runtime. */
24
+ diagnostics?: boolean;
25
+ };
26
+ declare var __VLS_7: {};
27
+ type __VLS_Slots = {} & {
28
+ brand?: (props: typeof __VLS_7) => any;
29
+ };
30
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ error: (code: string) => any;
32
+ save: (document: BlockDocumentData) => any;
33
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
34
+ onError?: (code: string) => any;
35
+ onSave?: (document: BlockDocumentData) => any;
36
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
38
+ declare const _default: typeof __VLS_export;
39
+ export default _default;
40
+ type __VLS_WithSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,11 @@
1
+ import type { SelectionPreviewRenderer } from '../../renderers/selection-preview';
2
+ import type { EditorController } from '../controller';
3
+ type __VLS_Props = {
4
+ controller: EditorController;
5
+ renderer: SelectionPreviewRenderer;
6
+ /** Test mode of the frame runtime. */
7
+ diagnostics?: boolean;
8
+ };
9
+ 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>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ modelValue: string;
3
+ language: 'html' | 'css';
4
+ label: string;
5
+ description?: string;
6
+ error?: string;
7
+ readonly?: boolean;
8
+ /** Long lines continue on the next one instead of scrolling sideways. */
9
+ wrap?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: string) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: (value: string) => any;
15
+ }>, {
16
+ error: string;
17
+ readonly: boolean;
18
+ description: string;
19
+ wrap: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Every question the shell asks before changing the document: remove a block, apply a model,
3
+ * review a refused text, edit the HTML of one element, choose an image by its address.
4
+ */
5
+ type __VLS_Props = {
6
+ recoveryOpen: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
9
+ downloadRecovery: () => void;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:recoveryOpen": (open: boolean) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:recoveryOpen"?: (open: boolean) => any;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import type { DocumentStyleContext, DocumentStyleProperty } from '../../application/document-presentation';
2
+ import type { EditorLocale } from '../locale';
3
+ type __VLS_Props = {
4
+ context: DocumentStyleContext | undefined;
5
+ locale: EditorLocale;
6
+ disabled: boolean;
7
+ errors: Readonly<Partial<Record<DocumentStyleProperty, string>>>;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ change: (property: "color" | "background-color" | "font-family" | "font-size" | "line-height", value: string) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onChange?: (property: "color" | "background-color" | "font-family" | "font-size" | "line-height", value: string) => any;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { ImageSizeContext } from '../../application/document-presentation';
2
+ import type { EditorLocale } from '../locale';
3
+ type __VLS_Props = {
4
+ context: ImageSizeContext;
5
+ locale: EditorLocale;
6
+ disabled: boolean;
7
+ error: string;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ change: (settings: {
11
+ width: number;
12
+ height?: number;
13
+ preserveRatio?: boolean;
14
+ }) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ onChange?: (settings: {
17
+ width: number;
18
+ height?: number;
19
+ preserveRatio?: boolean;
20
+ }) => any;
21
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import type { SectionLayoutContext, SectionLayoutPatch } from '../../core/section-layout';
2
+ import type { EditorLocale } from '../locale';
3
+ type __VLS_Props = {
4
+ context: SectionLayoutContext;
5
+ locale: EditorLocale;
6
+ disabled: boolean;
7
+ busy: boolean;
8
+ error: string;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ change: (patch: SectionLayoutPatch) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onChange?: (patch: SectionLayoutPatch) => any;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ html: string;
3
+ label: string;
4
+ width: 'mobile' | 'tablet' | 'desktop';
5
+ };
6
+ 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>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The panel of the selected block, in three tabs. With nothing selected it shows the defaults of
3
+ * the whole document. It holds no document logic: every field applies through the controller.
4
+ */
5
+ type __VLS_Props = {
6
+ formPicker?: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "request-form": (nodeId: string | undefined) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onRequest-form"?: (nodeId: string | undefined) => any;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import type { RichTextCommands } from '../../rich-text/commands';
2
+ import type { EditorLocale } from '../locale';
3
+ import type { EditorVariable } from '../variables';
4
+ type __VLS_Props = {
5
+ /** The local panel editor or the editor inside the preview frame. */
6
+ commands: RichTextCommands;
7
+ id: string;
8
+ locale: EditorLocale;
9
+ readonly?: boolean;
10
+ allowBlocks?: boolean;
11
+ allowLinks?: boolean;
12
+ minimal?: boolean;
13
+ variables?: readonly EditorVariable[];
14
+ };
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
16
+ dismiss: () => boolean;
17
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ readonly: boolean;
19
+ variables: readonly EditorVariable[];
20
+ allowBlocks: boolean;
21
+ minimal: boolean;
22
+ allowLinks: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { EditorController } from '../controller';
2
+ type __VLS_Props = {
3
+ controller: EditorController;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ select: (id: string) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onSelect?: (id: string) => any;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import type { EditorController } from '../controller';
2
+ import type { EditorLocale } from '../locale';
3
+ import type { TemplateChoice } from '../services/template-application';
4
+ type __VLS_Props = {
5
+ controller: EditorController;
6
+ locale: EditorLocale;
7
+ disabled: boolean;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ select: (value: TemplateChoice) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onSelect?: (value: TemplateChoice) => any;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,33 @@
1
+ /** The bar of the document: mode, history, preview width, file actions, state and saving. */
2
+ type __VLS_Props = {
3
+ assetPicker: boolean;
4
+ formPicker: boolean;
5
+ mobile: boolean;
6
+ leftOpen: boolean;
7
+ rightOpen: boolean;
8
+ leftPanelId: string;
9
+ rightPanelId: string;
10
+ };
11
+ declare var __VLS_1: {};
12
+ type __VLS_Slots = {} & {
13
+ brand?: (props: typeof __VLS_1) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
16
+ trigger: (side: "left" | "right") => HTMLElement | undefined;
17
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ "request-form": () => any;
19
+ "open-left": () => any;
20
+ "open-right": () => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ "onRequest-form"?: () => any;
23
+ "onOpen-left"?: () => any;
24
+ "onOpen-right"?: () => any;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,47 @@
1
+ import type { EditorLocale } from '../locale';
2
+ import { UrlPolicy } from '../../security/url-policy';
3
+ import type { EditorVariable } from '../variables';
4
+ type __VLS_Props = {
5
+ html: string;
6
+ readonly?: boolean;
7
+ allowBlocks?: boolean;
8
+ allowLinks?: boolean;
9
+ locale: EditorLocale;
10
+ minimal?: boolean;
11
+ autofocus?: boolean;
12
+ id?: string;
13
+ linkPolicy?: UrlPolicy | undefined;
14
+ variables?: readonly EditorVariable[];
15
+ };
16
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
17
+ insertText: (value: string) => boolean;
18
+ history: (direction: "undo" | "redo") => boolean;
19
+ canHistory: (direction: "undo" | "redo") => boolean;
20
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ error: (code: string) => any;
22
+ blur: () => any;
23
+ cancel: () => any;
24
+ change: (value: string) => any;
25
+ focus: () => any;
26
+ finish: () => any;
27
+ history: (direction: "undo" | "redo") => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ onError?: (code: string) => any;
30
+ onBlur?: () => any;
31
+ onCancel?: () => any;
32
+ onChange?: (value: string) => any;
33
+ onFocus?: () => any;
34
+ onFinish?: () => any;
35
+ onHistory?: (direction: "undo" | "redo") => any;
36
+ }>, {
37
+ id: string;
38
+ readonly: boolean;
39
+ variables: readonly EditorVariable[];
40
+ autofocus: boolean;
41
+ linkPolicy: UrlPolicy | undefined;
42
+ allowBlocks: boolean;
43
+ minimal: boolean;
44
+ allowLinks: boolean;
45
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;