@measured/puck 0.19.0-canary.61c8658 → 0.19.0-canary.7e231b7
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/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +38 -63
- package/dist/index.mjs +40 -64
- package/dist/{resolve-all-data-DleIzc4N.d.mts → resolve-all-data-wwgDuTnC.d.mts} +0 -1
- package/dist/{resolve-all-data-DleIzc4N.d.ts → resolve-all-data-wwgDuTnC.d.ts} +0 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/package.json +3 -4
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, M as Metadata, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, j as ComponentData, k as Fields, A as AppState, l as ComponentConfig } from './resolve-all-data-
|
2
|
-
export { Q as Adaptor, K as ArrayField, t as ArrayState, a2 as AsFieldProps, B as BaseData, E as BaseField, y as ComponentDataMap, z as Content, Y as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, m as Direction, n as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, a4 as ExtractPropsFromConfig, a5 as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, x as MappedItem, N as NumberField, L as ObjectField, q as OverrideKey, u as PuckComponent, Z as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, o as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-
|
1
|
+
import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, M as Metadata, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, j as ComponentData, k as Fields, A as AppState, l as ComponentConfig } from './resolve-all-data-wwgDuTnC.mjs';
|
2
|
+
export { Q as Adaptor, K as ArrayField, t as ArrayState, a2 as AsFieldProps, B as BaseData, E as BaseField, y as ComponentDataMap, z as Content, Y as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, m as Direction, n as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, a4 as ExtractPropsFromConfig, a5 as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, x as MappedItem, N as NumberField, L as ObjectField, q as OverrideKey, u as PuckComponent, Z as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, o as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.mjs';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, M as Metadata, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, j as ComponentData, k as Fields, A as AppState, l as ComponentConfig } from './resolve-all-data-
|
2
|
-
export { Q as Adaptor, K as ArrayField, t as ArrayState, a2 as AsFieldProps, B as BaseData, E as BaseField, y as ComponentDataMap, z as Content, Y as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, m as Direction, n as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, a4 as ExtractPropsFromConfig, a5 as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, x as MappedItem, N as NumberField, L as ObjectField, q as OverrideKey, u as PuckComponent, Z as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, o as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-
|
1
|
+
import { F as FieldProps, a as Field, D as DropZoneProps, C as Config, U as UserGenerics, b as Data, c as UiState, O as OnAction, P as Permissions, d as Plugin, e as Overrides, f as PuckAction, V as Viewports, I as IframeConfig, g as InitialHistory, M as Metadata, h as DefaultComponentProps, i as DefaultRootFieldProps, H as History, j as ComponentData, k as Fields, A as AppState, l as ComponentConfig } from './resolve-all-data-wwgDuTnC.js';
|
2
|
+
export { Q as Adaptor, K as ArrayField, t as ArrayState, a2 as AsFieldProps, B as BaseData, E as BaseField, y as ComponentDataMap, z as Content, Y as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, m as Direction, n as DragAxis, X as ExternalField, W as ExternalFieldWithAdaptor, a4 as ExtractPropsFromConfig, a5 as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, x as MappedItem, N as NumberField, L as ObjectField, q as OverrideKey, u as PuckComponent, Z as PuckContext, J as RadioField, w as RootData, R as RootDataWithProps, v as RootDataWithoutProps, S as SelectField, T as TextField, G as TextareaField, o as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.js';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.js
CHANGED
@@ -2886,7 +2886,6 @@ var ArrayField = ({
|
|
2886
2886
|
value: _value,
|
2887
2887
|
name,
|
2888
2888
|
label,
|
2889
|
-
labelIcon,
|
2890
2889
|
readOnly,
|
2891
2890
|
id,
|
2892
2891
|
Label: Label2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", __spreadValues({}, props))
|
@@ -2964,7 +2963,7 @@ var ArrayField = ({
|
|
2964
2963
|
Label2,
|
2965
2964
|
{
|
2966
2965
|
label: label || name,
|
2967
|
-
icon:
|
2966
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(List, { size: 16 }),
|
2968
2967
|
el: "div",
|
2969
2968
|
readOnly,
|
2970
2969
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
@@ -3205,7 +3204,6 @@ var DefaultField = ({
|
|
3205
3204
|
value: _value,
|
3206
3205
|
name,
|
3207
3206
|
label,
|
3208
|
-
labelIcon,
|
3209
3207
|
Label: Label2,
|
3210
3208
|
id
|
3211
3209
|
}) => {
|
@@ -3214,7 +3212,7 @@ var DefaultField = ({
|
|
3214
3212
|
Label2,
|
3215
3213
|
{
|
3216
3214
|
label: label || name,
|
3217
|
-
icon:
|
3215
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
3218
3216
|
field.type === "text" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Type, { size: 16 }),
|
3219
3217
|
field.type === "number" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hash, { size: 16 })
|
3220
3218
|
] }),
|
@@ -3644,7 +3642,6 @@ var ExternalField = ({
|
|
3644
3642
|
value,
|
3645
3643
|
name,
|
3646
3644
|
label,
|
3647
|
-
labelIcon,
|
3648
3645
|
Label: Label2,
|
3649
3646
|
id,
|
3650
3647
|
readOnly
|
@@ -3662,35 +3659,27 @@ var ExternalField = ({
|
|
3662
3659
|
if (field.type !== "external") {
|
3663
3660
|
return null;
|
3664
3661
|
}
|
3665
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
3666
|
-
|
3662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Label2, { label: label || name, icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Link, { size: 16 }), el: "div", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
3663
|
+
ExternalInput,
|
3667
3664
|
{
|
3668
|
-
|
3669
|
-
|
3670
|
-
|
3671
|
-
|
3672
|
-
|
3673
|
-
|
3674
|
-
|
3675
|
-
|
3676
|
-
|
3677
|
-
|
3678
|
-
|
3679
|
-
|
3680
|
-
|
3681
|
-
|
3682
|
-
|
3683
|
-
|
3684
|
-
}) : validField.fetchList
|
3685
|
-
}),
|
3686
|
-
onChange,
|
3687
|
-
value,
|
3688
|
-
id,
|
3689
|
-
readOnly
|
3690
|
-
}
|
3691
|
-
)
|
3665
|
+
name,
|
3666
|
+
field: __spreadProps(__spreadValues({}, validField), {
|
3667
|
+
// DEPRECATED
|
3668
|
+
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
|
3669
|
+
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
3670
|
+
mapRow: validField.mapRow,
|
3671
|
+
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(void 0, null, function* () {
|
3672
|
+
return yield deprecatedField.adaptor.fetchList(
|
3673
|
+
deprecatedField.adaptorParams
|
3674
|
+
);
|
3675
|
+
}) : validField.fetchList
|
3676
|
+
}),
|
3677
|
+
onChange,
|
3678
|
+
value,
|
3679
|
+
id,
|
3680
|
+
readOnly
|
3692
3681
|
}
|
3693
|
-
);
|
3682
|
+
) });
|
3694
3683
|
};
|
3695
3684
|
|
3696
3685
|
// components/AutoField/fields/RadioField/index.tsx
|
@@ -3719,7 +3708,6 @@ var RadioField = ({
|
|
3719
3708
|
name,
|
3720
3709
|
id,
|
3721
3710
|
label,
|
3722
|
-
labelIcon,
|
3723
3711
|
Label: Label2
|
3724
3712
|
}) => {
|
3725
3713
|
const flatOptions = (0, import_react21.useMemo)(
|
@@ -3732,7 +3720,7 @@ var RadioField = ({
|
|
3732
3720
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
3733
3721
|
Label2,
|
3734
3722
|
{
|
3735
|
-
icon:
|
3723
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CircleCheckBig, { size: 16 }),
|
3736
3724
|
label: label || name,
|
3737
3725
|
readOnly,
|
3738
3726
|
el: "div",
|
@@ -3779,7 +3767,6 @@ var SelectField = ({
|
|
3779
3767
|
field,
|
3780
3768
|
onChange,
|
3781
3769
|
label,
|
3782
|
-
labelIcon,
|
3783
3770
|
Label: Label2,
|
3784
3771
|
value,
|
3785
3772
|
name,
|
@@ -3797,7 +3784,7 @@ var SelectField = ({
|
|
3797
3784
|
Label2,
|
3798
3785
|
{
|
3799
3786
|
label: label || name,
|
3800
|
-
icon:
|
3787
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronDown, { size: 16 }),
|
3801
3788
|
readOnly,
|
3802
3789
|
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
3803
3790
|
"select",
|
@@ -3841,33 +3828,24 @@ var TextareaField = ({
|
|
3841
3828
|
value,
|
3842
3829
|
name,
|
3843
3830
|
label,
|
3844
|
-
labelIcon,
|
3845
3831
|
Label: Label2,
|
3846
3832
|
id
|
3847
3833
|
}) => {
|
3848
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
3849
|
-
|
3834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Label2, { label: label || name, icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Type, { size: 16 }), readOnly, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
3835
|
+
"textarea",
|
3850
3836
|
{
|
3851
|
-
|
3852
|
-
|
3837
|
+
id,
|
3838
|
+
className: getClassName13("input"),
|
3839
|
+
autoComplete: "off",
|
3840
|
+
name,
|
3841
|
+
value: typeof value === "undefined" ? "" : value,
|
3842
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
3853
3843
|
readOnly,
|
3854
|
-
|
3855
|
-
|
3856
|
-
|
3857
|
-
id,
|
3858
|
-
className: getClassName13("input"),
|
3859
|
-
autoComplete: "off",
|
3860
|
-
name,
|
3861
|
-
value: typeof value === "undefined" ? "" : value,
|
3862
|
-
onChange: (e) => onChange(e.currentTarget.value),
|
3863
|
-
readOnly,
|
3864
|
-
tabIndex: readOnly ? -1 : void 0,
|
3865
|
-
rows: 5,
|
3866
|
-
placeholder: field.type === "textarea" ? field.placeholder : void 0
|
3867
|
-
}
|
3868
|
-
)
|
3844
|
+
tabIndex: readOnly ? -1 : void 0,
|
3845
|
+
rows: 5,
|
3846
|
+
placeholder: field.type === "textarea" ? field.placeholder : void 0
|
3869
3847
|
}
|
3870
|
-
);
|
3848
|
+
) });
|
3871
3849
|
};
|
3872
3850
|
|
3873
3851
|
// components/AutoField/fields/ObjectField/index.tsx
|
@@ -3886,7 +3864,6 @@ var ObjectField = ({
|
|
3886
3864
|
value,
|
3887
3865
|
name,
|
3888
3866
|
label,
|
3889
|
-
labelIcon,
|
3890
3867
|
Label: Label2,
|
3891
3868
|
readOnly,
|
3892
3869
|
id
|
@@ -3900,7 +3877,7 @@ var ObjectField = ({
|
|
3900
3877
|
Label2,
|
3901
3878
|
{
|
3902
3879
|
label: label || name,
|
3903
|
-
icon:
|
3880
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EllipsisVertical, { size: 16 }),
|
3904
3881
|
el: "div",
|
3905
3882
|
readOnly,
|
3906
3883
|
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassName14(), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((subName) => {
|
@@ -4017,7 +3994,6 @@ function AutoFieldInternal(props) {
|
|
4017
3994
|
const { id, Label: Label2 = FieldLabelInternal } = props;
|
4018
3995
|
const field = props.field;
|
4019
3996
|
const label = field.label;
|
4020
|
-
const labelIcon = field.labelIcon;
|
4021
3997
|
const defaultId = useSafeId();
|
4022
3998
|
const resolvedId = id || defaultId;
|
4023
3999
|
const defaultFields = {
|
@@ -4043,7 +4019,6 @@ function AutoFieldInternal(props) {
|
|
4043
4019
|
const mergedProps = __spreadProps(__spreadValues({}, props), {
|
4044
4020
|
field,
|
4045
4021
|
label,
|
4046
|
-
labelIcon,
|
4047
4022
|
Label: Label2,
|
4048
4023
|
id: resolvedId
|
4049
4024
|
});
|
@@ -5590,7 +5565,7 @@ var DragDropContextClient = ({
|
|
5590
5565
|
const resolveData2 = useAppStore((s) => s.resolveData);
|
5591
5566
|
const metadata = useAppStore((s) => s.metadata);
|
5592
5567
|
const appStore = useAppStoreApi();
|
5593
|
-
const id =
|
5568
|
+
const id = (0, import_react36.useId)();
|
5594
5569
|
const debouncedParamsRef = (0, import_react36.useRef)(null);
|
5595
5570
|
const tempDisableFallback = useTempDisableFallback(100);
|
5596
5571
|
const [zoneStore] = (0, import_react36.useState)(
|
@@ -6044,7 +6019,7 @@ var Drawer = ({
|
|
6044
6019
|
"Warning: The `direction` prop on Drawer is deprecated and no longer required to achieve multi-directional dragging."
|
6045
6020
|
);
|
6046
6021
|
}
|
6047
|
-
const id =
|
6022
|
+
const id = (0, import_react37.useId)();
|
6048
6023
|
const { ref } = useDroppableSafe({
|
6049
6024
|
id,
|
6050
6025
|
type: "void",
|
package/dist/index.mjs
CHANGED
@@ -2694,7 +2694,6 @@ var ArrayField = ({
|
|
2694
2694
|
value: _value,
|
2695
2695
|
name,
|
2696
2696
|
label,
|
2697
|
-
labelIcon,
|
2698
2697
|
readOnly,
|
2699
2698
|
id,
|
2700
2699
|
Label: Label2 = (props) => /* @__PURE__ */ jsx7("div", __spreadValues({}, props))
|
@@ -2772,7 +2771,7 @@ var ArrayField = ({
|
|
2772
2771
|
Label2,
|
2773
2772
|
{
|
2774
2773
|
label: label || name,
|
2775
|
-
icon:
|
2774
|
+
icon: /* @__PURE__ */ jsx7(List, { size: 16 }),
|
2776
2775
|
el: "div",
|
2777
2776
|
readOnly,
|
2778
2777
|
children: /* @__PURE__ */ jsx7(
|
@@ -3013,7 +3012,6 @@ var DefaultField = ({
|
|
3013
3012
|
value: _value,
|
3014
3013
|
name,
|
3015
3014
|
label,
|
3016
|
-
labelIcon,
|
3017
3015
|
Label: Label2,
|
3018
3016
|
id
|
3019
3017
|
}) => {
|
@@ -3022,7 +3020,7 @@ var DefaultField = ({
|
|
3022
3020
|
Label2,
|
3023
3021
|
{
|
3024
3022
|
label: label || name,
|
3025
|
-
icon:
|
3023
|
+
icon: /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
3026
3024
|
field.type === "text" && /* @__PURE__ */ jsx8(Type, { size: 16 }),
|
3027
3025
|
field.type === "number" && /* @__PURE__ */ jsx8(Hash, { size: 16 })
|
3028
3026
|
] }),
|
@@ -3458,7 +3456,6 @@ var ExternalField = ({
|
|
3458
3456
|
value,
|
3459
3457
|
name,
|
3460
3458
|
label,
|
3461
|
-
labelIcon,
|
3462
3459
|
Label: Label2,
|
3463
3460
|
id,
|
3464
3461
|
readOnly
|
@@ -3476,35 +3473,27 @@ var ExternalField = ({
|
|
3476
3473
|
if (field.type !== "external") {
|
3477
3474
|
return null;
|
3478
3475
|
}
|
3479
|
-
return /* @__PURE__ */ jsx13(
|
3480
|
-
|
3476
|
+
return /* @__PURE__ */ jsx13(Label2, { label: label || name, icon: /* @__PURE__ */ jsx13(Link, { size: 16 }), el: "div", children: /* @__PURE__ */ jsx13(
|
3477
|
+
ExternalInput,
|
3481
3478
|
{
|
3482
|
-
|
3483
|
-
|
3484
|
-
|
3485
|
-
|
3486
|
-
|
3487
|
-
|
3488
|
-
|
3489
|
-
|
3490
|
-
|
3491
|
-
|
3492
|
-
|
3493
|
-
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3498
|
-
}) : validField.fetchList
|
3499
|
-
}),
|
3500
|
-
onChange,
|
3501
|
-
value,
|
3502
|
-
id,
|
3503
|
-
readOnly
|
3504
|
-
}
|
3505
|
-
)
|
3479
|
+
name,
|
3480
|
+
field: __spreadProps(__spreadValues({}, validField), {
|
3481
|
+
// DEPRECATED
|
3482
|
+
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
|
3483
|
+
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
3484
|
+
mapRow: validField.mapRow,
|
3485
|
+
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(void 0, null, function* () {
|
3486
|
+
return yield deprecatedField.adaptor.fetchList(
|
3487
|
+
deprecatedField.adaptorParams
|
3488
|
+
);
|
3489
|
+
}) : validField.fetchList
|
3490
|
+
}),
|
3491
|
+
onChange,
|
3492
|
+
value,
|
3493
|
+
id,
|
3494
|
+
readOnly
|
3506
3495
|
}
|
3507
|
-
);
|
3496
|
+
) });
|
3508
3497
|
};
|
3509
3498
|
|
3510
3499
|
// components/AutoField/fields/RadioField/index.tsx
|
@@ -3533,7 +3522,6 @@ var RadioField = ({
|
|
3533
3522
|
name,
|
3534
3523
|
id,
|
3535
3524
|
label,
|
3536
|
-
labelIcon,
|
3537
3525
|
Label: Label2
|
3538
3526
|
}) => {
|
3539
3527
|
const flatOptions = useMemo3(
|
@@ -3546,7 +3534,7 @@ var RadioField = ({
|
|
3546
3534
|
return /* @__PURE__ */ jsx14(
|
3547
3535
|
Label2,
|
3548
3536
|
{
|
3549
|
-
icon:
|
3537
|
+
icon: /* @__PURE__ */ jsx14(CircleCheckBig, { size: 16 }),
|
3550
3538
|
label: label || name,
|
3551
3539
|
readOnly,
|
3552
3540
|
el: "div",
|
@@ -3593,7 +3581,6 @@ var SelectField = ({
|
|
3593
3581
|
field,
|
3594
3582
|
onChange,
|
3595
3583
|
label,
|
3596
|
-
labelIcon,
|
3597
3584
|
Label: Label2,
|
3598
3585
|
value,
|
3599
3586
|
name,
|
@@ -3611,7 +3598,7 @@ var SelectField = ({
|
|
3611
3598
|
Label2,
|
3612
3599
|
{
|
3613
3600
|
label: label || name,
|
3614
|
-
icon:
|
3601
|
+
icon: /* @__PURE__ */ jsx15(ChevronDown, { size: 16 }),
|
3615
3602
|
readOnly,
|
3616
3603
|
children: /* @__PURE__ */ jsx15(
|
3617
3604
|
"select",
|
@@ -3655,33 +3642,24 @@ var TextareaField = ({
|
|
3655
3642
|
value,
|
3656
3643
|
name,
|
3657
3644
|
label,
|
3658
|
-
labelIcon,
|
3659
3645
|
Label: Label2,
|
3660
3646
|
id
|
3661
3647
|
}) => {
|
3662
|
-
return /* @__PURE__ */ jsx16(
|
3663
|
-
|
3648
|
+
return /* @__PURE__ */ jsx16(Label2, { label: label || name, icon: /* @__PURE__ */ jsx16(Type, { size: 16 }), readOnly, children: /* @__PURE__ */ jsx16(
|
3649
|
+
"textarea",
|
3664
3650
|
{
|
3665
|
-
|
3666
|
-
|
3651
|
+
id,
|
3652
|
+
className: getClassName13("input"),
|
3653
|
+
autoComplete: "off",
|
3654
|
+
name,
|
3655
|
+
value: typeof value === "undefined" ? "" : value,
|
3656
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
3667
3657
|
readOnly,
|
3668
|
-
|
3669
|
-
|
3670
|
-
|
3671
|
-
id,
|
3672
|
-
className: getClassName13("input"),
|
3673
|
-
autoComplete: "off",
|
3674
|
-
name,
|
3675
|
-
value: typeof value === "undefined" ? "" : value,
|
3676
|
-
onChange: (e) => onChange(e.currentTarget.value),
|
3677
|
-
readOnly,
|
3678
|
-
tabIndex: readOnly ? -1 : void 0,
|
3679
|
-
rows: 5,
|
3680
|
-
placeholder: field.type === "textarea" ? field.placeholder : void 0
|
3681
|
-
}
|
3682
|
-
)
|
3658
|
+
tabIndex: readOnly ? -1 : void 0,
|
3659
|
+
rows: 5,
|
3660
|
+
placeholder: field.type === "textarea" ? field.placeholder : void 0
|
3683
3661
|
}
|
3684
|
-
);
|
3662
|
+
) });
|
3685
3663
|
};
|
3686
3664
|
|
3687
3665
|
// components/AutoField/fields/ObjectField/index.tsx
|
@@ -3700,7 +3678,6 @@ var ObjectField = ({
|
|
3700
3678
|
value,
|
3701
3679
|
name,
|
3702
3680
|
label,
|
3703
|
-
labelIcon,
|
3704
3681
|
Label: Label2,
|
3705
3682
|
readOnly,
|
3706
3683
|
id
|
@@ -3714,7 +3691,7 @@ var ObjectField = ({
|
|
3714
3691
|
Label2,
|
3715
3692
|
{
|
3716
3693
|
label: label || name,
|
3717
|
-
icon:
|
3694
|
+
icon: /* @__PURE__ */ jsx17(EllipsisVertical, { size: 16 }),
|
3718
3695
|
el: "div",
|
3719
3696
|
readOnly,
|
3720
3697
|
children: /* @__PURE__ */ jsx17("div", { className: getClassName14(), children: /* @__PURE__ */ jsx17("fieldset", { className: getClassName14("fieldset"), children: Object.keys(field.objectFields).map((subName) => {
|
@@ -3831,7 +3808,6 @@ function AutoFieldInternal(props) {
|
|
3831
3808
|
const { id, Label: Label2 = FieldLabelInternal } = props;
|
3832
3809
|
const field = props.field;
|
3833
3810
|
const label = field.label;
|
3834
|
-
const labelIcon = field.labelIcon;
|
3835
3811
|
const defaultId = useSafeId();
|
3836
3812
|
const resolvedId = id || defaultId;
|
3837
3813
|
const defaultFields = {
|
@@ -3857,7 +3833,6 @@ function AutoFieldInternal(props) {
|
|
3857
3833
|
const mergedProps = __spreadProps(__spreadValues({}, props), {
|
3858
3834
|
field,
|
3859
3835
|
label,
|
3860
|
-
labelIcon,
|
3861
3836
|
Label: Label2,
|
3862
3837
|
id: resolvedId
|
3863
3838
|
});
|
@@ -3959,7 +3934,7 @@ init_react_import();
|
|
3959
3934
|
var styles_module_default10 = { "Drawer": "_Drawer_fkqfo_1", "Drawer-draggable": "_Drawer-draggable_fkqfo_8", "Drawer-draggableBg": "_Drawer-draggableBg_fkqfo_12", "Drawer-draggableFg": "_Drawer-draggableFg_fkqfo_21", "DrawerItem-draggable": "_DrawerItem-draggable_fkqfo_25", "DrawerItem--disabled": "_DrawerItem--disabled_fkqfo_38", "DrawerItem": "_DrawerItem_fkqfo_25", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_fkqfo_48", "DrawerItem-name": "_DrawerItem-name_fkqfo_66" };
|
3960
3935
|
|
3961
3936
|
// components/Drawer/index.tsx
|
3962
|
-
import { useMemo as useMemo9, useState as useState16 } from "react";
|
3937
|
+
import { useId as useId2, useMemo as useMemo9, useState as useState16 } from "react";
|
3963
3938
|
|
3964
3939
|
// components/DragDropContext/index.tsx
|
3965
3940
|
init_react_import();
|
@@ -3969,6 +3944,7 @@ import {
|
|
3969
3944
|
useCallback as useCallback10,
|
3970
3945
|
useContext as useContext7,
|
3971
3946
|
useEffect as useEffect17,
|
3947
|
+
useId,
|
3972
3948
|
useRef as useRef4,
|
3973
3949
|
useState as useState15
|
3974
3950
|
} from "react";
|
@@ -5430,7 +5406,7 @@ var DragDropContextClient = ({
|
|
5430
5406
|
const resolveData2 = useAppStore((s) => s.resolveData);
|
5431
5407
|
const metadata = useAppStore((s) => s.metadata);
|
5432
5408
|
const appStore = useAppStoreApi();
|
5433
|
-
const id =
|
5409
|
+
const id = useId();
|
5434
5410
|
const debouncedParamsRef = useRef4(null);
|
5435
5411
|
const tempDisableFallback = useTempDisableFallback(100);
|
5436
5412
|
const [zoneStore] = useState15(
|
@@ -5884,7 +5860,7 @@ var Drawer = ({
|
|
5884
5860
|
"Warning: The `direction` prop on Drawer is deprecated and no longer required to achieve multi-directional dragging."
|
5885
5861
|
);
|
5886
5862
|
}
|
5887
|
-
const id =
|
5863
|
+
const id = useId2();
|
5888
5864
|
const { ref } = useDroppableSafe({
|
5889
5865
|
id,
|
5890
5866
|
type: "void",
|
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, U as UserGenerics, M as Metadata } from './resolve-all-data-
|
3
|
-
export { a6 as resolveAllData } from './resolve-all-data-
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-wwgDuTnC.mjs';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.mjs';
|
4
4
|
import 'react';
|
5
5
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
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, U as UserGenerics, M as Metadata } from './resolve-all-data-
|
3
|
-
export { a6 as resolveAllData } from './resolve-all-data-
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-wwgDuTnC.js';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.js';
|
4
4
|
import 'react';
|
5
5
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck",
|
3
|
-
"version": "0.19.0-canary.
|
3
|
+
"version": "0.19.0-canary.7e231b7",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -27,8 +27,7 @@
|
|
27
27
|
"require": "./dist/rsc.js"
|
28
28
|
},
|
29
29
|
"./puck.css": "./dist/index.css",
|
30
|
-
"./dist/index.css": "./dist/index.css"
|
31
|
-
"./package.json": "./package.json"
|
30
|
+
"./dist/index.css": "./dist/index.css"
|
32
31
|
},
|
33
32
|
"typesVersions": {
|
34
33
|
"*": {
|
@@ -77,7 +76,7 @@
|
|
77
76
|
"react-hotkeys-hook": "^4.6.1",
|
78
77
|
"use-debounce": "^9.0.4",
|
79
78
|
"uuid": "^9.0.1",
|
80
|
-
"zustand": "^
|
79
|
+
"zustand": "^5.0.2"
|
81
80
|
},
|
82
81
|
"peerDependencies": {
|
83
82
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|