@measured/puck 0.21.0-canary.cf074bc6 → 0.21.0-canary.e310a175

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.
@@ -19,12 +19,13 @@ import {
19
19
  rootDroppableId,
20
20
  rootZone,
21
21
  setupZone,
22
+ toComponent,
22
23
  useFieldTransforms,
23
24
  useSlots,
24
25
  walkAppState,
25
26
  walkField,
26
27
  walkTree
27
- } from "./chunk-OOLYDXKW.mjs";
28
+ } from "./chunk-VBJEDLUM.mjs";
28
29
 
29
30
  // ../../node_modules/classnames/index.js
30
31
  var require_classnames = __commonJS({
@@ -88,6 +89,42 @@ var require_classnames = __commonJS({
88
89
  }
89
90
  });
90
91
 
92
+ // ../../node_modules/fast-deep-equal/index.js
93
+ var require_fast_deep_equal = __commonJS({
94
+ "../../node_modules/fast-deep-equal/index.js"(exports, module) {
95
+ "use strict";
96
+ init_react_import();
97
+ module.exports = function equal(a, b) {
98
+ if (a === b) return true;
99
+ if (a && b && typeof a == "object" && typeof b == "object") {
100
+ if (a.constructor !== b.constructor) return false;
101
+ var length, i, keys;
102
+ if (Array.isArray(a)) {
103
+ length = a.length;
104
+ if (length != b.length) return false;
105
+ for (i = length; i-- !== 0; )
106
+ if (!equal(a[i], b[i])) return false;
107
+ return true;
108
+ }
109
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
110
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
111
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
112
+ keys = Object.keys(a);
113
+ length = keys.length;
114
+ if (length !== Object.keys(b).length) return false;
115
+ for (i = length; i-- !== 0; )
116
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
117
+ for (i = length; i-- !== 0; ) {
118
+ var key = keys[i];
119
+ if (!equal(a[key], b[key])) return false;
120
+ }
121
+ return true;
122
+ }
123
+ return a !== a && b !== b;
124
+ };
125
+ }
126
+ });
127
+
91
128
  // types/API/Overrides.ts
92
129
  init_react_import();
93
130
  var overrideKeys = [
@@ -820,6 +857,10 @@ var monitorHotkeys = (doc) => {
820
857
  useHotkeyStore.getState().reset();
821
858
  }
822
859
  };
860
+ const onBlur = () => {
861
+ useHotkeyStore.getState().reset();
862
+ };
863
+ window.addEventListener("blur", onBlur);
823
864
  doc.addEventListener("keydown", onKeyDown);
824
865
  doc.addEventListener("keyup", onKeyUp);
825
866
  doc.addEventListener("visibilitychange", onVisibilityChanged);
@@ -827,6 +868,7 @@ var monitorHotkeys = (doc) => {
827
868
  doc.removeEventListener("keydown", onKeyDown);
828
869
  doc.removeEventListener("keyup", onKeyUp);
829
870
  doc.removeEventListener("visibilitychange", onVisibilityChanged);
871
+ window.removeEventListener("blur", onBlur);
830
872
  };
831
873
  };
