@dotcms/types 1.5.2-next.28 → 1.5.3-next.2118

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 CHANGED
@@ -52,9 +52,21 @@ exports.DotCMSUVEAction = void 0;
52
52
  */
53
53
  DotCMSUVEAction["SET_BOUNDS"] = "set-bounds";
54
54
  /**
55
- * Send the information of the hovered contentlet
55
+ * Send the information of a *hovered* contentlet (fires on pointermove).
56
+ * The editor uses this to render the transient hover overlay around the
57
+ * contentlet under the cursor. Pairs with {@link SET_SELECTED_CONTENTLET}
58
+ * for clicks. The name is kept as `SET_CONTENTLET` for backwards
59
+ * compatibility with external SDK consumers — semantically it is
60
+ * "set hovered contentlet".
56
61
  */
57
62
  DotCMSUVEAction["SET_CONTENTLET"] = "set-contentlet";
63
+ /**
64
+ * Send the information of a contentlet that was *clicked* inside the iframe.
65
+ * The editor uses this to promote the clicked contentlet to "selected"
66
+ * (persistent action toolbar + opens the quick-edit panel). Pairs with
67
+ * {@link SET_CONTENTLET} which handles hover.
68
+ */
69
+ DotCMSUVEAction["SET_SELECTED_CONTENTLET"] = "set-selected-contentlet";
58
70
  /**
59
71
  * Tell the editor that the page is being scrolled
60
72
  */
@@ -131,10 +143,6 @@ exports.UVEEventType = void 0;
131
143
  * Triggered when the page needs to be reloaded
132
144
  */
133
145
  UVEEventType["PAGE_RELOAD"] = "page-reload";
134
- /**
135
- * Triggered when the editor requests container bounds
136
- */
137
- UVEEventType["REQUEST_BOUNDS"] = "request-bounds";
138
146
  /**
139
147
  * Triggered when scroll action is needed inside the iframe
140
148
  */
@@ -143,11 +151,37 @@ exports.UVEEventType = void 0;
143
151
  * Triggered when a contentlet is hovered
144
152
  */
145
153
  UVEEventType["CONTENTLET_HOVERED"] = "contentlet-hovered";
154
+ /**
155
+ * Triggered when a contentlet is clicked (capture-phase `click` event on
156
+ * its element). Used by the editor to promote the clicked contentlet to
157
+ * "selected" without the editor having to capture pointer events on its
158
+ * hover overlay.
159
+ */
160
+ UVEEventType["CONTENTLET_CLICKED"] = "contentlet-clicked";
146
161
  /**
147
162
  * Triggered when the editor requests a scroll to a specific page section
148
163
  * @internal
149
164
  */
150
165
  UVEEventType["SCROLL_TO_SECTION"] = "scroll-to-section";
166
+ /**
167
+ * Triggered when the editor clears its selection (resize, scroll, navigation).
168
+ * The SDK uses this to reset its "last selected" tracker so a subsequent click
169
+ * on the same contentlet re-emits CONTENTLET_CLICKED instead of being treated
170
+ * as a passthrough.
171
+ * @internal
172
+ */
173
+ UVEEventType["SELECTION_CLEARED"] = "selection-cleared";
174
+ /**
175
+ * The single bounds-sync channel. The SDK observes the iframe document
176
+ * and every `[data-dot-object="container"]` with a debounced
177
+ * ResizeObserver and emits the full page bounds whenever the layout
178
+ * settles (sidebar open/close, device/zoom change, media-query
179
+ * reflows, image/font load shifts, scroll, etc.). The editor can
180
+ * also send a UVE_FLUSH_BOUNDS message to bypass the debounce when it
181
+ * needs an immediate snapshot (drag/drop dropzone).
182
+ * @internal
183
+ */
184
+ UVEEventType["AUTO_BOUNDS"] = "auto-bounds";
151
185
  })(exports.UVEEventType || (exports.UVEEventType = {}));
152
186
 
153
187
  /* eslint-disable @typescript-eslint/no-explicit-any */
