@measured/puck 0.18.0-canary.b355ddd → 0.18.0-canary.c6df5b2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{chunk-EXKSBUY5.mjs → chunk-CHWFBYEM.mjs} +2 -4
- package/dist/index.css +27 -34
- package/dist/index.d.mts +2 -9
- package/dist/index.d.ts +2 -9
- package/dist/index.js +1244 -954
- package/dist/index.mjs +1146 -853
- package/dist/{resolve-all-data-GYzT3ont.d.mts → resolve-all-data-DzJEE28m.d.mts} +2 -1
- package/dist/{resolve-all-data-GYzT3ont.d.ts → resolve-all-data-DzJEE28m.d.ts} +2 -1
- 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/package.json +3 -4
@@ -265,6 +265,7 @@ type UiState = {
|
|
265
265
|
rightSideBarVisible: boolean;
|
266
266
|
itemSelector: ItemSelector | null;
|
267
267
|
arrayState: Record<string, ArrayState | undefined>;
|
268
|
+
previewMode: "interactive" | "edit";
|
268
269
|
componentList: Record<string, {
|
269
270
|
components?: string[];
|
270
271
|
title?: string;
|
@@ -458,4 +459,4 @@ type PuckAction = {
|
|
458
459
|
|
459
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>>;
|
460
461
|
|
461
|
-
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
|
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 };
|
@@ -265,6 +265,7 @@ type UiState = {
|
|
265
265
|
rightSideBarVisible: boolean;
|
266
266
|
itemSelector: ItemSelector | null;
|
267
267
|
arrayState: Record<string, ArrayState | undefined>;
|
268
|
+
previewMode: "interactive" | "edit";
|
268
269
|
componentList: Record<string, {
|
269
270
|
components?: string[];
|
270
271
|
title?: string;
|
@@ -458,4 +459,4 @@ type PuckAction = {
|
|
458
459
|
|
459
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>>;
|
460
461
|
|
461
|
-
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
|
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,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import { C as Config, D as Data } from './resolve-all-data-
|
3
|
-
export { a6 as resolveAllData } from './resolve-all-data-
|
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
6
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
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, D as Data } from './resolve-all-data-
|
3
|
-
export { a6 as resolveAllData } from './resolve-all-data-
|
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
6
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
package/dist/rsc.js
CHANGED
@@ -193,13 +193,11 @@ var resolveComponentData = (item, config, onResolveStart, onResolveEnd) => __asy
|
|
193
193
|
onResolveStart(item);
|
194
194
|
}
|
195
195
|
const { props: resolvedProps, readOnly = {} } = yield configForItem.resolveData(item, { changed, lastData: oldItem });
|
196
|
-
const { readOnly: existingReadOnly = {} } = item || {};
|
197
|
-
const newReadOnly = __spreadValues(__spreadValues({}, existingReadOnly), readOnly);
|
198
196
|
const resolvedItem = __spreadProps(__spreadValues({}, item), {
|
199
197
|
props: __spreadValues(__spreadValues({}, item.props), resolvedProps)
|
200
198
|
});
|
201
|
-
if (Object.keys(
|
202
|
-
resolvedItem.readOnly =
|
199
|
+
if (Object.keys(readOnly).length) {
|
200
|
+
resolvedItem.readOnly = readOnly;
|
203
201
|
}
|
204
202
|
cache.lastChange[item.props.id] = {
|
205
203
|
item,
|
package/dist/rsc.mjs
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck",
|
3
|
-
"version": "0.18.0-canary.
|
3
|
+
"version": "0.18.0-canary.c6df5b2",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -54,7 +54,6 @@
|
|
54
54
|
"@types/object-hash": "^3.0.6",
|
55
55
|
"@types/react": "^19.0.1",
|
56
56
|
"@types/react-dom": "^19.0.2",
|
57
|
-
"@types/ua-parser-js": "^0.7.39",
|
58
57
|
"@types/uuid": "^10.0.0",
|
59
58
|
"css-box-model": "^1.2.1",
|
60
59
|
"eslint": "^7.32.0",
|
@@ -74,9 +73,9 @@
|
|
74
73
|
"deep-diff": "^1.0.2",
|
75
74
|
"object-hash": "^3.0.0",
|
76
75
|
"react-hotkeys-hook": "^4.6.1",
|
77
|
-
"ua-parser-js": "^1.0.37",
|
78
76
|
"use-debounce": "^9.0.4",
|
79
|
-
"uuid": "^9.0.1"
|
77
|
+
"uuid": "^9.0.1",
|
78
|
+
"zustand": "^5.0.2"
|
80
79
|
},
|
81
80
|
"peerDependencies": {
|
82
81
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|