@dotcms/types 1.4.0-next.2 → 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 +13 -0
- package/index.esm.js +13 -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 +18 -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,6 +100,10 @@ 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";
|
|
103
107
|
/**
|
|
104
108
|
* Tell the editor to create a contentlet without adding it to the page
|
|
105
109
|
*/
|
|
@@ -108,6 +112,10 @@ exports.DotCMSUVEAction = void 0;
|
|
|
108
112
|
* Tell the editor to do nothing
|
|
109
113
|
*/
|
|
110
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";
|
|
111
119
|
})(exports.DotCMSUVEAction || (exports.DotCMSUVEAction = {}));
|
|
112
120
|
/**
|
|
113
121
|
* Available events in the Universal Visual Editor
|
|
@@ -135,6 +143,11 @@ exports.UVEEventType = void 0;
|
|
|
135
143
|
* Triggered when a contentlet is hovered
|
|
136
144
|
*/
|
|
137
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";
|
|
138
151
|
})(exports.UVEEventType || (exports.UVEEventType = {}));
|
|
139
152
|
|
|
140
153
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
package/index.esm.js
CHANGED
|
@@ -98,6 +98,10 @@ 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";
|
|
101
105
|
/**
|
|
102
106
|
* Tell the editor to create a contentlet without adding it to the page
|
|
103
107
|
*/
|
|
@@ -106,6 +110,10 @@ var DotCMSUVEAction;
|
|
|
106
110
|
* Tell the editor to do nothing
|
|
107
111
|
*/
|
|
108
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";
|
|
109
117
|
})(DotCMSUVEAction || (DotCMSUVEAction = {}));
|
|
110
118
|
/**
|
|
111
119
|
* Available events in the Universal Visual Editor
|
|
@@ -133,6 +141,11 @@ var UVEEventType;
|
|
|
133
141
|
* Triggered when a contentlet is hovered
|
|
134
142
|
*/
|
|
135
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";
|
|
136
149
|
})(UVEEventType || (UVEEventType = {}));
|
|
137
150
|
|
|
138
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,6 +142,10 @@ 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",
|
|
145
149
|
/**
|
|
146
150
|
* Tell the editor to create a contentlet without adding it to the page
|
|
147
151
|
*/
|
|
@@ -149,7 +153,11 @@ export declare enum DotCMSUVEAction {
|
|
|
149
153
|
/**
|
|
150
154
|
* Tell the editor to do nothing
|
|
151
155
|
*/
|
|
152
|
-
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"
|
|
153
161
|
}
|
|
154
162
|
/**
|
|
155
163
|
* The contentlet has the main fields and the custom fields of the content type.
|
|
@@ -181,7 +189,12 @@ export declare enum UVEEventType {
|
|
|
181
189
|
/**
|
|
182
190
|
* Triggered when a contentlet is hovered
|
|
183
191
|
*/
|
|
184
|
-
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"
|
|
185
198
|
}
|
|
186
199
|
/**
|
|
187
200
|
* Type definitions for each event's payload
|
|
@@ -192,6 +205,9 @@ export type UVEEventPayloadMap = {
|
|
|
192
205
|
[UVEEventType.REQUEST_BOUNDS]: DotCMSContainerBound[];
|
|
193
206
|
[UVEEventType.IFRAME_SCROLL]: 'up' | 'down';
|
|
194
207
|
[UVEEventType.CONTENTLET_HOVERED]: unknown;
|
|
208
|
+
[UVEEventType.SCROLL_TO_SECTION]: {
|
|
209
|
+
sectionIndex: number;
|
|
210
|
+
};
|
|
195
211
|
};
|
|
196
212
|
/**
|
|
197
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
|