@measured/puck 0.18.0-canary.d253d54 → 0.18.0-canary.d5324f1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 PuckAction 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 Permissions as d, type Plugin as e, type Overrides 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 };
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 PuckAction 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 Permissions as d, type Plugin as e, type Overrides 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 };
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-GYzT3ont.mjs';
3
- export { a6 as resolveAllData } from './resolve-all-data-GYzT3ont.mjs';
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-GYzT3ont.js';
3
- export { a6 as resolveAllData } from './resolve-all-data-GYzT3ont.js';
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(newReadOnly).length) {
202
- resolvedItem.readOnly = newReadOnly;
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
@@ -5,7 +5,7 @@ import {
5
5
  resolveAllData,
6
6
  rootDroppableId,
7
7
  setupZone
8
- } from "./chunk-EXKSBUY5.mjs";
8
+ } from "./chunk-CHWFBYEM.mjs";
9
9
 
10
10
  // rsc.tsx
11
11
  init_react_import();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.18.0-canary.d253d54",
3
+ "version": "0.18.0-canary.d5324f1",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",
@@ -74,7 +74,8 @@
74
74
  "object-hash": "^3.0.0",
75
75
  "react-hotkeys-hook": "^4.6.1",
76
76
  "use-debounce": "^9.0.4",
77
- "uuid": "^9.0.1"
77
+ "uuid": "^9.0.1",
78
+ "zustand": "^5.0.2"
78
79
  },
79
80
  "peerDependencies": {
80
81
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"