@dotcms/uve 0.0.1-beta.2 → 0.0.1-beta.21
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 +321 -4
- package/index.cjs.d.ts +1 -1
- package/index.cjs.js +10 -54
- package/index.cjs2.js +1151 -0
- package/index.esm.d.ts +1 -1
- package/index.esm.js +2 -56
- package/index.esm2.js +1119 -0
- package/internal.cjs.d.ts +1 -0
- package/internal.cjs.default.js +1 -0
- package/internal.cjs.js +39 -0
- package/internal.cjs.mjs +2 -0
- package/internal.esm.d.ts +1 -0
- package/internal.esm.js +2 -0
- package/package.json +26 -7
- package/src/index.d.ts +2 -0
- package/src/internal/constants.d.ts +76 -0
- package/src/internal/events.d.ts +66 -0
- package/src/internal/index.d.ts +1 -0
- package/src/internal.d.ts +6 -0
- package/src/lib/{utils.d.ts → core/core.utils.d.ts} +20 -1
- package/src/lib/dom/dom.utils.d.ts +206 -0
- package/src/lib/editor/internal.d.ts +23 -0
- package/src/lib/editor/public.d.ts +62 -0
- package/src/lib/types/block-editor-renderer/internal.d.ts +46 -0
- package/src/lib/types/block-editor-renderer/public.d.ts +38 -0
- package/src/lib/types/editor/internal.d.ts +119 -0
- package/src/lib/types/editor/public.d.ts +271 -0
- package/src/lib/types/events/internal.d.ts +34 -0
- package/src/lib/types/events/public.d.ts +18 -0
- package/src/lib/types/page/public.d.ts +485 -0
- package/src/script/sdk-editor.d.ts +6 -0
- package/src/script/utils.d.ts +53 -0
- package/src/types.d.ts +4 -0
- package/types.cjs.d.ts +1 -1
- package/types.cjs.js +97 -4
- package/types.esm.d.ts +1 -1
- package/types.esm.js +98 -5
- package/src/lib/types.d.ts +0 -33
- package/src/public/index.d.ts +0 -2
- package/src/public/types.d.ts +0 -2
package/types.esm.js
CHANGED
|
@@ -9,10 +9,103 @@
|
|
|
9
9
|
*/
|
|
10
10
|
var UVE_MODE;
|
|
11
11
|
(function (UVE_MODE) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
UVE_MODE["EDIT"] = "EDIT_MODE";
|
|
13
|
+
UVE_MODE["PREVIEW"] = "PREVIEW_MODE";
|
|
14
|
+
UVE_MODE["LIVE"] = "LIVE";
|
|
15
|
+
UVE_MODE["UNKNOWN"] = "UNKNOWN";
|
|
16
16
|
})(UVE_MODE || (UVE_MODE = {}));
|
|
17
|
+
/**
|
|
18
|
+
* Actions send to the dotcms editor
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @enum {number}
|
|
22
|
+
*/
|
|
23
|
+
var DotCMSUVEAction;
|
|
24
|
+
(function (DotCMSUVEAction) {
|
|
25
|
+
/**
|
|
26
|
+
* Tell the dotcms editor that page change
|
|
27
|
+
*/
|
|
28
|
+
DotCMSUVEAction["NAVIGATION_UPDATE"] = "set-url";
|
|
29
|
+
/**
|
|
30
|
+
* Send the element position of the rows, columnsm containers and contentlets
|
|
31
|
+
*/
|
|
32
|
+
DotCMSUVEAction["SET_BOUNDS"] = "set-bounds";
|
|
33
|
+
/**
|
|
34
|
+
* Send the information of the hovered contentlet
|
|
35
|
+
*/
|
|
36
|
+
DotCMSUVEAction["SET_CONTENTLET"] = "set-contentlet";
|
|
37
|
+
/**
|
|
38
|
+
* Tell the editor that the page is being scrolled
|
|
39
|
+
*/
|
|
40
|
+
DotCMSUVEAction["IFRAME_SCROLL"] = "scroll";
|
|
41
|
+
/**
|
|
42
|
+
* Tell the editor that the page has stopped scrolling
|
|
43
|
+
*/
|
|
44
|
+
DotCMSUVEAction["IFRAME_SCROLL_END"] = "scroll-end";
|
|
45
|
+
/**
|
|
46
|
+
* Ping the editor to see if the page is inside the editor
|
|
47
|
+
*/
|
|
48
|
+
DotCMSUVEAction["PING_EDITOR"] = "ping-editor";
|
|
49
|
+
/**
|
|
50
|
+
* Tell the editor to init the inline editing editor.
|
|
51
|
+
*/
|
|
52
|
+
DotCMSUVEAction["INIT_INLINE_EDITING"] = "init-inline-editing";
|
|
53
|
+
/**
|
|
54
|
+
* Tell the editor to open the Copy-contentlet dialog
|
|
55
|
+
* To copy a content and then edit it inline.
|
|
56
|
+
*/
|
|
57
|
+
DotCMSUVEAction["COPY_CONTENTLET_INLINE_EDITING"] = "copy-contentlet-inline-editing";
|
|
58
|
+
/**
|
|
59
|
+
* Tell the editor to save inline edited contentlet
|
|
60
|
+
*/
|
|
61
|
+
DotCMSUVEAction["UPDATE_CONTENTLET_INLINE_EDITING"] = "update-contentlet-inline-editing";
|
|
62
|
+
/**
|
|
63
|
+
* Tell the editor to trigger a menu reorder
|
|
64
|
+
*/
|
|
65
|
+
DotCMSUVEAction["REORDER_MENU"] = "reorder-menu";
|
|
66
|
+
/**
|
|
67
|
+
* Tell the editor to send the page info to iframe
|
|
68
|
+
*/
|
|
69
|
+
DotCMSUVEAction["GET_PAGE_DATA"] = "get-page-data";
|
|
70
|
+
/**
|
|
71
|
+
* Tell the editor an user send a graphql query
|
|
72
|
+
*/
|
|
73
|
+
DotCMSUVEAction["CLIENT_READY"] = "client-ready";
|
|
74
|
+
/**
|
|
75
|
+
* Tell the editor to edit a contentlet
|
|
76
|
+
*/
|
|
77
|
+
DotCMSUVEAction["EDIT_CONTENTLET"] = "edit-contentlet";
|
|
78
|
+
/**
|
|
79
|
+
* Tell the editor to do nothing
|
|
80
|
+
*/
|
|
81
|
+
DotCMSUVEAction["NOOP"] = "noop";
|
|
82
|
+
})(DotCMSUVEAction || (DotCMSUVEAction = {}));
|
|
83
|
+
/**
|
|
84
|
+
* Available events in the Universal Visual Editor
|
|
85
|
+
* @enum {string}
|
|
86
|
+
*/
|
|
87
|
+
var UVEEventType;
|
|
88
|
+
(function (UVEEventType) {
|
|
89
|
+
/**
|
|
90
|
+
* Triggered when page data changes from the editor
|
|
91
|
+
*/
|
|
92
|
+
UVEEventType["CONTENT_CHANGES"] = "changes";
|
|
93
|
+
/**
|
|
94
|
+
* Triggered when the page needs to be reloaded
|
|
95
|
+
*/
|
|
96
|
+
UVEEventType["PAGE_RELOAD"] = "page-reload";
|
|
97
|
+
/**
|
|
98
|
+
* Triggered when the editor requests container bounds
|
|
99
|
+
*/
|
|
100
|
+
UVEEventType["REQUEST_BOUNDS"] = "request-bounds";
|
|
101
|
+
/**
|
|
102
|
+
* Triggered when scroll action is needed inside the iframe
|
|
103
|
+
*/
|
|
104
|
+
UVEEventType["IFRAME_SCROLL"] = "iframe-scroll";
|
|
105
|
+
/**
|
|
106
|
+
* Triggered when a contentlet is hovered
|
|
107
|
+
*/
|
|
108
|
+
UVEEventType["CONTENTLET_HOVERED"] = "contentlet-hovered";
|
|
109
|
+
})(UVEEventType || (UVEEventType = {}));
|
|
17
110
|
|
|
18
|
-
export { UVE_MODE };
|
|
111
|
+
export { DotCMSUVEAction, UVEEventType, UVE_MODE };
|
package/src/lib/types.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents the state of the Universal Visual Editor (UVE)
|
|
3
|
-
* @interface
|
|
4
|
-
* @property {UVE_MODE} mode - The current mode of operation for UVE (EDIT, PREVIEW, LIVE, or UNKNOWN)
|
|
5
|
-
* @property {string | null} persona - The selected persona for content personalization
|
|
6
|
-
* @property {string | null} variantName - The name of the current content variant
|
|
7
|
-
* @property {string | null} experimentId - The identifier for the current A/B testing experiment
|
|
8
|
-
* @property {string | null} publishDate - The scheduled publish date for content
|
|
9
|
-
* @property {string | null} languageId - The identifier for the current language selection
|
|
10
|
-
*/
|
|
11
|
-
export interface UVEState {
|
|
12
|
-
mode: UVE_MODE;
|
|
13
|
-
persona: string | null;
|
|
14
|
-
variantName: string | null;
|
|
15
|
-
experimentId: string | null;
|
|
16
|
-
publishDate: string | null;
|
|
17
|
-
languageId: string | null;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Possible modes of UVE (Universal Visual Editor)
|
|
21
|
-
* @enum {string}
|
|
22
|
-
*
|
|
23
|
-
* @property {string} LIVE - Shows published and future content
|
|
24
|
-
* @property {string} PREVIEW - Shows published and working content
|
|
25
|
-
* @property {string} EDIT - Enables content editing functionality in UVE
|
|
26
|
-
* @property {string} UNKNOWN - Error state, UVE should not remain in this mode
|
|
27
|
-
*/
|
|
28
|
-
export declare enum UVE_MODE {
|
|
29
|
-
EDIT = "EDIT_MODE",
|
|
30
|
-
PREVIEW = "PREVIEW_MODE",
|
|
31
|
-
LIVE = "LIVE",
|
|
32
|
-
UNKNOWN = "UNKNOWN"
|
|
33
|
-
}
|
package/src/public/index.d.ts
DELETED
package/src/public/types.d.ts
DELETED