@measured/puck 0.18.3-canary.9de70d3 → 0.18.3-canary.b44056f

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.
@@ -91,49 +91,6 @@ var init_react_import = __esm({
91
91
  }
92
92
  });
93
93
 
94
- // lib/transform-props.ts
95
- init_react_import();
96
-
97
- // lib/default-data.ts
98
- init_react_import();
99
- var defaultData = (data) => __spreadProps(__spreadValues({}, data), {
100
- root: data.root || {},
101
- content: data.content || []
102
- });
103
-
104
- // lib/transform-props.ts
105
- function transformProps(data, propTransforms) {
106
- const mapItem = (item) => {
107
- if (propTransforms[item.type]) {
108
- return __spreadProps(__spreadValues({}, item), {
109
- props: propTransforms[item.type](item.props)
110
- });
111
- }
112
- return item;
113
- };
114
- const defaultedData = defaultData(data);
115
- const rootProps = defaultedData.root.props || defaultedData.root;
116
- let newRoot = __spreadValues({}, defaultedData.root);
117
- if (propTransforms["root"]) {
118
- if (defaultedData.root.props) {
119
- newRoot.props = propTransforms["root"](rootProps);
120
- } else {
121
- newRoot = propTransforms["root"](rootProps);
122
- }
123
- }
124
- const afterPropTransforms = __spreadProps(__spreadValues({}, defaultedData), {
125
- root: newRoot,
126
- content: defaultedData.content.map(mapItem),
127
- zones: Object.keys(data.zones || {}).reduce(
128
- (acc, zoneKey) => __spreadProps(__spreadValues({}, acc), {
129
- [zoneKey]: data.zones[zoneKey].map(mapItem)
130
- }),
131
- {}
132
- )
133
- });
134
- return afterPropTransforms;
135
- }
136
-
137
94
  // lib/resolve-all-data.ts
138
95
  init_react_import();
139
96
 
@@ -224,6 +181,13 @@ function resolveRootData(data, config) {
224
181
  });
225
182
  }
226
183
 
184
+ // lib/default-data.ts
185
+ init_react_import();
186
+ var defaultData = (data) => __spreadProps(__spreadValues({}, data), {
187
+ root: data.root || {},
188
+ content: data.content || []
189
+ });
190
+
227
191
  // lib/resolve-all-data.ts
