@measured/puck 0.14.0-canary.de9c2c4 → 0.14.0-canary.f2f0c9d

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.
@@ -17,6 +17,11 @@ declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
17
17
  type WithPuckProps<Props> = Props & {
18
18
  id: string;
19
19
  };
20
+ type FieldOption = {
21
+ label: string;
22
+ value: string | number | boolean;
23
+ };
24
+ type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
20
25
  type BaseField = {
21
26
  label?: string;
22
27
  };
@@ -33,17 +38,11 @@ type TextareaField = BaseField & {
33
38
  };
34
39
  type SelectField = BaseField & {
35
40
  type: "select";
36
- options: {
37
- label: string;
38
- value: string | number | boolean;
39
- }[];
41
+ options: FieldOptions;
40
42
  };
41
43
  type RadioField = BaseField & {
42
44
  type: "radio";
43
- options: {
44
- label: string;
45
- value: string | number | boolean;
46
- }[];
45
+ options: FieldOptions;
47
46
  };
48
47
  type ArrayField<Props extends {
49
48
  [key: string]: any;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Config, D as Data, I as ItemSelector, U as UiState, A as AppState, F as Field, a as DefaultComponentProps, b as DefaultRootProps, M as MappedItem, R as RootDataWithProps, c as RootData } from './Config-1b86f0dc.js';
2
- export { g as Adaptor, f as ArrayField, r as ArrayState, n as BaseData, B as BaseField, m as ComponentConfig, o as ComponentData, k as Content, i as CustomField, s as DropZone, h as ExternalField, E as ExternalFieldWithAdaptor, j as Fields, q as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, l as PuckContext, e as RadioField, p as RootDataWithoutProps, S as SelectField, T as TextField, d as TextareaField } from './Config-1b86f0dc.js';
1
+ import { C as Config, D as Data, I as ItemSelector, U as UiState, A as AppState, F as Field, a as DefaultComponentProps, b as DefaultRootProps, M as MappedItem, R as RootDataWithProps, c as RootData } from './Config-1444273f.js';
2
+ export { g as Adaptor, f as ArrayField, r as ArrayState, n as BaseData, B as BaseField, m as ComponentConfig, o as ComponentData, k as Content, i as CustomField, s as DropZone, h as ExternalField, E as ExternalFieldWithAdaptor, j as Fields, q as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, l as PuckContext, e as RadioField, p as RootDataWithoutProps, S as SelectField, T as TextField, d as TextareaField } from './Config-1444273f.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, CSSProperties, ReactElement, SyntheticEvent } from 'react';
package/dist/index.js CHANGED
@@ -30527,8 +30527,8 @@ init_react_import();
30527
30527
 
30528
30528
  // lib/generate-id.ts
30529
30529
  init_react_import();
30530
- var import_crypto = require("crypto");
30531
- var generateId = (type) => `${type}-${(0, import_crypto.randomBytes)(20).toString("hex")}`;
30530
+ var import_uuid = require("uuid");
30531
+ var generateId = (type) => `${type}-${(0, import_uuid.v4)()}`;
30532
30532
 
30533
30533
  // lib/reduce-related-zones.ts
30534
30534
  var reduceRelatedZones = (item, data, fn) => {
package/dist/rsc.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, D as Data } from './Config-1b86f0dc.js';
2
+ import { C as Config, D as Data } from './Config-1444273f.js';
3
3
  import 'react';
4
4
 
5
5
  declare function Render<UserConfig extends Config<any, any, any> = Config<any, any, any>>({ config, data }: {
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.14.0-canary.de9c2c4",
3
+ "version": "0.14.0-canary.f2f0c9d",
4
+ "author": "Measured Corporation Ltd <hello@measured.co>",
5
+ "repository": "measuredco/puck",
6
+ "bugs": "https://github.com/measuredco/puck/issues",
7
+ "homepage": "https://puckeditor.com",
4
8
  "private": false,
5
9
  "main": "./dist/index.js",
6
10
  "types": "./dist/index.d.ts",
@@ -58,7 +62,8 @@
58
62
  "deep-diff": "^1.0.2",
59
63
  "react-hotkeys-hook": "^4.4.1",
60
64
  "react-spinners": "^0.13.8",
61
- "use-debounce": "^9.0.4"
65
+ "use-debounce": "^9.0.4",
66
+ "uuid": "^9.0.1"
62
67
  },
63
68
  "peerDependencies": {
64
69
  "react": "^17.0.0 || ^18.0.0"