@measured/puck 0.18.3-canary.9e8e47b → 0.19.0-canary.0a3e56e

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.
@@ -25,14 +25,18 @@ type BaseField = {
25
25
  };
26
26
  type TextField = BaseField & {
27
27
  type: "text";
28
+ placeholder?: string;
28
29
  };
29
30
  type NumberField = BaseField & {
30
31
  type: "number";
32
+ placeholder?: string;
31
33
  min?: number;
32
34
  max?: number;
35
+ step?: number;
33
36
  };
34
37
  type TextareaField = BaseField & {
35
38
  type: "textarea";
39
+ placeholder?: string;
36
40
  };
37
41
  type SelectField = BaseField & {
38
42
  type: "select";
@@ -154,6 +158,7 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
154
158
  resolveData?: (data: DataShape, params: {
155
159
  changed: Partial<Record<keyof FieldProps, boolean>>;
156
160
  lastData: DataShape | null;
161
+ metadata: Metadata;
157
162
  }) => Promise<{
158
163
  props?: Partial<FieldProps>;
159
164
  readOnly?: Partial<Record<keyof FieldProps, boolean>>;
@@ -209,6 +214,7 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
209
214
 
210
215
  type PuckContext = {
211
216
  renderDropZone: React.FC<DropZoneProps>;
217
+ metadata: Metadata;
212
218
  isEditing: boolean;
213
219
  dragRef: ((element: Element | null) => void) | null;
214
220
  };
@@ -251,6 +257,9 @@ type Data<Props extends DefaultComponentProps = DefaultComponentProps, RootProps
251
257
  content: Content<Props>;
252
258
  zones?: Record<string, Content<Props>>;
253
259
  };
260
+ type Metadata = {
261
+ [key: string]: any;
262
+ };
254
263
 
255
264
  type ItemWithId = {
256
265
  _arrayId: string;
@@ -457,6 +466,6 @@ type PuckAction = {
457
466
  recordHistory?: boolean;
458
467
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
459
468
 
460
- declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
469
+ declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, metadata?: Metadata, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
461
470
 
462
- export { type DefaultRootRenderProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type ExtractPropsFromConfig as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type MappedItem as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type Fields as Z, type PuckContext as _, type Field as a, type DefaultRootProps as a0, type WithId as a1, type WithPuckProps as a2, type AsFieldProps as a3, type WithChildren as a4, resolveAllData as a5, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ExtractRootPropsFromConfig as j, type ComponentDataMap as k, type Direction as l, type DragAxis as m, type Viewport as n, overrideKeys as o, type OverrideKey as p, type FieldRenderFunctions as q, type ItemWithId as r, type ArrayState as s, type PuckComponent as t, type ComponentConfig as u, type RootDataWithoutProps as v, type RootData as w, type ComponentData as x, type Content as y, type BaseField as z };
471
+ export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type BaseField as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type Metadata as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, type ExtractPropsFromConfig as a4, type ExtractRootPropsFromConfig as a5, resolveAllData as a6, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ComponentData as j, type Fields as k, type ComponentConfig as l, type Direction as m, type DragAxis as n, type Viewport as o, overrideKeys as p, type OverrideKey as q, type FieldRenderFunctions as r, type ItemWithId as s, type ArrayState as t, type PuckComponent as u, type RootDataWithoutProps as v, type RootData as w, type MappedItem as x, type ComponentDataMap as y, type Content as z };
@@ -25,14 +25,18 @@ type BaseField = {
25
25
  };
26
26
  type TextField = BaseField & {
27
27
  type: "text";
28
+ placeholder?: string;
28
29
  };
29
30
  type NumberField = BaseField & {
30
31
  type: "number";
32
+ placeholder?: string;
31
33
  min?: number;
32
34
  max?: number;
35
+ step?: number;
33
36
  };
34
37
  type TextareaField = BaseField & {
35
38
  type: "textarea";
39
+ placeholder?: string;
36
40
  };
37
41
  type SelectField = BaseField & {
38
42
  type: "select";
@@ -154,6 +158,7 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
154
158
  resolveData?: (data: DataShape, params: {
155
159
  changed: Partial<Record<keyof FieldProps, boolean>>;
156
160
  lastData: DataShape | null;
161
+ metadata: Metadata;
157
162
  }) => Promise<{
158
163
  props?: Partial<FieldProps>;
159
164
  readOnly?: Partial<Record<keyof FieldProps, boolean>>;
@@ -209,6 +214,7 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
209
214
 
210
215
  type PuckContext = {
211
216
  renderDropZone: React.FC<DropZoneProps>;
217
+ metadata: Metadata;
212
218
  isEditing: boolean;
213
219
  dragRef: ((element: Element | null) => void) | null;
214
220
  };
@@ -251,6 +257,9 @@ type Data<Props extends DefaultComponentProps = DefaultComponentProps, RootProps
251
257
  content: Content<Props>;
252
258
  zones?: Record<string, Content<Props>>;
253
259
  };
260
+ type Metadata = {
261
+ [key: string]: any;
262
+ };
254
263
 
255
264
  type ItemWithId = {
256
265
  _arrayId: string;
@@ -457,6 +466,6 @@ type PuckAction = {
457
466
  recordHistory?: boolean;
458
467
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
459
468
 
460
- declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
469
+ declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, metadata?: Metadata, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
461
470
 
462
- export { type DefaultRootRenderProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type ExtractPropsFromConfig as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type MappedItem as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type Fields as Z, type PuckContext as _, type Field as a, type DefaultRootProps as a0, type WithId as a1, type WithPuckProps as a2, type AsFieldProps as a3, type WithChildren as a4, resolveAllData as a5, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ExtractRootPropsFromConfig as j, type ComponentDataMap as k, type Direction as l, type DragAxis as m, type Viewport as n, overrideKeys as o, type OverrideKey as p, type FieldRenderFunctions as q, type ItemWithId as r, type ArrayState as s, type PuckComponent as t, type ComponentConfig as u, type RootDataWithoutProps as v, type RootData as w, type ComponentData as x, type Content as y, type BaseField as z };
471
+ export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type BaseField as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type Metadata as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, type ExtractPropsFromConfig as a4, type ExtractRootPropsFromConfig as a5, resolveAllData as a6, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ComponentData as j, type Fields as k, type ComponentConfig as l, type Direction as m, type DragAxis as n, type Viewport as o, overrideKeys as p, type OverrideKey as q, type FieldRenderFunctions as r, type ItemWithId as s, type ArrayState as t, type PuckComponent as u, type RootDataWithoutProps as v, type RootData as w, type MappedItem as x, type ComponentDataMap as y, type Content as z };
package/dist/rsc.d.mts CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics } from './resolve-all-data-ppm982Jh.mjs';
3
- export { a5 as resolveAllData } from './resolve-all-data-ppm982Jh.mjs';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-wwgDuTnC.mjs';
3
+ export { a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.mjs';
4
4
  import 'react';
5
5
 
6
- declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
6
+ declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
7
7
  config: UserConfig;
8
8
  data: G["UserData"];
9
+ metadata?: Metadata;
9
10
  }): react_jsx_runtime.JSX.Element;
10
11
 
11
12
  export { Render };
package/dist/rsc.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics } from './resolve-all-data-ppm982Jh.js';
3
- export { a5 as resolveAllData } from './resolve-all-data-ppm982Jh.js';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-wwgDuTnC.js';
3
+ export { a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.js';
4
4
  import 'react';
5
5
 
6
- declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
6
+ declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
7
7
  config: UserConfig;
8
8
  data: G["UserData"];
9
+ metadata?: Metadata;
9
10
  }): react_jsx_runtime.JSX.Element;
