@measured/puck 0.17.0-canary.35170f8 → 0.17.0-canary.5e57623

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.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, 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-Ch-Pcasj.js';
2
- export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-Ch-Pcasj.js';
1
+ import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, 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-ZKVfUAQq.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-ZKVfUAQq.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
- import { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
6
- import { DragStart, DragUpdate } from '@measured/dnd';
5
+ import { ReactNode, SyntheticEvent, ReactElement } from 'react';
6
+ import { UniqueIdentifier } from '@dnd-kit/abstract';
7
+ import { Draggable } from '@dnd-kit/dom';
7
8
 
8
9
  declare const ActionBar: {
9
10
  ({ label, children, }: {
@@ -15,6 +16,9 @@ declare const ActionBar: {
15
16
  label?: string;
16
17
  onClick: (e: SyntheticEvent) => void;
17
18
  }) => react_jsx_runtime.JSX.Element;
19
+ Label: ({ label }: {
20
+ label: string;
21
+ }) => react_jsx_runtime.JSX.Element;
18
22
  Group: ({ children }: {
19
23
  children: ReactNode;
20
24
  }) => react_jsx_runtime.JSX.Element;
@@ -27,6 +31,9 @@ declare const Action: ({ children, label, onClick, }: {
27
31
  declare const Group: ({ children }: {
28
32
  children: ReactNode;
29
33
  }) => react_jsx_runtime.JSX.Element;
34
+ declare const Label: ({ label }: {
35
+ label: string;
36
+ }) => react_jsx_runtime.JSX.Element;
30
37
 
31
38
  declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
32
39
  children?: ReactNode;
@@ -55,7 +62,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
55
62
  }) => react_jsx_runtime.JSX.Element;
56
63
 
57
64
  declare const Drawer: {
58
- ({ children, droppableId: _droppableId, direction, }: {
65
+ ({ children, droppableId, direction, }: {
59
66
  children: ReactNode;
60
67
  droppableId?: string;
61
68
  direction?: "vertical" | "horizontal";
@@ -68,7 +75,7 @@ declare const Drawer: {
68
75
  }) => ReactElement;
69
76
  id?: string;
70
77
  label?: string;
71
- index: number;
78
+ index?: number;
72
79
  isDragDisabled?: boolean;
73
80
  }) => react_jsx_runtime.JSX.Element;
74
81
  };
@@ -85,12 +92,9 @@ type DropZoneContext<UserConfig extends Config = Config> = {
85
92
  setItemSelector?: (newIndex: ItemSelector | null) => void;
86
93
  dispatch?: (action: PuckAction) => void;
87
94
  areaId?: string;
88
- draggedItem?: DragStart & Partial<DragUpdate>;
89
- placeholderStyle?: CSSProperties;
90
- hoveringArea?: string | null;
91
- setHoveringArea?: (area: string | null) => void;
92
- hoveringZone?: string | null;
93
- setHoveringZone?: (zone: string | null) => void;
95
+ zoneCompound?: string;
96
+ index?: number;
97
+ draggedItem?: Draggable | null;
94
98
  hoveringComponent?: string | null;
95
99
  setHoveringComponent?: (id: string | null) => void;
96
100
  registerZoneArea?: (areaId: string) => void;
@@ -101,8 +105,13 @@ type DropZoneContext<UserConfig extends Config = Config> = {
101
105
  pathData?: PathData;
102
106
  registerPath?: (selector: ItemSelector) => void;
103
107
  mode?: "edit" | "render";
104
- zoneWillDrag?: string;
105
- setZoneWillDrag?: (zone: string) => void;
108
+ depth: number;
109
+ registerLocalZone?: (zone: string, active: boolean) => void;
110
+ deepestZone?: string | null;
111
+ deepestArea?: string | null;
112
+ nextDeepestZone?: string | null;
113
+ nextDeepestArea?: string | null;
114
+ path: string[];
106
115
  } | null;
107
116
  declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
108
117
  declare const DropZoneProvider: ({ children, value, }: {
@@ -110,6 +119,12 @@ declare const DropZoneProvider: ({ children, value, }: {
110
119
  value: DropZoneContext;
111
120
  }) => react_jsx_runtime.JSX.Element;
112
121
 
122
+ type DropZoneDndData = {
123
+ areaId?: string;
124
+ depth: number;
125
+ path: UniqueIdentifier[];
126
+ isDroppableTarget: boolean;
127
+ };
113
128
  declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
114
129
 
115
130
  declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
@@ -224,4 +239,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
224
239
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
225
240
  };
226
241
 
227
- export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
242
+ 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 };