@measured/puck 0.18.0-canary.37cfc43 → 0.18.0-canary.4a04445

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -3664,7 +3664,7 @@ var getClassName17 = get_class_name_factory_default("DropZone", styles_module_de
3664
3664
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
3665
3665
  var RENDER_DEBUG = false;
3666
3666
  var DropZoneEdit = (0, import_react29.forwardRef)(
3667
- function DropZoneEdit2({
3667
+ function DropZoneEditInternal({
3668
3668
  zone,
3669
3669
  allow,
3670
3670
  disallow,
@@ -3825,7 +3825,7 @@ var DropZoneEdit = (0, import_react29.forwardRef)(
3825
3825
  var _a, _b, _c, _d, _e;
3826
3826
  const componentId = item.props.id;
3827
3827
  const puckProps = {
3828
- renderDropZone: DropZone,
3828
+ renderDropZone: (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZoneEdit, __spreadValues({}, props)),
3829
3829
  isEditing: true,
3830
3830
  dragRef: null
3831
3831
  };
@@ -3889,7 +3889,7 @@ var DropZoneEdit = (0, import_react29.forwardRef)(
3889
3889
  }
3890
3890
  );
3891
3891
  var DropZoneRender = (0, import_react29.forwardRef)(
3892
- function DropZoneRender2({ className, style, zone }, ref) {
3892
+ function DropZoneRenderInternal({ className, style, zone }, ref) {
3893
3893
  const ctx = (0, import_react29.useContext)(dropZoneContext);
3894
3894
  const { data, areaId = "root", config } = ctx || {};
3895
3895
  let zoneCompound = rootDroppableId;
@@ -3927,7 +3927,7 @@ var DropZoneRender = (0, import_react29.forwardRef)(
3927
3927
  children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3928
3928
  Component.render,
3929
3929
  __spreadProps(__spreadValues({}, item.props), {
3930
- puck: { renderDropZone: DropZoneRender2 }
3930
+ puck: { renderDropZone: DropZoneRender }
3931
3931
  })
3932
3932
  )
3933
3933
  },
@@ -5374,7 +5374,7 @@ var Drawer = ({
5374
5374
  "Warning: The `direction` prop on Drawer is deprecated and no longer required to achieve multi-directional dragging."
5375
5375
  );
5376
5376
  }
5377
- const [id] = (0, import_react32.useState)(generateId());
5377
+ const id = (0, import_react32.useId)();
5378
5378
  const { ref } = useDroppableSafe({
5379
5379
  id,
5380
5380
  type: "void",
package/dist/index.mjs CHANGED
@@ -2425,7 +2425,7 @@ init_react_import();
2425
2425
  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" };
2426
2426
 
2427
2427
  // components/Drawer/index.tsx
2428
- import { useMemo as useMemo9, useState as useState18 } from "react";
2428
+ import { useId as useId2, useMemo as useMemo9, useState as useState18 } from "react";
2429
2429
 
2430
2430
  // components/DragDropContext/index.tsx
2431
2431
  init_react_import();
@@ -3507,7 +3507,7 @@ var getClassName17 = get_class_name_factory_default("DropZone", styles_module_de
3507
3507
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
3508
3508
  var RENDER_DEBUG = false;
3509
3509
  var DropZoneEdit = forwardRef3(
3510
- function DropZoneEdit2({
3510
+ function DropZoneEditInternal({
3511
3511
  zone,
3512
3512
  allow,
3513
3513
  disallow,
@@ -3668,7 +3668,7 @@ var DropZoneEdit = forwardRef3(
3668
3668
  var _a, _b, _c, _d, _e;
3669
3669
  const componentId = item.props.id;
3670
3670
  const puckProps = {
3671
- renderDropZone: DropZone,
3671
+ renderDropZone: (props) => /* @__PURE__ */ jsx22(DropZoneEdit, __spreadValues({}, props)),
3672
3672
  isEditing: true,
3673
3673
  dragRef: null
3674
3674
  };
@@ -3732,7 +3732,7 @@ var DropZoneEdit = forwardRef3(
3732
3732
  }
3733
3733
  );
3734
3734
  var DropZoneRender = forwardRef3(
3735
- function DropZoneRender2({ className, style, zone }, ref) {
3735
+ function DropZoneRenderInternal({ className, style, zone }, ref) {
3736
3736
  const ctx = useContext6(dropZoneContext);
3737
3737
  const { data, areaId = "root", config } = ctx || {};
3738
3738
  let zoneCompound = rootDroppableId;
@@ -3770,7 +3770,7 @@ var DropZoneRender = forwardRef3(
3770
3770
  children: /* @__PURE__ */ jsx22(
3771
3771
  Component.render,
3772
3772
  __spreadProps(__spreadValues({}, item.props), {
3773
- puck: { renderDropZone: DropZoneRender2 }
3773
+ puck: { renderDropZone: DropZoneRender }
3774
3774
  })
3775
3775
  )
3776
3776
  },
@@ -5226,7 +5226,7 @@ var Drawer = ({
5226
5226
  "Warning: The `direction` prop on Drawer is deprecated and no longer required to achieve multi-directional dragging."
5227
5227
  );
5228
5228
  }
5229
- const [id] = useState18(generateId());
5229
+ const id = useId2();
5230
5230
  const { ref } = useDroppableSafe({
5231
5231
  id,
5232
5232
  type: "void",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.18.0-canary.37cfc43",
3
+ "version": "0.18.0-canary.4a04445",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",