@skylivellc/lienzo-editor 0.13.2 → 0.14.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.
- package/README.md +22 -0
- package/dist/{LienzoEditor-DO4NuwZG.js → LienzoEditor-BZdUqINz.js} +950 -933
- package/dist/LienzoEditor-BZdUqINz.js.map +1 -0
- package/dist/element.js +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/lienzo-editor.js +13 -13
- package/dist/standalone/lienzo-editor.js.map +1 -1
- package/dist/types/LienzoEditor.vue.d.ts +11 -1
- package/dist/types/client.d.ts +7 -0
- package/dist/types/shell/Toolbar.vue.d.ts +11 -1
- package/dist/types/state/autosave.d.ts +1 -0
- package/dist/types/state/editor.d.ts +2 -1
- package/package.json +2 -2
- package/dist/LienzoEditor-DO4NuwZG.js.map +0 -1
|
@@ -11,6 +11,16 @@ type __VLS_Props = {
|
|
|
11
11
|
/** A fetch implementation to use instead of the global one. */
|
|
12
12
|
fetch?: typeof fetch;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type __VLS_Slots = {
|
|
15
|
+
/** The host's own controls, such as a way back, at the start of the toolbar in every load state. On the custom element, a native slot. */
|
|
16
|
+
'toolbar-start'?: () => unknown;
|
|
17
|
+
};
|
|
18
|
+
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>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
20
|
declare const _default: typeof __VLS_export;
|
|
16
21
|
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
package/dist/types/client.d.ts
CHANGED
|
@@ -41,8 +41,15 @@ export type ClientOptions = {
|
|
|
41
41
|
/**
|
|
42
42
|
* Typed fetch over the protocol. Never retries writes and never throws:
|
|
43
43
|
* a 409 becomes `conflict`, a 422 `invalid`, a network error `offline`.
|
|
44
|
+
* JSON writes that fit go `keepalive`, so they outlive the page.
|
|
44
45
|
* Laravel's `XSRF-TOKEN` cookie is echoed as `X-XSRF-TOKEN`, like axios does,
|
|
45
46
|
* so session-authenticated backends need no extra setup.
|
|
46
47
|
*/
|
|
47
48
|
export declare function createClient({ endpoint, headers, fetch: fetcher }: ClientOptions): Client;
|
|
49
|
+
/**
|
|
50
|
+
* Whether a JSON body can go `keepalive`, so a write sent as the page goes away
|
|
51
|
+
* still arrives. Browsers cap the bodies of all keepalive requests in flight
|
|
52
|
+
* together at 64 KiB.
|
|
53
|
+
*/
|
|
54
|
+
export declare const fitsKeepalive: (payload: string) => boolean;
|
|
48
55
|
export {};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
start?: (props: typeof __VLS_1) => 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>;
|
|
2
7
|
declare const _default: typeof __VLS_export;
|
|
3
8
|
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -53,6 +53,7 @@ export type Autosave = {
|
|
|
53
53
|
exclusive<T>(task: () => Promise<T>): Promise<T>;
|
|
54
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
55
|
reset(): void;
|
|
56
|
+
/** Stops for good, sending what is not saved yet first. Nothing is retried after. */
|
|
56
57
|
dispose(): void;
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Catalog, type Document, type Element, type Issue, type Modal, type Parsed, type Section, type SiteSettings, type Theme } from '@skylivellc/lienzo-core';
|
|
2
2
|
import type { Asset, PageVersion, SiteUpdate, Workspace } from '@skylivellc/lienzo-core/protocol';
|
|
3
3
|
import { type InjectionKey, type WritableComputedRef } from 'vue';
|
|
4
|
-
import type
|
|
4
|
+
import { type Client, type Failure } from '../client.ts';
|
|
5
5
|
import type { Translator } from '../i18n/index.ts';
|
|
6
6
|
import { type Canvas, type Device } from '../model/document.ts';
|
|
7
7
|
import { type Insertable } from '../model/elements.ts';
|
|
@@ -3268,6 +3268,7 @@ export declare function createEditor({ client, i18n }: EditorDeps): {
|
|
|
3268
3268
|
openModal: (id: string | null) => void;
|
|
3269
3269
|
removeModal: (id: string) => void;
|
|
3270
3270
|
saveNow: () => Promise<void>;
|
|
3271
|
+
leavingLosesEdits: () => boolean;
|
|
3271
3272
|
publish: () => Promise<void>;
|
|
3272
3273
|
restoreVersion: (version: number) => Promise<void>;
|
|
3273
3274
|
createPage: (title: string, slug: string) => Promise<Issue[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skylivellc/lienzo-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Visual editor for Lienzo landing pages. A Vue 3 component and a <lienzo-editor> custom element that talk to any backend over the Lienzo protocol.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"landing-page",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@lucide/vue": "^1.52.0",
|
|
47
|
-
"@skylivellc/lienzo-core": "0.
|
|
47
|
+
"@skylivellc/lienzo-core": "0.14.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@playwright/test": "1.63.0",
|