@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.
@@ -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<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
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 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 };
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<WithChildren<RootProps>, AsFieldProps<RootProps>, RootData<AsFieldProps<RootProps>>>>;
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 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 };
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, U as UserGenerics } from './resolve-all-data-C-cc7ftj.mjs';
3
- export { a5 as resolveAllData } from './resolve-all-data-C-cc7ftj.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
- declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
6
+ declare function Render<UserConfig extends Config = Config>({ config, data, }: {
7
7
  config: UserConfig;
8
- data: G["UserData"];
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, U as UserGenerics } from './resolve-all-data-C-cc7ftj.js';
3
- export { a5 as resolveAllData } from './resolve-all-data-C-cc7ftj.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
- declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data }: {
6
+ declare function Render<UserConfig extends Config = Config>({ config, data, }: {
7
7
  config: UserConfig;
8
- data: G["UserData"];
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({ config, data }) {
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({ config, data }) {
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.de48691",
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.7-beta-20250130032138",
72
- "@dnd-kit/react": "0.0.7-beta-20250130032138",
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",