10
11
 
11
12
  export { Render };
package/dist/rsc.js CHANGED
@@ -76,7 +76,9 @@ module.exports = __toCommonJS(rsc_exports);
76
76
  var import_react = __toESM(require("react"));
77
77
 
78
78
  // lib/root-droppable-id.ts
79
- var rootDroppableId = "default-zone";
79
+ var rootAreaId = "root";
80
+ var rootZone = "default-zone";
81
+ var rootDroppableId = `${rootAreaId}:${rootZone}`;
80
82
 
81
83
  // lib/setup-zone.ts
82
84
  var setupZone = (data, zoneKey) => {
@@ -96,14 +98,15 @@ function DropZoneRender({
96
98
  zone,
97
99
  data,
98
100
  areaId = "root",
99
- config
101
+ config,
102
+ metadata = {}
100
103
  }) {
101
104
  let zoneCompound = rootDroppableId;
102
105
  let content = (data == null ? void 0 : data.content) || [];
103
106
  if (!data || !config) {
104
107
  return null;
105
108
  }
106
- if (areaId && zone && zone !== rootDroppableId) {
109
+ if (areaId !== rootAreaId && zone !== rootZone) {
107
110
  zoneCompound = `${areaId}:${zone}`;
108
111
  content = setupZone(data, zoneCompound).zones[zoneCompound];
109
112
  }
@@ -120,9 +123,11 @@ function DropZoneRender({
120
123
  zone: zone2,
121
124
  data,
122
125
  areaId: item.props.id,
123
- config
126
+ config,
127
+ metadata
124
128
  }
125
- )
129
+ ),
130
+ metadata
126
131
  }
127
132
  }),
