@measured/puck 0.12.0-canary.27e3e7e → 0.12.0-canary.349f44d
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/{Config-a03de579.d.ts → Config-e71a51c7.d.ts} +1 -0
- package/dist/index.css +190 -95
- package/dist/index.d.ts +2 -2
- package/dist/index.js +359 -255
- package/dist/rsc.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -327,7 +327,7 @@ var require_react_is_development = __commonJS({
|
|
327
327
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
328
328
|
var Element = REACT_ELEMENT_TYPE;
|
329
329
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
330
|
-
var
|
330
|
+
var Fragment14 = REACT_FRAGMENT_TYPE;
|
331
331
|
var Lazy = REACT_LAZY_TYPE;
|
332
332
|
var Memo = REACT_MEMO_TYPE;
|
333
333
|
var Portal = REACT_PORTAL_TYPE;
|
@@ -386,7 +386,7 @@ var require_react_is_development = __commonJS({
|
|
386
386
|
exports.ContextProvider = ContextProvider;
|
387
387
|
exports.Element = Element;
|
388
388
|
exports.ForwardRef = ForwardRef;
|
389
|
-
exports.Fragment =
|
389
|
+
exports.Fragment = Fragment14;
|
390
390
|
exports.Lazy = Lazy;
|
391
391
|
exports.Memo = Memo;
|
392
392
|
exports.Portal = Portal;
|
@@ -760,7 +760,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
760
760
|
function validate(props, propName, componentName, location, propFullName) {
|
761
761
|
if (!(props[propName] instanceof expectedClass)) {
|
762
762
|
var expectedClassName = expectedClass.name || ANONYMOUS;
|
763
|
-
var actualClassName =
|
763
|
+
var actualClassName = getClassName20(props[propName]);
|
764
764
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
765
765
|
}
|
766
766
|
return null;
|
@@ -1012,7 +1012,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
1012
1012
|
return type;
|
1013
1013
|
}
|
1014
1014
|
}
|
1015
|
-
function
|
1015
|
+
function getClassName20(propValue) {
|
1016
1016
|
if (!propValue.constructor || !propValue.constructor.name) {
|
1017
1017
|
return ANONYMOUS;
|
1018
1018
|
}
|
@@ -9040,7 +9040,7 @@ var require_react_dom_development = __commonJS({
|
|
9040
9040
|
var HostPortal = 4;
|
9041
9041
|
var HostComponent = 5;
|
9042
9042
|
var HostText = 6;
|
9043
|
-
var
|
9043
|
+
var Fragment14 = 7;
|
9044
9044
|
var Mode = 8;
|
9045
9045
|
var ContextConsumer = 9;
|
9046
9046
|
var ContextProvider = 10;
|
@@ -10196,7 +10196,7 @@ var require_react_dom_development = __commonJS({
|
|
10196
10196
|
return "DehydratedFragment";
|
10197
10197
|
case ForwardRef:
|
10198
10198
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
10199
|
-
case
|
10199
|
+
case Fragment14:
|
10200
10200
|
return "Fragment";
|
10201
10201
|
case HostComponent:
|
10202
10202
|
return type;
|
@@ -19867,7 +19867,7 @@ var require_react_dom_development = __commonJS({
|
|
19867
19867
|
}
|
19868
19868
|
}
|
19869
19869
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
19870
|
-
if (current2 === null || current2.tag !==
|
19870
|
+
if (current2 === null || current2.tag !== Fragment14) {
|
19871
19871
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
19872
19872
|
created.return = returnFiber;
|
19873
19873
|
return created;
|
@@ -20270,7 +20270,7 @@ var require_react_dom_development = __commonJS({
|
|
20270
20270
|
if (child.key === key) {
|
20271
20271
|
var elementType = element.type;
|
20272
20272
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
20273
|
-
if (child.tag ===
|
20273
|
+
if (child.tag === Fragment14) {
|
20274
20274
|
deleteRemainingChildren(returnFiber, child.sibling);
|
20275
20275
|
var existing = useFiber(child, element.props.children);
|
20276
20276
|
existing.return = returnFiber;
|
@@ -24445,7 +24445,7 @@ var require_react_dom_development = __commonJS({
|
|
24445
24445
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
24446
24446
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
24447
24447
|
}
|
24448
|
-
case
|
24448
|
+
case Fragment14:
|
24449
24449
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
24450
24450
|
case Mode:
|
24451
24451
|
return updateMode(current2, workInProgress2, renderLanes2);
|
@@ -24718,7 +24718,7 @@ var require_react_dom_development = __commonJS({
|
|
24718
24718
|
case SimpleMemoComponent:
|
24719
24719
|
case FunctionComponent:
|
24720
24720
|
case ForwardRef:
|
24721
|
-
case
|
24721
|
+
case Fragment14:
|
24722
24722
|
case Mode:
|
24723
24723
|
case Profiler:
|
24724
24724
|
case ContextConsumer:
|
@@ -28977,7 +28977,7 @@ var require_react_dom_development = __commonJS({
|
|
28977
28977
|
return fiber;
|
28978
28978
|
}
|
28979
28979
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
28980
|
-
var fiber = createFiber(
|
28980
|
+
var fiber = createFiber(Fragment14, elements, key, mode);
|
28981
28981
|
fiber.lanes = lanes;
|
28982
28982
|
return fiber;
|
28983
28983
|
}
|
@@ -30125,7 +30125,7 @@ var import_react2 = require("react");
|
|
30125
30125
|
|
30126
30126
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Button/Button.module.css#css-module
|
30127
30127
|
init_react_import();
|
30128
|
-
var Button_module_default = { "Button": "
|
30128
|
+
var Button_module_default = { "Button": "_Button_1brfa_1", "Button--medium": "_Button--medium_1brfa_22", "Button--large": "_Button--large_1brfa_29", "Button-icon": "_Button-icon_1brfa_36", "Button--primary": "_Button--primary_1brfa_44", "Button--secondary": "_Button--secondary_1brfa_53", "Button--flush": "_Button--flush_1brfa_64", "Button--disabled": "_Button--disabled_1brfa_68", "Button--fullWidth": "_Button--fullWidth_1brfa_78" };
|
30129
30129
|
|
30130
30130
|
// lib/get-class-name-factory.ts
|
30131
30131
|
init_react_import();
|
@@ -31974,6 +31974,7 @@ var defaultAppState = {
|
|
31974
31974
|
data: { content: [], root: { title: "" } },
|
31975
31975
|
ui: {
|
31976
31976
|
leftSideBarVisible: true,
|
31977
|
+
rightSideBarVisible: true,
|
31977
31978
|
arrayState: {},
|
31978
31979
|
itemSelector: null,
|
31979
31980
|
componentList: {}
|
@@ -32301,7 +32302,7 @@ var import_react26 = require("react");
|
|
32301
32302
|
|
32302
32303
|
// css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css#css-module
|
32303
32304
|
init_react_import();
|
32304
|
-
var IconButton_module_default = { "IconButton": "
|
32305
|
+
var IconButton_module_default = { "IconButton": "_IconButton_38xdr_1", "IconButton-title": "_IconButton-title_38xdr_18" };
|
32305
32306
|
|
32306
32307
|
// components/IconButton/IconButton.tsx
|
32307
32308
|
var import_react_spinners3 = require("react-spinners");
|
@@ -32346,10 +32347,11 @@ var IconButton = ({
|
|
32346
32347
|
href,
|
32347
32348
|
title,
|
32348
32349
|
children: [
|
32350
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: getClassName4("title"), children: title }),
|
32349
32351
|
children,
|
32350
32352
|
loading && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
32351
32353
|
"\xA0\xA0",
|
32352
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_spinners3.ClipLoader, { color: "inherit", size: "14px" })
|
32354
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_spinners3.ClipLoader, { "aria-label": "Loading", color: "inherit", size: "14px" })
|
32353
32355
|
] })
|
32354
32356
|
]
|
32355
32357
|
}
|
@@ -32367,7 +32369,7 @@ init_react_import();
|
|
32367
32369
|
|
32368
32370
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/styles.module.css#css-module
|
32369
32371
|
init_react_import();
|
32370
|
-
var styles_module_default3 = { "Input": "
|
32372
|
+
var styles_module_default3 = { "Input": "_Input_1jyrm_1", "Input-label": "_Input-label_1jyrm_27", "Input-labelIcon": "_Input-labelIcon_1jyrm_35", "Input-disabledIcon": "_Input-disabledIcon_1jyrm_41", "Input-input": "_Input-input_1jyrm_46", "Input--readOnly": "_Input--readOnly_1jyrm_69", "Input-radioGroupItems": "_Input-radioGroupItems_1jyrm_87", "Input-radio": "_Input-radio_1jyrm_87", "Input-radioInner": "_Input-radioInner_1jyrm_104", "Input-radioInput": "_Input-radioInput_1jyrm_126" };
|
32371
32373
|
|
32372
32374
|
// components/InputOrGroup/index.tsx
|
32373
32375
|
var import_react31 = require("react");
|
@@ -32380,7 +32382,7 @@ init_react_import();
|
|
32380
32382
|
|
32381
32383
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/fields/ArrayField/styles.module.css#css-module
|
32382
32384
|
init_react_import();
|
32383
|
-
var styles_module_default4 = { "ArrayField": "
|
32385
|
+
var styles_module_default4 = { "ArrayField": "_ArrayField_1auyc_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_1auyc_13", "ArrayField-addButton": "_ArrayField-addButton_1auyc_17", "ArrayField--hasItems": "_ArrayField--hasItems_1auyc_31", "ArrayFieldItem": "_ArrayFieldItem_1auyc_45", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_1auyc_53", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_1auyc_58", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_1auyc_73", "ArrayFieldItem--readOnly": "_ArrayFieldItem--readOnly_1auyc_86", "ArrayFieldItem-body": "_ArrayFieldItem-body_1auyc_107", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_1auyc_115", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_1auyc_122", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_1auyc_128", "ArrayFieldItem-action": "_ArrayFieldItem-action_1auyc_128" };
|
32384
32386
|
|
32385
32387
|
// components/InputOrGroup/fields/ArrayField/index.tsx
|
32386
32388
|
var import_dnd4 = require("@hello-pangea/dnd");
|
@@ -34280,13 +34282,86 @@ var useResolvedData = (data, config, dispatch) => {
|
|
34280
34282
|
};
|
34281
34283
|
};
|
34282
34284
|
|
34285
|
+
// components/MenuBar/index.tsx
|
34286
|
+
init_react_import();
|
34287
|
+
|
34288
|
+
// css-module:/home/runner/work/puck/puck/packages/core/components/MenuBar/styles.module.css#css-module
|
34289
|
+
init_react_import();
|
34290
|
+
var styles_module_default12 = { "MenuBar": "_MenuBar_12sp7_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_12sp7_14", "MenuBar-inner": "_MenuBar-inner_12sp7_29", "MenuBar-history": "_MenuBar-history_12sp7_45" };
|
34291
|
+
|
34292
|
+
// components/MenuBar/index.tsx
|
34293
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
34294
|
+
var getClassName18 = get_class_name_factory_default("MenuBar", styles_module_default12);
|
34295
|
+
var MenuBar = ({
|
34296
|
+
appState,
|
34297
|
+
data = { content: [], root: { props: { title: "" } } },
|
34298
|
+
dispatch,
|
34299
|
+
menuOpen = false,
|
34300
|
+
onPublish,
|
34301
|
+
renderHeaderActions,
|
34302
|
+
setMenuOpen
|
34303
|
+
}) => {
|
34304
|
+
const { canForward, canRewind, rewind, forward } = usePuckHistory({
|
34305
|
+
appState,
|
34306
|
+
dispatch
|
34307
|
+
});
|
34308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34309
|
+
"div",
|
34310
|
+
{
|
34311
|
+
className: getClassName18({ menuOpen }),
|
34312
|
+
onClick: (event) => {
|
34313
|
+
var _a;
|
34314
|
+
const element = event.target;
|
34315
|
+
if (window.matchMedia("(min-width: 638px)").matches) {
|
34316
|
+
return;
|
34317
|
+
}
|
34318
|
+
if (element.tagName === "A" && ((_a = element.getAttribute("href")) == null ? void 0 : _a.startsWith("#"))) {
|
34319
|
+
setMenuOpen(false);
|
34320
|
+
}
|
34321
|
+
},
|
34322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: getClassName18("inner"), children: [
|
34323
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: getClassName18("history"), children: [
|
34324
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconButton, { title: "undo", disabled: !canRewind, onClick: rewind, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34325
|
+
chevron_left_default,
|
34326
|
+
{
|
34327
|
+
size: 21,
|
34328
|
+
stroke: canRewind ? "var(--puck-color-black)" : "var(--puck-color-grey-7)"
|
34329
|
+
}
|
34330
|
+
) }),
|
34331
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconButton, { title: "redo", disabled: !canForward, onClick: forward, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34332
|
+
chevron_right_default,
|
34333
|
+
{
|
34334
|
+
size: 21,
|
34335
|
+
stroke: canForward ? "var(--puck-color-black)" : "var(--puck-color-grey-7)"
|
34336
|
+
}
|
34337
|
+
) })
|
34338
|
+
] }),
|
34339
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: renderHeaderActions && renderHeaderActions({
|
34340
|
+
state: appState,
|
34341
|
+
dispatch
|
34342
|
+
}) }),
|
34343
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34344
|
+
Button,
|
34345
|
+
{
|
34346
|
+
onClick: () => {
|
34347
|
+
onPublish(data);
|
34348
|
+
},
|
34349
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(globe_default, { size: "14px" }),
|
34350
|
+
children: "Publish"
|
34351
|
+
}
|
34352
|
+
) })
|
34353
|
+
] })
|
34354
|
+
}
|
34355
|
+
);
|
34356
|
+
};
|
34357
|
+
|
34283
34358
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css#css-module
|
34284
34359
|
init_react_import();
|
34285
|
-
var
|
34360
|
+
var styles_module_default13 = { "Puck": "_Puck_103k9_19", "Puck--leftSideBarVisible": "_Puck--leftSideBarVisible_103k9_35", "Puck--rightSideBarVisible": "_Puck--rightSideBarVisible_103k9_41", "Puck-header": "_Puck-header_103k9_95", "Puck-headerInner": "_Puck-headerInner_103k9_104", "Puck-headerToggle": "_Puck-headerToggle_103k9_114", "Puck-rightSideBarToggle": "_Puck-rightSideBarToggle_103k9_121", "Puck-leftSideBarToggle": "_Puck-leftSideBarToggle_103k9_126", "Puck-headerTitle": "_Puck-headerTitle_103k9_130", "Puck-headerPath": "_Puck-headerPath_103k9_134", "Puck-headerTools": "_Puck-headerTools_103k9_141", "Puck-menuButton": "_Puck-menuButton_103k9_147", "Puck--menuOpen": "_Puck--menuOpen_103k9_152", "Puck-leftSideBar": "_Puck-leftSideBar_103k9_126", "Puck-frame": "_Puck-frame_103k9_171", "Puck-root": "_Puck-root_103k9_179", "Puck-page": "_Puck-page_103k9_192", "Puck-rightSideBar": "_Puck-rightSideBar_103k9_121" };
|
34286
34361
|
|
34287
34362
|
// components/Puck/index.tsx
|
34288
|
-
var
|
34289
|
-
var
|
34363
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
34364
|
+
var getClassName19 = get_class_name_factory_default("Puck", styles_module_default13);
|
34290
34365
|
var defaultPageFields = {
|
34291
34366
|
title: { type: "text" }
|
34292
34367
|
};
|
@@ -34298,7 +34373,7 @@ var PluginRenderer = ({
|
|
34298
34373
|
renderMethod
|
34299
34374
|
}) => {
|
34300
34375
|
return plugins.filter((item) => item[renderMethod]).map((item) => item[renderMethod]).reduce(
|
34301
|
-
(accChildren, Item) => /* @__PURE__ */ (0,
|
34376
|
+
(accChildren, Item) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Item, { dispatch, state, children: accChildren }),
|
34302
34377
|
children
|
34303
34378
|
);
|
34304
34379
|
};
|
@@ -34345,11 +34420,8 @@ function Puck({
|
|
34345
34420
|
config,
|
34346
34421
|
dispatch
|
34347
34422
|
);
|
34348
|
-
const
|
34349
|
-
|
34350
|
-
dispatch
|
34351
|
-
});
|
34352
|
-
const { itemSelector, leftSideBarVisible } = ui;
|
34423
|
+
const [menuOpen, setMenuOpen] = (0, import_react39.useState)(false);
|
34424
|
+
const { itemSelector, leftSideBarVisible, rightSideBarVisible } = ui;
|
34353
34425
|
const setItemSelector = (0, import_react39.useCallback)(
|
34354
34426
|
(newItemSelector) => {
|
34355
34427
|
dispatch({
|
@@ -34363,7 +34435,7 @@ function Puck({
|
|
34363
34435
|
const Page = (0, import_react39.useCallback)(
|
34364
34436
|
(pageProps) => {
|
34365
34437
|
var _a2, _b2;
|
34366
|
-
return /* @__PURE__ */ (0,
|
34438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34367
34439
|
PluginRenderer,
|
34368
34440
|
{
|
34369
34441
|
plugins,
|
@@ -34377,7 +34449,7 @@ function Puck({
|
|
34377
34449
|
[config.root]
|
34378
34450
|
);
|
34379
34451
|
const PageFieldWrapper = (0, import_react39.useCallback)(
|
34380
|
-
(props) => /* @__PURE__ */ (0,
|
34452
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34381
34453
|
PluginRenderer,
|
34382
34454
|
{
|
34383
34455
|
plugins,
|
@@ -34390,7 +34462,7 @@ function Puck({
|
|
34390
34462
|
[]
|
34391
34463
|
);
|
34392
34464
|
const ComponentFieldWrapper = (0, import_react39.useCallback)(
|
34393
|
-
(props) => /* @__PURE__ */ (0,
|
34465
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34394
34466
|
PluginRenderer,
|
34395
34467
|
{
|
34396
34468
|
plugins,
|
@@ -34403,7 +34475,7 @@ function Puck({
|
|
34403
34475
|
[]
|
34404
34476
|
);
|
34405
34477
|
const ComponentListWrapper = (0, import_react39.useCallback)((props) => {
|
34406
|
-
const children = /* @__PURE__ */ (0,
|
34478
|
+
const children = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34407
34479
|
PluginRenderer,
|
34408
34480
|
{
|
34409
34481
|
plugins,
|
@@ -34437,12 +34509,49 @@ function Puck({
|
|
34437
34509
|
);
|
34438
34510
|
}
|
34439
34511
|
}, []);
|
34440
|
-
|
34441
|
-
|
34512
|
+
const toggleSidebars = (0, import_react39.useCallback)(
|
34513
|
+
(sidebar) => {
|
34514
|
+
const widerViewport = window.matchMedia("(min-width: 638px)").matches;
|
34515
|
+
const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
|
34516
|
+
const oppositeSideBar = sidebar === "left" ? "rightSideBarVisible" : "leftSideBarVisible";
|
34517
|
+
dispatch({
|
34518
|
+
type: "setUi",
|
34519
|
+
ui: __spreadValues({
|
34520
|
+
[`${sidebar}SideBarVisible`]: !sideBarVisible
|
34521
|
+
}, !widerViewport ? { [oppositeSideBar]: false } : {})
|
34522
|
+
});
|
34523
|
+
},
|
34524
|
+
[dispatch, leftSideBarVisible, rightSideBarVisible]
|
34525
|
+
);
|
34526
|
+
(0, import_react39.useEffect)(() => {
|
34527
|
+
if (!window.matchMedia("(min-width: 638px)").matches) {
|
34528
|
+
dispatch({
|
34529
|
+
type: "setUi",
|
34530
|
+
ui: {
|
34531
|
+
leftSideBarVisible: false,
|
34532
|
+
rightSideBarVisible: false
|
34533
|
+
}
|
34534
|
+
});
|
34535
|
+
}
|
34536
|
+
const handleResize = () => {
|
34537
|
+
if (!window.matchMedia("(min-width: 638px)").matches) {
|
34538
|
+
dispatch({
|
34539
|
+
type: "setUi",
|
34540
|
+
ui: (ui2) => __spreadValues(__spreadValues({}, ui2), ui2.rightSideBarVisible ? { leftSideBarVisible: false } : {})
|
34541
|
+
});
|
34542
|
+
}
|
34543
|
+
};
|
34544
|
+
window.addEventListener("resize", handleResize);
|
34545
|
+
return () => {
|
34546
|
+
window.removeEventListener("resize", handleResize);
|
34547
|
+
};
|
34548
|
+
}, []);
|
34549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
34550
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34442
34551
|
AppProvider,
|
34443
34552
|
{
|
34444
34553
|
value: { state: appState, dispatch, config, componentState },
|
34445
|
-
children: /* @__PURE__ */ (0,
|
34554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34446
34555
|
import_dnd7.DragDropContext,
|
34447
34556
|
{
|
34448
34557
|
onDragUpdate: (update) => {
|
@@ -34495,7 +34604,7 @@ function Puck({
|
|
34495
34604
|
});
|
34496
34605
|
}
|
34497
34606
|
},
|
34498
|
-
children: /* @__PURE__ */ (0,
|
34607
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34499
34608
|
DropZoneProvider,
|
34500
34609
|
{
|
34501
34610
|
value: {
|
@@ -34509,239 +34618,234 @@ function Puck({
|
|
34509
34618
|
mode: "edit",
|
34510
34619
|
areaId: "root"
|
34511
34620
|
},
|
34512
|
-
children: /* @__PURE__ */ (0,
|
34621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(dropZoneContext.Consumer, { children: (ctx) => {
|
34513
34622
|
var _a2, _b2;
|
34514
|
-
return /* @__PURE__ */ (0,
|
34515
|
-
|
34516
|
-
|
34517
|
-
|
34518
|
-
|
34519
|
-
|
34520
|
-
|
34521
|
-
|
34522
|
-
|
34523
|
-
|
34524
|
-
|
34525
|
-
|
34526
|
-
dispatch,
|
34527
|
-
state: appState
|
34528
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: getClassName18("headerInner"), children: [
|
34529
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: getClassName18("headerToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34530
|
-
IconButton,
|
34531
|
-
{
|
34532
|
-
onClick: () => dispatch({
|
34533
|
-
type: "setUi",
|
34534
|
-
ui: {
|
34535
|
-
leftSideBarVisible: !leftSideBarVisible
|
34536
|
-
}
|
34537
|
-
}),
|
34538
|
-
title: "Toggle left sidebar",
|
34539
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(sidebar_default, {})
|
34540
|
-
}
|
34541
|
-
) }),
|
34542
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: getClassName18("headerTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Heading, { rank: 2, size: "xs", children: [
|
34543
|
-
headerTitle || rootProps.title || "Page",
|
34544
|
-
headerPath && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
34545
|
-
" ",
|
34546
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("code", { className: getClassName18("headerPath"), children: headerPath })
|
34547
|
-
] })
|
34548
|
-
] }) }),
|
34549
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: getClassName18("headerTools"), children: [
|
34550
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex" }, children: [
|
34551
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34552
|
-
IconButton,
|
34623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
34624
|
+
"div",
|
34625
|
+
{
|
34626
|
+
className: getClassName19({
|
34627
|
+
leftSideBarVisible,
|
34628
|
+
menuOpen,
|
34629
|
+
rightSideBarVisible
|
34630
|
+
}),
|
34631
|
+
children: [
|
34632
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("header", { className: getClassName19("header"), children: renderHeader ? renderHeader({
|
34633
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34634
|
+
Button,
|
34553
34635
|
{
|
34554
|
-
|
34555
|
-
|
34556
|
-
|
34557
|
-
|
34558
|
-
|
34559
|
-
{
|
34560
|
-
size: 21,
|
34561
|
-
stroke: canRewind ? "var(--puck-color-black)" : "var(--puck-color-grey-7)"
|
34562
|
-
}
|
34563
|
-
)
|
34636
|
+
onClick: () => {
|
34637
|
+
onPublish(data);
|
34638
|
+
},
|
34639
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(globe_default, { size: "14px" }),
|
34640
|
+
children: "Publish"
|
34564
34641
|
}
|
34565
34642
|
),
|
34566
|
-
|
34567
|
-
|
34568
|
-
|
34569
|
-
|
34570
|
-
|
34571
|
-
|
34572
|
-
|
34573
|
-
|
34574
|
-
|
34575
|
-
|
34576
|
-
|
34577
|
-
}
|
34578
|
-
|
34579
|
-
}
|
34580
|
-
|
34581
|
-
|
34582
|
-
|
34583
|
-
|
34584
|
-
|
34585
|
-
|
34586
|
-
|
34587
|
-
|
34588
|
-
|
34589
|
-
|
34590
|
-
|
34591
|
-
|
34592
|
-
|
34593
|
-
children:
|
34594
|
-
|
34595
|
-
|
34596
|
-
|
34597
|
-
|
34598
|
-
|
34599
|
-
|
34600
|
-
|
34601
|
-
|
34602
|
-
|
34603
|
-
|
34604
|
-
|
34605
|
-
|
34606
|
-
|
34607
|
-
|
34608
|
-
|
34609
|
-
|
34610
|
-
|
34611
|
-
|
34612
|
-
|
34613
|
-
|
34643
|
+
dispatch,
|
34644
|
+
state: appState
|
34645
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName19("headerInner"), children: [
|
34646
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName19("headerToggle"), children: [
|
34647
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName19("leftSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34648
|
+
IconButton,
|
34649
|
+
{
|
34650
|
+
onClick: () => {
|
34651
|
+
toggleSidebars("left");
|
34652
|
+
},
|
34653
|
+
title: "Toggle left sidebar",
|
34654
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(sidebar_default, { focusable: "false" })
|
34655
|
+
}
|
34656
|
+
) }),
|
34657
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName19("rightSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34658
|
+
IconButton,
|
34659
|
+
{
|
34660
|
+
onClick: () => {
|
34661
|
+
toggleSidebars("right");
|
34662
|
+
},
|
34663
|
+
title: "Toggle right sidebar",
|
34664
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(sidebar_default, { focusable: "false" })
|
34665
|
+
}
|
34666
|
+
) })
|
34667
|
+
] }),
|
34668
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName19("headerTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Heading, { rank: 2, size: "xs", children: [
|
34669
|
+
headerTitle || rootProps.title || "Page",
|
34670
|
+
headerPath && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
34671
|
+
" ",
|
34672
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("code", { className: getClassName19("headerPath"), children: headerPath })
|
34673
|
+
] })
|
34674
|
+
] }) }),
|
34675
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName19("headerTools"), children: [
|
34676
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName19("menuButton"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34677
|
+
IconButton,
|
34678
|
+
{
|
34679
|
+
onClick: () => {
|
34680
|
+
return setMenuOpen(!menuOpen);
|
34681
|
+
},
|
34682
|
+
title: "Toggle menu bar",
|
34683
|
+
children: menuOpen ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(chevron_up_default, { focusable: "false" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(chevron_down_default, { focusable: "false" })
|
34684
|
+
}
|
34685
|
+
) }),
|
34686
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34687
|
+
MenuBar,
|
34688
|
+
{
|
34689
|
+
appState,
|
34690
|
+
data,
|
34691
|
+
dispatch,
|
34692
|
+
onPublish,
|
34693
|
+
menuOpen,
|
34694
|
+
renderHeaderActions,
|
34695
|
+
setMenuOpen
|
34696
|
+
}
|
34697
|
+
)
|
34698
|
+
] })
|
34699
|
+
] }) }),
|
34700
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName19("leftSideBar"), children: [
|
34701
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SidebarSection, { title: "Components", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ComponentListWrapper, { children: componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ComponentList, { id: "all" }) }) }),
|
34702
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(SidebarSection, { title: "Outline", children: [
|
34703
|
+
(ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34614
34704
|
LayerTree,
|
34615
34705
|
{
|
34616
34706
|
data,
|
34617
|
-
label:
|
34618
|
-
|
34619
|
-
zoneContent: zone,
|
34707
|
+
label: areaContainsZones(data, "root") ? rootDroppableId : "",
|
34708
|
+
zoneContent: data.content,
|
34620
34709
|
setItemSelector,
|
34621
34710
|
itemSelector
|
34622
|
-
},
|
34623
|
-
zoneKey
|
34624
|
-
);
|
34625
|
-
}
|
34626
|
-
)
|
34627
|
-
] })
|
34628
|
-
] }),
|
34629
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
34630
|
-
"div",
|
34631
|
-
{
|
34632
|
-
className: getClassName18("frame"),
|
34633
|
-
onClick: () => setItemSelector(null),
|
34634
|
-
id: "puck-frame",
|
34635
|
-
children: [
|
34636
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: getClassName18("root"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: getClassName18("page"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34637
|
-
Page,
|
34638
|
-
__spreadProps(__spreadValues({
|
34639
|
-
dispatch,
|
34640
|
-
state: appState
|
34641
|
-
}, rootProps), {
|
34642
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZone, { zone: rootDroppableId })
|
34643
|
-
})
|
34644
|
-
) }) }),
|
34645
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34646
|
-
"div",
|
34647
|
-
{
|
34648
|
-
style: {
|
34649
|
-
background: "var(--puck-color-grey-10)",
|
34650
|
-
height: "100%",
|
34651
|
-
flexGrow: 1
|
34652
34711
|
}
|
34653
|
-
|
34654
|
-
|
34655
|
-
|
34656
|
-
|
34657
|
-
|
34658
|
-
|
34659
|
-
|
34660
|
-
|
34661
|
-
|
34662
|
-
|
34663
|
-
|
34664
|
-
|
34665
|
-
|
34666
|
-
|
34667
|
-
|
34668
|
-
var _a3, _b3;
|
34669
|
-
let currentProps;
|
34670
|
-
if (selectedItem) {
|
34671
|
-
currentProps = selectedItem.props;
|
34672
|
-
} else {
|
34673
|
-
currentProps = rootProps;
|
34674
|
-
}
|
34675
|
-
const newProps = __spreadProps(__spreadValues({}, currentProps), {
|
34676
|
-
[fieldName]: value
|
34677
|
-
});
|
34678
|
-
if (itemSelector) {
|
34679
|
-
const action = {
|
34680
|
-
type: "replace",
|
34681
|
-
destinationIndex: itemSelector.index,
|
34682
|
-
destinationZone: itemSelector.zone || rootDroppableId,
|
34683
|
-
data: __spreadProps(__spreadValues({}, selectedItem), { props: newProps })
|
34684
|
-
};
|
34685
|
-
if ((_a3 = config.components[selectedItem.type]) == null ? void 0 : _a3.resolveData) {
|
34686
|
-
resolveData(replaceAction(data, action));
|
34687
|
-
} else {
|
34688
|
-
dispatch(action);
|
34712
|
+
),
|
34713
|
+
Object.entries(findZonesForArea(data, "root")).map(
|
34714
|
+
([zoneKey, zone]) => {
|
34715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34716
|
+
LayerTree,
|
34717
|
+
{
|
34718
|
+
data,
|
34719
|
+
label: zoneKey,
|
34720
|
+
zone: zoneKey,
|
34721
|
+
zoneContent: zone,
|
34722
|
+
setItemSelector,
|
34723
|
+
itemSelector
|
34724
|
+
},
|
34725
|
+
zoneKey
|
34726
|
+
);
|
34689
34727
|
}
|
34690
|
-
|
34691
|
-
|
34692
|
-
|
34693
|
-
|
34694
|
-
|
34695
|
-
|
34728
|
+
)
|
34729
|
+
] })
|
34730
|
+
] }),
|
34731
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
34732
|
+
"div",
|
34733
|
+
{
|
34734
|
+
className: getClassName19("frame"),
|
34735
|
+
onClick: () => setItemSelector(null),
|
34736
|
+
id: "puck-frame",
|
34737
|
+
children: [
|
34738
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName19("root"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName19("page"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34739
|
+
Page,
|
34740
|
+
__spreadProps(__spreadValues({
|
34741
|
+
dispatch,
|
34742
|
+
state: appState
|
34743
|
+
}, rootProps), {
|
34744
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropZone, { zone: rootDroppableId })
|
34745
|
+
})
|
34746
|
+
) }) }),
|
34747
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34748
|
+
"div",
|
34749
|
+
{
|
34750
|
+
style: {
|
34751
|
+
background: "var(--puck-color-grey-10)",
|
34752
|
+
height: "100%",
|
34753
|
+
flexGrow: 1
|
34754
|
+
}
|
34755
|
+
}
|
34756
|
+
)
|
34757
|
+
]
|
34758
|
+
}
|
34759
|
+
),
|
34760
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName19("rightSideBar"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FieldWrapper, { dispatch, state: appState, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34761
|
+
SidebarSection,
|
34762
|
+
{
|
34763
|
+
noPadding: true,
|
34764
|
+
showBreadcrumbs: true,
|
34765
|
+
title: selectedItem ? selectedItem.type : "Page",
|
34766
|
+
isLoading: selectedItem ? (_a2 = componentState[selectedItem == null ? void 0 : selectedItem.props.id]) == null ? void 0 : _a2.loading : (_b2 = componentState["puck-root"]) == null ? void 0 : _b2.loading,
|
34767
|
+
children: Object.keys(fields).map((fieldName) => {
|
34768
|
+
const field = fields[fieldName];
|
34769
|
+
const onChange2 = (value) => {
|
34770
|
+
var _a3, _b3;
|
34771
|
+
let currentProps;
|
34772
|
+
if (selectedItem) {
|
34773
|
+
currentProps = selectedItem.props;
|
34696
34774
|
} else {
|
34697
|
-
|
34698
|
-
type: "setData",
|
34699
|
-
data: { root: { props: newProps } }
|
34700
|
-
});
|
34775
|
+
currentProps = rootProps;
|
34701
34776
|
}
|
34702
|
-
|
34703
|
-
|
34704
|
-
type: "setData",
|
34705
|
-
data: { root: newProps }
|
34777
|
+
const newProps = __spreadProps(__spreadValues({}, currentProps), {
|
34778
|
+
[fieldName]: value
|
34706
34779
|
});
|
34780
|
+
if (itemSelector) {
|
34781
|
+
const action = {
|
34782
|
+
type: "replace",
|
34783
|
+
destinationIndex: itemSelector.index,
|
34784
|
+
destinationZone: itemSelector.zone || rootDroppableId,
|
34785
|
+
data: __spreadProps(__spreadValues({}, selectedItem), { props: newProps })
|
34786
|
+
};
|
34787
|
+
if ((_a3 = config.components[selectedItem.type]) == null ? void 0 : _a3.resolveData) {
|
34788
|
+
resolveData(replaceAction(data, action));
|
34789
|
+
} else {
|
34790
|
+
dispatch(action);
|
34791
|
+
}
|
34792
|
+
} else {
|
34793
|
+
if (data.root.props) {
|
34794
|
+
if ((_b3 = config.root) == null ? void 0 : _b3.resolveData) {
|
34795
|
+
resolveData(__spreadProps(__spreadValues({}, data), {
|
34796
|
+
root: { props: newProps }
|
34797
|
+
}));
|
34798
|
+
} else {
|
34799
|
+
dispatch({
|
34800
|
+
type: "setData",
|
34801
|
+
data: { root: { props: newProps } }
|
34802
|
+
});
|
34803
|
+
}
|
34804
|
+
} else {
|
34805
|
+
dispatch({
|
34806
|
+
type: "setData",
|
34807
|
+
data: { root: newProps }
|
34808
|
+
});
|
34809
|
+
}
|
34810
|
+
}
|
34811
|
+
};
|
34812
|
+
if (selectedItem && itemSelector) {
|
34813
|
+
const { readOnly = {} } = selectedItem;
|
34814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34815
|
+
InputOrGroup,
|
34816
|
+
{
|
34817
|
+
field,
|
34818
|
+
name: fieldName,
|
34819
|
+
label: field.label,
|
34820
|
+
readOnly: readOnly[fieldName],
|
34821
|
+
readOnlyFields: readOnly,
|
34822
|
+
value: selectedItem.props[fieldName],
|
34823
|
+
onChange: onChange2
|
34824
|
+
},
|
34825
|
+
`${selectedItem.props.id}_${fieldName}`
|
34826
|
+
);
|
34827
|
+
} else {
|
34828
|
+
const { readOnly = {} } = data.root;
|
34829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
34830
|
+
InputOrGroup,
|
34831
|
+
{
|
34832
|
+
field,
|
34833
|
+
name: fieldName,
|
34834
|
+
label: field.label,
|
34835
|
+
readOnly: readOnly[fieldName],
|
34836
|
+
readOnlyFields: readOnly,
|
34837
|
+
value: rootProps[fieldName],
|
34838
|
+
onChange: onChange2
|
34839
|
+
},
|
34840
|
+
`page_${fieldName}`
|
34841
|
+
);
|
34707
34842
|
}
|
34708
|
-
}
|
34709
|
-
};
|
34710
|
-
if (selectedItem && itemSelector) {
|
34711
|
-
const { readOnly = {} } = selectedItem;
|
34712
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34713
|
-
InputOrGroup,
|
34714
|
-
{
|
34715
|
-
field,
|
34716
|
-
name: fieldName,
|
34717
|
-
label: field.label,
|
34718
|
-
readOnly: readOnly[fieldName],
|
34719
|
-
readOnlyFields: readOnly,
|
34720
|
-
value: selectedItem.props[fieldName],
|
34721
|
-
onChange: onChange2
|
34722
|
-
},
|
34723
|
-
`${selectedItem.props.id}_${fieldName}`
|
34724
|
-
);
|
34725
|
-
} else {
|
34726
|
-
const { readOnly = {} } = data.root;
|
34727
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
34728
|
-
InputOrGroup,
|
34729
|
-
{
|
34730
|
-
field,
|
34731
|
-
name: fieldName,
|
34732
|
-
label: field.label,
|
34733
|
-
readOnly: readOnly[fieldName],
|
34734
|
-
readOnlyFields: readOnly,
|
34735
|
-
value: rootProps[fieldName],
|
34736
|
-
onChange: onChange2
|
34737
|
-
},
|
34738
|
-
`page_${fieldName}`
|
34739
|
-
);
|
34843
|
+
})
|
34740
34844
|
}
|
34741
|
-
})
|
34742
|
-
|
34743
|
-
|
34744
|
-
|
34845
|
+
) }) })
|
34846
|
+
]
|
34847
|
+
}
|
34848
|
+
);
|
34745
34849
|
} })
|
34746
34850
|
}
|
34747
34851
|
)
|
@@ -34749,19 +34853,19 @@ function Puck({
|
|
34749
34853
|
)
|
34750
34854
|
}
|
34751
34855
|
),
|
34752
|
-
/* @__PURE__ */ (0,
|
34856
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { id: "puck-portal-root" })
|
34753
34857
|
] });
|
34754
34858
|
}
|
34755
34859
|
|
34756
34860
|
// components/Render/index.tsx
|
34757
34861
|
init_react_import();
|
34758
|
-
var
|
34862
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
34759
34863
|
function Render({ config, data }) {
|
34760
34864
|
var _a;
|
34761
34865
|
const rootProps = data.root.props || data.root;
|
34762
34866
|
const title = rootProps.title || "";
|
34763
34867
|
if ((_a = config.root) == null ? void 0 : _a.render) {
|
34764
|
-
return /* @__PURE__ */ (0,
|
34868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
34765
34869
|
config.root.render,
|
34766
34870
|
__spreadProps(__spreadValues({}, rootProps), {
|
34767
34871
|
puck: {
|
@@ -34770,11 +34874,11 @@ function Render({ config, data }) {
|
|
34770
34874
|
title,
|
34771
34875
|
editMode: false,
|
34772
34876
|
id: "puck-root",
|
34773
|
-
children: /* @__PURE__ */ (0,
|
34877
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropZone, { zone: rootDroppableId })
|
34774
34878
|
})
|
34775
34879
|
) });
|
34776
34880
|
}
|
34777
|
-
return /* @__PURE__ */ (0,
|
34881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropZone, { zone: rootDroppableId }) });
|
34778
34882
|
}
|
34779
34883
|
|
34780
34884
|
// lib/resolve-all-data.ts
|