@measured/puck 0.18.2-canary.de48691 → 0.18.2-canary.fc7fda2
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 +268 -279
- package/dist/index.d.mts +45 -3
- package/dist/index.d.ts +45 -3
- package/dist/index.js +1303 -1415
- package/dist/index.mjs +1501 -1615
- package/dist/{resolve-all-data-C-cc7ftj.d.mts → resolve-all-data-DzJEE28m.d.mts} +2 -2
- package/dist/{resolve-all-data-C-cc7ftj.d.ts → resolve-all-data-DzJEE28m.d.ts} +2 -2
- package/dist/rsc.d.mts +4 -4
- package/dist/rsc.d.ts +4 -4
- package/dist/rsc.js +5 -3
- package/dist/rsc.mjs +5 -3
- 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<DefaultRootRenderProps<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 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 Permissions 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 Plugin as d, type Overrides as e, type PuckAction 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 };
|
@@ -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<DefaultRootRenderProps<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 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 Permissions 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 Plugin as d, type Overrides as e, type PuckAction 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,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, D as Data } from './resolve-all-data-DzJEE28m.mjs';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-DzJEE28m.mjs';
|
4
4
|
import 'react';
|
5
5
|
|
6
|
-
declare function Render<UserConfig extends Config = Config
|
6
|
+
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
7
7
|
config: UserConfig;
|
8
|
-
data:
|
8
|
+
data: Data;
|
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, D as Data } from './resolve-all-data-DzJEE28m.js';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-DzJEE28m.js';
|
4
4
|
import 'react';
|
5
5
|
|
6
|
-
declare function Render<UserConfig extends Config = Config
|
6
|
+
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
7
7
|
config: UserConfig;
|
8
|
-
data:
|
8
|
+
data: Data;
|
9
9
|
}): react_jsx_runtime.JSX.Element;
|
10
10
|
|
11
11
|
export { Render };
|
package/dist/rsc.js
CHANGED
@@ -131,7 +131,10 @@ function DropZoneRender({
|
|
131
131
|
return null;
|
132
132
|
}) });
|
133
133
|
}
|
134
|
-
function Render({
|
134
|
+
function Render({
|
135
|
+
config,
|
136
|
+
data
|
137
|
+
}) {
|
135
138
|
var _a;
|
136
139
|
if ((_a = config.root) == null ? void 0 : _a.render) {
|
137
140
|
const rootProps = data.root.props || data.root;
|
@@ -141,8 +144,7 @@ function Render({ config, data }) {
|
|
141
144
|
__spreadProps(__spreadValues({}, rootProps), {
|
142
145
|
puck: {
|
143
146
|
renderDropZone: ({ zone }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropZoneRender, { zone, data, config }),
|
144
|
-
isEditing: false
|
145
|
-
dragRef: null
|
147
|
+
isEditing: false
|
146
148
|
},
|
147
149
|
title,
|
148
150
|
editMode: false,
|
package/dist/rsc.mjs
CHANGED
@@ -52,7 +52,10 @@ function DropZoneRender({
|
|
52
52
|
return null;
|
53
53
|
}) });
|
54
54
|
}
|
55
|
-
function Render({
|
55
|
+
function Render({
|
56
|
+
config,
|
57
|
+
data
|
58
|
+
}) {
|
56
59
|
var _a;
|
57
60
|
if ((_a = config.root) == null ? void 0 : _a.render) {
|
58
61
|
const rootProps = data.root.props || data.root;
|
@@ -62,8 +65,7 @@ function Render({ config, data }) {
|
|
62
65
|
__spreadProps(__spreadValues({}, rootProps), {
|
63
66
|
puck: {
|
64
67
|
renderDropZone: ({ zone }) => /* @__PURE__ */ jsx(DropZoneRender, { zone, data, config }),
|
65
|
-
isEditing: false
|
66
|
-
dragRef: null
|
68
|
+
isEditing: false
|
67
69
|
},
|
68
70
|
title,
|
69
71
|
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.fc7fda2",
|
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.6-beta-20250124180624",
|
72
|
+
"@dnd-kit/react": "0.0.6-beta-20250124180624",
|
73
73
|
"deep-diff": "^1.0.2",
|
74
74
|
"object-hash": "^3.0.0",
|
75
75
|
"react-hotkeys-hook": "^4.6.1",
|