@dotcms/types 26.11.11-1 → 26.11.17-1-next.3119

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
@@ -68,7 +68,8 @@ exports.DotCMSUVEAction = void 0;
68
68
  */
69
69
  DotCMSUVEAction["SET_SELECTED_CONTENTLET"] = "set-selected-contentlet";
70
70
  /**
71
- * Tell the editor that the page is being scrolled
71
+ * Tell the editor that the page is being scrolled. The payload, a
72
+ * {@link DotCMSIframeScrollPayload}, carries the page's `scrollY`; older SDKs send none.
72
73
  */
73
74
  DotCMSUVEAction["IFRAME_SCROLL"] = "scroll";
74
75
  /**
@@ -145,8 +146,18 @@ exports.UVEEventType = void 0;
145
146
  UVEEventType["PAGE_RELOAD"] = "page-reload";
146
147
  /**
147
148
  * Triggered when scroll action is needed inside the iframe
149
+ *
150
+ * @deprecated Use `IFRAME_SCROLL_VELOCITY`, which carries the speed to scroll at every frame
151
+ * during a drag. The editor still sends the one-step request, and the SDK still handles it,
152
+ * for pages on an older `@dotcms/uve`.
148
153
  */
149
154
  UVEEventType["IFRAME_SCROLL"] = "iframe-scroll";
155
+ /**
156
+ * Triggered when the editor sets the speed the page scrolls at during a drag, in signed
157
+ * pixels per 60fps frame; `0` stops it.
158
+ * @internal
159
+ */
160
+ UVEEventType["IFRAME_SCROLL_VELOCITY"] = "iframe-scroll-velocity";
150
161
  /**
151
162
  * Triggered when a contentlet is hovered
152
163
  */
package/index.esm.js CHANGED
@@ -66,7 +66,8 @@ var DotCMSUVEAction;
66
66
  */
67
67
  DotCMSUVEAction["SET_SELECTED_CONTENTLET"] = "set-selected-contentlet";
68
68
  /**
69
- * Tell the editor that the page is being scrolled
69
+ * Tell the editor that the page is being scrolled. The payload, a
70
+ * {@link DotCMSIframeScrollPayload}, carries the page's `scrollY`; older SDKs send none.
70
71
  */
71
72
  DotCMSUVEAction["IFRAME_SCROLL"] = "scroll";
72
73
  /**
@@ -143,8 +144,18 @@ var UVEEventType;
143
144
  UVEEventType["PAGE_RELOAD"] = "page-reload";
144
145
  /**
145
146
  * Triggered when scroll action is needed inside the iframe
147
+ *
148
+ * @deprecated Use `IFRAME_SCROLL_VELOCITY`, which carries the speed to scroll at every frame
149
+ * during a drag. The editor still sends the one-step request, and the SDK still handles it,
150
+ * for pages on an older `@dotcms/uve`.
146
151
  */
147
152
  UVEEventType["IFRAME_SCROLL"] = "iframe-scroll";
153
+ /**
154
+ * Triggered when the editor sets the speed the page scrolls at during a drag, in signed
155
+ * pixels per 60fps frame; `0` stops it.
156
+ * @internal
157
+ */
158
+ UVEEventType["IFRAME_SCROLL_VELOCITY"] = "iframe-scroll-velocity";
148
159
  /**
149
160
  * Triggered when a contentlet is hovered
150
161
  */
package/internal.cjs.js CHANGED
@@ -75,9 +75,19 @@ exports.__DOTCMS_UVE_EVENT__ = void 0;
75
75
  */
76
76
  __DOTCMS_UVE_EVENT__["UVE_EDITOR_PONG"] = "uve-editor-pong";
77
77
  /**
78
- * Received scroll event trigger from the editor
78
+ * Received scroll event trigger from the editor: one 120px smooth step, `up` or `down`.
79
+ *
80
+ * @deprecated Use `UVE_SCROLL_VELOCITY`, which scrolls the page every frame at the speed the
81
+ * editor sets. The editor still sends this request, throttled, and the SDK still handles it,
82
+ * for pages on an older `@dotcms/uve`.
79
83
  */
80
84
  __DOTCMS_UVE_EVENT__["UVE_SCROLL_INSIDE_IFRAME"] = "uve-scroll-inside-iframe";
85
+ /**
86
+ * Scroll the page continuously during a drag. Carries `velocity`: signed pixels per 60fps
87
+ * frame, negative to scroll up, `0` to stop. A page that receives it once ignores
88
+ * `UVE_SCROLL_INSIDE_IFRAME` from then on.
89
+ */
90
+ __DOTCMS_UVE_EVENT__["UVE_SCROLL_VELOCITY"] = "uve-scroll-velocity";
81
91
  /**
82
92
  * TODO:
83
93
  * Set the page data - This is used to catch the "changes" event.
package/internal.esm.js CHANGED
@@ -73,9 +73,19 @@ var __DOTCMS_UVE_EVENT__;
73
73
  */
74
74
  __DOTCMS_UVE_EVENT__["UVE_EDITOR_PONG"] = "uve-editor-pong";
75
75
  /**
76
- * Received scroll event trigger from the editor
76
+ * Received scroll event trigger from the editor: one 120px smooth step, `up` or `down`.
77
+ *
78
+ * @deprecated Use `UVE_SCROLL_VELOCITY`, which scrolls the page every frame at the speed the
79
+ * editor sets. The editor still sends this request, throttled, and the SDK still handles it,
80
+ * for pages on an older `@dotcms/uve`.
77
81
  */
