@measured/puck 0.17.2-canary.bbe0a8d → 0.18.0-canary.b355ddd
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/{chunk-7IH6SUIT.mjs → chunk-EXKSBUY5.mjs} +10 -0
- package/dist/index.css +193 -138
- package/dist/index.d.mts +32 -16
- package/dist/index.d.ts +32 -16
- package/dist/index.js +3248 -1809
- package/dist/index.mjs +3257 -1800
- package/dist/{resolve-all-data-zN5E6nBu.d.mts → resolve-all-data-GYzT3ont.d.mts} +10 -1
- package/dist/{resolve-all-data-zN5E6nBu.d.ts → resolve-all-data-GYzT3ont.d.ts} +10 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.mjs +1 -1
- package/package.json +4 -3
package/dist/index.d.mts
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-
|
2
|
-
export {
|
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-GYzT3ont.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-GYzT3ont.mjs';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
|
-
import { ReactNode, SyntheticEvent, ReactElement
|
6
|
-
import {
|
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
|
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
|
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
|
-
|
89
|
-
|
90
|
-
|
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,14 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
105
|
pathData?: PathData;
|
102
106
|
registerPath?: (selector: ItemSelector) => void;
|
103
107
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
108
|
+
depth: number;
|
109
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
110
|
+
unregisterLocalZone?: (zone: string) => void;
|
111
|
+
deepestZone?: string | null;
|
112
|
+
deepestArea?: string | null;
|
113
|
+
nextDeepestZone?: string | null;
|
114
|
+
nextDeepestArea?: string | null;
|
115
|
+
path: string[];
|
106
116
|
} | null;
|
107
117
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
118
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,7 +120,13 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
120
|
value: DropZoneContext;
|
111
121
|
}) => react_jsx_runtime.JSX.Element;
|
112
122
|
|
113
|
-
|
123
|
+
type DropZoneDndData = {
|
124
|
+
areaId?: string;
|
125
|
+
depth: number;
|
126
|
+
path: UniqueIdentifier[];
|
127
|
+
isDroppableTarget: boolean;
|
128
|
+
};
|
129
|
+
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
114
130
|
|
115
131
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
116
132
|
children: ReactNode;
|
@@ -224,4 +240,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
224
240
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
225
241
|
};
|
226
242
|
|
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 };
|
243
|
+
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 };
|
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-
|
2
|
-
export {
|
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-GYzT3ont.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-GYzT3ont.js';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
|
-
import { ReactNode, SyntheticEvent, ReactElement
|
6
|
-
import {
|
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
|
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
|
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
|
-
|
89
|
-
|
90
|
-
|
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,14 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
105
|
pathData?: PathData;
|
102
106
|
registerPath?: (selector: ItemSelector) => void;
|
103
107
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
108
|
+
depth: number;
|
109
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
110
|
+
unregisterLocalZone?: (zone: string) => void;
|
111
|
+
deepestZone?: string | null;
|
112
|
+
deepestArea?: string | null;
|
113
|
+
nextDeepestZone?: string | null;
|
114
|
+
nextDeepestArea?: string | null;
|
115
|
+
path: string[];
|
106
116
|
} | null;
|
107
117
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
118
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,7 +120,13 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
120
|
value: DropZoneContext;
|
111
121
|
}) => react_jsx_runtime.JSX.Element;
|
112
122
|
|
113
|
-
|
123
|
+
type DropZoneDndData = {
|
124
|
+
areaId?: string;
|
125
|
+
depth: number;
|
126
|
+
path: UniqueIdentifier[];
|
127
|
+
isDroppableTarget: boolean;
|
128
|
+
};
|
129
|
+
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
114
130
|
|
115
131
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
116
132
|
children: ReactNode;
|
@@ -224,4 +240,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
224
240
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
225
241
|
};
|
226
242
|
|
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 };
|
243
|
+
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 };
|