228
192
  function resolveAllData(data, config, onResolveStart, onResolveEnd) {
229
193
  return __async(this, null, function* () {
@@ -287,6 +251,6 @@ export {
287
251
  getChanged,
288
252
  resolveComponentData,
289
253
  resolveRootData,
290
- transformProps,
254
+ defaultData,
291
255
  resolveAllData
292
256
  };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, H as History, A as AppState, E as ExtractPropsFromConfig, h as ExtractRootPropsFromConfig, i as ComponentDataMap } from './resolve-all-data-ChsqfT2w.mjs';
2
- export { K as Adaptor, G as ArrayField, q as ArrayState, a3 as AsFieldProps, B as BaseData, x as BaseField, s as ComponentConfig, v as ComponentData, w as Content, W as CustomField, a0 as DefaultComponentProps, Z as DefaultRootFieldProps, $ as DefaultRootProps, _ as DefaultRootRenderProps, j as Direction, k as DragAxis, Q as ExternalField, L as ExternalFieldWithAdaptor, n as FieldRenderFunctions, X as Fields, p as ItemWithId, M as MappedItem, N as NumberField, J as ObjectField, m as OverrideKey, r as PuckComponent, Y as PuckContext, z as RadioField, u as RootData, R as RootDataWithProps, t as RootDataWithoutProps, S as SelectField, T as TextField, y as TextareaField, l as Viewport, a4 as WithChildren, a1 as WithId, a2 as WithPuckProps, o as overrideKeys, a6 as resolveAllData, a5 as transformProps } from './resolve-all-data-ChsqfT2w.mjs';
1
+ import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, j as ExtractRootPropsFromConfig, k as ComponentDataMap } from './resolve-all-data-ppm982Jh.mjs';
2
+ export { Q as Adaptor, K as ArrayField, s as ArrayState, a3 as AsFieldProps, B as BaseData, z as BaseField, u as ComponentConfig, x as ComponentData, y as Content, Y as CustomField, a0 as DefaultRootProps, $ as DefaultRootRenderProps, l as Direction, m as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, q as FieldRenderFunctions, Z as Fields, r as ItemWithId, M as MappedItem, N as NumberField, L as ObjectField, p as OverrideKey, t as PuckComponent, _ as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, n as Viewport, a4 as WithChildren, a1 as WithId, a2 as WithPuckProps, o as overrideKeys, a5 as resolveAllData } from './resolve-all-data-ppm982Jh.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, SyntheticEvent, ReactElement } from 'react';
@@ -140,6 +140,17 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
140
140
 
141
141
  declare function migrate(data: Data): Data;
142
142
 
143
+ type PropTransform<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps> = Partial<{
144
+ [ComponentName in keyof Props]: (props: Props[ComponentName] & {
145
+ [key: string]: any;
146
+ }) => Props[ComponentName];
147
+ } & {
148
+ root: (props: RootProps & {
149
+ [key: string]: any;
150
+ }) => RootProps;
151
+ }>;
152
+ declare function transformProps<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps>(data: Partial<Data>, propTransforms: PropTransform<Props, RootProps>): Data;
153
+
143
154
  type HistoryStore<D = any> = {
144
155
  index: number;
145
156
  hasPast: boolean;
@@ -183,4 +194,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
183
194
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
184
195
  };
185
196
 
186
- export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, migrate, usePuck };
197
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, migrate, transformProps, usePuck };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, H as History, A as AppState, E as ExtractPropsFromConfig, h as ExtractRootPropsFromConfig, i as ComponentDataMap } from './resolve-all-data-ChsqfT2w.js';
2
- export { K as Adaptor, G as ArrayField, q as ArrayState, a3 as AsFieldProps, B as BaseData, x as BaseField, s as ComponentConfig, v as ComponentData, w as Content, W as CustomField, a0 as DefaultComponentProps, Z as DefaultRootFieldProps, $ as DefaultRootProps, _ as DefaultRootRenderProps, j as Direction, k as DragAxis, Q as ExternalField, L as ExternalFieldWithAdaptor, n as FieldRenderFunctions, X as Fields, p as ItemWithId, M as MappedItem, N as NumberField, J as ObjectField, m as OverrideKey, r as PuckComponent, Y as PuckContext, z as RadioField, u as RootData, R as RootDataWithProps, t as RootDataWithoutProps, S as SelectField, T as TextField, y as TextareaField, l as Viewport, a4 as WithChildren, a1 as WithId, a2 as WithPuckProps, o as overrideKeys, a6 as resolveAllData, a5 as transformProps } from './resolve-all-data-ChsqfT2w.js';
1
+ import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, j as ExtractRootPropsFromConfig, k as ComponentDataMap } from './resolve-all-data-ppm982Jh.js';
2
+ export { Q as Adaptor, K as ArrayField, s as ArrayState, a3 as AsFieldProps, B as BaseData, z as BaseField, u as ComponentConfig, x as ComponentData, y as Content, Y as CustomField, a0 as DefaultRootProps, $ as DefaultRootRenderProps, l as Direction, m as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, q as FieldRenderFunctions, Z as Fields, r as ItemWithId, M as MappedItem, N as NumberField, L as ObjectField, p as OverrideKey, t as PuckComponent, _ as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, n as Viewport, a4 as WithChildren, a1 as WithId, a2 as WithPuckProps, o as overrideKeys, a5 as resolveAllData } from './resolve-all-data-ppm982Jh.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, SyntheticEvent, ReactElement } from 'react';
@@ -140,6 +140,17 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
140
140
 
141
141
  declare function migrate(data: Data): Data;
142
142
 
143
+ type PropTransform<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps> = Partial<{
144
+ [ComponentName in keyof Props]: (props: Props[ComponentName] & {
145
+ [key: string]: any;
146
+ }) => Props[ComponentName];
147
+ } & {
148
+ root: (props: RootProps & {
149
+ [key: string]: any;
150
+ }) => RootProps;
151
+ }>;
152
+ declare function transformProps<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps>(data: Partial<Data>, propTransforms: PropTransform<Props, RootProps>): Data;
153
+
143
154
  type HistoryStore<D = any> = {
144
155
  index: number;
145
156
  hasPast: boolean;
@@ -183,4 +194,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
183
194
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
184
195
  };
185
196
 
