@measured/puck 0.15.0-canary.dd7051e → 0.15.0-canary.e0448f0
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-25917005.d.ts → Config-6344ec1b.d.ts} +24 -11
- package/dist/index.css +990 -989
- package/dist/index.d.ts +39 -24
- package/dist/index.js +2751 -2725
- package/dist/rsc.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { U as UiState, D as Data, A as AppState,
|
2
|
-
export {
|
1
|
+
import { U as UiState, D as Data, A as AppState, F as Field, a as FieldProps, C as Config, b as DefaultRootProps, I as ItemSelector, c as DropZoneProps, V as Viewports, d as DefaultComponentProps, M as MappedItem, R as RootDataWithProps, e as RootData, f as ComponentData } from './Config-6344ec1b.js';
|
2
|
+
export { q as Adaptor, p as ArrayField, l as ArrayState, B as BaseData, m as BaseField, i as ComponentConfig, g as Content, s as CustomField, r as ExternalField, E as ExternalFieldWithAdaptor, t as Fields, k as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, h as PuckContext, o as RadioField, j as RootDataWithoutProps, S as SelectField, T as TextField, n as TextareaField } from './Config-6344ec1b.js';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
5
|
import { ReactNode, ReactElement, CSSProperties, SyntheticEvent } from 'react';
|
@@ -64,6 +64,38 @@ type PuckAction = {
|
|
64
64
|
recordHistory?: boolean;
|
65
65
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
66
66
|
|
67
|
+
declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
|
68
|
+
children?: ReactNode;
|
69
|
+
icon?: ReactNode;
|
70
|
+
label: string;
|
71
|
+
el?: "label" | "div" | undefined;
|
72
|
+
readOnly?: boolean | undefined;
|
73
|
+
className?: string | undefined;
|
74
|
+
}) => react_jsx_runtime.JSX.Element;
|
75
|
+
type FieldLabelPropsInternal = {
|
76
|
+
children?: ReactNode;
|
77
|
+
icon?: ReactNode;
|
78
|
+
label?: string;
|
79
|
+
el?: "label" | "div";
|
80
|
+
readOnly?: boolean;
|
81
|
+
};
|
82
|
+
declare const FieldLabelInternal: ({ children, icon, label, el, readOnly, }: FieldLabelPropsInternal) => react_jsx_runtime.JSX.Element;
|
83
|
+
type FieldPropsInternalOptional<ValueType = any, F = Field<any>> = FieldProps<ValueType, F> & {
|
84
|
+
Label?: React.FC<FieldLabelPropsInternal>;
|
85
|
+
label?: string;
|
86
|
+
name?: string;
|
87
|
+
};
|
88
|
+
type FieldPropsInternal<ValueType = any, F = Field<any>> = FieldProps<ValueType, F> & {
|
89
|
+
Label: React.FC<FieldLabelPropsInternal>;
|
90
|
+
label?: string;
|
91
|
+
id: string;
|
92
|
+
name?: string;
|
93
|
+
};
|
94
|
+
declare function AutoFieldPrivate<ValueType = any, FieldType extends Field<ValueType> = Field<ValueType>>(props: FieldPropsInternalOptional<ValueType, FieldType> & {
|
95
|
+
Label?: React.FC<FieldLabelPropsInternal>;
|
96
|
+
}): react_jsx_runtime.JSX.Element;
|
97
|
+
declare function AutoField<ValueType = any, FieldType extends Field<ValueType> = Field<ValueType>>(props: FieldProps<ValueType, FieldType>): react_jsx_runtime.JSX.Element;
|
98
|
+
|
67
99
|
declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, }: {
|
68
100
|
children: ReactNode;
|
69
101
|
href?: string | undefined;
|
@@ -149,25 +181,6 @@ declare const IconButton: ({ children, href, onClick, variant, type, disabled, t
|
|
149
181
|
title: string;
|
150
182
|
}) => react_jsx_runtime.JSX.Element;
|
151
183
|
|
152
|
-
declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
|
153
|
-
children?: ReactNode;
|
154
|
-
icon?: ReactNode;
|
155
|
-
label: string;
|
156
|
-
el?: "label" | "div" | undefined;
|
157
|
-
readOnly?: boolean | undefined;
|
158
|
-
className?: string | undefined;
|
159
|
-
}) => react_jsx_runtime.JSX.Element;
|
160
|
-
type InputProps<F = Field<any>> = {
|
161
|
-
name: string;
|
162
|
-
field: F;
|
163
|
-
value: any;
|
164
|
-
id: string;
|
165
|
-
label?: string;
|
166
|
-
onChange: (value: any, uiState?: Partial<UiState>) => void;
|
167
|
-
readOnly?: boolean;
|
168
|
-
readOnlyFields?: Record<string, boolean | undefined>;
|
169
|
-
};
|
170
|
-
|
171
184
|
type RenderFunc<Props extends {
|
172
185
|
[key: string]: any;
|
173
186
|
} = {
|
@@ -210,14 +223,16 @@ type Overrides = OverridesGeneric<{
|
|
210
223
|
puck: RenderFunc;
|
211
224
|
}>;
|
212
225
|
type FieldRenderFunctions = Omit<{
|
213
|
-
[Type in Field["type"]]: React.FunctionComponent<
|
226
|
+
[Type in Field["type"]]: React.FunctionComponent<FieldProps<Extract<Field, {
|
214
227
|
type: Type;
|
215
228
|
}>> & {
|
216
229
|
children: ReactNode;
|
230
|
+
name: string;
|
217
231
|
}>;
|
218
232
|
}, "custom"> & {
|
219
|
-
[key: string]: React.FunctionComponent<
|
233
|
+
[key: string]: React.FunctionComponent<FieldProps<any> & {
|
220
234
|
children: ReactNode;
|
235
|
+
name: string;
|
221
236
|
}>;
|
222
237
|
};
|
223
238
|
|
@@ -321,4 +336,4 @@ declare const usePuck: () => {
|
|
321
336
|
}> | null;
|
322
337
|
};
|
323
338
|
|
324
|
-
export { AppState, Button, ComponentData, Config, Data, DefaultComponentProps, DefaultRootProps, Drawer, DropZone, DropZoneProvider, Field, FieldLabel, IconButton, MappedItem, Puck, PuckAction, Render, RootData, RootDataWithProps, UiState, dropZoneContext, migrate, resolveAllData, transformProps, usePuck };
|
339
|
+
export { AppState, AutoField, AutoFieldPrivate, Button, ComponentData, Config, Data, DefaultComponentProps, DefaultRootProps, Drawer, DropZone, DropZoneProvider, Field, FieldLabel, FieldLabelInternal, FieldProps, FieldPropsInternal, IconButton, MappedItem, Puck, PuckAction, Render, RootData, RootDataWithProps, UiState, dropZoneContext, migrate, resolveAllData, transformProps, usePuck };
|