@measured/puck 0.18.2-canary.c22b3a9 → 0.18.2-canary.daff71e
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.css +279 -268
- package/dist/index.d.mts +3 -45
- package/dist/index.d.ts +3 -45
- package/dist/index.js +3569 -3468
- package/dist/index.mjs +3569 -3466
- package/dist/{resolve-all-data-DzJEE28m.d.mts → resolve-all-data-DtHY0CRO.d.mts} +3 -3
- package/dist/{resolve-all-data-DzJEE28m.d.ts → resolve-all-data-DtHY0CRO.d.ts} +3 -3
- 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 +3 -3
@@ -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 & {
|
@@ -341,7 +341,7 @@ type Overrides = OverridesGeneric<{
|
|
341
341
|
puck: RenderFunc;
|
342
342
|
}>;
|
343
343
|
type FieldRenderFunctions = Omit<{
|
344
|
-
[Type in Field["type"]]: React.FunctionComponent<FieldProps<Extract<Field, {
|
344
|
+
[Type in Field["type"]]: React.FunctionComponent<FieldProps<any, Extract<Field, {
|
345
345
|
type: Type;
|
346
346
|
}>> & {
|
347
347
|
children: ReactNode;
|
@@ -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 & {
|
@@ -341,7 +341,7 @@ type Overrides = OverridesGeneric<{
|
|
341
341
|
puck: RenderFunc;
|
342
342
|
}>;
|
343
343
|
type FieldRenderFunctions = Omit<{
|
344
|
-
[Type in Field["type"]]: React.FunctionComponent<FieldProps<Extract<Field, {
|
344
|
+
[Type in Field["type"]]: React.FunctionComponent<FieldProps<any, Extract<Field, {
|
345
345
|
type: Type;
|
346
346
|
}>> & {
|
347
347
|
children: ReactNode;
|
@@ -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-DtHY0CRO.mjs';
|
3
|
+
export { a5 as resolveAllData } from './resolve-all-data-DtHY0CRO.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-DtHY0CRO.js';
|
3
|
+
export { a5 as resolveAllData } from './resolve-all-data-DtHY0CRO.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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck",
|
3
|
-
"version": "0.18.2-canary.
|
3
|
+
"version": "0.18.2-canary.daff71e",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -68,8 +68,8 @@
|
|
68
68
|
"typescript": "^5.5.4"
|
69
69
|
},
|
70
70
|
"dependencies": {
|
71
|
-
"@dnd-kit/helpers": "0.0.
|
72
|
-
"@dnd-kit/react": "0.0.
|
71
|
+
"@dnd-kit/helpers": "0.0.7-beta-20250130032138",
|
72
|
+
"@dnd-kit/react": "0.0.7-beta-20250130032138",
|
73
73
|
"deep-diff": "^1.0.2",
|
74
74
|
"object-hash": "^3.0.0",
|
75
75
|
"react-hotkeys-hook": "^4.6.1",
|