@measured/puck 0.14.0-canary.95280e6 → 0.14.0-canary.9b794d9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,4 @@
1
1
  import { CSSProperties, ReactNode, ReactElement } from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
 
4
3
  type ItemSelector = {
5
4
  index: number;
@@ -12,7 +11,6 @@ type DropZoneProps = {
12
11
  disallow?: string[];
13
12
  style?: CSSProperties;
14
13
  };
15
- declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
16
14
 
17
15
  type iconTypes = "Smartphone" | "Monitor" | "Tablet";
18
16
  type Viewport = {
@@ -147,20 +145,26 @@ type Content<Props extends {
147
145
  } = {
148
146
  [key: string]: any;
149
147
  }> = ComponentData<Props>[];
150
- type PuckComponent<Props extends DefaultComponentProps = DefaultComponentProps> = (props: WithPuckProps<Props & {
148
+ type PuckComponent<Props> = (props: WithPuckProps<Props & {
151
149
  puck: PuckContext;
152
150
  }>) => JSX.Element;
153
151
  type PuckContext = {
154
- renderDropZone: typeof DropZone;
152
+ renderDropZone: React.FC<DropZoneProps>;
155
153
  };
156
- type ComponentConfig<ComponentProps extends DefaultComponentProps = DefaultComponentProps, DefaultProps = ComponentProps, DataShape = ComponentData<ComponentProps>> = {
154
+ type ComponentConfig<ComponentProps extends DefaultComponentProps = DefaultComponentProps, DefaultProps = ComponentProps, DataShape = Omit<ComponentData<ComponentProps>, "type">> = {
157
155
  render: PuckComponent<ComponentProps>;
158
156
  label?: string;
159
157
  defaultProps?: DefaultProps;
160
158
  fields?: Fields<ComponentProps>;
161
159
  resolveData?: (data: DataShape, params: {
162
160
  changed: Partial<Record<keyof ComponentProps, boolean>>;
163
- }) => Promise<Partial<ComponentDataWithOptionalProps<ComponentProps>>> | Partial<ComponentDataWithOptionalProps<ComponentProps>>;
161
+ }) => Promise<{
162
+ props?: Partial<ComponentProps>;
163
+ readOnly?: Partial<Record<keyof ComponentProps, boolean>>;
164
+ }> | {
165
+ props?: Partial<ComponentProps>;
166
+ readOnly?: Partial<Record<keyof ComponentProps, boolean>>;
167
+ };
164
168
  };
165
169
  type Category<ComponentName> = {
166
170
  components?: ComponentName[];
@@ -168,22 +172,18 @@ type Category<ComponentName> = {
168
172
  visible?: boolean;
169
173
  defaultExpanded?: boolean;
170
174
  };
171
- type Config<Props extends {
172
- [key: string]: any;
173
- } = {
174
- [key: string]: any;
175
- }, RootProps extends DefaultRootProps = DefaultRootProps, CategoryName extends string = any> = {
175
+ type Config<Props extends Record<string, any> = Record<string, any>, RootProps extends DefaultRootProps = DefaultRootProps, CategoryName extends string = string> = {
176
176
  categories?: Record<CategoryName, Category<keyof Props>> & {
177
- other?: Category<Props>;
177
+ other?: Category<keyof Props>;
178
178
  };
179
179
  components: {
180
180
  [ComponentName in keyof Props]: Omit<ComponentConfig<Props[ComponentName], Props[ComponentName]>, "type">;
181
181
  };
182
182
  root?: Partial<ComponentConfig<RootProps & {
183
- children: ReactNode;
183
+ children?: ReactNode;
184
184
  }, Partial<RootProps & {
185
- children: ReactNode;
186
- }>, RootDataWithProps<RootProps>>>;
185
+ children?: ReactNode;
186
+ }>, RootDataWithProps>>;
187
187
  };
188
188
  type BaseData<Props extends {
189
189
  [key: string]: any;
@@ -201,13 +201,6 @@ type RootDataWithProps<Props extends DefaultRootProps = DefaultRootProps> = {
201
201
  };
202
202
  type RootDataWithoutProps<Props extends DefaultRootProps = DefaultRootProps> = Props;
203
203
  type RootData<Props extends DefaultRootProps = DefaultRootProps> = BaseData<Props> & Partial<RootDataWithProps<Props>> & Partial<RootDataWithoutProps<Props>>;
204
- type ComponentDataWithOptionalProps<Props extends {
205
- [key: string]: any;
206
- } = {
207
- [key: string]: any;
208
- }> = Omit<ComponentData, "props"> & {
209
- props: Partial<WithPuckProps<Props>>;
210
- };
211
204
  type MappedItem = ComponentData;
212
205
  type Data<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultRootProps = DefaultRootProps> = {
213
206
  root: RootData<RootProps>;
@@ -248,4 +241,4 @@ type AppState = {
248
241
  ui: UiState;
249
242
  };
250
243
 
251
- export { type AppState as A, type BaseField as B, type Config as C, type Data as D, type ExternalFieldWithAdaptor as E, type Field as F, type ItemSelector as I, type MappedItem as M, type NumberField as N, type ObjectField as O, type PuckComponent as P, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UiState as U, type Viewports as V, type DefaultComponentProps as a, type DefaultRootProps as b, type RootData as c, type ComponentData as d, type TextareaField as e, type RadioField as f, type ArrayField as g, type Adaptor as h, type ExternalField as i, type CustomField as j, type Fields as k, type Content as l, type PuckContext as m, type ComponentConfig as n, type BaseData as o, type RootDataWithoutProps as p, type ItemWithId as q, type ArrayState as r, DropZone as s };
244
+ export type { AppState as A, BaseField as B, Config as C, Data as D, ExternalFieldWithAdaptor as E, Field as F, ItemSelector as I, MappedItem as M, NumberField as N, ObjectField as O, PuckComponent as P, RootDataWithProps as R, SelectField as S, TextField as T, UiState as U, Viewports as V, DefaultRootProps as a, DropZoneProps as b, DefaultComponentProps as c, RootData as d, ComponentData as e, TextareaField as f, RadioField as g, ArrayField as h, Adaptor as i, ExternalField as j, CustomField as k, Fields as l, Content as m, PuckContext as n, ComponentConfig as o, BaseData as p, RootDataWithoutProps as q, ItemWithId as r, ArrayState as s };
package/dist/index.d.ts CHANGED
@@ -1,47 +1,10 @@
1
- import { C as Config, D as Data, I as ItemSelector, U as UiState, A as AppState, F as Field, V as Viewports, a as DefaultComponentProps, b as DefaultRootProps, M as MappedItem, R as RootDataWithProps, c as RootData, d as ComponentData } from './Config-DXxsEDkF.js';
2
- export { h as Adaptor, g as ArrayField, r as ArrayState, o as BaseData, B as BaseField, n as ComponentConfig, l as Content, j as CustomField, s as DropZone, i as ExternalField, E as ExternalFieldWithAdaptor, k as Fields, q as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, m as PuckContext, f as RadioField, p as RootDataWithoutProps, S as SelectField, T as TextField, e as TextareaField } from './Config-DXxsEDkF.js';
1
+ import { U as UiState, D as Data, A as AppState, C as Config, a as DefaultRootProps, I as ItemSelector, b as DropZoneProps, F as Field, V as Viewports, c as DefaultComponentProps, M as MappedItem, R as RootDataWithProps, d as RootData, e as ComponentData } from './Config-shqT_YTp.js';
2
+ export { i as Adaptor, h as ArrayField, s as ArrayState, p as BaseData, B as BaseField, o as ComponentConfig, m as Content, k as CustomField, j as ExternalField, E as ExternalFieldWithAdaptor, l as Fields, r as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, n as PuckContext, g as RadioField, q as RootDataWithoutProps, S as SelectField, T as TextField, f as TextareaField } from './Config-shqT_YTp.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
- import { ReactNode, CSSProperties, ReactElement, SyntheticEvent } from 'react';
5
+ import { ReactNode, ReactElement, CSSProperties, SyntheticEvent } from 'react';
6
6
  import { DragStart, DragUpdate } from '@measured/dnd';
7
7
 
8
- type PathData = Record<string, {
9
- path: string[];
10
- label: string;
11
- }>;
12
- type DropZoneContext<UserConfig extends Config<any, any, any> = Config<any, any, any>> = {
13
- data: Data;
14
- config: UserConfig;
15
- componentState?: Record<string, any>;
16
- itemSelector?: ItemSelector | null;
17
- setItemSelector?: (newIndex: ItemSelector | null) => void;
18
- dispatch?: (action: PuckAction) => void;
19
- areaId?: string;
20
- draggedItem?: DragStart & Partial<DragUpdate>;
21
- placeholderStyle?: CSSProperties;
22
- hoveringArea?: string | null;
23
- setHoveringArea?: (area: string | null) => void;
24
- hoveringZone?: string | null;
25
- setHoveringZone?: (zone: string | null) => void;
26
- hoveringComponent?: string | null;
27
- setHoveringComponent?: (id: string | null) => void;
28
- registerZoneArea?: (areaId: string) => void;
29
- areasWithZones?: Record<string, boolean>;
30
- registerZone?: (zoneCompound: string) => void;
31
- unregisterZone?: (zoneCompound: string) => void;
32
- activeZones?: Record<string, boolean>;
33
- pathData?: PathData;
34
- registerPath?: (selector: ItemSelector) => void;
35
- mode?: "edit" | "render";
36
- zoneWillDrag?: string;
37
- setZoneWillDrag?: (zone: string) => void;
38
- } | null;
39
- declare const dropZoneContext: react.Context<DropZoneContext<Config<any, any, any>>>;
40
- declare const DropZoneProvider: ({ children, value, }: {
41
- children: ReactNode;
42
- value: DropZoneContext;
43
- }) => react_jsx_runtime.JSX.Element;
44
-
45
8
  type InsertAction = {
46
9
  type: "insert";
47
10
  componentType: string;
@@ -106,7 +69,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
106
69
  href?: string | undefined;
107
70
  onClick?: ((e: any) => void | Promise<void>) | undefined;
108
71
  variant?: "primary" | "secondary" | undefined;
109
- type?: "reset" | "submit" | "button" | undefined;
72
+ type?: "button" | "submit" | "reset" | undefined;
110
73
  disabled?: boolean | undefined;
111
74
  tabIndex?: number | undefined;
112
75
  newTab?: boolean | undefined;
@@ -120,7 +83,7 @@ declare const Drawer: {
120
83
  ({ children, droppableId, direction, }: {
121
84
  children: ReactNode;
122
85
  droppableId?: string | undefined;
123
- direction?: "horizontal" | "vertical" | undefined;
86
+ direction?: "vertical" | "horizontal" | undefined;
124
87
  }): react_jsx_runtime.JSX.Element;
125
88
  Item: ({ name, children, id, label, index, }: {
126
89
  name: string;
@@ -134,12 +97,51 @@ declare const Drawer: {
134
97
  }) => react_jsx_runtime.JSX.Element;
135
98
  };
136
99
 
100
+ type PathData = Record<string, {
101
+ path: string[];
102
+ label: string;
103
+ }>;
104
+ type DropZoneContext<UserConfig extends Config = Config> = {
105
+ data: Data;
106
+ config: UserConfig;
107
+ componentState?: Record<string, any>;
108
+ itemSelector?: ItemSelector | null;
109
+ setItemSelector?: (newIndex: ItemSelector | null) => void;
110
+ dispatch?: (action: PuckAction) => void;
111
+ areaId?: string;
112
+ draggedItem?: DragStart & Partial<DragUpdate>;
113
+ placeholderStyle?: CSSProperties;
114
+ hoveringArea?: string | null;
115
+ setHoveringArea?: (area: string | null) => void;
116
+ hoveringZone?: string | null;
117
+ setHoveringZone?: (zone: string | null) => void;
118
+ hoveringComponent?: string | null;
119
+ setHoveringComponent?: (id: string | null) => void;
120
+ registerZoneArea?: (areaId: string) => void;
121
+ areasWithZones?: Record<string, boolean>;
122
+ registerZone?: (zoneCompound: string) => void;
123
+ unregisterZone?: (zoneCompound: string) => void;
124
+ activeZones?: Record<string, boolean>;
125
+ pathData?: PathData;
126
+ registerPath?: (selector: ItemSelector) => void;
127
+ mode?: "edit" | "render";
128
+ zoneWillDrag?: string;
129
+ setZoneWillDrag?: (zone: string) => void;
130
+ } | null;
131
+ declare const dropZoneContext: react.Context<DropZoneContext<Config<Record<string, any>, DefaultRootProps, string>>>;
132
+ declare const DropZoneProvider: ({ children, value, }: {
133
+ children: ReactNode;
134
+ value: DropZoneContext;
135
+ }) => react_jsx_runtime.JSX.Element;
136
+
137
+ declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
138
+
137
139
  declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
138
140
  children: ReactNode;
139
141
  href?: string | undefined;
140
142
  onClick?: ((e: SyntheticEvent) => void | Promise<void>) | undefined;
141
143
  variant?: "primary" | "secondary" | undefined;
142
- type?: "reset" | "submit" | "button" | undefined;
144
+ type?: "button" | "submit" | "reset" | undefined;
143
145
  disabled?: boolean | undefined;
144
146
  tabIndex?: number | undefined;
145
147
  newTab?: boolean | undefined;
@@ -227,7 +229,7 @@ type IframeConfig = {
227
229
  enabled?: boolean;
228
230
  };
229
231
 
230
- declare function Puck<UserConfig extends Config<any, any, any> = Config<any, any, any>>({ children, config, data: initialData, ui: initialUi, onChange, onPublish, plugins, overrides, renderHeader, renderHeaderActions, headerTitle, headerPath, viewports, iframe, }: {
232
+ declare function Puck<UserConfig extends Config = Config>({ children, config, data: initialData, ui: initialUi, onChange, onPublish, plugins, overrides, renderHeader, renderHeaderActions, headerTitle, headerPath, viewports, iframe, }: {
231
233
  children?: ReactNode;
232
234
  config: UserConfig;
233
235
  data: Data;
@@ -259,7 +261,7 @@ declare namespace Puck {
259
261
  }) => react_jsx_runtime.JSX.Element;
260
262
  }
261
263
 
262
- declare function Render<UserConfig extends Config<any, any, any> = Config<any, any, any>>({ config, data }: {
264
+ declare function Render<UserConfig extends Config = Config>({ config, data, }: {
263
265
  config: UserConfig;
264
266
  data: Data;
265
267
  }): react_jsx_runtime.JSX.Element;
@@ -277,7 +279,7 @@ type PropTransform<Props extends DefaultComponentProps = DefaultComponentProps,
277
279
  }>;
278
280
  declare function transformProps<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultComponentProps>(data: Data, propTransforms: PropTransform<Props, RootProps>): Data;
279
281
 
280
- declare const resolveAllData: (data: Data, config: Config<any, any, any>, onResolveStart?: ((item: MappedItem) => void) | undefined, onResolveEnd?: ((item: MappedItem) => void) | undefined) => Promise<{
282
+ declare function resolveAllData(data: Data, config: Config, onResolveStart?: (item: MappedItem) => void, onResolveEnd?: (item: MappedItem) => void): Promise<{
281
283
  root: RootDataWithProps<DefaultRootProps> | RootData<DefaultRootProps>;
282
284
  content: any[];
283
285
  zones: Record<string, MappedItem[]>;
@@ -308,7 +310,7 @@ type PuckHistory = {
308
310
 
309
311
  declare const usePuck: () => {
310
312
  appState: AppState;
311
- config: Config<any, any, any>;
313
+ config: Config<Record<string, any>, DefaultRootProps, string>;
312
314
  dispatch: (action: PuckAction) => void;
313
315
  history: Partial<PuckHistory>;
314
316
  selectedItem: ComponentData<DefaultComponentProps & {
@@ -316,4 +318,4 @@ declare const usePuck: () => {
316
318
  }> | null;
317
319
  };
318
320
 
319
- export { AppState, Button, ComponentData, Config, Data, DefaultComponentProps, DefaultRootProps, Drawer, DropZoneProvider, Field, FieldLabel, IconButton, MappedItem, Puck, type PuckAction, Render, RootData, RootDataWithProps, UiState, dropZoneContext, migrate, resolveAllData, transformProps, usePuck };
321
+ export { AppState, Button, ComponentData, Config, Data, DefaultComponentProps, DefaultRootProps, Drawer, DropZone, DropZoneProvider, Field, FieldLabel, IconButton, MappedItem, Puck, type PuckAction, Render, RootData, RootDataWithProps, UiState, dropZoneContext, migrate, resolveAllData, transformProps, usePuck };
package/dist/index.js CHANGED
@@ -8085,7 +8085,7 @@ var require_react_dom_development = __commonJS({
8085
8085
  var HostPortal = 4;
8086
8086
  var HostComponent = 5;
8087
8087
  var HostText = 6;
8088
- var Fragment16 = 7;
8088
+ var Fragment17 = 7;
8089
8089
  var Mode = 8;
8090
8090
  var ContextConsumer = 9;
8091
8091
  var ContextProvider = 10;
@@ -9241,7 +9241,7 @@ var require_react_dom_development = __commonJS({
9241
9241
  return "DehydratedFragment";
9242
9242
  case ForwardRef:
9243
9243
  return getWrappedName$1(type, type.render, "ForwardRef");
9244
- case Fragment16:
9244
+ case Fragment17:
9245
9245
  return "Fragment";
9246
9246
  case HostComponent:
9247
9247
  return type;
@@ -18912,7 +18912,7 @@ var require_react_dom_development = __commonJS({
18912
18912
  }
18913
18913
  }
18914
18914
  function updateFragment2(returnFiber, current2, fragment, lanes, key) {
18915
- if (current2 === null || current2.tag !== Fragment16) {
18915
+ if (current2 === null || current2.tag !== Fragment17) {
18916
18916
  var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
18917
18917
  created.return = returnFiber;
18918
18918
  return created;
@@ -19315,7 +19315,7 @@ var require_react_dom_development = __commonJS({
19315
19315
  if (child.key === key) {
19316
19316
  var elementType = element.type;
19317
19317
  if (elementType === REACT_FRAGMENT_TYPE) {
19318
- if (child.tag === Fragment16) {
19318
+ if (child.tag === Fragment17) {
19319
19319
  deleteRemainingChildren(returnFiber, child.sibling);
19320
19320
  var existing = useFiber(child, element.props.children);
19321
19321
  existing.return = returnFiber;
@@ -23490,7 +23490,7 @@ var require_react_dom_development = __commonJS({
23490
23490
  var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
23491
23491
  return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
23492
23492
  }
23493
- case Fragment16:
23493
+ case Fragment17:
23494
23494
  return updateFragment(current2, workInProgress2, renderLanes2);
23495
23495
  case Mode:
23496
23496
  return updateMode(current2, workInProgress2, renderLanes2);
@@ -23763,7 +23763,7 @@ var require_react_dom_development = __commonJS({
23763
23763
  case SimpleMemoComponent:
23764
23764
  case FunctionComponent:
23765
23765
  case ForwardRef:
23766
- case Fragment16:
23766
+ case Fragment17:
23767
23767
  case Mode:
23768
23768
  case Profiler:
23769
23769
  case ContextConsumer:
@@ -28022,7 +28022,7 @@ var require_react_dom_development = __commonJS({
28022
28022
  return fiber;
28023
28023
  }
28024
28024
  function createFiberFromFragment(elements, mode, lanes, key) {
28025
- var fiber = createFiber(Fragment16, elements, key, mode);
28025
+ var fiber = createFiber(Fragment17, elements, key, mode);
28026
28026
  fiber.lanes = lanes;
28027
28027
  return fiber;
28028
28028
  }
@@ -32732,7 +32732,12 @@ var Preview = ({ id = "puck-preview" }) => {
32732
32732
  const Page = (0, import_react22.useCallback)(
32733
32733
  (pageProps) => {
32734
32734
  var _a, _b;
32735
- return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadProps(__spreadValues({}, pageProps), { editMode: true })) : pageProps.children;
32735
+ return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadProps(__spreadValues({
32736
+ id: "puck-root"
32737
+ }, pageProps), {
32738
+ editMode: true,
32739
+ puck: { renderDropZone: DropZone }
32740
+ })) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: pageProps.children });
32736
32741
  },
32737
32742
  [config.root]
32738
32743
  );
@@ -33931,7 +33936,10 @@ Puck.Preview = Preview;
33931
33936
  // components/Render/index.tsx
33932
33937
  init_react_import();
33933
33938
  var import_jsx_runtime35 = require("react/jsx-runtime");
33934
- function Render({ config, data }) {
33939
+ function Render({
33940
+ config,
33941
+ data
33942
+ }) {
33935
33943
  var _a;
33936
33944
  const rootProps = data.root.props || data.root;
33937
33945
  const title = (rootProps == null ? void 0 : rootProps.title) || "";
@@ -34010,31 +34018,33 @@ function transformProps(data, propTransforms) {
34010
34018
 
34011
34019
  // lib/resolve-all-data.ts
34012
34020
  init_react_import();
34013
- var resolveAllData = (data, config, onResolveStart, onResolveEnd) => __async(void 0, null, function* () {
34014
- const dynamicRoot = yield resolveRootData(data, config);
34015
- const { zones = {} } = data;
34016
- const zoneKeys = Object.keys(zones);
34017
- const resolvedZones = {};
34018
- for (let i = 0; i < zoneKeys.length; i++) {
34019
- const zoneKey = zoneKeys[i];
34020
- resolvedZones[zoneKey] = yield resolveAllComponentData(
34021
- zones[zoneKey],
34022
- config,
34023
- onResolveStart,
34024
- onResolveEnd
34025
- );
34026
- }
34027
- return __spreadProps(__spreadValues({}, data), {
34028
- root: dynamicRoot,
34029
- content: yield resolveAllComponentData(
34030
- data.content,
34031
- config,
34032
- onResolveStart,
34033
- onResolveEnd
34034
- ),
34035
- zones: resolvedZones
34021
+ function resolveAllData(data, config, onResolveStart, onResolveEnd) {
34022
+ return __async(this, null, function* () {
34023
+ const dynamicRoot = yield resolveRootData(data, config);
34024
+ const { zones = {} } = data;
34025
+ const zoneKeys = Object.keys(zones);
34026
+ const resolvedZones = {};
34027
+ for (let i = 0; i < zoneKeys.length; i++) {
34028
+ const zoneKey = zoneKeys[i];
34029
+ resolvedZones[zoneKey] = yield resolveAllComponentData(
34030
+ zones[zoneKey],
34031
+ config,
34032
+ onResolveStart,
34033
+ onResolveEnd
34034
+ );
34035
+ }
34036
+ return __spreadProps(__spreadValues({}, data), {
34037
+ root: dynamicRoot,
34038
+ content: yield resolveAllComponentData(
34039
+ data.content,
34040
+ config,
34041
+ onResolveStart,
34042
+ onResolveEnd
34043
+ ),
34044
+ zones: resolvedZones
34045
+ });
34036
34046
  });
34037
- });
34047
+ }
34038
34048
 
34039
34049
  // lib/use-puck.ts
34040
34050
  init_react_import();
package/dist/rsc.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, D as Data } from './Config-DXxsEDkF.js';
2
+ import { C as Config, D as Data } from './Config-shqT_YTp.js';
3
3
  import 'react';
4
4
 
5
- declare function Render<UserConfig extends Config<any, any, any> = Config<any, any, any>>({ config, data }: {
5
+ declare function Render<UserConfig extends Config = Config>({ config, data, }: {
6
6
  config: UserConfig;
7
7
  data: Data;
8
8
  }): react_jsx_runtime.JSX.Element;
package/dist/rsc.js CHANGED
@@ -109,7 +109,10 @@ function DropZoneRender({
109
109
  return null;
110
110
  }) });
111
111
  }
112
- function Render({ config, data }) {
112
+ function Render({
113
+ config,
114
+ data
115
+ }) {
113
116
  var _a;
114
117
  if ((_a = config.root) == null ? void 0 : _a.render) {
115
118
  const rootProps = data.root.props || data.root;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.14.0-canary.95280e6",
3
+ "version": "0.14.0-canary.9b794d9",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",