@skylivellc/lienzo-editor 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +61 -2
- package/THIRD_PARTY_NOTICES.md +101 -0
- package/dist/LienzoEditor-CQyoS5M0.js +8503 -0
- package/dist/LienzoEditor-CQyoS5M0.js.map +1 -0
- package/dist/element.js +12 -0
- package/dist/element.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/standalone/lienzo-editor.js +377 -0
- package/dist/standalone/lienzo-editor.js.map +1 -0
- package/dist/types/LienzoEditor.vue.d.ts +21 -0
- package/dist/types/canvas/Canvas.vue.d.ts +14 -0
- package/dist/types/canvas/Overlay.vue.d.ts +38 -0
- package/dist/types/canvas/Preview.vue.d.ts +3 -0
- package/dist/types/canvas/frame.d.ts +52 -0
- package/dist/types/canvas/frameCss.d.ts +6 -0
- package/dist/types/canvas/render.d.ts +37 -0
- package/dist/types/client.d.ts +48 -0
- package/dist/types/dialogs/ConflictDialog.vue.d.ts +3 -0
- package/dist/types/dialogs/MediaLibrary.vue.d.ts +3 -0
- package/dist/types/dialogs/NewPageDialog.vue.d.ts +3 -0
- package/dist/types/dialogs/SiteDialog.vue.d.ts +3 -0
- package/dist/types/dialogs/SubmissionsDialog.vue.d.ts +3 -0
- package/dist/types/dialogs/ThemeDialog.vue.d.ts +3 -0
- package/dist/types/dialogs/VersionsDialog.vue.d.ts +3 -0
- package/dist/types/element.d.ts +21 -0
- package/dist/types/i18n/en.d.ts +512 -0
- package/dist/types/i18n/es.d.ts +2 -0
- package/dist/types/i18n/index.d.ts +18 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/model/document.d.ts +46 -0
- package/dist/types/model/elements.d.ts +280 -0
- package/dist/types/model/geometry.d.ts +74 -0
- package/dist/types/model/history.d.ts +17 -0
- package/dist/types/model/icons.d.ts +5 -0
- package/dist/types/model/templates.d.ts +29 -0
- package/dist/types/model/theme.d.ts +40 -0
- package/dist/types/panels/ActionPicker.vue.d.ts +25 -0
- package/dist/types/panels/AlignButtons.vue.d.ts +3 -0
- package/dist/types/panels/DesignPanel.vue.d.ts +3 -0
- package/dist/types/panels/ElementPanel.vue.d.ts +8 -0
- package/dist/types/panels/FieldControl.vue.d.ts +18 -0
- package/dist/types/panels/GradientEditor.vue.d.ts +24 -0
- package/dist/types/panels/ModalPanel.vue.d.ts +8 -0
- package/dist/types/panels/MultiPanel.vue.d.ts +3 -0
- package/dist/types/panels/PagePanel.vue.d.ts +3 -0
- package/dist/types/panels/SectionPanel.vue.d.ts +8 -0
- package/dist/types/panels/actions.d.ts +52 -0
- package/dist/types/panels/content/AppContent.vue.d.ts +9 -0
- package/dist/types/panels/content/ButtonContent.vue.d.ts +7 -0
- package/dist/types/panels/content/FormFieldContent.vue.d.ts +8 -0
- package/dist/types/panels/content/IconContent.vue.d.ts +7 -0
- package/dist/types/panels/content/ImageContent.vue.d.ts +7 -0
- package/dist/types/panels/content/NavbarContent.vue.d.ts +7 -0
- package/dist/types/panels/content/ShapeContent.vue.d.ts +7 -0
- package/dist/types/panels/content/TextContent.vue.d.ts +8 -0
- package/dist/types/panels/content/VideoContent.vue.d.ts +7 -0
- package/dist/types/panels/content/shapes.d.ts +9 -0
- package/dist/types/panels/style/FillStyle.vue.d.ts +7 -0
- package/dist/types/panels/style/FrameStyle.vue.d.ts +7 -0
- package/dist/types/panels/style/MotionStyle.vue.d.ts +7 -0
- package/dist/types/panels/style/PositionSection.vue.d.ts +8 -0
- package/dist/types/panels/style/TextStyle.vue.d.ts +7 -0
- package/dist/types/panels/style/TransformStyle.vue.d.ts +7 -0
- package/dist/types/shell/ElementIcon.vue.d.ts +11 -0
- package/dist/types/shell/LeftSidebar.vue.d.ts +11 -0
- package/dist/types/shell/RightPanel.vue.d.ts +3 -0
- package/dist/types/shell/Toolbar.vue.d.ts +3 -0
- package/dist/types/shell/typeIcons.d.ts +4 -0
- package/dist/types/state/autosave.d.ts +63 -0
- package/dist/types/state/editor.d.ts +993 -0
- package/dist/types/state/previews.d.ts +26 -0
- package/dist/types/state/shortcuts.d.ts +7 -0
- package/dist/types/styles/index.d.ts +8 -0
- package/dist/types/ui/Button.vue.d.ts +25 -0
- package/dist/types/ui/CatalogIcon.vue.d.ts +12 -0
- package/dist/types/ui/ColorPicker.vue.d.ts +20 -0
- package/dist/types/ui/Dialog.vue.d.ts +33 -0
- package/dist/types/ui/Field.vue.d.ts +24 -0
- package/dist/types/ui/IconButton.vue.d.ts +24 -0
- package/dist/types/ui/ImageField.vue.d.ts +27 -0
- package/dist/types/ui/NumberInput.vue.d.ts +22 -0
- package/dist/types/ui/PanelSection.vue.d.ts +20 -0
- package/dist/types/ui/RangeInput.vue.d.ts +26 -0
- package/dist/types/ui/SelectInput.vue.d.ts +33 -0
- package/dist/types/ui/TextInput.vue.d.ts +32 -0
- package/dist/types/ui/Toasts.vue.d.ts +3 -0
- package/dist/types/ui/Toggle.vue.d.ts +17 -0
- package/package.json +67 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreElement } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: CoreElement;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreElement } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: CoreElement;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreElement } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: CoreElement;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CoreElement } from '@skylivellc/lienzo-core';
|
|
2
|
+
/** Heading and text: the copy, a highlighted part, and for headings their level. */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
element: CoreElement;
|
|
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,7 @@
|
|
|
1
|
+
import type { CoreElement } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: CoreElement;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CoreProps } from '@skylivellc/lienzo-core';
|
|
2
|
+
import type { Translator } from '../../i18n/index.ts';
|
|
3
|
+
type Shape = NonNullable<CoreProps['shape']>;
|
|
4
|
+
/** Shapes of a shape element, which are also the crops of an image. */
|
|
5
|
+
export declare const shapeOptions: (t: Translator["t"]) => {
|
|
6
|
+
value: Shape;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Element } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: Element;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Element } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: Element;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Element } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: Element;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Element } from '@skylivellc/lienzo-core';
|
|
2
|
+
/** Where the element sits on the device being edited. On a phone it may follow the desktop box. */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
element: Element;
|
|
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,7 @@
|
|
|
1
|
+
import type { Element } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: Element;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Element } from '@skylivellc/lienzo-core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: Element;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Element } from '@skylivellc/lienzo-core';
|
|
2
|
+
/** The icon of an element's type: lucide for core types, the catalog icon the app chose for its own. */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
element: Element;
|
|
5
|
+
size?: number;
|
|
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<{}>, {
|
|
8
|
+
size: number;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Left sidebar: what to add, the layer tree, the modals, and the media library. */
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
dropPoint: (clientX: number, clientY: number) => {
|
|
4
|
+
canvas: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
} | null;
|
|
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,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,63 @@
|
|
|
1
|
+
import type { Issue } from '@skylivellc/lienzo-core';
|
|
2
|
+
import { type ShallowRef } from 'vue';
|
|
3
|
+
import type { Failure } from '../client.ts';
|
|
4
|
+
/** Where the draft stands against the server. Exactly one of these at a time. */
|
|
5
|
+
export type SaveState = {
|
|
6
|
+
kind: 'saved';
|
|
7
|
+
at: Date | null;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'pending';
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'saving';
|
|
12
|
+
}
|
|
13
|
+
/** The network is down; retries on its own. */
|
|
14
|
+
| {
|
|
15
|
+
kind: 'offline';
|
|
16
|
+
}
|
|
17
|
+
/** The server failed; retries on the next change or on demand. */
|
|
18
|
+
| {
|
|
19
|
+
kind: 'failed';
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
/** The server rejected some values; retries on the next change. */
|
|
23
|
+
| {
|
|
24
|
+
kind: 'invalid';
|
|
25
|
+
issues: Issue[];
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
/** Someone else saved first. Nothing is saved again until the page reloads. */
|
|
29
|
+
| {
|
|
30
|
+
kind: 'conflict';
|
|
31
|
+
};
|
|
32
|
+
export type Outcome = {
|
|
33
|
+
ok: true;
|
|
34
|
+
} | {
|
|
35
|
+
ok: false;
|
|
36
|
+
failure: Failure;
|
|
37
|
+
};
|
|
38
|
+
export type AutosaveOptions<T> = {
|
|
39
|
+
/** A detached copy of everything autosaved, as plain data. */
|
|
40
|
+
read(): T;
|
|
41
|
+
/** Sends a copy taken by `read`. */
|
|
42
|
+
save(value: T): Promise<Outcome>;
|
|
43
|
+
delay?: number;
|
|
44
|
+
offlineRetry?: number;
|
|
45
|
+
};
|
|
46
|
+
export type Autosave = {
|
|
47
|
+
readonly state: ShallowRef<SaveState>;
|
|
48
|
+
/** Something may have changed: saves `delay` ms after the last call, if the snapshot differs from the saved one. */
|
|
49
|
+
changed(): void;
|
|
50
|
+
/** Saves now and waits. True when everything is saved. */
|
|
51
|
+
flush(): Promise<boolean>;
|
|
52
|
+
/** Flushes, then runs `task` while no autosave can start, so writes never interleave. */
|
|
53
|
+
exclusive<T>(task: () => Promise<T>): Promise<T>;
|
|
54
|
+
/** Starts over from what `read` gives now, known to be on the server (after a load or a reload). A save still in flight no longer counts. */
|
|
55
|
+
reset(): void;
|
|
56
|
+
dispose(): void;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Debounced saving with one write in flight at a time. A change during a
|
|
60
|
+
* save is saved right after it. A failure keeps the draft and says why;
|
|
61
|
+
* offline retries every few seconds, a conflict stops for good.
|
|
62
|
+
*/
|
|
63
|
+
export declare function createAutosave<T>({ read, save, delay, offlineRetry }: AutosaveOptions<T>): Autosave;
|