@contentful/experiences-visual-editor-react 3.0.1-dev-20250807T0745-c928267.0 → 3.1.0-dev-20250807T0841-78e6af6.0
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/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +17 -0
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/renderApp.js
CHANGED
|
@@ -47012,6 +47012,7 @@ const OUTGOING_EVENTS = {
|
|
|
47012
47012
|
SDKFeatures: 'sdkFeatures',
|
|
47013
47013
|
RequestEntities: 'REQUEST_ENTITIES',
|
|
47014
47014
|
CanvasGeometryUpdated: 'canvasGeometryUpdated',
|
|
47015
|
+
CanvasPan: 'canvasPan',
|
|
47015
47016
|
};
|
|
47016
47017
|
const INCOMING_EVENTS = {
|
|
47017
47018
|
RequestEditorMode: 'requestEditorMode',
|
|
@@ -50301,6 +50302,22 @@ const useCanvasGeometryUpdates = ({ tree }) => {
|
|
|
50301
50302
|
isCurrent = false;
|
|
50302
50303
|
};
|
|
50303
50304
|
}, [allImages, loadedImages, debouncedUpdateGeometry]);
|
|
50305
|
+
// Delegate scrolling to the canvas
|
|
50306
|
+
reactExports.useEffect(() => {
|
|
50307
|
+
const onWheel = (e) => {
|
|
50308
|
+
e.preventDefault();
|
|
50309
|
+
sendMessage(OUTGOING_EVENTS.CanvasPan, {
|
|
50310
|
+
ctrlKey: e.ctrlKey,
|
|
50311
|
+
metaKey: e.metaKey,
|
|
50312
|
+
clientX: e.clientX,
|
|
50313
|
+
clientY: e.clientY,
|
|
50314
|
+
deltaX: e.deltaX,
|
|
50315
|
+
deltaY: e.deltaY,
|
|
50316
|
+
});
|
|
50317
|
+
};
|
|
50318
|
+
document.addEventListener('wheel', onWheel, { passive: false });
|
|
50319
|
+
return () => document.removeEventListener('wheel', onWheel);
|
|
50320
|
+
}, []);
|
|
50304
50321
|
};
|
|
50305
50322
|
|
|
50306
50323
|
const RootRenderer = ({ inMemoryEntitiesStore }) => {
|