78
82
  __DOTCMS_UVE_EVENT__["UVE_SCROLL_INSIDE_IFRAME"] = "uve-scroll-inside-iframe";
83
+ /**
84
+ * Scroll the page continuously during a drag. Carries `velocity`: signed pixels per 60fps
85
+ * frame, negative to scroll up, `0` to stop. A page that receives it once ignores
86
+ * `UVE_SCROLL_INSIDE_IFRAME` from then on.
87
+ */
88
+ __DOTCMS_UVE_EVENT__["UVE_SCROLL_VELOCITY"] = "uve-scroll-velocity";
79
89
  /**
80
90
  * TODO:
81
91
  * Set the page data - This is used to catch the "changes" event.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/types",
3
- "version": "26.11.11-1",
3
+ "version": "26.11.17-1-next.3119",
4
4
  "keywords": [
5
5
  "dotCMS",
6
6
  "CMS",
@@ -78,6 +78,14 @@ export type UVEEventSubscription = {
78
78
  * @typedef {function} UVEEventSubscriber
79
79
  */
80
80
  export type UVEEventSubscriber = (callback: UVEEventHandler) => UVEEventSubscription;
81
+ /**
82
+ * Payload of the {@link DotCMSUVEAction.IFRAME_SCROLL} message.
83
+ *
84
+ * @property {number} [scrollY] - The page's vertical scroll offset. Absent on older SDKs.
85
+ */
86
+ export interface DotCMSIframeScrollPayload {
87
+ scrollY?: number;
88
+ }
81
89
  /**
82
90
  * Actions send to the dotcms editor
83
91
  *
@@ -110,7 +118,8 @@ export declare enum DotCMSUVEAction {
110
118
  */
111
119
  SET_SELECTED_CONTENTLET = "set-selected-contentlet",
112
120
  /**
113
- * Tell the editor that the page is being scrolled
121
+ * Tell the editor that the page is being scrolled. The payload, a
122
+ * {@link DotCMSIframeScrollPayload}, carries the page's `scrollY`; older SDKs send none.
114
123
  */
115
124
  IFRAME_SCROLL = "scroll",
116
125
  /**
@@ -192,8 +201,18 @@ export declare enum UVEEventType {
192
201
  PAGE_RELOAD = "page-reload",
193
202
  /**
194
203
  * Triggered when scroll action is needed inside the iframe
204
+ *
205
+ * @deprecated Use `IFRAME_SCROLL_VELOCITY`, which carries the speed to scroll at every frame
206
+ * during a drag. The editor still sends the one-step request, and the SDK still handles it,
207
+ * for pages on an older `@dotcms/uve`.
195
208
  */
196
209
  IFRAME_SCROLL = "iframe-scroll",
210
+ /**
211
+ * Triggered when the editor sets the speed the page scrolls at during a drag, in signed
212
+ * pixels per 60fps frame; `0` stops it.
213
+ * @internal
214
+ */
215
+ IFRAME_SCROLL_VELOCITY = "iframe-scroll-velocity",
197
216
  /**
198
217
  * Triggered when a contentlet is hovered
199
218
  */
@@ -236,7 +255,13 @@ export declare enum UVEEventType {
236
255
  export type UVEEventPayloadMap = {
237
256
  [UVEEventType.CONTENT_CHANGES]: DotCMSPageResponse;
238
257
  [UVEEventType.PAGE_RELOAD]: undefined;
258
+ /**
259
+ * @deprecated Use the `IFRAME_SCROLL_VELOCITY` payload, a signed speed in px per frame. The
260
+ * editor still sends the one-step request, and the SDK still handles it, for pages on an
261
+ * older `@dotcms/uve`.
262
+ */
239
263
  [UVEEventType.IFRAME_SCROLL]: 'up' | 'down';
264
+ [UVEEventType.IFRAME_SCROLL_VELOCITY]: number;
240
265
  [UVEEventType.CONTENTLET_HOVERED]: unknown;
241
266
  [UVEEventType.CONTENTLET_CLICKED]: unknown;
242
267
  [UVEEventType.SCROLL_TO_SECTION]: {
@@ -28,9 +28,19 @@ export declare enum __DOTCMS_UVE_EVENT__ {
28
28
  */
29
29
  UVE_EDITOR_PONG = "uve-editor-pong",
30
30
  /**
31
- * Received scroll event trigger from the editor
31
+ * Received scroll event trigger from the editor: one 120px smooth step, `up` or `down`.
32
+ *
33
+ * @deprecated Use `UVE_SCROLL_VELOCITY`, which scrolls the page every frame at the speed the
34
+ * editor sets. The editor still sends this request, throttled, and the SDK still handles it,
35
+ * for pages on an older `@dotcms/uve`.
32
36
  */
33
37
  UVE_SCROLL_INSIDE_IFRAME = "uve-scroll-inside-iframe",
38
+ /**
39
+ * Scroll the page continuously during a drag. Carries `velocity`: signed pixels per 60fps
40
+ * frame, negative to scroll up, `0` to stop. A page that receives it once ignores
41
+ * `UVE_SCROLL_INSIDE_IFRAME` from then on.
42
+ */
43
+ UVE_SCROLL_VELOCITY = "uve-scroll-velocity",
34
44
  /**
35
45
  * TODO:
36
46
  * Set the page data - This is used to catch the "changes" event.