@measured/puck 0.17.4 → 0.18.0-canary.00f3e0f
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-LNGCTWA7.mjs → chunk-CHWFBYEM.mjs} +10 -0
- package/dist/index.css +252 -205
- package/dist/index.d.mts +28 -18
- package/dist/index.d.ts +28 -18
- package/dist/index.js +3487 -1799
- package/dist/index.mjs +3571 -1865
- 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.mjs +1 -1
- package/package.json +5 -5
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;
|
@@ -99,10 +100,13 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
99
100
|
unregisterZone?: (zoneCompound: string) => void;
|
100
101
|
activeZones?: Record<string, boolean>;
|
101
102
|
pathData?: PathData;
|
102
|
-
registerPath?: (selector: ItemSelector) => void;
|
103
|
+
registerPath?: (id: string, selector: ItemSelector, label: string) => void;
|
104
|
+
unregisterPath?: (id: string) => void;
|
103
105
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
106
|
+
depth: number;
|
107
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
108
|
+
unregisterLocalZone?: (zone: string) => void;
|
109
|
+
path: string[];
|
106
110
|
} | null;
|
107
111
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
112
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,7 +114,13 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
114
|
value: DropZoneContext;
|
111
115
|
}) => react_jsx_runtime.JSX.Element;
|
112
116
|
|
113
|
-
|
117
|
+
type DropZoneDndData = {
|
118
|
+
areaId?: string;
|
119
|
+
depth: number;
|
120
|
+
path: UniqueIdentifier[];
|
121
|
+
isDroppableTarget: boolean;
|
122
|
+
};
|
123
|
+
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
114
124
|
|
115
125
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
116
126
|
children: ReactNode;
|
@@ -226,4 +236,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
226
236
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
227
237
|
};
|
228
238
|
|
229
|
-
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 };
|
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 };
|
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;
|
@@ -99,10 +100,13 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
99
100
|
unregisterZone?: (zoneCompound: string) => void;
|
100
101
|
activeZones?: Record<string, boolean>;
|
101
102
|
pathData?: PathData;
|
102
|
-
registerPath?: (selector: ItemSelector) => void;
|
103
|
+
registerPath?: (id: string, selector: ItemSelector, label: string) => void;
|
104
|
+
unregisterPath?: (id: string) => void;
|
103
105
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
106
|
+
depth: number;
|
107
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
108
|
+
unregisterLocalZone?: (zone: string) => void;
|
109
|
+
path: string[];
|
106
110
|
} | null;
|
107
111
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
112
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,7 +114,13 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
114
|
value: DropZoneContext;
|
111
115
|
}) => react_jsx_runtime.JSX.Element;
|
112
116
|
|
113
|
-
|
117
|
+
type DropZoneDndData = {
|
118
|
+
areaId?: string;
|
119
|
+
depth: number;
|
120
|
+
path: UniqueIdentifier[];
|
121
|
+
isDroppableTarget: boolean;
|
122
|
+
};
|
123
|
+
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
114
124
|
|
115
125
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
116
126
|
children: ReactNode;
|
@@ -226,4 +236,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
226
236
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
227
237
|
};
|
228
238
|
|
229
|
-
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 };
|
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 };
|