128
133
  item.props.id
@@ -131,7 +136,11 @@ function DropZoneRender({
131
136
  return null;
132
137
  }) });
133
138
  }
134
- function Render({ config, data }) {
139
+ function Render({
140
+ config,
141
+ data,
142
+ metadata
143
+ }) {
135
144
  var _a;
136
145
  if ((_a = config.root) == null ? void 0 : _a.render) {
137
146
  const rootProps = data.root.props || data.root;
@@ -140,18 +149,42 @@ function Render({ config, data }) {
140
149
  config.root.render,
141
150
  __spreadProps(__spreadValues({}, rootProps), {
142
151
  puck: {
143
- renderDropZone: ({ zone }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropZoneRender, { zone, data, config }),
152
+ renderDropZone: ({ zone }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
153
+ DropZoneRender,
154
+ {
155
+ zone,
156
+ data,
157
+ config,
158
+ metadata
159
+ }
160
+ ),
144
161
  isEditing: false,
145
162
  dragRef: null
146
163
  },
147
164
  title,
148
165
  editMode: false,
149
166
  id: "puck-root",
150
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropZoneRender, { config, data, zone: rootDroppableId })
167
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
+ DropZoneRender,
169
+ {
170
+ config,
171
+ data,
172
+ zone: rootZone,
173
+ metadata
174
+ }
175
+ )
151
176
  })
152
177
  );
153
178
  }
154
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropZoneRender, { config, data, zone: rootDroppableId });
179
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
180
+ DropZoneRender,
181
+ {
182
+ config,
183
+ data,
184
+ zone: rootZone,
185
+ metadata
186
+ }
187
+ );
155
188
  }
156
189
 
157
190
  // lib/get-changed.ts
