@pie-lib/tools 3.0.2-next.20261012213240 → 3.0.2-next.20261019151920
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/_virtual/_rolldown/runtime.js +1 -1
- package/dist/node_modules/.bun/assert@2.1.0/node_modules/assert/build/assert.js +1 -1
- package/dist/node_modules/.bun/assert@2.1.0/node_modules/assert/build/internal/assert/assertion_error.js +1 -1
- package/dist/node_modules/.bun/assert@2.1.0/node_modules/assert/build/internal/errors.js +3 -4
- package/dist/node_modules/.bun/inherits@2.0.3/node_modules/inherits/inherits_browser.js +2 -2
- package/dist/node_modules/.bun/is-callable@1.2.7/node_modules/is-callable/index.js +1 -1
- package/dist/node_modules/.bun/util@0.12.5/node_modules/util/support/types.js +1 -1
- package/dist/node_modules/.bun/util@0.12.5/node_modules/util/util.js +9 -7
- package/dist/rotatable.js +7 -7
- package/dist/ruler/unit.js +11 -8
- package/dist/transform-origin.js +2 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = (t, n) => {
|
|
2
|
+
var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), n = (t, n) => {
|
|
3
3
|
let r = {};
|
|
4
4
|
for (var i in t) e(r, i, {
|
|
5
5
|
get: t[i],
|
|
@@ -162,7 +162,7 @@ var c = /* @__PURE__ */ e(((e, c) => {
|
|
|
162
162
|
var B = /*#__PURE__*/ d(function e(t, n, r) {
|
|
163
163
|
var i = this;
|
|
164
164
|
m(this, e), n.forEach(function(e) {
|
|
165
|
-
e in t && (r !== void 0 && typeof r[e] == "string" && T(t[e]) && O(t[e], r[e]) ?
|
|
165
|
+
e in t && (i[e] = r !== void 0 && typeof r[e] == "string" && T(t[e]) && O(t[e], r[e]) ? r[e] : t[e]);
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
function V(e, t, n, r, i, a) {
|
|
@@ -202,7 +202,7 @@ ${l[0]} !== ${u[0]}
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
for (var m = l[l.length - 1], h = u[u.length - 1]; m === h && (d++ < 2 ? o = `
|
|
205
|
-
${m}${o}` : r = m, l.pop(), u.pop(),
|
|
205
|
+
${m}${o}` : r = m, l.pop(), u.pop(), l.length !== 0 && u.length !== 0);) m = l[l.length - 1], h = u[u.length - 1];
|
|
206
206
|
var g = Math.max(l.length, u.length);
|
|
207
207
|
if (g === 0) {
|
|
208
208
|
var _ = c.split("\n");
|
|
@@ -106,7 +106,8 @@ var r = /* @__PURE__ */ e(((e, r) => {
|
|
|
106
106
|
return e = e.map(function(e) {
|
|
107
107
|
return String(e);
|
|
108
108
|
}), n > 2 ? `one of ${t} ${e.slice(0, n - 1).join(", ")}, or ` + e[n - 1] : n === 2 ? `one of ${t} ${e[0]} or ${e[1]}` : `of ${t} ${e[0]}`;
|
|
109
|
-
}
|
|
109
|
+
}
|
|
110
|
+
return `of ${t} ${String(e)}`;
|
|
110
111
|
}
|
|
111
112
|
function S(e, t, n) {
|
|
112
113
|
return e.substr(!n || n < 0 ? 0 : +n, t.length) === t;
|
|
@@ -143,9 +144,7 @@ var r = /* @__PURE__ */ e(((e, r) => {
|
|
|
143
144
|
case 2:
|
|
144
145
|
t += `${e[0]} and ${e[1]} arguments`;
|
|
145
146
|
break;
|
|
146
|
-
default:
|
|
147
|
-
t += e.slice(0, r - 1).join(", "), t += `, and ${e[r - 1]} arguments`;
|
|
148
|
-
break;
|
|
147
|
+
default: t += e.slice(0, r - 1).join(", "), t += `, and ${e[r - 1]} arguments`;
|
|
149
148
|
}
|
|
150
149
|
return `${t} must be specified`;
|
|
151
150
|
}, TypeError), r.exports.codes = _;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
//#region ../../../node_modules/.bun/inherits@2.0.3/node_modules/inherits/inherits_browser.js
|
|
3
3
|
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
-
typeof Object.create == "function" ?
|
|
4
|
+
t.exports = typeof Object.create == "function" ? function(e, t) {
|
|
5
5
|
e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: {
|
|
6
6
|
value: e,
|
|
7
7
|
enumerable: !1,
|
|
8
8
|
writable: !0,
|
|
9
9
|
configurable: !0
|
|
10
10
|
} });
|
|
11
|
-
} :
|
|
11
|
+
} : function(e, t) {
|
|
12
12
|
e.super_ = t;
|
|
13
13
|
var n = function() {};
|
|
14
14
|
n.prototype = t.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
@@ -126,7 +126,7 @@ var a = /* @__PURE__ */ e(((e) => {
|
|
|
126
126
|
return f(e) === "[object SharedArrayBuffer]";
|
|
127
127
|
}
|
|
128
128
|
function U(e) {
|
|
129
|
-
return V
|
|
129
|
+
return V !== void 0 && (H.working === void 0 && (H.working = H(new V())), H.working ? H(e) : e instanceof V);
|
|
130
130
|
}
|
|
131
131
|
e.isSharedArrayBuffer = U;
|
|
132
132
|
function W(e) {
|
|
@@ -49,13 +49,15 @@ var i = /* @__PURE__ */ e(((e) => {
|
|
|
49
49
|
c = c.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = RegExp("^" + c + "$", "i");
|
|
50
50
|
}
|
|
51
51
|
e.debuglog = function(t) {
|
|
52
|
-
if (t = t.toUpperCase(), !o[t])
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
if (t = t.toUpperCase(), !o[t]) {
|
|
53
|
+
if (s.test(t)) {
|
|
54
|
+
var n = process.pid;
|
|
55
|
+
o[t] = function() {
|
|
56
|
+
var r = e.format.apply(e, arguments);
|
|
57
|
+
console.error("%s %d: %s", t, n, r);
|
|
58
|
+
};
|
|
59
|
+
} else o[t] = function() {};
|
|
60
|
+
}
|
|
59
61
|
return o[t];
|
|
60
62
|
};
|
|
61
63
|
function l(t, n) {
|
package/dist/rotatable.js
CHANGED
|
@@ -191,14 +191,14 @@ var d = o("svg")({
|
|
|
191
191
|
});
|
|
192
192
|
};
|
|
193
193
|
render() {
|
|
194
|
-
let { children: e, showAnchor: t } = this.props, { rotation: n, anchor: r, origin: i, translate: a, position: o } = this.state, s = a ? `translate(${a.x}px, ${a.y}px)` : ""
|
|
194
|
+
let { children: e, showAnchor: t } = this.props, { rotation: n, anchor: r, origin: i, translate: a, position: o } = this.state, s = a ? `translate(${a.x}px, ${a.y}px)` : "", u = {
|
|
195
|
+
left: o.left,
|
|
196
|
+
top: o.top,
|
|
197
|
+
transformOrigin: i,
|
|
198
|
+
transform: `${s} rotate(${n}deg)`
|
|
199
|
+
};
|
|
195
200
|
return /* @__PURE__ */ l(p, {
|
|
196
|
-
style:
|
|
197
|
-
left: o.left,
|
|
198
|
-
top: o.top,
|
|
199
|
-
transformOrigin: i,
|
|
200
|
-
transform: `${s} rotate(${n}deg)`
|
|
201
|
-
},
|
|
201
|
+
style: u,
|
|
202
202
|
ref: (e) => this.rotatable = e,
|
|
203
203
|
onMouseDown: this.mouseDown,
|
|
204
204
|
onMouseUp: this.mouseUp,
|
package/dist/ruler/unit.js
CHANGED
|
@@ -5,12 +5,15 @@ import i from "prop-types";
|
|
|
5
5
|
import { range as a } from "@pie-element/shared-lodash";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
//#region src/ruler/unit.tsx
|
|
8
|
-
var c = r("line")(({ theme: e }) => ({ stroke: t(e) })), l = ({ x: e, height: t, bottom: n, major: r, minor: i }) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
var c = r("line")(({ theme: e }) => ({ stroke: t(e) })), l = ({ x: e, height: t, bottom: n, major: r, minor: i }) => {
|
|
9
|
+
let a = r ? n - t * 2 : i ? n - t * 1.5 : n - t;
|
|
10
|
+
return /* @__PURE__ */ o(c, {
|
|
11
|
+
y1: a,
|
|
12
|
+
y2: n,
|
|
13
|
+
x1: e,
|
|
14
|
+
x2: e
|
|
15
|
+
});
|
|
16
|
+
}, u = ({ count: e, width: t, height: r }) => /* @__PURE__ */ o(n.Fragment, { children: a(1, e).map((n) => /* @__PURE__ */ o(l, {
|
|
14
17
|
value: n,
|
|
15
18
|
x: t / e * n,
|
|
16
19
|
major: n % (e / 2) == 0,
|
|
@@ -40,9 +43,9 @@ var d = r("line")(({ theme: e }) => ({
|
|
|
40
43
|
config: i.object.isRequired
|
|
41
44
|
};
|
|
42
45
|
render() {
|
|
43
|
-
let { index: e, width: t, height: n, last: r, config: i } = this.props;
|
|
46
|
+
let { index: e, width: t, height: n, last: r, config: i } = this.props, a = { transform: `translate(${t * (e - 1)}px, 0px)` };
|
|
44
47
|
return /* @__PURE__ */ s("g", {
|
|
45
|
-
style:
|
|
48
|
+
style: a,
|
|
46
49
|
children: [
|
|
47
50
|
!r && /* @__PURE__ */ o(d, {
|
|
48
51
|
x1: t,
|
package/dist/transform-origin.js
CHANGED
|
@@ -15,7 +15,8 @@ var e = (e) => e === "left" || e === "top" ? 0 : e === "right" || e === "bottom"
|
|
|
15
15
|
x: t(r[0], e.width),
|
|
16
16
|
y: t(r[1], e.height)
|
|
17
17
|
};
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
|
+
if (i.length === 3) throw Error("transform-origin values with 3 fields not supported.");
|
|
19
20
|
};
|
|
20
21
|
//#endregion
|
|
21
22
|
export { r as parse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/tools",
|
|
3
|
-
"version": "3.0.2-next.
|
|
3
|
+
"version": "3.0.2-next.20261019151920",
|
|
4
4
|
"description": "Some interactive tools",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"@mapbox/point-geometry": "^1.1.0",
|
|
14
14
|
"@mui/icons-material": "^7.3.4",
|
|
15
15
|
"@mui/material": "^7.3.4",
|
|
16
|
-
"@pie-lib/style-utils": "3.0.2-next.
|
|
16
|
+
"@pie-lib/style-utils": "3.0.2-next.20261019151920",
|
|
17
17
|
"assert": "^2.1.0",
|
|
18
18
|
"debug": "^4.1.1",
|
|
19
19
|
"prop-types": "^15.7.2",
|
|
20
20
|
"react-portal": "^4.2.0",
|
|
21
21
|
"trigonometry-calculator": "^2.0.0",
|
|
22
|
-
"@pie-element/shared-lodash": "0.1.3-next.
|
|
22
|
+
"@pie-element/shared-lodash": "0.1.3-next.20261019151920"
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "./dist/index.js",
|