186
- export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, migrate, usePuck };
197
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, migrate, transformProps, usePuck };
package/dist/index.mjs CHANGED
@@ -8,15 +8,15 @@ import {
8
8
  __spreadProps,
9
9
  __spreadValues,
10
10
  __toESM,
11
+ defaultData,
11
12
  getChanged,
12
13
  init_react_import,
13
14
  resolveAllData,
14
15
  resolveComponentData,
15
16
  resolveRootData,
16
17
  rootDroppableId,
17
- setupZone,
18
- transformProps
19
- } from "./chunk-4QIG6FWS.mjs";
18
+ setupZone
19
+ } from "./chunk-CHWFBYEM.mjs";
20
20
 
21
21
  // ../../node_modules/classnames/index.js
22
22
  var require_classnames = __commonJS({
@@ -7834,6 +7834,40 @@ function migrate(data) {
7834
7834
  return migrations == null ? void 0 : migrations.reduce((acc, migration) => migration(acc), data);
7835
7835
  }
7836
7836
 
7837
+ // lib/transform-props.ts
7838
+ init_react_import();
7839
+ function transformProps(data, propTransforms) {
7840
+ const mapItem = (item) => {
7841
+ if (propTransforms[item.type]) {
7842
+ return __spreadProps(__spreadValues({}, item), {
7843
+ props: propTransforms[item.type](item.props)
7844
+ });
7845
+ }
7846
+ return item;
7847
+ };
7848
+ const defaultedData = defaultData(data);
7849
+ const rootProps = defaultedData.root.props || defaultedData.root;
7850
+ let newRoot = __spreadValues({}, defaultedData.root);
7851
+ if (propTransforms["root"]) {
7852
+ if (defaultedData.root.props) {
7853
+ newRoot.props = propTransforms["root"](rootProps);
7854
+ } else {
7855
+ newRoot = propTransforms["root"](rootProps);
7856
+ }
7857
+ }
7858
+ const afterPropTransforms = __spreadProps(__spreadValues({}, defaultedData), {
7859
+ root: newRoot,
7860
+ content: defaultedData.content.map(mapItem),
7861
+ zones: Object.keys(data.zones || {}).reduce(
7862
+ (acc, zoneKey) => __spreadProps(__spreadValues({}, acc), {
7863
+ [zoneKey]: data.zones[zoneKey].map(mapItem)
7864
+ }),
7865
+ {}
7866
+ )
7867
+ });
7868
+ return afterPropTransforms;
7869
+ }
7870
+
7837
7871
  // lib/use-puck.ts
7838
7872
  init_react_import();
7839
7873
  var usePuck = () => {
@@ -457,17 +457,6 @@ type PuckAction = {
457
457
  recordHistory?: boolean;
458
458
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
459
459
 
460
- type PropTransform<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps> = Partial<{
461
- [ComponentName in keyof Props]: (props: Props[ComponentName] & {
462
- [key: string]: any;
463
- }) => Props[ComponentName];
464
- } & {
465
- root: (props: RootProps & {
466
- [key: string]: any;
467
- }) => RootProps;
468
- }>;
469
- declare function transformProps<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps>(data: Partial<Data>, propTransforms: PropTransform<Props, RootProps>): Data;
470
-
471
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>>;
472
461
 
473
- export { type DefaultRootProps 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 ArrayField as G, type History as H, type IframeConfig as I, type ObjectField as J, type Adaptor as K, type ExternalFieldWithAdaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type Permissions as P, type ExternalField as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type CustomField as W, type Fields as X, type PuckContext as Y, type DefaultRootFieldProps as Z, type DefaultRootRenderProps as _, type Field as a, type DefaultComponentProps as a0, type WithId as a1, type WithPuckProps as a2, type AsFieldProps as a3, type WithChildren as a4, transformProps 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 ExtractRootPropsFromConfig as h, type ComponentDataMap as i, type Direction as j, type DragAxis as k, type Viewport as l, type OverrideKey as m, type FieldRenderFunctions as n, overrideKeys as o, type ItemWithId as p, type ArrayState as q, type PuckComponent as r, type ComponentConfig as s, type RootDataWithoutProps as t, type RootData as u, type ComponentData as v, type Content as w, type BaseField as x, type TextareaField as y, type RadioField as z };
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 };
@@ -457,17 +457,6 @@ type PuckAction = {
457
457
  recordHistory?: boolean;
458
458
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
459
459
 
460
- type PropTransform<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps> = Partial<{
461
- [ComponentName in keyof Props]: (props: Props[ComponentName] & {
462
- [key: string]: any;
463
- }) => Props[ComponentName];
464
- } & {
465
- root: (props: RootProps & {
466
- [key: string]: any;
467
- }) => RootProps;
468
- }>;
469
- declare function transformProps<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps>(data: Partial<Data>, propTransforms: PropTransform<Props, RootProps>): Data;
470
-
471
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>>;
472
461
 
473
- export { type DefaultRootProps 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 ArrayField as G, type History as H, type IframeConfig as I, type ObjectField as J, type Adaptor as K, type ExternalFieldWithAdaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type Permissions as P, type ExternalField as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type CustomField as W, type Fields as X, type PuckContext as Y, type DefaultRootFieldProps as Z, type DefaultRootRenderProps as _, type Field as a, type DefaultComponentProps as a0, type WithId as a1, type WithPuckProps as a2, type AsFieldProps as a3, type WithChildren as a4, transformProps 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 ExtractRootPropsFromConfig as h, type ComponentDataMap as i, type Direction as j, type DragAxis as k, type Viewport as l, type OverrideKey as m, type FieldRenderFunctions as n, overrideKeys as o, type ItemWithId as p, type ArrayState as q, type PuckComponent as r, type ComponentConfig as s, type RootDataWithoutProps as t, type RootData as u, type ComponentData as v, type Content as w, type BaseField as x, type TextareaField as y, type RadioField as z };
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 };
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 } from './resolve-all-data-ChsqfT2w.mjs';
3
- export { a6 as resolveAllData, a5 as transformProps } from './resolve-all-data-ChsqfT2w.mjs';
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';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
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 } from './resolve-all-data-ChsqfT2w.js';
3
- export { a6 as resolveAllData, a5 as transformProps } from './resolve-all-data-ChsqfT2w.js';
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';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
package/dist/rsc.js CHANGED
@@ -68,8 +68,7 @@ var __async = (__this, __arguments, generator) => {
68
68
  var rsc_exports = {};
69
69
  __export(rsc_exports, {
70
70
  Render: () => Render,
71
- resolveAllData: () => resolveAllData,
72
- transformProps: () => transformProps
71
+ resolveAllData: () => resolveAllData
73
72
  });
74
73
  module.exports = __toCommonJS(rsc_exports);
75
74
 
@@ -272,42 +271,8 @@ function resolveAllData(data, config, onResolveStart, onResolveEnd) {
272
271
  });
273
272
  });