@@ -167,19 +200,20 @@ var getChanged = (newItem, oldItem) => {
167
200
 
168
201
  // lib/resolve-component-data.ts
169
202
  var cache = { lastChange: {} };
170
- var resolveAllComponentData = (content, config, onResolveStart, onResolveEnd) => __async(void 0, null, function* () {
203
+ var resolveAllComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (content, config, metadata = {}, onResolveStart, onResolveEnd) {
171
204
  return yield Promise.all(
172
205
  content.map((item) => __async(void 0, null, function* () {
173
206
  return yield resolveComponentData(
174
207
  item,
175
208
  config,
209
+ metadata,
176
210
  onResolveStart,
177
211
  onResolveEnd
178
212
  );
179
213
  }))
180
214
  );
181
215
  });
182
- var resolveComponentData = (item, config, onResolveStart, onResolveEnd) => __async(void 0, null, function* () {
216
+ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd) {
183
217
  const configForItem = config.components[item.type];
184
218
  if (configForItem.resolveData) {
185
219
  const { item: oldItem = null, resolved = {} } = cache.lastChange[item.props.id] || {};
@@ -190,7 +224,11 @@ var resolveComponentData = (item, config, onResolveStart, onResolveEnd) => __asy
190
224
  if (onResolveStart) {
191
225
  onResolveStart(item);
192
226
  }
193
- const { props: resolvedProps, readOnly = {} } = yield configForItem.resolveData(item, { changed, lastData: oldItem });
227
+ const { props: resolvedProps, readOnly = {} } = yield configForItem.resolveData(item, {
228
+ changed,
229
+ lastData: oldItem,
230
+ metadata
231
+ });
194
232
  const resolvedItem = __spreadProps(__spreadValues({}, item), {
195
233
  props: __spreadValues(__spreadValues({}, item.props), resolvedProps)
196
234
  });
@@ -211,7 +249,7 @@ var resolveComponentData = (item, config, onResolveStart, onResolveEnd) => __asy
211
249
 
212
250
  // lib/resolve-root-data.ts
213
251
  var cache2 = {};
214
- function resolveRootData(data, config) {
252
+ function resolveRootData(data, config, metadata) {
215
253
  return __async(this, null, function* () {
216
254
  var _a, _b, _c, _d, _e;
217
255
  if (((_a = config.root) == null ? void 0 : _a.resolveData) && data.root.props) {
@@ -222,7 +260,8 @@ function resolveRootData(data, config) {
222
260
  const rootWithProps = data.root;
223
261
  const resolvedRoot = yield (_e = config.root) == null ? void 0 : _e.resolveData(rootWithProps, {
224
262
  changed,
225
- lastData: ((_d = cache2.lastChange) == null ? void 0 : _d.original) || {}
263
+ lastData: ((_d = cache2.lastChange) == null ? void 0 : _d.original) || {},
264
+ metadata: metadata || {}
226
265
  });
227
266
  cache2.lastChange = {
228
267
  original: data.root,
@@ -243,10 +282,14 @@ var defaultData = (data) => __spreadProps(__spreadValues({}, data), {
243
282
  });
244
283
 
245
284
  // lib/resolve-all-data.ts
246
- function resolveAllData(data, config, onResolveStart, onResolveEnd) {
247
- return __async(this, null, function* () {
285
+ function resolveAllData(_0, _1) {
286
+ return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
248
287
  const defaultedData = defaultData(data);
249
- const dynamicRoot = yield resolveRootData(defaultedData, config);
288
+ const dynamicRoot = yield resolveRootData(
289
+ defaultedData,
290
+ config,
291
+ metadata
292
+ );
250
293
  const { zones = {} } = data;
251
294
  const zoneKeys = Object.keys(zones);
252
295
  const resolvedZones = {};
@@ -255,6 +298,7 @@ function resolveAllData(data, config, onResolveStart, onResolveEnd) {
255
298
  resolvedZones[zoneKey] = yield resolveAllComponentData(
256
299
  zones[zoneKey],
257
300
  config,
301
+ metadata,
258
302
  onResolveStart,
259
303
  onResolveEnd
260
304
  );
@@ -264,6 +308,7 @@ function resolveAllData(data, config, onResolveStart, onResolveEnd) {
264
308
  content: yield resolveAllComponentData(
265
309
  defaultedData.content,
266
310
  config,
311
+ metadata,
267
312
  onResolveStart,
268
313
  onResolveEnd
269
314
  ),
package/dist/rsc.mjs CHANGED
@@ -3,9 +3,11 @@ import {
3
3
  __spreadValues,
4
4
  init_react_import,
5
5
  resolveAllData,
6
+ rootAreaId,
6
7
  rootDroppableId,
8
+ rootZone,
7
9
  setupZone
8
- } from "./chunk-CHWFBYEM.mjs";
10
+ } from "./chunk-T6VJEBJD.mjs";
9
11
 
10
12
  // rsc.tsx
11
13
  init_react_import();
@@ -17,14 +19,15 @@ function DropZoneRender({
17
19
  zone,
18
20
  data,
19
21
  areaId = "root",
20
- config
22
+ config,
23
+ metadata = {}
21
24
  }) {
22
25
  let zoneCompound = rootDroppableId;
23
26
  let content = (data == null ? void 0 : data.content) || [];
24
27
  if (!data || !config) {
25
28
  return null;
26
29
  }
27
- if (areaId && zone && zone !== rootDroppableId) {
30
+ if (areaId !== rootAreaId && zone !== rootZone) {
28
31
  zoneCompound = `${areaId}:${zone}`;
29
32
  content = setupZone(data, zoneCompound).zones[zoneCompound];
30
33
  }
@@ -41,9 +44,11 @@ function DropZoneRender({
41
44
  zone: zone2,
42
45
  data,
43
46
  areaId: item.props.id,
44
- config
47
+ config,
48
+ metadata
45
49
  }
46
- )
50
+ ),
51
+ metadata
47
52
  }
48
53
  }),
49
54
  item.props.id
@@ -52,7 +57,11 @@ function DropZoneRender({
52
57
  return null;
53
58
  }) });
54
59
  }
55
- function Render({ config, data }) {
60
+ function Render({
61
+ config,
62
+ data,
63
+ metadata
64
+ }) {
56
65
  var _a;
57
66
  if ((_a = config.root) == null ? void 0 : _a.render) {
58
67
  const rootProps = data.root.props || data.root;
@@ -61,18 +70,42 @@ function Render({ config, data }) {
61
70
  config.root.render,
62
71
  __spreadProps(__spreadValues({}, rootProps), {
63
72
  puck: {
64
- renderDropZone: ({ zone }) => /* @__PURE__ */ jsx(DropZoneRender, { zone, data, config }),
73
+ renderDropZone: ({ zone }) => /* @__PURE__ */ jsx(
74
+ DropZoneRender,
75
+ {
76
+ zone,
77
+ data,
78
+ config,
79
+ metadata
80
+ }
81
+ ),
65
82
  isEditing: false,
66
83
  dragRef: null
67
84
  },
68
85
  title,
69
86
  editMode: false,
70
87
  id: "puck-root",
71
- children: /* @__PURE__ */ jsx(DropZoneRender, { config, data, zone: rootDroppableId })
88
+ children: /* @__PURE__ */ jsx(
89
+ DropZoneRender,
90
+ {
91
+ config,
92
+ data,
93
+ zone: rootZone,
94
+ metadata
95
+ }
96
+ )
72
97
  })
73
98
  );
74
99
  }
75
- return /* @__PURE__ */ jsx(DropZoneRender, { config, data, zone: rootDroppableId });
100
+ return /* @__PURE__ */ jsx(
101
+ DropZoneRender,
102
+ {
103
+ config,
104
+ data,
105
+ zone: rootZone,
106
+ metadata
107
+ }
108
+ );
76
109
  }
77
110
  export {
78
111
  Render,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.18.3-canary.9e8e47b",
3
+ "version": "0.19.0-canary.0a3e56e",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",
@@ -71,6 +71,7 @@
71
71
  "@dnd-kit/helpers": "0.0.7-beta-20250130032138",
72
72
  "@dnd-kit/react": "0.0.7-beta-20250130032138",
73
73
  "deep-diff": "^1.0.2",
74
+ "fast-deep-equal": "^3.1.3",
74
75
  "object-hash": "^3.0.0",
75
76
  "react-hotkeys-hook": "^4.6.1",
76
77
  "use-debounce": "^9.0.4",