@measured/puck 0.19.0-canary.84a836b → 0.19.0-canary.a281c342

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.
@@ -22,6 +22,7 @@ type FieldOption = {
22
22
  type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
23
23
  type BaseField = {
24
24
  label?: string;
25
+ labelIcon?: ReactElement;
25
26
  };
26
27
  type TextField = BaseField & {
27
28
  type: "text";
@@ -119,6 +120,9 @@ type CustomField<Props extends any = {}> = BaseField & {
119
120
  readOnly?: boolean;
120
121
  }) => ReactElement;
121
122
  };
123
+ type SlotField = BaseField & {
124
+ type: "slot";
125
+ };
122
126
  type Field<Props extends any = any> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props extends {
123
127
  [key: string]: any;
124
128
  } ? Props : any> | ObjectField<Props extends {
@@ -127,7 +131,7 @@ type Field<Props extends any = any> = TextField | NumberField | TextareaField |
127
131
  [key: string]: any;
128
132
  } ? Props : any> | ExternalFieldWithAdaptor<Props extends {
129
133
  [key: string]: any;
130
- } ? Props : any> | CustomField<Props>;
134
+ } ? Props : any> | CustomField<Props> | SlotField;
131
135
  type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps> = {
132
136
  [PropName in keyof Omit<ComponentProps, "editMode">]: Field<ComponentProps[PropName]>;
133
137
  };
@@ -140,15 +144,20 @@ type FieldProps<F = Field<any>, ValueType = any> = {
140
144
  };
141
145
 
142
146
  type PuckComponent<Props> = (props: WithId<WithPuckProps<Props>>) => JSX.Element;
147
+ type ResolveDataTrigger = "insert" | "replace" | "load" | "force";
143
148
  type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponentProps, FieldProps extends DefaultComponentProps = RenderProps, DataShape = Omit<ComponentData<FieldProps>, "type">> = {
144
- render: PuckComponent<RenderProps>;
149
+ render: PuckComponent<{
150
+ [PropName in keyof RenderProps]: RenderProps[PropName] extends Slot ? (props?: Omit<DropZoneProps, "zone">) => ReactNode : RenderProps[PropName];
151
+ }>;
145
152
  label?: string;
146
153
  defaultProps?: FieldProps;
147
154
  fields?: Fields<FieldProps>;
148
155
  permissions?: Partial<Permissions>;
149
156
  inline?: boolean;
150
157
  resolveFields?: (data: DataShape, params: {
151
- changed: Partial<Record<keyof FieldProps, boolean>>;
158
+ changed: Partial<Record<keyof FieldProps, boolean> & {
159
+ id: string;
160
+ }>;
152
161
  fields: Fields<FieldProps>;
153
162
  lastFields: Fields<FieldProps>;
154
163
  lastData: DataShape | null;
@@ -156,9 +165,12 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
156
165
  parent: ComponentData | null;
157
166
  }) => Promise<Fields<FieldProps>> | Fields<FieldProps>;
158
167
  resolveData?: (data: DataShape, params: {
159
- changed: Partial<Record<keyof FieldProps, boolean>>;
168
+ changed: Partial<Record<keyof FieldProps, boolean> & {
169
+ id: string;
170
+ }>;
160
171
  lastData: DataShape | null;
161
172
  metadata: Metadata;
173
+ trigger: ResolveDataTrigger;
162
174
  }) => Promise<{
163
175
  props?: Partial<FieldProps>;
164
176
  readOnly?: Partial<Record<keyof FieldProps, boolean>>;
@@ -167,13 +179,16 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
167
179
  readOnly?: Partial<Record<keyof FieldProps, boolean>>;
168
180
  };
169
181
  resolvePermissions?: (data: DataShape, params: {
170
- changed: Partial<Record<keyof FieldProps, boolean>>;
182
+ changed: Partial<Record<keyof FieldProps, boolean> & {
183
+ id: string;
184
+ }>;
171
185
  lastPermissions: Partial<Permissions>;
172
186
  permissions: Partial<Permissions>;
173
187
  appState: AppState;
174
188
  lastData: DataShape | null;
175
189
  }) => Promise<Partial<Permissions>> | Partial<Permissions>;
176
190
  };
