@measured/puck 0.21.0-canary.a5160e5d → 0.21.0-canary.b6ca72f9
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-LAV6OYHN.mjs → chunk-VL643U2B.mjs} +43 -262
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +56 -274
- 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 +53 -271
- 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-DkTSFbz_.d.mts → walk-tree-BqwnaCVe.d.mts} +54 -44
- package/dist/{walk-tree-DkTSFbz_.d.ts → walk-tree-BqwnaCVe.d.ts} +54 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -190,8 +190,8 @@ var require_fast_deep_equal = __commonJS({
|
|
|
190
190
|
});
|
|
191
191
|
|
|
192
192
|
// bundle/index.ts
|
|
193
|
-
var
|
|
194
|
-
__export(
|
|
193
|
+
var index_exports = {};
|
|
194
|
+
__export(index_exports, {
|
|
195
195
|
Action: () => Action,
|
|
196
196
|
ActionBar: () => ActionBar,
|
|
197
197
|
AutoField: () => AutoField,
|
|
@@ -216,7 +216,7 @@ __export(bundle_exports, {
|
|
|
216
216
|
usePuck: () => usePuck,
|
|
217
217
|
walkTree: () => walkTree
|
|
218
218
|
});
|
|
219
|
-
module.exports = __toCommonJS(
|
|
219
|
+
module.exports = __toCommonJS(index_exports);
|
|
220
220
|
init_react_import();
|
|
221
221
|
|
|
222
222
|
// bundle/core.ts
|
|
@@ -1976,10 +1976,10 @@ var getChanged = (newItem, oldItem) => {
|
|
|
1976
1976
|
|
|
1977
1977
|
// store/slices/permissions.ts
|
|
1978
1978
|
var createPermissionsSlice = (set, get) => {
|
|
1979
|
-
const resolvePermissions = (..._0) => __async(
|
|
1979
|
+
const resolvePermissions = (..._0) => __async(null, [..._0], function* (params = {}, force) {
|
|
1980
1980
|
const { state, permissions, config } = get();
|
|
1981
1981
|
const { cache: cache2, globalPermissions } = permissions;
|
|
1982
|
-
const resolveDataForItem = (item2, force2 = false) => __async(
|
|
1982
|
+
const resolveDataForItem = (item2, force2 = false) => __async(null, null, function* () {
|
|
1983
1983
|
var _a, _b, _c;
|
|
1984
1984
|
const { config: config2, state: appState, setComponentLoading } = get();
|
|
1985
1985
|
const componentConfig = item2.type === "root" ? config2.root : config2.components[item2.type];
|
|
@@ -2034,13 +2034,13 @@ var createPermissionsSlice = (set, get) => {
|
|
|
2034
2034
|
if (item) {
|
|
2035
2035
|
yield resolveDataForItem(item, force);
|
|
2036
2036
|
} else if (type) {
|
|
2037
|
-
flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(
|
|
2037
|
+
flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(null, null, function* () {
|
|
2038
2038
|
yield resolveDataForItem(item2, force);
|
|
2039
2039
|
}));
|
|
2040
2040
|
} else if (root) {
|
|
2041
2041
|
resolveDataForRoot(force);
|
|
2042
2042
|
} else {
|
|
2043
|
-
flattenData(state, config).map((item2) => __async(
|
|
2043
|
+
flattenData(state, config).map((item2) => __async(null, null, function* () {
|
|
2044
2044
|
yield resolveDataForItem(item2, force);
|
|
2045
2045
|
}));
|
|
2046
2046
|
}
|
|
@@ -2121,7 +2121,7 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
2121
2121
|
};
|
|
2122
2122
|
var useRegisterFieldsSlice = (appStore, id) => {
|
|
2123
2123
|
const resolveFields = (0, import_react7.useCallback)(
|
|
2124
|
-
(reset) => __async(
|
|
2124
|
+
(reset) => __async(null, null, function* () {
|
|
2125
2125
|
var _a, _b;
|
|
2126
2126
|
const { fields, lastResolvedData } = appStore.getState().fields;
|
|
2127
2127
|
const metadata = appStore.getState().metadata;
|
|
@@ -2192,7 +2192,7 @@ var useRegisterFieldsSlice = (appStore, id) => {
|
|
|
2192
2192
|
init_react_import();
|
|
2193
2193
|
var import_fast_equals2 = require("fast-equals");
|
|
2194
2194
|
var cache = { lastChange: {} };
|
|
2195
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(
|
|
2195
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
|
|
2196
2196
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
2197
2197
|
const resolvedItem = __spreadValues({}, item);
|
|
2198
2198
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -2220,11 +2220,11 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
|
|
|
2220
2220
|
let itemWithResolvedChildren = yield mapFields(
|
|
2221
2221
|
resolvedItem,
|
|
2222
2222
|
{
|
|
2223
|
-
slot: (_02) => __async(
|
|
2223
|
+
slot: (_02) => __async(null, [_02], function* ({ value }) {
|
|
2224
2224
|
const content = value;
|
|
2225
2225
|
return yield Promise.all(
|
|
2226
2226
|
content.map(
|
|
2227
|
-
(childItem) => __async(
|
|
2227
|
+
(childItem) => __async(null, null, function* () {
|
|
2228
2228
|
return (yield resolveComponentData(
|
|
2229
2229
|
childItem,
|
|
2230
2230
|
config,
|
|
@@ -2414,7 +2414,7 @@ var createAppStore = (initialAppStore) => (0, import_zustand2.create)()(
|
|
|
2414
2414
|
const selectedItem = state.ui.itemSelector ? getItem(state.ui.itemSelector, state) : null;
|
|
2415
2415
|
return __spreadProps(__spreadValues({}, s), { state, selectedItem });
|
|
2416
2416
|
}),
|
|
2417
|
-
resolveComponentData: (componentData, trigger) => __async(
|
|
2417
|
+
resolveComponentData: (componentData, trigger) => __async(null, null, function* () {
|
|
2418
2418
|
const { config, metadata, setComponentLoading, permissions } = get();
|
|
2419
2419
|
const timeouts = {};
|
|
2420
2420
|
return yield resolveComponentData(
|
|
@@ -2425,7 +2425,7 @@ var createAppStore = (initialAppStore) => (0, import_zustand2.create)()(
|
|
|
2425
2425
|
const id = "id" in item.props ? item.props.id : "root";
|
|
2426
2426
|
timeouts[id] = setComponentLoading(id, true, 50);
|
|
2427
2427
|
},
|
|
2428
|
-
(item) => __async(
|
|
2428
|
+
(item) => __async(null, null, function* () {
|
|
2429
2429
|
const id = "id" in item.props ? item.props.id : "root";
|
|
2430
2430
|
if ("type" in item) {
|
|
2431
2431
|
yield permissions.refreshPermissions({ item });
|
|
@@ -2437,7 +2437,7 @@ var createAppStore = (initialAppStore) => (0, import_zustand2.create)()(
|
|
|
2437
2437
|
trigger
|
|
2438
2438
|
);
|
|
2439
2439
|
}),
|
|
2440
|
-
resolveAndCommitData: () => __async(
|
|
2440
|
+
resolveAndCommitData: () => __async(null, null, function* () {
|
|
2441
2441
|
const { config, state, dispatch, resolveComponentData: resolveComponentData2 } = get();
|
|
2442
2442
|
walkAppState(
|
|
2443
2443
|
state,
|
|
@@ -3009,7 +3009,7 @@ var collisionStore = (0, import_vanilla.createStore)(() => ({
|
|
|
3009
3009
|
|
|
3010
3010
|
// lib/dnd/collision/dynamic/index.ts
|
|
3011
3011
|
var flushNext = "";
|
|
3012
|
-
var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => (input) => {
|
|
3012
|
+
var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => ((input) => {
|
|
3013
3013
|
var _a, _b, _c, _d, _e;
|
|
3014
3014
|
const { dragOperation, droppable } = input;
|
|
3015
3015
|
const { position } = dragOperation;
|
|
@@ -3102,7 +3102,7 @@ var createDynamicCollisionDetector = (dragAxis, midpointOffset = 0.05) => (input
|
|
|
3102
3102
|
}
|
|
3103
3103
|
collisionDebug(dragCenter, dropCenter, droppable.id.toString(), "hotpink");
|
|
3104
3104
|
return null;
|
|
3105
|
-
};
|
|
3105
|
+
});
|
|
3106
3106
|
|
|
3107
3107
|
// components/Sortable/index.tsx
|
|
3108
3108
|
var import_sortable = require("@dnd-kit/react/sortable");
|
|
@@ -3535,8 +3535,9 @@ var ArrayField = ({
|
|
|
3535
3535
|
var _a;
|
|
3536
3536
|
if (isDraggingAny) return;
|
|
3537
3537
|
const existingValue = value || [];
|
|
3538
|
+
const defaultProps = typeof field.defaultItemProps === "function" ? field.defaultItemProps(existingValue.length) : (_a = field.defaultItemProps) != null ? _a : {};
|
|
3538
3539
|
const newItem = defaultSlots(
|
|
3539
|
-
uniqifyItem(
|
|
3540
|
+
uniqifyItem(defaultProps),
|
|
3540
3541
|
field.arrayFields
|
|
3541
3542
|
);
|
|
3542
3543
|
const newValue = [...existingValue, newItem];
|
|
@@ -3824,7 +3825,7 @@ var ExternalInput = ({
|
|
|
3824
3825
|
}, [mappedData]);
|
|
3825
3826
|
const [searchQuery, setSearchQuery] = (0, import_react17.useState)(field.initialQuery || "");
|
|
3826
3827
|
const search = (0, import_react17.useCallback)(
|
|
3827
|
-
(query, filters2) => __async(
|
|
3828
|
+
(query, filters2) => __async(null, null, function* () {
|
|
3828
3829
|
setIsLoading(true);
|
|
3829
3830
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
|
3830
3831
|
let listData;
|
|
@@ -4050,7 +4051,7 @@ var ExternalField = ({
|
|
|
4050
4051
|
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
|
|
4051
4052
|
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
|
4052
4053
|
mapRow: validField.mapRow,
|
|
4053
|
-
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(
|
|
4054
|
+
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(null, null, function* () {
|
|
4054
4055
|
return yield deprecatedField.adaptor.fetchList(
|
|
4055
4056
|
deprecatedField.adaptorParams
|
|
4056
4057
|
);
|
|
@@ -4426,6 +4427,7 @@ function AutoFieldInternal(props) {
|
|
|
4426
4427
|
}
|
|
4427
4428
|
return (_props) => null;
|
|
4428
4429
|
}, [field.type]);
|
|
4430
|
+
const fieldKey = field.type === "custom" ? field.key : void 0;
|
|
4429
4431
|
let FieldComponent = (0, import_react20.useMemo)(() => {
|
|
4430
4432
|
if (field.type === "custom") {
|
|
4431
4433
|
if (!field.render) {
|
|
@@ -4435,7 +4437,7 @@ function AutoFieldInternal(props) {
|
|
|
4435
4437
|
} else if (field.type !== "slot") {
|
|
4436
4438
|
return render[field.type];
|
|
4437
4439
|
}
|
|
4438
|
-
}, [field.type, render]);
|
|
4440
|
+
}, [field.type, fieldKey, render]);
|
|
4439
4441
|
const { visible = true } = props.field;
|
|
4440
4442
|
if (!visible) {
|
|
4441
4443
|
return null;
|
|
@@ -4806,12 +4808,14 @@ var DraggableComponent = ({
|
|
|
4806
4808
|
}
|
|
4807
4809
|
return cleanup;
|
|
4808
4810
|
}, [permissions.drag, zoneCompound]);
|
|
4811
|
+
const [, setRerender] = (0, import_react24.useState)(0);
|
|
4809
4812
|
const ref = (0, import_react24.useRef)(null);
|
|
4810
4813
|
const refSetter = (0, import_react24.useCallback)(
|
|
4811
4814
|
(el) => {
|
|
4812
4815
|
sortableRef(el);
|
|
4813
|
-
if (el) {
|
|
4816
|
+
if (ref.current !== el) {
|
|
4814
4817
|
ref.current = el;
|
|
4818
|
+
setRerender((update) => update + 1);
|
|
4815
4819
|
}
|
|
4816
4820
|
},
|
|
4817
4821
|
[sortableRef]
|
|
@@ -5258,7 +5262,7 @@ var import_react27 = require("react");
|
|
|
5258
5262
|
function useRenderedCallback(callback, deps) {
|
|
5259
5263
|
const manager = (0, import_react26.useDragDropManager)();
|
|
5260
5264
|
return (0, import_react27.useCallback)(
|
|
5261
|
-
(...args) => __async(
|
|
5265
|
+
(...args) => __async(null, null, function* () {
|
|
5262
5266
|
yield manager == null ? void 0 : manager.renderer.rendering;
|
|
5263
5267
|
return callback(...args);
|
|
5264
5268
|
}),
|
|
@@ -5463,8 +5467,9 @@ var Item = ({
|
|
|
5463
5467
|
);
|
|
5464
5468
|
};
|
|
5465
5469
|
var SlotRender = (0, import_react31.forwardRef)(
|
|
5466
|
-
function SlotRenderInternal({ className, style, content, config, metadata }, ref) {
|
|
5467
|
-
|
|
5470
|
+
function SlotRenderInternal({ className, style, content, config, metadata, as }, ref) {
|
|
5471
|
+
const El = as != null ? as : "div";
|
|
5472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(El, { className, style, ref, children: content.map((item) => {
|
|
5468
5473
|
if (!config.components[item.type]) {
|
|
5469
5474
|
return null;
|
|
5470
5475
|
}
|
|
@@ -5687,7 +5692,7 @@ var InlineTextFieldInternal = ({
|
|
|
5687
5692
|
ref.current.replaceChildren(value);
|
|
5688
5693
|
}
|
|
5689
5694
|
const cleanupPortal = registerOverlayPortal(ref.current);
|
|
5690
|
-
const handleInput = (e) => __async(
|
|
5695
|
+
const handleInput = (e) => __async(null, null, function* () {
|
|
5691
5696
|
var _a2;
|
|
5692
5697
|
const appStore2 = appStoreApi.getState();
|
|
5693
5698
|
const node = appStore2.state.indexes.nodes[componentId];
|
|
@@ -5979,7 +5984,8 @@ var DropZoneEdit = (0, import_react34.forwardRef)(
|
|
|
5979
5984
|
style,
|
|
5980
5985
|
className,
|
|
5981
5986
|
minEmptyHeight: userMinEmptyHeight = 128,
|
|
5982
|
-
collisionAxis
|
|
5987
|
+
collisionAxis,
|
|
5988
|
+
as
|
|
5983
5989
|
}, userRef) {
|
|
5984
5990
|
const ctx = (0, import_react34.useContext)(dropZoneContext);
|
|
5985
5991
|
const appStoreApi = useAppStoreApi();
|
|
@@ -6122,8 +6128,9 @@ var DropZoneEdit = (0, import_react34.forwardRef)(
|
|
|
6122
6128
|
userMinEmptyHeight,
|
|
6123
6129
|
ref
|
|
6124
6130
|
});
|
|
6131
|
+
const El = as != null ? as : "div";
|
|
6125
6132
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
6126
|
-
|
|
6133
|
+
El,
|
|
6127
6134
|
{
|
|
6128
6135
|
className: `${getClassName18({
|
|
6129
6136
|
isRootZone,
|
|
@@ -6186,7 +6193,7 @@ var DropZoneRenderItem = ({
|
|
|
6186
6193
|
};
|
|
6187
6194
|
var DropZoneRenderPure = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropZoneRender, __spreadValues({}, props));
|
|
6188
6195
|
var DropZoneRender = (0, import_react34.forwardRef)(
|
|
6189
|
-
function DropZoneRenderInternal({ className, style, zone }, ref) {
|
|
6196
|
+
function DropZoneRenderInternal({ className, style, zone, as }, ref) {
|
|
6190
6197
|
const ctx = (0, import_react34.useContext)(dropZoneContext);
|
|
6191
6198
|
const { areaId = "root" } = ctx || {};
|
|
6192
6199
|
const { config, data, metadata } = (0, import_react34.useContext)(renderContext);
|
|
@@ -6199,13 +6206,14 @@ var DropZoneRender = (0, import_react34.forwardRef)(
|
|
|
6199
6206
|
}
|
|
6200
6207
|
}
|
|
6201
6208
|
}, [content]);
|
|
6209
|
+
const El = as != null ? as : "div";
|
|
6202
6210
|
if (!data || !config) {
|
|
6203
6211
|
return null;
|
|
6204
6212
|
}
|
|
6205
6213
|
if (zoneCompound !== rootDroppableId) {
|
|
6206
6214
|
content = setupZone(data, zoneCompound).zones[zoneCompound];
|
|
6207
6215
|
}
|
|
6208
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
6216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(El, { className, style, ref, children: content.map((item) => {
|
|
6209
6217
|
const Component = config.components[item.type];
|
|
6210
6218
|
if (Component) {
|
|
6211
6219
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -6511,7 +6519,7 @@ var createNestedDroppablePlugin = ({ onChange }, id) => class NestedDroppablePlu
|
|
|
6511
6519
|
|
|
6512
6520
|
// lib/insert-component.ts
|
|
6513
6521
|
init_react_import();
|
|
6514
|
-
var insertComponent = (componentType, zone, index, appStore) => __async(
|
|
6522
|
+
var insertComponent = (componentType, zone, index, appStore) => __async(null, null, function* () {
|
|
6515
6523
|
const id = generateId(componentType);
|
|
6516
6524
|
const insertActionData = {
|
|
6517
6525
|
type: "insert",
|
|
@@ -7219,7 +7227,7 @@ var DefaultFields = ({
|
|
|
7219
7227
|
}) => {
|
|
7220
7228
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children });
|
|
7221
7229
|
};
|
|
7222
|
-
var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(
|
|
7230
|
+
var createOnChange = (fieldName, appStore) => (value, updatedUi) => __async(null, null, function* () {
|
|
7223
7231
|
let currentProps;
|
|
7224
7232
|
const { dispatch, state, selectedItem, resolveComponentData: resolveComponentData2 } = appStore.getState();
|
|
7225
7233
|
const { data, ui } = state;
|
|
@@ -7588,7 +7596,7 @@ var CopyHostStyles = ({
|
|
|
7588
7596
|
let elements = [];
|
|
7589
7597
|
const hashes = {};
|
|
7590
7598
|
const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
|
|
7591
|
-
const mirrorEl = (el, inlineStyles = false) => __async(
|
|
7599
|
+
const mirrorEl = (el, inlineStyles = false) => __async(null, null, function* () {
|
|
7592
7600
|
let mirror;
|
|
7593
7601
|
if (el.nodeName === "LINK" && inlineStyles) {
|
|
7594
7602
|
mirror = document.createElement("style");
|
|
@@ -7620,7 +7628,7 @@ var CopyHostStyles = ({
|
|
|
7620
7628
|
}
|
|
7621
7629
|
return mirror;
|
|
7622
7630
|
});
|
|
7623
|
-
const addEl = (el) => __async(
|
|
7631
|
+
const addEl = (el) => __async(null, null, function* () {
|
|
7624
7632
|
const index = lookupEl(el);
|
|
7625
7633
|
if (index > -1) {
|
|
7626
7634
|
if (debug)
|
|
@@ -7693,7 +7701,7 @@ var CopyHostStyles = ({
|
|
|
7693
7701
|
const parentBody = parentDocument.getElementsByTagName("body")[0];
|
|
7694
7702
|
syncAttributes(parentBody, doc.body);
|
|
7695
7703
|
Promise.all(
|
|
7696
|
-
collectedStyles.map((styleNode, i) => __async(
|
|
7704
|
+
collectedStyles.map((styleNode, i) => __async(null, null, function* () {
|
|
7697
7705
|
if (styleNode.nodeName === "LINK") {
|
|
7698
7706
|
const linkHref = styleNode.href;
|
|
7699
7707
|
if (hrefs.indexOf(linkHref) > -1) {
|
|
@@ -8768,7 +8776,7 @@ function createUsePuck() {
|
|
|
8768
8776
|
}
|
|
8769
8777
|
const result = (0, import_zustand6.useStore)(
|
|
8770
8778
|
usePuckApi,
|
|
8771
|
-
selector != null ? selector : (s) => s
|
|
8779
|
+
selector != null ? selector : ((s) => s)
|
|
8772
8780
|
);
|
|
8773
8781
|
return result;
|
|
8774
8782
|
};
|
|
@@ -9346,7 +9354,12 @@ function PuckProvider({ children }) {
|
|
|
9346
9354
|
});
|
|
9347
9355
|
})
|
|
9348
9356
|
);
|
|
9349
|
-
const initialHistoryIndex = (
|
|
9357
|
+
const initialHistoryIndex = (0, import_react60.useMemo)(() => {
|
|
9358
|
+
if ((_initialHistory == null ? void 0 : _initialHistory.index) !== void 0 && (_initialHistory == null ? void 0 : _initialHistory.index) >= 0 && (_initialHistory == null ? void 0 : _initialHistory.index) < blendedHistories.length) {
|
|
9359
|
+
return _initialHistory == null ? void 0 : _initialHistory.index;
|
|
9360
|
+
}
|
|
9361
|
+
return blendedHistories.length - 1;
|
|
9362
|
+
}, []);
|
|
9350
9363
|
const initialAppState = blendedHistories[initialHistoryIndex].state;
|
|
9351
9364
|
const loadedOverrides = useLoadedOverrides({
|
|
9352
9365
|
overrides,
|
|
@@ -9405,7 +9418,7 @@ function PuckProvider({ children }) {
|
|
|
9405
9418
|
});
|
|
9406
9419
|
const previousData = (0, import_react60.useRef)(null);
|
|
9407
9420
|
(0, import_react60.useEffect)(() => {
|
|
9408
|
-
appStore.subscribe(
|
|
9421
|
+
return appStore.subscribe(
|
|
9409
9422
|
(s) => s.state.data,
|
|
9410
9423
|
(data) => {
|
|
9411
9424
|
if (onChange) {
|
|
@@ -9415,7 +9428,7 @@ function PuckProvider({ children }) {
|
|
|
9415
9428
|
}
|
|
9416
9429
|
}
|
|
9417
9430
|
);
|
|
9418
|
-
}, []);
|
|
9431
|
+
}, [onChange]);
|
|
9419
9432
|
useRegisterPermissionsSlice(appStore, permissions);
|
|
9420
9433
|
const uPuckStore = useRegisterUsePuckStore(appStore);
|
|
9421
9434
|
(0, import_react60.useEffect)(() => {
|
|
@@ -9732,7 +9745,7 @@ function resolveAllData(_0, _1) {
|
|
|
9732
9745
|
return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
|
|
9733
9746
|
var _a;
|
|
9734
9747
|
const defaultedData = defaultData(data);
|
|
9735
|
-
const resolveNode = (_node) => __async(
|
|
9748
|
+
const resolveNode = (_node) => __async(null, null, function* () {
|
|
9736
9749
|
const node = toComponent(_node);
|
|
9737
9750
|
onResolveStart == null ? void 0 : onResolveStart(node);
|
|
9738
9751
|
const resolved = (yield resolveComponentData(
|
|
@@ -9753,13 +9766,13 @@ function resolveAllData(_0, _1) {
|
|
|
9753
9766
|
onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
|
|
9754
9767
|
return resolvedDeep;
|
|
9755
9768
|
});
|
|
9756
|
-
const processContent = (content) => __async(
|
|
9769
|
+
const processContent = (content) => __async(null, null, function* () {
|
|
9757
9770
|
return Promise.all(content.map(resolveNode));
|
|
9758
9771
|
});
|
|
9759
|
-
const processZones = () => __async(
|
|
9772
|
+
const processZones = () => __async(null, null, function* () {
|
|
9760
9773
|
var _a2;
|
|
9761
9774
|
const zones = (_a2 = data.zones) != null ? _a2 : {};
|
|
9762
|
-
Object.entries(zones).forEach((_02) => __async(
|
|
9775
|
+
Object.entries(zones).forEach((_02) => __async(null, [_02], function* ([zoneKey, content]) {
|
|
9763
9776
|
zones[zoneKey] = yield Promise.all(content.map(resolveNode));
|
|
9764
9777
|
}));
|
|
9765
9778
|
return zones;
|
|
@@ -9769,7 +9782,7 @@ function resolveAllData(_0, _1) {
|
|
|
9769
9782
|
content: yield processContent(defaultedData.content),
|
|
9770
9783
|
zones: yield processZones()
|
|
9771
9784
|
};
|
|
9772
|
-
Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(
|
|
9785
|
+
Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(null, null, function* () {
|
|
9773
9786
|
const content = defaultedData.zones[zoneKey];
|
|
9774
9787
|
dynamic.zones[zoneKey] = yield processContent(content);
|
|
9775
9788
|
}), {});
|
|
@@ -9812,269 +9825,38 @@ classnames/index.js:
|
|
|
9812
9825
|
*)
|
|
9813
9826
|
|
|
9814
9827
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
9815
|
-
(**
|
|
9816
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9817
|
-
*
|
|
9818
|
-
* This source code is licensed under the ISC license.
|
|
9819
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9820
|
-
*)
|
|
9821
|
-
|
|
9822
9828
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
9823
|
-
(**
|
|
9824
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9825
|
-
*
|
|
9826
|
-
* This source code is licensed under the ISC license.
|
|
9827
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9828
|
-
*)
|
|
9829
|
-
|
|
9830
9829
|
lucide-react/dist/esm/Icon.js:
|
|
9831
|
-
(**
|
|
9832
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9833
|
-
*
|
|
9834
|
-
* This source code is licensed under the ISC license.
|
|
9835
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9836
|
-
*)
|
|
9837
|
-
|
|
9838
9830
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
9839
|
-
(**
|
|
9840
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9841
|
-
*
|
|
9842
|
-
* This source code is licensed under the ISC license.
|
|
9843
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9844
|
-
*)
|
|
9845
|
-
|
|
9846
9831
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
9847
|
-
(**
|
|
9848
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9849
|
-
*
|
|
9850
|
-
* This source code is licensed under the ISC license.
|
|
9851
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9852
|
-
*)
|
|
9853
|
-
|
|
9854
9832
|
lucide-react/dist/esm/icons/chevron-right.js:
|
|
9855
|
-
(**
|
|
9856
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9857
|
-
*
|
|
9858
|
-
* This source code is licensed under the ISC license.
|
|
9859
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9860
|
-
*)
|
|
9861
|
-
|
|
9862
9833
|
lucide-react/dist/esm/icons/chevron-up.js:
|
|
9863
|
-
(**
|
|
9864
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9865
|
-
*
|
|
9866
|
-
* This source code is licensed under the ISC license.
|
|
9867
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9868
|
-
*)
|
|
9869
|
-
|
|
9870
9834
|
lucide-react/dist/esm/icons/circle-check-big.js:
|
|
9871
|
-
(**
|
|
9872
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9873
|
-
*
|
|
9874
|
-
* This source code is licensed under the ISC license.
|
|
9875
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9876
|
-
*)
|
|
9877
|
-
|
|
9878
9835
|
lucide-react/dist/esm/icons/copy.js:
|
|
9879
|
-
(**
|
|
9880
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9881
|
-
*
|
|
9882
|
-
* This source code is licensed under the ISC license.
|
|
9883
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9884
|
-
*)
|
|
9885
|
-
|
|
9886
9836
|
lucide-react/dist/esm/icons/corner-left-up.js:
|
|
9887
|
-
(**
|
|
9888
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9889
|
-
*
|
|
9890
|
-
* This source code is licensed under the ISC license.
|
|
9891
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9892
|
-
*)
|
|
9893
|
-
|
|
9894
9837
|
lucide-react/dist/esm/icons/ellipsis-vertical.js:
|
|
9895
|
-
(**
|
|
9896
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9897
|
-
*
|
|
9898
|
-
* This source code is licensed under the ISC license.
|
|
9899
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9900
|
-
*)
|
|
9901
|
-
|
|
9902
9838
|
lucide-react/dist/esm/icons/globe.js:
|
|
9903
|
-
(**
|
|
9904
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9905
|
-
*
|
|
9906
|
-
* This source code is licensed under the ISC license.
|
|
9907
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9908
|
-
*)
|
|
9909
|
-
|
|
9910
9839
|
lucide-react/dist/esm/icons/hash.js:
|
|
9911
|
-
(**
|
|
9912
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9913
|
-
*
|
|
9914
|
-
* This source code is licensed under the ISC license.
|
|
9915
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9916
|
-
*)
|
|
9917
|
-
|
|
9918
9840
|
lucide-react/dist/esm/icons/layers.js:
|
|
9919
|
-
(**
|
|
9920
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9921
|
-
*
|
|
9922
|
-
* This source code is licensed under the ISC license.
|
|
9923
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9924
|
-
*)
|
|
9925
|
-
|
|
9926
9841
|
lucide-react/dist/esm/icons/layout-grid.js:
|
|
9927
|
-
(**
|
|
9928
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9929
|
-
*
|
|
9930
|
-
* This source code is licensed under the ISC license.
|
|
9931
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9932
|
-
*)
|
|
9933
|
-
|
|
9934
9842
|
lucide-react/dist/esm/icons/link.js:
|
|
9935
|
-
(**
|
|
9936
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9937
|
-
*
|
|
9938
|
-
* This source code is licensed under the ISC license.
|
|
9939
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9940
|
-
*)
|
|
9941
|
-
|
|
9942
9843
|
lucide-react/dist/esm/icons/list.js:
|
|
9943
|
-
(**
|
|
9944
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9945
|
-
*
|
|
9946
|
-
* This source code is licensed under the ISC license.
|
|
9947
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9948
|
-
*)
|
|
9949
|
-
|
|
9950
9844
|
lucide-react/dist/esm/icons/lock-open.js:
|
|
9951
|
-
(**
|
|
9952
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9953
|
-
*
|
|
9954
|
-
* This source code is licensed under the ISC license.
|
|
9955
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9956
|
-
*)
|
|
9957
|
-
|
|
9958
9845
|
lucide-react/dist/esm/icons/lock.js:
|
|
9959
|
-
(**
|
|
9960
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9961
|
-
*
|
|
9962
|
-
* This source code is licensed under the ISC license.
|
|
9963
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9964
|
-
*)
|
|
9965
|
-
|
|
9966
9846
|
lucide-react/dist/esm/icons/monitor.js:
|
|
9967
|
-
(**
|
|
9968
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9969
|
-
*
|
|
9970
|
-
* This source code is licensed under the ISC license.
|
|
9971
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9972
|
-
*)
|
|
9973
|
-
|
|
9974
9847
|
lucide-react/dist/esm/icons/panel-left.js:
|
|
9975
|
-
(**
|
|
9976
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9977
|
-
*
|
|
9978
|
-
* This source code is licensed under the ISC license.
|
|
9979
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9980
|
-
*)
|
|
9981
|
-
|
|
9982
9848
|
lucide-react/dist/esm/icons/panel-right.js:
|
|
9983
|
-
(**
|
|
9984
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9985
|
-
*
|
|
9986
|
-
* This source code is licensed under the ISC license.
|
|
9987
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9988
|
-
*)
|
|
9989
|
-
|
|
9990
9849
|
lucide-react/dist/esm/icons/plus.js:
|
|
9991
|
-
(**
|
|
9992
|
-
* @license lucide-react v0.468.0 - ISC
|
|
9993
|
-
*
|
|
9994
|
-
* This source code is licensed under the ISC license.
|
|
9995
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9996
|
-
*)
|
|
9997
|
-
|
|
9998
9850
|
lucide-react/dist/esm/icons/redo-2.js:
|
|
9999
|
-
(**
|
|
10000
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10001
|
-
*
|
|
10002
|
-
* This source code is licensed under the ISC license.
|
|
10003
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10004
|
-
*)
|
|
10005
|
-
|
|
10006
9851
|
lucide-react/dist/esm/icons/search.js:
|
|
10007
|
-
(**
|
|
10008
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10009
|
-
*
|
|
10010
|
-
* This source code is licensed under the ISC license.
|
|
10011
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10012
|
-
*)
|
|
10013
|
-
|
|
10014
9852
|
lucide-react/dist/esm/icons/sliders-horizontal.js:
|
|
10015
|
-
(**
|
|
10016
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10017
|
-
*
|
|
10018
|
-
* This source code is licensed under the ISC license.
|
|
10019
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10020
|
-
*)
|
|
10021
|
-
|
|
10022
9853
|
lucide-react/dist/esm/icons/smartphone.js:
|
|
10023
|
-
(**
|
|
10024
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10025
|
-
*
|
|
10026
|
-
* This source code is licensed under the ISC license.
|
|
10027
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10028
|
-
*)
|
|
10029
|
-
|
|
10030
9854
|
lucide-react/dist/esm/icons/tablet.js:
|
|
10031
|
-
(**
|
|
10032
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10033
|
-
*
|
|
10034
|
-
* This source code is licensed under the ISC license.
|
|
10035
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10036
|
-
*)
|
|
10037
|
-
|
|
10038
9855
|
lucide-react/dist/esm/icons/trash.js:
|
|
10039
|
-
(**
|
|
10040
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10041
|
-
*
|
|
10042
|
-
* This source code is licensed under the ISC license.
|
|
10043
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10044
|
-
*)
|
|
10045
|
-
|
|
10046
9856
|
lucide-react/dist/esm/icons/type.js:
|
|
10047
|
-
(**
|
|
10048
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10049
|
-
*
|
|
10050
|
-
* This source code is licensed under the ISC license.
|
|
10051
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10052
|
-
*)
|
|
10053
|
-
|
|
10054
9857
|
lucide-react/dist/esm/icons/undo-2.js:
|
|
10055
|
-
(**
|
|
10056
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10057
|
-
*
|
|
10058
|
-
* This source code is licensed under the ISC license.
|
|
10059
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10060
|
-
*)
|
|
10061
|
-
|
|
10062
9858
|
lucide-react/dist/esm/icons/zoom-in.js:
|
|
10063
|
-
(**
|
|
10064
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10065
|
-
*
|
|
10066
|
-
* This source code is licensed under the ISC license.
|
|
10067
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10068
|
-
*)
|
|
10069
|
-
|
|
10070
9859
|
lucide-react/dist/esm/icons/zoom-out.js:
|
|
10071
|
-
(**
|
|
10072
|
-
* @license lucide-react v0.468.0 - ISC
|
|
10073
|
-
*
|
|
10074
|
-
* This source code is licensed under the ISC license.
|
|
10075
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10076
|
-
*)
|
|
10077
|
-
|
|
10078
9860
|
lucide-react/dist/esm/lucide-react.js:
|
|
10079
9861
|
(**
|
|
10080
9862
|
* @license lucide-react v0.468.0 - ISC
|
package/dist/index.mjs
CHANGED
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
setDeep,
|
|
19
19
|
useGetPuck,
|
|
20
20
|
usePuck
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VL643U2B.mjs";
|
|
22
22
|
import {
|
|
23
23
|
init_react_import,
|
|
24
24
|
migrate,
|
|
25
25
|
resolveAllData,
|
|
26
26
|
transformProps,
|
|
27
27
|
walkTree
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JA7SEUEH.mjs";
|
|
29
29
|
|
|
30
30
|
// bundle/index.ts
|
|
31
31
|
init_react_import();
|
package/dist/no-external.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ad as Adaptor, A as AppState, ab as ArrayField, B as ArrayState, ar as AsFieldProps, X as BaseData, a5 as BaseField, af as CacheOpts, f as ComponentConfig, J as ComponentConfigExtensions, T as ComponentConfigParams, a as ComponentData, a0 as ComponentDataMap, _ as ComponentDataOptionalId, a3 as ComponentMetadata, C as Config, Q as ConfigParams, a1 as Content, ai as CustomField, ah as CustomFieldRender, j as Data, 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, h as Field, a4 as FieldMetadata, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, $ as MappedItem, M as Metadata, a7 as NumberField, ac as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ak as PuckContext, a2 as PuckMetadata, aa as RadioField, c as ResolveDataTrigger, K as RootConfig, Z as RootData, R as RootDataWithProps, Y as RootDataWithoutProps, a9 as SelectField, S as Slot, E as SlotComponent, aj as SlotField, a6 as TextField, a8 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, 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';
|
|
2
2
|
export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, UsePuckData, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|