@measured/puck 0.21.0-canary.1df9ddeb → 0.21.0-canary.29ef7131

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.
@@ -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
@@ -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-X7YZ3YE7.mjs";
28
+ } from "./chunk-VBJEDLUM.mjs";
28
29
 
29
30
  // ../../node_modules/classnames/index.js
30
31
  var require_classnames = __commonJS({
@@ -2985,8 +2986,9 @@ var ArrayField = ({
2985
2986
  var _a;
2986
2987
  if (isDraggingAny) return;
2987
2988
  const existingValue = value || [];
2989
+ const defaultProps = typeof field.defaultItemProps === "function" ? field.defaultItemProps(existingValue.length) : (_a = field.defaultItemProps) != null ? _a : {};
2988
2990
  const newItem = defaultSlots(
2989
- uniqifyItem((_a = field.defaultItemProps) != null ? _a : {}),
2991
+ uniqifyItem(defaultProps),
2990
2992
  field.arrayFields
2991
2993
  );
2992
2994
  const newValue = [...existingValue, newItem];
@@ -3161,11 +3163,13 @@ var ExternalInput = ({
3161
3163
  id,
3162
3164
  readOnly
3163
3165
  }) => {
3166
+ var _a;
3164
3167
  const {
3165
3168
  mapProp = (val) => val,
3166
3169
  mapRow = (val) => val,
3167
3170
  filterFields
3168
3171
  } = field || {};
3172
+ const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
3169
3173
  const [data, setData] = useState6([]);
3170
3174
  const [isOpen, setOpen] = useState6(false);
3171
3175
  const [isLoading, setIsLoading] = useState6(true);
@@ -3191,11 +3195,18 @@ var ExternalInput = ({
3191
3195
  (query, filters2) => __async(void 0, null, function* () {
3192
3196
  setIsLoading(true);
3193
3197
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
3194
- const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
3198
+ let listData;
3199
+ if (shouldCacheData && dataCache[cacheKey]) {
3200
+ listData = dataCache[cacheKey];
3201
+ } else {
3202
+ listData = yield field.fetchList({ query, filters: filters2 });
3203
+ }
3195
3204
  if (listData) {
3196
3205
  setData(listData);
3197
3206
  setIsLoading(false);
3198
- dataCache[cacheKey] = listData;
3207
+ if (shouldCacheData) {
3208
+ dataCache[cacheKey] = listData;
3209
+ }
3199
3210
  }
3200
3211
  }),
3201
3212
  [id, field]
@@ -3259,6 +3270,7 @@ var ExternalInput = ({
3259
3270
  }),
3260
3271
  onSubmit: (e) => {
3261
3272
  e.preventDefault();
3273
+ e.stopPropagation();
3262
3274
  search(searchQuery, filters);
3263
3275
  },
3264
3276
  children: [
@@ -4169,12 +4181,14 @@ var DraggableComponent = ({
4169
4181
  }
4170
4182
  return cleanup;
4171
4183
  }, [permissions.drag, zoneCompound]);
4184
+ const [, setRerender] = useState10(0);
4172
4185
  const ref = useRef2(null);
4173
4186
  const refSetter = useCallback7(
4174
4187
  (el) => {
4175
4188
  sortableRef(el);
4176
- if (el) {
4189
+ if (ref.current !== el) {
4177
4190
  ref.current = el;
4191
+ setRerender((update) => update + 1);
4178
4192
  }
4179
4193
  },
4180
4194
  [sortableRef]
@@ -8592,9 +8606,13 @@ function PuckProvider({ children }) {
8592
8606
  }
8593
8607
  const rootProps = ((_h = initialData == null ? void 0 : initialData.root) == null ? void 0 : _h.props) || (initialData == null ? void 0 : initialData.root) || {};
8594
8608
  const defaultedRootProps = __spreadValues(__spreadValues({}, (_i = config.root) == null ? void 0 : _i.defaultProps), rootProps);
8609
+ const root = populateIds(
8610
+ toComponent(__spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps })),
8611
+ config
8612
+ );
8595
8613
  const newAppState = __spreadProps(__spreadValues({}, defaultAppState), {
8596
8614
  data: __spreadProps(__spreadValues({}, initialData), {
8597
- root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps }),
8615
+ root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: root.props }),
8598
8616
  content: initialData.content || []
8599
8617
  }),
8600
8618
  ui: __spreadProps(__spreadValues(__spreadValues({}, initial), clientUiState), {
@@ -8690,7 +8708,7 @@ function PuckProvider({ children }) {
8690
8708
  });
8691
8709
  const previousData = useRef12(null);
8692
8710
  useEffect29(() => {
8693
- appStore.subscribe(
8711
+ return appStore.subscribe(
8694
8712
  (s) => s.state.data,
8695
8713
  (data) => {
8696
8714
  if (onChange) {
@@ -8700,7 +8718,7 @@ function PuckProvider({ children }) {
8700
8718
  }
8701
8719
  }
8702
8720
  );
8703
- }, []);
8721
+ }, [onChange]);
8704
8722
  useRegisterPermissionsSlice(appStore, permissions);
8705
8723
  const uPuckStore = useRegisterUsePuckStore(appStore);
8706
8724
  useEffect29(() => {
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-7SvCIsj8.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-7SvCIsj8.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-7SvCIsj8.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-7SvCIsj8.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
@@ -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((_a = field.defaultItemProps) != null ? _a : {}),
3540
+ uniqifyItem(defaultProps),
3540
3541
  field.arrayFields
3541
3542
  );
3542
3543
  const newValue = [...existingValue, newItem];
@@ -3795,11 +3796,13 @@ var ExternalInput = ({
3795
3796
  id,
3796
3797
  readOnly
3797
3798
  }) => {
3799
+ var _a;
3798
3800
  const {
3799
3801
  mapProp = (val) => val,
3800
3802
  mapRow = (val) => val,
3801
3803
  filterFields
3802
3804
  } = field || {};
3805
+ const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
3803
3806
  const [data, setData] = (0, import_react17.useState)([]);
3804
3807
  const [isOpen, setOpen] = (0, import_react17.useState)(false);
3805
3808
  const [isLoading, setIsLoading] = (0, import_react17.useState)(true);
@@ -3825,11 +3828,18 @@ var ExternalInput = ({
3825
3828
  (query, filters2) => __async(void 0, null, function* () {
3826
3829
  setIsLoading(true);
3827
3830
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
3828
- const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
3831
+ let listData;
3832
+ if (shouldCacheData && dataCache[cacheKey]) {
3833
+ listData = dataCache[cacheKey];
3834
+ } else {
3835
+ listData = yield field.fetchList({ query, filters: filters2 });
3836
+ }
3829
3837
  if (listData) {
3830
3838
  setData(listData);
3831
3839
  setIsLoading(false);
3832
- dataCache[cacheKey] = listData;
3840
+ if (shouldCacheData) {
3841
+ dataCache[cacheKey] = listData;
3842
+ }
3833
3843
  }
3834
3844
  }),
3835
3845
  [id, field]
@@ -3893,6 +3903,7 @@ var ExternalInput = ({
3893
3903
  }),
3894
3904
  onSubmit: (e) => {
3895
3905
  e.preventDefault();
3906
+ e.stopPropagation();
3896
3907
  search(searchQuery, filters);
3897
3908
  },
3898
3909
  children: [
@@ -4796,12 +4807,14 @@ var DraggableComponent = ({
4796
4807
  }
4797
4808
  return cleanup;
4798
4809
  }, [permissions.drag, zoneCompound]);
4810
+ const [, setRerender] = (0, import_react24.useState)(0);
4799
4811
  const ref = (0, import_react24.useRef)(null);
4800
4812
  const refSetter = (0, import_react24.useCallback)(
4801
4813
  (el) => {
4802
4814
  sortableRef(el);
4803
- if (el) {
4815
+ if (ref.current !== el) {
4804
4816
  ref.current = el;
4817
+ setRerender((update) => update + 1);
4805
4818
  }
4806
4819
  },
4807
4820
  [sortableRef]
@@ -9208,6 +9221,15 @@ function useSidebarResize(position, dispatch) {
9208
9221
  };
9209
9222
  }
9210
9223
 
9224
+ // lib/data/to-component.ts
9225
+ init_react_import();
9226
+ var toComponent = (item) => {
9227
+ return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9228
+ props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9229
+ type: "root"
9230
+ });
9231
+ };
9232
+
9211
9233
  // components/Puck/index.tsx
9212
9234
  var import_jsx_runtime46 = require("react/jsx-runtime");
9213
9235
  var getClassName31 = get_class_name_factory_default("Puck", styles_module_default15);
@@ -9284,9 +9306,13 @@ function PuckProvider({ children }) {
9284
9306
  }
9285
9307
  const rootProps = ((_h = initialData == null ? void 0 : initialData.root) == null ? void 0 : _h.props) || (initialData == null ? void 0 : initialData.root) || {};
9286
9308
  const defaultedRootProps = __spreadValues(__spreadValues({}, (_i = config.root) == null ? void 0 : _i.defaultProps), rootProps);
9309
+ const root = populateIds(
9310
+ toComponent(__spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps })),
9311
+ config
9312
+ );
9287
9313
  const newAppState = __spreadProps(__spreadValues({}, defaultAppState), {
9288
9314
  data: __spreadProps(__spreadValues({}, initialData), {
9289
- root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps }),
9315
+ root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: root.props }),
9290
9316
  content: initialData.content || []
9291
9317
  }),
9292
9318
  ui: __spreadProps(__spreadValues(__spreadValues({}, initial), clientUiState), {
@@ -9382,7 +9408,7 @@ function PuckProvider({ children }) {
9382
9408
  });
9383
9409
  const previousData = (0, import_react60.useRef)(null);
9384
9410
  (0, import_react60.useEffect)(() => {
9385
- appStore.subscribe(
9411
+ return appStore.subscribe(
9386
9412
  (s) => s.state.data,
9387
9413
  (data) => {
9388
9414
  if (onChange) {
@@ -9392,7 +9418,7 @@ function PuckProvider({ children }) {
9392
9418
  }
9393
9419
  }
9394
9420
  );
9395
- }, []);
9421
+ }, [onChange]);
9396
9422
  useRegisterPermissionsSlice(appStore, permissions);
9397
9423
  const uPuckStore = useRegisterUsePuckStore(appStore);
9398
9424
  (0, import_react60.useEffect)(() => {
@@ -9705,17 +9731,6 @@ function transformProps(data, propTransforms, config = { components: {} }) {
9705
9731
 
9706
9732
  // lib/resolve-all-data.ts
9707
9733
  init_react_import();
9708
-
9709
- // lib/data/to-component.ts
9710
- init_react_import();
9711
- var toComponent = (item) => {
9712
- return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9713
- props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9714
- type: "root"
9715
- });
9716
- };
9717
-
9718
- // lib/resolve-all-data.ts
9719
9734
  function resolveAllData(_0, _1) {
9720
9735
  return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
9721
9736
  var _a;
package/dist/index.mjs CHANGED
@@ -18,14 +18,14 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-KHAM6QNU.mjs";
21
+ } from "./chunk-YRZRLNQC.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
25
25
  resolveAllData,
26
26
  transformProps,
27
27
  walkTree
28
- } from "./chunk-X7YZ3YE7.mjs";
28
+ } from "./chunk-VBJEDLUM.mjs";
29
29
 
30
30
  // bundle/index.ts
31
31
  init_react_import();
@@ -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-7SvCIsj8.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-7SvCIsj8.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';
@@ -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((_a = field.defaultItemProps) != null ? _a : {}),
3540
+ uniqifyItem(defaultProps),
3540
3541
  field.arrayFields
3541
3542
  );
3542
3543
  const newValue = [...existingValue, newItem];
@@ -3795,11 +3796,13 @@ var ExternalInput = ({
3795
3796
  id,
3796
3797
  readOnly
3797
3798
  }) => {
3799
+ var _a;
3798
3800
  const {
3799
3801
  mapProp = (val) => val,
3800
3802
  mapRow = (val) => val,
3801
3803
  filterFields
3802
3804
  } = field || {};
3805
+ const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
3803
3806
  const [data, setData] = (0, import_react17.useState)([]);
3804
3807
  const [isOpen, setOpen] = (0, import_react17.useState)(false);
3805
3808
  const [isLoading, setIsLoading] = (0, import_react17.useState)(true);
@@ -3825,11 +3828,18 @@ var ExternalInput = ({
3825
3828
  (query, filters2) => __async(void 0, null, function* () {
3826
3829
  setIsLoading(true);
3827
3830
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
3828
- const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
3831
+ let listData;
3832
+ if (shouldCacheData && dataCache[cacheKey]) {
3833
+ listData = dataCache[cacheKey];
3834
+ } else {
3835
+ listData = yield field.fetchList({ query, filters: filters2 });
3836
+ }
3829
3837
  if (listData) {
3830
3838
  setData(listData);
3831
3839
  setIsLoading(false);
3832
- dataCache[cacheKey] = listData;
3840
+ if (shouldCacheData) {
3841
+ dataCache[cacheKey] = listData;
3842
+ }
3833
3843
  }
3834
3844
  }),
3835
3845
  [id, field]
@@ -3893,6 +3903,7 @@ var ExternalInput = ({
3893
3903
  }),
3894
3904
  onSubmit: (e) => {
3895
3905
  e.preventDefault();
3906
+ e.stopPropagation();
3896
3907
  search(searchQuery, filters);
3897
3908
  },
3898
3909
  children: [
@@ -4796,12 +4807,14 @@ var DraggableComponent = ({
4796
4807
  }
4797
4808
  return cleanup;
4798
4809
  }, [permissions.drag, zoneCompound]);
4810
+ const [, setRerender] = (0, import_react24.useState)(0);
4799
4811
  const ref = (0, import_react24.useRef)(null);
4800
4812
  const refSetter = (0, import_react24.useCallback)(
4801
4813
  (el) => {
4802
4814
  sortableRef(el);
4803
- if (el) {
4815
+ if (ref.current !== el) {
4804
4816
  ref.current = el;
4817
+ setRerender((update) => update + 1);
4805
4818
  }
4806
4819
  },
4807
4820
  [sortableRef]
@@ -9208,6 +9221,15 @@ function useSidebarResize(position, dispatch) {
9208
9221
  };
9209
9222
  }
9210
9223
 
9224
+ // lib/data/to-component.ts
9225
+ init_react_import();
9226
+ var toComponent = (item) => {
9227
+ return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9228
+ props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9229
+ type: "root"
9230
+ });
9231
+ };
9232
+
9211
9233
  // components/Puck/index.tsx
9212
9234
  var import_jsx_runtime46 = require("react/jsx-runtime");
9213
9235
  var getClassName31 = get_class_name_factory_default("Puck", styles_module_default15);
@@ -9284,9 +9306,13 @@ function PuckProvider({ children }) {
9284
9306
  }
9285
9307
  const rootProps = ((_h = initialData == null ? void 0 : initialData.root) == null ? void 0 : _h.props) || (initialData == null ? void 0 : initialData.root) || {};
9286
9308
  const defaultedRootProps = __spreadValues(__spreadValues({}, (_i = config.root) == null ? void 0 : _i.defaultProps), rootProps);
9309
+ const root = populateIds(
9310
+ toComponent(__spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps })),
9311
+ config
9312
+ );
9287
9313
  const newAppState = __spreadProps(__spreadValues({}, defaultAppState), {
9288
9314
  data: __spreadProps(__spreadValues({}, initialData), {
9289
- root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: defaultedRootProps }),
9315
+ root: __spreadProps(__spreadValues({}, initialData == null ? void 0 : initialData.root), { props: root.props }),
9290
9316
  content: initialData.content || []
9291
9317
  }),
9292
9318
  ui: __spreadProps(__spreadValues(__spreadValues({}, initial), clientUiState), {
@@ -9382,7 +9408,7 @@ function PuckProvider({ children }) {
9382
9408
  });
9383
9409
  const previousData = (0, import_react60.useRef)(null);
9384
9410
  (0, import_react60.useEffect)(() => {
9385
- appStore.subscribe(
9411
+ return appStore.subscribe(
9386
9412
  (s) => s.state.data,
9387
9413
  (data) => {
9388
9414
  if (onChange) {
@@ -9392,7 +9418,7 @@ function PuckProvider({ children }) {
9392
9418
  }
9393
9419
  }
9394
9420
  );
9395
- }, []);
9421
+ }, [onChange]);
9396
9422
  useRegisterPermissionsSlice(appStore, permissions);
9397
9423
  const uPuckStore = useRegisterUsePuckStore(appStore);
9398
9424
  (0, import_react60.useEffect)(() => {
@@ -9705,17 +9731,6 @@ function transformProps(data, propTransforms, config = { components: {} }) {
9705
9731
 
9706
9732
  // lib/resolve-all-data.ts
9707
9733
  init_react_import();
9708
-
9709
- // lib/data/to-component.ts
9710
- init_react_import();
9711
- var toComponent = (item) => {
9712
- return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
9713
- props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
9714
- type: "root"
9715
- });
9716
- };
9717
-
9718
- // lib/resolve-all-data.ts
9719
9734
  function resolveAllData(_0, _1) {
9720
9735
  return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
9721
9736
  var _a;
@@ -18,14 +18,14 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-KHAM6QNU.mjs";
21
+ } from "./chunk-YRZRLNQC.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
25
25
  resolveAllData,
26
26
  transformProps,
27
27
  walkTree
28
- } from "./chunk-X7YZ3YE7.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-7SvCIsj8.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-7SvCIsj8.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-7SvCIsj8.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-7SvCIsj8.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.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  transformProps,
13
13
  useSlots,
14
14
  walkTree
15
- } from "./chunk-X7YZ3YE7.mjs";
15
+ } from "./chunk-VBJEDLUM.mjs";
16
16
 
17
17
  // bundle/rsc.tsx
18
18
  init_react_import();
@@ -52,7 +52,7 @@ type ArrayField<Props extends {
52
52
  type: PropertyKey;
53
53
  } ? Field<Props[0][SubPropName], UserField> | UserField : Field<Props[0][SubPropName], UserField>;
54
54
  };
55
- defaultItemProps?: Props[0];
55
+ defaultItemProps?: Props[0] | ((index: number) => Props[0]);
56
56
  getItemSummary?: (item: Props[0], index?: number) => string;
57
57
  max?: number;
58
58
  min?: number;
@@ -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;
@@ -147,7 +151,7 @@ type DropZoneProps = {
147
151
  };
148
152
 
149
153
  type PuckContext = {
150
- renderDropZone: React.FC<DropZoneProps>;
154
+ renderDropZone: (props: DropZoneProps) => React.ReactNode;
151
155
  metadata: Metadata;
152
156
  isEditing: boolean;
153
157
  dragRef: ((element: Element | null) => void) | null;
@@ -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 };
@@ -52,7 +52,7 @@ type ArrayField<Props extends {
52
52
  type: PropertyKey;
53
53
  } ? Field<Props[0][SubPropName], UserField> | UserField : Field<Props[0][SubPropName], UserField>;
54
54
  };
55
- defaultItemProps?: Props[0];
55
+ defaultItemProps?: Props[0] | ((index: number) => Props[0]);
56
56
  getItemSummary?: (item: Props[0], index?: number) => string;
57
57
  max?: number;
58
58
  min?: number;
@@ -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;
@@ -147,7 +151,7 @@ type DropZoneProps = {
147
151
  };
148
152
 
149
153
  type PuckContext = {
150
- renderDropZone: React.FC<DropZoneProps>;
154
+ renderDropZone: (props: DropZoneProps) => React.ReactNode;
151
155
  metadata: Metadata;
152
156
  isEditing: boolean;
153
157
  dragRef: ((element: Element | null) => void) | null;
@@ -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.1df9ddeb",
3
+ "version": "0.21.0-canary.29ef7131",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "measuredco/puck",