@skylivellc/lienzo-editor 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -2
  3. package/THIRD_PARTY_NOTICES.md +101 -0
  4. package/dist/LienzoEditor-tPV_sD5K.js +8988 -0
  5. package/dist/LienzoEditor-tPV_sD5K.js.map +1 -0
  6. package/dist/element.js +12 -0
  7. package/dist/element.js.map +1 -0
  8. package/dist/index.js +2 -0
  9. package/dist/standalone/lienzo-editor.js +389 -0
  10. package/dist/standalone/lienzo-editor.js.map +1 -0
  11. package/dist/types/LienzoEditor.vue.d.ts +21 -0
  12. package/dist/types/canvas/Canvas.vue.d.ts +14 -0
  13. package/dist/types/canvas/ContextMenu.vue.d.ts +18 -0
  14. package/dist/types/canvas/Overlay.vue.d.ts +38 -0
  15. package/dist/types/canvas/Preview.vue.d.ts +3 -0
  16. package/dist/types/canvas/frame.d.ts +52 -0
  17. package/dist/types/canvas/frameCss.d.ts +6 -0
  18. package/dist/types/canvas/render.d.ts +37 -0
  19. package/dist/types/client.d.ts +48 -0
  20. package/dist/types/dialogs/ConflictDialog.vue.d.ts +3 -0
  21. package/dist/types/dialogs/MediaLibrary.vue.d.ts +3 -0
  22. package/dist/types/dialogs/NewPageDialog.vue.d.ts +3 -0
  23. package/dist/types/dialogs/SiteDialog.vue.d.ts +3 -0
  24. package/dist/types/dialogs/SubmissionsDialog.vue.d.ts +3 -0
  25. package/dist/types/dialogs/ThemeDialog.vue.d.ts +3 -0
  26. package/dist/types/dialogs/VersionsDialog.vue.d.ts +3 -0
  27. package/dist/types/element.d.ts +21 -0
  28. package/dist/types/i18n/en.d.ts +535 -0
  29. package/dist/types/i18n/es.d.ts +2 -0
  30. package/dist/types/i18n/index.d.ts +18 -0
  31. package/dist/types/index.d.ts +7 -0
  32. package/dist/types/model/document.d.ts +46 -0
  33. package/dist/types/model/elements.d.ts +280 -0
  34. package/dist/types/model/geometry.d.ts +74 -0
  35. package/dist/types/model/history.d.ts +17 -0
  36. package/dist/types/model/icons.d.ts +5 -0
  37. package/dist/types/model/templates.d.ts +29 -0
  38. package/dist/types/model/theme.d.ts +40 -0
  39. package/dist/types/panels/ActionPicker.vue.d.ts +25 -0
  40. package/dist/types/panels/AlignButtons.vue.d.ts +3 -0
  41. package/dist/types/panels/DesignPanel.vue.d.ts +3 -0
  42. package/dist/types/panels/ElementPanel.vue.d.ts +8 -0
  43. package/dist/types/panels/FieldControl.vue.d.ts +18 -0
  44. package/dist/types/panels/GradientEditor.vue.d.ts +24 -0
  45. package/dist/types/panels/ModalPanel.vue.d.ts +8 -0
  46. package/dist/types/panels/MultiPanel.vue.d.ts +3 -0
  47. package/dist/types/panels/PagePanel.vue.d.ts +3 -0
  48. package/dist/types/panels/SectionPanel.vue.d.ts +8 -0
  49. package/dist/types/panels/actions.d.ts +52 -0
  50. package/dist/types/panels/content/AppContent.vue.d.ts +9 -0
  51. package/dist/types/panels/content/ButtonContent.vue.d.ts +7 -0
  52. package/dist/types/panels/content/FormFieldContent.vue.d.ts +8 -0
  53. package/dist/types/panels/content/IconContent.vue.d.ts +7 -0
  54. package/dist/types/panels/content/ImageContent.vue.d.ts +7 -0
  55. package/dist/types/panels/content/NavbarContent.vue.d.ts +7 -0
  56. package/dist/types/panels/content/ShapeContent.vue.d.ts +7 -0
  57. package/dist/types/panels/content/TextContent.vue.d.ts +8 -0
  58. package/dist/types/panels/content/VideoContent.vue.d.ts +7 -0
  59. package/dist/types/panels/content/shapes.d.ts +9 -0
  60. package/dist/types/panels/style/FillStyle.vue.d.ts +7 -0
  61. package/dist/types/panels/style/FrameStyle.vue.d.ts +7 -0
  62. package/dist/types/panels/style/MotionStyle.vue.d.ts +7 -0
  63. package/dist/types/panels/style/PositionSection.vue.d.ts +8 -0
  64. package/dist/types/panels/style/TextStyle.vue.d.ts +7 -0
  65. package/dist/types/panels/style/TransformStyle.vue.d.ts +7 -0
  66. package/dist/types/shell/ElementIcon.vue.d.ts +11 -0
  67. package/dist/types/shell/LeftSidebar.vue.d.ts +11 -0
  68. package/dist/types/shell/RightPanel.vue.d.ts +3 -0
  69. package/dist/types/shell/Toolbar.vue.d.ts +3 -0
  70. package/dist/types/shell/typeIcons.d.ts +4 -0
  71. package/dist/types/state/autosave.d.ts +63 -0
  72. package/dist/types/state/editor.d.ts +1010 -0
  73. package/dist/types/state/previews.d.ts +26 -0
  74. package/dist/types/state/shortcuts.d.ts +7 -0
  75. package/dist/types/styles/index.d.ts +8 -0
  76. package/dist/types/ui/Button.vue.d.ts +25 -0
  77. package/dist/types/ui/CatalogIcon.vue.d.ts +12 -0
  78. package/dist/types/ui/ColorPicker.vue.d.ts +20 -0
  79. package/dist/types/ui/Dialog.vue.d.ts +33 -0
  80. package/dist/types/ui/Field.vue.d.ts +24 -0
  81. package/dist/types/ui/IconButton.vue.d.ts +24 -0
  82. package/dist/types/ui/ImageField.vue.d.ts +27 -0
  83. package/dist/types/ui/NumberInput.vue.d.ts +22 -0
  84. package/dist/types/ui/PanelSection.vue.d.ts +20 -0
  85. package/dist/types/ui/RangeInput.vue.d.ts +26 -0
  86. package/dist/types/ui/SelectInput.vue.d.ts +33 -0
  87. package/dist/types/ui/TextInput.vue.d.ts +32 -0
  88. package/dist/types/ui/Toasts.vue.d.ts +3 -0
  89. package/dist/types/ui/Toggle.vue.d.ts +17 -0
  90. package/package.json +67 -3
