@measured/puck 0.17.2-canary.bbe0a8d → 0.18.0-canary.b355ddd
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 -16
- package/dist/index.d.ts +32 -16
- package/dist/index.js +3248 -1809
- package/dist/index.mjs +3257 -1800
- package/dist/{resolve-all-data-zN5E6nBu.d.mts → resolve-all-data-GYzT3ont.d.mts} +10 -1
- package/dist/{resolve-all-data-zN5E6nBu.d.ts → resolve-all-data-GYzT3ont.d.ts} +10 -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 -3
@@ -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;
|
@@ -303,6 +308,7 @@ type Overrides = OverridesGeneric<{
|
|
303
308
|
actionBar: RenderFunc<{
|
304
309
|
label?: string;
|
305
310
|
children: ReactNode;
|
311
|
+
parentAction: ReactNode;
|
306
312
|
}>;
|
307
313
|
headerActions: RenderFunc<{
|
308
314
|
children: ReactNode;
|
@@ -347,6 +353,9 @@ type FieldRenderFunctions = Omit<{
|
|
347
353
|
}>;
|
348
354
|
};
|
349
355
|
|
356
|
+
type Direction = "left" | "right" | "up" | "down" | null;
|
357
|
+
type DragAxis = "dynamic" | "y" | "x";
|
358
|
+
|
350
359
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
351
360
|
type Viewport = {
|
352
361
|
width: number;
|
@@ -449,4 +458,4 @@ type PuckAction = {
|
|
449
458
|
|
450
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>>;
|
451
460
|
|
452
|
-
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,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;
|
@@ -303,6 +308,7 @@ type Overrides = OverridesGeneric<{
|
|
303
308
|
actionBar: RenderFunc<{
|
304
309
|
label?: string;
|
305
310
|
children: ReactNode;
|
311
|
+
parentAction: ReactNode;
|
306
312
|
}>;
|
307
313
|
headerActions: RenderFunc<{
|
308
314
|
children: ReactNode;
|
@@ -347,6 +353,9 @@ type FieldRenderFunctions = Omit<{
|
|
347
353
|
}>;
|
348
354
|
};
|
349
355
|
|
356
|
+
type Direction = "left" | "right" | "up" | "down" | null;
|
357
|
+
type DragAxis = "dynamic" | "y" | "x";
|
358
|
+
|
350
359
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
351
360
|
type Viewport = {
|
352
361
|
width: number;
|
@@ -449,4 +458,4 @@ type PuckAction = {
|
|
449
458
|
|
450
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>>;
|
451
460
|
|
452
|
-
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-GYzT3ont.mjs';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-GYzT3ont.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-GYzT3ont.js';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-GYzT3ont.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.b355ddd",
|
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,11 @@
|
|
69
69
|
"typescript": "^5.5.4"
|
70
70
|
},
|
71
71
|
"dependencies": {
|
72
|
-
"@
|
72
|
+
"@dnd-kit/helpers": "0.0.6-beta-20241204184550",
|
73
|
+
"@dnd-kit/react": "0.0.6-beta-20241204184550",
|
73
74
|
"deep-diff": "^1.0.2",
|
74
75
|
"object-hash": "^3.0.0",
|
75
|
-
"react-hotkeys-hook": "^4.
|
76
|
+
"react-hotkeys-hook": "^4.6.1",
|
76
77
|
"ua-parser-js": "^1.0.37",
|
77
78
|
"use-debounce": "^9.0.4",
|
78
79
|
"uuid": "^9.0.1"
|