832
874
  var useMonitorHotkeys = () => {
@@ -3120,11 +3162,13 @@ var ExternalInput = ({
3120
3162
  id,
3121
3163
  readOnly
3122
3164
  }) => {
3165
+ var _a;
3123
3166
  const {
3124
3167
  mapProp = (val) => val,
3125
3168
  mapRow = (val) => val,
3126
3169
  filterFields
3127
3170
  } = field || {};
3171
+ const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
3128
3172
  const [data, setData] = useState6([]);
3129
3173
  const [isOpen, setOpen] = useState6(false);
3130
3174
  const [isLoading, setIsLoading] = useState6(true);
@@ -3150,11 +3194,18 @@ var ExternalInput = ({
3150
3194
  (query, filters2) => __async(void 0, null, function* () {
3151
3195
  setIsLoading(true);
3152
3196
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
3153
- const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
3197
+ let listData;
3198
+ if (shouldCacheData && dataCache[cacheKey]) {
3199
+ listData = dataCache[cacheKey];
3200
+ } else {
3201
+ listData = yield field.fetchList({ query, filters: filters2 });
3202
+ }
3154
3203
  if (listData) {
3155
3204
  setData(listData);
3156
3205
  setIsLoading(false);
3157
- dataCache[cacheKey] = listData;
3206
+ if (shouldCacheData) {
3207
+ dataCache[cacheKey] = listData;
3208
+ }
3158
3209
  }
3159
3210
  }),
3160
3211
  [id, field]
@@ -3218,6 +3269,7 @@ var ExternalInput = ({
3218
3269
  }),
3219
3270
  onSubmit: (e) => {
3220
3271
  e.preventDefault();
3272
+ e.stopPropagation();
3221
3273
  search(searchQuery, filters);
3222
3274
  },
3223
3275
  children: [
@@ -4128,12 +4180,14 @@ var DraggableComponent = ({
4128
4180
  }
4129
4181
  return cleanup;
4130
4182
  }, [permissions.drag, zoneCompound]);
4183
+ const [, setRerender] = useState10(0);
4131
4184
  const ref = useRef2(null);
4132
4185
  const refSetter = useCallback7(
4133
4186
  (el) => {
4134
4187
  sortableRef(el);
4135
- if (el) {
4188
+ if (ref.current !== el) {
4136
4189
  ref.current = el;
4190
+ setRerender((update) => update + 1);
4137
4191
  }
4138
4192
  },
4139
4193
  [sortableRef]
@@ -5638,26 +5692,26 @@ var registerOverlayPortal = (el, opts = {}) => {
5638
5692
  capture: true
5639
5693
  });
5640
5694
  };
5641
- if (disableDragOnFocus) {
5642
- el.addEventListener("focus", onFocus, { capture: true });
5643
- el.addEventListener("blur", onBlur, { capture: true });
5644
- } else if (disableDrag) {
5695
+ if (disableDrag) {
5645
5696
  el.addEventListener("pointerdown", stopPropagation, {
5646
5697
  capture: true
5647
5698
  });
5699
+ } else if (disableDragOnFocus) {
5700
+ el.addEventListener("focus", onFocus, { capture: true });
5701
+ el.addEventListener("blur", onBlur, { capture: true });
5648
5702
  }
5649
5703
  el.setAttribute("data-puck-overlay-portal", "true");
5650
5704
  return () => {
5651
5705
  el.removeEventListener("mouseover", stopPropagation, {
5652
5706
  capture: true
5653
5707
  });
5654
- if (disableDragOnFocus) {
5655
- el.removeEventListener("focus", onFocus, { capture: true });
5656
- el.removeEventListener("blur", onFocus, { capture: true });
5657
- } else if (disableDrag) {
5708
+ if (disableDrag) {
5658
5709
  el.removeEventListener("pointerdown", stopPropagation, {
5659
5710
  capture: true
5660
5711
  });
5712
+ } else if (disableDragOnFocus) {
5713
+ el.removeEventListener("focus", onFocus, { capture: true });
5714
+ el.removeEventListener("blur", onBlur, { capture: true });
5661
5715
  }
5662
5716
  el.removeAttribute("data-puck-overlay-portal");
5663
5717
  };
@@ -5665,7 +5719,7 @@ var registerOverlayPortal = (el, opts = {}) => {
5665
5719
 
5666
5720
  // css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css#css-module
5667
5721
  init_react_import();
5668
- var styles_module_default13 = { "InlineTextField": "_InlineTextField_1xph6_1" };
5722
+ var styles_module_default13 = { "InlineTextField": "_InlineTextField_104qp_1" };
5669
5723
 
5670
5724
  // lib/data/set-deep.ts
5671
5725
  init_react_import();
@@ -8047,7 +8101,7 @@ var useDeleteHotkeys = () => {
8047
8101
  };
8048
8102
 
8049
8103
  // components/Puck/index.tsx
8050
- import fdeq from "fast-deep-equal";
8104
+ var import_fast_deep_equal = __toESM(require_fast_deep_equal());
8051
8105
 
8052
8106
  // components/Puck/components/Header/index.tsx
8053
8107
  init_react_import();
@@ -8551,9 +8605,13 @@ function PuckProvider({ children }) {
8551
8605
  }
8552
8606
  const rootProps = ((_h = initialData == null ? void 0 : initialData.root) == null ? void 0 : _h.props) || (initialData == null ? void 0 : initialData.root) || {};
8553
8607
  const defaultedRootProps = __spreadValues(__spreadValues({}, (_i = config.root) == null ? void 0 : _i.defaultProps), rootProps);
8608
+ const root = populateIds(
8609
+ toComponent(__spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps })),
8610
+ config
8611
+ );
8554
8612
  const newAppState = __spreadProps(__spreadValues({}, defaultAppState), {
8555
8613
  data: __spreadProps(__spreadValues({}, initialData), {
8556
- root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps }),
8614
+ root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: root.props }),
8557
8615
  content: initialData.content || []
8558
8616
  }),
8559
8617
  ui: __spreadProps(__spreadValues(__spreadValues({}, initial), clientUiState), {
@@ -8653,7 +8711,7 @@ function PuckProvider({ children }) {
8653
8711
  (s) => s.state.data,
8654
8712
  (data) => {
8655
8713
  if (onChange) {
8656
- if (fdeq(data, previousData.current)) return;
8714
+ if ((0, import_fast_deep_equal.default)(data, previousData.current)) return;
8657
8715
  onChange(data);
8658
8716
  previousData.current = data;
8659
8717
  }
@@ -681,19 +681,19 @@ init_react_import();
681
681
 
682
682
  // lib/get-changed.ts
683
683
  init_react_import();
684
- import fdeq from "fast-deep-equal";
684
+ import { deepEqual } from "fast-equals";
685
685
  var getChanged = (newItem, oldItem) => {
686
686
  return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
687
687
  const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
688
688
  const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
689
689
  return __spreadProps(__spreadValues({}, acc), {
690
- [item]: !fdeq(oldItemProps[item], newItemProps[item])
690
+ [item]: !deepEqual(oldItemProps[item], newItemProps[item])
691
691
  });
692
692
  }, {}) : {};
693
693
  };
694
694
 
695
695
  // lib/resolve-component-data.ts
696
- import fdeq2 from "fast-deep-equal";
696
+ import { deepEqual as deepEqual2 } from "fast-equals";
697
697
  var cache = { lastChange: {} };
698
698
  var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_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;
@@ -702,7 +702,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
702
702
  const id = "id" in item.props ? item.props.id : "root";
703
703
  if (shouldRunResolver) {
704
704
  const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
705
- if (trigger !== "force" && item && fdeq2(item, oldItem)) {
705
+ if (trigger !== "force" && item && deepEqual2(item, oldItem)) {
706
706
  return { node: resolved, didChange: false };
707
707
  }
708
708
  const changed = getChanged(item, oldItem);
@@ -752,7 +752,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
752
752
  };
753
753
  return {
754
754
  node: itemWithResolvedChildren,
755
- didChange: !fdeq2(item, itemWithResolvedChildren)
755
+ didChange: !deepEqual2(item, itemWithResolvedChildren)
756
756
  };
757
757
  });
758
758
 
@@ -958,6 +958,7 @@ export {
958
958
  useSlots,
959
959
  SlotRenderPure,
960
960
  SlotRender,
961
+ toComponent,
961
962
  migrate,
962
963
  transformProps,
963
964
  resolveAllData
package/dist/index.css CHANGED
@@ -1331,16 +1331,17 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1331
1331
  }
1332
1332
 
1333
1333
  /* css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css/#css-module-data */
1334
- ._InlineTextField_1xph6_1 {
1334
+ ._InlineTextField_104qp_1 {
1335
1335
  cursor: text;
1336
1336
  display: inline-block;
1337
1337
  white-space: pre-wrap;
1338
+ text-decoration: inherit;
1338
1339
  }
1339
- [data-dnd-dragging] ._InlineTextField_1xph6_1 {
1340
+ [data-dnd-dragging] ._InlineTextField_104qp_1 {
1340
1341
  cursor: none;
1341
1342
  caret-color: transparent;
1342
1343
  }
1343
- [data-dnd-dragging] ._InlineTextField_1xph6_1::selection {
1344
+ [data-dnd-dragging] ._InlineTextField_104qp_1::selection {
1344
1345
  display: none;
1345
1346
  }
1346
1347
 
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-Ctf3FZQI.mjs';
2
- export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ab as CustomField, aa as CustomFieldRender, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ad as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.mjs';
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-DkTSFbz_.mjs';
2
+ export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ac as CustomField, ab as CustomFieldRender, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ae as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.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-Ctf3FZQI.js';
2
- export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ab as CustomField, aa as CustomFieldRender, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ad as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.js';
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-DkTSFbz_.js';
2
+ export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ac as CustomField, ab as CustomFieldRender, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ae as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.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';
package/dist/index.js CHANGED
@@ -153,6 +153,42 @@ var require_classnames = __commonJS({
153
153
  }
154
154
  });
155
155
 
156
+ // ../../node_modules/fast-deep-equal/index.js
157
+ var require_fast_deep_equal = __commonJS({
158
+ "../../node_modules/fast-deep-equal/index.js"(exports2, module2) {
159
+ "use strict";
160
+ init_react_import();
161
+ module2.exports = function equal(a, b) {
162
+ if (a === b) return true;
163
+ if (a && b && typeof a == "object" && typeof b == "object") {
164
+ if (a.constructor !== b.constructor) return false;
165
+ var length, i, keys;
166
+ if (Array.isArray(a)) {
167
+ length = a.length;
168
+ if (length != b.length) return false;
169
+ for (i = length; i-- !== 0; )
170
+ if (!equal(a[i], b[i])) return false;
171
+ return true;
172
+ }
173
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
174
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
175
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
176
+ keys = Object.keys(a);
177
+ length = keys.length;
178
+ if (length !== Object.keys(b).length) return false;
179
+ for (i = length; i-- !== 0; )
180
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
181
+ for (i = length; i-- !== 0; ) {
182
+ var key = keys[i];
183
+ if (!equal(a[key], b[key])) return false;
184
+ }
185
+ return true;
186
+ }
187
+ return a !== a && b !== b;
188
+ };
189
+ }
190
+ });
191
+
156
192
  // bundle/index.ts
157
193
  var bundle_exports = {};
158
194
  __export(bundle_exports, {
@@ -1713,6 +1749,10 @@ var monitorHotkeys = (doc) => {
1713
1749
  useHotkeyStore.getState().reset();
1714
1750
  }
1715
1751
  };
1752
+ const onBlur = () => {
1753
+ useHotkeyStore.getState().reset();
1754
+ };
1755
+ window.addEventListener("blur", onBlur);
1716
1756
  doc.addEventListener("keydown", onKeyDown);
1717
1757
  doc.addEventListener("keyup", onKeyUp);
1718
1758
  doc.addEventListener("visibilitychange", onVisibilityChanged);
@@ -1720,6 +1760,7 @@ var monitorHotkeys = (doc) => {
1720
1760
  doc.removeEventListener("keydown", onKeyDown);
1721
1761
  doc.removeEventListener("keyup", onKeyUp);
1722
1762
  doc.removeEventListener("visibilitychange", onVisibilityChanged);
1763
+ window.removeEventListener("blur", onBlur);
1723
1764
  };
1724
1765
  };
1725
1766
  var useMonitorHotkeys = () => {
@@ -1922,13 +1963,13 @@ var flattenData = (state, config) => {
1922
1963
 
1923
1964
  // lib/get-changed.ts
1924
1965
  init_react_import();
1925
- var import_fast_deep_equal = __toESM(require("fast-deep-equal"));
1966
+ var import_fast_equals = require("fast-equals");
1926
1967
  var getChanged = (newItem, oldItem) => {
1927
1968
  return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
1928
1969
  const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
1929
1970
  const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
1930
1971
  return __spreadProps(__spreadValues({}, acc), {
1931
- [item]: !(0, import_fast_deep_equal.default)(oldItemProps[item], newItemProps[item])
1972
+ [item]: !(0, import_fast_equals.deepEqual)(oldItemProps[item], newItemProps[item])
1932
1973
  });
1933
1974
  }, {}) : {};
1934
1975
  };
@@ -2149,7 +2190,7 @@ var useRegisterFieldsSlice = (appStore, id) => {
2149
2190
 
2150
2191
  // lib/resolve-component-data.ts
2151
2192
  init_react_import();
2152
- var import_fast_deep_equal2 = __toESM(require("fast-deep-equal"));
2193
+ var import_fast_equals2 = require("fast-equals");
2153
2194
  var cache = { lastChange: {} };
2154
2195
  var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
2155
2196
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
@@ -2158,7 +2199,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
2158
2199
  const id = "id" in item.props ? item.props.id : "root";
2159
2200
  if (shouldRunResolver) {
2160
2201
  const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
2161
- if (trigger !== "force" && item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
2202
+ if (trigger !== "force" && item && (0, import_fast_equals2.deepEqual)(item, oldItem)) {
2162
2203
  return { node: resolved, didChange: false };
2163
2204
  }
2164
2205
  const changed = getChanged(item, oldItem);
@@ -2208,7 +2249,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
2208
2249
  };
2209
2250
  return {
2210
2251
  node: itemWithResolvedChildren,
2211
- didChange: !(0, import_fast_deep_equal2.default)(item, itemWithResolvedChildren)
2252
+ didChange: !(0, import_fast_equals2.deepEqual)(item, itemWithResolvedChildren)
2212
2253
  };
2213
2254
  });
2214
2255
 
@@ -3754,11 +3795,13 @@ var ExternalInput = ({
3754
3795
  id,
3755
3796
  readOnly
3756
3797
  }) => {
3798
+ var _a;
3757
3799
  const {
3758
3800
  mapProp = (val) => val,
3759
3801
  mapRow = (val) => val,
3760
3802
  filterFields
3761
3803
  } = field || {};
3804
+ const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
3762
3805
  const [data, setData] = (0, import_react17.useState)([]);
3763
3806
  const [isOpen, setOpen] = (0, import_react17.useState)(false);
3764
3807
  const [isLoading, setIsLoading] = (0, import_react17.useState)(true);
@@ -3784,11 +3827,18 @@ var ExternalInput = ({
3784
3827
  (query, filters2) => __async(void 0, null, function* () {
3785
3828
  setIsLoading(true);
3786
3829
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
3787
- const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
3830
+ let listData;
3831
+ if (shouldCacheData && dataCache[cacheKey]) {
3832
+ listData = dataCache[cacheKey];
3833
+ } else {
3834
+ listData = yield field.fetchList({ query, filters: filters2 });
3835
+ }
3788
3836
  if (listData) {
3789
3837
  setData(listData);
3790
3838
  setIsLoading(false);
3791
- dataCache[cacheKey] = listData;
3839
+ if (shouldCacheData) {
3840
+ dataCache[cacheKey] = listData;
3841
+ }
3792
3842
  }
3793
3843
  }),
3794
3844
  [id, field]
@@ -3852,6 +3902,7 @@ var ExternalInput = ({
3852
3902
  }),
3853
3903
  onSubmit: (e) => {
3854
3904
  e.preventDefault();
3905
+ e.stopPropagation();
3855
3906
  search(searchQuery, filters);
3856
3907
  },
3857
3908
  children: [
@@ -4755,12 +4806,14 @@ var DraggableComponent = ({
4755
4806
  }
4756
4807
  return cleanup;
4757
4808
  }, [permissions.drag, zoneCompound]);
4809
+ const [, setRerender] = (0, import_react24.useState)(0);
4758
4810
  const ref = (0, import_react24.useRef)(null);
4759
4811
  const refSetter = (0, import_react24.useCallback)(
4760
4812
  (el) => {
4761
4813
  sortableRef(el);
4762
- if (el) {
4814
+ if (ref.current !== el) {
4763
4815
  ref.current = el;
4816
+ setRerender((update) => update + 1);
4764
4817
  }
4765
4818
  },
4766
4819
  [sortableRef]
@@ -5535,26 +5588,26 @@ var registerOverlayPortal = (el, opts = {}) => {
5535
5588
  capture: true
5536
5589
  });
5537
5590
  };
5538
- if (disableDragOnFocus) {
5539
- el.addEventListener("focus", onFocus, { capture: true });
5540
- el.addEventListener("blur", onBlur, { capture: true });
5541
- } else if (disableDrag) {
5591
+ if (disableDrag) {
5542
5592
  el.addEventListener("pointerdown", stopPropagation, {
5543
5593
  capture: true
5544
5594
  });
5595
+ } else if (disableDragOnFocus) {
5596
+ el.addEventListener("focus", onFocus, { capture: true });
5597
+ el.addEventListener("blur", onBlur, { capture: true });
5545
5598
  }
5546
5599
  el.setAttribute("data-puck-overlay-portal", "true");
5547
5600
  return () => {
5548
5601
  el.removeEventListener("mouseover", stopPropagation, {
5549
5602
  capture: true
5550
5603
  });
5551
- if (disableDragOnFocus) {
5552
- el.removeEventListener("focus", onFocus, { capture: true });
5553
- el.removeEventListener("blur", onFocus, { capture: true });
5554
- } else if (disableDrag) {
5604
+ if (disableDrag) {
5555
5605
  el.removeEventListener("pointerdown", stopPropagation, {
5556
5606
  capture: true
5557
5607
  });
5608
+ } else if (disableDragOnFocus) {
5609
+ el.removeEventListener("focus", onFocus, { capture: true });
5610
+ el.removeEventListener("blur", onBlur, { capture: true });
5558
5611
  }
5559
5612
  el.removeAttribute("data-puck-overlay-portal");
5560
5613
  };
@@ -5562,7 +5615,7 @@ var registerOverlayPortal = (el, opts = {}) => {
5562
5615
 
5563
5616
  // css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css#css-module
5564
5617
  init_react_import();
5565
- var styles_module_default13 = { "InlineTextField": "_InlineTextField_1xph6_1" };
5618
+ var styles_module_default13 = { "InlineTextField": "_InlineTextField_104qp_1" };
5566
5619
 
5567
5620
  // lib/data/set-deep.ts
5568
5621
  init_react_import();
@@ -8739,7 +8792,7 @@ function useGetPuck() {
8739
8792
  }
8740
8793
 
8741
8794
  // components/Puck/index.tsx
8742
- var import_fast_deep_equal3 = __toESM(require("fast-deep-equal"));
8795
+ var import_fast_deep_equal = __toESM(require_fast_deep_equal());
8743
8796
 
8744
8797
  // components/Puck/components/Header/index.tsx
8745
8798
  init_react_import();
@@ -9167,6 +9220,15 @@ function useSidebarResize(position, dispatch) {
9167
9220
  };
9168
9221
  }
9169
9222
 
9223
+ // lib/data/to-component.ts
9224
+ init_react_import();
9225
+ var toComponent = (item) => {
9226
+ return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9227
+ props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9228
+ type: "root"
9229
+ });
9230
+ };
9231
+
9170
9232
  // components/Puck/index.tsx
9171
9233
  var import_jsx_runtime46 = require("react/jsx-runtime");
9172
9234
  var getClassName31 = get_class_name_factory_default("Puck", styles_module_default15);
@@ -9243,9 +9305,13 @@ function PuckProvider({ children }) {
9243
9305
  }
9244
9306
  const rootProps = ((_h = initialData == null ? void 0 : initialData.root) == null ? void 0 : _h.props) || (initialData == null ? void 0 : initialData.root) || {};
9245
9307
  const defaultedRootProps = __spreadValues(__spreadValues({}, (_i = config.root) == null ? void 0 : _i.defaultProps), rootProps);
9308
+ const root = populateIds(
9309
+ toComponent(__spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps })),
9310
+ config
9311
+ );
9246
9312
  const newAppState = __spreadProps(__spreadValues({}, defaultAppState), {
9247
9313
  data: __spreadProps(__spreadValues({}, initialData), {
9248
- root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps }),
9314
+ root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: root.props }),
9249
9315
  content: initialData.content || []
9250
9316
  }),
9251
9317
  ui: __spreadProps(__spreadValues(__spreadValues({}, initial), clientUiState), {
@@ -9345,7 +9411,7 @@ function PuckProvider({ children }) {
9345
9411
  (s) => s.state.data,
9346
9412
  (data) => {
9347
9413
  if (onChange) {
9348
- if ((0, import_fast_deep_equal3.default)(data, previousData.current)) return;
9414
+ if ((0, import_fast_deep_equal.default)(data, previousData.current)) return;
9349
9415
  onChange(data);
9350
9416
  previousData.current = data;
9351
9417
  }
@@ -9664,17 +9730,6 @@ function transformProps(data, propTransforms, config = { components: {} }) {
9664
9730
 
9665
9731
  // lib/resolve-all-data.ts
9666
9732
  init_react_import();
9667
-
9668
- // lib/data/to-component.ts
9669
- init_react_import();
9670
- var toComponent = (item) => {
9671
- return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9672
- props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9673
- type: "root"
9674
- });
9675
- };
9676
-
9677
- // lib/resolve-all-data.ts
9678
9733
  function resolveAllData(_0, _1) {
9679
9734
  return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
9680
9735
  var _a;
package/dist/index.mjs CHANGED
@@ -18,14 +18,14 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-MYJB3LKU.mjs";
21
+ } from "./chunk-EXX4ZSCK.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
25
25
  resolveAllData,
26
26
  transformProps,
27
27
  walkTree
28
- } from "./chunk-OOLYDXKW.mjs";
28
+ } from "./chunk-VBJEDLUM.mjs";
29
29
 
30
30
  // bundle/index.ts
31
31
  init_react_import();
@@ -1329,16 +1329,17 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1329
1329
  }
1330
1330
 
1331
1331
  /* css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css/#css-module-data */
1332
- ._InlineTextField_1xph6_1 {
1332
+ ._InlineTextField_104qp_1 {
1333
1333
  cursor: text;
1334
1334
  display: inline-block;
1335
1335
  white-space: pre-wrap;
1336
+ text-decoration: inherit;
1336
1337
  }
1337
- [data-dnd-dragging] ._InlineTextField_1xph6_1 {
1338
+ [data-dnd-dragging] ._InlineTextField_104qp_1 {
1338
1339
  cursor: none;
1339
1340
  caret-color: transparent;
1340
1341
  }
1341
- [data-dnd-dragging] ._InlineTextField_1xph6_1::selection {
1342
+ [data-dnd-dragging] ._InlineTextField_104qp_1::selection {
1342
1343
  display: none;
1343
1344
  }
1344
1345
 
@@ -1,4 +1,4 @@
1
- export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, 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, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.mjs';
1
+ export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ac as CustomField, ab as CustomFieldRender, j as Data, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, h as Field, 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, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ae as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.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';
@@ -1,4 +1,4 @@
1
- export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, 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, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.js';
1
+ export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ac as CustomField, ab as CustomFieldRender, j as Data, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, h as Field, 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, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ae as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.js';
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.js';
3
3
  import 'react';
4
4
  import 'react/jsx-runtime';
@@ -153,6 +153,42 @@ var require_classnames = __commonJS({
153
153
  }
154
154
  });
155
155
 
156
+ // ../../node_modules/fast-deep-equal/index.js
157
+ var require_fast_deep_equal = __commonJS({
158
+ "../../node_modules/fast-deep-equal/index.js"(exports2, module2) {
159
+ "use strict";
160
+ init_react_import();
161
+ module2.exports = function equal(a, b) {
162
+ if (a === b) return true;
163
+ if (a && b && typeof a == "object" && typeof b == "object") {
164
+ if (a.constructor !== b.constructor) return false;
165
+ var length, i, keys;
166
+ if (Array.isArray(a)) {
167
+ length = a.length;
168
+ if (length != b.length) return false;
169
+ for (i = length; i-- !== 0; )
170
+ if (!equal(a[i], b[i])) return false;
171
+ return true;
172
+ }
173
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
174
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
175
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
176
+ keys = Object.keys(a);
177
+ length = keys.length;
178
+ if (length !== Object.keys(b).length) return false;
179
+ for (i = length; i-- !== 0; )
180
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
181
+ for (i = length; i-- !== 0; ) {
182
+ var key = keys[i];
183
+ if (!equal(a[key], b[key])) return false;
184
+ }
185
+ return true;
186
+ }
187
+ return a !== a && b !== b;
188
+ };
189
+ }
190
+ });
191
+
156
192
  // bundle/no-external.ts
157
193
  var no_external_exports = {};
158
194
  __export(no_external_exports, {
@@ -1713,6 +1749,10 @@ var monitorHotkeys = (doc) => {
1713
1749
  useHotkeyStore.getState().reset();
1714
1750
  }
1715
1751
  };
1752
+ const onBlur = () => {
1753
+ useHotkeyStore.getState().reset();
1754
+ };
1755
+ window.addEventListener("blur", onBlur);
1716
1756
  doc.addEventListener("keydown", onKeyDown);
1717
1757
  doc.addEventListener("keyup", onKeyUp);
1718
1758
  doc.addEventListener("visibilitychange", onVisibilityChanged);
@@ -1720,6 +1760,7 @@ var monitorHotkeys = (doc) => {
1720
1760
  doc.removeEventListener("keydown", onKeyDown);
1721
1761
  doc.removeEventListener("keyup", onKeyUp);
1722
1762
  doc.removeEventListener("visibilitychange", onVisibilityChanged);
1763
+ window.removeEventListener("blur", onBlur);
1723
1764
  };
1724
1765
  };
1725
1766
  var useMonitorHotkeys = () => {
@@ -1922,13 +1963,13 @@ var flattenData = (state, config) => {
1922
1963
 
1923
1964
  // lib/get-changed.ts
1924
1965
  init_react_import();
1925
- var import_fast_deep_equal = __toESM(require("fast-deep-equal"));
1966
+ var import_fast_equals = require("fast-equals");
1926
1967
  var getChanged = (newItem, oldItem) => {
1927
1968
  return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
1928
1969
  const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
1929
1970
  const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
1930
1971
  return __spreadProps(__spreadValues({}, acc), {
1931
- [item]: !(0, import_fast_deep_equal.default)(oldItemProps[item], newItemProps[item])
1972
+ [item]: !(0, import_fast_equals.deepEqual)(oldItemProps[item], newItemProps[item])
1932
1973
  });
1933
1974
  }, {}) : {};
1934
1975
  };
@@ -2149,7 +2190,7 @@ var useRegisterFieldsSlice = (appStore, id) => {
2149
2190
 
2150
2191
  // lib/resolve-component-data.ts
2151
2192
  init_react_import();
2152
- var import_fast_deep_equal2 = __toESM(require("fast-deep-equal"));
2193
+ var import_fast_equals2 = require("fast-equals");
2153
2194
  var cache = { lastChange: {} };
2154
2195
  var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
2155
2196
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
@@ -2158,7 +2199,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
2158
2199
  const id = "id" in item.props ? item.props.id : "root";
2159
2200
  if (shouldRunResolver) {
2160
2201
  const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
2161
- if (trigger !== "force" && item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
2202
+ if (trigger !== "force" && item && (0, import_fast_equals2.deepEqual)(item, oldItem)) {
2162
2203
  return { node: resolved, didChange: false };
2163
2204
  }
2164
2205
  const changed = getChanged(item, oldItem);
@@ -2208,7 +2249,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
2208
2249
  };
2209
2250
  return {
2210
2251
  node: itemWithResolvedChildren,
2211
- didChange: !(0, import_fast_deep_equal2.default)(item, itemWithResolvedChildren)
2252
+ didChange: !(0, import_fast_equals2.deepEqual)(item, itemWithResolvedChildren)
2212
2253
  };
2213
2254
  });
2214
2255
 
@@ -3754,11 +3795,13 @@ var ExternalInput = ({
3754
3795
  id,
3755
3796
  readOnly
3756
3797
  }) => {
3798
+ var _a;
3757
3799
  const {
3758
3800
  mapProp = (val) => val,
3759
3801
  mapRow = (val) => val,
3760
3802
  filterFields
3761
3803
  } = field || {};
3804
+ const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
3762
3805
  const [data, setData] = (0, import_react17.useState)([]);
3763
3806
  const [isOpen, setOpen] = (0, import_react17.useState)(false);
3764
3807
  const [isLoading, setIsLoading] = (0, import_react17.useState)(true);
@@ -3784,11 +3827,18 @@ var ExternalInput = ({
3784
3827
  (query, filters2) => __async(void 0, null, function* () {
3785
3828
  setIsLoading(true);
3786
3829
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
3787
- const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
3830
+ let listData;
3831
+ if (shouldCacheData && dataCache[cacheKey]) {
3832
+ listData = dataCache[cacheKey];
3833
+ } else {
3834
+ listData = yield field.fetchList({ query, filters: filters2 });
3835
+ }
3788
3836
  if (listData) {
3789
3837
  setData(listData);
3790
3838
  setIsLoading(false);
3791
- dataCache[cacheKey] = listData;
3839
+ if (shouldCacheData) {
3840
+ dataCache[cacheKey] = listData;
3841
+ }
3792
3842
  }
3793
3843
  }),
3794
3844
  [id, field]
@@ -3852,6 +3902,7 @@ var ExternalInput = ({
3852
3902
  }),
3853
3903
  onSubmit: (e) => {
3854
3904
  e.preventDefault();
3905
+ e.stopPropagation();
3855
3906
  search(searchQuery, filters);
3856
3907
  },
3857
3908
  children: [
@@ -4755,12 +4806,14 @@ var DraggableComponent = ({
4755
4806
  }
4756
4807
  return cleanup;
4757
4808
  }, [permissions.drag, zoneCompound]);
4809
+ const [, setRerender] = (0, import_react24.useState)(0);
4758
4810
  const ref = (0, import_react24.useRef)(null);
4759
4811
  const refSetter = (0, import_react24.useCallback)(
4760
4812
  (el) => {
4761
4813
  sortableRef(el);
4762
- if (el) {
4814
+ if (ref.current !== el) {
4763
4815
  ref.current = el;
4816
+ setRerender((update) => update + 1);
4764
4817
  }
4765
4818
  },
4766
4819
  [sortableRef]
@@ -5535,26 +5588,26 @@ var registerOverlayPortal = (el, opts = {}) => {
5535
5588
  capture: true
5536
5589
  });
5537
5590
  };
5538
- if (disableDragOnFocus) {
5539
- el.addEventListener("focus", onFocus, { capture: true });
5540
- el.addEventListener("blur", onBlur, { capture: true });
5541
- } else if (disableDrag) {
5591
+ if (disableDrag) {
5542
5592
  el.addEventListener("pointerdown", stopPropagation, {
5543
5593
  capture: true
5544
5594
  });
5595
+ } else if (disableDragOnFocus) {
5596
+ el.addEventListener("focus", onFocus, { capture: true });
5597
+ el.addEventListener("blur", onBlur, { capture: true });
5545
5598
  }
5546
5599
  el.setAttribute("data-puck-overlay-portal", "true");
5547
5600
  return () => {
5548
5601
  el.removeEventListener("mouseover", stopPropagation, {
5549
5602
  capture: true
5550
5603
  });
5551
- if (disableDragOnFocus) {
5552
- el.removeEventListener("focus", onFocus, { capture: true });
5553
- el.removeEventListener("blur", onFocus, { capture: true });
5554
- } else if (disableDrag) {
5604
+ if (disableDrag) {
5555
5605
  el.removeEventListener("pointerdown", stopPropagation, {
5556
5606
  capture: true
5557
5607
  });
5608
+ } else if (disableDragOnFocus) {
5609
+ el.removeEventListener("focus", onFocus, { capture: true });
5610
+ el.removeEventListener("blur", onBlur, { capture: true });
5558
5611
  }
5559
5612
  el.removeAttribute("data-puck-overlay-portal");
5560
5613
  };
@@ -5562,7 +5615,7 @@ var registerOverlayPortal = (el, opts = {}) => {
5562
5615
 
5563
5616
  // css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css#css-module
5564
5617
  init_react_import();
5565
- var styles_module_default13 = { "InlineTextField": "_InlineTextField_1xph6_1" };
5618
+ var styles_module_default13 = { "InlineTextField": "_InlineTextField_104qp_1" };
5566
5619
 
5567
5620
  // lib/data/set-deep.ts
5568
5621
  init_react_import();
@@ -8739,7 +8792,7 @@ function useGetPuck() {
8739
8792
  }
8740
8793
 
8741
8794
  // components/Puck/index.tsx
8742
- var import_fast_deep_equal3 = __toESM(require("fast-deep-equal"));
8795
+ var import_fast_deep_equal = __toESM(require_fast_deep_equal());
8743
8796
 
8744
8797
  // components/Puck/components/Header/index.tsx
8745
8798
  init_react_import();
@@ -9167,6 +9220,15 @@ function useSidebarResize(position, dispatch) {
9167
9220
  };
9168
9221
  }
9169
9222
 
9223
+ // lib/data/to-component.ts
9224
+ init_react_import();
9225
+ var toComponent = (item) => {
9226
+ return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9227
+ props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9228
+ type: "root"
9229
+ });
9230
+ };
9231
+
9170
9232
  // components/Puck/index.tsx
9171
9233
  var import_jsx_runtime46 = require("react/jsx-runtime");
9172
9234
  var getClassName31 = get_class_name_factory_default("Puck", styles_module_default15);
@@ -9243,9 +9305,13 @@ function PuckProvider({ children }) {
9243
9305
  }
9244
9306
  const rootProps = ((_h = initialData == null ? void 0 : initialData.root) == null ? void 0 : _h.props) || (initialData == null ? void 0 : initialData.root) || {};
9245
9307
  const defaultedRootProps = __spreadValues(__spreadValues({}, (_i = config.root) == null ? void 0 : _i.defaultProps), rootProps);
9308
+ const root = populateIds(
9309
+ toComponent(__spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps })),
9310
+ config
9311
+ );
9246
9312
  const newAppState = __spreadProps(__spreadValues({}, defaultAppState), {
9247
9313
  data: __spreadProps(__spreadValues({}, initialData), {
9248
- root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps }),
9314
+ root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: root.props }),
9249
9315
  content: initialData.content || []
9250
9316
  }),
9251
9317
  ui: __spreadProps(__spreadValues(__spreadValues({}, initial), clientUiState), {
@@ -9345,7 +9411,7 @@ function PuckProvider({ children }) {
9345
9411
  (s) => s.state.data,
9346
9412
  (data) => {
9347
9413
  if (onChange) {
9348
- if ((0, import_fast_deep_equal3.default)(data, previousData.current)) return;
9414
+ if ((0, import_fast_deep_equal.default)(data, previousData.current)) return;
9349
9415
  onChange(data);
9350
9416
  previousData.current = data;
9351
9417
  }
@@ -9664,17 +9730,6 @@ function transformProps(data, propTransforms, config = { components: {} }) {
9664
9730
 
9665
9731
  // lib/resolve-all-data.ts
9666
9732
  init_react_import();
9667
-
9668
- // lib/data/to-component.ts
9669
- init_react_import();
9670
- var toComponent = (item) => {
9671
- return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9672
- props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9673
- type: "root"
9674
- });
9675
- };
9676
-
9677
- // lib/resolve-all-data.ts
9678
9733
  function resolveAllData(_0, _1) {
9679
9734
  return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
9680
9735
  var _a;
@@ -18,14 +18,14 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-MYJB3LKU.mjs";
21
+ } from "./chunk-EXX4ZSCK.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
25
25
  resolveAllData,
26
26
  transformProps,
27
27
  walkTree
28
- } from "./chunk-OOLYDXKW.mjs";
28
+ } from "./chunk-VBJEDLUM.mjs";
29
29
 
30
30
  // bundle/no-external.ts
31
31
  init_react_import();
package/dist/rsc.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Ctf3FZQI.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.mjs';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-DkTSFbz_.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.mjs';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
package/dist/rsc.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Ctf3FZQI.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.js';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-DkTSFbz_.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.js';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
package/dist/rsc.js CHANGED
@@ -460,19 +460,19 @@ function Render({
460
460
  }
461
461
 
462
462
  // lib/get-changed.ts
463
- var import_fast_deep_equal = __toESM(require("fast-deep-equal"));
463
+ var import_fast_equals = require("fast-equals");
464
464
  var getChanged = (newItem, oldItem) => {
465
465
  return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
466
466
  const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
467
467
  const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
468
468
  return __spreadProps(__spreadValues({}, acc), {
469
- [item]: !(0, import_fast_deep_equal.default)(oldItemProps[item], newItemProps[item])
469
+ [item]: !(0, import_fast_equals.deepEqual)(oldItemProps[item], newItemProps[item])
470
470
  });
471
471
  }, {}) : {};
472
472
  };
473
473
 
474
474
  // lib/resolve-component-data.ts
475
- var import_fast_deep_equal2 = __toESM(require("fast-deep-equal"));
475
+ var import_fast_equals2 = require("fast-equals");
476
476
  var cache = { lastChange: {} };
477
477
  var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
478
478
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
@@ -481,7 +481,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
481
481
  const id = "id" in item.props ? item.props.id : "root";
482
482
  if (shouldRunResolver) {
483
483
  const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
484
- if (trigger !== "force" && item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
484
+ if (trigger !== "force" && item && (0, import_fast_equals2.deepEqual)(item, oldItem)) {
485
485
  return { node: resolved, didChange: false };
486
486
  }
487
487
  const changed = getChanged(item, oldItem);
@@ -531,7 +531,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
531
531
  };
532
532
  return {
533
533
  node: itemWithResolvedChildren,
534
- didChange: !(0, import_fast_deep_equal2.default)(item, itemWithResolvedChildren)
534
+ didChange: !(0, import_fast_equals2.deepEqual)(item, itemWithResolvedChildren)
535
535
  };
536
536
  });
537
537
 
package/dist/rsc.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  transformProps,
13
13
  useSlots,
14
14
  walkTree
15
- } from "./chunk-OOLYDXKW.mjs";
15
+ } from "./chunk-VBJEDLUM.mjs";
16
16
 
17
17
  // bundle/rsc.tsx
18
18
  init_react_import();
@@ -82,10 +82,14 @@ type ExternalFieldWithAdaptor<Props extends any = {
82
82
  adaptorParams?: object;
83
83
  getItemSummary: (item: NotUndefined<Props>, index?: number) => string;
84
84
  };
85
+ type CacheOpts = {
86
+ enabled?: boolean;
87
+ };
85
88
  type ExternalField<Props extends any = {
86
89
  [key: string]: any;
87
90
  }> = BaseField & {
88
91
  type: "external";
92
+ cache?: CacheOpts;
89
93
  placeholder?: string;
90
94
  fetchList: (params: {
91
95
  query: string;
@@ -631,4 +635,4 @@ type WalkTreeOptions = {
631
635
  };
632
636
  declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
633
637
 
634
- export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type ExternalField as a9, type CustomFieldRender as aa, type CustomField as ab, type SlotField as ac, type PuckContext as ad, type DefaultRootFieldProps as ae, type DefaultRootRenderProps as af, type DefaultRootProps as ag, type DefaultComponentProps as ah, type WithId as ai, type WithPuckProps as aj, type AsFieldProps as ak, type WithChildren as al, type ExtractField as am, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
638
+ export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type CacheOpts as a9, type ExternalField as aa, type CustomFieldRender as ab, type CustomField as ac, type SlotField as ad, type PuckContext as ae, type DefaultRootFieldProps as af, type DefaultRootRenderProps as ag, type DefaultRootProps as ah, type DefaultComponentProps as ai, type WithId as aj, type WithPuckProps as ak, type AsFieldProps as al, type WithChildren as am, type ExtractField as an, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
@@ -82,10 +82,14 @@ type ExternalFieldWithAdaptor<Props extends any = {
82
82
  adaptorParams?: object;
83
83
  getItemSummary: (item: NotUndefined<Props>, index?: number) => string;
84
84
  };
85
+ type CacheOpts = {
86
+ enabled?: boolean;
87
+ };
85
88
  type ExternalField<Props extends any = {
86
89
  [key: string]: any;
87
90
  }> = BaseField & {
88
91
  type: "external";
92
+ cache?: CacheOpts;
89
93
  placeholder?: string;
90
94
  fetchList: (params: {
91
95
  query: string;
@@ -631,4 +635,4 @@ type WalkTreeOptions = {
631
635
  };
632
636
  declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
633
637
 
634
- export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type ExternalField as a9, type CustomFieldRender as aa, type CustomField as ab, type SlotField as ac, type PuckContext as ad, type DefaultRootFieldProps as ae, type DefaultRootRenderProps as af, type DefaultRootProps as ag, type DefaultComponentProps as ah, type WithId as ai, type WithPuckProps as aj, type AsFieldProps as ak, type WithChildren as al, type ExtractField as am, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
638
+ export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type CacheOpts as a9, type ExternalField as aa, type CustomFieldRender as ab, type CustomField as ac, type SlotField as ad, type PuckContext as ae, type DefaultRootFieldProps as af, type DefaultRootRenderProps as ag, type DefaultRootProps as ah, type DefaultComponentProps as ai, type WithId as aj, type WithPuckProps as ak, type AsFieldProps as al, type WithChildren as am, type ExtractField as an, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.21.0-canary.cf074bc6",
3
+ "version": "0.21.0-canary.e310a175",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "measuredco/puck",
@@ -96,7 +96,7 @@
96
96
  "@dnd-kit/helpers": "0.1.18",
97
97
  "@dnd-kit/react": "0.1.18",
98
98
  "deep-diff": "^1.0.2",
99
- "fast-deep-equal": "^3.1.3",
99
+ "fast-equals": "5.2.2",
100
100
  "flat": "^5.0.2",
101
101
  "object-hash": "^3.0.0",
102
102
  "react-hotkeys-hook": "^4.6.1",