@measured/puck 0.18.2-canary.b399c21 → 0.18.2-canary.bdef789
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 +268 -279
- package/dist/index.d.mts +46 -4
- package/dist/index.d.ts +46 -4
- package/dist/index.js +1304 -1416
- package/dist/index.mjs +1502 -1616
- package/dist/{resolve-all-data-ppm982Jh.d.mts → resolve-all-data-DzJEE28m.d.mts} +4 -4
- package/dist/{resolve-all-data-ppm982Jh.d.ts → resolve-all-data-DzJEE28m.d.ts} +4 -4
- package/dist/rsc.d.mts +4 -4
- package/dist/rsc.d.ts +4 -4
- package/dist/rsc.js +5 -3
- package/dist/rsc.mjs +5 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
import { F as FieldProps, a as Field,
|
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
5
|
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
6
|
+
import { UniqueIdentifier } from '@dnd-kit/abstract';
|
6
7
|
|
7
8
|
declare const ActionBar: {
|
8
9
|
({ label, children, }: {
|
@@ -42,7 +43,7 @@ declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }:
|
|
42
43
|
className?: string;
|
43
44
|
}) => react_jsx_runtime.JSX.Element;
|
44
45
|
type FieldNoLabel<Props extends any = any> = Omit<Field<Props>, "label">;
|
45
|
-
declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<
|
46
|
+
declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<ValueType, FieldType>): react_jsx_runtime.JSX.Element;
|
46
47
|
|
47
48
|
declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, ...props }: {
|
48
49
|
children: ReactNode;
|
@@ -78,6 +79,47 @@ declare const Drawer: {
|
|
78
79
|
}) => react_jsx_runtime.JSX.Element;
|
79
80
|
};
|
80
81
|
|
82
|
+
type PathData = Record<string, {
|
83
|
+
path: string[];
|
84
|
+
label: string;
|
85
|
+
}>;
|
86
|
+
type DropZoneContext<UserConfig extends Config = Config> = {
|
87
|
+
data: Data;
|
88
|
+
config: UserConfig;
|
89
|
+
componentState?: Record<string, any>;
|
90
|
+
itemSelector?: ItemSelector | null;
|
91
|
+
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
92
|
+
areaId?: string;
|
93
|
+
zoneCompound?: string;
|
94
|
+
index?: number;
|
95
|
+
hoveringComponent?: string | null;
|
96
|
+
setHoveringComponent?: (id: string | null) => void;
|
97
|
+
registerZoneArea?: (areaId: string) => void;
|
98
|
+
areasWithZones?: Record<string, boolean>;
|
99
|
+
registerZone?: (zoneCompound: string) => void;
|
100
|
+
unregisterZone?: (zoneCompound: string) => void;
|
101
|
+
activeZones?: Record<string, boolean>;
|
102
|
+
pathData?: PathData;
|
103
|
+
registerPath?: (id: string, selector: ItemSelector, label: string) => void;
|
104
|
+
unregisterPath?: (id: string) => void;
|
105
|
+
mode?: "edit" | "render";
|
106
|
+
depth: number;
|
107
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
108
|
+
unregisterLocalZone?: (zone: string) => void;
|
109
|
+
path: string[];
|
110
|
+
} | null;
|
111
|
+
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
112
|
+
declare const DropZoneProvider: ({ children, value, }: {
|
113
|
+
children: ReactNode;
|
114
|
+
value: DropZoneContext;
|
115
|
+
}) => react_jsx_runtime.JSX.Element;
|
116
|
+
|
117
|
+
type DropZoneDndData = {
|
118
|
+
areaId?: string;
|
119
|
+
depth: number;
|
120
|
+
path: UniqueIdentifier[];
|
121
|
+
isDroppableTarget: boolean;
|
122
|
+
};
|
81
123
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
82
124
|
|
83
125
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -194,4 +236,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
194
236
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
195
237
|
};
|
196
238
|
|
197
|
-
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, 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,8 +1,9 @@
|
|
1
|
-
import { F as FieldProps, a as Field,
|
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
5
|
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
6
|
+
import { UniqueIdentifier } from '@dnd-kit/abstract';
|
6
7
|
|
7
8
|
declare const ActionBar: {
|
8
9
|
({ label, children, }: {
|
@@ -42,7 +43,7 @@ declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }:
|
|
42
43
|
className?: string;
|
43
44
|
}) => react_jsx_runtime.JSX.Element;
|
44
45
|
type FieldNoLabel<Props extends any = any> = Omit<Field<Props>, "label">;
|
45
|
-
declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<
|
46
|
+
declare function AutoField<ValueType = any, FieldType extends FieldNoLabel<ValueType> = FieldNoLabel<ValueType>>(props: FieldProps<ValueType, FieldType>): react_jsx_runtime.JSX.Element;
|
46
47
|
|
47
48
|
declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, ...props }: {
|
48
49
|
children: ReactNode;
|
@@ -78,6 +79,47 @@ declare const Drawer: {
|
|
78
79
|
}) => react_jsx_runtime.JSX.Element;
|
79
80
|
};
|
80
81
|
|
82
|
+
type PathData = Record<string, {
|
83
|
+
path: string[];
|
84
|
+
label: string;
|
85
|
+
}>;
|
86
|
+
type DropZoneContext<UserConfig extends Config = Config> = {
|
87
|
+
data: Data;
|
88
|
+
config: UserConfig;
|
89
|
+
componentState?: Record<string, any>;
|
90
|
+
itemSelector?: ItemSelector | null;
|
91
|
+
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
92
|
+
areaId?: string;
|
93
|
+
zoneCompound?: string;
|
94
|
+
index?: number;
|
95
|
+
hoveringComponent?: string | null;
|
96
|
+
setHoveringComponent?: (id: string | null) => void;
|
97
|
+
registerZoneArea?: (areaId: string) => void;
|
98
|
+
areasWithZones?: Record<string, boolean>;
|
99
|
+
registerZone?: (zoneCompound: string) => void;
|
100
|
+
unregisterZone?: (zoneCompound: string) => void;
|
101
|
+
activeZones?: Record<string, boolean>;
|
102
|
+
pathData?: PathData;
|
103
|
+
registerPath?: (id: string, selector: ItemSelector, label: string) => void;
|
104
|
+
unregisterPath?: (id: string) => void;
|
105
|
+
mode?: "edit" | "render";
|
106
|
+
depth: number;
|
107
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
108
|
+
unregisterLocalZone?: (zone: string) => void;
|
109
|
+
path: string[];
|
110
|
+
} | null;
|
111
|
+
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
112
|
+
declare const DropZoneProvider: ({ children, value, }: {
|
113
|
+
children: ReactNode;
|
114
|
+
value: DropZoneContext;
|
115
|
+
}) => react_jsx_runtime.JSX.Element;
|
116
|
+
|
117
|
+
type DropZoneDndData = {
|
118
|
+
areaId?: string;
|
119
|
+
depth: number;
|
120
|
+
path: UniqueIdentifier[];
|
121
|
+
isDroppableTarget: boolean;
|
122
|
+
};
|
81
123
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
82
124
|
|
83
125
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -194,4 +236,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
194
236
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
195
237
|
};
|
196
238
|
|
197
|
-
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, 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 };
|