@puckeditor/core 0.21.2-canary.2fa198e1 → 0.21.2-canary.39a4e157

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.
Files changed (33) hide show
  1. package/dist/{Editor-JHS34JLP.mjs → Editor-G7Y32A5X.mjs} +6 -6
  2. package/dist/{actions-BRYM0ifH.d.mts → actions-C3e2nJ9v.d.mts} +1 -1
  3. package/dist/{actions-BRYM0ifH.d.ts → actions-C3e2nJ9v.d.ts} +1 -1
  4. package/dist/{chunk-JGZBBNEW.mjs → chunk-7TULKVSG.mjs} +1 -1
  5. package/dist/{chunk-LBGOSTI5.mjs → chunk-LP4Z47YQ.mjs} +135 -90
  6. package/dist/{chunk-46RDHJGL.mjs → chunk-MFEVRMA4.mjs} +7 -7
  7. package/dist/{chunk-TVE6QYBR.mjs → chunk-NBH4DF6Y.mjs} +1 -1
  8. package/dist/{chunk-GYDP2UKB.mjs → chunk-OLGXKSQT.mjs} +3 -3
  9. package/dist/{chunk-BSAENBPL.mjs → chunk-OYCFPEDG.mjs} +1 -1
  10. package/dist/{chunk-AFOEZCNE.mjs → chunk-RSOD4APZ.mjs} +1 -0
  11. package/dist/{full-ATSD2DNB.mjs → full-AG4GMB6M.mjs} +5 -5
  12. package/dist/{index-BVLGipsj.d.mts → index-DAXMlG_V.d.mts} +2 -1
  13. package/dist/{index-D_Idfrfb.d.ts → index-s4HBwSMe.d.ts} +2 -1
  14. package/dist/index.d.mts +4 -4
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +131 -85
  17. package/dist/index.mjs +7 -7
  18. package/dist/internal.d.mts +2 -2
  19. package/dist/internal.d.ts +2 -2
  20. package/dist/{loaded-2765LE3N.mjs → loaded-JCBZ5OYD.mjs} +2 -2
  21. package/dist/{loaded-BKAMJ2FS.mjs → loaded-VT5I2E7C.mjs} +2 -2
  22. package/dist/{loaded-ANEJLSYJ.mjs → loaded-YDSVEZZY.mjs} +2 -2
  23. package/dist/no-external.d.mts +3 -3
  24. package/dist/no-external.d.ts +3 -3
  25. package/dist/no-external.js +131 -85
  26. package/dist/no-external.mjs +7 -7
  27. package/dist/rsc.d.mts +2 -2
  28. package/dist/rsc.d.ts +2 -2
  29. package/dist/rsc.js +42 -24
  30. package/dist/rsc.mjs +42 -24
  31. package/dist/{walk-tree-C1Zdgx7d.d.mts → walk-tree-BJoNgZ0l.d.mts} +1 -1
  32. package/dist/{walk-tree-DQyC1GA7.d.ts → walk-tree-f8Yzs5o3.d.ts} +1 -1
  33. package/package.json +1 -1
@@ -4,16 +4,16 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-GYDP2UKB.mjs";
7
+ } from "./chunk-OLGXKSQT.mjs";
8
8
  import "./chunk-AOEDIUVK.mjs";
9
- import "./chunk-46RDHJGL.mjs";
10
- import "./chunk-JGZBBNEW.mjs";
11
- import "./chunk-BSAENBPL.mjs";
12
- import "./chunk-TVE6QYBR.mjs";
9
+ import "./chunk-MFEVRMA4.mjs";
10
+ import "./chunk-7TULKVSG.mjs";
11
+ import "./chunk-OYCFPEDG.mjs";
12
+ import "./chunk-NBH4DF6Y.mjs";
13
13
  import {
14
14
  useAppStore,
15
15
  useAppStoreApi
16
- } from "./chunk-AFOEZCNE.mjs";
16
+ } from "./chunk-RSOD4APZ.mjs";
17
17
  import "./chunk-YLLE6KXH.mjs";
18
18
  import "./chunk-BOKX3EBR.mjs";
19
19
  import "./chunk-Y2EFNT5P.mjs";