191
+ type RootConfig<RootProps extends DefaultComponentProps = any> = Partial<ComponentConfig<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
177
192
  type Category<ComponentName> = {
178
193
  components?: ComponentName[];
179
194
  title?: string;
@@ -187,7 +202,7 @@ type Config<Props extends DefaultComponentProps = DefaultComponentProps, RootPro
187
202
  components: {
188
203
  [ComponentName in keyof Props]: Omit<ComponentConfig<Props[ComponentName], Props[ComponentName]>, "type">;
189
204
  };
190
- root?: Partial<ComponentConfig<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
205
+ root?: RootConfig<RootProps>;
191
206
  };
192
207
 
193
208
  type WithId<Props> = Props & {
@@ -203,7 +218,7 @@ type WithChildren<Props> = Props & {
203
218
  };
204
219
  type ExtractPropsFromConfig<UserConfig> = UserConfig extends Config<infer P, any, any> ? P : never;
205
220
  type ExtractRootPropsFromConfig<UserConfig> = UserConfig extends Config<any, infer P, any> ? P : never;
206
- type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractPropsFromConfig<UserConfig> = ExtractPropsFromConfig<UserConfig>, UserRootProps extends ExtractRootPropsFromConfig<UserConfig> = ExtractRootPropsFromConfig<UserConfig>, UserData extends Data<UserProps, UserRootProps> | Data = Data<UserProps, UserRootProps>, UserAppState extends AppState<UserData> = AppState<UserData>, UserComponentData extends ComponentData = UserData["content"][0]> = {
221
+ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractPropsFromConfig<UserConfig> = ExtractPropsFromConfig<UserConfig>, UserRootProps extends ExtractRootPropsFromConfig<UserConfig> = ExtractRootPropsFromConfig<UserConfig>, UserData extends Data<UserProps, UserRootProps> | Data = Data<UserProps, UserRootProps>, UserAppState extends PrivateAppState<UserData> = PrivateAppState<UserData>, UserComponentData extends ComponentData = UserData["content"][0]> = {
207
222
  UserConfig: UserConfig;
208
223
  UserProps: UserProps;
209
224
  UserRootProps: UserRootProps;
@@ -299,6 +314,27 @@ type AppState<UserData extends Data = Data> = {
299
314
  ui: UiState;
300
315
  };
301
316
 
317
+ type ZoneType = "root" | "dropzone" | "slot";
318
+ type PuckNodeData = {
319
+ data: ComponentData;
320
+ flatData: ComponentData;
321
+ parentId: string | null;
322
+ zone: string;
323
+ path: string[];
324
+ };
325
+ type PuckZoneData = {
326
+ contentIds: string[];
327
+ type: ZoneType;
328
+ };
329
+ type NodeIndex = Record<string, PuckNodeData>;
330
+ type ZoneIndex = Record<string, PuckZoneData>;
331
+ type PrivateAppState<UserData extends Data = Data> = AppState<UserData> & {
332
+ indexes: {
333
+ nodes: NodeIndex;
334
+ zones: ZoneIndex;
335
+ };
336
+ };
337
+
302
338
  type RenderFunc<Props extends {
303
339
  [key: string]: any;
304
340
  } = {
@@ -405,6 +441,7 @@ type InitialHistoryNoAppend<AS = Partial<AppState>> = {
405
441
  appendData?: false;
406
442
  };
407
443
  type InitialHistory<AS = Partial<AppState>> = InitialHistoryAppend<AS> | InitialHistoryNoAppend<AS>;
444
+ type Slot = Content;
408
445
 
409
446
  type InsertAction = {
410
447
  type: "insert";
@@ -418,11 +455,17 @@ type DuplicateAction = {
418
455
  sourceIndex: number;
419
456
  sourceZone: string;
420
457
  };
421
- type ReplaceAction = {
458
+ type ReplaceAction<UserData extends Data = Data> = {
422
459
  type: "replace";
423
460
  destinationIndex: number;
424
461
  destinationZone: string;
425
- data: any;
462
+ data: ComponentData;
463
+ ui?: Partial<AppState<UserData>["ui"]>;
464
+ };
465
+ type ReplaceRootAction<UserData extends Data = Data> = {
466
+ type: "replaceRoot";
467
+ root: RootData;
468
+ ui?: Partial<AppState<UserData>["ui"]>;
426
469
  };
427
470
  type ReorderAction = {
428
471
  type: "reorder";
@@ -452,7 +495,7 @@ type SetDataAction = {
452
495
  };
453
496
  type SetAction<UserData extends Data = Data> = {
454
497
  type: "set";
455
- state: Partial<AppState<UserData>> | ((previous: AppState<UserData>) => Partial<AppState<UserData>>);
498
+ state: Partial<PrivateAppState<UserData>> | ((previous: PrivateAppState<UserData>) => Partial<PrivateAppState<UserData>>);
456
499
  };
457
500
  type RegisterZoneAction = {
458
501
  type: "registerZone";
@@ -464,8 +507,19 @@ type UnregisterZoneAction = {
464
507
  };
465
508
  type PuckAction = {
466
509
  recordHistory?: boolean;
467
- } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
510
+ } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
511
+
512
+ type PropTransform<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps> = Partial<{
513
+ [ComponentName in keyof Props]: (props: Props[ComponentName] & {
514
+ [key: string]: any;
515
+ }) => Props[ComponentName];
516
+ } & {
517
+ root: (props: RootProps & {
518
+ [key: string]: any;
519
+ }) => RootProps;
520
+ }>;
521
+ declare function transformProps<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps>(data: Partial<Data>, propTransforms: PropTransform<Props, RootProps>): Data;
468
522
 
469
523
  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>>;
470
524
 
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 };
525
+ export { type PuckContext as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type BaseField as E, type Fields as F, type TextareaField as G, type History as H, type IframeConfig as I, type SelectField as J, type RadioField as K, type ArrayField as L, type Metadata as M, type NumberField as N, type Overrides as O, type Permissions as P, type ObjectField as Q, type RootDataWithProps as R, type Slot as S, type TextField as T, type UserGenerics as U, type Viewports as V, type Adaptor as W, type ExternalFieldWithAdaptor as X, type ExternalField as Y, type CustomField as Z, type SlotField as _, type ComponentData as a, type DefaultRootFieldProps as a0, type DefaultRootRenderProps as a1, type DefaultRootProps as a2, type DefaultComponentProps as a3, type WithId as a4, type WithPuckProps as a5, type AsFieldProps as a6, type WithChildren as a7, type ExtractPropsFromConfig as a8, type ExtractRootPropsFromConfig as a9, transformProps as aa, resolveAllData as ab, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldProps as g, type Field as h, type Data as i, type OnAction as j, type InitialHistory 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 RootConfig as u, type RootDataWithoutProps as v, type RootData as w, type MappedItem as x, type ComponentDataMap as y, type Content as z };
@@ -22,6 +22,7 @@ type FieldOption = {
22
22
  type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
23
23
  type BaseField = {
24
24
  label?: string;
25
+ labelIcon?: ReactElement;
25
26
  };
26
27
  type TextField = BaseField & {
27
28
  type: "text";
@@ -119,6 +120,9 @@ type CustomField<Props extends any = {}> = BaseField & {
119
120
  readOnly?: boolean;
120
121
  }) => ReactElement;
121
122
  };
123
+ type SlotField = BaseField & {
124
+ type: "slot";
125
+ };
122
126
  type Field<Props extends any = any> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props extends {
123
127
  [key: string]: any;
124
128
  } ? Props : any> | ObjectField<Props extends {
@@ -127,7 +131,7 @@ type Field<Props extends any = any> = TextField | NumberField | TextareaField |
127
131
  [key: string]: any;
128
132
  } ? Props : any> | ExternalFieldWithAdaptor<Props extends {
129
133
  [key: string]: any;
130
- } ? Props : any> | CustomField<Props>;
134
+ } ? Props : any> | CustomField<Props> | SlotField;
131
135
  type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps> = {
132
136
  [PropName in keyof Omit<ComponentProps, "editMode">]: Field<ComponentProps[PropName]>;
133
137
  };
@@ -140,15 +144,20 @@ type FieldProps<F = Field<any>, ValueType = any> = {
140
144
  };
141
145
 
142
146
  type PuckComponent<Props> = (props: WithId<WithPuckProps<Props>>) => JSX.Element;
147
+ type ResolveDataTrigger = "insert" | "replace" | "load" | "force";
143
148
  type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponentProps, FieldProps extends DefaultComponentProps = RenderProps, DataShape = Omit<ComponentData<FieldProps>, "type">> = {
144
- render: PuckComponent<RenderProps>;
149
+ render: PuckComponent<{
150
+ [PropName in keyof RenderProps]: RenderProps[PropName] extends Slot ? (props?: Omit<DropZoneProps, "zone">) => ReactNode : RenderProps[PropName];
151
+ }>;
145
152
  label?: string;
146
153
  defaultProps?: FieldProps;
147
154
  fields?: Fields<FieldProps>;
148
155
  permissions?: Partial<Permissions>;
149
156
  inline?: boolean;
150
157
  resolveFields?: (data: DataShape, params: {
151
- changed: Partial<Record<keyof FieldProps, boolean>>;
158
+ changed: Partial<Record<keyof FieldProps, boolean> & {
159
+ id: string;
160
+ }>;
152
161
  fields: Fields<FieldProps>;
153
162
  lastFields: Fields<FieldProps>;
154
163
  lastData: DataShape | null;
@@ -156,9 +165,12 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
156
165
  parent: ComponentData | null;
157
166
  }) => Promise<Fields<FieldProps>> | Fields<FieldProps>;
158
167
  resolveData?: (data: DataShape, params: {
159
- changed: Partial<Record<keyof FieldProps, boolean>>;
168
+ changed: Partial<Record<keyof FieldProps, boolean> & {
169
+ id: string;
170
+ }>;
160
171
  lastData: DataShape | null;
161
172
  metadata: Metadata;
173
+ trigger: ResolveDataTrigger;
162
174
  }) => Promise<{
163
175
  props?: Partial<FieldProps>;
164
176
  readOnly?: Partial<Record<keyof FieldProps, boolean>>;
@@ -167,13 +179,16 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
167
179
  readOnly?: Partial<Record<keyof FieldProps, boolean>>;
168
180
  };
169
181
  resolvePermissions?: (data: DataShape, params: {
170
- changed: Partial<Record<keyof FieldProps, boolean>>;
182
+ changed: Partial<Record<keyof FieldProps, boolean> & {
183
+ id: string;
184
+ }>;
171
185
  lastPermissions: Partial<Permissions>;
172
186
  permissions: Partial<Permissions>;
173
187
  appState: AppState;
174
188
  lastData: DataShape | null;
175
189
  }) => Promise<Partial<Permissions>> | Partial<Permissions>;
176
190
  };
191
+ type RootConfig<RootProps extends DefaultComponentProps = any> = Partial<ComponentConfig<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
177
192
  type Category<ComponentName> = {
178
193
  components?: ComponentName[];
179
194
  title?: string;
@@ -187,7 +202,7 @@ type Config<Props extends DefaultComponentProps = DefaultComponentProps, RootPro
187
202
  components: {
188
203
  [ComponentName in keyof Props]: Omit<ComponentConfig<Props[ComponentName], Props[ComponentName]>, "type">;
189
204
  };
190
- root?: Partial<ComponentConfig<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
205
+ root?: RootConfig<RootProps>;
191
206
  };
192
207
 
193
208
  type WithId<Props> = Props & {
@@ -203,7 +218,7 @@ type WithChildren<Props> = Props & {
203
218
  };
204
219
  type ExtractPropsFromConfig<UserConfig> = UserConfig extends Config<infer P, any, any> ? P : never;
205
220
  type ExtractRootPropsFromConfig<UserConfig> = UserConfig extends Config<any, infer P, any> ? P : never;
206
- type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractPropsFromConfig<UserConfig> = ExtractPropsFromConfig<UserConfig>, UserRootProps extends ExtractRootPropsFromConfig<UserConfig> = ExtractRootPropsFromConfig<UserConfig>, UserData extends Data<UserProps, UserRootProps> | Data = Data<UserProps, UserRootProps>, UserAppState extends AppState<UserData> = AppState<UserData>, UserComponentData extends ComponentData = UserData["content"][0]> = {
221
+ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractPropsFromConfig<UserConfig> = ExtractPropsFromConfig<UserConfig>, UserRootProps extends ExtractRootPropsFromConfig<UserConfig> = ExtractRootPropsFromConfig<UserConfig>, UserData extends Data<UserProps, UserRootProps> | Data = Data<UserProps, UserRootProps>, UserAppState extends PrivateAppState<UserData> = PrivateAppState<UserData>, UserComponentData extends ComponentData = UserData["content"][0]> = {
207
222
  UserConfig: UserConfig;
208
223
  UserProps: UserProps;
209
224
  UserRootProps: UserRootProps;
@@ -299,6 +314,27 @@ type AppState<UserData extends Data = Data> = {
299
314
  ui: UiState;
300
315
  };
301
316
 
317
+ type ZoneType = "root" | "dropzone" | "slot";
318
+ type PuckNodeData = {
319
+ data: ComponentData;
320
+ flatData: ComponentData;
321
+ parentId: string | null;
322
+ zone: string;
323
+ path: string[];
324
+ };
325
+ type PuckZoneData = {
326
+ contentIds: string[];
327
+ type: ZoneType;
328
+ };
329
+ type NodeIndex = Record<string, PuckNodeData>;
330
+ type ZoneIndex = Record<string, PuckZoneData>;
331
+ type PrivateAppState<UserData extends Data = Data> = AppState<UserData> & {
332
+ indexes: {
333
+ nodes: NodeIndex;
334
+ zones: ZoneIndex;
335
+ };
336
+ };
337
+
302
338
  type RenderFunc<Props extends {
303
339
  [key: string]: any;
304
340
  } = {
@@ -405,6 +441,7 @@ type InitialHistoryNoAppend<AS = Partial<AppState>> = {
405
441
  appendData?: false;
406
442
  };
407
443
  type InitialHistory<AS = Partial<AppState>> = InitialHistoryAppend<AS> | InitialHistoryNoAppend<AS>;
444
+ type Slot = Content;
408
445
 
409
446
  type InsertAction = {
410
447
  type: "insert";
@@ -418,11 +455,17 @@ type DuplicateAction = {
418
455
  sourceIndex: number;
419
456
  sourceZone: string;
420
457
  };
421
- type ReplaceAction = {
458
+ type ReplaceAction<UserData extends Data = Data> = {
422
459
  type: "replace";
423
460
  destinationIndex: number;
424
461
  destinationZone: string;
425
- data: any;
462
+ data: ComponentData;
463
+ ui?: Partial<AppState<UserData>["ui"]>;
464
+ };
465
+ type ReplaceRootAction<UserData extends Data = Data> = {
466
+ type: "replaceRoot";
467
+ root: RootData;
468
+ ui?: Partial<AppState<UserData>["ui"]>;
426
469
  };
427
470
  type ReorderAction = {
428
471
  type: "reorder";
@@ -452,7 +495,7 @@ type SetDataAction = {
452
495
  };
453
496
  type SetAction<UserData extends Data = Data> = {
454
497
  type: "set";
455
- state: Partial<AppState<UserData>> | ((previous: AppState<UserData>) => Partial<AppState<UserData>>);
498
+ state: Partial<PrivateAppState<UserData>> | ((previous: PrivateAppState<UserData>) => Partial<PrivateAppState<UserData>>);
456
499
  };
457
500
  type RegisterZoneAction = {
458
501
  type: "registerZone";
@@ -464,8 +507,19 @@ type UnregisterZoneAction = {
464
507
  };
465
508
  type PuckAction = {
466
509
  recordHistory?: boolean;
467
- } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
510
+ } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
511
+
512
+ type PropTransform<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps> = Partial<{
513
+ [ComponentName in keyof Props]: (props: Props[ComponentName] & {
514
+ [key: string]: any;
515
+ }) => Props[ComponentName];
516
+ } & {
517
+ root: (props: RootProps & {
518
+ [key: string]: any;
519
+ }) => RootProps;
520
+ }>;
521
+ declare function transformProps<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends DefaultComponentProps = DefaultRootFieldProps>(data: Partial<Data>, propTransforms: PropTransform<Props, RootProps>): Data;
468
522
 
469
523
  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>>;
470
524
 
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 };
525
+ export { type PuckContext as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type BaseField as E, type Fields as F, type TextareaField as G, type History as H, type IframeConfig as I, type SelectField as J, type RadioField as K, type ArrayField as L, type Metadata as M, type NumberField as N, type Overrides as O, type Permissions as P, type ObjectField as Q, type RootDataWithProps as R, type Slot as S, type TextField as T, type UserGenerics as U, type Viewports as V, type Adaptor as W, type ExternalFieldWithAdaptor as X, type ExternalField as Y, type CustomField as Z, type SlotField as _, type ComponentData as a, type DefaultRootFieldProps as a0, type DefaultRootRenderProps as a1, type DefaultRootProps as a2, type DefaultComponentProps as a3, type WithId as a4, type WithPuckProps as a5, type AsFieldProps as a6, type WithChildren as a7, type ExtractPropsFromConfig as a8, type ExtractRootPropsFromConfig as a9, transformProps as aa, resolveAllData as ab, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldProps as g, type Field as h, type Data as i, type OnAction as j, type InitialHistory 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 RootConfig as u, type RootDataWithoutProps as v, type RootData as w, type MappedItem as x, type ComponentDataMap as y, type Content as z };