@dotcms/uve 0.0.1-beta.8 → 1.0.0-next.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/README.md +586 -4
- package/index.cjs.js +13 -82
- package/index.esm.js +3 -83
- package/internal.cjs.js +86 -59
- package/internal.esm.js +60 -58
- package/package.json +5 -11
- package/public.cjs.js +1132 -0
- package/public.esm.js +1098 -0
- package/src/index.d.ts +2 -1
- package/src/internal/constants.d.ts +61 -3
- package/src/internal/events.d.ts +66 -0
- package/src/internal/index.d.ts +1 -1
- package/src/internal/tinymce.config.d.ts +45 -0
- package/src/internal.d.ts +2 -0
- package/src/lib/{utils.d.ts → core/core.utils.d.ts} +11 -7
- package/src/lib/dom/dom.utils.d.ts +205 -0
- package/src/lib/editor/internal.d.ts +23 -0
- package/src/lib/editor/public.d.ts +86 -0
- package/src/script/sdk-editor.d.ts +6 -0
- package/src/script/utils.d.ts +53 -0
- package/src/internal/enums.d.ts +0 -32
- package/src/lib/types.d.ts +0 -59
- package/src/types.d.ts +0 -1
- package/types.cjs.d.ts +0 -1
- package/types.cjs.default.js +0 -1
- package/types.cjs.js +0 -18
- package/types.cjs.mjs +0 -2
- package/types.esm.d.ts +0 -1
- package/types.esm.js +0 -18
package/src/lib/types.d.ts
DELETED
|
@@ -1,59 +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
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Callback function for UVE events
|
|
36
|
-
* @callback UVECallback
|
|
37
|
-
* @param {unknown} payload - The payload of the event
|
|
38
|
-
*/
|
|
39
|
-
export type UVECallback = (payload: unknown) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Unsubscribe function for UVE events
|
|
42
|
-
* @callback UnsubscribeUVE
|
|
43
|
-
*/
|
|
44
|
-
export type UnsubscribeUVE = () => void;
|
|
45
|
-
/**
|
|
46
|
-
* UVESubscription type
|
|
47
|
-
* @typedef {Object} UVESubscription
|
|
48
|
-
* @property {UnsubscribeUVE} unsubscribe - The unsubscribe function for the UVE event
|
|
49
|
-
* @property {string} event - The event name
|
|
50
|
-
*/
|
|
51
|
-
export type UVESubscription = {
|
|
52
|
-
unsubscribe: UnsubscribeUVE;
|
|
53
|
-
event: string;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* UVE event type
|
|
57
|
-
* @typedef {function} UVEEvent
|
|
58
|
-
*/
|
|
59
|
-
export type UVEEvent = (callback: UVECallback) => UVESubscription;
|
package/src/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/types';
|
package/types.cjs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/types";
|
package/types.cjs.default.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports._default = require('./types.cjs.js').default;
|
package/types.cjs.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Possible modes of UVE (Universal Visual Editor)
|
|
5
|
-
* @enum {string}
|
|
6
|
-
*
|
|
7
|
-
* @property {string} LIVE - Shows published and future content
|
|
8
|
-
* @property {string} PREVIEW - Shows published and working content
|
|
9
|
-
* @property {string} EDIT - Enables content editing functionality in UVE
|
|
10
|
-
* @property {string} UNKNOWN - Error state, UVE should not remain in this mode
|
|
11
|
-
*/
|
|
12
|
-
exports.UVE_MODE = void 0;
|
|
13
|
-
(function (UVE_MODE) {
|
|
14
|
-
UVE_MODE["EDIT"] = "EDIT_MODE";
|
|
15
|
-
UVE_MODE["PREVIEW"] = "PREVIEW_MODE";
|
|
16
|
-
UVE_MODE["LIVE"] = "LIVE";
|
|
17
|
-
UVE_MODE["UNKNOWN"] = "UNKNOWN";
|
|
18
|
-
})(exports.UVE_MODE || (exports.UVE_MODE = {}));
|
package/types.cjs.mjs
DELETED
package/types.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/types";
|
package/types.esm.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Possible modes of UVE (Universal Visual Editor)
|
|
3
|
-
* @enum {string}
|
|
4
|
-
*
|
|
5
|
-
* @property {string} LIVE - Shows published and future content
|
|
6
|
-
* @property {string} PREVIEW - Shows published and working content
|
|
7
|
-
* @property {string} EDIT - Enables content editing functionality in UVE
|
|
8
|
-
* @property {string} UNKNOWN - Error state, UVE should not remain in this mode
|
|
9
|
-
*/
|
|
10
|
-
var UVE_MODE;
|
|
11
|
-
(function (UVE_MODE) {
|
|
12
|
-
UVE_MODE["EDIT"] = "EDIT_MODE";
|
|
13
|
-
UVE_MODE["PREVIEW"] = "PREVIEW_MODE";
|
|
14
|
-
UVE_MODE["LIVE"] = "LIVE";
|
|
15
|
-
UVE_MODE["UNKNOWN"] = "UNKNOWN";
|
|
16
|
-
})(UVE_MODE || (UVE_MODE = {}));
|
|
17
|
-
|
|
18
|
-
export { UVE_MODE };
|