@measured/puck 0.17.0-canary.8ea38c3 → 0.17.0-canary.9de5e5e
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.css +147 -165
- package/dist/index.d.mts +24 -15
- package/dist/index.d.ts +24 -15
- package/dist/index.js +3441 -1477
- package/dist/index.mjs +3686 -1712
- package/dist/{resolve-all-data-CaVk1fIL.d.mts → resolve-all-data-Fx9YY5bj.d.mts} +17 -1
- package/dist/{resolve-all-data-CaVk1fIL.d.ts → resolve-all-data-Fx9YY5bj.d.ts} +17 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/package.json +4 -2
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-Fx9YY5bj.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-Fx9YY5bj.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, }: {
|
@@ -55,7 +56,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
55
56
|
}) => react_jsx_runtime.JSX.Element;
|
56
57
|
|
57
58
|
declare const Drawer: {
|
58
|
-
({ children, droppableId
|
59
|
+
({ children, droppableId, direction, }: {
|
59
60
|
children: ReactNode;
|
60
61
|
droppableId?: string;
|
61
62
|
direction?: "vertical" | "horizontal";
|
@@ -68,7 +69,7 @@ declare const Drawer: {
|
|
68
69
|
}) => ReactElement;
|
69
70
|
id?: string;
|
70
71
|
label?: string;
|
71
|
-
index
|
72
|
+
index?: number;
|
72
73
|
isDragDisabled?: boolean;
|
73
74
|
}) => react_jsx_runtime.JSX.Element;
|
74
75
|
};
|
@@ -85,12 +86,9 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
85
86
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
86
87
|
dispatch?: (action: PuckAction) => void;
|
87
88
|
areaId?: string;
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
setHoveringArea?: (area: string | null) => void;
|
92
|
-
hoveringZone?: string | null;
|
93
|
-
setHoveringZone?: (zone: string | null) => void;
|
89
|
+
zoneCompound?: string;
|
90
|
+
index?: number;
|
91
|
+
draggedItem?: Draggable | null;
|
94
92
|
hoveringComponent?: string | null;
|
95
93
|
setHoveringComponent?: (id: string | null) => void;
|
96
94
|
registerZoneArea?: (areaId: string) => void;
|
@@ -101,8 +99,13 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
99
|
pathData?: PathData;
|
102
100
|
registerPath?: (selector: ItemSelector) => void;
|
103
101
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
102
|
+
depth: number;
|
103
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
104
|
+
deepestZone?: string | null;
|
105
|
+
deepestArea?: string | null;
|
106
|
+
nextDeepestZone?: string | null;
|
107
|
+
nextDeepestArea?: string | null;
|
108
|
+
path: string[];
|
106
109
|
} | null;
|
107
110
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
111
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,6 +113,12 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
113
|
value: DropZoneContext;
|
111
114
|
}) => react_jsx_runtime.JSX.Element;
|
112
115
|
|
116
|
+
type DropZoneDndData = {
|
117
|
+
areaId?: string;
|
118
|
+
depth: number;
|
119
|
+
path: UniqueIdentifier[];
|
120
|
+
isDroppableTarget: boolean;
|
121
|
+
};
|
113
122
|
declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
|
114
123
|
|
115
124
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -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, 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-Fx9YY5bj.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-Fx9YY5bj.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, }: {
|
@@ -55,7 +56,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
55
56
|
}) => react_jsx_runtime.JSX.Element;
|
56
57
|
|
57
58
|
declare const Drawer: {
|
58
|
-
({ children, droppableId
|
59
|
+
({ children, droppableId, direction, }: {
|
59
60
|
children: ReactNode;
|
60
61
|
droppableId?: string;
|
61
62
|
direction?: "vertical" | "horizontal";
|
@@ -68,7 +69,7 @@ declare const Drawer: {
|
|
68
69
|
}) => ReactElement;
|
69
70
|
id?: string;
|
70
71
|
label?: string;
|
71
|
-
index
|
72
|
+
index?: number;
|
72
73
|
isDragDisabled?: boolean;
|
73
74
|
}) => react_jsx_runtime.JSX.Element;
|
74
75
|
};
|
@@ -85,12 +86,9 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
85
86
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
86
87
|
dispatch?: (action: PuckAction) => void;
|
87
88
|
areaId?: string;
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
setHoveringArea?: (area: string | null) => void;
|
92
|
-
hoveringZone?: string | null;
|
93
|
-
setHoveringZone?: (zone: string | null) => void;
|
89
|
+
zoneCompound?: string;
|
90
|
+
index?: number;
|
91
|
+
draggedItem?: Draggable | null;
|
94
92
|
hoveringComponent?: string | null;
|
95
93
|
setHoveringComponent?: (id: string | null) => void;
|
96
94
|
registerZoneArea?: (areaId: string) => void;
|
@@ -101,8 +99,13 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
99
|
pathData?: PathData;
|
102
100
|
registerPath?: (selector: ItemSelector) => void;
|
103
101
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
102
|
+
depth: number;
|
103
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
104
|
+
deepestZone?: string | null;
|
105
|
+
deepestArea?: string | null;
|
106
|
+
nextDeepestZone?: string | null;
|
107
|
+
nextDeepestArea?: string | null;
|
108
|
+
path: string[];
|
106
109
|
} | null;
|
107
110
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
111
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,6 +113,12 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
113
|
value: DropZoneContext;
|
111
114
|
}) => react_jsx_runtime.JSX.Element;
|
112
115
|
|
116
|
+
type DropZoneDndData = {
|
117
|
+
areaId?: string;
|
118
|
+
depth: number;
|
119
|
+
path: UniqueIdentifier[];
|
120
|
+
isDroppableTarget: boolean;
|
121
|
+
};
|
113
122
|
declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
|
114
123
|
|
115
124
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -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, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
|