274
273
  }
275
-
276
- // lib/transform-props.ts
277
- function transformProps(data, propTransforms) {
278
- const mapItem = (item) => {
279
- if (propTransforms[item.type]) {
280
- return __spreadProps(__spreadValues({}, item), {
281
- props: propTransforms[item.type](item.props)
282
- });
283
- }
284
- return item;
285
- };
286
- const defaultedData = defaultData(data);
287
- const rootProps = defaultedData.root.props || defaultedData.root;
288
- let newRoot = __spreadValues({}, defaultedData.root);
289
- if (propTransforms["root"]) {
290
- if (defaultedData.root.props) {
291
- newRoot.props = propTransforms["root"](rootProps);
292
- } else {
293
- newRoot = propTransforms["root"](rootProps);
294
- }
295
- }
296
- const afterPropTransforms = __spreadProps(__spreadValues({}, defaultedData), {
297
- root: newRoot,
298
- content: defaultedData.content.map(mapItem),
299
- zones: Object.keys(data.zones || {}).reduce(
300
- (acc, zoneKey) => __spreadProps(__spreadValues({}, acc), {
301
- [zoneKey]: data.zones[zoneKey].map(mapItem)
302
- }),
303
- {}
304
- )
305
- });
306
- return afterPropTransforms;
307
- }
308
274
  // Annotate the CommonJS export names for ESM import in node:
309
275
  0 && (module.exports = {
310
276
  Render,
311
- resolveAllData,
312
- transformProps
277
+ resolveAllData
313
278
  });
package/dist/rsc.mjs CHANGED
@@ -4,9 +4,8 @@ import {
4
4
  init_react_import,
5
5
  resolveAllData,
6
6
  rootDroppableId,
7
- setupZone,
8
- transformProps
9
- } from "./chunk-4QIG6FWS.mjs";
7
+ setupZone
8
+ } from "./chunk-CHWFBYEM.mjs";
10
9
 
11
10
  // rsc.tsx
12
11
  init_react_import();
@@ -77,6 +76,5 @@ function Render({ config, data }) {
77
76
  }
78
77
  export {
79
78
  Render,
80
- resolveAllData,
81
- transformProps
79
+ resolveAllData
82
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.18.3-canary.9de70d3",
3
+ "version": "0.18.3-canary.b44056f",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",