@@ -0,0 +1,21 @@
1
+ import { type MessageOverrides } from './i18n/index.ts';
2
+ /**
3
+ * The Lienzo editor. Give it the protocol `endpoint` of a backend (see
4
+ * `@skylivellc/lienzo-core/protocol`); everything else is optional. Props are
5
+ * read once, when the editor mounts.
6
+ */
7
+ type __VLS_Props = {
8
+ /** Base URL of the protocol, for example `/admin/site/lienzo`. */
9
+ endpoint: string;
10
+ /** Language of the editor itself. Defaults to English. */
11
+ locale?: string;
12
+ /** Extra or overriding strings by locale; partial packs fall back to English per key. */
13
+ messages?: MessageOverrides;
14
+ /** Extra request headers, such as a bearer token. Session cookies and Laravel's XSRF token work without any. */
15
+ headers?: Record<string, string>;
16
+ /** A fetch implementation to use instead of the global one. */
17
+ fetch?: typeof fetch;
18
+ };
19
+ 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>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Where a drop from the palette lands: the canvas under the pointer and the
3
+ * position inside it, in design units. Null outside every canvas.
4
+ */
5
+ declare function dropPoint(clientX: number, clientY: number): {
6
+ canvas: string;
7
+ x: number;
8
+ y: number;
9
+ } | null;
10
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
11
+ dropPoint: typeof dropPoint;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The menu a right click opens on the canvas. It carries the actions that
3
+ * apply to what is selected, so the right panel keeps only the settings of
4
+ * the element.
5
+ */
6
+ type __VLS_Props = {
7
+ at: {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ close: () => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onClose?: (() => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { type Guides, type Handle } from '../model/geometry.ts';
2
+ import type { Layout, Rect } from './frame.ts';
3
+ /**
4
+ * Editing adornments drawn over the canvas iframe in the same design pixels:
5
+ * selection boxes, handles, guides, the element toolbar. They are scaled
6
+ * back up (`--inv`) so they keep their screen size at any zoom.
7
+ */
8
+ type __VLS_Props = {
9
+ layout: Layout;
10
+ scale: number;
11
+ hovered: string | null;
12
+ guides: {
13
+ canvas: string;
14
+ lines: Guides;
15
+ } | null;
16
+ /** Elements whose box a gesture is changing, drawn from the live box. */
17
+ live: ReadonlyMap<string, Rect>;
18
+ /** Canvases where elements cannot be dragged (stacked on phones). */
19
+ frozen: ReadonlySet<string>;
20
+ /** An angle being dragged, shown before the document has it. */
21
+ rotation: {
22
+ id: string;
23
+ value: number;
24
+ } | null;
25
+ };
26
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ radius: (event: PointerEvent) => any;
28
+ rotate: (event: PointerEvent) => any;
29
+ resize: (event: PointerEvent, handle: Handle) => any;
30
+ generateMobile: (canvas: string) => any;
31
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
+ onRadius?: ((event: PointerEvent) => any) | undefined;
33
+ onRotate?: ((event: PointerEvent) => any) | undefined;
34
+ onResize?: ((event: PointerEvent, handle: Handle) => any) | undefined;
35
+ onGenerateMobile?: ((canvas: string) => any) | undefined;
36
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
+ declare const _default: typeof __VLS_export;
38
+ 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,52 @@
1
+ import type { Box, Document as Draft } from '@skylivellc/lienzo-core';
2
+ import { type Device } from '../model/document.ts';
3
+ /** A rectangle in the iframe document, in CSS pixels of the design frame. */
4
+ export type Rect = {
5
+ x: number;
6
+ y: number;
7
+ w: number;
8
+ h: number;
9
+ };
10
+ /** Where a canvas sits on screen and how its design units map to pixels. */
11
+ export type CanvasMetrics = {
12
+ /** The canvas's `.lz-frame`: the box element positions are relative to. */
13
+ frame: Rect;
14
+ /** Pixels per design pixel vertically (`--u`). */
15
+ unit: number;
16
+ /** The section or the modal dialog, for outlines. */
17
+ outer: Rect;
18
+ };
19
+ export type Layout = {
20
+ canvases: ReadonlyMap<string, CanvasMetrics>;
21
+ elements: ReadonlyMap<string, Rect>;
22
+ };
23
+ export type FrameView = {
24
+ /** The modal shown instead of the page, or null for the page. */
25
+ modal: string | null;
26
+ /** Visible panel per tab or step group. */
27
+ panels: Readonly<Record<string, number>>;
28
+ fontsHref: string;
29
+ emptyImage: string;
30
+ emptyVideo: string;
31
+ };
32
+ /**
33
+ * The canvas iframe: a blank same-origin document holding `lienzo.css`, the
34
+ * editor overrides and the page body core rendered. `update` patches only
35
+ * the top-level blocks whose markup changed, so untouched sections keep
36
+ * their DOM (no video reloads, no image flashes) while one is edited.
37
+ */
38
+ export declare function mountFrame(iframe: HTMLIFrameElement): {
39
+ doc: Document;
40
+ update: (html: string, css: string, document: Draft, view: FrameView) => void;
41
+ measure: (document: Draft, device: Device) => Layout;
42
+ hit: (target: EventTarget | null) => {
43
+ canvas: string;
44
+ element: string | null;
45
+ node: HTMLElement;
46
+ } | null;
47
+ preview: (id: string, device: Device, box: Box) => void;
48
+ /** Sets one custom property on an element during a gesture (rotation, corners). */
49
+ previewVar: (id: string, name: string, value: number) => void | undefined;
50
+ contentHeight: () => number;
51
+ };
52
+ export type CanvasFrame = ReturnType<typeof mountFrame>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Editor-only rules layered over `lienzo.css` inside the canvas iframe. They
3
+ * change behavior, never looks: links and embeds go inert, sticky navbars
4
+ * and parallax images stay in place, and empty media show what to do.
5
+ */
6
+ export declare const frameCss = "\nhtml,body{margin:0}\nbody{overflow:hidden}\n.lz-el{cursor:default;user-select:none;-webkit-user-select:none}\n.lz-el[contenteditable]{cursor:text;user-select:text;-webkit-user-select:text;outline:none}\n.lz-el iframe,.lz-el input,.lz-el select,.lz-el textarea,.lz-el summary,.lz-el a,.lz-el button{pointer-events:none}\n.lz-navbar[data-sticky]{position:absolute;translate:none;left:calc(var(--x) * 1%);top:calc(var(--y) * var(--u));width:calc(var(--w) * 1%)}\n@container lz (max-width:640px){\n.lz-frame:not([data-stack]) .lz-navbar[data-sticky]{left:calc(var(--mx) * 1%);top:calc(var(--my) * var(--u));width:calc(var(--mw) * 1%)}\n.lz-frame[data-stack] .lz-navbar[data-sticky]{position:static;width:auto}\n}\n.lz-parallax>.lz-bg{position:absolute}\n.lz-stack-nav button{cursor:pointer}\nimg.lz-el[src=\"\"]::before,.lz-video:empty::before{position:absolute;inset:0;display:grid;place-items:center;padding:8px;text-align:center;border:1px dashed #94a3b8;border-radius:inherit;background:#f8fafc;color:#64748b;font:12px/1.3 system-ui,sans-serif}\nimg.lz-el[src=\"\"]::before{content:var(--lze-empty-image)}\n.lz-frame[data-stack] img.lz-el[src=\"\"]{position:relative;min-height:120px}\n.lz-video:empty::before{content:var(--lze-empty-video)}\n.lze-app-placeholder{display:grid;place-items:center;height:100%;padding:8px;text-align:center;border:1px dashed #94a3b8;border-radius:inherit;background:#f8fafc;color:#64748b;font:12px/1.3 system-ui,sans-serif}\n.lze-app-placeholder[data-status=loading]{animation:lze-pulse 1.2s ease-in-out infinite}\n@keyframes lze-pulse{50%{opacity:.55}}\nbody[data-lze-modal] .lz-section,body[data-lze-modal] .lz-stack,body[data-lze-modal] .lz-notice{display:none}\nbody[data-lze-modal] dialog.lz-modal[data-lze-open]{display:block;position:static;margin:16px auto;max-height:none;overflow:visible;box-shadow:0 12px 40px rgba(15,23,42,.18)}\nbody[data-lze-modal] dialog.lz-modal[data-lze-open][data-size=full]{margin:0}\n";
@@ -0,0 +1,37 @@
1
+ import { type AppElement, type Catalog, type Document, type Issue, type Parsed, type RenderedPage, type SiteSettings } from '@skylivellc/lienzo-core';
2
+ import type { Asset } from '@skylivellc/lienzo-core/protocol';
3
+ import type { Editor } from '../state/editor.ts';
4
+ import type { Preview } from '../state/previews.ts';
5
+ export type RenderContext = {
6
+ catalog: Catalog;
7
+ site: Parsed<SiteSettings>;
8
+ assets: readonly Asset[];
9
+ slug: string;
10
+ publicUrl: string | null;
11
+ preview(element: AppElement): Preview;
12
+ /** Placeholder texts for app elements whose preview is not there yet. */
13
+ labels: {
14
+ loading: string;
15
+ failed: string;
16
+ };
17
+ };
18
+ /** What rendering needs from the editor: the canvas and the preview read the same. */
19
+ export declare function renderContext(editor: Editor): RenderContext;
20
+ export type Rendered = {
21
+ ok: true;
22
+ page: RenderedPage;
23
+ } | {
24
+ ok: false;
25
+ issues: Issue[];
26
+ };
27
+ /**
28
+ * The page through core, exactly as the public page renders it: `edit` for
29
+ * the canvas (no runtime, no entrance animations, placeholders for missing
30
+ * plugins), `public` for the preview. App elements show the HTML the backend
31
+ * rendered for the same props, or a placeholder while it loads. A draft that
32
+ * does not parse reports its issues instead of rendering.
33
+ */
34
+ export declare function renderDraft(draft: Document, context: RenderContext, mode: 'edit' | 'public'): Promise<Rendered>;
35
+ export declare const escapeHtml: (value: string) => string;
36
+ /** Core's rule for ids in HTML and CSS, so the canvas finds what it rendered. */
37
+ export declare const domId: (id: string) => string;
@@ -0,0 +1,48 @@
1
+ import type { Issue } from '@skylivellc/lienzo-core';
2
+ import type { Protocol, Route } from '@skylivellc/lienzo-core/protocol';
3
+ /** Why a request did not succeed. Every caller handles each kind, so none is ever silent. */
4
+ export type Failure = {
5
+ kind: 'offline';
6
+ } | {
7
+ kind: 'conflict';
8
+ message: string;
9
+ revision: number;
10
+ } | {
11
+ kind: 'invalid';
12
+ message: string;
13
+ issues: Issue[];
14
+ } | {
15
+ kind: 'http';
16
+ status: number;
17
+ message: string;
18
+ };
19
+ export type Result<T> = {
20
+ ok: true;
21
+ value: T;
22
+ } | {
23
+ ok: false;
24
+ failure: Failure;
25
+ };
26
+ /** `'PUT /pages/:id/versions/:version'` → `'id' | 'version'`. */
27
+ type ParamNames<P extends string> = P extends `${string}:${infer Name}/${infer Rest}` ? Name | ParamNames<`/${Rest}`> : P extends `${string}:${infer Name}` ? Name : never;
28
+ export type Params<R extends Route> = {
29
+ [K in ParamNames<R>]: string | number;
30
+ };
31
+ export type Body<R extends Route> = 'req' extends keyof Protocol[R] ? Protocol[R]['req' & keyof Protocol[R]] : undefined;
32
+ export type Response<R extends Route> = Protocol[R]['res'];
33
+ type BodyArgs<R extends Route> = undefined extends Body<R> ? [body?: Body<R>] : [body: Body<R>];
34
+ /** A route call: params only when the path has some, a body only when the route takes one. */
35
+ export type Client = <R extends Route>(route: R, ...args: [ParamNames<R>] extends [never] ? BodyArgs<R> : [params: Params<R>, ...BodyArgs<R>]) => Promise<Result<Response<R>>>;
36
+ export type ClientOptions = {
37
+ endpoint: string;
38
+ headers?: Record<string, string>;
39
+ fetch?: typeof fetch;
40
+ };
41
+ /**
42
+ * Typed fetch over the protocol. Never retries writes and never throws:
43
+ * a 409 becomes `conflict`, a 422 `invalid`, a network error `offline`.
44
+ * Laravel's `XSRF-TOKEN` cookie is echoed as `X-XSRF-TOKEN`, like axios does,
45
+ * so session-authenticated backends need no extra setup.
46
+ */
47
+ export declare function createClient({ endpoint, headers, fetch: fetcher }: ClientOptions): Client;
48
+ export {};
@@ -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,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,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,21 @@
1
+ /**
2
+ * `<lienzo-editor endpoint="/admin/lienzo" locale="es">`. Attributes:
3
+ * `endpoint`, `locale`. Properties: `messages`, `headers`, `fetch`. The
4
+ * editor renders in a shadow root, so host page CSS does not reach it.
5
+ * Set the properties before the element is attached; like the component's
6
+ * props, they are read once.
7
+ */
8
+ export declare const LienzoEditorElement: import("vue").VueElementConstructor<{
9
+ endpoint: string;
10
+ locale?: string;
11
+ messages?: import("./index.ts").MessageOverrides;
12
+ headers?: Record<string, string>;
13
+ fetch?: typeof fetch;
14
+ }>;
15
+ /** Registers the element under `tag`, once. The side-effect import registers `lienzo-editor`. */
16
+ export declare function defineLienzoEditor(tag?: string): void;
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ 'lienzo-editor': InstanceType<typeof LienzoEditorElement>;
20
+ }
21
+ }