@measured/puck 0.18.1 → 0.18.2-canary.29a7f1d

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/index.d.mts CHANGED
@@ -1,9 +1,8 @@
1
- import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-DzJEE28m.mjs';
2
- export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-DzJEE28m.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-C-cc7ftj.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-C-cc7ftj.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';
6
- import { UniqueIdentifier } from '@dnd-kit/abstract';
7
6
 
8
7
  declare const ActionBar: {
9
8
  ({ label, children, }: {
@@ -79,47 +78,6 @@ declare const Drawer: {
79
78
  }) => react_jsx_runtime.JSX.Element;
80
79
  };
81
80
 
82
- type PathData = Record<string, {
83
- path: string[];
84
- label: string;
85
- }>;
86
- type DropZoneContext<UserConfig extends Config = Config> = {
87
- data: Data;
88
- config: UserConfig;
89
- componentState?: Record<string, any>;
90
- itemSelector?: ItemSelector | null;
91
- setItemSelector?: (newIndex: ItemSelector | null) => void;
92
- areaId?: string;
93
- zoneCompound?: string;
94
- index?: number;
95
- hoveringComponent?: string | null;
96
- setHoveringComponent?: (id: string | null) => void;
97
- registerZoneArea?: (areaId: string) => void;
98
- areasWithZones?: Record<string, boolean>;
99
- registerZone?: (zoneCompound: string) => void;
100
- unregisterZone?: (zoneCompound: string) => void;
101
- activeZones?: Record<string, boolean>;
102
- pathData?: PathData;
103
- registerPath?: (id: string, selector: ItemSelector, label: string) => void;
104
- unregisterPath?: (id: string) => void;
105
- mode?: "edit" | "render";
106
- depth: number;
107
- registerLocalZone?: (zone: string, active: boolean) => void;
108
- unregisterLocalZone?: (zone: string) => void;
109
- path: string[];
110
- } | null;
111
- declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
112
- declare const DropZoneProvider: ({ children, value, }: {
113
- children: ReactNode;
114
- value: DropZoneContext;
115
- }) => react_jsx_runtime.JSX.Element;
116
-
117
- type DropZoneDndData = {
118
- areaId?: string;
119
- depth: number;
120
- path: UniqueIdentifier[];
121
- isDroppableTarget: boolean;
122
- };
123
81
  declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
124
82
 
125
83
  declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
@@ -236,4 +194,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
236
194
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
237
195
  };
238
196
 
239
- export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, 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,9 +1,8 @@
1
- import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-DzJEE28m.js';
2
- export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-DzJEE28m.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-C-cc7ftj.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-C-cc7ftj.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';
6
- import { UniqueIdentifier } from '@dnd-kit/abstract';
7
6
 
8
7
  declare const ActionBar: {
9
8
  ({ label, children, }: {
@@ -79,47 +78,6 @@ declare const Drawer: {
79
78
  }) => react_jsx_runtime.JSX.Element;
80
79
  };
81
80
 
82
- type PathData = Record<string, {
83
- path: string[];
84
- label: string;
85
- }>;
86
- type DropZoneContext<UserConfig extends Config = Config> = {
87
- data: Data;
88
- config: UserConfig;
89
- componentState?: Record<string, any>;
90
- itemSelector?: ItemSelector | null;
91
- setItemSelector?: (newIndex: ItemSelector | null) => void;
92
- areaId?: string;
93
- zoneCompound?: string;
94
- index?: number;
95
- hoveringComponent?: string | null;
96
- setHoveringComponent?: (id: string | null) => void;
97
- registerZoneArea?: (areaId: string) => void;
98
- areasWithZones?: Record<string, boolean>;
99
- registerZone?: (zoneCompound: string) => void;
100
- unregisterZone?: (zoneCompound: string) => void;
101
- activeZones?: Record<string, boolean>;
102
- pathData?: PathData;
103
- registerPath?: (id: string, selector: ItemSelector, label: string) => void;
104
- unregisterPath?: (id: string) => void;
105
- mode?: "edit" | "render";
106
- depth: number;
107
- registerLocalZone?: (zone: string, active: boolean) => void;
108
- unregisterLocalZone?: (zone: string) => void;
109
- path: string[];
110
- } | null;
111
- declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
112
- declare const DropZoneProvider: ({ children, value, }: {
113
- children: ReactNode;
114
- value: DropZoneContext;
115
- }) => react_jsx_runtime.JSX.Element;
116
-
117
- type DropZoneDndData = {
118
- areaId?: string;
119
- depth: number;
120
- path: UniqueIdentifier[];
121
- isDroppableTarget: boolean;
122
- };
123
81
  declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
124
82
 
125
83
  declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
@@ -236,4 +194,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
236
194
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
237
195
  };
238
196
 
239
- export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, 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 };