@dotcms/types 1.4.0-next.1 → 1.4.0-next.3
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/index.cjs.js +17 -0
- package/index.esm.js +17 -0
- package/internal.cjs.js +4 -0
- package/internal.esm.js +4 -0
- package/package.json +1 -1
- package/src/lib/editor/public.d.ts +22 -2
- package/src/lib/events/internal.d.ts +5 -1
- package/src/lib/page/public.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -100,10 +100,22 @@ exports.DotCMSUVEAction = void 0;
|
|
|
100
100
|
* Tell the editor to register style schemas
|
|
101
101
|
*/
|
|
102
102
|
DotCMSUVEAction["REGISTER_STYLE_SCHEMAS"] = "register-style-schemas";
|
|
103
|
+
/**
|
|
104
|
+
* Tell the editor to report the iframe height
|
|
105
|
+
*/
|
|
106
|
+
DotCMSUVEAction["IFRAME_HEIGHT"] = "iframe-height";
|
|
107
|
+
/**
|
|
108
|
+
* Tell the editor to create a contentlet without adding it to the page
|
|
109
|
+
*/
|
|
110
|
+
DotCMSUVEAction["CREATE_CONTENTLET"] = "create-contentlet";
|
|
103
111
|
/**
|
|
104
112
|
* Tell the editor to do nothing
|
|
105
113
|
*/
|
|
106
114
|
DotCMSUVEAction["NOOP"] = "noop";
|
|
115
|
+
/**
|
|
116
|
+
* Report the offsetTop of a page section so the editor can scroll to it
|
|
117
|
+
*/
|
|
118
|
+
DotCMSUVEAction["SECTION_OFFSET"] = "section-offset";
|
|
107
119
|
})(exports.DotCMSUVEAction || (exports.DotCMSUVEAction = {}));
|
|
108
120
|
/**
|
|
109
121
|
* Available events in the Universal Visual Editor
|
|
@@ -131,6 +143,11 @@ exports.UVEEventType = void 0;
|
|
|
131
143
|
* Triggered when a contentlet is hovered
|
|
132
144
|
*/
|
|
133
145
|
UVEEventType["CONTENTLET_HOVERED"] = "contentlet-hovered";
|
|
146
|
+
/**
|
|
147
|
+
* Triggered when the editor requests a scroll to a specific page section
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
UVEEventType["SCROLL_TO_SECTION"] = "scroll-to-section";
|
|
134
151
|
})(exports.UVEEventType || (exports.UVEEventType = {}));
|
|
135
152
|
|
|
136
153
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
package/index.esm.js
CHANGED
|
@@ -98,10 +98,22 @@ var DotCMSUVEAction;
|
|
|
98
98
|
* Tell the editor to register style schemas
|
|
99
99
|
*/
|
|
100
100
|
DotCMSUVEAction["REGISTER_STYLE_SCHEMAS"] = "register-style-schemas";
|
|
101
|
+
/**
|
|
102
|
+
* Tell the editor to report the iframe height
|
|
103
|
+
*/
|
|
104
|
+
DotCMSUVEAction["IFRAME_HEIGHT"] = "iframe-height";
|
|
105
|
+
/**
|
|
106
|
+
* Tell the editor to create a contentlet without adding it to the page
|
|
107
|
+
*/
|
|
108
|
+
DotCMSUVEAction["CREATE_CONTENTLET"] = "create-contentlet";
|
|
101
109
|
/**
|
|
102
110
|
* Tell the editor to do nothing
|
|
103
111
|
*/
|
|
104
112
|
DotCMSUVEAction["NOOP"] = "noop";
|
|
113
|
+
/**
|
|
114
|
+
* Report the offsetTop of a page section so the editor can scroll to it
|
|
115
|
+
*/
|
|
116
|
+
DotCMSUVEAction["SECTION_OFFSET"] = "section-offset";
|
|
105
117
|
})(DotCMSUVEAction || (DotCMSUVEAction = {}));
|
|
106
118
|
/**
|
|
107
119
|
* Available events in the Universal Visual Editor
|
|
@@ -129,6 +141,11 @@ var UVEEventType;
|
|
|
129
141
|
* Triggered when a contentlet is hovered
|
|
130
142
|
*/
|
|
131
143
|
UVEEventType["CONTENTLET_HOVERED"] = "contentlet-hovered";
|
|
144
|
+
/**
|
|
145
|
+
* Triggered when the editor requests a scroll to a specific page section
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
UVEEventType["SCROLL_TO_SECTION"] = "scroll-to-section";
|
|
132
149
|
})(UVEEventType || (UVEEventType = {}));
|
|
133
150
|
|
|
134
151
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
package/internal.cjs.js
CHANGED
|
@@ -76,4 +76,8 @@ exports.__DOTCMS_UVE_EVENT__ = void 0;
|
|
|
76
76
|
* Copy contentlet inline editing success
|
|
77
77
|
*/
|
|
78
78
|
__DOTCMS_UVE_EVENT__["UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS"] = "uve-copy-contentlet-inline-editing-success";
|
|
79
|
+
/**
|
|
80
|
+
* Request the iframe to scroll to a section by 1-based row index
|
|
81
|
+
*/
|
|
82
|
+
__DOTCMS_UVE_EVENT__["UVE_SCROLL_TO_SECTION"] = "uve-scroll-to-section";
|
|
79
83
|
})(exports.__DOTCMS_UVE_EVENT__ || (exports.__DOTCMS_UVE_EVENT__ = {}));
|
package/internal.esm.js
CHANGED
|
@@ -74,6 +74,10 @@ var __DOTCMS_UVE_EVENT__;
|
|
|
74
74
|
* Copy contentlet inline editing success
|
|
75
75
|
*/
|
|
76
76
|
__DOTCMS_UVE_EVENT__["UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS"] = "uve-copy-contentlet-inline-editing-success";
|
|
77
|
+
/**
|
|
78
|
+
* Request the iframe to scroll to a section by 1-based row index
|
|
79
|
+
*/
|
|
80
|
+
__DOTCMS_UVE_EVENT__["UVE_SCROLL_TO_SECTION"] = "uve-scroll-to-section";
|
|
77
81
|
})(__DOTCMS_UVE_EVENT__ || (__DOTCMS_UVE_EVENT__ = {}));
|
|
78
82
|
|
|
79
83
|
export { BlockEditorDefaultBlocks, __DOTCMS_UVE_EVENT__ };
|
package/package.json
CHANGED
|
@@ -142,10 +142,22 @@ export declare enum DotCMSUVEAction {
|
|
|
142
142
|
* Tell the editor to register style schemas
|
|
143
143
|
*/
|
|
144
144
|
REGISTER_STYLE_SCHEMAS = "register-style-schemas",
|
|
145
|
+
/**
|
|
146
|
+
* Tell the editor to report the iframe height
|
|
147
|
+
*/
|
|
148
|
+
IFRAME_HEIGHT = "iframe-height",
|
|
149
|
+
/**
|
|
150
|
+
* Tell the editor to create a contentlet without adding it to the page
|
|
151
|
+
*/
|
|
152
|
+
CREATE_CONTENTLET = "create-contentlet",
|
|
145
153
|
/**
|
|
146
154
|
* Tell the editor to do nothing
|
|
147
155
|
*/
|
|
148
|
-
NOOP = "noop"
|
|
156
|
+
NOOP = "noop",
|
|
157
|
+
/**
|
|
158
|
+
* Report the offsetTop of a page section so the editor can scroll to it
|
|
159
|
+
*/
|
|
160
|
+
SECTION_OFFSET = "section-offset"
|
|
149
161
|
}
|
|
150
162
|
/**
|
|
151
163
|
* The contentlet has the main fields and the custom fields of the content type.
|
|
@@ -177,7 +189,12 @@ export declare enum UVEEventType {
|
|
|
177
189
|
/**
|
|
178
190
|
* Triggered when a contentlet is hovered
|
|
179
191
|
*/
|
|
180
|
-
CONTENTLET_HOVERED = "contentlet-hovered"
|
|
192
|
+
CONTENTLET_HOVERED = "contentlet-hovered",
|
|
193
|
+
/**
|
|
194
|
+
* Triggered when the editor requests a scroll to a specific page section
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
SCROLL_TO_SECTION = "scroll-to-section"
|
|
181
198
|
}
|
|
182
199
|
/**
|
|
183
200
|
* Type definitions for each event's payload
|
|
@@ -188,6 +205,9 @@ export type UVEEventPayloadMap = {
|
|
|
188
205
|
[UVEEventType.REQUEST_BOUNDS]: DotCMSContainerBound[];
|
|
189
206
|
[UVEEventType.IFRAME_SCROLL]: 'up' | 'down';
|
|
190
207
|
[UVEEventType.CONTENTLET_HOVERED]: unknown;
|
|
208
|
+
[UVEEventType.SCROLL_TO_SECTION]: {
|
|
209
|
+
sectionIndex: number;
|
|
210
|
+
};
|
|
191
211
|
};
|
|
192
212
|
/**
|
|
193
213
|
*
|
|
@@ -30,5 +30,9 @@ export declare enum __DOTCMS_UVE_EVENT__ {
|
|
|
30
30
|
/**
|
|
31
31
|
* Copy contentlet inline editing success
|
|
32
32
|
*/
|
|
33
|
-
UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS = "uve-copy-contentlet-inline-editing-success"
|
|
33
|
+
UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS = "uve-copy-contentlet-inline-editing-success",
|
|
34
|
+
/**
|
|
35
|
+
* Request the iframe to scroll to a section by 1-based row index
|
|
36
|
+
*/
|
|
37
|
+
UVE_SCROLL_TO_SECTION = "uve-scroll-to-section"
|
|
34
38
|
}
|
package/src/lib/page/public.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export interface DotPageAssetLayoutRow {
|
|
|
74
74
|
id?: string;
|
|
75
75
|
columns: DotPageAssetLayoutColumn[];
|
|
76
76
|
styleClass?: string;
|
|
77
|
+
metadata?: Record<string, unknown>;
|
|
77
78
|
}
|
|
78
79
|
/**
|
|
79
80
|
* Represents a vanity URL configuration for URL redirection and forwarding
|
|
@@ -126,6 +127,7 @@ export interface DotPageAssetLayoutColumn {
|
|
|
126
127
|
leftOffset: number;
|
|
127
128
|
left: number;
|
|
128
129
|
styleClass?: string;
|
|
130
|
+
metadata?: Record<string, unknown>;
|
|
129
131
|
}
|
|
130
132
|
/**
|
|
131
133
|
* Represents a container within a column in a page layout
|