@measured/puck 0.19.0-canary.85ee736 → 0.19.0-canary.ad78e98

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.js CHANGED
@@ -2996,9 +2996,6 @@ var ArrayField = ({
2996
2996
  hasItems: Array.isArray(value) && value.length > 0,
2997
2997
  addDisabled
2998
2998
  }),
2999
- onClick: (e) => {
3000
- e.preventDefault();
3001
- },
3002
2999
  children: [
3003
3000
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName5("inner"), "data-dnd-container": true, children: localState.arrayState.items.map((item, i) => {
3004
3001
  const { _arrayId = `${id}-${i}`, _originalIndex = i } = item;
@@ -4073,10 +4070,13 @@ function AutoFieldPrivate(props) {
4073
4070
  const isFocused = useAppStore((s) => s.state.ui.field.focus === props.name);
4074
4071
  const { value, onChange } = props;
4075
4072
  const [localValue, setLocalValue] = (0, import_react24.useState)(value);
4076
- const onChangeLocal = (0, import_react24.useCallback)((val, ui) => {
4077
- setLocalValue(val);
4078
- onChange(val, ui);
4079
- }, []);
4073
+ const onChangeLocal = (0, import_react24.useCallback)(
4074
+ (val, ui) => {
4075
+ setLocalValue(val);
4076
+ onChange(val, ui);
4077
+ },
4078
+ [onChange]
4079
+ );
4080
4080
  (0, import_react24.useEffect)(() => {
4081
4081
  if (!isFocused) {
4082
4082
  setLocalValue(value);
package/dist/index.mjs CHANGED
@@ -2804,9 +2804,6 @@ var ArrayField = ({
2804
2804
  hasItems: Array.isArray(value) && value.length > 0,
2805
2805
  addDisabled
2806
2806
  }),
2807
- onClick: (e) => {
2808
- e.preventDefault();
2809
- },
2810
2807
  children: [
2811
2808
  /* @__PURE__ */ jsx7("div", { className: getClassName5("inner"), "data-dnd-container": true, children: localState.arrayState.items.map((item, i) => {
2812
2809
  const { _arrayId = `${id}-${i}`, _originalIndex = i } = item;
@@ -3887,10 +3884,13 @@ function AutoFieldPrivate(props) {
3887
3884
  const isFocused = useAppStore((s) => s.state.ui.field.focus === props.name);
3888
3885
  const { value, onChange } = props;
3889
3886
  const [localValue, setLocalValue] = useState9(value);
3890
- const onChangeLocal = useCallback4((val, ui) => {
3891
- setLocalValue(val);
3892
- onChange(val, ui);
3893
- }, []);
3887
+ const onChangeLocal = useCallback4(
3888
+ (val, ui) => {
3889
+ setLocalValue(val);
3890
+ onChange(val, ui);
3891
+ },
3892
+ [onChange]
3893
+ );
3894
3894
  useEffect11(() => {
3895
3895
  if (!isFocused) {
3896
3896
  setLocalValue(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.19.0-canary.85ee736",
3
+ "version": "0.19.0-canary.ad78e98",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",