@measured/puck 0.21.0-canary.2e1b5267 → 0.21.0-canary.5333fc7e
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/{chunk-PZ4O44EW.mjs → chunk-KNAV6QTS.mjs} +1866 -2459
- package/dist/{chunk-IMW7FUQQ.mjs → chunk-X7YZ3YE7.mjs} +2 -4
- package/dist/index.css +272 -649
- package/dist/index.d.mts +4 -15
- package/dist/index.d.ts +4 -15
- package/dist/index.js +1829 -2417
- package/dist/index.mjs +2 -8
- package/dist/no-external.css +272 -649
- package/dist/no-external.d.mts +2 -2
- package/dist/no-external.d.ts +2 -2
- package/dist/no-external.js +1829 -2417
- package/dist/no-external.mjs +2 -8
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +2 -4
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-Cvtjzg9C.d.mts → walk-tree-Ctf3FZQI.d.mts} +8 -21
- package/dist/{walk-tree-Cvtjzg9C.d.ts → walk-tree-Ctf3FZQI.d.ts} +8 -21
- package/package.json +1 -1
package/dist/no-external.mjs
CHANGED
|
@@ -11,24 +11,21 @@ import {
|
|
|
11
11
|
Label,
|
|
12
12
|
Puck,
|
|
13
13
|
Render,
|
|
14
|
-
blocksPlugin,
|
|
15
14
|
createUsePuck,
|
|
16
|
-
fieldsPlugin,
|
|
17
|
-
outlinePlugin,
|
|
18
15
|
overrideKeys,
|
|
19
16
|
registerOverlayPortal,
|
|
20
17
|
renderContext,
|
|
21
18
|
setDeep,
|
|
22
19
|
useGetPuck,
|
|
23
20
|
usePuck
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KNAV6QTS.mjs";
|
|
25
22
|
import {
|
|
26
23
|
init_react_import,
|
|
27
24
|
migrate,
|
|
28
25
|
resolveAllData,
|
|
29
26
|
transformProps,
|
|
30
27
|
walkTree
|
|
31
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-X7YZ3YE7.mjs";
|
|
32
29
|
|
|
33
30
|
// bundle/no-external.ts
|
|
34
31
|
init_react_import();
|
|
@@ -45,11 +42,8 @@ export {
|
|
|
45
42
|
Label,
|
|
46
43
|
Puck,
|
|
47
44
|
Render,
|
|
48
|
-
blocksPlugin,
|
|
49
45
|
createUsePuck,
|
|
50
|
-
fieldsPlugin,
|
|
51
46
|
migrate,
|
|
52
|
-
outlinePlugin,
|
|
53
47
|
overrideKeys,
|
|
54
48
|
registerOverlayPortal,
|
|
55
49
|
renderContext,
|
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, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Ctf3FZQI.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
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, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Ctf3FZQI.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
package/dist/rsc.js
CHANGED
|
@@ -671,8 +671,7 @@ function transformProps(data, propTransforms, config = { components: {} }) {
|
|
|
671
671
|
var defaultViewports = [
|
|
672
672
|
{ width: 360, height: "auto", icon: "Smartphone", label: "Small" },
|
|
673
673
|
{ width: 768, height: "auto", icon: "Tablet", label: "Medium" },
|
|
674
|
-
{ width: 1280, height: "auto", icon: "Monitor", label: "Large" }
|
|
675
|
-
{ width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
|
|
674
|
+
{ width: 1280, height: "auto", icon: "Monitor", label: "Large" }
|
|
676
675
|
];
|
|
677
676
|
|
|
678
677
|
// store/default-app-state.ts
|
|
@@ -694,8 +693,7 @@ var defaultAppState = {
|
|
|
694
693
|
options: [],
|
|
695
694
|
controlsVisible: true
|
|
696
695
|
},
|
|
697
|
-
field: { focus: null }
|
|
698
|
-
plugin: { current: null }
|
|
696
|
+
field: { focus: null }
|
|
699
697
|
},
|
|
700
698
|
indexes: {
|
|
701
699
|
nodes: {},
|
package/dist/rsc.mjs
CHANGED
|
@@ -309,7 +309,6 @@ type Metadata = {
|
|
|
309
309
|
type ItemWithId = {
|
|
310
310
|
_arrayId: string;
|
|
311
311
|
_originalIndex: number;
|
|
312
|
-
_currentIndex: number;
|
|
313
312
|
};
|
|
314
313
|
type ArrayState = {
|
|
315
314
|
items: ItemWithId[];
|
|
@@ -320,7 +319,6 @@ type UiState = {
|
|
|
320
319
|
rightSideBarVisible: boolean;
|
|
321
320
|
leftSideBarWidth?: number | null;
|
|
322
321
|
rightSideBarWidth?: number | null;
|
|
323
|
-
mobilePanelExpanded?: boolean;
|
|
324
322
|
itemSelector: ItemSelector | null;
|
|
325
323
|
arrayState: Record<string, ArrayState | undefined>;
|
|
326
324
|
previewMode: "interactive" | "edit";
|
|
@@ -333,7 +331,7 @@ type UiState = {
|
|
|
333
331
|
isDragging: boolean;
|
|
334
332
|
viewports: {
|
|
335
333
|
current: {
|
|
336
|
-
width: number
|
|
334
|
+
width: number;
|
|
337
335
|
height: number | "auto";
|
|
338
336
|
};
|
|
339
337
|
controlsVisible: boolean;
|
|
@@ -342,9 +340,6 @@ type UiState = {
|
|
|
342
340
|
field: {
|
|
343
341
|
focus?: string | null;
|
|
344
342
|
};
|
|
345
|
-
plugin: {
|
|
346
|
-
current: string | null;
|
|
347
|
-
};
|
|
348
343
|
};
|
|
349
344
|
type AppState<UserData extends Data = Data> = {
|
|
350
345
|
data: UserData;
|
|
@@ -398,14 +393,6 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
|
|
|
398
393
|
type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
|
|
399
394
|
never
|
|
400
395
|
] ? False : True;
|
|
401
|
-
type RenderFunc<Props extends {
|
|
402
|
-
[key: string]: any;
|
|
403
|
-
} = {
|
|
404
|
-
children: ReactNode;
|
|
405
|
-
}> = (props: Props) => ReactElement;
|
|
406
|
-
type PluginInternal = Plugin & {
|
|
407
|
-
mobileOnly?: boolean;
|
|
408
|
-
};
|
|
409
396
|
|
|
410
397
|
type MapFnParams<ThisField = Field> = {
|
|
411
398
|
value: any;
|
|
@@ -429,6 +416,11 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
|
|
|
429
416
|
[Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
|
|
430
417
|
}>;
|
|
431
418
|
|
|
419
|
+
type RenderFunc<Props extends {
|
|
420
|
+
[key: string]: any;
|
|
421
|
+
} = {
|
|
422
|
+
children: ReactNode;
|
|
423
|
+
}> = (props: Props) => ReactElement;
|
|
432
424
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
433
425
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
434
426
|
type OverridesGeneric<Shape extends {
|
|
@@ -500,7 +492,7 @@ type DragAxis = "dynamic" | "y" | "x";
|
|
|
500
492
|
|
|
501
493
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
|
502
494
|
type Viewport = {
|
|
503
|
-
width: number
|
|
495
|
+
width: number;
|
|
504
496
|
height?: number | "auto";
|
|
505
497
|
label?: string;
|
|
506
498
|
icon?: iconTypes | ReactNode;
|
|
@@ -520,13 +512,8 @@ type IframeConfig = {
|
|
|
520
512
|
};
|
|
521
513
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
522
514
|
type Plugin<UserConfig extends Config = Config> = {
|
|
523
|
-
name?: string;
|
|
524
|
-
label?: string;
|
|
525
|
-
icon?: ReactNode;
|
|
526
|
-
render?: () => ReactElement;
|
|
527
515
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
528
516
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
529
|
-
mobilePanelHeight?: "toggle" | "min-content";
|
|
530
517
|
};
|
|
531
518
|
type History<D = any> = {
|
|
532
519
|
state: D;
|
|
@@ -644,4 +631,4 @@ type WalkTreeOptions = {
|
|
|
644
631
|
};
|
|
645
632
|
declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
|
|
646
633
|
|
|
647
|
-
export { type
|
|
634
|
+
export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type ExternalField as a9, type CustomFieldRender as aa, type CustomField as ab, type SlotField as ac, type PuckContext as ad, type DefaultRootFieldProps as ae, type DefaultRootRenderProps as af, type DefaultRootProps as ag, type DefaultComponentProps as ah, type WithId as ai, type WithPuckProps as aj, type AsFieldProps as ak, type WithChildren as al, type ExtractField as am, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
|
|
@@ -309,7 +309,6 @@ type Metadata = {
|
|
|
309
309
|
type ItemWithId = {
|
|
310
310
|
_arrayId: string;
|
|
311
311
|
_originalIndex: number;
|
|
312
|
-
_currentIndex: number;
|
|
313
312
|
};
|
|
314
313
|
type ArrayState = {
|
|
315
314
|
items: ItemWithId[];
|
|
@@ -320,7 +319,6 @@ type UiState = {
|
|
|
320
319
|
rightSideBarVisible: boolean;
|
|
321
320
|
leftSideBarWidth?: number | null;
|
|
322
321
|
rightSideBarWidth?: number | null;
|
|
323
|
-
mobilePanelExpanded?: boolean;
|
|
324
322
|
itemSelector: ItemSelector | null;
|
|
325
323
|
arrayState: Record<string, ArrayState | undefined>;
|
|
326
324
|
previewMode: "interactive" | "edit";
|
|
@@ -333,7 +331,7 @@ type UiState = {
|
|
|
333
331
|
isDragging: boolean;
|
|
334
332
|
viewports: {
|
|
335
333
|
current: {
|
|
336
|
-
width: number
|
|
334
|
+
width: number;
|
|
337
335
|
height: number | "auto";
|
|
338
336
|
};
|
|
339
337
|
controlsVisible: boolean;
|
|
@@ -342,9 +340,6 @@ type UiState = {
|
|
|
342
340
|
field: {
|
|
343
341
|
focus?: string | null;
|
|
344
342
|
};
|
|
345
|
-
plugin: {
|
|
346
|
-
current: string | null;
|
|
347
|
-
};
|
|
348
343
|
};
|
|
349
344
|
type AppState<UserData extends Data = Data> = {
|
|
350
345
|
data: UserData;
|
|
@@ -398,14 +393,6 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
|
|
|
398
393
|
type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
|
|
399
394
|
never
|
|
400
395
|
] ? False : True;
|
|
401
|
-
type RenderFunc<Props extends {
|
|
402
|
-
[key: string]: any;
|
|
403
|
-
} = {
|
|
404
|
-
children: ReactNode;
|
|
405
|
-
}> = (props: Props) => ReactElement;
|
|
406
|
-
type PluginInternal = Plugin & {
|
|
407
|
-
mobileOnly?: boolean;
|
|
408
|
-
};
|
|
409
396
|
|
|
410
397
|
type MapFnParams<ThisField = Field> = {
|
|
411
398
|
value: any;
|
|
@@ -429,6 +416,11 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
|
|
|
429
416
|
[Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
|
|
430
417
|
}>;
|
|
431
418
|
|
|
419
|
+
type RenderFunc<Props extends {
|
|
420
|
+
[key: string]: any;
|
|
421
|
+
} = {
|
|
422
|
+
children: ReactNode;
|
|
423
|
+
}> = (props: Props) => ReactElement;
|
|
432
424
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
433
425
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
434
426
|
type OverridesGeneric<Shape extends {
|
|
@@ -500,7 +492,7 @@ type DragAxis = "dynamic" | "y" | "x";
|
|
|
500
492
|
|
|
501
493
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
|
502
494
|
type Viewport = {
|
|
503
|
-
width: number
|
|
495
|
+
width: number;
|
|
504
496
|
height?: number | "auto";
|
|
505
497
|
label?: string;
|
|
506
498
|
icon?: iconTypes | ReactNode;
|
|
@@ -520,13 +512,8 @@ type IframeConfig = {
|
|
|
520
512
|
};
|
|
521
513
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
522
514
|
type Plugin<UserConfig extends Config = Config> = {
|
|
523
|
-
name?: string;
|
|
524
|
-
label?: string;
|
|
525
|
-
icon?: ReactNode;
|
|
526
|
-
render?: () => ReactElement;
|
|
527
515
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
528
516
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
529
|
-
mobilePanelHeight?: "toggle" | "min-content";
|
|
530
517
|
};
|
|
531
518
|
type History<D = any> = {
|
|
532
519
|
state: D;
|
|
@@ -644,4 +631,4 @@ type WalkTreeOptions = {
|
|
|
644
631
|
};
|
|
645
632
|
declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
|
|
646
633
|
|
|
647
|
-
export { type
|
|
634
|
+
export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type ExternalField as a9, type CustomFieldRender as aa, type CustomField as ab, type SlotField as ac, type PuckContext as ad, type DefaultRootFieldProps as ae, type DefaultRootRenderProps as af, type DefaultRootProps as ag, type DefaultComponentProps as ah, type WithId as ai, type WithPuckProps as aj, type AsFieldProps as ak, type WithChildren as al, type ExtractField as am, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
|
package/package.json
CHANGED