@measured/puck 0.20.0-canary.f2d031fb → 0.20.0-canary.f73c8fa0

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.
@@ -11,21 +11,23 @@ import {
11
11
  Label,
12
12
  Puck,
13
13
  Render,
14
+ blocksPlugin,
14
15
  createUsePuck,
16
+ outlinePlugin,
15
17
  overrideKeys,
16
18
  registerOverlayPortal,
17
19
  renderContext,
18
20
  setDeep,
19
21
  useGetPuck,
20
22
  usePuck
21
- } from "./chunk-PIG4I6UF.mjs";
23
+ } from "./chunk-UBWXLOVR.mjs";
22
24
  import {
23
25
  init_react_import,
24
26
  migrate,
25
27
  resolveAllData,
26
28
  transformProps,
27
29
  walkTree
28
- } from "./chunk-HUKJ36SA.mjs";
30
+ } from "./chunk-BNXRZWNI.mjs";
29
31
 
30
32
  // bundle/no-external.ts
31
33
  init_react_import();
@@ -42,8 +44,10 @@ export {
42
44
  Label,
43
45
  Puck,
44
46
  Render,
47
+ blocksPlugin,
45
48
  createUsePuck,
46
49
  migrate,
50
+ outlinePlugin,
47
51
  overrideKeys,
48
52
  registerOverlayPortal,
49
53
  renderContext,
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, M as Metadata } from './walk-tree-B57SgEEc.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-B57SgEEc.mjs';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Dn5XpDNA.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Dn5XpDNA.mjs';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
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, M as Metadata } from './walk-tree-B57SgEEc.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-B57SgEEc.js';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Dn5XpDNA.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Dn5XpDNA.js';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
package/dist/rsc.js CHANGED
@@ -694,7 +694,8 @@ var defaultAppState = {
694
694
  options: [],
695
695
  controlsVisible: true
696
696
  },
697
- field: { focus: null }
697
+ field: { focus: null },
698
+ plugin: { current: null }
698
699
  },
699
700
  indexes: {
700
701
  nodes: {},
package/dist/rsc.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  resolveAllData,
6
6
  transformProps,
7
7
  walkTree
8
- } from "./chunk-HUKJ36SA.mjs";
8
+ } from "./chunk-BNXRZWNI.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[];
@@ -315,6 +316,9 @@ type UiState = {
315
316
  field: {
316
317
  focus?: string | null;
317
318
  };
319
+ plugin: {
320
+ current: string | null;
321
+ };
318
322
  };
319
323
  type AppState<UserData extends Data = Data> = {
320
324
  data: UserData;
@@ -349,6 +353,11 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
349
353
  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
354
  [K in keyof T]: WithDeepSlots<T[K], SlotType>;
351
355
  } : T;
356
+ type RenderFunc<Props extends {
357
+ [key: string]: any;
358
+ } = {
359
+ children: ReactNode;
360
+ }> = (props: Props) => ReactElement;
352
361
 
353
362
  type MapFnParams<ThisField = Field> = {
354
363
  value: any;
@@ -367,11 +376,6 @@ type FieldTransforms = Partial<{
367
376
  [FieldType in Field["type"]]: FieldTransformFn<ExtractField<FieldType>>;
368
377
  }>;
369
378
 
370
- type RenderFunc<Props extends {
371
- [key: string]: any;
372
- } = {
373
- children: ReactNode;
374
- }> = (props: Props) => ReactElement;
375
379
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
376
380
  type OverrideKey = (typeof overrideKeys)[number];
377
381
  type OverridesGeneric<Shape extends {
@@ -468,6 +472,10 @@ type IframeConfig = {
468
472
  };
469
473
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
470
474
  type Plugin = {
475
+ name?: string;
476
+ label?: string;
477
+ icon?: ReactNode;
478
+ render?: () => ReactElement;
471
479
  overrides?: Partial<Overrides>;
472
480
  fieldTransforms?: FieldTransforms;
473
481
  };
@@ -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[];
@@ -315,6 +316,9 @@ type UiState = {
315
316
  field: {
316
317
  focus?: string | null;
317
318
  };
319
+ plugin: {
320
+ current: string | null;
321
+ };
318
322
  };
319
323
  type AppState<UserData extends Data = Data> = {
320
324
  data: UserData;
@@ -349,6 +353,11 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
349
353
  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
354
  [K in keyof T]: WithDeepSlots<T[K], SlotType>;
351
355
  } : T;
356
+ type RenderFunc<Props extends {
357
+ [key: string]: any;
358
+ } = {
359
+ children: ReactNode;
360
+ }> = (props: Props) => ReactElement;
352
361
 
353
362
  type MapFnParams<ThisField = Field> = {
354
363
  value: any;
@@ -367,11 +376,6 @@ type FieldTransforms = Partial<{
367
376
  [FieldType in Field["type"]]: FieldTransformFn<ExtractField<FieldType>>;
368
377
  }>;
369
378
 
370
- type RenderFunc<Props extends {
371
- [key: string]: any;
372
- } = {
373
- children: ReactNode;
374
- }> = (props: Props) => ReactElement;
375
379
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
376
380
  type OverrideKey = (typeof overrideKeys)[number];
377
381
  type OverridesGeneric<Shape extends {
@@ -468,6 +472,10 @@ type IframeConfig = {
468
472
  };
469
473
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
470
474
  type Plugin = {
475
+ name?: string;
476
+ label?: string;
477
+ icon?: ReactNode;
478
+ render?: () => ReactElement;
471
479
  overrides?: Partial<Overrides>;
472
480
  fieldTransforms?: FieldTransforms;
473
481
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.20.0-canary.f2d031fb",
3
+ "version": "0.20.0-canary.f73c8fa0",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",