@measured/puck 0.13.0-canary.2e1b5ef → 0.13.0-canary.36648c3
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/dist/{Config-162394d8.d.ts → Config-4367c689.d.ts} +28 -4
- package/dist/index.css +540 -497
- package/dist/index.d.ts +122 -32
- package/dist/index.js +2416 -2021
- package/dist/rsc.d.ts +3 -3
- package/dist/rsc.js +4 -1
- package/package.json +1 -3
@@ -21,10 +21,23 @@ type BaseField = {
|
|
21
21
|
label?: string;
|
22
22
|
};
|
23
23
|
type TextField = BaseField & {
|
24
|
-
type: "text"
|
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"
|
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;
|
@@ -42,6 +55,16 @@ type ArrayField<Props extends {
|
|
42
55
|
defaultItemProps?: Props[0];
|
43
56
|
getItemSummary?: (item: Props[0], index?: number) => string;
|
44
57
|
};
|
58
|
+
type ObjectField<Props extends {
|
59
|
+
[key: string]: any;
|
60
|
+
} = {
|
61
|
+
[key: string]: any;
|
62
|
+
}> = BaseField & {
|
63
|
+
type: "object";
|
64
|
+
objectFields: {
|
65
|
+
[SubPropName in keyof Props[0]]: Field<Props[0][SubPropName]>;
|
66
|
+
};
|
67
|
+
};
|
45
68
|
type Adaptor<AdaptorParams = {}, TableShape extends Record<string, any> = {}, PropShape = TableShape> = {
|
46
69
|
name: string;
|
47
70
|
fetchList: (adaptorParams?: AdaptorParams) => Promise<TableShape[] | null>;
|
@@ -91,7 +114,7 @@ type Field<Props extends {
|
|
91
114
|
[key: string]: any;
|
92
115
|
} = {
|
93
116
|
[key: string]: any;
|
94
|
-
}> = TextField | SelectField | ArrayField<Props> | ExternalField<Props> | ExternalFieldWithAdaptor<Props> | CustomField;
|
117
|
+
}> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props> | ObjectField<Props> | ExternalField<Props> | ExternalFieldWithAdaptor<Props> | CustomField;
|
95
118
|
type DefaultRootProps = {
|
96
119
|
title?: string;
|
97
120
|
[key: string]: any;
|
@@ -193,10 +216,11 @@ type UiState = {
|
|
193
216
|
visible?: boolean;
|
194
217
|
expanded?: boolean;
|
195
218
|
}>;
|
219
|
+
isDragging: boolean;
|
196
220
|
};
|
197
221
|
type AppState = {
|
198
222
|
data: Data;
|
199
223
|
ui: UiState;
|
200
224
|
};
|
201
225
|
|
202
|
-
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, PuckComponent as P, RootDataWithProps as R, SelectField as S, TextField as T, UiState as U,
|
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 };
|