react-sync-board 1.4.5 → 1.4.7

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.
@@ -198,7 +198,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
198
198
  return e === "grid" ? {
199
199
  width: t,
200
200
  height: t,
201
- centers: [[t / 2, t / 2]]
201
+ centers: [[0, 0]]
202
202
  } : e === "hexH" ? {
203
203
  width: 2 * n,
204
204
  height: 3 * t,
@@ -1587,6 +1587,9 @@ var Ct = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
1587
1587
  event: e
1588
1588
  });
1589
1589
  },
1590
+ onDragStart: (e) => {
1591
+ e.preventDefault();
1592
+ },
1590
1593
  style: {
1591
1594
  touchAction: "none",
1592
1595
  ...f ? {
@@ -2615,7 +2618,7 @@ var Rn = ({ children: e }) => e, zn = {}, Bn = {
2615
2618
  let t = new ResizeObserver(e);
2616
2619
  return t.observe(s), () => t.disconnect();
2617
2620
  }, [s]), !c) return null;
2618
- let { type: u, size: d, offset: f, color: p, opacity: m } = t, { width: h, height: g, centers: _ } = ce(t), v = Math.max(360, Math.min(d * 12, 960)), y = n.x + c.width / 2 - v / 2, b = n.y + c.height / 2 - v / 2, x = [];
2621
+ let { type: u, size: d, offset: f, color: p, opacity: m } = t, { width: h, height: g, centers: _ } = ce(t), v = f.x - (u === "grid" ? d / 2 : 0), y = f.y - (u === "grid" ? d / 2 : 0), b = Math.max(360, Math.min(d * 12, 960)), x = n.x + c.width / 2 - b / 2, S = n.y + c.height / 2 - b / 2, C = [];
2619
2622
  if (u !== "grid") {
2620
2623
  let e = u === "hexH" ? Math.PI / 6 : 0;
2621
2624
  for (let t = -1; t <= 1; t++) for (let n = -1; n <= 1; n++) _.forEach(([r, i], o) => {
@@ -2623,19 +2626,19 @@ var Rn = ({ children: e }) => e, zn = {}, Bn = {
2623
2626
  let s = e + o * Math.PI / 3;
2624
2627
  return `${n * h + r + d * Math.cos(s)},${t * g + i + d * Math.sin(s)}`;
2625
2628
  }).join(" ");
2626
- x.push(/* @__PURE__ */ a("polygon", { points: s }, `${t}:${n}:${o}`));
2629
+ C.push(/* @__PURE__ */ a("polygon", { points: s }, `${t}:${n}:${o}`));
2627
2630
  });
2628
2631
  }
2629
2632
  return /* @__PURE__ */ o("svg", {
2630
2633
  "data-grid-item": n.id,
2631
2634
  "data-grid-type": u,
2632
- width: v,
2633
- height: v,
2635
+ width: b,
2636
+ height: b,
2634
2637
  style: {
2635
2638
  position: "absolute",
2636
2639
  left: 0,
2637
2640
  top: 0,
2638
- transform: `translate3d(${y}px, ${b}px, 0)`,
2641
+ transform: `translate3d(${x}px, ${S}px, 0)`,
2639
2642
  willChange: "transform",
2640
2643
  pointerEvents: "none",
2641
2644
  zIndex: n.moving ? ((n.layer ?? 0) + 4) * 10 + 101 : 90,
@@ -2647,13 +2650,13 @@ var Rn = ({ children: e }) => e, zn = {}, Bn = {
2647
2650
  patternUnits: "userSpaceOnUse",
2648
2651
  width: h,
2649
2652
  height: g,
2650
- x: f.x - y,
2651
- y: f.y - b,
2653
+ x: v - x,
2654
+ y: y - S,
2652
2655
  children: /* @__PURE__ */ a("g", {
2653
2656
  fill: "none",
2654
2657
  stroke: p,
2655
2658
  strokeWidth: "1",
2656
- children: u === "grid" ? /* @__PURE__ */ a("path", { d: `M0 ${g}V0H${h}` }) : x
2659
+ children: u === "grid" ? /* @__PURE__ */ a("path", { d: `M0 ${g}V0H${h}` }) : C
2657
2660
  })
2658
2661
  }) }), /* @__PURE__ */ a("rect", {
2659
2662
  width: "100%",