@@ -308,7 +308,7 @@ type CustomFieldRender<Value extends any> = (props: {
308
308
  name: string;
309
309
  id: string;
310
310
  value: Value;
311
- onChange: (value: Value) => void;
311
+ onChange: (value: Value, uiState?: Partial<UiState>) => void;
312
312
  readOnly?: boolean;
313
313
  }) => ReactElement;
314
314
  interface CustomField<Value extends any> extends BaseField {
@@ -308,7 +308,7 @@ type CustomFieldRender<Value extends any> = (props: {
308
308
  name: string;
309
309
  id: string;
310
310
  value: Value;
311
- onChange: (value: Value) => void;
311
+ onChange: (value: Value, uiState?: Partial<UiState>) => void;
312
312
  readOnly?: boolean;
313
313
  }) => ReactElement;
314
314
  interface CustomField<Value extends any> extends BaseField {
@@ -3,7 +3,7 @@ import {
3
3
  AlignJustify,
4
4
  AlignLeft,
5
5
  AlignRight
6
- } from "./chunk-AFOEZCNE.mjs";
6
+ } from "./chunk-RSOD4APZ.mjs";
7
7
  import {
8
8
  init_react_import
9
9
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-GYDP2UKB.mjs";
4
+ } from "./chunk-OLGXKSQT.mjs";
5
5
  import {
6
6
  RichTextRenderFallback,
7
7
  SlotRender,
@@ -16,7 +16,7 @@ import {
16
16
  IconButton,
17
17
  LoadedRichTextMenuInner,
18
18
  Loader
19
- } from "./chunk-46RDHJGL.mjs";
19
+ } from "./chunk-MFEVRMA4.mjs";
20
20
  import {
21
21
  ChevronDown,
22
22
  ChevronRight,
@@ -68,7 +68,7 @@ import {
68
68
  useRegisterHistorySlice,
69
69
  useRegisterPermissionsSlice,
70
70
  useResetAutoZoom
71
- } from "./chunk-AFOEZCNE.mjs";
71
+ } from "./chunk-RSOD4APZ.mjs";
72
72
  import {
73
73
  getItem,
74
74
  insert,
@@ -1368,10 +1368,13 @@ var useLocalValue = (path, onChange) => {
1368
1368
  const value = useDeepField(path);
1369
1369
  const isFocused = useIsFocused(path);
1370
1370
  const [localValue, setLocalValue] = useState5(value == null ? void 0 : value.toString());
1371
- const onChangeLocal = useCallback2((val) => {
1372
- setLocalValue(val);
1373
- onChange(val);
1374
- }, []);
1371
+ const onChangeLocal = useCallback2(
1372
+ (val) => {
1373
+ setLocalValue(val);
1374
+ onChange(val);
1375
+ },
1376
+ [onChange]
1377
+ );
1375
1378
  useEffect3(() => {
1376
1379
  if (!isFocused) {
1377
1380
  setLocalValue(value);
@@ -1988,7 +1991,7 @@ EditorFallback.displayName = "EditorFallback";
1988
1991
  // components/AutoField/fields/RichtextField/index.tsx
1989
1992
  import { Fragment as Fragment5, jsx as jsx18 } from "react/jsx-runtime";
1990
1993
  var Editor = lazy(
1991
- () => import("./Editor-JHS34JLP.mjs").then((m) => ({
1994
+ () => import("./Editor-G7Y32A5X.mjs").then((m) => ({
1992
1995
  default: m.Editor
1993
1996
  }))
1994
1997
  );
@@ -2390,21 +2393,6 @@ var DropZoneProvider = ({
2390
2393
  import { useShallow as useShallow4 } from "zustand/react/shallow";
2391
2394
  import { useSortable as useSortable2 } from "@dnd-kit/react/sortable";
2392
2395
 
2393
- // lib/accumulate-transform.ts
2394
- init_react_import();
2395
- function accumulateTransform(el) {
2396
- let matrix = new DOMMatrixReadOnly();
2397
- let n = el.parentElement;
2398
- while (n && n !== document.documentElement) {
2399
- const t = getComputedStyle(n).transform;
2400
- if (t && t !== "none") {
2401
- matrix = new DOMMatrixReadOnly(t).multiply(matrix);
2402
- }
2403
- n = n.parentElement;
2404
- }
2405
- return { scaleX: matrix.a, scaleY: matrix.d };
2406
- }
2407
-
2408
2396
  // lib/dnd/use-on-drag-finished.ts
2409
2397
  init_react_import();
2410
2398
  import { useCallback as useCallback6 } from "react";
@@ -2441,6 +2429,7 @@ var useOnDragFinished = (cb, deps = []) => {
2441
2429
  import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
2442
2430
  var getClassName14 = get_class_name_factory_default("DraggableComponent", styles_module_default8);
2443
2431
  var DEBUG2 = false;
2432
+ var MEASURE_EVERY_MS = 100;
2444
2433
  var space = 8;
2445
2434
  var actionsOverlayTop = space * 6.5;
2446
2435
  var actionsTop = -(actionsOverlayTop - 8);
@@ -2480,9 +2469,13 @@ var DraggableComponent = ({
2480
2469
  return ((_a = s.selectedItem) == null ? void 0 : _a.props.id) === id ? s.zoomConfig.zoom : 1;
2481
2470
  }
2482
2471
  );
2472
+ const _experimentalFullScreenCanvas = useAppStore(
2473
+ (s) => s._experimentalFullScreenCanvas
2474
+ );
2483
2475
  const overrides = useAppStore((s) => s.overrides);
2484
2476
  const dispatch = useAppStore((s) => s.dispatch);
2485
2477
  const iframe = useAppStore((s) => s.iframe);
2478
+ const lastMeasureRef = useRef2(0);
2486
2479
  const ctx = useContext5(dropZoneContext);
2487
2480
  const [localZones, setLocalZones] = useState10({});
2488
2481
  const registerLocalZone = useCallback7(
@@ -2587,45 +2580,70 @@ var DraggableComponent = ({
2587
2580
  setPortalEl(
2588
2581
  iframe.enabled ? (_a = ref.current) == null ? void 0 : _a.ownerDocument.body : (_c = (_b = ref.current) == null ? void 0 : _b.closest("[data-puck-preview]")) != null ? _c : document.body
2589
2582
  );
2590
- }, [iframe.enabled, ref.current]);
2583
+ }, [iframe.enabled]);
2591
2584
  const getStyle = useCallback7(() => {
2592
- var _a, _b, _c;
2585
+ var _a, _b;
2593
2586
  if (!ref.current) return;
2594
- const rect = ref.current.getBoundingClientRect();
2595
- const deepScrollPosition = getDeepScrollPosition(ref.current);
2596
- const portalContainerEl = iframe.enabled ? null : (_a = ref.current) == null ? void 0 : _a.closest("[data-puck-preview]");
2587
+ const el = ref.current;
2588
+ const rect = el.getBoundingClientRect();
2589
+ const portalContainerEl = iframe.enabled ? null : el.closest("[data-puck-preview]");
2590
+ const targetIsFixed = (() => {
2591
+ let node = el;
2592
+ while (node && node !== document.documentElement) {
2593
+ if (getComputedStyle(node).position === "fixed") {
2594
+ return true;
2595
+ }
2596
+ node = node.parentElement;
2597
+ }
2598
+ return false;
2599
+ })();
2597
2600
  const portalContainerRect = portalContainerEl == null ? void 0 : portalContainerEl.getBoundingClientRect();
2598
2601
  const portalScroll = portalContainerEl ? getDeepScrollPosition(portalContainerEl) : { x: 0, y: 0 };
2599
- const scroll = {
2600
- x: deepScrollPosition.x - portalScroll.x - ((_b = portalContainerRect == null ? void 0 : portalContainerRect.left) != null ? _b : 0),
2601
- y: deepScrollPosition.y - portalScroll.y - ((_c = portalContainerRect == null ? void 0 : portalContainerRect.top) != null ? _c : 0)
2602
- };
2603
- const untransformed = {
2604
- height: ref.current.offsetHeight,
2605
- width: ref.current.offsetWidth
2602
+ const deepScrollPosition = targetIsFixed ? { x: 0, y: 0 } : getDeepScrollPosition(el);
2603
+ const scroll = targetIsFixed ? { x: 0, y: 0 } : {
2604
+ x: deepScrollPosition.x - portalScroll.x - ((_a = portalContainerRect == null ? void 0 : portalContainerRect.left) != null ? _a : 0),
2605
+ y: deepScrollPosition.y - portalScroll.y - ((_b = portalContainerRect == null ? void 0 : portalContainerRect.top) != null ? _b : 0)
2606
2606
  };
2607
- const transform = accumulateTransform(ref.current);
2608
2607
  const style2 = {
2609
- left: `${(rect.left + scroll.x) / transform.scaleX}px`,
2610
- top: `${(rect.top + scroll.y) / transform.scaleY}px`,
2611
- height: `${untransformed.height}px`,
2612
- width: `${untransformed.width}px`
2608
+ left: `${rect.left + scroll.x}px`,
2609
+ top: `${rect.top + scroll.y}px`,
2610
+ height: `${rect.height}px`,
2611
+ width: `${rect.width}px`,
2612
+ position: targetIsFixed ? "fixed" : void 0
2613
2613
  };
2614
2614
  return style2;
2615
- }, [ref.current]);
2615
+ }, [iframe.enabled]);
2616
2616
  const [style, setStyle] = useState10();
2617
+ const lastRectRef = useRef2(null);
2618
+ const syncRafRef = useRef2(null);
2617
2619
  const sync = useCallback7(() => {
2618
2620
  setStyle(getStyle());
2619
- }, [ref.current, iframe]);
2621
+ }, [getStyle]);
2622
+ const scheduleSync = useCallback7(() => {
2623
+ if (syncRafRef.current != null) return;
2624
+ syncRafRef.current = requestAnimationFrame(() => {
2625
+ syncRafRef.current = null;
2626
+ sync();
2627
+ });
2628
+ }, [sync]);
2629
+ useEffect9(() => {
2630
+ return () => {
2631
+ if (syncRafRef.current != null) {
2632
+ cancelAnimationFrame(syncRafRef.current);
2633
+ }
2634
+ };
2635
+ }, []);
2620
2636
  useEffect9(() => {
2621
2637
  if (ref.current) {
2622
- const observer = new ResizeObserver(sync);
2638
+ const observer = new ResizeObserver(() => {
2639
+ scheduleSync();
2640
+ });
2623
2641
  observer.observe(ref.current);
2624
2642
  return () => {
2625
2643
  observer.disconnect();
2626
2644
  };
2627
2645
  }
2628
- }, [ref.current]);
2646
+ }, [scheduleSync]);
2629
2647
  const registerNode = useAppStore((s) => s.nodes.registerNode);
2630
2648
  const hideOverlay = useCallback7(() => {
2631
2649
  setIsVisible(false);
@@ -2664,11 +2682,11 @@ var DraggableComponent = ({
2664
2682
  if (!el.closest("[data-puck-overlay-portal]")) {
2665
2683
  e.stopPropagation();
2666
2684
  }
2667
- if (isSelected) {
2685
+ if (_experimentalFullScreenCanvas) {
2668
2686
  dispatch({
2669
2687
  type: "setUi",
2670
2688
  ui: {
2671
- itemSelector: null
2689
+ itemSelector: isSelected ? null : { index, zone: zoneCompound }
2672
2690
  }
2673
2691
  });
2674
2692
  } else {
@@ -2680,7 +2698,7 @@ var DraggableComponent = ({
2680
2698
  });
2681
2699
  }
2682
2700
  },
2683
- [index, zoneCompound, id, isSelected]
2701
+ [index, zoneCompound, id, isSelected, _experimentalFullScreenCanvas]
2684
2702
  );
2685
2703
  const appStore = useAppStoreApi();
2686
2704
  const onSelectParent = useCallback7(() => {
@@ -2774,7 +2792,7 @@ var DraggableComponent = ({
2774
2792
  useEffect9(() => {
2775
2793
  startTransition(() => {
2776
2794
  if (hover || indicativeHover || isSelected) {
2777
- sync();
2795
+ scheduleSync();
2778
2796
  setIsVisible(true);
2779
2797
  setThisWasDragging(false);
2780
2798
  } else {
@@ -2786,7 +2804,7 @@ var DraggableComponent = ({
2786
2804
  const onDragFinished = useOnDragFinished((finished) => {
2787
2805
  if (finished) {
2788
2806
  startTransition(() => {
2789
- sync();
2807
+ scheduleSync();
2790
2808
  setDragFinished(true);
2791
2809
  });
2792
2810
  } else {
@@ -2801,6 +2819,43 @@ var DraggableComponent = ({
2801
2819
  useEffect9(() => {
2802
2820
  if (thisWasDragging) return onDragFinished();
2803
2821
  }, [thisWasDragging, onDragFinished]);
2822
+ useEffect9(() => {
2823
+ if (!dragFinished || !(isSelected || thisIsDragging)) return;
2824
+ const el = ref.current;
2825
+ if (!el) return;
2826
+ const doc = el.ownerDocument;
2827
+ const view = doc.defaultView;
2828
+ if (!view) return;
2829
+ lastMeasureRef.current = 0;
2830
+ scheduleSync();
2831
+ const onScroll = () => scheduleSync();
2832
+ const onResize = () => scheduleSync();
2833
+ doc.addEventListener("scroll", onScroll, true);
2834
+ view.addEventListener("resize", onResize);
2835
+ let frame = 0;
2836
+ const tick = (t) => {
2837
+ if (t - lastMeasureRef.current >= MEASURE_EVERY_MS) {
2838
+ lastMeasureRef.current = t;
2839
+ const node = ref.current;
2840
+ if (node) {
2841
+ const rect = node.getBoundingClientRect();
2842
+ const prev = lastRectRef.current;
2843
+ const changed = !prev || Math.abs(rect.x - prev.x) > 0.5 || Math.abs(rect.y - prev.y) > 0.5 || Math.abs(rect.width - prev.width) > 0.5 || Math.abs(rect.height - prev.height) > 0.5;
2844
+ if (changed) {
2845
+ lastRectRef.current = rect;
2846
+ scheduleSync();
2847
+ }
2848
+ }
2849
+ }
2850
+ frame = requestAnimationFrame(tick);
2851
+ };
2852
+ frame = requestAnimationFrame(tick);
2853
+ return () => {
2854
+ doc.removeEventListener("scroll", onScroll, true);
2855
+ view.removeEventListener("resize", onResize);
2856
+ cancelAnimationFrame(frame);
2857
+ };
2858
+ }, [dragFinished, isSelected, thisIsDragging, scheduleSync]);
2804
2859
  const syncActionsPosition = useCallback7(
2805
2860
  (el) => {
2806
2861
  if (el) {
@@ -3554,24 +3609,9 @@ var DragDropContextClient = ({
3554
3609
  zoneStore.setState({ draggedItem: null });
3555
3610
  if (event.canceled || (target == null ? void 0 : target.type) === "void") {
3556
3611
  zoneStore.setState({ previewIndex: {} });
3557
- if (thisPreview) {
3558
- zoneStore.setState({ previewIndex: {} });
3559
- if (thisPreview.type === "insert") {
3560
- insertComponent(
3561
- thisPreview.componentType,
3562
- thisPreview.zone,
3563
- thisPreview.index,
3564
- appStore
3565
- );
3566
- } else if (initialSelector.current) {
3567
- moveComponent(
3568
- thisPreview.props.id,
3569
- initialSelector.current,
3570
- thisPreview,
3571
- appStore
3572
- );
3573
- }
3574
- }
3612
+ (_a2 = dragListeners.dragend) == null ? void 0 : _a2.forEach((fn) => {
3613
+ fn(event, manager);
3614
+ });
3575
3615
  dispatch({
3576
3616
  type: "setUi",
3577
3617
  ui: {
@@ -3579,9 +3619,6 @@ var DragDropContextClient = ({
3579
3619
  isDragging: false
3580
3620
  }
3581
3621
  });
3582
- (_a2 = dragListeners.dragend) == null ? void 0 : _a2.forEach((fn) => {
3583
- fn(event, manager);
3584
- });
3585
3622
  return;
3586
3623
  }
3587
3624
  if (thisPreview) {
@@ -3594,14 +3631,12 @@ var DragDropContextClient = ({
3594
3631
  appStore
3595
3632
  );
3596
3633
  } else if (initialSelector.current) {
3597
- dispatch({
3598
- type: "move",
3599
- sourceIndex: initialSelector.current.index,
3600
- sourceZone: initialSelector.current.zone,
3601
- destinationIndex: thisPreview.index,
3602
- destinationZone: thisPreview.zone,
3603
- recordHistory: false
3604
- });
3634
+ moveComponent(
3635
+ thisPreview.props.id,
3636
+ initialSelector.current,
3637
+ thisPreview,
3638
+ appStore
3639
+ );
3605
3640
  }
3606
3641
  }
3607
3642
  dispatch({
@@ -3610,7 +3645,7 @@ var DragDropContextClient = ({
3610
3645
  itemSelector: { index, zone },
3611
3646
  isDragging: false
3612
3647
  },
3613
- recordHistory: true
3648
+ recordHistory: false
3614
3649
  });
3615
3650
  (_b2 = dragListeners.dragend) == null ? void 0 : _b2.forEach((fn) => {
3616
3651
  fn(event, manager);
@@ -4403,7 +4438,7 @@ import {
4403
4438
  } from "react";
4404
4439
  import { jsx as jsx28 } from "react/jsx-runtime";
4405
4440
  var Editor2 = lazy2(
4406
- () => import("./Editor-JHS34JLP.mjs").then((m) => ({
4441
+ () => import("./Editor-G7Y32A5X.mjs").then((m) => ({
4407
4442
  default: m.Editor
4408
4443
  }))
4409
4444
  );
@@ -7014,11 +7049,7 @@ var Canvas = () => {
7014
7049
  var _a;
7015
7050
  const { frameRef } = useCanvasFrame();
7016
7051
  const resetAutoZoom = useResetAutoZoom(frameRef);
7017
- const {
7018
- _experimentalFullScreenCanvas,
7019
- viewports: viewportOptions = defaultViewports,
7020
- ui: uiProp
7021
- } = usePropsContext();
7052
+ const { viewports: viewportOptions = defaultViewports, ui: uiProp } = usePropsContext();
7022
7053
  const {
7023
7054
  dispatch,
7024
7055
  overrides,
@@ -7026,7 +7057,8 @@ var Canvas = () => {
7026
7057
  zoomConfig,
7027
7058
  setZoomConfig,
7028
7059
  status,
7029
- iframe
7060
+ iframe,
7061
+ _experimentalFullScreenCanvas
7030
7062
  } = useAppStore(
7031
7063
  useShallow10((s) => ({
7032
7064
  dispatch: s.dispatch,
@@ -7035,7 +7067,8 @@ var Canvas = () => {
7035
7067
  zoomConfig: s.zoomConfig,
7036
7068
  setZoomConfig: s.setZoomConfig,
7037
7069
  status: s.status,
7038
- iframe: s.iframe
7070
+ iframe: s.iframe,
7071
+ _experimentalFullScreenCanvas: s._experimentalFullScreenCanvas
7039
7072
  }))
7040
7073
  );
7041
7074
  const {
@@ -7178,7 +7211,7 @@ var Canvas = () => {
7178
7211
  dispatch({
7179
7212
  type: "setUi",
7180
7213
  ui: { itemSelector: null },
7181
- recordHistory: true
7214
+ recordHistory: false
7182
7215
  });
7183
7216
  }
7184
7217
  },
@@ -7833,7 +7866,8 @@ function PuckProvider({ children }) {
7833
7866
  initialHistory: _initialHistory,
7834
7867
  metadata,
7835
7868
  onAction,
7836
- fieldTransforms
7869
+ fieldTransforms,
7870
+ _experimentalFullScreenCanvas
7837
7871
  } = usePropsContext();
7838
7872
  const iframe = useMemo24(
7839
7873
  () => __spreadValues({
@@ -7926,6 +7960,7 @@ function PuckProvider({ children }) {
7926
7960
  overrides: loadedOverrides,
7927
7961
  viewports,
7928
7962
  iframe,
7963
+ _experimentalFullScreenCanvas: !!_experimentalFullScreenCanvas,
7929
7964
  onAction,
7930
7965
  metadata,
7931
7966
  fieldTransforms: loadedFieldTransforms
@@ -7939,6 +7974,7 @@ function PuckProvider({ children }) {
7939
7974
  loadedOverrides,
7940
7975
  viewports,
7941
7976
  iframe,
7977
+ _experimentalFullScreenCanvas,
7942
7978
  onAction,
7943
7979
  metadata,
7944
7980
  loadedFieldTransforms
@@ -7955,7 +7991,16 @@ function PuckProvider({ children }) {
7955
7991
  useEffect29(() => {
7956
7992
  const state = appStore.getState().state;
7957
7993
  appStore.setState(__spreadValues({}, generateAppStore(state)));
7958
- }, [config, plugins, loadedOverrides, viewports, iframe, onAction, metadata]);
7994
+ }, [
7995
+ config,
7996
+ plugins,
7997
+ loadedOverrides,
7998
+ viewports,
7999
+ iframe,
8000
+ _experimentalFullScreenCanvas,
8001
+ onAction,
8002
+ metadata
8003
+ ]);
7959
8004
  useRegisterHistorySlice(appStore, {
7960
8005
  histories: blendedHistories,
7961
8006
  index: initialHistoryIndex,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-JGZBBNEW.mjs";
3
+ } from "./chunk-7TULKVSG.mjs";
4
4
  import {
5
5
  useHeadingOptions
6
- } from "./chunk-BSAENBPL.mjs";
6
+ } from "./chunk-OYCFPEDG.mjs";
7
7
  import {
8
8
  useListOptions
9
- } from "./chunk-TVE6QYBR.mjs";
9
+ } from "./chunk-NBH4DF6Y.mjs";
10
10
  import {
11
11
  AlignCenter,
12
12
  AlignJustify,
@@ -26,7 +26,7 @@ import {
26
26
  Strikethrough,
27
27
  Underline,
28
28
  useControlContext
29
- } from "./chunk-AFOEZCNE.mjs";
29
+ } from "./chunk-RSOD4APZ.mjs";
30
30
  import {
31
31
  get_class_name_factory_default
32
32
  } from "./chunk-Y2EFNT5P.mjs";
@@ -349,7 +349,7 @@ function AlignSelectFallback() {
349
349
  // components/RichTextMenu/controls/AlignSelect/index.tsx
350
350
  import { jsx as jsx10 } from "react/jsx-runtime";
351
351
  var AlignSelectLoaded = lazy(
352
- () => import("./loaded-ANEJLSYJ.mjs").then((m) => ({
352
+ () => import("./loaded-YDSVEZZY.mjs").then((m) => ({
353
353
  default: m.AlignSelectLoaded
354
354
  }))
355
355
  );
@@ -580,7 +580,7 @@ function HeadingSelectFallback() {
580
580
  // components/RichTextMenu/controls/HeadingSelect/index.tsx
581
581
  import { jsx as jsx22 } from "react/jsx-runtime";
582
582
  var HeadingSelectLoaded = lazy2(
583
- () => import("./loaded-BKAMJ2FS.mjs").then((m) => ({
583
+ () => import("./loaded-VT5I2E7C.mjs").then((m) => ({
584
584
  default: m.HeadingSelectLoaded
585
585
  }))
586
586
  );
@@ -612,7 +612,7 @@ function ListSelectFallback() {
612
612
  // components/RichTextMenu/controls/ListSelect/index.tsx
613
613
  import { jsx as jsx24 } from "react/jsx-runtime";
614
614
  var ListSelectLoaded = lazy3(
615
- () => import("./loaded-2765LE3N.mjs").then((m) => ({
615
+ () => import("./loaded-JCBZ5OYD.mjs").then((m) => ({
616
616
  default: m.ListSelectLoaded
617
617
  }))
618
618
  );
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-AFOEZCNE.mjs";
4
+ } from "./chunk-RSOD4APZ.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-AOEDIUVK.mjs";
4
4
  import {
5
5
  LoadedRichTextMenuInner
6
- } from "./chunk-46RDHJGL.mjs";
6
+ } from "./chunk-MFEVRMA4.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
10
- } from "./chunk-AFOEZCNE.mjs";
10
+ } from "./chunk-RSOD4APZ.mjs";
11
11
  import {
12
12
  get_class_name_factory_default
13
13
  } from "./chunk-Y2EFNT5P.mjs";
@@ -100,7 +100,7 @@ init_react_import();
100
100
  import { lazy, Suspense } from "react";
101
101
  import { jsx as jsx2 } from "react/jsx-runtime";
102
102
  var LoadedRichTextMenuFull = lazy(
103
- () => import("./full-ATSD2DNB.mjs").then((m) => ({
103
+ () => import("./full-AG4GMB6M.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -5,7 +5,7 @@ import {
5
5
  Heading4,
6
6
  Heading5,
7
7
  Heading6
8
- } from "./chunk-AFOEZCNE.mjs";
8
+ } from "./chunk-RSOD4APZ.mjs";
9
9
  import {
10
10
  init_react_import
11
11
  } from "./chunk-M6W7YEVX.mjs";
@@ -1182,6 +1182,7 @@ var createAppStore = (initialAppStore) => create2()(
1182
1182
  },
1183
1183
  status: "LOADING",
1184
1184
  iframe: {},
1185
+ _experimentalFullScreenCanvas: false,
1185
1186
  metadata: {},
1186
1187
  fieldTransforms: {}
1187
1188
  }, initialAppStore), {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-46RDHJGL.mjs";
4
- import "./chunk-JGZBBNEW.mjs";
5
- import "./chunk-BSAENBPL.mjs";
6
- import "./chunk-TVE6QYBR.mjs";
7
- import "./chunk-AFOEZCNE.mjs";
3
+ } from "./chunk-MFEVRMA4.mjs";
4
+ import "./chunk-7TULKVSG.mjs";
5
+ import "./chunk-OYCFPEDG.mjs";
6
+ import "./chunk-NBH4DF6Y.mjs";
7
+ import "./chunk-RSOD4APZ.mjs";
8
8
  import "./chunk-YLLE6KXH.mjs";
9
9
  import "./chunk-BOKX3EBR.mjs";
10
10
  import "./chunk-Y2EFNT5P.mjs";
@@ -1,4 +1,4 @@
1
- import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BRYM0ifH.mjs';
1
+ import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-C3e2nJ9v.mjs';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -95,6 +95,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
95
95
  status: Status;
96
96
  setStatus: (status: Status) => void;
97
97
  iframe: IframeConfig;
98
+ _experimentalFullScreenCanvas: boolean;
98
99
  selectedItem?: G["UserData"]["content"][0] | null;
99
100
  getCurrentData: () => G["UserData"]["content"][0] | G["UserData"]["root"];
100
101
  setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
@@ -1,4 +1,4 @@
1
- import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BRYM0ifH.js';
1
+ import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-C3e2nJ9v.js';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -95,6 +95,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
95
95
  status: Status;
96
96
  setStatus: (status: Status) => void;
97
97
  iframe: IframeConfig;
98
+ _experimentalFullScreenCanvas: boolean;
98
99
  selectedItem?: G["UserData"]["content"][0] | null;
99
100
  getCurrentData: () => G["UserData"]["content"][0] | G["UserData"]["root"];
100
101
  setUi: (ui: Partial<UiState>, recordHistory?: boolean) => void;
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-BRYM0ifH.mjs';
2
- export { v as Adaptor, A as AppState, w as ArrayField, x as ArrayState, y as AsFieldProps, B as BaseData, z as BaseField, E as CacheOpts, m as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, b as Content, S as CustomField, T as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as ExternalField, a0 as ExternalFieldWithAdaptor, a1 as ExtractConfigParams, a2 as ExtractField, a3 as FieldMetadata, a4 as FieldRenderFunctions, a5 as FieldTransformFn, a6 as FieldTransformFnParams, F as Fields, H as History, a7 as ItemWithId, a8 as MappedItem, a9 as NumberField, aa as ObjectField, ab as OverrideKey, ac as PuckComponent, ad as PuckContext, ae as PuckMetadata, af as RadioField, ag as RichText, o as RichtextField, ah as RootConfig, R as RootData, h as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, W as WithId, ar as WithPuckProps, as as WithSlotProps, at as overrideKeys } from './actions-BRYM0ifH.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-C1Zdgx7d.mjs';
1
+ import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-C3e2nJ9v.mjs';
2
+ export { v as Adaptor, A as AppState, w as ArrayField, x as ArrayState, y as AsFieldProps, B as BaseData, z as BaseField, E as CacheOpts, m as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, b as Content, S as CustomField, T as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as ExternalField, a0 as ExternalFieldWithAdaptor, a1 as ExtractConfigParams, a2 as ExtractField, a3 as FieldMetadata, a4 as FieldRenderFunctions, a5 as FieldTransformFn, a6 as FieldTransformFnParams, F as Fields, H as History, a7 as ItemWithId, a8 as MappedItem, a9 as NumberField, aa as ObjectField, ab as OverrideKey, ac as PuckComponent, ad as PuckContext, ae as PuckMetadata, af as RadioField, ag as RichText, o as RichtextField, ah as RootConfig, R as RootData, h as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, W as WithId, ar as WithPuckProps, as as WithSlotProps, at as overrideKeys } from './actions-C3e2nJ9v.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BJoNgZ0l.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
7
- import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BVLGipsj.mjs';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DAXMlG_V.mjs';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';