@measured/puck 0.13.0-canary.b95050d → 0.13.0-canary.d1baf8f

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Puck
2
2
 
3
- The self-hosted, drag and drop editor for React.
3
+ The visual editor for React.
4
4
 
5
5
  <p align="left">
6
6
  <a aria-label="Measured logo" href="https://measured.co">
@@ -104,4 +104,4 @@ If you need support integrating Puck or creating a beautiful component library,
104
104
 
105
105
  ## License
106
106
 
107
- MIT © [Measured Co.](https://github.com/measuredco)
107
+ MIT © [Measured Corporation Ltd](https://measured.co)
@@ -21,10 +21,23 @@ type BaseField = {
21
21
  label?: string;
22
22
  };
23
23
  type TextField = BaseField & {
24
- type: "text" | "number" | "textarea";
24
+ type: "text";
25
+ };
26
+ type NumberField = BaseField & {
27
+ type: "number";
28
+ };
29
+ type TextareaField = BaseField & {
30
+ type: "textarea";
25
31
  };
26
32
  type SelectField = BaseField & {
27
- type: "select" | "radio";
33
+ type: "select";
34
+ options: {
35
+ label: string;
36
+ value: string | number | boolean;
37
+ }[];
38
+ };
39
+ type RadioField = BaseField & {
40
+ type: "radio";
28
41
  options: {
29
42
  label: string;
30
43
  value: string | number | boolean;
@@ -101,7 +114,7 @@ type Field<Props extends {
101
114
  [key: string]: any;
102
115
  } = {
103
116
  [key: string]: any;
104
- }> = TextField | SelectField | ArrayField<Props> | ObjectField<Props> | ExternalField<Props> | ExternalFieldWithAdaptor<Props> | CustomField;
117
+ }> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props> | ObjectField<Props> | ExternalField<Props> | ExternalFieldWithAdaptor<Props> | CustomField;
105
118
  type DefaultRootProps = {
106
119
  title?: string;
107
120
  [key: string]: any;
@@ -203,10 +216,11 @@ type UiState = {
203
216
  visible?: boolean;
204
217
  expanded?: boolean;
205
218
  }>;
219
+ isDragging: boolean;
206
220
  };
207
221
  type AppState = {
208
222
  data: Data;
209
223
  ui: UiState;
210
224
  };
211
225
 
212
- export { AppState as A, BaseField as B, Config as C, Data as D, ExternalFieldWithAdaptor as E, Field as F, ItemSelector as I, MappedItem as M, ObjectField as O, PuckComponent as P, RootDataWithProps as R, SelectField as S, TextField as T, UiState as U, DefaultRootProps as a, RootData as b, ArrayField as c, Adaptor as d, ExternalField as e, CustomField as f, DefaultComponentProps as g, Fields as h, Content as i, PuckContext as j, ComponentConfig as k, BaseData as l, ComponentData as m, RootDataWithoutProps as n, ItemWithId as o, ArrayState as p, DropZone as q };
226
+ export { AppState as A, BaseField as B, Config as C, Data as D, ExternalFieldWithAdaptor as E, Field as F, ItemSelector as I, MappedItem as M, NumberField as N, ObjectField as O, PuckComponent as P, RootDataWithProps as R, SelectField as S, TextField as T, UiState as U, DefaultComponentProps as a, DefaultRootProps as b, RootData as c, TextareaField as d, RadioField as e, ArrayField as f, Adaptor as g, ExternalField as h, CustomField as i, Fields as j, Content as k, PuckContext as l, ComponentConfig as m, BaseData as n, ComponentData as o, RootDataWithoutProps as p, ItemWithId as q, ArrayState as r, DropZone as s };