@measured/puck 0.17.2-canary.f323610 → 0.18.0-canary.beb05b5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{chunk-7IH6SUIT.mjs → chunk-EXKSBUY5.mjs} +10 -0
- package/dist/index.css +193 -138
- package/dist/index.d.mts +32 -17
- package/dist/index.d.ts +32 -17
- package/dist/index.js +3219 -1781
- package/dist/index.mjs +3274 -1818
- 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 +4 -5
@@ -10,6 +10,9 @@ type DropZoneProps = {
|
|
10
10
|
allow?: string[];
|
11
11
|
disallow?: string[];
|
12
12
|
style?: CSSProperties;
|
13
|
+
minEmptyHeight?: number;
|
14
|
+
className?: string;
|
15
|
+
collisionAxis?: DragAxis;
|
13
16
|
};
|
14
17
|
|
15
18
|
type FieldOption = {
|
@@ -139,6 +142,7 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
|
|
139
142
|
defaultProps?: FieldProps;
|
140
143
|
fields?: Fields<FieldProps>;
|
141
144
|
permissions?: Partial<Permissions>;
|
145
|
+
inline?: boolean;
|
142
146
|
resolveFields?: (data: DataShape, params: {
|
143
147
|
changed: Partial<Record<keyof FieldProps, boolean>>;
|
144
148
|
fields: Fields<FieldProps>;
|
@@ -206,6 +210,7 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
|
|
206
210
|
type PuckContext = {
|
207
211
|
renderDropZone: React.FC<DropZoneProps>;
|
208
212
|
isEditing: boolean;
|
213
|
+
dragRef: ((element: Element | null) => void) | null;
|
209
214
|
};
|
210
215
|
type DefaultRootFieldProps = {
|
211
216
|
title?: string;
|
@@ -260,6 +265,7 @@ type UiState = {
|
|
260
265
|
rightSideBarVisible: boolean;
|
261
266
|
itemSelector: ItemSelector | null;
|
262
267
|
arrayState: Record<string, ArrayState | undefined>;
|
268
|
+
previewMode: "interactive" | "edit";
|
263
269
|
componentList: Record<string, {
|
264
270
|
components?: string[];
|
265
271
|
title?: string;
|
@@ -303,6 +309,7 @@ type Overrides = OverridesGeneric<{
|
|
303
309
|
actionBar: RenderFunc<{
|
304
310
|
label?: string;
|
305
311
|
children: ReactNode;
|
312
|
+
parentAction: ReactNode;
|
306
313
|
}>;
|
307
314
|
headerActions: RenderFunc<{
|
308
315
|
children: ReactNode;
|
@@ -347,6 +354,9 @@ type FieldRenderFunctions = Omit<{
|
|
347
354
|
}>;
|
348
355
|
};
|
349
356
|
|
357
|
+
type Direction = "left" | "right" | "up" | "down" | null;
|
358
|
+
type DragAxis = "dynamic" | "y" | "x";
|
359
|
+
|
350
360
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
351
361
|
type Viewport = {
|
352
362
|
width: number;
|
@@ -449,4 +459,4 @@ type PuckAction = {
|
|
449
459
|
|
450
460
|
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>>;
|
451
461
|
|
452
|
-
export { type
|
462
|
+
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 Permissions 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 Plugin as d, type Overrides as e, type PuckAction 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,9 @@ type DropZoneProps = {
|
|
10
10
|
allow?: string[];
|
11
11
|
disallow?: string[];
|
12
12
|
style?: CSSProperties;
|
13
|
+
minEmptyHeight?: number;
|
14
|
+
className?: string;
|
15
|
+
collisionAxis?: DragAxis;
|
13
16
|
};
|
14
17
|
|
15
18
|
type FieldOption = {
|
@@ -139,6 +142,7 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
|
|
139
142
|
defaultProps?: FieldProps;
|
140
143
|
fields?: Fields<FieldProps>;
|
141
144
|
permissions?: Partial<Permissions>;
|
145
|
+
inline?: boolean;
|
142
146
|
resolveFields?: (data: DataShape, params: {
|
143
147
|
changed: Partial<Record<keyof FieldProps, boolean>>;
|
144
148
|
fields: Fields<FieldProps>;
|
@@ -206,6 +210,7 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
|
|
206
210
|
type PuckContext = {
|
207
211
|
renderDropZone: React.FC<DropZoneProps>;
|
208
212
|
isEditing: boolean;
|
213
|
+
dragRef: ((element: Element | null) => void) | null;
|
209
214
|
};
|
210
215
|
type DefaultRootFieldProps = {
|
211
216
|
title?: string;
|
@@ -260,6 +265,7 @@ type UiState = {
|
|
260
265
|
rightSideBarVisible: boolean;
|
261
266
|
itemSelector: ItemSelector | null;
|
262
267
|
arrayState: Record<string, ArrayState | undefined>;
|
268
|
+
previewMode: "interactive" | "edit";
|
263
269
|
componentList: Record<string, {
|
264
270
|
components?: string[];
|
265
271
|
title?: string;
|
@@ -303,6 +309,7 @@ type Overrides = OverridesGeneric<{
|
|
303
309
|
actionBar: RenderFunc<{
|
304
310
|
label?: string;
|
305
311
|
children: ReactNode;
|
312
|
+
parentAction: ReactNode;
|
306
313
|
}>;
|
307
314
|
headerActions: RenderFunc<{
|
308
315
|
children: ReactNode;
|
@@ -347,6 +354,9 @@ type FieldRenderFunctions = Omit<{
|
|
347
354
|
}>;
|
348
355
|
};
|
349
356
|
|
357
|
+
type Direction = "left" | "right" | "up" | "down" | null;
|
358
|
+
type DragAxis = "dynamic" | "y" | "x";
|
359
|
+
|
350
360
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
351
361
|
type Viewport = {
|
352
362
|
width: number;
|
@@ -449,4 +459,4 @@ type PuckAction = {
|
|
449
459
|
|
450
460
|
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>>;
|
451
461
|
|
452
|
-
export { type
|
462
|
+
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 Permissions 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 Plugin as d, type Overrides as e, type PuckAction 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-DzJEE28m.mjs';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-DzJEE28m.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-DzJEE28m.js';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-DzJEE28m.js';
|
4
4
|
import 'react';
|
5
5
|
|
6
6
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
package/dist/rsc.mjs
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.18.0-canary.beb05b5",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -54,7 +54,6 @@
|
|
54
54
|
"@types/object-hash": "^3.0.6",
|
55
55
|
"@types/react": "^19.0.1",
|
56
56
|
"@types/react-dom": "^19.0.2",
|
57
|
-
"@types/ua-parser-js": "^0.7.39",
|
58
57
|
"@types/uuid": "^10.0.0",
|
59
58
|
"css-box-model": "^1.2.1",
|
60
59
|
"eslint": "^7.32.0",
|
@@ -69,11 +68,11 @@
|
|
69
68
|
"typescript": "^5.5.4"
|
70
69
|
},
|
71
70
|
"dependencies": {
|
72
|
-
"@
|
71
|
+
"@dnd-kit/helpers": "0.0.6-beta-20241204184550",
|
72
|
+
"@dnd-kit/react": "0.0.6-beta-20241204184550",
|
73
73
|
"deep-diff": "^1.0.2",
|
74
74
|
"object-hash": "^3.0.0",
|
75
|
-
"react-hotkeys-hook": "^4.
|
76
|
-
"ua-parser-js": "^1.0.37",
|
75
|
+
"react-hotkeys-hook": "^4.6.1",
|
77
76
|
"use-debounce": "^9.0.4",
|
78
77
|
"uuid": "^9.0.1"
|
79
78
|
},
|