@measured/puck 0.21.0-canary.a5160e5d → 0.21.0-canary.ace4c8b3
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-LAV6OYHN.mjs → chunk-AIFI2M23.mjs} +30 -257
- package/dist/{chunk-VBJEDLUM.mjs → chunk-TC25DCTQ.mjs} +8 -8
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +40 -267
- 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 +37 -264
- 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 +8 -8
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-DkTSFbz_.d.mts → walk-tree-CkSoNBF7.d.mts} +52 -43
- package/dist/{walk-tree-DkTSFbz_.d.ts → walk-tree-CkSoNBF7.d.ts} +52 -43
- 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-TC25DCTQ.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";
|
|
@@ -2986,8 +2986,9 @@ var ArrayField = ({
|
|
|
2986
2986
|
var _a;
|
|
2987
2987
|
if (isDraggingAny) return;
|
|
2988
2988
|
const existingValue = value || [];
|
|
2989
|
+
const defaultProps = typeof field.defaultItemProps === "function" ? field.defaultItemProps(existingValue.length) : (_a = field.defaultItemProps) != null ? _a : {};
|
|
2989
2990
|
const newItem = defaultSlots(
|
|
2990
|
-
uniqifyItem(
|
|
2991
|
+
uniqifyItem(defaultProps),
|
|
2991
2992
|
field.arrayFields
|
|
2992
2993
|
);
|
|
2993
2994
|
const newValue = [...existingValue, newItem];
|
|
@@ -3191,7 +3192,7 @@ var ExternalInput = ({
|
|
|
3191
3192
|
}, [mappedData]);
|
|
3192
3193
|
const [searchQuery, setSearchQuery] = useState6(field.initialQuery || "");
|
|
3193
3194
|
const search = useCallback3(
|
|
3194
|
-
(query, filters2) => __async(
|
|
3195
|
+
(query, filters2) => __async(null, null, function* () {
|
|
3195
3196
|
setIsLoading(true);
|
|
3196
3197
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
|
3197
3198
|
let listData;
|
|
@@ -3417,7 +3418,7 @@ var ExternalField = ({
|
|
|
3417
3418
|
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
|
|
3418
3419
|
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
|
3419
3420
|
mapRow: validField.mapRow,
|
|
3420
|
-
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(
|
|
3421
|
+
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(null, null, function* () {
|
|
3421
3422
|
return yield deprecatedField.adaptor.fetchList(
|
|
3422
3423
|
deprecatedField.adaptorParams
|
|
3423
3424
|
);
|
|
@@ -3793,6 +3794,7 @@ function AutoFieldInternal(props) {
|
|
|
3793
3794
|
}
|
|
3794
3795
|
return (_props) => null;
|
|
3795
3796
|
}, [field.type]);
|
|
3797
|
+
const fieldKey = field.type === "custom" ? field.key : void 0;
|
|
3796
3798
|
let FieldComponent = useMemo3(() => {
|
|
3797
3799
|
if (field.type === "custom") {
|
|
3798
3800
|
if (!field.render) {
|
|
@@ -3802,7 +3804,7 @@ function AutoFieldInternal(props) {
|
|
|
3802
3804
|
} else if (field.type !== "slot") {
|
|
3803
3805
|
return render[field.type];
|
|
3804
3806
|
}
|
|
3805
|
-
}, [field.type, render]);
|
|
3807
|
+
}, [field.type, fieldKey, render]);
|
|
3806
3808
|
const { visible = true } = props.field;
|
|
3807
3809
|
if (!visible) {
|
|
3808
3810
|
return null;
|
|
@@ -4180,12 +4182,14 @@ var DraggableComponent = ({
|
|
|
4180
4182
|
}
|
|
4181
4183
|
return cleanup;
|
|
4182
4184
|
}, [permissions.drag, zoneCompound]);
|
|
4185
|
+
const [, setRerender] = useState10(0);
|
|
4183
4186
|
const ref = useRef2(null);
|
|
4184
4187
|
const refSetter = useCallback7(
|
|
4185
4188
|
(el) => {
|
|
4186
4189
|
sortableRef(el);
|
|
4187
|
-
if (el) {
|
|
4190
|
+
if (ref.current !== el) {
|
|
4188
4191
|
ref.current = el;
|
|
4192
|
+
setRerender((update) => update + 1);
|
|
4189
4193
|
}
|
|
4190
4194
|
},
|
|
4191
4195
|
[sortableRef]
|
|
@@ -4840,7 +4844,7 @@ var createNestedDroppablePlugin = ({ onChange }, id) => class NestedDroppablePlu
|
|
|
4840
4844
|
|
|
4841
4845
|
// lib/insert-component.ts
|
|
4842
4846
|
init_react_import();
|
|
4843
|
-
var insertComponent = (componentType, zone, index, appStore) => __async(
|
|
4847
|
+
var insertComponent = (componentType, zone, index, appStore) => __async(null, null, function* () {
|
|
4844
4848
|
const id = generateId(componentType);
|
|
4845
4849
|
const insertActionData = {
|
|
4846
4850
|
type: "insert",
|
|
@@ -5524,7 +5528,7 @@ import { useCallback as useCallback9 } from "react";
|
|
|
5524
5528
|
function useRenderedCallback(callback, deps) {
|
|
5525
5529
|
const manager = useDragDropManager();
|
|
5526
5530
|
return useCallback9(
|
|
5527
|
-
(...args) => __async(
|
|
5531
|
+
(...args) => __async(null, null, function* () {
|
|
5528
5532
|
yield manager == null ? void 0 : manager.renderer.rendering;
|
|
5529
5533
|
return callback(...args);
|
|
5530
5534
|
}),
|
|
@@ -5791,7 +5795,7 @@ var InlineTextFieldInternal = ({
|
|
|
5791
5795
|
ref.current.replaceChildren(value);
|
|
5792
5796
|
}
|
|
5793
5797
|
const cleanupPortal = registerOverlayPortal(ref.current);
|
|
5794
|
-
const handleInput = (e) => __async(
|
|
5798
|
+
const handleInput = (e) => __async(null, null, function* () {
|
|
5795
5799
|
var _a2;
|
|
5796
5800
|
const appStore2 = appStoreApi.getState();
|
|
5797
5801
|
const node = appStore2.state.indexes.nodes[componentId];
|
|
@@ -6452,7 +6456,7 @@ function createUsePuck() {
|
|
|
6452
6456
|
}
|
|
6453
6457
|
const result = useStore3(
|
|
6454
6458
|
usePuckApi,
|
|
6455
|
-
selector != null ? selector : (s) => s
|
|
6459
|
+
selector != null ? selector : ((s) => s)
|
|
6456
6460
|
);
|
|
6457
6461
|
return result;
|
|
6458
6462
|
};
|
|
@@ -6599,7 +6603,7 @@ var DefaultFields = ({
|
|
|
6599
6603
|
}) => {
|
|
6600
6604
|
return /* @__PURE__ */ jsx29(Fragment8, { children });
|
|
6601
6605
|
};
|
|
6602
|
-
var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(
|
|
6606
|
+
var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(null, null, function* () {
|
|
6603
6607
|
let currentProps;
|
|
6604
6608
|
const { dispatch, state, selectedItem, resolveComponentData: resolveComponentData2 } = appStore.getState();
|
|
6605
6609
|
const { data, ui } = state;
|
|
@@ -6973,7 +6977,7 @@ var CopyHostStyles = ({
|
|
|
6973
6977
|
let elements = [];
|
|
6974
6978
|
const hashes = {};
|
|
6975
6979
|
const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
|
|
6976
|
-
const mirrorEl = (el, inlineStyles = false) => __async(
|
|
6980
|
+
const mirrorEl = (el, inlineStyles = false) => __async(null, null, function* () {
|
|
6977
6981
|
let mirror;
|
|
6978
6982
|
if (el.nodeName === "LINK" && inlineStyles) {
|
|
6979
6983
|
mirror = document.createElement("style");
|
|
@@ -7005,7 +7009,7 @@ var CopyHostStyles = ({
|
|
|
7005
7009
|
}
|
|
7006
7010
|
return mirror;
|
|
7007
7011
|
});
|
|
7008
|
-
const addEl = (el) => __async(
|
|
7012
|
+
const addEl = (el) => __async(null, null, function* () {
|
|
7009
7013
|
const index = lookupEl(el);
|
|
7010
7014
|
if (index > -1) {
|
|
7011
7015
|
if (debug)
|
|
@@ -7078,7 +7082,7 @@ var CopyHostStyles = ({
|
|
|
7078
7082
|
const parentBody = parentDocument.getElementsByTagName("body")[0];
|
|
7079
7083
|
syncAttributes(parentBody, doc.body);
|
|
7080
7084
|
Promise.all(
|
|
7081
|
-
collectedStyles.map((styleNode, i) => __async(
|
|
7085
|
+
collectedStyles.map((styleNode, i) => __async(null, null, function* () {
|
|
7082
7086
|
if (styleNode.nodeName === "LINK") {
|
|
7083
7087
|
const linkHref = styleNode.href;
|
|
7084
7088
|
if (hrefs.indexOf(linkHref) > -1) {
|
|
@@ -8705,7 +8709,7 @@ function PuckProvider({ children }) {
|
|
|
8705
8709
|
});
|
|
8706
8710
|
const previousData = useRef12(null);
|
|
8707
8711
|
useEffect29(() => {
|
|
8708
|
-
appStore.subscribe(
|
|
8712
|
+
return appStore.subscribe(
|
|
8709
8713
|
(s) => s.state.data,
|
|
8710
8714
|
(data) => {
|
|
8711
8715
|
if (onChange) {
|
|
@@ -8715,7 +8719,7 @@ function PuckProvider({ children }) {
|
|
|
8715
8719
|
}
|
|
8716
8720
|
}
|
|
8717
8721
|
);
|
|
8718
|
-
}, []);
|
|
8722
|
+
}, [onChange]);
|
|
8719
8723
|
useRegisterPermissionsSlice(appStore, permissions);
|
|
8720
8724
|
const uPuckStore = useRegisterUsePuckStore(appStore);
|
|
8721
8725
|
useEffect29(() => {
|
|
@@ -8931,269 +8935,38 @@ classnames/index.js:
|
|
|
8931
8935
|
*)
|
|
8932
8936
|
|
|
8933
8937
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
8934
|
-
(**
|
|
8935
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8936
|
-
*
|
|
8937
|
-
* This source code is licensed under the ISC license.
|
|
8938
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8939
|
-
*)
|
|
8940
|
-
|
|
8941
8938
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
8942
|
-
(**
|
|
8943
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8944
|
-
*
|
|
8945
|
-
* This source code is licensed under the ISC license.
|
|
8946
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8947
|
-
*)
|
|
8948
|
-
|
|
8949
8939
|
lucide-react/dist/esm/Icon.js:
|
|
8950
|
-
(**
|
|
8951
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8952
|
-
*
|
|
8953
|
-
* This source code is licensed under the ISC license.
|
|
8954
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8955
|
-
*)
|
|
8956
|
-
|
|
8957
8940
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
8958
|
-
(**
|
|
8959
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8960
|
-
*
|
|
8961
|
-
* This source code is licensed under the ISC license.
|
|
8962
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8963
|
-
*)
|
|
8964
|
-
|
|
8965
8941
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
8966
|
-
(**
|
|
8967
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8968
|
-
*
|
|
8969
|
-
* This source code is licensed under the ISC license.
|
|
8970
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8971
|
-
*)
|
|
8972
|
-
|
|
8973
8942
|
lucide-react/dist/esm/icons/chevron-right.js:
|
|
8974
|
-
(**
|
|
8975
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8976
|
-
*
|
|
8977
|
-
* This source code is licensed under the ISC license.
|
|
8978
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8979
|
-
*)
|
|
8980
|
-
|
|
8981
8943
|
lucide-react/dist/esm/icons/chevron-up.js:
|
|
8982
|
-
(**
|
|
8983
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8984
|
-
*
|
|
8985
|
-
* This source code is licensed under the ISC license.
|
|
8986
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8987
|
-
*)
|
|
8988
|
-
|
|
8989
8944
|
lucide-react/dist/esm/icons/circle-check-big.js:
|
|
8990
|
-
(**
|
|
8991
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8992
|
-
*
|
|
8993
|
-
* This source code is licensed under the ISC license.
|
|
8994
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8995
|
-
*)
|
|
8996
|
-
|
|
8997
8945
|
lucide-react/dist/esm/icons/copy.js:
|
|
8998
|
-
(**
|
|
8999
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9000
|
-
*
|
|
9001
|
-
* This source code is licensed under the ISC license.
|
|
9002
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9003
|
-
*)
|
|
9004
|
-
|
|
9005
8946
|
lucide-react/dist/esm/icons/corner-left-up.js:
|
|
9006
|
-
(**
|
|
9007
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9008
|
-
*
|
|
9009
|
-
* This source code is licensed under the ISC license.
|
|
9010
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9011
|
-
*)
|
|
9012
|
-
|
|
9013
8947
|
lucide-react/dist/esm/icons/ellipsis-vertical.js:
|
|
9014
|
-
(**
|
|
9015
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9016
|
-
*
|
|
9017
|
-
* This source code is licensed under the ISC license.
|
|
9018
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9019
|
-
*)
|
|
9020
|
-
|
|
9021
8948
|
lucide-react/dist/esm/icons/globe.js:
|
|
9022
|
-
(**
|
|
9023
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9024
|
-
*
|
|
9025
|
-
* This source code is licensed under the ISC license.
|
|
9026
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9027
|
-
*)
|
|
9028
|
-
|
|
9029
8949
|
lucide-react/dist/esm/icons/hash.js:
|
|
9030
|
-
(**
|
|
9031
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9032
|
-
*
|
|
9033
|
-
* This source code is licensed under the ISC license.
|
|
9034
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9035
|
-
*)
|
|
9036
|
-
|
|
9037
8950
|
lucide-react/dist/esm/icons/layers.js:
|
|
9038
|
-
(**
|
|
9039
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9040
|
-
*
|
|
9041
|
-
* This source code is licensed under the ISC license.
|
|
9042
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9043
|
-
*)
|
|
9044
|
-
|
|
9045
8951
|
lucide-react/dist/esm/icons/layout-grid.js:
|
|
9046
|
-
(**
|
|
9047
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9048
|
-
*
|
|
9049
|
-
* This source code is licensed under the ISC license.
|
|
9050
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9051
|
-
*)
|
|
9052
|
-
|
|
9053
8952
|
lucide-react/dist/esm/icons/link.js:
|
|
9054
|
-
(**
|
|
9055
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9056
|
-
*
|
|
9057
|
-
* This source code is licensed under the ISC license.
|
|
9058
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9059
|
-
*)
|
|
9060
|
-
|
|
9061
8953
|
lucide-react/dist/esm/icons/list.js:
|
|
9062
|
-
(**
|
|
9063
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9064
|
-
*
|
|
9065
|
-
* This source code is licensed under the ISC license.
|
|
9066
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9067
|
-
*)
|
|
9068
|
-
|
|
9069
8954
|
lucide-react/dist/esm/icons/lock-open.js:
|
|
9070
|
-
(**
|
|
9071
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9072
|
-
*
|
|
9073
|
-
* This source code is licensed under the ISC license.
|
|
9074
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9075
|
-
*)
|
|
9076
|
-
|
|
9077
8955
|
lucide-react/dist/esm/icons/lock.js:
|
|
9078
|
-
(**
|
|
9079
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9080
|
-
*
|
|
9081
|
-
* This source code is licensed under the ISC license.
|
|
9082
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9083
|
-
*)
|
|
9084
|
-
|
|
9085
8956
|
lucide-react/dist/esm/icons/monitor.js:
|
|
9086
|
-
(**
|
|
9087
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9088
|
-
*
|
|
9089
|
-
* This source code is licensed under the ISC license.
|
|
9090
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9091
|
-
*)
|
|
9092
|
-
|
|
9093
8957
|
lucide-react/dist/esm/icons/panel-left.js:
|
|
9094
|
-
(**
|
|
9095
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9096
|
-
*
|
|
9097
|
-
* This source code is licensed under the ISC license.
|
|
9098
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9099
|
-
*)
|
|
9100
|
-
|
|
9101
8958
|
lucide-react/dist/esm/icons/panel-right.js:
|
|
9102
|
-
(**
|
|
9103
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9104
|
-
*
|
|
9105
|
-
* This source code is licensed under the ISC license.
|
|
9106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9107
|
-
*)
|
|
9108
|
-
|
|
9109
8959
|
lucide-react/dist/esm/icons/plus.js:
|
|
9110
|
-
(**
|
|
9111
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9112
|
-
*
|
|
9113
|
-
* This source code is licensed under the ISC license.
|
|
9114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9115
|
-
*)
|
|
9116
|
-
|
|
9117
8960
|
lucide-react/dist/esm/icons/redo-2.js:
|
|
9118
|
-
(**
|
|
9119
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9120
|
-
*
|
|
9121
|
-
* This source code is licensed under the ISC license.
|
|
9122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9123
|
-
*)
|
|
9124
|
-
|
|
9125
8961
|
lucide-react/dist/esm/icons/search.js:
|
|
9126
|
-
(**
|
|
9127
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9128
|
-
*
|
|
9129
|
-
* This source code is licensed under the ISC license.
|
|
9130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9131
|
-
*)
|
|
9132
|
-
|
|
9133
8962
|
lucide-react/dist/esm/icons/sliders-horizontal.js:
|
|
9134
|
-
(**
|
|
9135
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9136
|
-
*
|
|
9137
|
-
* This source code is licensed under the ISC license.
|
|
9138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9139
|
-
*)
|
|
9140
|
-
|
|
9141
8963
|
lucide-react/dist/esm/icons/smartphone.js:
|
|
9142
|
-
(**
|
|
9143
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9144
|
-
*
|
|
9145
|
-
* This source code is licensed under the ISC license.
|
|
9146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9147
|
-
*)
|
|
9148
|
-
|
|
9149
8964
|
lucide-react/dist/esm/icons/tablet.js:
|
|
9150
|
-
(**
|
|
9151
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9152
|
-
*
|
|
9153
|
-
* This source code is licensed under the ISC license.
|
|
9154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9155
|
-
*)
|
|
9156
|
-
|
|
9157
8965
|
lucide-react/dist/esm/icons/trash.js:
|
|
9158
|
-
(**
|
|
9159
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9160
|
-
*
|
|
9161
|
-
* This source code is licensed under the ISC license.
|
|
9162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9163
|
-
*)
|
|
9164
|
-
|
|
9165
8966
|
lucide-react/dist/esm/icons/type.js:
|
|
9166
|
-
(**
|
|
9167
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9168
|
-
*
|
|
9169
|
-
* This source code is licensed under the ISC license.
|
|
9170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9171
|
-
*)
|
|
9172
|
-
|
|
9173
8967
|
lucide-react/dist/esm/icons/undo-2.js:
|
|
9174
|
-
(**
|
|
9175
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9176
|
-
*
|
|
9177
|
-
* This source code is licensed under the ISC license.
|
|
9178
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9179
|
-
*)
|
|
9180
|
-
|
|
9181
8968
|
lucide-react/dist/esm/icons/zoom-in.js:
|
|
9182
|
-
(**
|
|
9183
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9184
|
-
*
|
|
9185
|
-
* This source code is licensed under the ISC license.
|
|
9186
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9187
|
-
*)
|
|
9188
|
-
|
|
9189
8969
|
lucide-react/dist/esm/icons/zoom-out.js:
|
|
9190
|
-
(**
|
|
9191
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9192
|
-
*
|
|
9193
|
-
* This source code is licensed under the ISC license.
|
|
9194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9195
|
-
*)
|
|
9196
|
-
|
|
9197
8970
|
lucide-react/dist/esm/lucide-react.js:
|
|
9198
8971
|
(**
|
|
9199
8972
|
* @license lucide-react v0.468.0 - ISC
|
|
@@ -695,7 +695,7 @@ var getChanged = (newItem, oldItem) => {
|
|
|
695
695
|
// lib/resolve-component-data.ts
|
|
696
696
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
697
697
|
var cache = { lastChange: {} };
|
|
698
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(
|
|
698
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
|
|
699
699
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
700
700
|
const resolvedItem = __spreadValues({}, item);
|
|
701
701
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -723,11 +723,11 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
|
|
|
723
723
|
let itemWithResolvedChildren = yield mapFields(
|
|
724
724
|
resolvedItem,
|
|
725
725
|
{
|
|
726
|
-
slot: (_02) => __async(
|
|
726
|
+
slot: (_02) => __async(null, [_02], function* ({ value }) {
|
|
727
727
|
const content = value;
|
|
728
728
|
return yield Promise.all(
|
|
729
729
|
content.map(
|
|
730
|
-
(childItem) => __async(
|
|
730
|
+
(childItem) => __async(null, null, function* () {
|
|
731
731
|
return (yield resolveComponentData(
|
|
732
732
|
childItem,
|
|
733
733
|
config,
|
|
@@ -770,7 +770,7 @@ function resolveAllData(_0, _1) {
|
|
|
770
770
|
return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
|
|
771
771
|
var _a;
|
|
772
772
|
const defaultedData = defaultData(data);
|
|
773
|
-
const resolveNode = (_node) => __async(
|
|
773
|
+
const resolveNode = (_node) => __async(null, null, function* () {
|
|
774
774
|
const node = toComponent(_node);
|
|
775
775
|
onResolveStart == null ? void 0 : onResolveStart(node);
|
|
776
776
|
const resolved = (yield resolveComponentData(
|
|
@@ -791,13 +791,13 @@ function resolveAllData(_0, _1) {
|
|
|
791
791
|
onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
|
|
792
792
|
return resolvedDeep;
|
|
793
793
|
});
|
|
794
|
-
const processContent = (content) => __async(
|
|
794
|
+
const processContent = (content) => __async(null, null, function* () {
|
|
795
795
|
return Promise.all(content.map(resolveNode));
|
|
796
796
|
});
|
|
797
|
-
const processZones = () => __async(
|
|
797
|
+
const processZones = () => __async(null, null, function* () {
|
|
798
798
|
var _a2;
|
|
799
799
|
const zones = (_a2 = data.zones) != null ? _a2 : {};
|
|
800
|
-
Object.entries(zones).forEach((_02) => __async(
|
|
800
|
+
Object.entries(zones).forEach((_02) => __async(null, [_02], function* ([zoneKey, content]) {
|
|
801
801
|
zones[zoneKey] = yield Promise.all(content.map(resolveNode));
|
|
802
802
|
}));
|
|
803
803
|
return zones;
|
|
@@ -807,7 +807,7 @@ function resolveAllData(_0, _1) {
|
|
|
807
807
|
content: yield processContent(defaultedData.content),
|
|
808
808
|
zones: yield processZones()
|
|
809
809
|
};
|
|
810
|
-
Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(
|
|
810
|
+
Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(null, null, function* () {
|
|
811
811
|
const content = defaultedData.zones[zoneKey];
|
|
812
812
|
dynamic.zones[zoneKey] = yield processContent(content);
|
|
813
813
|
}), {});
|
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-CkSoNBF7.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-CkSoNBF7.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';
|
package/dist/index.d.ts
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-CkSoNBF7.js';
|
|
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-CkSoNBF7.js';
|
|
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';
|