package/index.esm.js CHANGED
@@ -50,9 +50,21 @@ var DotCMSUVEAction;
50
50
  */
51
51
  DotCMSUVEAction["SET_BOUNDS"] = "set-bounds";
52
52
  /**
53
- * Send the information of the hovered contentlet
53
+ * Send the information of a *hovered* contentlet (fires on pointermove).
54
+ * The editor uses this to render the transient hover overlay around the
55
+ * contentlet under the cursor. Pairs with {@link SET_SELECTED_CONTENTLET}
56
+ * for clicks. The name is kept as `SET_CONTENTLET` for backwards
57
+ * compatibility with external SDK consumers — semantically it is
58
+ * "set hovered contentlet".
54
59
  */
55
60
  DotCMSUVEAction["SET_CONTENTLET"] = "set-contentlet";
61
+ /**
62
+ * Send the information of a contentlet that was *clicked* inside the iframe.
63
+ * The editor uses this to promote the clicked contentlet to "selected"
64
+ * (persistent action toolbar + opens the quick-edit panel). Pairs with
65
+ * {@link SET_CONTENTLET} which handles hover.
66
+ */
67
+ DotCMSUVEAction["SET_SELECTED_CONTENTLET"] = "set-selected-contentlet";
56
68
  /**
57
69
  * Tell the editor that the page is being scrolled
58
70
  */
@@ -129,10 +141,6 @@ var UVEEventType;
129
141
  * Triggered when the page needs to be reloaded
130
142
  */
131
143
  UVEEventType["PAGE_RELOAD"] = "page-reload";
132
- /**
133
- * Triggered when the editor requests container bounds
134
- */
135
- UVEEventType["REQUEST_BOUNDS"] = "request-bounds";
136
144
  /**
137
145
  * Triggered when scroll action is needed inside the iframe
138
146
  */
@@ -141,11 +149,37 @@ var UVEEventType;
141
149
  * Triggered when a contentlet is hovered
142
150
  */
143
151
  UVEEventType["CONTENTLET_HOVERED"] = "contentlet-hovered";
152
+ /**
153
+ * Triggered when a contentlet is clicked (capture-phase `click` event on
154
+ * its element). Used by the editor to promote the clicked contentlet to
155
+ * "selected" without the editor having to capture pointer events on its
156
+ * hover overlay.
157
+ */
158
+ UVEEventType["CONTENTLET_CLICKED"] = "contentlet-clicked";
144
159
  /**
145
160
  * Triggered when the editor requests a scroll to a specific page section
146
161
  * @internal
147
162
  */
148
163
  UVEEventType["SCROLL_TO_SECTION"] = "scroll-to-section";
164
+ /**
165
+ * Triggered when the editor clears its selection (resize, scroll, navigation).
166
+ * The SDK uses this to reset its "last selected" tracker so a subsequent click
167
+ * on the same contentlet re-emits CONTENTLET_CLICKED instead of being treated
168
+ * as a passthrough.
169
+ * @internal
170
+ */
171
+ UVEEventType["SELECTION_CLEARED"] = "selection-cleared";
172
+ /**
173
+ * The single bounds-sync channel. The SDK observes the iframe document
174
+ * and every `[data-dot-object="container"]` with a debounced
175
+ * ResizeObserver and emits the full page bounds whenever the layout
176
+ * settles (sidebar open/close, device/zoom change, media-query
177
+ * reflows, image/font load shifts, scroll, etc.). The editor can
178
+ * also send a UVE_FLUSH_BOUNDS message to bypass the debounce when it
179
+ * needs an immediate snapshot (drag/drop dropzone).
180
+ * @internal
181
+ */
182
+ UVEEventType["AUTO_BOUNDS"] = "auto-bounds";
149
183
  })(UVEEventType || (UVEEventType = {}));
150
184
 
151
185
  /* eslint-disable @typescript-eslint/no-explicit-any */
