@measured/puck 0.18.1-canary.f077a37 → 0.18.1

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
@@ -93,8 +93,8 @@ npx create-puck-app my-app
93
93
 
94
94
  Available recipes include:
95
95
 
96
- - [**next**](https://github.com/measuredco/puck/tree/main/recipes/next): Next.js 13 app example, using App Router and static page generation
97
- - [**remix**](https://github.com/measuredco/puck/tree/main/recipes/remix): Remix Run v2 app example, using dynamic routes at root-level
96
+ - [**next**](https://github.com/measuredco/puck/tree/main/recipes/next): Next.js example, using App Router and static page generation
97
+ - [**remix**](https://github.com/measuredco/puck/tree/main/recipes/remix): Remix Run v2 example, using dynamic routes at root-level
98
98
 
99
99
  ## Community
100
100
 
package/dist/index.js CHANGED
@@ -3247,14 +3247,14 @@ var DraggableComponent = ({
3247
3247
  setStyle(getStyle());
3248
3248
  }, [ref.current, iframe]);
3249
3249
  (0, import_react23.useEffect)(() => {
3250
- if (ref.current) {
3250
+ if (ref.current && !userIsDragging) {
3251
3251
  const observer = new ResizeObserver(sync);
3252
3252
  observer.observe(ref.current);
3253
3253
  return () => {
3254
3254
  observer.disconnect();
3255
3255
  };
3256
3256
  }
3257
- }, [ref.current]);
3257
+ }, [ref.current, userIsDragging]);
3258
3258
  (0, import_react23.useEffect)(() => {
3259
3259
  ctx == null ? void 0 : ctx.registerPath(
3260
3260
  id,
@@ -5832,7 +5832,7 @@ var Fields = ({ wrapFields = true }) => {
5832
5832
  const newProps = __spreadProps(__spreadValues({}, currentProps), {
5833
5833
  [fieldName]: value
5834
5834
  });
5835
- if (itemSelector) {
5835
+ if (selectedItem && itemSelector) {
5836
5836
  const replaceActionData = {
5837
5837
  type: "replace",
5838
5838
  destinationIndex: itemSelector.index,
package/dist/index.mjs CHANGED
@@ -3090,14 +3090,14 @@ var DraggableComponent = ({
3090
3090
  setStyle(getStyle());
3091
3091
  }, [ref.current, iframe]);
3092
3092
  useEffect10(() => {
3093
- if (ref.current) {
3093
+ if (ref.current && !userIsDragging) {
3094
3094
  const observer = new ResizeObserver(sync);
3095
3095
  observer.observe(ref.current);
3096
3096
  return () => {
3097
3097
  observer.disconnect();
3098
3098
  };
3099
3099
  }
3100
- }, [ref.current]);
3100
+ }, [ref.current, userIsDragging]);
3101
3101
  useEffect10(() => {
3102
3102
  ctx == null ? void 0 : ctx.registerPath(
3103
3103
  id,
@@ -5690,7 +5690,7 @@ var Fields = ({ wrapFields = true }) => {
5690
5690
  const newProps = __spreadProps(__spreadValues({}, currentProps), {
5691
5691
  [fieldName]: value
5692
5692
  });
5693
- if (itemSelector) {
5693
+ if (selectedItem && itemSelector) {
5694
5694
  const replaceActionData = {
5695
5695
  type: "replace",
5696
5696
  destinationIndex: itemSelector.index,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.18.1-canary.f077a37",
3
+ "version": "0.18.1",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",
@@ -68,8 +68,8 @@
68
68
  "typescript": "^5.5.4"
69
69
  },
70
70
  "dependencies": {
71
- "@dnd-kit/helpers": "0.0.6-beta-20241204184550",
72
- "@dnd-kit/react": "0.0.6-beta-20241204184550",
71
+ "@dnd-kit/helpers": "0.0.6-beta-20250124180624",
72
+ "@dnd-kit/react": "0.0.6-beta-20250124180624",
73
73
  "deep-diff": "^1.0.2",
74
74
  "object-hash": "^3.0.0",
75
75
  "react-hotkeys-hook": "^4.6.1",