@measured/puck 0.21.0-canary.a1b03d38 → 0.21.0-canary.a4bfae4f
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/{Editor-O447AVCX.mjs → Editor-STTYPZJ4.mjs} +9 -9
- package/dist/{actions-CJibIB0m.d.mts → actions-tsxxcX1z.d.mts} +22 -8
- package/dist/{actions-CJibIB0m.d.ts → actions-tsxxcX1z.d.ts} +22 -8
- package/dist/{chunk-2Q4PACDA.mjs → chunk-5ATHPL4L.mjs} +3 -3
- package/dist/{chunk-Y656T6AQ.mjs → chunk-6K3HTV5G.mjs} +2 -2
- package/dist/{chunk-QBGM4ELA.mjs → chunk-DBBPIWHH.mjs} +1 -1
- package/dist/{chunk-Z476VA6G.mjs → chunk-FYH73R7R.mjs} +4627 -4059
- package/dist/{chunk-DAQLMM2T.mjs → chunk-IDHXWXYL.mjs} +89 -4
- package/dist/{chunk-62AAYNXG.mjs → chunk-MML4TKL2.mjs} +1 -1
- package/dist/{chunk-BSDEIOEK.mjs → chunk-O7X34GXV.mjs} +10 -8
- package/dist/{chunk-NLUHDYVR.mjs → chunk-ODDSBBX3.mjs} +20 -1
- package/dist/{chunk-QAWJTCV5.mjs → chunk-PRRLVCLF.mjs} +1 -1
- package/dist/{chunk-T3WX7XJ6.mjs → chunk-QV3IXRNS.mjs} +5 -3
- package/dist/{chunk-PLXSMBAA.mjs → chunk-VL2VNWXO.mjs} +1 -1
- package/dist/{full-BEMDJKDS.mjs → full-C4C2K2OO.mjs} +8 -8
- package/dist/{index-Bss1jupB.d.ts → index-Ca6V6NQD.d.ts} +3 -1
- package/dist/{index-DOcD_H3b.d.mts → index-mQvUCH3C.d.mts} +3 -1
- package/dist/index.css +704 -314
- package/dist/index.d.mts +27 -8
- package/dist/index.d.ts +27 -8
- package/dist/index.js +2890 -2158
- package/dist/index.mjs +20 -17
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +20 -1
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-N3FYGF2Y.mjs → loaded-DB2OXVC5.mjs} +5 -5
- package/dist/{loaded-JU3A7Y4L.mjs → loaded-GEFHNL7S.mjs} +5 -5
- package/dist/{loaded-OBY7OMS6.mjs → loaded-TVTW742N.mjs} +5 -5
- package/dist/no-external.css +842 -448
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +2891 -2156
- package/dist/no-external.mjs +19 -11
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +24 -3
- package/dist/rsc.mjs +3 -3
- package/dist/{walk-tree-BL55zQ9b.d.ts → walk-tree-Bh85NMeo.d.ts} +1 -1
- package/dist/{walk-tree-BYuI81Ik.d.mts → walk-tree-CDA3K5S3.d.mts} +1 -1
- package/package.json +1 -1
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
EditorInner,
|
|
6
6
|
LoadedRichTextMenu
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5ATHPL4L.mjs";
|
|
8
8
|
import "./chunk-CSSRLPHM.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-O7X34GXV.mjs";
|
|
10
|
+
import "./chunk-VL2VNWXO.mjs";
|
|
11
|
+
import "./chunk-MML4TKL2.mjs";
|
|
12
|
+
import "./chunk-PRRLVCLF.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAppStore,
|
|
15
15
|
useAppStoreApi
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-IDHXWXYL.mjs";
|
|
17
|
+
import "./chunk-DBBPIWHH.mjs";
|
|
18
|
+
import "./chunk-QV3IXRNS.mjs";
|
|
19
19
|
import "./chunk-Y2EFNT5P.mjs";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-ODDSBBX3.mjs";
|
|
21
21
|
import {
|
|
22
22
|
__spreadProps,
|
|
23
23
|
__spreadValues,
|
|
@@ -532,6 +532,7 @@ interface FieldMetadata extends Metadata {
|
|
|
532
532
|
type ItemWithId = {
|
|
533
533
|
_arrayId: string;
|
|
534
534
|
_originalIndex: number;
|
|
535
|
+
_currentIndex: number;
|
|
535
536
|
};
|
|
536
537
|
type ArrayState = {
|
|
537
538
|
items: ItemWithId[];
|
|
@@ -542,6 +543,7 @@ type UiState = {
|
|
|
542
543
|
rightSideBarVisible: boolean;
|
|
543
544
|
leftSideBarWidth?: number | null;
|
|
544
545
|
rightSideBarWidth?: number | null;
|
|
546
|
+
mobilePanelExpanded?: boolean;
|
|
545
547
|
itemSelector: ItemSelector | null;
|
|
546
548
|
arrayState: Record<string, ArrayState | undefined>;
|
|
547
549
|
previewMode: "interactive" | "edit";
|
|
@@ -554,7 +556,7 @@ type UiState = {
|
|
|
554
556
|
isDragging: boolean;
|
|
555
557
|
viewports: {
|
|
556
558
|
current: {
|
|
557
|
-
width: number;
|
|
559
|
+
width: number | "100%";
|
|
558
560
|
height: number | "auto";
|
|
559
561
|
};
|
|
560
562
|
controlsVisible: boolean;
|
|
@@ -564,6 +566,9 @@ type UiState = {
|
|
|
564
566
|
focus?: string | null;
|
|
565
567
|
metadata?: Record<string, any>;
|
|
566
568
|
};
|
|
569
|
+
plugin: {
|
|
570
|
+
current: string | null;
|
|
571
|
+
};
|
|
567
572
|
};
|
|
568
573
|
type AppState<UserData extends Data = Data> = {
|
|
569
574
|
data: UserData;
|
|
@@ -607,6 +612,15 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
|
|
|
607
612
|
type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
|
|
608
613
|
never
|
|
609
614
|
] ? False : True;
|
|
615
|
+
type RenderFunc<Props extends {
|
|
616
|
+
[key: string]: any;
|
|
617
|
+
} = {
|
|
618
|
+
children: ReactNode;
|
|
619
|
+
}> = (props: Props) => ReactElement;
|
|
620
|
+
type PluginInternal = Plugin & {
|
|
621
|
+
mobileOnly?: boolean;
|
|
622
|
+
desktopOnly?: boolean;
|
|
623
|
+
};
|
|
610
624
|
|
|
611
625
|
type MapFnParams<ThisField = Field> = {
|
|
612
626
|
value: any;
|
|
@@ -630,11 +644,6 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
|
|
|
630
644
|
[Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
|
|
631
645
|
}>;
|
|
632
646
|
|
|
633
|
-
type RenderFunc<Props extends {
|
|
634
|
-
[key: string]: any;
|
|
635
|
-
} = {
|
|
636
|
-
children: ReactNode;
|
|
637
|
-
}> = (props: Props) => ReactElement;
|
|
638
647
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
639
648
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
640
649
|
type OverridesGeneric<Shape extends {
|
|
@@ -706,7 +715,7 @@ type DragAxis = "dynamic" | "y" | "x";
|
|
|
706
715
|
|
|
707
716
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
|
708
717
|
type Viewport = {
|
|
709
|
-
width: number;
|
|
718
|
+
width: number | "100%";
|
|
710
719
|
height?: number | "auto";
|
|
711
720
|
label?: string;
|
|
712
721
|
icon?: iconTypes | ReactNode;
|
|
@@ -726,8 +735,13 @@ type IframeConfig = {
|
|
|
726
735
|
};
|
|
727
736
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
728
737
|
type Plugin<UserConfig extends Config = Config> = {
|
|
738
|
+
name?: string;
|
|
739
|
+
label?: string;
|
|
740
|
+
icon?: ReactNode;
|
|
741
|
+
render?: () => ReactElement;
|
|
729
742
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
730
743
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
744
|
+
mobilePanelHeight?: "toggle" | "min-content";
|
|
731
745
|
};
|
|
732
746
|
type History<D = any> = {
|
|
733
747
|
state: D;
|
|
@@ -820,4 +834,4 @@ type PuckAction = {
|
|
|
820
834
|
recordHistory?: boolean;
|
|
821
835
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
822
836
|
|
|
823
|
-
export { type
|
|
837
|
+
export { type ComponentConfigParams as $, type AppState as A, type FieldTransformFnParams as B, type Config as C, type Data as D, type FieldTransformFn as E, type Fields as F, overrideKeys as G, type History as H, type IframeConfig as I, type OverrideKey as J, type FieldRenderFunctions as K, type ItemWithId as L, type Metadata as M, type ArrayState as N, type OnAction as O, type PrivateAppState as P, type SlotComponent as Q, type RootData as R, type Slot as S, type PuckComponent as T, type UserGenerics as U, type Viewports as V, type WithId as W, type ComponentConfigExtensions as X, type RootConfig as Y, type ExtractConfigParams as Z, type ConfigParams as _, type PuckAction as a, type BaseData as a0, type RootDataWithoutProps as a1, type ComponentDataOptionalId as a2, type MappedItem as a3, type ComponentDataMap as a4, type PuckMetadata as a5, type ComponentMetadata as a6, type FieldMetadata as a7, type BaseField as a8, type TextField as a9, type NumberField as aa, type TextareaField as ab, type SelectField as ac, type RadioField as ad, type ArrayField as ae, type ObjectField as af, type Adaptor as ag, type ExternalFieldWithAdaptor as ah, type CacheOpts as ai, type ExternalField as aj, type CustomFieldRender as ak, type CustomField as al, type SlotField as am, type PuckContext as an, type DefaultRootRenderProps as ao, type DefaultRootProps as ap, type WithPuckProps as aq, type AsFieldProps as ar, type WithChildren as as, type ExtractField as at, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type PluginInternal as u, type WithSlotProps as v, type RichText as w, type Direction as x, type DragAxis as y, type Viewport as z };
|
|
@@ -532,6 +532,7 @@ interface FieldMetadata extends Metadata {
|
|
|
532
532
|
type ItemWithId = {
|
|
533
533
|
_arrayId: string;
|
|
534
534
|
_originalIndex: number;
|
|
535
|
+
_currentIndex: number;
|
|
535
536
|
};
|
|
536
537
|
type ArrayState = {
|
|
537
538
|
items: ItemWithId[];
|
|
@@ -542,6 +543,7 @@ type UiState = {
|
|
|
542
543
|
rightSideBarVisible: boolean;
|
|
543
544
|
leftSideBarWidth?: number | null;
|
|
544
545
|
rightSideBarWidth?: number | null;
|
|
546
|
+
mobilePanelExpanded?: boolean;
|
|
545
547
|
itemSelector: ItemSelector | null;
|
|
546
548
|
arrayState: Record<string, ArrayState | undefined>;
|
|
547
549
|
previewMode: "interactive" | "edit";
|
|
@@ -554,7 +556,7 @@ type UiState = {
|
|
|
554
556
|
isDragging: boolean;
|
|
555
557
|
viewports: {
|
|
556
558
|
current: {
|
|
557
|
-
width: number;
|
|
559
|
+
width: number | "100%";
|
|
558
560
|
height: number | "auto";
|
|
559
561
|
};
|
|
560
562
|
controlsVisible: boolean;
|
|
@@ -564,6 +566,9 @@ type UiState = {
|
|
|
564
566
|
focus?: string | null;
|
|
565
567
|
metadata?: Record<string, any>;
|
|
566
568
|
};
|
|
569
|
+
plugin: {
|
|
570
|
+
current: string | null;
|
|
571
|
+
};
|
|
567
572
|
};
|
|
568
573
|
type AppState<UserData extends Data = Data> = {
|
|
569
574
|
data: UserData;
|
|
@@ -607,6 +612,15 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
|
|
|
607
612
|
type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
|
|
608
613
|
never
|
|
609
614
|
] ? False : True;
|
|
615
|
+
type RenderFunc<Props extends {
|
|
616
|
+
[key: string]: any;
|
|
617
|
+
} = {
|
|
618
|
+
children: ReactNode;
|
|
619
|
+
}> = (props: Props) => ReactElement;
|
|
620
|
+
type PluginInternal = Plugin & {
|
|
621
|
+
mobileOnly?: boolean;
|
|
622
|
+
desktopOnly?: boolean;
|
|
623
|
+
};
|
|
610
624
|
|
|
611
625
|
type MapFnParams<ThisField = Field> = {
|
|
612
626
|
value: any;
|
|
@@ -630,11 +644,6 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
|
|
|
630
644
|
[Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
|
|
631
645
|
}>;
|
|
632
646
|
|
|
633
|
-
type RenderFunc<Props extends {
|
|
634
|
-
[key: string]: any;
|
|
635
|
-
} = {
|
|
636
|
-
children: ReactNode;
|
|
637
|
-
}> = (props: Props) => ReactElement;
|
|
638
647
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
639
648
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
640
649
|
type OverridesGeneric<Shape extends {
|
|
@@ -706,7 +715,7 @@ type DragAxis = "dynamic" | "y" | "x";
|
|
|
706
715
|
|
|
707
716
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
|
708
717
|
type Viewport = {
|
|
709
|
-
width: number;
|
|
718
|
+
width: number | "100%";
|
|
710
719
|
height?: number | "auto";
|
|
711
720
|
label?: string;
|
|
712
721
|
icon?: iconTypes | ReactNode;
|
|
@@ -726,8 +735,13 @@ type IframeConfig = {
|
|
|
726
735
|
};
|
|
727
736
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
728
737
|
type Plugin<UserConfig extends Config = Config> = {
|
|
738
|
+
name?: string;
|
|
739
|
+
label?: string;
|
|
740
|
+
icon?: ReactNode;
|
|
741
|
+
render?: () => ReactElement;
|
|
729
742
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
730
743
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
744
|
+
mobilePanelHeight?: "toggle" | "min-content";
|
|
731
745
|
};
|
|
732
746
|
type History<D = any> = {
|
|
733
747
|
state: D;
|
|
@@ -820,4 +834,4 @@ type PuckAction = {
|
|
|
820
834
|
recordHistory?: boolean;
|
|
821
835
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
822
836
|
|
|
823
|
-
export { type
|
|
837
|
+
export { type ComponentConfigParams as $, type AppState as A, type FieldTransformFnParams as B, type Config as C, type Data as D, type FieldTransformFn as E, type Fields as F, overrideKeys as G, type History as H, type IframeConfig as I, type OverrideKey as J, type FieldRenderFunctions as K, type ItemWithId as L, type Metadata as M, type ArrayState as N, type OnAction as O, type PrivateAppState as P, type SlotComponent as Q, type RootData as R, type Slot as S, type PuckComponent as T, type UserGenerics as U, type Viewports as V, type WithId as W, type ComponentConfigExtensions as X, type RootConfig as Y, type ExtractConfigParams as Z, type ConfigParams as _, type PuckAction as a, type BaseData as a0, type RootDataWithoutProps as a1, type ComponentDataOptionalId as a2, type MappedItem as a3, type ComponentDataMap as a4, type PuckMetadata as a5, type ComponentMetadata as a6, type FieldMetadata as a7, type BaseField as a8, type TextField as a9, type NumberField as aa, type TextareaField as ab, type SelectField as ac, type RadioField as ad, type ArrayField as ae, type ObjectField as af, type Adaptor as ag, type ExternalFieldWithAdaptor as ah, type CacheOpts as ai, type ExternalField as aj, type CustomFieldRender as ak, type CustomField as al, type SlotField as am, type PuckContext as an, type DefaultRootRenderProps as ao, type DefaultRootProps as ap, type WithPuckProps as aq, type AsFieldProps as ar, type WithChildren as as, type ExtractField as at, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type PluginInternal as u, type WithSlotProps as v, type RichText as w, type Direction as x, type DragAxis as y, type Viewport as z };
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-CSSRLPHM.mjs";
|
|
4
4
|
import {
|
|
5
5
|
LoadedRichTextMenuInner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O7X34GXV.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IDHXWXYL.mjs";
|
|
11
11
|
import {
|
|
12
12
|
get_class_name_factory_default
|
|
13
13
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -97,7 +97,7 @@ init_react_import();
|
|
|
97
97
|
import { lazy, Suspense } from "react";
|
|
98
98
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
99
99
|
var LoadedRichTextMenuFull = lazy(
|
|
100
|
-
() => import("./full-
|
|
100
|
+
() => import("./full-C4C2K2OO.mjs").then((m) => ({
|
|
101
101
|
default: m.LoadedRichTextMenuFull
|
|
102
102
|
}))
|
|
103
103
|
);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
defaultAppState,
|
|
6
6
|
resolveComponentData
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QV3IXRNS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
get_class_name_factory_default
|
|
10
10
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
mapFields,
|
|
13
13
|
walkAppState,
|
|
14
14
|
walkTree
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ODDSBBX3.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__async,
|
|
18
18
|
__objRest,
|