package/internal.cjs.js CHANGED
@@ -55,7 +55,17 @@ exports.__DOTCMS_UVE_EVENT__ = void 0;
55
55
  */
56
56
  __DOTCMS_UVE_EVENT__["UVE_RELOAD_PAGE"] = "uve-reload-page";
57
57
  /**
58
- * Request the bounds for the elements
58
+ * Tell the SDK to emit page bounds immediately, bypassing the
59
+ * auto-bounds debounce. Used when the editor needs a synchronous
60
+ * snapshot of bounds for an interaction (drag/drop dropzone) and
61
+ * cannot wait the ~100ms trailing edge.
62
+ */
63
+ __DOTCMS_UVE_EVENT__["UVE_FLUSH_BOUNDS"] = "uve-flush-bounds";
64
+ /**
65
+ * @deprecated Use UVE_FLUSH_BOUNDS instead. Kept for one release so the
66
+ * editor can dual-emit and SDKs in the wild that still listen for the
67
+ * legacy `uve-request-bounds` event continue to receive flushes. Drop
68
+ * after the next minor release of @dotcms/uve.
59
69
  */
60
70
  __DOTCMS_UVE_EVENT__["UVE_REQUEST_BOUNDS"] = "uve-request-bounds";
61
71
  /**
@@ -80,4 +90,11 @@ exports.__DOTCMS_UVE_EVENT__ = void 0;
80
90
  * Request the iframe to scroll to a section by 1-based row index
81
91
  */
82
92
  __DOTCMS_UVE_EVENT__["UVE_SCROLL_TO_SECTION"] = "uve-scroll-to-section";
93
+ /**
94
+ * The editor cleared its contentlet selection (e.g. after a canvas resize
95
+ * or scroll). The SDK uses this to reset its "last selected" tracker so a
96
+ * subsequent click on the same contentlet re-emits CONTENTLET_CLICKED
97
+ * instead of being treated as a passthrough.
98
+ */
99
+ __DOTCMS_UVE_EVENT__["UVE_SELECTION_CLEARED"] = "uve-selection-cleared";
83
100
  })(exports.__DOTCMS_UVE_EVENT__ || (exports.__DOTCMS_UVE_EVENT__ = {}));
package/internal.esm.js CHANGED
@@ -53,7 +53,17 @@ var __DOTCMS_UVE_EVENT__;
53
53
  */
54
54
  __DOTCMS_UVE_EVENT__["UVE_RELOAD_PAGE"] = "uve-reload-page";
55
55
  /**
56
- * Request the bounds for the elements
56
+ * Tell the SDK to emit page bounds immediately, bypassing the
57
+ * auto-bounds debounce. Used when the editor needs a synchronous
58
+ * snapshot of bounds for an interaction (drag/drop dropzone) and
59
+ * cannot wait the ~100ms trailing edge.
60
+ */
61
+ __DOTCMS_UVE_EVENT__["UVE_FLUSH_BOUNDS"] = "uve-flush-bounds";
62
+ /**
63
+ * @deprecated Use UVE_FLUSH_BOUNDS instead. Kept for one release so the
64
+ * editor can dual-emit and SDKs in the wild that still listen for the
65
+ * legacy `uve-request-bounds` event continue to receive flushes. Drop
66
+ * after the next minor release of @dotcms/uve.
57
67
  */
58
68
  __DOTCMS_UVE_EVENT__["UVE_REQUEST_BOUNDS"] = "uve-request-bounds";
59
69
  /**
@@ -78,6 +88,13 @@ var __DOTCMS_UVE_EVENT__;
78
88
  * Request the iframe to scroll to a section by 1-based row index
79
89
  */
80
90
  __DOTCMS_UVE_EVENT__["UVE_SCROLL_TO_SECTION"] = "uve-scroll-to-section";
