@puckeditor/core 0.21.2-canary.d839a39a → 0.21.2-canary.e8bbc09a
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/{Editor-JHS34JLP.mjs → Editor-G7Y32A5X.mjs} +6 -6
- package/dist/{chunk-JGZBBNEW.mjs → chunk-7TULKVSG.mjs} +1 -1
- package/dist/{chunk-46RDHJGL.mjs → chunk-MFEVRMA4.mjs} +7 -7
- package/dist/{chunk-TVE6QYBR.mjs → chunk-NBH4DF6Y.mjs} +1 -1
- package/dist/{chunk-447U25KS.mjs → chunk-NC4BJKT6.mjs} +117 -55
- package/dist/{chunk-GYDP2UKB.mjs → chunk-OLGXKSQT.mjs} +3 -3
- package/dist/{chunk-BSAENBPL.mjs → chunk-OYCFPEDG.mjs} +1 -1
- package/dist/{chunk-AFOEZCNE.mjs → chunk-RSOD4APZ.mjs} +1 -0
- package/dist/{full-ATSD2DNB.mjs → full-AG4GMB6M.mjs} +5 -5
- package/dist/{index-CMP1bTUS.d.mts → index-DAXMlG_V.d.mts} +1 -0
- package/dist/{index-DnAz_ZaB.d.ts → index-s4HBwSMe.d.ts} +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +113 -50
- package/dist/index.mjs +7 -7
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/{loaded-2765LE3N.mjs → loaded-JCBZ5OYD.mjs} +2 -2
- package/dist/{loaded-BKAMJ2FS.mjs → loaded-VT5I2E7C.mjs} +2 -2
- package/dist/{loaded-ANEJLSYJ.mjs → loaded-YDSVEZZY.mjs} +2 -2
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +113 -50
- package/dist/no-external.mjs +7 -7
- package/dist/rsc.js +42 -24
- package/dist/rsc.mjs +42 -24
- package/package.json +1 -1
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
EditorInner,
|
|
6
6
|
LoadedRichTextMenu
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OLGXKSQT.mjs";
|
|
8
8
|
import "./chunk-AOEDIUVK.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
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-
|
|
16
|
+
} from "./chunk-RSOD4APZ.mjs";
|
|
17
17
|
import "./chunk-YLLE6KXH.mjs";
|
|
18
18
|
import "./chunk-BOKX3EBR.mjs";
|
|
19
19
|
import "./chunk-Y2EFNT5P.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7TULKVSG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OYCFPEDG.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
EditorInner,
|
|
3
3
|
LoadedRichTextMenu
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
71
|
+
} from "./chunk-RSOD4APZ.mjs";
|
|
72
72
|
import {
|
|
73
73
|
getItem,
|
|
74
74
|
insert,
|
|
@@ -1991,7 +1991,7 @@ EditorFallback.displayName = "EditorFallback";
|
|
|
1991
1991
|
// components/AutoField/fields/RichtextField/index.tsx
|
|
1992
1992
|
import { Fragment as Fragment5, jsx as jsx18 } from "react/jsx-runtime";
|
|
1993
1993
|
var Editor = lazy(
|
|
1994
|
-
() => import("./Editor-
|
|
1994
|
+
() => import("./Editor-G7Y32A5X.mjs").then((m) => ({
|
|
1995
1995
|
default: m.Editor
|
|
1996
1996
|
}))
|
|
1997
1997
|
);
|
|
@@ -2393,21 +2393,6 @@ var DropZoneProvider = ({
|
|
|
2393
2393
|
import { useShallow as useShallow4 } from "zustand/react/shallow";
|
|
2394
2394
|
import { useSortable as useSortable2 } from "@dnd-kit/react/sortable";
|
|
2395
2395
|
|
|
2396
|
-
// lib/accumulate-transform.ts
|
|
2397
|
-
init_react_import();
|
|
2398
|
-
function accumulateTransform(el) {
|
|
2399
|
-
let matrix = new DOMMatrixReadOnly();
|
|
2400
|
-
let n = el.parentElement;
|
|
2401
|
-
while (n && n !== document.documentElement) {
|
|
2402
|
-
const t = getComputedStyle(n).transform;
|
|
2403
|
-
if (t && t !== "none") {
|
|
2404
|
-
matrix = new DOMMatrixReadOnly(t).multiply(matrix);
|
|
2405
|
-
}
|
|
2406
|
-
n = n.parentElement;
|
|
2407
|
-
}
|
|
2408
|
-
return { scaleX: matrix.a, scaleY: matrix.d };
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
2396
|
// lib/dnd/use-on-drag-finished.ts
|
|
2412
2397
|
init_react_import();
|
|
2413
2398
|
import { useCallback as useCallback6 } from "react";
|
|
@@ -2444,6 +2429,7 @@ var useOnDragFinished = (cb, deps = []) => {
|
|
|
2444
2429
|
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2445
2430
|
var getClassName14 = get_class_name_factory_default("DraggableComponent", styles_module_default8);
|
|
2446
2431
|
var DEBUG2 = false;
|
|
2432
|
+
var MEASURE_EVERY_MS = 100;
|
|
2447
2433
|
var space = 8;
|
|
2448
2434
|
var actionsOverlayTop = space * 6.5;
|
|
2449
2435
|
var actionsTop = -(actionsOverlayTop - 8);
|
|
@@ -2483,9 +2469,13 @@ var DraggableComponent = ({
|
|
|
2483
2469
|
return ((_a = s.selectedItem) == null ? void 0 : _a.props.id) === id ? s.zoomConfig.zoom : 1;
|
|
2484
2470
|
}
|
|
2485
2471
|
);
|
|
2472
|
+
const _experimentalFullScreenCanvas = useAppStore(
|
|
2473
|
+
(s) => s._experimentalFullScreenCanvas
|
|
2474
|
+
);
|
|
2486
2475
|
const overrides = useAppStore((s) => s.overrides);
|
|
2487
2476
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
2488
2477
|
const iframe = useAppStore((s) => s.iframe);
|
|
2478
|
+
const lastMeasureRef = useRef2(0);
|
|
2489
2479
|
const ctx = useContext5(dropZoneContext);
|
|
2490
2480
|
const [localZones, setLocalZones] = useState10({});
|
|
2491
2481
|
const registerLocalZone = useCallback7(
|
|
@@ -2590,45 +2580,70 @@ var DraggableComponent = ({
|
|
|
2590
2580
|
setPortalEl(
|
|
2591
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
|
|
2592
2582
|
);
|
|
2593
|
-
}, [iframe.enabled
|
|
2583
|
+
}, [iframe.enabled]);
|
|
2594
2584
|
const getStyle = useCallback7(() => {
|
|
2595
|
-
var _a, _b
|
|
2585
|
+
var _a, _b;
|
|
2596
2586
|
if (!ref.current) return;
|
|
2597
|
-
const
|
|
2598
|
-
const
|
|
2599
|
-
const portalContainerEl = iframe.enabled ? null :
|
|
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
|
+
})();
|
|
2600
2600
|
const portalContainerRect = portalContainerEl == null ? void 0 : portalContainerEl.getBoundingClientRect();
|
|
2601
2601
|
const portalScroll = portalContainerEl ? getDeepScrollPosition(portalContainerEl) : { x: 0, y: 0 };
|
|
2602
|
-
const
|
|
2603
|
-
|
|
2604
|
-
|
|
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)
|
|
2605
2606
|
};
|
|
2606
|
-
const untransformed = {
|
|
2607
|
-
height: ref.current.offsetHeight,
|
|
2608
|
-
width: ref.current.offsetWidth
|
|
2609
|
-
};
|
|
2610
|
-
const transform = accumulateTransform(ref.current);
|
|
2611
2607
|
const style2 = {
|
|
2612
|
-
left: `${
|
|
2613
|
-
top: `${
|
|
2614
|
-
height: `${
|
|
2615
|
-
width: `${
|
|
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
|
|
2616
2613
|
};
|
|
2617
2614
|
return style2;
|
|
2618
|
-
}, [
|
|
2615
|
+
}, [iframe.enabled]);
|
|
2619
2616
|
const [style, setStyle] = useState10();
|
|
2617
|
+
const lastRectRef = useRef2(null);
|
|
2618
|
+
const syncRafRef = useRef2(null);
|
|
2620
2619
|
const sync = useCallback7(() => {
|
|
2621
2620
|
setStyle(getStyle());
|
|
2622
|
-
}, [
|
|
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
|
+
}, []);
|
|
2623
2636
|
useEffect9(() => {
|
|
2624
2637
|
if (ref.current) {
|
|
2625
|
-
const observer = new ResizeObserver(
|
|
2638
|
+
const observer = new ResizeObserver(() => {
|
|
2639
|
+
scheduleSync();
|
|
2640
|
+
});
|
|
2626
2641
|
observer.observe(ref.current);
|
|
2627
2642
|
return () => {
|
|
2628
2643
|
observer.disconnect();
|
|
2629
2644
|
};
|
|
2630
2645
|
}
|
|
2631
|
-
}, [
|
|
2646
|
+
}, [scheduleSync]);
|
|
2632
2647
|
const registerNode = useAppStore((s) => s.nodes.registerNode);
|
|
2633
2648
|
const hideOverlay = useCallback7(() => {
|
|
2634
2649
|
setIsVisible(false);
|
|
@@ -2667,11 +2682,11 @@ var DraggableComponent = ({
|
|
|
2667
2682
|
if (!el.closest("[data-puck-overlay-portal]")) {
|
|
2668
2683
|
e.stopPropagation();
|
|
2669
2684
|
}
|
|
2670
|
-
if (
|
|
2685
|
+
if (_experimentalFullScreenCanvas) {
|
|
2671
2686
|
dispatch({
|
|
2672
2687
|
type: "setUi",
|
|
2673
2688
|
ui: {
|
|
2674
|
-
itemSelector: null
|
|
2689
|
+
itemSelector: isSelected ? null : { index, zone: zoneCompound }
|
|
2675
2690
|
}
|
|
2676
2691
|
});
|
|
2677
2692
|
} else {
|
|
@@ -2683,7 +2698,7 @@ var DraggableComponent = ({
|
|
|
2683
2698
|
});
|
|
2684
2699
|
}
|
|
2685
2700
|
},
|
|
2686
|
-
[index, zoneCompound, id, isSelected]
|
|
2701
|
+
[index, zoneCompound, id, isSelected, _experimentalFullScreenCanvas]
|
|
2687
2702
|
);
|
|
2688
2703
|
const appStore = useAppStoreApi();
|
|
2689
2704
|
const onSelectParent = useCallback7(() => {
|
|
@@ -2777,7 +2792,7 @@ var DraggableComponent = ({
|
|
|
2777
2792
|
useEffect9(() => {
|
|
2778
2793
|
startTransition(() => {
|
|
2779
2794
|
if (hover || indicativeHover || isSelected) {
|
|
2780
|
-
|
|
2795
|
+
scheduleSync();
|
|
2781
2796
|
setIsVisible(true);
|
|
2782
2797
|
setThisWasDragging(false);
|
|
2783
2798
|
} else {
|
|
@@ -2789,7 +2804,7 @@ var DraggableComponent = ({
|
|
|
2789
2804
|
const onDragFinished = useOnDragFinished((finished) => {
|
|
2790
2805
|
if (finished) {
|
|
2791
2806
|
startTransition(() => {
|
|
2792
|
-
|
|
2807
|
+
scheduleSync();
|
|
2793
2808
|
setDragFinished(true);
|
|
2794
2809
|
});
|
|
2795
2810
|
} else {
|
|
@@ -2804,6 +2819,43 @@ var DraggableComponent = ({
|
|
|
2804
2819
|
useEffect9(() => {
|
|
2805
2820
|
if (thisWasDragging) return onDragFinished();
|
|
2806
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]);
|
|
2807
2859
|
const syncActionsPosition = useCallback7(
|
|
2808
2860
|
(el) => {
|
|
2809
2861
|
if (el) {
|
|
@@ -4386,7 +4438,7 @@ import {
|
|
|
4386
4438
|
} from "react";
|
|
4387
4439
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4388
4440
|
var Editor2 = lazy2(
|
|
4389
|
-
() => import("./Editor-
|
|
4441
|
+
() => import("./Editor-G7Y32A5X.mjs").then((m) => ({
|
|
4390
4442
|
default: m.Editor
|
|
4391
4443
|
}))
|
|
4392
4444
|
);
|
|
@@ -6997,11 +7049,7 @@ var Canvas = () => {
|
|
|
6997
7049
|
var _a;
|
|
6998
7050
|
const { frameRef } = useCanvasFrame();
|
|
6999
7051
|
const resetAutoZoom = useResetAutoZoom(frameRef);
|
|
7000
|
-
const {
|
|
7001
|
-
_experimentalFullScreenCanvas,
|
|
7002
|
-
viewports: viewportOptions = defaultViewports,
|
|
7003
|
-
ui: uiProp
|
|
7004
|
-
} = usePropsContext();
|
|
7052
|
+
const { viewports: viewportOptions = defaultViewports, ui: uiProp } = usePropsContext();
|
|
7005
7053
|
const {
|
|
7006
7054
|
dispatch,
|
|
7007
7055
|
overrides,
|
|
@@ -7009,7 +7057,8 @@ var Canvas = () => {
|
|
|
7009
7057
|
zoomConfig,
|
|
7010
7058
|
setZoomConfig,
|
|
7011
7059
|
status,
|
|
7012
|
-
iframe
|
|
7060
|
+
iframe,
|
|
7061
|
+
_experimentalFullScreenCanvas
|
|
7013
7062
|
} = useAppStore(
|
|
7014
7063
|
useShallow10((s) => ({
|
|
7015
7064
|
dispatch: s.dispatch,
|
|
@@ -7018,7 +7067,8 @@ var Canvas = () => {
|
|
|
7018
7067
|
zoomConfig: s.zoomConfig,
|
|
7019
7068
|
setZoomConfig: s.setZoomConfig,
|
|
7020
7069
|
status: s.status,
|
|
7021
|
-
iframe: s.iframe
|
|
7070
|
+
iframe: s.iframe,
|
|
7071
|
+
_experimentalFullScreenCanvas: s._experimentalFullScreenCanvas
|
|
7022
7072
|
}))
|
|
7023
7073
|
);
|
|
7024
7074
|
const {
|
|
@@ -7816,7 +7866,8 @@ function PuckProvider({ children }) {
|
|
|
7816
7866
|
initialHistory: _initialHistory,
|
|
7817
7867
|
metadata,
|
|
7818
7868
|
onAction,
|
|
7819
|
-
fieldTransforms
|
|
7869
|
+
fieldTransforms,
|
|
7870
|
+
_experimentalFullScreenCanvas
|
|
7820
7871
|
} = usePropsContext();
|
|
7821
7872
|
const iframe = useMemo24(
|
|
7822
7873
|
() => __spreadValues({
|
|
@@ -7909,6 +7960,7 @@ function PuckProvider({ children }) {
|
|
|
7909
7960
|
overrides: loadedOverrides,
|
|
7910
7961
|
viewports,
|
|
7911
7962
|
iframe,
|
|
7963
|
+
_experimentalFullScreenCanvas: !!_experimentalFullScreenCanvas,
|
|
7912
7964
|
onAction,
|
|
7913
7965
|
metadata,
|
|
7914
7966
|
fieldTransforms: loadedFieldTransforms
|
|
@@ -7922,6 +7974,7 @@ function PuckProvider({ children }) {
|
|
|
7922
7974
|
loadedOverrides,
|
|
7923
7975
|
viewports,
|
|
7924
7976
|
iframe,
|
|
7977
|
+
_experimentalFullScreenCanvas,
|
|
7925
7978
|
onAction,
|
|
7926
7979
|
metadata,
|
|
7927
7980
|
loadedFieldTransforms
|
|
@@ -7938,7 +7991,16 @@ function PuckProvider({ children }) {
|
|
|
7938
7991
|
useEffect29(() => {
|
|
7939
7992
|
const state = appStore.getState().state;
|
|
7940
7993
|
appStore.setState(__spreadValues({}, generateAppStore(state)));
|
|
7941
|
-
}, [
|
|
7994
|
+
}, [
|
|
7995
|
+
config,
|
|
7996
|
+
plugins,
|
|
7997
|
+
loadedOverrides,
|
|
7998
|
+
viewports,
|
|
7999
|
+
iframe,
|
|
8000
|
+
_experimentalFullScreenCanvas,
|
|
8001
|
+
onAction,
|
|
8002
|
+
metadata
|
|
8003
|
+
]);
|
|
7942
8004
|
useRegisterHistorySlice(appStore, {
|
|
7943
8005
|
histories: blendedHistories,
|
|
7944
8006
|
index: initialHistoryIndex,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-AOEDIUVK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
LoadedRichTextMenuInner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MFEVRMA4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
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-
|
|
103
|
+
() => import("./full-AG4GMB6M.mjs").then((m) => ({
|
|
104
104
|
default: m.LoadedRichTextMenuFull
|
|
105
105
|
}))
|
|
106
106
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
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";
|
|
@@ -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;
|
|
@@ -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
|
@@ -4,7 +4,7 @@ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree }
|
|
|
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-
|
|
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree }
|
|
|
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-
|
|
7
|
+
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-s4HBwSMe.js';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|