@measured/puck 0.17.0-canary.229cbdd → 0.17.0-canary.858bfe7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +97 -114
- package/dist/index.d.mts +24 -15
- package/dist/index.d.ts +24 -15
- package/dist/index.js +7257 -1880
- package/dist/index.mjs +7262 -1875
- package/dist/{resolve-all-data-Bd3DnhYE.d.mts → resolve-all-data-Fx9YY5bj.d.mts} +14 -1
- package/dist/{resolve-all-data-Bd3DnhYE.d.ts → resolve-all-data-Fx9YY5bj.d.ts} +14 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/package.json +4 -2
@@ -10,6 +10,10 @@ type DropZoneProps = {
|
|
10
10
|
allow?: string[];
|
11
11
|
disallow?: string[];
|
12
12
|
style?: CSSProperties;
|
13
|
+
minEmptyHeight?: number;
|
14
|
+
className?: string;
|
15
|
+
dragRef?: ((element: Element | null) => void) | null;
|
16
|
+
collisionAxis?: DragAxis;
|
13
17
|
};
|
14
18
|
|
15
19
|
type FieldOption = {
|
@@ -139,12 +143,14 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
|
|
139
143
|
defaultProps?: FieldProps;
|
140
144
|
fields?: Fields<FieldProps>;
|
141
145
|
permissions?: Partial<Permissions>;
|
146
|
+
inline?: boolean;
|
142
147
|
resolveFields?: (data: DataShape, params: {
|
143
148
|
changed: Partial<Record<keyof FieldProps, boolean>>;
|
144
149
|
fields: Fields<FieldProps>;
|
145
150
|
lastFields: Fields<FieldProps>;
|
146
151
|
lastData: DataShape | null;
|
147
152
|
appState: AppState;
|
153
|
+
parent: ComponentData | null;
|
148
154
|
}) => Promise<Fields<FieldProps>> | Fields<FieldProps>;
|
149
155
|
resolveData?: (data: DataShape, params: {
|
150
156
|
changed: Partial<Record<keyof FieldProps, boolean>>;
|
@@ -205,6 +211,7 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
|
|
205
211
|
type PuckContext = {
|
206
212
|
renderDropZone: React.FC<DropZoneProps>;
|
207
213
|
isEditing: boolean;
|
214
|
+
dragRef: ((element: Element | null) => void) | null;
|
208
215
|
};
|
209
216
|
type DefaultRootFieldProps = {
|
210
217
|
title?: string;
|
@@ -274,6 +281,9 @@ type UiState = {
|
|
274
281
|
controlsVisible: boolean;
|
275
282
|
options: Viewport[];
|
276
283
|
};
|
284
|
+
field: {
|
285
|
+
focus?: string | null;
|
286
|
+
};
|
277
287
|
};
|
278
288
|
type AppState<UserData extends Data = Data> = {
|
279
289
|
data: UserData;
|
@@ -343,6 +353,9 @@ type FieldRenderFunctions = Omit<{
|
|
343
353
|
}>;
|
344
354
|
};
|
345
355
|
|
356
|
+
type Direction = "left" | "right" | "up" | "down" | null;
|
357
|
+
type DragAxis = "dynamic" | "y" | "x";
|
358
|
+
|
346
359
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
347
360
|
type Viewport = {
|
348
361
|
width: number;
|
@@ -445,4 +458,4 @@ type PuckAction = {
|
|
445
458
|
|
446
459
|
declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
|
447
460
|
|
448
|
-
export { type
|
461
|
+
export { type PuckContext as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type ExtractPropsFromConfig as E, type FieldProps as F, type BaseField as G, type History as H, type ItemSelector as I, type TextareaField as J, type RadioField as K, type ArrayField as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ObjectField as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type Adaptor as W, type ExternalFieldWithAdaptor as X, type ExternalField as Y, type CustomField as Z, type Fields as _, type Field as a, type DefaultRootRenderProps as a0, type DefaultRootProps as a1, type WithId as a2, type WithPuckProps as a3, type AsFieldProps as a4, type WithChildren as a5, resolveAllData as a6, type DropZoneProps as b, type UiState as c, type Permissions as d, type Plugin as e, type Overrides as f, type IframeConfig as g, type InitialHistory as h, type DefaultComponentProps as i, type DefaultRootFieldProps as j, type ExtractRootPropsFromConfig as k, type ComponentDataMap as l, type Direction as m, type DragAxis as n, type Viewport as o, overrideKeys as p, type OverrideKey as q, type FieldRenderFunctions as r, type ItemWithId as s, type ArrayState as t, type PuckComponent as u, type ComponentConfig as v, type RootDataWithoutProps as w, type RootData as x, type ComponentData as y, type Content as z };
|
@@ -10,6 +10,10 @@ type DropZoneProps = {
|
|
10
10
|
allow?: string[];
|
11
11
|
disallow?: string[];
|
12
12
|
style?: CSSProperties;
|
13
|
+
minEmptyHeight?: number;
|
14
|
+
className?: string;
|
15
|
+
dragRef?: ((element: Element | null) => void) | null;
|
16
|
+
collisionAxis?: DragAxis;
|
13
17
|
};
|
14
18
|
|
15
19
|
type FieldOption = {
|
@@ -139,12 +143,14 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
|
|
139
143
|
defaultProps?: FieldProps;
|
140
144
|
fields?: Fields<FieldProps>;
|
141
145
|
permissions?: Partial<Permissions>;
|
146
|
+
inline?: boolean;
|
142
147
|
resolveFields?: (data: DataShape, params: {
|
143
148
|
changed: Partial<Record<keyof FieldProps, boolean>>;
|
144
149
|
fields: Fields<FieldProps>;
|
145
150
|
lastFields: Fields<FieldProps>;
|
146
151
|
lastData: DataShape | null;
|
147
152
|
appState: AppState;
|
153
|
+
parent: ComponentData | null;
|
148
154
|
}) => Promise<Fields<FieldProps>> | Fields<FieldProps>;
|
149
155
|
resolveData?: (data: DataShape, params: {
|
150
156
|
changed: Partial<Record<keyof FieldProps, boolean>>;
|
@@ -205,6 +211,7 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
|
|
205
211
|
type PuckContext = {
|
206
212
|
renderDropZone: React.FC<DropZoneProps>;
|
207
213
|
isEditing: boolean;
|
214
|
+
dragRef: ((element: Element | null) => void) | null;
|
208
215
|
};
|
209
216
|
type DefaultRootFieldProps = {
|
210
217
|
title?: string;
|
@@ -274,6 +281,9 @@ type UiState = {
|
|
274
281
|
controlsVisible: boolean;
|
275
282
|
options: Viewport[];
|
276
283
|
};
|
284
|
+
field: {
|
285
|
+
focus?: string | null;
|
286
|
+
};
|
277
287
|
};
|
278
288
|
type AppState<UserData extends Data = Data> = {
|
279
289
|
data: UserData;
|
@@ -343,6 +353,9 @@ type FieldRenderFunctions = Omit<{
|
|
343
353
|
}>;
|
344
354
|
};
|
345
355
|
|
356
|
+
type Direction = "left" | "right" | "up" | "down" | null;
|
357
|
+
type DragAxis = "dynamic" | "y" | "x";
|
358
|
+
|
346
359
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
347
360
|
type Viewport = {
|
348
361
|
width: number;
|
@@ -445,4 +458,4 @@ type PuckAction = {
|
|
445
458
|
|
446
459
|
declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
|
447
460
|
|
448
|
-
export { type
|
461
|
+
export { type PuckContext as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type ExtractPropsFromConfig as E, type FieldProps as F, type BaseField as G, type History as H, type ItemSelector as I, type TextareaField as J, type RadioField as K, type ArrayField as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ObjectField as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type Adaptor as W, type ExternalFieldWithAdaptor as X, type ExternalField as Y, type CustomField as Z, type Fields as _, type Field as a, type DefaultRootRenderProps as a0, type DefaultRootProps as a1, type WithId as a2, type WithPuckProps as a3, type AsFieldProps as a4, type WithChildren as a5, resolveAllData as a6, type DropZoneProps as b, type UiState as c, type Permissions as d, type Plugin as e, type Overrides as f, type IframeConfig as g, type InitialHistory as h, type DefaultComponentProps as i, type DefaultRootFieldProps as j, type ExtractRootPropsFromConfig as k, type ComponentDataMap as l, type Direction as m, type DragAxis as n, type Viewport as o, overrideKeys as p, type OverrideKey as q, type FieldRenderFunctions as r, type ItemWithId as s, type ArrayState as t, type PuckComponent as u, type ComponentConfig as v, type RootDataWithoutProps as w, type RootData as x, type ComponentData as y, type Content as z };
|
package/dist/rsc.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import { C as Config, D as Data } from './resolve-all-data-
|
3
|
-
export {
|
2
|
+
import { C as Config, D as Data } from './resolve-all-data-Fx9YY5bj.mjs';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.mjs';
|
4
4
|
import 'react';
|
5
5
|
|
6
6
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
package/dist/rsc.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import { C as Config, D as Data } from './resolve-all-data-
|
3
|
-
export {
|
2
|
+
import { C as Config, D as Data } from './resolve-all-data-Fx9YY5bj.js';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.js';
|
4
4
|
import 'react';
|
5
5
|
|
6
6
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck",
|
3
|
-
"version": "0.17.0-canary.
|
3
|
+
"version": "0.17.0-canary.858bfe7",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -69,10 +69,12 @@
|
|
69
69
|
"typescript": "^5.5.4"
|
70
70
|
},
|
71
71
|
"dependencies": {
|
72
|
+
"@dnd-kit/helpers": "0.0.6-beta-20241121223708",
|
73
|
+
"@dnd-kit/react": "0.0.6-beta-20241121223708",
|
72
74
|
"@measured/dnd": "16.6.0-canary.4cba1d1",
|
73
75
|
"deep-diff": "^1.0.2",
|
74
76
|
"object-hash": "^3.0.0",
|
75
|
-
"react-hotkeys-hook": "^4.
|
77
|
+
"react-hotkeys-hook": "^4.6.1",
|
76
78
|
"ua-parser-js": "^1.0.37",
|
77
79
|
"use-debounce": "^9.0.4",
|
78
80
|
"uuid": "^9.0.1"
|