@measured/puck 0.21.0-canary.29ef7131 → 0.21.0-canary.304940ae
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/{chunk-VBJEDLUM.mjs → chunk-JA7SEUEH.mjs} +11 -10
- package/dist/{chunk-YRZRLNQC.mjs → chunk-QNMNHBNQ.mjs} +96 -317
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +97 -319
- package/dist/index.mjs +2 -2
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +94 -316
- package/dist/no-external.mjs +2 -2
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +11 -10
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-7SvCIsj8.d.mts → walk-tree-BqwnaCVe.d.mts} +52 -42
- package/dist/{walk-tree-7SvCIsj8.d.ts → walk-tree-BqwnaCVe.d.ts} +52 -42
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
walkAppState,
|
|
26
26
|
walkField,
|
|
27
27
|
walkTree
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JA7SEUEH.mjs";
|
|
29
29
|
|
|
30
30
|
// ../../node_modules/classnames/index.js
|
|
31
31
|
var require_classnames = __commonJS({
|
|
@@ -1071,10 +1071,10 @@ var flattenData = (state, config) => {
|
|
|
1071
1071
|
|
|
1072
1072
|
// store/slices/permissions.ts
|
|
1073
1073
|
var createPermissionsSlice = (set, get) => {
|
|
1074
|
-
const resolvePermissions = (..._0) => __async(
|
|
1074
|
+
const resolvePermissions = (..._0) => __async(null, [..._0], function* (params = {}, force) {
|
|
1075
1075
|
const { state, permissions, config } = get();
|
|
1076
1076
|
const { cache, globalPermissions } = permissions;
|
|
1077
|
-
const resolveDataForItem = (item2, force2 = false) => __async(
|
|
1077
|
+
const resolveDataForItem = (item2, force2 = false) => __async(null, null, function* () {
|
|
1078
1078
|
var _a, _b, _c;
|
|
1079
1079
|
const { config: config2, state: appState, setComponentLoading } = get();
|
|
1080
1080
|
const componentConfig = item2.type === "root" ? config2.root : config2.components[item2.type];
|
|
@@ -1129,13 +1129,13 @@ var createPermissionsSlice = (set, get) => {
|
|
|
1129
1129
|
if (item) {
|
|
1130
1130
|
yield resolveDataForItem(item, force);
|
|
1131
1131
|
} else if (type) {
|
|
1132
|
-
flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(
|
|
1132
|
+
flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(null, null, function* () {
|
|
1133
1133
|
yield resolveDataForItem(item2, force);
|
|
1134
1134
|
}));
|
|
1135
1135
|
} else if (root) {
|
|
1136
1136
|
resolveDataForRoot(force);
|
|
1137
1137
|
} else {
|
|
1138
|
-
flattenData(state, config).map((item2) => __async(
|
|
1138
|
+
flattenData(state, config).map((item2) => __async(null, null, function* () {
|
|
1139
1139
|
yield resolveDataForItem(item2, force);
|
|
1140
1140
|
}));
|
|
1141
1141
|
}
|
|
@@ -1216,7 +1216,7 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
1216
1216
|
};
|
|
1217
1217
|
var useRegisterFieldsSlice = (appStore, id) => {
|
|
1218
1218
|
const resolveFields = useCallback(
|
|
1219
|
-
(reset) => __async(
|
|
1219
|
+
(reset) => __async(null, null, function* () {
|
|
1220
1220
|
var _a, _b;
|
|
1221
1221
|
const { fields, lastResolvedData } = appStore.getState().fields;
|
|
1222
1222
|
const metadata = appStore.getState().metadata;
|
|
@@ -1416,7 +1416,7 @@ var createAppStore = (initialAppStore) => create2()(
|
|
|
1416
1416
|
const selectedItem = state.ui.itemSelector ? getItem(state.ui.itemSelector, state) : null;
|
|
1417
1417
|
return __spreadProps(__spreadValues({}, s), { state, selectedItem });
|
|
1418
1418
|
}),
|
|
1419
|
-
resolveComponentData: (componentData, trigger) => __async(
|
|
1419
|
+
resolveComponentData: (componentData, trigger) => __async(null, null, function* () {
|
|
1420
1420
|
const { config, metadata, setComponentLoading, permissions } = get();
|
|
1421
1421
|
const timeouts = {};
|
|
1422
1422
|
return yield resolveComponentData(
|
|
@@ -1427,7 +1427,7 @@ var createAppStore = (initialAppStore) => create2()(
|
|
|
1427
1427
|
const id = "id" in item.props ? item.props.id : "root";
|
|
1428
1428
|
timeouts[id] = setComponentLoading(id, true, 50);
|
|
1429
1429
|
},
|
|
1430
|
-
(item) => __async(
|
|
1430
|
+
(item) => __async(null, null, function* () {
|
|
1431
1431
|
const id = "id" in item.props ? item.props.id : "root";
|
|
1432
1432
|
if ("type" in item) {
|
|
1433
1433
|
yield permissions.refreshPermissions({ item });
|
|
@@ -1439,7 +1439,7 @@ var createAppStore = (initialAppStore) => create2()(
|
|
|
1439
1439
|
trigger
|
|
1440
1440
|
);
|
|
1441
1441
|
}),
|
|
1442
|
-
resolveAndCommitData: () => __async(
|
|
1442
|
+
resolveAndCommitData: () => __async(null, null, function* () {
|
|
1443
1443
|
const { config, state, dispatch, resolveComponentData: resolveComponentData2 } = get();
|
|
1444
1444
|
walkAppState(
|
|
1445
1445
|
state,
|
|
@@ -2460,7 +2460,7 @@ var collisionStore = createStore(() => ({
|
|
|
2460
2460
|
|
|
2461
2461
|
// lib/dnd/collision/dynamic/index.ts
|
|
2462
2462
|
var flushNext = "";
|
|
2463
|
-
var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => (input) => {
|
|
2463
|
+
var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => ((input) => {
|
|
2464
2464
|
var _a, _b, _c, _d, _e;
|
|
2465
2465
|
const { dragOperation, droppable } = input;
|
|
2466
2466
|
const { position } = dragOperation;
|
|
@@ -2553,7 +2553,7 @@ var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => (input
|
|
|
2553
2553
|
}
|
|
2554
2554
|
collisionDebug(dragCenter, dropCenter, droppable.id.toString(), "hotpink");
|
|
2555
2555
|
return null;
|
|
2556
|
-
};
|
|
2556
|
+
});
|
|
2557
2557
|
|
|
2558
2558
|
// components/Sortable/index.tsx
|
|
2559
2559
|
import { useSortable } from "@dnd-kit/react/sortable";
|
|
@@ -3192,7 +3192,7 @@ var ExternalInput = ({
|
|
|
3192
3192
|
}, [mappedData]);
|
|
3193
3193
|
const [searchQuery, setSearchQuery] = useState6(field.initialQuery || "");
|
|
3194
3194
|
const search = useCallback3(
|
|
3195
|
-
(query, filters2) => __async(
|
|
3195
|
+
(query, filters2) => __async(null, null, function* () {
|
|
3196
3196
|
setIsLoading(true);
|
|
3197
3197
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
|
3198
3198
|
let listData;
|
|
@@ -3418,7 +3418,7 @@ var ExternalField = ({
|
|
|
3418
3418
|
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
|
|
3419
3419
|
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
|
3420
3420
|
mapRow: validField.mapRow,
|
|
3421
|
-
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(
|
|
3421
|
+
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(null, null, function* () {
|
|
3422
3422
|
return yield deprecatedField.adaptor.fetchList(
|
|
3423
3423
|
deprecatedField.adaptorParams
|
|
3424
3424
|
);
|
|
@@ -3794,6 +3794,7 @@ function AutoFieldInternal(props) {
|
|
|
3794
3794
|
}
|
|
3795
3795
|
return (_props) => null;
|
|
3796
3796
|
}, [field.type]);
|
|
3797
|
+
const fieldKey = field.type === "custom" ? field.key : void 0;
|
|
3797
3798
|
let FieldComponent = useMemo3(() => {
|
|
3798
3799
|
if (field.type === "custom") {
|
|
3799
3800
|
if (!field.render) {
|
|
@@ -3803,7 +3804,7 @@ function AutoFieldInternal(props) {
|
|
|
3803
3804
|
} else if (field.type !== "slot") {
|
|
3804
3805
|
return render[field.type];
|
|
3805
3806
|
}
|
|
3806
|
-
}, [field.type, render]);
|
|
3807
|
+
}, [field.type, fieldKey, render]);
|
|
3807
3808
|
const { visible = true } = props.field;
|
|
3808
3809
|
if (!visible) {
|
|
3809
3810
|
return null;
|
|
@@ -4843,7 +4844,20 @@ var createNestedDroppablePlugin = ({ onChange }, id) => class NestedDroppablePlu
|
|
|
4843
4844
|
|
|
4844
4845
|
// lib/insert-component.ts
|
|
4845
4846
|
init_react_import();
|
|
4846
|
-
|
|
4847
|
+
|
|
4848
|
+
// lib/get-selector-for-id.ts
|
|
4849
|
+
init_react_import();
|
|
4850
|
+
var getSelectorForId = (state, id) => {
|
|
4851
|
+
const node = state.indexes.nodes[id];
|
|
4852
|
+
if (!node) return;
|
|
4853
|
+
const zoneCompound = `${node.parentId}:${node.zone}`;
|
|
4854
|
+
const index = state.indexes.zones[zoneCompound].contentIds.indexOf(id);
|
|
4855
|
+
return { zone: zoneCompound, index };
|
|
4856
|
+
};
|
|
4857
|
+
|
|
4858
|
+
// lib/insert-component.ts
|
|
4859
|
+
var insertComponent = (componentType, zone, index, appStore) => __async(null, null, function* () {
|
|
4860
|
+
const { getState } = appStore;
|
|
4847
4861
|
const id = generateId(componentType);
|
|
4848
4862
|
const insertActionData = {
|
|
4849
4863
|
type: "insert",
|
|
@@ -4852,8 +4866,9 @@ var insertComponent = (componentType, zone, index, appStore) => __async(void 0,
|
|
|
4852
4866
|
destinationZone: zone,
|
|
4853
4867
|
id
|
|
4854
4868
|
};
|
|
4855
|
-
const
|
|
4856
|
-
const insertedState = insertAction(
|
|
4869
|
+
const stateBefore = getState().state;
|
|
4870
|
+
const insertedState = insertAction(stateBefore, insertActionData, getState());
|
|
4871
|
+
const dispatch = getState().dispatch;
|
|
4857
4872
|
dispatch(__spreadProps(__spreadValues({}, insertActionData), {
|
|
4858
4873
|
// Dispatch insert rather set, as user's may rely on this via onAction
|
|
4859
4874
|
// We must always record history here so the insert is added to user history
|
|
@@ -4861,23 +4876,21 @@ var insertComponent = (componentType, zone, index, appStore) => __async(void 0,
|
|
|
4861
4876
|
// entries on insert - one for the initial insert, and one when the data resolves
|
|
4862
4877
|
recordHistory: true
|
|
4863
4878
|
}));
|
|
4864
|
-
const itemSelector = {
|
|
4865
|
-
index,
|
|
4866
|
-
zone
|
|
4867
|
-
};
|
|
4879
|
+
const itemSelector = { index, zone };
|
|
4868
4880
|
dispatch({ type: "setUi", ui: { itemSelector } });
|
|
4869
4881
|
const itemData = getItem(itemSelector, insertedState);
|
|
4870
|
-
if (itemData)
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4882
|
+
if (!itemData) return;
|
|
4883
|
+
const resolveComponentData2 = getState().resolveComponentData;
|
|
4884
|
+
const resolved = yield resolveComponentData2(itemData, "insert");
|
|
4885
|
+
if (!resolved.didChange) return;
|
|
4886
|
+
const latestItemSelector = getSelectorForId(getState().state, id);
|
|
4887
|
+
if (!latestItemSelector) return;
|
|
4888
|
+
dispatch({
|
|
4889
|
+
type: "replace",
|
|
4890
|
+
destinationZone: latestItemSelector.zone,
|
|
4891
|
+
destinationIndex: latestItemSelector.index,
|
|
4892
|
+
data: resolved.node
|
|
4893
|
+
});
|
|
4881
4894
|
});
|
|
4882
4895
|
|
|
4883
4896
|
// components/DragDropContext/index.tsx
|
|
@@ -5114,7 +5127,7 @@ var DragDropContextClient = ({
|
|
|
5114
5127
|
thisPreview.componentType,
|
|
5115
5128
|
thisPreview.zone,
|
|
5116
5129
|
thisPreview.index,
|
|
5117
|
-
appStore
|
|
5130
|
+
appStore
|
|
5118
5131
|
);
|
|
5119
5132
|
} else if (initialSelector.current) {
|
|
5120
5133
|
dispatch({
|
|
@@ -5527,7 +5540,7 @@ import { useCallback as useCallback9 } from "react";
|
|
|
5527
5540
|
function useRenderedCallback(callback, deps) {
|
|
5528
5541
|
const manager = useDragDropManager();
|
|
5529
5542
|
return useCallback9(
|
|
5530
|
-
(...args) => __async(
|
|
5543
|
+
(...args) => __async(null, null, function* () {
|
|
5531
5544
|
yield manager == null ? void 0 : manager.renderer.rendering;
|
|
5532
5545
|
return callback(...args);
|
|
5533
5546
|
}),
|
|
@@ -5756,16 +5769,6 @@ function setDeep(node, path, newVal) {
|
|
|
5756
5769
|
return __spreadValues(__spreadValues({}, node), newNode);
|
|
5757
5770
|
}
|
|
5758
5771
|
|
|
5759
|
-
// lib/get-selector-for-id.ts
|
|
5760
|
-
init_react_import();
|
|
5761
|
-
var getSelectorForId = (state, id) => {
|
|
5762
|
-
const node = state.indexes.nodes[id];
|
|
5763
|
-
if (!node) return;
|
|
5764
|
-
const zoneCompound = `${node.parentId}:${node.zone}`;
|
|
5765
|
-
const index = state.indexes.zones[zoneCompound].contentIds.indexOf(id);
|
|
5766
|
-
return { zone: zoneCompound, index };
|
|
5767
|
-
};
|
|
5768
|
-
|
|
5769
5772
|
// components/InlineTextField/index.tsx
|
|
5770
5773
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
5771
5774
|
var getClassName18 = get_class_name_factory_default("InlineTextField", styles_module_default13);
|
|
@@ -5794,7 +5797,7 @@ var InlineTextFieldInternal = ({
|
|
|
5794
5797
|
ref.current.replaceChildren(value);
|
|
5795
5798
|
}
|
|
5796
5799
|
const cleanupPortal = registerOverlayPortal(ref.current);
|
|
5797
|
-
const handleInput = (e) => __async(
|
|
5800
|
+
const handleInput = (e) => __async(null, null, function* () {
|
|
5798
5801
|
var _a2;
|
|
5799
5802
|
const appStore2 = appStoreApi.getState();
|
|
5800
5803
|
const node = appStore2.state.indexes.nodes[componentId];
|
|
@@ -6086,7 +6089,8 @@ var DropZoneEdit = forwardRef3(
|
|
|
6086
6089
|
style,
|
|
6087
6090
|
className,
|
|
6088
6091
|
minEmptyHeight: userMinEmptyHeight = 128,
|
|
6089
|
-
collisionAxis
|
|
6092
|
+
collisionAxis,
|
|
6093
|
+
as
|
|
6090
6094
|
}, userRef) {
|
|
6091
6095
|
const ctx = useContext8(dropZoneContext);
|
|
6092
6096
|
const appStoreApi = useAppStoreApi();
|
|
@@ -6229,8 +6233,9 @@ var DropZoneEdit = forwardRef3(
|
|
|
6229
6233
|
userMinEmptyHeight,
|
|
6230
6234
|
ref
|
|
6231
6235
|
});
|
|
6236
|
+
const El = as != null ? as : "div";
|
|
6232
6237
|
return /* @__PURE__ */ jsx26(
|
|
6233
|
-
|
|
6238
|
+
El,
|
|
6234
6239
|
{
|
|
6235
6240
|
className: `${getClassName19({
|
|
6236
6241
|
isRootZone,
|
|
@@ -6293,7 +6298,7 @@ var DropZoneRenderItem = ({
|
|
|
6293
6298
|
};
|
|
6294
6299
|
var DropZoneRenderPure = (props) => /* @__PURE__ */ jsx26(DropZoneRender, __spreadValues({}, props));
|
|
6295
6300
|
var DropZoneRender = forwardRef3(
|
|
6296
|
-
function DropZoneRenderInternal({ className, style, zone }, ref) {
|
|
6301
|
+
function DropZoneRenderInternal({ className, style, zone, as }, ref) {
|
|
6297
6302
|
const ctx = useContext8(dropZoneContext);
|
|
6298
6303
|
const { areaId = "root" } = ctx || {};
|
|
6299
6304
|
const { config, data, metadata } = useContext8(renderContext);
|
|
@@ -6306,13 +6311,14 @@ var DropZoneRender = forwardRef3(
|
|
|
6306
6311
|
}
|
|
6307
6312
|
}
|
|
6308
6313
|
}, [content]);
|
|
6314
|
+
const El = as != null ? as : "div";
|
|
6309
6315
|
if (!data || !config) {
|
|
6310
6316
|
return null;
|
|
6311
6317
|
}
|
|
6312
6318
|
if (zoneCompound !== rootDroppableId) {
|
|
6313
6319
|
content = setupZone(data, zoneCompound).zones[zoneCompound];
|
|
6314
6320
|
}
|
|
6315
|
-
return /* @__PURE__ */ jsx26(
|
|
6321
|
+
return /* @__PURE__ */ jsx26(El, { className, style, ref, children: content.map((item) => {
|
|
6316
6322
|
const Component = config.components[item.type];
|
|
6317
6323
|
if (Component) {
|
|
6318
6324
|
return /* @__PURE__ */ jsx26(
|
|
@@ -6455,7 +6461,7 @@ function createUsePuck() {
|
|
|
6455
6461
|
}
|
|
6456
6462
|
const result = useStore3(
|
|
6457
6463
|
usePuckApi,
|
|
6458
|
-
selector != null ? selector : (s) => s
|
|
6464
|
+
selector != null ? selector : ((s) => s)
|
|
6459
6465
|
);
|
|
6460
6466
|
return result;
|
|
6461
6467
|
};
|
|
@@ -6602,49 +6608,48 @@ var DefaultFields = ({
|
|
|
6602
6608
|
}) => {
|
|
6603
6609
|
return /* @__PURE__ */ jsx29(Fragment8, { children });
|
|
6604
6610
|
};
|
|
6605
|
-
var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(
|
|
6606
|
-
let currentProps;
|
|
6611
|
+
var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(null, null, function* () {
|
|
6607
6612
|
const { dispatch, state, selectedItem, resolveComponentData: resolveComponentData2 } = appStore.getState();
|
|
6608
6613
|
const { data, ui } = state;
|
|
6609
6614
|
const { itemSelector } = ui;
|
|
6610
6615
|
const rootProps = data.root.props || data.root;
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
} else {
|
|
6614
|
-
currentProps = rootProps;
|
|
6615
|
-
}
|
|
6616
|
-
const newProps = __spreadProps(__spreadValues({}, currentProps), {
|
|
6617
|
-
[fieldName]: value
|
|
6618
|
-
});
|
|
6616
|
+
const currentProps = selectedItem ? selectedItem.props : rootProps;
|
|
6617
|
+
const newProps = __spreadProps(__spreadValues({}, currentProps), { [fieldName]: value });
|
|
6619
6618
|
if (selectedItem && itemSelector) {
|
|
6619
|
+
const resolved = yield resolveComponentData2(
|
|
6620
|
+
__spreadProps(__spreadValues({}, selectedItem), { props: newProps }),
|
|
6621
|
+
"replace"
|
|
6622
|
+
);
|
|
6623
|
+
const latestSelector = getSelectorForId(
|
|
6624
|
+
appStore.getState().state,
|
|
6625
|
+
selectedItem.props.id
|
|
6626
|
+
);
|
|
6627
|
+
if (!latestSelector) return;
|
|
6620
6628
|
dispatch({
|
|
6621
6629
|
type: "replace",
|
|
6622
|
-
destinationIndex:
|
|
6623
|
-
destinationZone:
|
|
6624
|
-
data:
|
|
6625
|
-
|
|
6630
|
+
destinationIndex: latestSelector.index,
|
|
6631
|
+
destinationZone: latestSelector.zone || rootDroppableId,
|
|
6632
|
+
data: resolved.node,
|
|
6633
|
+
ui: updatedUi
|
|
6634
|
+
});
|
|
6635
|
+
return;
|
|
6636
|
+
}
|
|
6637
|
+
if (data.root.props) {
|
|
6638
|
+
dispatch({
|
|
6639
|
+
type: "replaceRoot",
|
|
6640
|
+
root: (yield resolveComponentData2(
|
|
6641
|
+
__spreadProps(__spreadValues({}, data.root), { props: newProps }),
|
|
6626
6642
|
"replace"
|
|
6627
6643
|
)).node,
|
|
6628
|
-
ui: updatedUi
|
|
6644
|
+
ui: __spreadValues(__spreadValues({}, ui), updatedUi),
|
|
6645
|
+
recordHistory: true
|
|
6629
6646
|
});
|
|
6630
|
-
|
|
6631
|
-
if (data.root.props) {
|
|
6632
|
-
dispatch({
|
|
6633
|
-
type: "replaceRoot",
|
|
6634
|
-
root: (yield resolveComponentData2(
|
|
6635
|
-
__spreadProps(__spreadValues({}, data.root), { props: newProps }),
|
|
6636
|
-
"replace"
|
|
6637
|
-
)).node,
|
|
6638
|
-
ui: __spreadValues(__spreadValues({}, ui), updatedUi),
|
|
6639
|
-
recordHistory: true
|
|
6640
|
-
});
|
|
6641
|
-
} else {
|
|
6642
|
-
dispatch({
|
|
6643
|
-
type: "setData",
|
|
6644
|
-
data: { root: newProps }
|
|
6645
|
-
});
|
|
6646
|
-
}
|
|
6647
|
+
return;
|
|
6647
6648
|
}
|
|
6649
|
+
dispatch({
|
|
6650
|
+
type: "setData",
|
|
6651
|
+
data: { root: newProps }
|
|
6652
|
+
});
|
|
6648
6653
|
});
|
|
6649
6654
|
var FieldsChild = ({ fieldName }) => {
|
|
6650
6655
|
const field = useAppStore((s) => s.fields.fields[fieldName]);
|
|
@@ -6976,7 +6981,7 @@ var CopyHostStyles = ({
|
|
|
6976
6981
|
let elements = [];
|
|
6977
6982
|
const hashes = {};
|
|
6978
6983
|
const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
|
|
6979
|
-
const mirrorEl = (el, inlineStyles = false) => __async(
|
|
6984
|
+
const mirrorEl = (el, inlineStyles = false) => __async(null, null, function* () {
|
|
6980
6985
|
let mirror;
|
|
6981
6986
|
if (el.nodeName === "LINK" && inlineStyles) {
|
|
6982
6987
|
mirror = document.createElement("style");
|
|
@@ -7008,7 +7013,7 @@ var CopyHostStyles = ({
|
|
|
7008
7013
|
}
|
|
7009
7014
|
return mirror;
|
|
7010
7015
|
});
|
|
7011
|
-
const addEl = (el) => __async(
|
|
7016
|
+
const addEl = (el) => __async(null, null, function* () {
|
|
7012
7017
|
const index = lookupEl(el);
|
|
7013
7018
|
if (index > -1) {
|
|
7014
7019
|
if (debug)
|
|
@@ -7081,7 +7086,7 @@ var CopyHostStyles = ({
|
|
|
7081
7086
|
const parentBody = parentDocument.getElementsByTagName("body")[0];
|
|
7082
7087
|
syncAttributes(parentBody, doc.body);
|
|
7083
7088
|
Promise.all(
|
|
7084
|
-
collectedStyles.map((styleNode, i) => __async(
|
|
7089
|
+
collectedStyles.map((styleNode, i) => __async(null, null, function* () {
|
|
7085
7090
|
if (styleNode.nodeName === "LINK") {
|
|
7086
7091
|
const linkHref = styleNode.href;
|
|
7087
7092
|
if (hrefs.indexOf(linkHref) > -1) {
|
|
@@ -8649,7 +8654,12 @@ function PuckProvider({ children }) {
|
|
|
8649
8654
|
});
|
|
8650
8655
|
})
|
|
8651
8656
|
);
|
|
8652
|
-
const initialHistoryIndex = (
|
|
8657
|
+
const initialHistoryIndex = useMemo20(() => {
|
|
8658
|
+
if ((_initialHistory == null ? void 0 : _initialHistory.index) !== void 0 && (_initialHistory == null ? void 0 : _initialHistory.index) >= 0 && (_initialHistory == null ? void 0 : _initialHistory.index) < blendedHistories.length) {
|
|
8659
|
+
return _initialHistory == null ? void 0 : _initialHistory.index;
|
|
8660
|
+
}
|
|
8661
|
+
return blendedHistories.length - 1;
|
|
8662
|
+
}, []);
|
|
8653
8663
|
const initialAppState = blendedHistories[initialHistoryIndex].state;
|
|
8654
8664
|
const loadedOverrides = useLoadedOverrides({
|
|
8655
8665
|
overrides,
|
|
@@ -8934,269 +8944,38 @@ classnames/index.js:
|
|
|
8934
8944
|
*)
|
|
8935
8945
|
|
|
8936
8946
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
8937
|
-
(**
|
|
8938
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8939
|
-
*
|
|
8940
|
-
* This source code is licensed under the ISC license.
|
|
8941
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8942
|
-
*)
|
|
8943
|
-
|
|
8944
8947
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
8945
|
-
(**
|
|
8946
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8947
|
-
*
|
|
8948
|
-
* This source code is licensed under the ISC license.
|
|
8949
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8950
|
-
*)
|
|
8951
|
-
|
|
8952
8948
|
lucide-react/dist/esm/Icon.js:
|
|
8953
|
-
(**
|
|
8954
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8955
|
-
*
|
|
8956
|
-
* This source code is licensed under the ISC license.
|
|
8957
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8958
|
-
*)
|
|
8959
|
-
|
|
8960
8949
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
8961
|
-
(**
|
|
8962
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8963
|
-
*
|
|
8964
|
-
* This source code is licensed under the ISC license.
|
|
8965
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8966
|
-
*)
|
|
8967
|
-
|
|
8968
8950
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
8969
|
-
(**
|
|
8970
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8971
|
-
*
|
|
8972
|
-
* This source code is licensed under the ISC license.
|
|
8973
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8974
|
-
*)
|
|
8975
|
-
|
|
8976
8951
|
lucide-react/dist/esm/icons/chevron-right.js:
|
|
8977
|
-
(**
|
|
8978
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8979
|
-
*
|
|
8980
|
-
* This source code is licensed under the ISC license.
|
|
8981
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8982
|
-
*)
|
|
8983
|
-
|
|
8984
8952
|
lucide-react/dist/esm/icons/chevron-up.js:
|
|
8985
|
-
(**
|
|
8986
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8987
|
-
*
|
|
8988
|
-
* This source code is licensed under the ISC license.
|
|
8989
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8990
|
-
*)
|
|
8991
|
-
|
|
8992
8953
|
lucide-react/dist/esm/icons/circle-check-big.js:
|
|
8993
|
-
(**
|
|
8994
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8995
|
-
*
|
|
8996
|
-
* This source code is licensed under the ISC license.
|
|
8997
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8998
|
-
*)
|
|
8999
|
-
|
|
9000
8954
|
lucide-react/dist/esm/icons/copy.js:
|
|
9001
|
-
(**
|
|
9002
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9003
|
-
*
|
|
9004
|
-
* This source code is licensed under the ISC license.
|
|
9005
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9006
|
-
*)
|
|
9007
|
-
|
|
9008
8955
|
lucide-react/dist/esm/icons/corner-left-up.js:
|
|
9009
|
-
(**
|
|
9010
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9011
|
-
*
|
|
9012
|
-
* This source code is licensed under the ISC license.
|
|
9013
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9014
|
-
*)
|
|
9015
|
-
|
|
9016
8956
|
lucide-react/dist/esm/icons/ellipsis-vertical.js:
|
|
9017
|
-
(**
|
|
9018
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9019
|
-
*
|
|
9020
|
-
* This source code is licensed under the ISC license.
|
|
9021
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9022
|
-
*)
|
|
9023
|
-
|
|
9024
8957
|
lucide-react/dist/esm/icons/globe.js:
|
|
9025
|
-
(**
|
|
9026
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9027
|
-
*
|
|
9028
|
-
* This source code is licensed under the ISC license.
|
|
9029
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9030
|
-
*)
|
|
9031
|
-
|
|
9032
8958
|
lucide-react/dist/esm/icons/hash.js:
|
|
9033
|
-
(**
|
|
9034
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9035
|
-
*
|
|
9036
|
-
* This source code is licensed under the ISC license.
|
|
9037
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9038
|
-
*)
|
|
9039
|
-
|
|
9040
8959
|
lucide-react/dist/esm/icons/layers.js:
|
|
9041
|
-
(**
|
|
9042
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9043
|
-
*
|
|
9044
|
-
* This source code is licensed under the ISC license.
|
|
9045
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9046
|
-
*)
|
|
9047
|
-
|
|
9048
8960
|
lucide-react/dist/esm/icons/layout-grid.js:
|
|
9049
|
-
(**
|
|
9050
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9051
|
-
*
|
|
9052
|
-
* This source code is licensed under the ISC license.
|
|
9053
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9054
|
-
*)
|
|
9055
|
-
|
|
9056
8961
|
lucide-react/dist/esm/icons/link.js:
|
|
9057
|
-
(**
|
|
9058
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9059
|
-
*
|
|
9060
|
-
* This source code is licensed under the ISC license.
|
|
9061
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9062
|
-
*)
|
|
9063
|
-
|
|
9064
8962
|
lucide-react/dist/esm/icons/list.js:
|
|
9065
|
-
(**
|
|
9066
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9067
|
-
*
|
|
9068
|
-
* This source code is licensed under the ISC license.
|
|
9069
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9070
|
-
*)
|
|
9071
|
-
|
|
9072
8963
|
lucide-react/dist/esm/icons/lock-open.js:
|
|
9073
|
-
(**
|
|
9074
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9075
|
-
*
|
|
9076
|
-
* This source code is licensed under the ISC license.
|
|
9077
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9078
|
-
*)
|
|
9079
|
-
|
|
9080
8964
|
lucide-react/dist/esm/icons/lock.js:
|
|
9081
|
-
(**
|
|
9082
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9083
|
-
*
|
|
9084
|
-
* This source code is licensed under the ISC license.
|
|
9085
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9086
|
-
*)
|
|
9087
|
-
|
|
9088
8965
|
lucide-react/dist/esm/icons/monitor.js:
|
|
9089
|
-
(**
|
|
9090
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9091
|
-
*
|
|
9092
|
-
* This source code is licensed under the ISC license.
|
|
9093
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9094
|
-
*)
|
|
9095
|
-
|
|
9096
8966
|
lucide-react/dist/esm/icons/panel-left.js:
|
|
9097
|
-
(**
|
|
9098
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9099
|
-
*
|
|
9100
|
-
* This source code is licensed under the ISC license.
|
|
9101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9102
|
-
*)
|
|
9103
|
-
|
|
9104
8967
|
lucide-react/dist/esm/icons/panel-right.js:
|
|
9105
|
-
(**
|
|
9106
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9107
|
-
*
|
|
9108
|
-
* This source code is licensed under the ISC license.
|
|
9109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9110
|
-
*)
|
|
9111
|
-
|
|
9112
8968
|
lucide-react/dist/esm/icons/plus.js:
|
|
9113
|
-
(**
|
|
9114
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9115
|
-
*
|
|
9116
|
-
* This source code is licensed under the ISC license.
|
|
9117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9118
|
-
*)
|
|
9119
|
-
|
|
9120
8969
|
lucide-react/dist/esm/icons/redo-2.js:
|
|
9121
|
-
(**
|
|
9122
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9123
|
-
*
|
|
9124
|
-
* This source code is licensed under the ISC license.
|
|
9125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9126
|
-
*)
|
|
9127
|
-
|
|
9128
8970
|
lucide-react/dist/esm/icons/search.js:
|
|
9129
|
-
(**
|
|
9130
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9131
|
-
*
|
|
9132
|
-
* This source code is licensed under the ISC license.
|
|
9133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9134
|
-
*)
|
|
9135
|
-
|
|
9136
8971
|
lucide-react/dist/esm/icons/sliders-horizontal.js:
|
|
9137
|
-
(**
|
|
9138
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9139
|
-
*
|
|
9140
|
-
* This source code is licensed under the ISC license.
|
|
9141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9142
|
-
*)
|
|
9143
|
-
|
|
9144
8972
|
lucide-react/dist/esm/icons/smartphone.js:
|
|
9145
|
-
(**
|
|
9146
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9147
|
-
*
|
|
9148
|
-
* This source code is licensed under the ISC license.
|
|
9149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9150
|
-
*)
|
|
9151
|
-
|
|
9152
8973
|
lucide-react/dist/esm/icons/tablet.js:
|
|
9153
|
-
(**
|
|
9154
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9155
|
-
*
|
|
9156
|
-
* This source code is licensed under the ISC license.
|
|
9157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9158
|
-
*)
|
|
9159
|
-
|
|
9160
8974
|
lucide-react/dist/esm/icons/trash.js:
|
|
9161
|
-
(**
|
|
9162
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9163
|
-
*
|
|
9164
|
-
* This source code is licensed under the ISC license.
|
|
9165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9166
|
-
*)
|
|
9167
|
-
|
|
9168
8975
|
lucide-react/dist/esm/icons/type.js:
|
|
9169
|
-
(**
|
|
9170
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9171
|
-
*
|
|
9172
|
-
* This source code is licensed under the ISC license.
|
|
9173
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9174
|
-
*)
|
|
9175
|
-
|
|
9176
8976
|
lucide-react/dist/esm/icons/undo-2.js:
|
|
9177
|
-
(**
|
|
9178
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9179
|
-
*
|
|
9180
|
-
* This source code is licensed under the ISC license.
|
|
9181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9182
|
-
*)
|
|
9183
|
-
|
|
9184
8977
|
lucide-react/dist/esm/icons/zoom-in.js:
|
|
9185
|
-
(**
|
|
9186
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9187
|
-
*
|
|
9188
|
-
* This source code is licensed under the ISC license.
|
|
9189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9190
|
-
*)
|
|
9191
|
-
|
|
9192
8978
|
lucide-react/dist/esm/icons/zoom-out.js:
|
|
9193
|
-
(**
|
|
9194
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9195
|
-
*
|
|
9196
|
-
* This source code is licensed under the ISC license.
|
|
9197
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9198
|
-
*)
|
|
9199
|
-
|
|
9200
8979
|
lucide-react/dist/esm/lucide-react.js:
|
|
9201
8980
|
(**
|
|
9202
8981
|
* @license lucide-react v0.468.0 - ISC
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-
|
|
2
|
-
export {
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-BqwnaCVe.mjs';
|
|
2
|
+
export { ad as Adaptor, ab as ArrayField, B as ArrayState, ar as AsFieldProps, X as BaseData, a5 as BaseField, af as CacheOpts, J as ComponentConfigExtensions, T as ComponentConfigParams, a0 as ComponentDataMap, _ as ComponentDataOptionalId, a3 as ComponentMetadata, Q as ConfigParams, a1 as Content, ai as CustomField, ah as CustomFieldRender, ao as DefaultComponentProps, L as DefaultComponents, al as DefaultRootFieldProps, an as DefaultRootProps, am as DefaultRootRenderProps, o as Direction, p as DragAxis, ag as ExternalField, ae as ExternalFieldWithAdaptor, N as ExtractConfigParams, at as ExtractField, a4 as FieldMetadata, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, $ as MappedItem, a7 as NumberField, ac as ObjectField, x as OverrideKey, G as PuckComponent, ak as PuckContext, a2 as PuckMetadata, aa as RadioField, K as RootConfig, Z as RootData, Y as RootDataWithoutProps, a9 as SelectField, S as Slot, E as SlotComponent, aj as SlotField, a6 as TextField, a8 as TextareaField, q as Viewport, as as WithChildren, ap as WithId, aq as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BqwnaCVe.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|