@measured/puck 0.17.2-canary.f323610 → 0.18.0-canary.1ea6f98
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-CHWFBYEM.mjs} +12 -4
- package/dist/index.css +220 -172
- package/dist/index.d.mts +26 -17
- package/dist/index.d.ts +26 -17
- package/dist/index.js +3645 -1877
- package/dist/index.mjs +3681 -1892
- package/dist/{resolve-all-data-zN5E6nBu.d.mts → resolve-all-data-DzJEE28m.d.mts} +11 -1
- package/dist/{resolve-all-data-zN5E6nBu.d.ts → resolve-all-data-DzJEE28m.d.ts} +11 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +2 -4
- package/dist/rsc.mjs +1 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector,
|
2
|
-
export {
|
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';
|
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
7
|
|
8
8
|
declare const ActionBar: {
|
9
9
|
({ label, children, }: {
|
@@ -15,6 +15,9 @@ declare const ActionBar: {
|
|
15
15
|
label?: string;
|
16
16
|
onClick: (e: SyntheticEvent) => void;
|
17
17
|
}) => react_jsx_runtime.JSX.Element;
|
18
|
+
Label: ({ label }: {
|
19
|
+
label: string;
|
20
|
+
}) => react_jsx_runtime.JSX.Element;
|
18
21
|
Group: ({ children }: {
|
19
22
|
children: ReactNode;
|
20
23
|
}) => react_jsx_runtime.JSX.Element;
|
@@ -27,6 +30,9 @@ declare const Action: ({ children, label, onClick, }: {
|
|
27
30
|
declare const Group: ({ children }: {
|
28
31
|
children: ReactNode;
|
29
32
|
}) => react_jsx_runtime.JSX.Element;
|
33
|
+
declare const Label: ({ label }: {
|
34
|
+
label: string;
|
35
|
+
}) => react_jsx_runtime.JSX.Element;
|
30
36
|
|
31
37
|
declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
|
32
38
|
children?: ReactNode;
|
@@ -55,7 +61,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
55
61
|
}) => react_jsx_runtime.JSX.Element;
|
56
62
|
|
57
63
|
declare const Drawer: {
|
58
|
-
({ children, droppableId
|
64
|
+
({ children, droppableId, direction, }: {
|
59
65
|
children: ReactNode;
|
60
66
|
droppableId?: string;
|
61
67
|
direction?: "vertical" | "horizontal";
|
@@ -68,7 +74,7 @@ declare const Drawer: {
|
|
68
74
|
}) => ReactElement;
|
69
75
|
id?: string;
|
70
76
|
label?: string;
|
71
|
-
index
|
77
|
+
index?: number;
|
72
78
|
isDragDisabled?: boolean;
|
73
79
|
}) => react_jsx_runtime.JSX.Element;
|
74
80
|
};
|
@@ -83,14 +89,9 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
83
89
|
componentState?: Record<string, any>;
|
84
90
|
itemSelector?: ItemSelector | null;
|
85
91
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
86
|
-
dispatch?: (action: PuckAction) => void;
|
87
92
|
areaId?: string;
|
88
|
-
|
89
|
-
|
90
|
-
hoveringArea?: string | null;
|
91
|
-
setHoveringArea?: (area: string | null) => void;
|
92
|
-
hoveringZone?: string | null;
|
93
|
-
setHoveringZone?: (zone: string | null) => void;
|
93
|
+
zoneCompound?: string;
|
94
|
+
index?: number;
|
94
95
|
hoveringComponent?: string | null;
|
95
96
|
setHoveringComponent?: (id: string | null) => void;
|
96
97
|
registerZoneArea?: (areaId: string) => void;
|
@@ -101,8 +102,10 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
102
|
pathData?: PathData;
|
102
103
|
registerPath?: (selector: ItemSelector) => void;
|
103
104
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
105
|
+
depth: number;
|
106
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
107
|
+
unregisterLocalZone?: (zone: string) => void;
|
108
|
+
path: string[];
|
106
109
|
} | null;
|
107
110
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
111
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,7 +113,13 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
113
|
value: DropZoneContext;
|
111
114
|
}) => react_jsx_runtime.JSX.Element;
|
112
115
|
|
113
|
-
|
116
|
+
type DropZoneDndData = {
|
117
|
+
areaId?: string;
|
118
|
+
depth: number;
|
119
|
+
path: UniqueIdentifier[];
|
120
|
+
isDroppableTarget: boolean;
|
121
|
+
};
|
122
|
+
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
114
123
|
|
115
124
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
116
125
|
children: ReactNode;
|
@@ -224,4 +233,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
224
233
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
225
234
|
};
|
226
235
|
|
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 };
|
236
|
+
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,9 @@
|
|
1
|
-
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector,
|
2
|
-
export {
|
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';
|
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
7
|
|
8
8
|
declare const ActionBar: {
|
9
9
|
({ label, children, }: {
|
@@ -15,6 +15,9 @@ declare const ActionBar: {
|
|
15
15
|
label?: string;
|
16
16
|
onClick: (e: SyntheticEvent) => void;
|
17
17
|
}) => react_jsx_runtime.JSX.Element;
|
18
|
+
Label: ({ label }: {
|
19
|
+
label: string;
|
20
|
+
}) => react_jsx_runtime.JSX.Element;
|
18
21
|
Group: ({ children }: {
|
19
22
|
children: ReactNode;
|
20
23
|
}) => react_jsx_runtime.JSX.Element;
|
@@ -27,6 +30,9 @@ declare const Action: ({ children, label, onClick, }: {
|
|
27
30
|
declare const Group: ({ children }: {
|
28
31
|
children: ReactNode;
|
29
32
|
}) => react_jsx_runtime.JSX.Element;
|
33
|
+
declare const Label: ({ label }: {
|
34
|
+
label: string;
|
35
|
+
}) => react_jsx_runtime.JSX.Element;
|
30
36
|
|
31
37
|
declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
|
32
38
|
children?: ReactNode;
|
@@ -55,7 +61,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
55
61
|
}) => react_jsx_runtime.JSX.Element;
|
56
62
|
|
57
63
|
declare const Drawer: {
|
58
|
-
({ children, droppableId
|
64
|
+
({ children, droppableId, direction, }: {
|
59
65
|
children: ReactNode;
|
60
66
|
droppableId?: string;
|
61
67
|
direction?: "vertical" | "horizontal";
|
@@ -68,7 +74,7 @@ declare const Drawer: {
|
|
68
74
|
}) => ReactElement;
|
69
75
|
id?: string;
|
70
76
|
label?: string;
|
71
|
-
index
|
77
|
+
index?: number;
|
72
78
|
isDragDisabled?: boolean;
|
73
79
|
}) => react_jsx_runtime.JSX.Element;
|
74
80
|
};
|
@@ -83,14 +89,9 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
83
89
|
componentState?: Record<string, any>;
|
84
90
|
itemSelector?: ItemSelector | null;
|
85
91
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
86
|
-
dispatch?: (action: PuckAction) => void;
|
87
92
|
areaId?: string;
|
88
|
-
|
89
|
-
|
90
|
-
hoveringArea?: string | null;
|
91
|
-
setHoveringArea?: (area: string | null) => void;
|
92
|
-
hoveringZone?: string | null;
|
93
|
-
setHoveringZone?: (zone: string | null) => void;
|
93
|
+
zoneCompound?: string;
|
94
|
+
index?: number;
|
94
95
|
hoveringComponent?: string | null;
|
95
96
|
setHoveringComponent?: (id: string | null) => void;
|
96
97
|
registerZoneArea?: (areaId: string) => void;
|
@@ -101,8 +102,10 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
102
|
pathData?: PathData;
|
102
103
|
registerPath?: (selector: ItemSelector) => void;
|
103
104
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
105
|
+
depth: number;
|
106
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
107
|
+
unregisterLocalZone?: (zone: string) => void;
|
108
|
+
path: string[];
|
106
109
|
} | null;
|
107
110
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
111
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,7 +113,13 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
113
|
value: DropZoneContext;
|
111
114
|
}) => react_jsx_runtime.JSX.Element;
|
112
115
|
|
113
|
-
|
116
|
+
type DropZoneDndData = {
|
117
|
+
areaId?: string;
|
118
|
+
depth: number;
|
119
|
+
path: UniqueIdentifier[];
|
120
|
+
isDroppableTarget: boolean;
|
121
|
+
};
|
122
|
+
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
114
123
|
|
115
124
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
116
125
|
children: ReactNode;
|
@@ -224,4 +233,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
224
233
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
225
234
|
};
|
226
235
|
|
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 };
|
236
|
+
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 };
|