91
+ /**
92
+ * The editor cleared its contentlet selection (e.g. after a canvas resize
93
+ * or scroll). The SDK uses this to reset its "last selected" tracker so a
94
+ * subsequent click on the same contentlet re-emits CONTENTLET_CLICKED
95
+ * instead of being treated as a passthrough.
96
+ */
97
+ __DOTCMS_UVE_EVENT__["UVE_SELECTION_CLEARED"] = "uve-selection-cleared";
81
98
  })(__DOTCMS_UVE_EVENT__ || (__DOTCMS_UVE_EVENT__ = {}));
82
99
 
83
100
  export { BlockEditorDefaultBlocks, __DOTCMS_UVE_EVENT__ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/types",
3
- "version": "1.5.2-next.28",
3
+ "version": "1.5.3-next.2118",
4
4
  "keywords": [
5
5
  "dotCMS",
6
6
  "CMS",
@@ -94,9 +94,21 @@ export declare enum DotCMSUVEAction {
94
94
  */
95
95
  SET_BOUNDS = "set-bounds",
96
96
  /**
97
- * Send the information of the hovered contentlet
97
+ * Send the information of a *hovered* contentlet (fires on pointermove).
98
+ * The editor uses this to render the transient hover overlay around the
99
+ * contentlet under the cursor. Pairs with {@link SET_SELECTED_CONTENTLET}
100
+ * for clicks. The name is kept as `SET_CONTENTLET` for backwards
101
+ * compatibility with external SDK consumers — semantically it is
102
+ * "set hovered contentlet".
98
103
  */
99
104
  SET_CONTENTLET = "set-contentlet",
105
+ /**
106
+ * Send the information of a contentlet that was *clicked* inside the iframe.
107
+ * The editor uses this to promote the clicked contentlet to "selected"
108
+ * (persistent action toolbar + opens the quick-edit panel). Pairs with
109
+ * {@link SET_CONTENTLET} which handles hover.
110
+ */
111
+ SET_SELECTED_CONTENTLET = "set-selected-contentlet",
100
112
  /**
101
113
  * Tell the editor that the page is being scrolled
102
114
  */
@@ -178,10 +190,6 @@ export declare enum UVEEventType {
178
190
  * Triggered when the page needs to be reloaded
179
191
  */
180
192
  PAGE_RELOAD = "page-reload",
181
- /**
182
- * Triggered when the editor requests container bounds
183
- */
184
- REQUEST_BOUNDS = "request-bounds",
185
193
  /**
186
194
  * Triggered when scroll action is needed inside the iframe
187
195
  */
@@ -190,11 +198,37 @@ export declare enum UVEEventType {
190
198
  * Triggered when a contentlet is hovered
191
199
  */
192
200
  CONTENTLET_HOVERED = "contentlet-hovered",
201
+ /**
202
+ * Triggered when a contentlet is clicked (capture-phase `click` event on
203
+ * its element). Used by the editor to promote the clicked contentlet to
204
+ * "selected" without the editor having to capture pointer events on its
205
+ * hover overlay.
206
+ */
207
+ CONTENTLET_CLICKED = "contentlet-clicked",
193
208
  /**
194
209
  * Triggered when the editor requests a scroll to a specific page section
195
210
  * @internal
196
211
  */
197
- SCROLL_TO_SECTION = "scroll-to-section"
212
+ SCROLL_TO_SECTION = "scroll-to-section",
213
+ /**
214
+ * Triggered when the editor clears its selection (resize, scroll, navigation).
215
+ * The SDK uses this to reset its "last selected" tracker so a subsequent click
216
+ * on the same contentlet re-emits CONTENTLET_CLICKED instead of being treated
217
+ * as a passthrough.
218
+ * @internal
219
+ */
220
+ SELECTION_CLEARED = "selection-cleared",
221
+ /**
222
+ * The single bounds-sync channel. The SDK observes the iframe document
223
+ * and every `[data-dot-object="container"]` with a debounced
224
+ * ResizeObserver and emits the full page bounds whenever the layout
225
+ * settles (sidebar open/close, device/zoom change, media-query
226
+ * reflows, image/font load shifts, scroll, etc.). The editor can
227
+ * also send a UVE_FLUSH_BOUNDS message to bypass the debounce when it
228
+ * needs an immediate snapshot (drag/drop dropzone).
229
+ * @internal
230
+ */
231
+ AUTO_BOUNDS = "auto-bounds"
198
232
  }
199
233
  /**
200
234
  * Type definitions for each event's payload
@@ -202,12 +236,14 @@ export declare enum UVEEventType {
202
236
  export type UVEEventPayloadMap = {
203
237
  [UVEEventType.CONTENT_CHANGES]: DotCMSPageResponse;
204
238
  [UVEEventType.PAGE_RELOAD]: undefined;
205
- [UVEEventType.REQUEST_BOUNDS]: DotCMSContainerBound[];
206
239
  [UVEEventType.IFRAME_SCROLL]: 'up' | 'down';
207
240
  [UVEEventType.CONTENTLET_HOVERED]: unknown;
241
+ [UVEEventType.CONTENTLET_CLICKED]: unknown;
208
242
  [UVEEventType.SCROLL_TO_SECTION]: {
209
243
  sectionIndex: number;
210
244
  };
245
+ [UVEEventType.SELECTION_CLEARED]: undefined;
246
+ [UVEEventType.AUTO_BOUNDS]: DotCMSContainerBound[];
211
247
  };
212
248
  /**
213
249
  *
@@ -10,7 +10,17 @@ export declare enum __DOTCMS_UVE_EVENT__ {
10
10
  */
11
11
  UVE_RELOAD_PAGE = "uve-reload-page",
12
12
  /**
13
- * Request the bounds for the elements
13
+ * Tell the SDK to emit page bounds immediately, bypassing the
14
+ * auto-bounds debounce. Used when the editor needs a synchronous
15
+ * snapshot of bounds for an interaction (drag/drop dropzone) and
16
+ * cannot wait the ~100ms trailing edge.
17
+ */
18
+ UVE_FLUSH_BOUNDS = "uve-flush-bounds",
19
+ /**
20
+ * @deprecated Use UVE_FLUSH_BOUNDS instead. Kept for one release so the
21
+ * editor can dual-emit and SDKs in the wild that still listen for the
22
+ * legacy `uve-request-bounds` event continue to receive flushes. Drop
23
+ * after the next minor release of @dotcms/uve.
14
24
  */
15
25
  UVE_REQUEST_BOUNDS = "uve-request-bounds",
16
26
  /**
@@ -34,5 +44,12 @@ export declare enum __DOTCMS_UVE_EVENT__ {
34
44
  /**
35
45
  * Request the iframe to scroll to a section by 1-based row index
36
46
  */
37
- UVE_SCROLL_TO_SECTION = "uve-scroll-to-section"
47
+ UVE_SCROLL_TO_SECTION = "uve-scroll-to-section",
48
+ /**
49
+ * The editor cleared its contentlet selection (e.g. after a canvas resize
50
+ * or scroll). The SDK uses this to reset its "last selected" tracker so a
51
+ * subsequent click on the same contentlet re-emits CONTENTLET_CLICKED
52
+ * instead of being treated as a passthrough.
53
+ */
54
+ UVE_SELECTION_CLEARED = "uve-selection-cleared"
38
55
  }
@@ -544,6 +544,7 @@ export interface DotCMSPage {
544
544
  liveInode: string;
545
545
  shortyLive: string;
546
546
  canSeeRules?: boolean;
547
+ styleEditorSchemas?: StyleEditorFormSchema[];
547
548
  }
548
549
  /**
549
550
  * Represents the language configuration for a DotCMS page
@@ -1106,6 +1107,7 @@ export interface DotCMSGraphQLPage {
1106
1107
  host: DotCMSSite;
1107
1108
  vanityUrl: DotCMSVanityUrl;
1108
1109
  _map: Record<string, unknown>;
1110
+ styleEditorSchemas?: StyleEditorFormSchema[] | null;
1109
1111
  }
1110
1112
  /**
1111
1113
  * Represents a container in a page