@measured/puck 0.20.0-canary.7d869af1 → 0.20.0-canary.7ec3c0b9

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.
package/dist/rsc.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  resolveAllData,
6
6
  transformProps,
7
7
  walkTree
8
- } from "./chunk-IP64IXIP.mjs";
8
+ } from "./chunk-HUKJ36SA.mjs";
9
9
 
10
10
  // bundle/rsc.tsx
11
11
  init_react_import();
@@ -284,6 +284,7 @@ type Metadata = {
284
284
  type ItemWithId = {
285
285
  _arrayId: string;
286
286
  _originalIndex: number;
287
+ _currentIndex: number;
287
288
  };
288
289
  type ArrayState = {
289
290
  items: ItemWithId[];
@@ -349,6 +350,11 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
349
350
  type WithDeepSlots<T, SlotType = T> = T extends Slot ? SlotType : T extends (infer U)[] ? Array<WithDeepSlots<U, SlotType>> : T extends (infer U)[] ? WithDeepSlots<U, SlotType>[] : T extends BuiltinTypes ? T : T extends object ? {
350
351
  [K in keyof T]: WithDeepSlots<T[K], SlotType>;
351
352
  } : T;
353
+ type RenderFunc<Props extends {
354
+ [key: string]: any;
355
+ } = {
356
+ children: ReactNode;
357
+ }> = (props: Props) => ReactElement;
352
358
 
353
359
  type MapFnParams<ThisField = Field> = {
354
360
  value: any;
@@ -367,11 +373,6 @@ type FieldTransforms = Partial<{
367
373
  [FieldType in Field["type"]]: FieldTransformFn<ExtractField<FieldType>>;
368
374
  }>;
369
375
 
370
- type RenderFunc<Props extends {
371
- [key: string]: any;
372
- } = {
373
- children: ReactNode;
374
- }> = (props: Props) => ReactElement;
375
376
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
376
377
  type OverrideKey = (typeof overrideKeys)[number];
377
378
  type OverridesGeneric<Shape extends {
@@ -468,6 +469,10 @@ type IframeConfig = {
468
469
  };
469
470
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
470
471
  type Plugin = {
472
+ name?: string;
473
+ label?: string;
474
+ icon?: ReactNode;
475
+ render?: () => ReactElement;
471
476
  overrides?: Partial<Overrides>;
472
477
  fieldTransforms?: FieldTransforms;
473
478
  };
@@ -284,6 +284,7 @@ type Metadata = {
284
284
  type ItemWithId = {
285
285
  _arrayId: string;
286
286
  _originalIndex: number;
287
+ _currentIndex: number;
287
288
  };
288
289
  type ArrayState = {
289
290
  items: ItemWithId[];
@@ -349,6 +350,11 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
349
350
  type WithDeepSlots<T, SlotType = T> = T extends Slot ? SlotType : T extends (infer U)[] ? Array<WithDeepSlots<U, SlotType>> : T extends (infer U)[] ? WithDeepSlots<U, SlotType>[] : T extends BuiltinTypes ? T : T extends object ? {
350
351
  [K in keyof T]: WithDeepSlots<T[K], SlotType>;
351
352
  } : T;
353
+ type RenderFunc<Props extends {
354
+ [key: string]: any;
355
+ } = {
356
+ children: ReactNode;
357
+ }> = (props: Props) => ReactElement;
352
358
 
353
359
  type MapFnParams<ThisField = Field> = {
354
360
  value: any;
@@ -367,11 +373,6 @@ type FieldTransforms = Partial<{
367
373
  [FieldType in Field["type"]]: FieldTransformFn<ExtractField<FieldType>>;
368
374
  }>;
369
375
 
370
- type RenderFunc<Props extends {
371
- [key: string]: any;
372
- } = {
373
- children: ReactNode;
374
- }> = (props: Props) => ReactElement;
375
376
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
376
377
  type OverrideKey = (typeof overrideKeys)[number];
377
378
  type OverridesGeneric<Shape extends {
@@ -468,6 +469,10 @@ type IframeConfig = {
468
469
  };
469
470
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
470
471
  type Plugin = {
472
+ name?: string;
473
+ label?: string;
474
+ icon?: ReactNode;
475
+ render?: () => ReactElement;
471
476
  overrides?: Partial<Overrides>;
472
477
  fieldTransforms?: FieldTransforms;
473
478
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.20.0-canary.7d869af1",
3
+ "version": "0.20.0-canary.7ec3c0b9",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",