@pygmalionjs/pygmalion 0.12.0 → 0.13.0

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.
@@ -1,13 +1,13 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
- import { j as g, R as C, aI as P, cf as R, cg as E, U as I, ch as k, a3 as m, a0 as b } from "./runtime-Bxn8116i.js";
2
+ import { j as C, R as g, aI as P, ch as R, ci as E, U as I, cj as k, a3 as m, a0 as b } from "./runtime-DkCf4iKe.js";
3
3
  import { useRef as L, useLayoutEffect as h } from "react";
4
- function f(n) {
4
+ function v(n) {
5
5
  return `translate(${n.panX}px, ${n.panY}px) scale(${n.zoom})`;
6
6
  }
7
7
  function x(n, e, i, r = !1) {
8
8
  return r || k(n, e, i) ? void 0 : "none";
9
9
  }
10
- function v(n, e) {
10
+ function f(n, e) {
11
11
  return x(
12
12
  n.editMode,
13
13
  n.tool,
@@ -77,20 +77,20 @@ function w(n) {
77
77
  )
78
78
  }));
79
79
  }
80
- let O = 0;
80
+ let j = 0;
81
81
  function D({
82
82
  children: n,
83
83
  interactionFrameId: e = null
84
84
  }) {
85
- const i = g(), r = i.store, t = L(null);
85
+ const i = C(), r = i.store, t = L(null);
86
86
  return h(() => {
87
87
  const a = t.current;
88
88
  if (!a) return;
89
- const o = new C(`CameraLayer#${++O}`, () => {
89
+ const o = new g(`CameraLayer#${++j}`, () => {
90
90
  o.isDisposed || c();
91
91
  }), c = () => {
92
92
  o.track(() => {
93
- a.style.transform = f(r), a.style.pointerEvents = v(r, e) ?? "";
93
+ a.style.transform = v(r), a.style.pointerEvents = f(r, e) ?? "";
94
94
  });
95
95
  };
96
96
  return c(), () => o.dispose();
@@ -142,11 +142,11 @@ function D({
142
142
  position: "absolute",
143
143
  left: 0,
144
144
  top: 0,
145
- transform: f(r),
145
+ transform: v(r),
146
146
  transformOrigin: "0 0",
147
147
  transition: "none",
148
148
  willChange: "transform",
149
- pointerEvents: v(r, e)
149
+ pointerEvents: f(r, e)
150
150
  },
151
151
  children: n
152
152
  }