@measured/puck 0.17.0-canary.fcdf346 → 0.17.0-canary.fe9321f

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- import { CSSProperties, ReactElement, ReactNode } from 'react';
1
+ import { CSSProperties, ReactElement, JSX, ReactNode } from 'react';
2
2
 
3
3
  type ItemSelector = {
4
4
  index: number;
@@ -10,10 +10,6 @@ type DropZoneProps = {
10
10
  allow?: string[];
11
11
  disallow?: string[];
12
12
  style?: CSSProperties;
13
- minEmptyHeight?: number;
14
- className?: string;
15
- dragRef?: ((element: Element | null) => void) | null;
16
- collisionAxis?: DragAxis;
17
13
  };
18
14
 
19
15
  type FieldOption = {
@@ -143,7 +139,6 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
143
139
  defaultProps?: FieldProps;
144
140
  fields?: Fields<FieldProps>;
145
141
  permissions?: Partial<Permissions>;
146
- inline?: boolean;
147
142
  resolveFields?: (data: DataShape, params: {
148
143
  changed: Partial<Record<keyof FieldProps, boolean>>;
149
144
  fields: Fields<FieldProps>;
@@ -211,7 +206,6 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
211
206
  type PuckContext = {
212
207
  renderDropZone: React.FC<DropZoneProps>;
213
208
  isEditing: boolean;
214
- dragRef: ((element: Element | null) => void) | null;
215
209
  };
216
210
  type DefaultRootFieldProps = {
217
211
  title?: string;
@@ -353,9 +347,6 @@ type FieldRenderFunctions = Omit<{
353
347
  }>;
354
348
  };
355
349
 
356
- type Direction = "left" | "right" | "up" | "down" | null;
357
- type DragAxis = "dynamic" | "y" | "x";
358
-
359
350
  type iconTypes = "Smartphone" | "Monitor" | "Tablet";
360
351
  type Viewport = {
361
352
  width: number;
@@ -458,4 +449,4 @@ type PuckAction = {
458
449
 
459
450
  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
451
 
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 };
452
+ export { type DefaultRootProps 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 RadioField as G, type History as H, type ItemSelector as I, type ArrayField as J, type ObjectField as K, type Adaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ExternalFieldWithAdaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalField as W, type CustomField as X, type Fields as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, resolveAllData as a4, 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 Viewport as m, type OverrideKey as n, overrideKeys as o, type FieldRenderFunctions as p, type ItemWithId as q, type ArrayState as r, type PuckComponent as s, type ComponentConfig as t, type RootDataWithoutProps as u, type RootData as v, type ComponentData as w, type Content as x, type BaseField as y, type TextareaField as z };
@@ -1,4 +1,4 @@
1
- import { CSSProperties, ReactElement, ReactNode } from 'react';
1
+ import { CSSProperties, ReactElement, JSX, ReactNode } from 'react';
2
2
 
3
3
  type ItemSelector = {
4
4
  index: number;
@@ -10,10 +10,6 @@ type DropZoneProps = {
10
10
  allow?: string[];
11
11
  disallow?: string[];
12
12
  style?: CSSProperties;
13
- minEmptyHeight?: number;
14
- className?: string;
15
- dragRef?: ((element: Element | null) => void) | null;
16
- collisionAxis?: DragAxis;
17
13
  };
18
14
 
19
15
  type FieldOption = {
@@ -143,7 +139,6 @@ type ComponentConfig<RenderProps extends DefaultComponentProps = DefaultComponen
143
139
  defaultProps?: FieldProps;
144
140
  fields?: Fields<FieldProps>;
145
141
  permissions?: Partial<Permissions>;
146
- inline?: boolean;
147
142
  resolveFields?: (data: DataShape, params: {
148
143
  changed: Partial<Record<keyof FieldProps, boolean>>;
149
144
  fields: Fields<FieldProps>;
@@ -211,7 +206,6 @@ type UserGenerics<UserConfig extends Config = Config, UserProps extends ExtractP
211
206
  type PuckContext = {
212
207
  renderDropZone: React.FC<DropZoneProps>;
213
208
  isEditing: boolean;
214
- dragRef: ((element: Element | null) => void) | null;
215
209
  };
216
210
  type DefaultRootFieldProps = {
217
211
  title?: string;
@@ -353,9 +347,6 @@ type FieldRenderFunctions = Omit<{
353
347
  }>;
354
348
  };
355
349
 
356
- type Direction = "left" | "right" | "up" | "down" | null;
357
- type DragAxis = "dynamic" | "y" | "x";
358
-
359
350
  type iconTypes = "Smartphone" | "Monitor" | "Tablet";
360
351
  type Viewport = {
361
352
  width: number;
@@ -458,4 +449,4 @@ type PuckAction = {
458
449
 
459
450
  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
451
 
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 };
452
+ export { type DefaultRootProps 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 RadioField as G, type History as H, type ItemSelector as I, type ArrayField as J, type ObjectField as K, type Adaptor as L, type MappedItem as M, type NumberField as N, type OnAction as O, type PuckAction as P, type ExternalFieldWithAdaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalField as W, type CustomField as X, type Fields as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, resolveAllData as a4, 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 Viewport as m, type OverrideKey as n, overrideKeys as o, type FieldRenderFunctions as p, type ItemWithId as q, type ArrayState as r, type PuckComponent as s, type ComponentConfig as t, type RootDataWithoutProps as u, type RootData as v, type ComponentData as w, type Content as x, type BaseField as y, type TextareaField 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-Fx9YY5bj.mjs';
3
- export { a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.mjs';
2
+ import { C as Config, D as Data } from './resolve-all-data-zN5E6nBu.mjs';
3
+ export { a4 as resolveAllData } from './resolve-all-data-zN5E6nBu.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-Fx9YY5bj.js';
3
- export { a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.js';
2
+ import { C as Config, D as Data } from './resolve-all-data-zN5E6nBu.js';
3
+ export { a4 as resolveAllData } from './resolve-all-data-zN5E6nBu.js';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config>({ config, data, }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.17.0-canary.fcdf346",
3
+ "version": "0.17.0-canary.fe9321f",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",
@@ -11,20 +11,20 @@
11
11
  "exports": {
12
12
  ".": {
13
13
  "react-server": {
14
+ "types": "./dist/rsc.d.ts",
14
15
  "import": "./dist/rsc.mjs",
15
- "require": "./dist/rsc.js",
16
- "types": "./dist/rsc.d.ts"
16
+ "require": "./dist/rsc.js"
17
17
  },
18
18
  "default": {
19
+ "types": "./dist/index.d.ts",
19
20
  "import": "./dist/index.mjs",
20
- "require": "./dist/index.js",
21
- "types": "./dist/index.d.ts"
21
+ "require": "./dist/index.js"
22
22
  }
23
23
  },
24
24
  "./rsc": {
25
+ "types": "./dist/rsc.d.ts",
25
26
  "import": "./dist/rsc.mjs",
26
- "require": "./dist/rsc.js",
27
- "types": "./dist/rsc.d.ts"
27
+ "require": "./dist/rsc.js"
28
28
  },
29
29
  "./puck.css": "./dist/index.css",
30
30
  "./dist/index.css": "./dist/index.css"
@@ -48,7 +48,7 @@
48
48
  "dist"
49
49
  ],
50
50
  "devDependencies": {
51
- "@testing-library/react": "^14.0.0",
51
+ "@testing-library/react": "^16.1.0",
52
52
  "@types/deep-diff": "^1.0.3",
53
53
  "@types/jest": "^29.5.4",
54
54
  "@types/object-hash": "^3.0.6",
@@ -69,17 +69,15 @@
69
69
  "typescript": "^5.5.4"
70
70
  },
71
71
  "dependencies": {
72
- "@dnd-kit/helpers": "0.0.6-beta-20241121223708",
73
- "@dnd-kit/react": "0.0.6-beta-20241121223708",
74
72
  "@measured/dnd": "16.6.0-canary.4cba1d1",
75
73
  "deep-diff": "^1.0.2",
76
74
  "object-hash": "^3.0.0",
77
- "react-hotkeys-hook": "^4.6.1",
75
+ "react-hotkeys-hook": "^4.4.1",
78
76
  "ua-parser-js": "^1.0.37",
79
77
  "use-debounce": "^9.0.4",
80
78
  "uuid": "^9.0.1"
81
79
  },
82
80
  "peerDependencies": {
83
- "react": "^17.0.0 || ^18.0.0"
81
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
84
82
  }
85
83
  }