@measured/puck 0.18.2-canary.8992a94 → 0.18.2-canary.b9ce5b7
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/index.d.mts +3 -45
- package/dist/index.d.ts +3 -45
- package/dist/index.js +8 -10
- package/dist/index.mjs +8 -8
- package/dist/{resolve-all-data-DzJEE28m.d.mts → resolve-all-data-C-cc7ftj.d.mts} +2 -2
- package/dist/{resolve-all-data-DzJEE28m.d.ts → resolve-all-data-C-cc7ftj.d.ts} +2 -2
- package/dist/rsc.d.mts +4 -4
- package/dist/rsc.d.ts +4 -4
- package/dist/rsc.js +3 -5
- package/dist/rsc.mjs +3 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { F as FieldProps, a as Field,
|
|
2
|
-
export {
|
|
1
|
+
import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, j as ExtractRootPropsFromConfig, k as ComponentDataMap } from './resolve-all-data-C-cc7ftj.mjs';
|
|
2
|
+
export { Q as Adaptor, K as ArrayField, s as ArrayState, a3 as AsFieldProps, B as BaseData, z as BaseField, u as ComponentConfig, x as ComponentData, y as Content, Y as CustomField, a0 as DefaultRootProps, $ as DefaultRootRenderProps, l as Direction, m as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, q as FieldRenderFunctions, Z as Fields, r as ItemWithId, M as MappedItem, N as NumberField, L as ObjectField, p as OverrideKey, t as PuckComponent, _ as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, n as Viewport, a4 as WithChildren, a1 as WithId, a2 as WithPuckProps, o as overrideKeys, a5 as resolveAllData } from './resolve-all-data-C-cc7ftj.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
|
6
|
-
import { UniqueIdentifier } from '@dnd-kit/abstract';
|
|
7
6
|
|
|
8
7
|
declare const ActionBar: {
|
|
9
8
|
({ label, children, }: {
|
|
@@ -79,47 +78,6 @@ declare const Drawer: {
|
|
|
79
78
|
}) => react_jsx_runtime.JSX.Element;
|
|
80
79
|
};
|
|
81
80
|
|
|
82
|
-
type PathData = Record<string, {
|
|
83
|
-
path: string[];
|
|
84
|
-
label: string;
|
|
85
|
-
}>;
|
|
86
|
-
type DropZoneContext<UserConfig extends Config = Config> = {
|
|
87
|
-
data: Data;
|
|
88
|
-
config: UserConfig;
|
|
89
|
-
componentState?: Record<string, any>;
|
|
90
|
-
itemSelector?: ItemSelector | null;
|
|
91
|
-
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
|
92
|
-
areaId?: string;
|
|
93
|
-
zoneCompound?: string;
|
|
94
|
-
index?: number;
|
|
95
|
-
hoveringComponent?: string | null;
|
|
96
|
-
setHoveringComponent?: (id: string | null) => void;
|
|
97
|
-
registerZoneArea?: (areaId: string) => void;
|
|
98
|
-
areasWithZones?: Record<string, boolean>;
|
|
99
|
-
registerZone?: (zoneCompound: string) => void;
|
|
100
|
-
unregisterZone?: (zoneCompound: string) => void;
|
|
101
|
-
activeZones?: Record<string, boolean>;
|
|
102
|
-
pathData?: PathData;
|
|
103
|
-
registerPath?: (id: string, selector: ItemSelector, label: string) => void;
|
|
104
|
-
unregisterPath?: (id: string) => void;
|
|
105
|
-
mode?: "edit" | "render";
|
|
106
|
-
depth: number;
|
|
107
|
-
registerLocalZone?: (zone: string, active: boolean) => void;
|
|
108
|
-
unregisterLocalZone?: (zone: string) => void;
|
|
109
|
-
path: string[];
|
|
110
|
-
} | null;
|
|
111
|
-
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
|
112
|
-
declare const DropZoneProvider: ({ children, value, }: {
|
|
113
|
-
children: ReactNode;
|
|
114
|
-
value: DropZoneContext;
|
|
115
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
116
|
-
|
|
117
|
-
type DropZoneDndData = {
|
|
118
|
-
areaId?: string;
|
|
119
|
-
depth: number;
|
|
120
|
-
path: UniqueIdentifier[];
|
|
121
|
-
isDroppableTarget: boolean;
|
|
122
|
-
};
|
|
123
81
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
|
124
82
|
|
|
125
83
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
|
@@ -236,4 +194,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
|
236
194
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
|
237
195
|
};
|
|
238
196
|
|
|
239
|
-
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone,
|
|
197
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, migrate, transformProps, usePuck };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { F as FieldProps, a as Field,
|
|
2
|
-
export {
|
|
1
|
+
import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, j as ExtractRootPropsFromConfig, k as ComponentDataMap } from './resolve-all-data-C-cc7ftj.js';
|
|
2
|
+
export { Q as Adaptor, K as ArrayField, s as ArrayState, a3 as AsFieldProps, B as BaseData, z as BaseField, u as ComponentConfig, x as ComponentData, y as Content, Y as CustomField, a0 as DefaultRootProps, $ as DefaultRootRenderProps, l as Direction, m as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, q as FieldRenderFunctions, Z as Fields, r as ItemWithId, M as MappedItem, N as NumberField, L as ObjectField, p as OverrideKey, t as PuckComponent, _ as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, n as Viewport, a4 as WithChildren, a1 as WithId, a2 as WithPuckProps, o as overrideKeys, a5 as resolveAllData } from './resolve-all-data-C-cc7ftj.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
|
6
|
-
import { UniqueIdentifier } from '@dnd-kit/abstract';
|
|
7
6
|
|
|
8
7
|
declare const ActionBar: {
|
|
9
8
|
({ label, children, }: {
|
|
@@ -79,47 +78,6 @@ declare const Drawer: {
|
|
|
79
78
|
}) => react_jsx_runtime.JSX.Element;
|
|
80
79
|
};
|
|
81
80
|
|
|
82
|
-
type PathData = Record<string, {
|
|
83
|
-
path: string[];
|
|
84
|
-
label: string;
|
|
85
|
-
}>;
|
|
86
|
-
type DropZoneContext<UserConfig extends Config = Config> = {
|
|
87
|
-
data: Data;
|
|
88
|
-
config: UserConfig;
|
|
89
|
-
componentState?: Record<string, any>;
|
|
90
|
-
itemSelector?: ItemSelector | null;
|
|
91
|
-
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
|
92
|
-
areaId?: string;
|
|
93
|
-
zoneCompound?: string;
|
|
94
|
-
index?: number;
|
|
95
|
-
hoveringComponent?: string | null;
|
|
96
|
-
setHoveringComponent?: (id: string | null) => void;
|
|
97
|
-
registerZoneArea?: (areaId: string) => void;
|
|
98
|
-
areasWithZones?: Record<string, boolean>;
|
|
99
|
-
registerZone?: (zoneCompound: string) => void;
|
|
100
|
-
unregisterZone?: (zoneCompound: string) => void;
|
|
101
|
-
activeZones?: Record<string, boolean>;
|
|
102
|
-
pathData?: PathData;
|
|
103
|
-
registerPath?: (id: string, selector: ItemSelector, label: string) => void;
|
|
104
|
-
unregisterPath?: (id: string) => void;
|
|
105
|
-
mode?: "edit" | "render";
|
|
106
|
-
depth: number;
|
|
107
|
-
registerLocalZone?: (zone: string, active: boolean) => void;
|
|
108
|
-
unregisterLocalZone?: (zone: string) => void;
|
|
109
|
-
path: string[];
|
|
110
|
-
} | null;
|
|
111
|
-
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
|
112
|
-
declare const DropZoneProvider: ({ children, value, }: {
|
|
113
|
-
children: ReactNode;
|
|
114
|
-
value: DropZoneContext;
|
|
115
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
116
|
-
|
|
117
|
-
type DropZoneDndData = {
|
|
118
|
-
areaId?: string;
|
|
119
|
-
depth: number;
|
|
120
|
-
path: UniqueIdentifier[];
|
|
121
|
-
isDroppableTarget: boolean;
|
|
122
|
-
};
|
|
123
81
|
declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
|
|
124
82
|
|
|
125
83
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
|
@@ -236,4 +194,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
|
236
194
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
|
237
195
|
};
|
|
238
196
|
|
|
239
|
-
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone,
|
|
197
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, migrate, transformProps, usePuck };
|
package/dist/index.js
CHANGED
|
@@ -169,14 +169,12 @@ __export(core_exports, {
|
|
|
169
169
|
Button: () => Button,
|
|
170
170
|
Drawer: () => Drawer,
|
|
171
171
|
DropZone: () => DropZone,
|
|
172
|
-
DropZoneProvider: () => DropZoneProvider,
|
|
173
172
|
FieldLabel: () => FieldLabel,
|
|
174
173
|
Group: () => Group,
|
|
175
174
|
IconButton: () => IconButton,
|
|
176
175
|
Label: () => Label,
|
|
177
176
|
Puck: () => Puck,
|
|
178
177
|
Render: () => Render,
|
|
179
|
-
dropZoneContext: () => dropZoneContext,
|
|
180
178
|
migrate: () => migrate,
|
|
181
179
|
overrideKeys: () => overrideKeys,
|
|
182
180
|
resolveAllData: () => resolveAllData,
|
|
@@ -3961,6 +3959,7 @@ var DropZoneRender = (0, import_react29.forwardRef)(
|
|
|
3961
3959
|
}) });
|
|
3962
3960
|
}
|
|
3963
3961
|
);
|
|
3962
|
+
var DropZonePure = (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZone, __spreadValues({}, props));
|
|
3964
3963
|
var DropZone = (0, import_react29.forwardRef)(
|
|
3965
3964
|
function DropZone2(props, ref) {
|
|
3966
3965
|
const ctx = (0, import_react29.useContext)(dropZoneContext);
|
|
@@ -6398,13 +6397,14 @@ function Render({
|
|
|
6398
6397
|
config.root.render,
|
|
6399
6398
|
__spreadProps(__spreadValues({}, rootProps), {
|
|
6400
6399
|
puck: {
|
|
6401
|
-
renderDropZone:
|
|
6402
|
-
isEditing: false
|
|
6400
|
+
renderDropZone: DropZonePure,
|
|
6401
|
+
isEditing: false,
|
|
6402
|
+
dragRef: null
|
|
6403
6403
|
},
|
|
6404
6404
|
title,
|
|
6405
6405
|
editMode: false,
|
|
6406
6406
|
id: "puck-root",
|
|
6407
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6407
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropZonePure, { zone: rootDroppableId })
|
|
6408
6408
|
})
|
|
6409
6409
|
)
|
|
6410
6410
|
}
|
|
@@ -6420,7 +6420,7 @@ function Render({
|
|
|
6420
6420
|
depth: 0,
|
|
6421
6421
|
path: []
|
|
6422
6422
|
},
|
|
6423
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropZonePure, { zone: rootDroppableId })
|
|
6424
6424
|
}
|
|
6425
6425
|
);
|
|
6426
6426
|
}
|
|
@@ -6480,12 +6480,12 @@ var Preview2 = ({ id = "puck-preview" }) => {
|
|
|
6480
6480
|
Page,
|
|
6481
6481
|
__spreadProps(__spreadValues({}, rootProps), {
|
|
6482
6482
|
puck: {
|
|
6483
|
-
renderDropZone:
|
|
6483
|
+
renderDropZone: DropZonePure,
|
|
6484
6484
|
isEditing: true,
|
|
6485
6485
|
dragRef: null
|
|
6486
6486
|
},
|
|
6487
6487
|
editMode: true,
|
|
6488
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6488
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropZonePure, { zone: rootDroppableId })
|
|
6489
6489
|
})
|
|
6490
6490
|
) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Render, { data: state.data, config });
|
|
6491
6491
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
@@ -7968,14 +7968,12 @@ var usePuck = () => {
|
|
|
7968
7968
|
Button,
|
|
7969
7969
|
Drawer,
|
|
7970
7970
|
DropZone,
|
|
7971
|
-
DropZoneProvider,
|
|
7972
7971
|
FieldLabel,
|
|
7973
7972
|
Group,
|
|
7974
7973
|
IconButton,
|
|
7975
7974
|
Label,
|
|
7976
7975
|
Puck,
|
|
7977
7976
|
Render,
|
|
7978
|
-
dropZoneContext,
|
|
7979
7977
|
migrate,
|
|
7980
7978
|
overrideKeys,
|
|
7981
7979
|
resolveAllData,
|
package/dist/index.mjs
CHANGED
|
@@ -3804,6 +3804,7 @@ var DropZoneRender = forwardRef3(
|
|
|
3804
3804
|
}) });
|
|
3805
3805
|
}
|
|
3806
3806
|
);
|
|
3807
|
+
var DropZonePure = (props) => /* @__PURE__ */ jsx22(DropZone, __spreadValues({}, props));
|
|
3807
3808
|
var DropZone = forwardRef3(
|
|
3808
3809
|
function DropZone2(props, ref) {
|
|
3809
3810
|
const ctx = useContext6(dropZoneContext);
|
|
@@ -6261,13 +6262,14 @@ function Render({
|
|
|
6261
6262
|
config.root.render,
|
|
6262
6263
|
__spreadProps(__spreadValues({}, rootProps), {
|
|
6263
6264
|
puck: {
|
|
6264
|
-
renderDropZone:
|
|
6265
|
-
isEditing: false
|
|
6265
|
+
renderDropZone: DropZonePure,
|
|
6266
|
+
isEditing: false,
|
|
6267
|
+
dragRef: null
|
|
6266
6268
|
},
|
|
6267
6269
|
title,
|
|
6268
6270
|
editMode: false,
|
|
6269
6271
|
id: "puck-root",
|
|
6270
|
-
children: /* @__PURE__ */ jsx32(
|
|
6272
|
+
children: /* @__PURE__ */ jsx32(DropZonePure, { zone: rootDroppableId })
|
|
6271
6273
|
})
|
|
6272
6274
|
)
|
|
6273
6275
|
}
|
|
@@ -6283,7 +6285,7 @@ function Render({
|
|
|
6283
6285
|
depth: 0,
|
|
6284
6286
|
path: []
|
|
6285
6287
|
},
|
|
6286
|
-
children: /* @__PURE__ */ jsx32(
|
|
6288
|
+
children: /* @__PURE__ */ jsx32(DropZonePure, { zone: rootDroppableId })
|
|
6287
6289
|
}
|
|
6288
6290
|
);
|
|
6289
6291
|
}
|
|
@@ -6343,12 +6345,12 @@ var Preview2 = ({ id = "puck-preview" }) => {
|
|
|
6343
6345
|
Page,
|
|
6344
6346
|
__spreadProps(__spreadValues({}, rootProps), {
|
|
6345
6347
|
puck: {
|
|
6346
|
-
renderDropZone:
|
|
6348
|
+
renderDropZone: DropZonePure,
|
|
6347
6349
|
isEditing: true,
|
|
6348
6350
|
dragRef: null
|
|
6349
6351
|
},
|
|
6350
6352
|
editMode: true,
|
|
6351
|
-
children: /* @__PURE__ */ jsx33(
|
|
6353
|
+
children: /* @__PURE__ */ jsx33(DropZonePure, { zone: rootDroppableId })
|
|
6352
6354
|
})
|
|
6353
6355
|
) : /* @__PURE__ */ jsx33(Render, { data: state.data, config });
|
|
6354
6356
|
return /* @__PURE__ */ jsx33(
|
|
@@ -7796,14 +7798,12 @@ export {
|
|
|
7796
7798
|
Button,
|
|
7797
7799
|
Drawer,
|
|
7798
7800
|
DropZone,
|
|
7799
|
-
DropZoneProvider,
|
|
7800
7801
|
FieldLabel,
|
|
7801
7802
|
Group,
|
|
7802
7803
|
IconButton,
|
|
7803
7804
|
Label,
|
|
7804
7805
|
Puck,
|
|
7805
7806
|
Render,
|
|
7806
|
-
dropZoneContext,
|
|
7807
7807
|
migrate,
|
|
7808
7808
|
overrideKeys,
|
|
7809
7809
|
resolveAllData,
|
|
@@ -182,7 +182,7 @@ type Config<Props extends DefaultComponentProps = DefaultComponentProps, RootPro
|
|
|
182
182
|
components: {
|
|
183
183
|
[ComponentName in keyof Props]: Omit<ComponentConfig<Props[ComponentName], Props[ComponentName]>, "type">;
|
|
184
184
|
};
|
|
185
|
-
root?: Partial<ComponentConfig<
|
|
185
|
+
root?: Partial<ComponentConfig<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
type WithId<Props> = Props & {
|
|
@@ -459,4 +459,4 @@ type PuckAction = {
|
|
|
459
459
|
|
|
460
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>>;
|
|
461
461
|
|
|
462
|
-
export { type
|
|
462
|
+
export { type DefaultRootRenderProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type ExtractPropsFromConfig as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type MappedItem as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type Fields as Z, type PuckContext as _, type Field as a, type DefaultRootProps as a0, type WithId as a1, type WithPuckProps as a2, type AsFieldProps as a3, type WithChildren as a4, resolveAllData as a5, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ExtractRootPropsFromConfig as j, type ComponentDataMap as k, type Direction as l, type DragAxis as m, type Viewport as n, overrideKeys as o, type OverrideKey as p, type FieldRenderFunctions as q, type ItemWithId as r, type ArrayState as s, type PuckComponent as t, type ComponentConfig as u, type RootDataWithoutProps as v, type RootData as w, type ComponentData as x, type Content as y, type BaseField as z };
|
|
@@ -182,7 +182,7 @@ type Config<Props extends DefaultComponentProps = DefaultComponentProps, RootPro
|
|
|
182
182
|
components: {
|
|
183
183
|
[ComponentName in keyof Props]: Omit<ComponentConfig<Props[ComponentName], Props[ComponentName]>, "type">;
|
|
184
184
|
};
|
|
185
|
-
root?: Partial<ComponentConfig<
|
|
185
|
+
root?: Partial<ComponentConfig<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
type WithId<Props> = Props & {
|
|
@@ -459,4 +459,4 @@ type PuckAction = {
|
|
|
459
459
|
|
|
460
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>>;
|
|
461
461
|
|
|
462
|
-
export { type
|
|
462
|
+
export { type DefaultRootRenderProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type ExtractPropsFromConfig as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type MappedItem as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type Fields as Z, type PuckContext as _, type Field as a, type DefaultRootProps as a0, type WithId as a1, type WithPuckProps as a2, type AsFieldProps as a3, type WithChildren as a4, resolveAllData as a5, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ExtractRootPropsFromConfig as j, type ComponentDataMap as k, type Direction as l, type DragAxis as m, type Viewport as n, overrideKeys as o, type OverrideKey as p, type FieldRenderFunctions as q, type ItemWithId as r, type ArrayState as s, type PuckComponent as t, type ComponentConfig as u, type RootDataWithoutProps as v, type RootData as w, type ComponentData as x, type Content as y, type BaseField as z };
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config,
|
|
3
|
-
export {
|
|
2
|
+
import { C as Config, U as UserGenerics } from './resolve-all-data-C-cc7ftj.mjs';
|
|
3
|
+
export { a5 as resolveAllData } from './resolve-all-data-C-cc7ftj.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
|
-
declare function Render<UserConfig extends Config = Config>({ config, data
|
|
6
|
+
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
|
|
7
7
|
config: UserConfig;
|
|
8
|
-
data:
|
|
8
|
+
data: G["UserData"];
|
|
9
9
|
}): react_jsx_runtime.JSX.Element;
|
|
10
10
|
|
|
11
11
|
export { Render };
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config,
|
|
3
|
-
export {
|
|
2
|
+
import { C as Config, U as UserGenerics } from './resolve-all-data-C-cc7ftj.js';
|
|
3
|
+
export { a5 as resolveAllData } from './resolve-all-data-C-cc7ftj.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
|
-
declare function Render<UserConfig extends Config = Config>({ config, data
|
|
6
|
+
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
|
|
7
7
|
config: UserConfig;
|
|
8
|
-
data:
|
|
8
|
+
data: G["UserData"];
|
|
9
9
|
}): react_jsx_runtime.JSX.Element;
|
|
10
10
|
|
|
11
11
|
export { Render };
|
package/dist/rsc.js
CHANGED
|
@@ -131,10 +131,7 @@ function DropZoneRender({
|
|
|
131
131
|
return null;
|
|
132
132
|
}) });
|
|
133
133
|
}
|
|
134
|
-
function Render({
|
|
135
|
-
config,
|
|
136
|
-
data
|
|
137
|
-
}) {
|
|
134
|
+
function Render({ config, data }) {
|
|
138
135
|
var _a;
|
|
139
136
|
if ((_a = config.root) == null ? void 0 : _a.render) {
|
|
140
137
|
const rootProps = data.root.props || data.root;
|
|
@@ -144,7 +141,8 @@ function Render({
|
|
|
144
141
|
__spreadProps(__spreadValues({}, rootProps), {
|
|
145
142
|
puck: {
|
|
146
143
|
renderDropZone: ({ zone }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropZoneRender, { zone, data, config }),
|
|
147
|
-
isEditing: false
|
|
144
|
+
isEditing: false,
|
|
145
|
+
dragRef: null
|
|
148
146
|
},
|
|
149
147
|
title,
|
|
150
148
|
editMode: false,
|
package/dist/rsc.mjs
CHANGED
|
@@ -52,10 +52,7 @@ function DropZoneRender({
|
|
|
52
52
|
return null;
|
|
53
53
|
}) });
|
|
54
54
|
}
|
|
55
|
-
function Render({
|
|
56
|
-
config,
|
|
57
|
-
data
|
|
58
|
-
}) {
|
|
55
|
+
function Render({ config, data }) {
|
|
59
56
|
var _a;
|
|
60
57
|
if ((_a = config.root) == null ? void 0 : _a.render) {
|
|
61
58
|
const rootProps = data.root.props || data.root;
|
|
@@ -65,7 +62,8 @@ function Render({
|
|
|
65
62
|
__spreadProps(__spreadValues({}, rootProps), {
|
|
66
63
|
puck: {
|
|
67
64
|
renderDropZone: ({ zone }) => /* @__PURE__ */ jsx(DropZoneRender, { zone, data, config }),
|
|
68
|
-
isEditing: false
|
|
65
|
+
isEditing: false,
|
|
66
|
+
dragRef: null
|
|
69
67
|
},
|
|
70
68
|
title,
|
|
71
69
|
editMode: false,
|
package/package.json
CHANGED