@arach/arc-iso 0.4.5 → 0.6.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.
- package/dist/arc-iso-slim.es.js +1104 -440
- package/dist/arc-iso-slim.umd.js +7 -7
- package/dist/arc-iso.es.js +1992 -1328
- package/dist/arc-iso.umd.js +37 -37
- package/dist/index.d.ts +79 -8
- package/package.json +1 -1
package/dist/arc-iso-slim.es.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import Nt, { useId as yt, useMemo as It, useState as dt, useEffect as Ft } from "react";
|
|
2
|
+
const Ct = 30 * (Math.PI / 180), Dt = Math.cos(Ct), Bt = Math.sin(Ct);
|
|
3
|
+
function y(t, r, a = 0) {
|
|
4
4
|
return {
|
|
5
|
-
screenX: (
|
|
6
|
-
screenY: -(
|
|
5
|
+
screenX: (t - r) * Dt,
|
|
6
|
+
screenY: -(t + r) * Bt - a
|
|
7
7
|
// Negated so +X,+Y go UP on screen
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
10
|
+
function rt(t, r, a, i = 0, s = 0, f = 0) {
|
|
11
|
+
const x = {
|
|
12
12
|
// Bottom face
|
|
13
|
-
frontBottom:
|
|
14
|
-
rightBottom:
|
|
15
|
-
backBottom:
|
|
16
|
-
leftBottom:
|
|
13
|
+
frontBottom: y(t, 0, 0),
|
|
14
|
+
rightBottom: y(t, r, 0),
|
|
15
|
+
backBottom: y(0, r, 0),
|
|
16
|
+
leftBottom: y(0, 0, 0),
|
|
17
17
|
// Top face
|
|
18
|
-
frontTop:
|
|
19
|
-
rightTop:
|
|
20
|
-
backTop:
|
|
21
|
-
leftTop:
|
|
22
|
-
},
|
|
23
|
-
x:
|
|
24
|
-
y:
|
|
18
|
+
frontTop: y(t, 0, a),
|
|
19
|
+
rightTop: y(t, r, a),
|
|
20
|
+
backTop: y(0, r, a),
|
|
21
|
+
leftTop: y(0, 0, a)
|
|
22
|
+
}, b = ($) => ({
|
|
23
|
+
x: $.screenX + i,
|
|
24
|
+
y: $.screenY + s
|
|
25
25
|
}), k = Object.fromEntries(
|
|
26
|
-
Object.entries(
|
|
27
|
-
),
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
return `M ${
|
|
26
|
+
Object.entries(x).map(([$, w]) => [$, b(w)])
|
|
27
|
+
), u = ($, w, A, E) => {
|
|
28
|
+
if (E <= 0) {
|
|
29
|
+
const H = y(0, 0, A), z = y($, 0, A), v = y($, w, A), D = y(0, w, A);
|
|
30
|
+
return `M ${H.screenX + i},${H.screenY + s} L ${z.screenX + i},${z.screenY + s} L ${v.screenX + i},${v.screenY + s} L ${D.screenX + i},${D.screenY + s} Z`;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
for (let
|
|
34
|
-
const
|
|
35
|
-
|
|
32
|
+
const F = Math.min($, w) / 2, Y = Math.min(E, F), P = 8, L = [], J = (H, z, v, D) => {
|
|
33
|
+
for (let G = 0; G <= P; G++) {
|
|
34
|
+
const T = v + (D - v) * (G / P), p = H + Y * Math.cos(T), n = z + Y * Math.sin(T), h = y(p, n, A);
|
|
35
|
+
L.push(`${h.screenX + i},${h.screenY + s}`);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
return
|
|
39
|
-
},
|
|
40
|
-
const
|
|
41
|
-
for (let
|
|
42
|
-
const
|
|
43
|
-
|
|
38
|
+
return J(Y, Y, Math.PI, Math.PI * 1.5), J($ - Y, Y, Math.PI * 1.5, Math.PI * 2), J($ - Y, w - Y, 0, Math.PI * 0.5), J(Y, w - Y, Math.PI * 0.5, Math.PI), `M ${L[0]} L ${L.slice(1).join(" L ")} Z`;
|
|
39
|
+
}, l = ($) => `M ${$.map((w) => `${w.x},${w.y}`).join(" L ")} Z`, O = ($, w, A, E, F, Y) => {
|
|
40
|
+
const L = [];
|
|
41
|
+
for (let v = 0; v < 6; v++) {
|
|
42
|
+
const D = F + (Y - F) * (v / 6), G = F + (Y - F) * ((v + 1) / 6), T = (D + G) / 2, p = Math.cos(T), n = Math.sin(T), _ = p * -0.577 + n * -0.577 + 0 * 0.577, Q = 0.3 + Math.max(0, _ + 0.4) * 0.5, tt = y($ + A * Math.cos(D), w + A * Math.sin(D), 0), W = y($ + A * Math.cos(G), w + A * Math.sin(G), 0), q = y($ + A * Math.cos(D), w + A * Math.sin(D), E), K = y($ + A * Math.cos(G), w + A * Math.sin(G), E), st = `M ${tt.screenX + i},${tt.screenY + s} L ${W.screenX + i},${W.screenY + s} L ${K.screenX + i},${K.screenY + s} L ${q.screenX + i},${q.screenY + s} Z`;
|
|
43
|
+
L.push({ path: st, intensity: Q });
|
|
44
44
|
}
|
|
45
|
-
return
|
|
46
|
-
}, d = Math.min(
|
|
47
|
-
let
|
|
45
|
+
return L;
|
|
46
|
+
}, d = Math.min(f, Math.min(t, r) / 2), c = u(t, r, a, d);
|
|
47
|
+
let S, m, M, g, C, N;
|
|
48
48
|
if (d > 0) {
|
|
49
|
-
const
|
|
50
|
-
{ x:
|
|
51
|
-
{ x:
|
|
52
|
-
{ x:
|
|
53
|
-
{ x:
|
|
49
|
+
const $ = [
|
|
50
|
+
{ x: y(0, d, 0).screenX + i, y: y(0, d, 0).screenY + s },
|
|
51
|
+
{ x: y(0, r - d, 0).screenX + i, y: y(0, r - d, 0).screenY + s },
|
|
52
|
+
{ x: y(0, r - d, a).screenX + i, y: y(0, r - d, a).screenY + s },
|
|
53
|
+
{ x: y(0, d, a).screenX + i, y: y(0, d, a).screenY + s }
|
|
54
54
|
];
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
{ x:
|
|
58
|
-
{ x:
|
|
59
|
-
{ x:
|
|
60
|
-
{ x:
|
|
55
|
+
S = l($);
|
|
56
|
+
const w = [
|
|
57
|
+
{ x: y(d, 0, 0).screenX + i, y: y(d, 0, 0).screenY + s },
|
|
58
|
+
{ x: y(t - d, 0, 0).screenX + i, y: y(t - d, 0, 0).screenY + s },
|
|
59
|
+
{ x: y(t - d, 0, a).screenX + i, y: y(t - d, 0, a).screenY + s },
|
|
60
|
+
{ x: y(d, 0, a).screenX + i, y: y(d, 0, a).screenY + s }
|
|
61
61
|
];
|
|
62
|
-
|
|
62
|
+
m = l(w), M = O(d, d, d, a, Math.PI, Math.PI * 1.5), g = O(t - d, d, d, a, Math.PI * 1.5, Math.PI * 2), C = O(d, r - d, d, a, Math.PI * 0.5, Math.PI), N = O(t - d, r - d, d, a, 0, Math.PI * 0.5);
|
|
63
63
|
} else {
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const $ = [k.leftBottom, k.backBottom, k.backTop, k.leftTop], w = [k.leftBottom, k.frontBottom, k.frontTop, k.leftTop];
|
|
65
|
+
S = l($), m = l(w), M = [], g = [], C = [], N = [];
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const R = `M ${k.leftBottom.x},${k.leftBottom.y} L ${k.frontBottom.x},${k.frontBottom.y} L ${k.rightBottom.x},${k.rightBottom.y} L ${k.backBottom.x},${k.backBottom.y} Z`;
|
|
68
68
|
return {
|
|
69
|
-
top:
|
|
70
|
-
left:
|
|
71
|
-
right:
|
|
72
|
-
cornerFrontLeft:
|
|
73
|
-
cornerFrontRight:
|
|
74
|
-
cornerBackLeft:
|
|
75
|
-
cornerBackRight:
|
|
76
|
-
outline:
|
|
69
|
+
top: c,
|
|
70
|
+
left: S,
|
|
71
|
+
right: m,
|
|
72
|
+
cornerFrontLeft: M,
|
|
73
|
+
cornerFrontRight: g,
|
|
74
|
+
cornerBackLeft: C,
|
|
75
|
+
cornerBackRight: N,
|
|
76
|
+
outline: R
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Xt(t, r = 60, a = 50) {
|
|
80
80
|
return {
|
|
81
|
-
top: `hsl(${
|
|
82
|
-
right: `hsl(${
|
|
83
|
-
left: `hsl(${
|
|
81
|
+
top: `hsl(${t}, ${r}%, ${Math.min(a + 15, 95)}%)`,
|
|
82
|
+
right: `hsl(${t}, ${r}%, ${a}%)`,
|
|
83
|
+
left: `hsl(${t}, ${r}%, ${Math.max(a - 15, 15)}%)`
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
const
|
|
86
|
+
const jt = {
|
|
87
87
|
violet: { hue: 270, saturation: 60, lightness: 55 },
|
|
88
88
|
blue: { hue: 220, saturation: 70, lightness: 50 },
|
|
89
89
|
cyan: { hue: 190, saturation: 80, lightness: 45 },
|
|
@@ -93,271 +93,844 @@ const it = {
|
|
|
93
93
|
slate: { hue: 220, saturation: 15, lightness: 50 },
|
|
94
94
|
zinc: { hue: 240, saturation: 5, lightness: 50 }
|
|
95
95
|
};
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
return
|
|
96
|
+
function ge(t) {
|
|
97
|
+
const r = jt[t] || jt.slate;
|
|
98
|
+
return Xt(r.hue, r.saturation, r.lightness);
|
|
99
99
|
}
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
function
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
function a(
|
|
107
|
-
var
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
for (var
|
|
111
|
-
|
|
112
|
-
} else
|
|
113
|
-
return
|
|
114
|
-
$$typeof:
|
|
115
|
-
type:
|
|
116
|
-
key:
|
|
117
|
-
ref:
|
|
118
|
-
props:
|
|
100
|
+
var ht = { exports: {} }, it = {};
|
|
101
|
+
var St;
|
|
102
|
+
function zt() {
|
|
103
|
+
if (St) return it;
|
|
104
|
+
St = 1;
|
|
105
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
106
|
+
function a(i, s, f) {
|
|
107
|
+
var x = null;
|
|
108
|
+
if (f !== void 0 && (x = "" + f), s.key !== void 0 && (x = "" + s.key), "key" in s) {
|
|
109
|
+
f = {};
|
|
110
|
+
for (var b in s)
|
|
111
|
+
b !== "key" && (f[b] = s[b]);
|
|
112
|
+
} else f = s;
|
|
113
|
+
return s = f.ref, {
|
|
114
|
+
$$typeof: t,
|
|
115
|
+
type: i,
|
|
116
|
+
key: x,
|
|
117
|
+
ref: s !== void 0 ? s : null,
|
|
118
|
+
props: f
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
return
|
|
121
|
+
return it.Fragment = r, it.jsx = a, it.jsxs = a, it;
|
|
122
122
|
}
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
return
|
|
127
|
-
function
|
|
128
|
-
if (
|
|
129
|
-
if (typeof
|
|
130
|
-
return
|
|
131
|
-
if (typeof
|
|
132
|
-
switch (
|
|
133
|
-
case
|
|
123
|
+
var ct = {};
|
|
124
|
+
var vt;
|
|
125
|
+
function Ut() {
|
|
126
|
+
return vt || (vt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
127
|
+
function t(n) {
|
|
128
|
+
if (n == null) return null;
|
|
129
|
+
if (typeof n == "function")
|
|
130
|
+
return n.$$typeof === P ? null : n.displayName || n.name || null;
|
|
131
|
+
if (typeof n == "string") return n;
|
|
132
|
+
switch (n) {
|
|
133
|
+
case M:
|
|
134
134
|
return "Fragment";
|
|
135
|
-
case
|
|
135
|
+
case C:
|
|
136
136
|
return "Profiler";
|
|
137
|
-
case
|
|
137
|
+
case g:
|
|
138
138
|
return "StrictMode";
|
|
139
|
-
case
|
|
139
|
+
case w:
|
|
140
140
|
return "Suspense";
|
|
141
|
-
case
|
|
141
|
+
case A:
|
|
142
142
|
return "SuspenseList";
|
|
143
|
-
case
|
|
143
|
+
case Y:
|
|
144
144
|
return "Activity";
|
|
145
145
|
}
|
|
146
|
-
if (typeof
|
|
147
|
-
switch (typeof
|
|
146
|
+
if (typeof n == "object")
|
|
147
|
+
switch (typeof n.tag == "number" && console.error(
|
|
148
148
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
149
|
-
),
|
|
150
|
-
case
|
|
149
|
+
), n.$$typeof) {
|
|
150
|
+
case m:
|
|
151
151
|
return "Portal";
|
|
152
|
-
case
|
|
153
|
-
return
|
|
154
|
-
case
|
|
155
|
-
return (
|
|
156
|
-
case
|
|
157
|
-
var
|
|
158
|
-
return
|
|
159
|
-
case
|
|
160
|
-
return
|
|
161
|
-
case
|
|
162
|
-
|
|
152
|
+
case R:
|
|
153
|
+
return n.displayName || "Context";
|
|
154
|
+
case N:
|
|
155
|
+
return (n._context.displayName || "Context") + ".Consumer";
|
|
156
|
+
case $:
|
|
157
|
+
var h = n.render;
|
|
158
|
+
return n = n.displayName, n || (n = h.displayName || h.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
159
|
+
case E:
|
|
160
|
+
return h = n.displayName || null, h !== null ? h : t(n.type) || "Memo";
|
|
161
|
+
case F:
|
|
162
|
+
h = n._payload, n = n._init;
|
|
163
163
|
try {
|
|
164
|
-
return
|
|
164
|
+
return t(n(h));
|
|
165
165
|
} catch {
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
return "" +
|
|
170
|
+
function r(n) {
|
|
171
|
+
return "" + n;
|
|
172
172
|
}
|
|
173
|
-
function a(
|
|
173
|
+
function a(n) {
|
|
174
174
|
try {
|
|
175
|
-
|
|
176
|
-
var
|
|
175
|
+
r(n);
|
|
176
|
+
var h = !1;
|
|
177
177
|
} catch {
|
|
178
|
-
|
|
178
|
+
h = !0;
|
|
179
179
|
}
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
var
|
|
183
|
-
return
|
|
184
|
-
|
|
180
|
+
if (h) {
|
|
181
|
+
h = console;
|
|
182
|
+
var _ = h.error, I = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
183
|
+
return _.call(
|
|
184
|
+
h,
|
|
185
185
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
186
|
-
|
|
187
|
-
),
|
|
186
|
+
I
|
|
187
|
+
), r(n);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
if (
|
|
192
|
-
if (typeof
|
|
190
|
+
function i(n) {
|
|
191
|
+
if (n === M) return "<>";
|
|
192
|
+
if (typeof n == "object" && n !== null && n.$$typeof === F)
|
|
193
193
|
return "<...>";
|
|
194
194
|
try {
|
|
195
|
-
var
|
|
196
|
-
return
|
|
195
|
+
var h = t(n);
|
|
196
|
+
return h ? "<" + h + ">" : "<...>";
|
|
197
197
|
} catch {
|
|
198
198
|
return "<...>";
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
var
|
|
203
|
-
return
|
|
201
|
+
function s() {
|
|
202
|
+
var n = L.A;
|
|
203
|
+
return n === null ? null : n.getOwner();
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function f() {
|
|
206
206
|
return Error("react-stack-top-frame");
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
if (
|
|
210
|
-
var
|
|
211
|
-
if (
|
|
208
|
+
function x(n) {
|
|
209
|
+
if (J.call(n, "key")) {
|
|
210
|
+
var h = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
211
|
+
if (h && h.isReactWarning) return !1;
|
|
212
212
|
}
|
|
213
|
-
return
|
|
213
|
+
return n.key !== void 0;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
function
|
|
217
|
-
|
|
215
|
+
function b(n, h) {
|
|
216
|
+
function _() {
|
|
217
|
+
v || (v = !0, console.error(
|
|
218
218
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
219
|
-
|
|
219
|
+
h
|
|
220
220
|
));
|
|
221
221
|
}
|
|
222
|
-
|
|
223
|
-
get:
|
|
222
|
+
_.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
223
|
+
get: _,
|
|
224
224
|
configurable: !0
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
function k() {
|
|
228
|
-
var
|
|
229
|
-
return
|
|
228
|
+
var n = t(this.type);
|
|
229
|
+
return D[n] || (D[n] = !0, console.error(
|
|
230
230
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
231
|
-
)),
|
|
231
|
+
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
var
|
|
235
|
-
return
|
|
236
|
-
$$typeof:
|
|
237
|
-
type:
|
|
238
|
-
key:
|
|
239
|
-
props:
|
|
240
|
-
_owner:
|
|
241
|
-
}, (
|
|
233
|
+
function u(n, h, _, I, Q, tt) {
|
|
234
|
+
var W = _.ref;
|
|
235
|
+
return n = {
|
|
236
|
+
$$typeof: S,
|
|
237
|
+
type: n,
|
|
238
|
+
key: h,
|
|
239
|
+
props: _,
|
|
240
|
+
_owner: I
|
|
241
|
+
}, (W !== void 0 ? W : null) !== null ? Object.defineProperty(n, "ref", {
|
|
242
242
|
enumerable: !1,
|
|
243
243
|
get: k
|
|
244
|
-
}) : Object.defineProperty(
|
|
244
|
+
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
245
245
|
configurable: !1,
|
|
246
246
|
enumerable: !1,
|
|
247
247
|
writable: !0,
|
|
248
248
|
value: 0
|
|
249
|
-
}), Object.defineProperty(
|
|
249
|
+
}), Object.defineProperty(n, "_debugInfo", {
|
|
250
250
|
configurable: !1,
|
|
251
251
|
enumerable: !1,
|
|
252
252
|
writable: !0,
|
|
253
253
|
value: null
|
|
254
|
-
}), Object.defineProperty(
|
|
254
|
+
}), Object.defineProperty(n, "_debugStack", {
|
|
255
255
|
configurable: !1,
|
|
256
256
|
enumerable: !1,
|
|
257
257
|
writable: !0,
|
|
258
|
-
value:
|
|
259
|
-
}), Object.defineProperty(
|
|
258
|
+
value: Q
|
|
259
|
+
}), Object.defineProperty(n, "_debugTask", {
|
|
260
260
|
configurable: !1,
|
|
261
261
|
enumerable: !1,
|
|
262
262
|
writable: !0,
|
|
263
|
-
value:
|
|
264
|
-
}), Object.freeze && (Object.freeze(
|
|
263
|
+
value: tt
|
|
264
|
+
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
var
|
|
268
|
-
if (
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
271
|
-
for (
|
|
272
|
-
|
|
273
|
-
Object.freeze && Object.freeze(
|
|
266
|
+
function l(n, h, _, I, Q, tt) {
|
|
267
|
+
var W = h.children;
|
|
268
|
+
if (W !== void 0)
|
|
269
|
+
if (I)
|
|
270
|
+
if (H(W)) {
|
|
271
|
+
for (I = 0; I < W.length; I++)
|
|
272
|
+
O(W[I]);
|
|
273
|
+
Object.freeze && Object.freeze(W);
|
|
274
274
|
} else
|
|
275
275
|
console.error(
|
|
276
276
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
277
277
|
);
|
|
278
|
-
else
|
|
279
|
-
if (
|
|
280
|
-
|
|
281
|
-
var
|
|
282
|
-
return
|
|
278
|
+
else O(W);
|
|
279
|
+
if (J.call(h, "key")) {
|
|
280
|
+
W = t(n);
|
|
281
|
+
var q = Object.keys(h).filter(function(st) {
|
|
282
|
+
return st !== "key";
|
|
283
283
|
});
|
|
284
|
-
|
|
284
|
+
I = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", p[W + I] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
285
285
|
`A props object containing a "key" prop is being spread into JSX:
|
|
286
286
|
let props = %s;
|
|
287
287
|
<%s {...props} />
|
|
288
288
|
React keys must be passed directly to JSX without using spread:
|
|
289
289
|
let props = %s;
|
|
290
290
|
<%s key={someKey} {...props} />`,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
),
|
|
291
|
+
I,
|
|
292
|
+
W,
|
|
293
|
+
q,
|
|
294
|
+
W
|
|
295
|
+
), p[W + I] = !0);
|
|
296
296
|
}
|
|
297
|
-
if (
|
|
298
|
-
|
|
299
|
-
for (var
|
|
300
|
-
|
|
301
|
-
} else
|
|
302
|
-
return
|
|
303
|
-
|
|
304
|
-
typeof
|
|
305
|
-
),
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
297
|
+
if (W = null, _ !== void 0 && (a(_), W = "" + _), x(h) && (a(h.key), W = "" + h.key), "key" in h) {
|
|
298
|
+
_ = {};
|
|
299
|
+
for (var K in h)
|
|
300
|
+
K !== "key" && (_[K] = h[K]);
|
|
301
|
+
} else _ = h;
|
|
302
|
+
return W && b(
|
|
303
|
+
_,
|
|
304
|
+
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
|
|
305
|
+
), u(
|
|
306
|
+
n,
|
|
307
|
+
W,
|
|
308
|
+
_,
|
|
309
|
+
s(),
|
|
310
|
+
Q,
|
|
311
|
+
tt
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
d(
|
|
314
|
+
function O(n) {
|
|
315
|
+
d(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === F && (n._payload.status === "fulfilled" ? d(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
|
|
316
316
|
}
|
|
317
|
-
function d(
|
|
318
|
-
return typeof
|
|
317
|
+
function d(n) {
|
|
318
|
+
return typeof n == "object" && n !== null && n.$$typeof === S;
|
|
319
319
|
}
|
|
320
|
-
var
|
|
320
|
+
var c = Nt, S = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), M = /* @__PURE__ */ Symbol.for("react.fragment"), g = /* @__PURE__ */ Symbol.for("react.strict_mode"), C = /* @__PURE__ */ Symbol.for("react.profiler"), N = /* @__PURE__ */ Symbol.for("react.consumer"), R = /* @__PURE__ */ Symbol.for("react.context"), $ = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), A = /* @__PURE__ */ Symbol.for("react.suspense_list"), E = /* @__PURE__ */ Symbol.for("react.memo"), F = /* @__PURE__ */ Symbol.for("react.lazy"), Y = /* @__PURE__ */ Symbol.for("react.activity"), P = /* @__PURE__ */ Symbol.for("react.client.reference"), L = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, J = Object.prototype.hasOwnProperty, H = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
321
321
|
return null;
|
|
322
322
|
};
|
|
323
|
-
|
|
324
|
-
react_stack_bottom_frame: function(
|
|
325
|
-
return
|
|
323
|
+
c = {
|
|
324
|
+
react_stack_bottom_frame: function(n) {
|
|
325
|
+
return n();
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
)(),
|
|
332
|
-
|
|
333
|
-
var
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
328
|
+
var v, D = {}, G = c.react_stack_bottom_frame.bind(
|
|
329
|
+
c,
|
|
330
|
+
f
|
|
331
|
+
)(), T = z(i(f)), p = {};
|
|
332
|
+
ct.Fragment = M, ct.jsx = function(n, h, _) {
|
|
333
|
+
var I = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
334
|
+
return l(
|
|
335
|
+
n,
|
|
336
|
+
h,
|
|
337
|
+
_,
|
|
338
338
|
!1,
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
I ? Error("react-stack-top-frame") : G,
|
|
340
|
+
I ? z(i(n)) : T
|
|
341
341
|
);
|
|
342
|
-
},
|
|
343
|
-
var
|
|
344
|
-
return
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
342
|
+
}, ct.jsxs = function(n, h, _) {
|
|
343
|
+
var I = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
344
|
+
return l(
|
|
345
|
+
n,
|
|
346
|
+
h,
|
|
347
|
+
_,
|
|
348
348
|
!0,
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
I ? Error("react-stack-top-frame") : G,
|
|
350
|
+
I ? z(i(n)) : T
|
|
351
351
|
);
|
|
352
352
|
};
|
|
353
|
-
})()),
|
|
353
|
+
})()), ct;
|
|
354
|
+
}
|
|
355
|
+
var Et;
|
|
356
|
+
function Ht() {
|
|
357
|
+
return Et || (Et = 1, process.env.NODE_ENV === "production" ? ht.exports = zt() : ht.exports = Ut()), ht.exports;
|
|
358
|
+
}
|
|
359
|
+
var e = Ht();
|
|
360
|
+
const Gt = ["solid", "blueprint", "cyanotype"], kt = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace', Jt = 0.78, o = (t) => Math.round(t * Jt * 10) / 10, _t = {
|
|
361
|
+
id: "solid",
|
|
362
|
+
name: "Solid",
|
|
363
|
+
description: "Shaded isometric boxes",
|
|
364
|
+
technical: !1,
|
|
365
|
+
paper: { from: "transparent", to: "transparent", edge: "transparent", grid: "transparent", grain: 0 },
|
|
366
|
+
ink: {
|
|
367
|
+
line: "rgba(0,0,0,0.3)",
|
|
368
|
+
hidden: "rgba(0,0,0,0.2)",
|
|
369
|
+
hatch: "transparent",
|
|
370
|
+
text: "#ffffff",
|
|
371
|
+
muted: "rgba(255,255,255,0.6)",
|
|
372
|
+
accent: "#3b82f6"
|
|
373
|
+
},
|
|
374
|
+
face: { top: "transparent", right: "transparent", left: "transparent" },
|
|
375
|
+
hatchOpacity: { top: 0, right: 0, left: 0 },
|
|
376
|
+
font: kt,
|
|
377
|
+
strokeWidth: 0.5
|
|
378
|
+
}, Zt = {
|
|
379
|
+
id: "blueprint",
|
|
380
|
+
name: "Blueprint",
|
|
381
|
+
description: "Sepia engineering plate on parchment",
|
|
382
|
+
technical: !0,
|
|
383
|
+
paper: { from: "#f0e6d0", to: "#ddceac", edge: "#b09a74", grid: "#c6b48f", grain: 0.055 },
|
|
384
|
+
ink: {
|
|
385
|
+
line: "#4a3826",
|
|
386
|
+
hidden: "#96805f",
|
|
387
|
+
hatch: "#6d563c",
|
|
388
|
+
text: "#3b2c1d",
|
|
389
|
+
muted: "#8a7455",
|
|
390
|
+
accent: "#a8412a"
|
|
391
|
+
},
|
|
392
|
+
face: { top: "#f4ebd7", right: "#e6dabb", left: "#d6c6a2" },
|
|
393
|
+
hatchOpacity: { top: 0.3, right: 0.55, left: 0.85 },
|
|
394
|
+
font: kt,
|
|
395
|
+
strokeWidth: 1
|
|
396
|
+
}, qt = {
|
|
397
|
+
id: "cyanotype",
|
|
398
|
+
name: "Cyanotype",
|
|
399
|
+
description: "White linework on classic blueprint blue",
|
|
400
|
+
technical: !0,
|
|
401
|
+
paper: { from: "#123256", to: "#0b1f3a", edge: "#3f6d9f", grid: "#27507f", grain: 0.07 },
|
|
402
|
+
ink: {
|
|
403
|
+
line: "#e6f0fb",
|
|
404
|
+
hidden: "#78a2cc",
|
|
405
|
+
hatch: "#a6c6e5",
|
|
406
|
+
text: "#f2f8ff",
|
|
407
|
+
muted: "#8fb2d6",
|
|
408
|
+
accent: "#ffc857"
|
|
409
|
+
},
|
|
410
|
+
face: { top: "#1b4675", right: "#153a61", left: "#0f2b49" },
|
|
411
|
+
hatchOpacity: { top: 0.28, right: 0.5, left: 0.78 },
|
|
412
|
+
font: kt,
|
|
413
|
+
strokeWidth: 1
|
|
414
|
+
}, Rt = { solid: _t, blueprint: Zt, cyanotype: qt };
|
|
415
|
+
function Vt(t) {
|
|
416
|
+
return Rt[t] || _t;
|
|
417
|
+
}
|
|
418
|
+
const Kt = Gt.filter((t) => Rt[t].technical);
|
|
419
|
+
Kt[0];
|
|
420
|
+
const Qt = {
|
|
421
|
+
violet: "cross",
|
|
422
|
+
blue: "lines",
|
|
423
|
+
sky: "lines",
|
|
424
|
+
cyan: "dashes",
|
|
425
|
+
emerald: "dots",
|
|
426
|
+
amber: "dense",
|
|
427
|
+
orange: "dense",
|
|
428
|
+
rose: "cross",
|
|
429
|
+
zinc: "plain",
|
|
430
|
+
slate: "plain"
|
|
431
|
+
};
|
|
432
|
+
function Mt(t) {
|
|
433
|
+
return Qt[t || "zinc"] || "lines";
|
|
434
|
+
}
|
|
435
|
+
const te = {
|
|
436
|
+
plain: "PLAIN",
|
|
437
|
+
lines: "HATCH-A",
|
|
438
|
+
cross: "HATCH-X",
|
|
439
|
+
dense: "HATCH-D",
|
|
440
|
+
dots: "STIPPLE",
|
|
441
|
+
dashes: "BROKEN"
|
|
442
|
+
};
|
|
443
|
+
function Tt(t, r, a, i = 0, s = 0) {
|
|
444
|
+
const f = (g, C, N) => {
|
|
445
|
+
const R = y(g, C, N);
|
|
446
|
+
return { x: R.screenX + i, y: R.screenY + s };
|
|
447
|
+
}, x = f(0, 0, 0), b = f(t, 0, 0), k = f(t, r, 0), u = f(0, r, 0), l = f(0, 0, a), O = f(t, 0, a), d = f(t, r, a), c = f(0, r, a), S = (g) => `M ${g.map((C) => `${C.x},${C.y}`).join(" L ")} Z`, m = (g, C) => `M ${g.x},${g.y} L ${C.x},${C.y}`, M = [x, b, k, u, l, O, d, c];
|
|
448
|
+
return {
|
|
449
|
+
top: S([l, O, d, c]),
|
|
450
|
+
right: S([x, b, O, l]),
|
|
451
|
+
left: S([x, u, c, l]),
|
|
452
|
+
visible: [
|
|
453
|
+
// silhouette
|
|
454
|
+
S([x, b, O, d, c, u]),
|
|
455
|
+
// interior creases radiating from the near top corner
|
|
456
|
+
m(l, O),
|
|
457
|
+
m(l, c),
|
|
458
|
+
m(l, x)
|
|
459
|
+
].join(" "),
|
|
460
|
+
hidden: [m(k, b), m(k, u), m(k, d)].join(" "),
|
|
461
|
+
topCenter: { x: (l.x + d.x) / 2, y: (l.y + d.y) / 2 },
|
|
462
|
+
topApex: { x: d.x, y: d.y },
|
|
463
|
+
minX: Math.min(...M.map((g) => g.x)),
|
|
464
|
+
minY: Math.min(...M.map((g) => g.y)),
|
|
465
|
+
maxX: Math.max(...M.map((g) => g.x)),
|
|
466
|
+
maxY: Math.max(...M.map((g) => g.y))
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
function mt(t) {
|
|
470
|
+
return String(t).padStart(2, "0");
|
|
471
|
+
}
|
|
472
|
+
const ee = {
|
|
473
|
+
top: ["n30", "p30"],
|
|
474
|
+
right: ["n30", "v"],
|
|
475
|
+
left: ["p30", "v"]
|
|
476
|
+
}, ne = { n30: -30, p30: 30, v: 90 }, re = [
|
|
477
|
+
{ key: "line", spacing: 6.2, strokeWidth: 0.55 },
|
|
478
|
+
{ key: "dense", spacing: 3.1, strokeWidth: 0.45 },
|
|
479
|
+
{ key: "dash", spacing: 6.2, strokeWidth: 0.55, dash: "2.6 2.6" }
|
|
480
|
+
], lt = 22;
|
|
481
|
+
function Pt(t, r, a) {
|
|
482
|
+
const [i, s] = ee[a];
|
|
483
|
+
switch (r) {
|
|
484
|
+
case "plain":
|
|
485
|
+
return [];
|
|
486
|
+
case "lines":
|
|
487
|
+
return [`${t}-line-${i}`];
|
|
488
|
+
case "cross":
|
|
489
|
+
return [`${t}-line-${i}`, `${t}-line-${s}`];
|
|
490
|
+
case "dense":
|
|
491
|
+
return [`${t}-dense-${i}`];
|
|
492
|
+
case "dashes":
|
|
493
|
+
return [`${t}-dash-${i}`];
|
|
494
|
+
case "dots":
|
|
495
|
+
return [`${t}-dot`];
|
|
496
|
+
default:
|
|
497
|
+
return [`${t}-line-${i}`];
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
const At = (t) => `${t}-paper`, Lt = (t) => `${t}-grain`, oe = (t, r = "line") => `${t}-arrow-${r}`, se = (t) => [`${t}-grid-n30`, `${t}-grid-p30`];
|
|
501
|
+
function bt({
|
|
502
|
+
uid: t,
|
|
503
|
+
style: r,
|
|
504
|
+
/** Extra transform applied to the graph-paper grid, so it can be pinned to
|
|
505
|
+
* panned/zoomed content while the paper itself fills the viewport. */
|
|
506
|
+
gridTransform: a = ""
|
|
507
|
+
}) {
|
|
508
|
+
return /* @__PURE__ */ e.jsxs("defs", { children: [
|
|
509
|
+
re.flatMap(
|
|
510
|
+
(i) => Object.entries(ne).map(([s, f]) => /* @__PURE__ */ e.jsx(
|
|
511
|
+
"pattern",
|
|
512
|
+
{
|
|
513
|
+
id: `${t}-${i.key}-${s}`,
|
|
514
|
+
width: i.spacing,
|
|
515
|
+
height: i.spacing,
|
|
516
|
+
patternUnits: "userSpaceOnUse",
|
|
517
|
+
patternTransform: `rotate(${f})`,
|
|
518
|
+
children: /* @__PURE__ */ e.jsx(
|
|
519
|
+
"line",
|
|
520
|
+
{
|
|
521
|
+
x1: -1,
|
|
522
|
+
y1: i.spacing / 2,
|
|
523
|
+
x2: i.spacing + 1,
|
|
524
|
+
y2: i.spacing / 2,
|
|
525
|
+
stroke: r.ink.hatch,
|
|
526
|
+
strokeWidth: i.strokeWidth,
|
|
527
|
+
strokeDasharray: i.dash
|
|
528
|
+
}
|
|
529
|
+
)
|
|
530
|
+
},
|
|
531
|
+
`${i.key}-${s}`
|
|
532
|
+
))
|
|
533
|
+
),
|
|
534
|
+
/* @__PURE__ */ e.jsx("pattern", { id: `${t}-dot`, width: 4.5, height: 4.5, patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ e.jsx("circle", { cx: 2.25, cy: 2.25, r: 0.55, fill: r.ink.hatch }) }),
|
|
535
|
+
[
|
|
536
|
+
{ id: `${t}-grid-n30`, angle: -30 },
|
|
537
|
+
{ id: `${t}-grid-p30`, angle: 30 }
|
|
538
|
+
].map(({ id: i, angle: s }) => /* @__PURE__ */ e.jsx(
|
|
539
|
+
"pattern",
|
|
540
|
+
{
|
|
541
|
+
id: i,
|
|
542
|
+
width: lt,
|
|
543
|
+
height: lt,
|
|
544
|
+
patternUnits: "userSpaceOnUse",
|
|
545
|
+
patternTransform: `${a} rotate(${s})`.trim(),
|
|
546
|
+
children: /* @__PURE__ */ e.jsx(
|
|
547
|
+
"line",
|
|
548
|
+
{
|
|
549
|
+
x1: -1,
|
|
550
|
+
y1: lt / 2,
|
|
551
|
+
x2: lt + 1,
|
|
552
|
+
y2: lt / 2,
|
|
553
|
+
stroke: r.paper.grid,
|
|
554
|
+
strokeWidth: 0.5
|
|
555
|
+
}
|
|
556
|
+
)
|
|
557
|
+
},
|
|
558
|
+
i
|
|
559
|
+
)),
|
|
560
|
+
/* @__PURE__ */ e.jsxs("linearGradient", { id: At(t), x1: "0", y1: "0", x2: "0.35", y2: "1", children: [
|
|
561
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: r.paper.from }),
|
|
562
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: r.paper.to })
|
|
563
|
+
] }),
|
|
564
|
+
/* @__PURE__ */ e.jsxs("filter", { id: Lt(t), x: "0%", y: "0%", width: "100%", height: "100%", children: [
|
|
565
|
+
/* @__PURE__ */ e.jsx("feTurbulence", { type: "fractalNoise", baseFrequency: "0.85", numOctaves: 3, stitchTiles: "stitch" }),
|
|
566
|
+
/* @__PURE__ */ e.jsx("feColorMatrix", { type: "saturate", values: "0" })
|
|
567
|
+
] }),
|
|
568
|
+
["line", "accent"].map((i) => /* @__PURE__ */ e.jsx(
|
|
569
|
+
"marker",
|
|
570
|
+
{
|
|
571
|
+
id: oe(t, i),
|
|
572
|
+
markerWidth: "10",
|
|
573
|
+
markerHeight: "10",
|
|
574
|
+
refX: "8",
|
|
575
|
+
refY: "4",
|
|
576
|
+
orient: "auto",
|
|
577
|
+
markerUnits: "userSpaceOnUse",
|
|
578
|
+
children: /* @__PURE__ */ e.jsx(
|
|
579
|
+
"path",
|
|
580
|
+
{
|
|
581
|
+
d: "M 1 1 L 8 4 L 1 7",
|
|
582
|
+
fill: "none",
|
|
583
|
+
stroke: i === "accent" ? r.ink.accent : r.ink.line,
|
|
584
|
+
strokeWidth: 1,
|
|
585
|
+
strokeLinecap: "round",
|
|
586
|
+
strokeLinejoin: "round"
|
|
587
|
+
}
|
|
588
|
+
)
|
|
589
|
+
},
|
|
590
|
+
i
|
|
591
|
+
))
|
|
592
|
+
] });
|
|
354
593
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
594
|
+
function ae({
|
|
595
|
+
style: t,
|
|
596
|
+
rect: r,
|
|
597
|
+
pan: a,
|
|
598
|
+
zoom: i = 1,
|
|
599
|
+
className: s = "absolute inset-0 w-full h-full pointer-events-none"
|
|
600
|
+
}) {
|
|
601
|
+
const f = yt().replace(/:/g, ""), x = a ? `translate(${a.x} ${a.y}) scale(${i})` : i !== 1 ? `scale(${i})` : "", b = r ? { x: r.x, y: r.y, width: r.width, height: r.height } : { x: 0, y: 0, width: "100%", height: "100%" };
|
|
602
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: s, "aria-hidden": "true", children: [
|
|
603
|
+
/* @__PURE__ */ e.jsx(bt, { uid: f, style: t, gridTransform: x }),
|
|
604
|
+
/* @__PURE__ */ e.jsx("rect", { ...b, fill: `url(#${At(f)})` }),
|
|
605
|
+
se(f).map((k) => /* @__PURE__ */ e.jsx("rect", { ...b, fill: `url(#${k})`, opacity: 0.6 }, k)),
|
|
606
|
+
t.paper.grain > 0 && /* @__PURE__ */ e.jsx("rect", { ...b, filter: `url(#${Lt(f)})`, opacity: t.paper.grain })
|
|
607
|
+
] });
|
|
358
608
|
}
|
|
359
|
-
|
|
360
|
-
|
|
609
|
+
const pt = o(10), ie = 9, wt = (t, r) => t.length > r ? `${t.slice(0, r - 1)}…` : t;
|
|
610
|
+
function ce({
|
|
611
|
+
style: t,
|
|
612
|
+
plate: r,
|
|
613
|
+
rows: a,
|
|
614
|
+
title: i,
|
|
615
|
+
tally: s,
|
|
616
|
+
className: f = "absolute inset-0 w-full h-full pointer-events-none"
|
|
617
|
+
}) {
|
|
618
|
+
const x = yt().replace(/:/g, ""), b = a.slice(0, ie), k = a.length - b.length, u = {
|
|
619
|
+
x: r.minX + pt,
|
|
620
|
+
y: r.minY + pt,
|
|
621
|
+
width: r.maxX - r.minX - pt * 2,
|
|
622
|
+
height: r.maxY - r.minY - pt * 2
|
|
623
|
+
}, l = {
|
|
624
|
+
fontFamily: t.font,
|
|
625
|
+
letterSpacing: "0.08em"
|
|
626
|
+
}, O = o(236), d = o(13), c = o(16), S = c + Math.max(b.length, 1) * d + (k > 0 ? d : 0), m = u.x + o(14), M = u.y + o(14), g = o(264), C = o(74), N = o(126), R = u.x + u.width - g - o(14), $ = u.y + u.height - C - o(14);
|
|
627
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: f, style: { overflow: "visible" }, "aria-hidden": "true", children: [
|
|
628
|
+
/* @__PURE__ */ e.jsx(bt, { uid: x, style: t }),
|
|
629
|
+
/* @__PURE__ */ e.jsx(
|
|
630
|
+
"rect",
|
|
631
|
+
{
|
|
632
|
+
x: r.minX,
|
|
633
|
+
y: r.minY,
|
|
634
|
+
width: r.maxX - r.minX,
|
|
635
|
+
height: r.maxY - r.minY,
|
|
636
|
+
fill: "none",
|
|
637
|
+
stroke: t.paper.edge,
|
|
638
|
+
strokeWidth: 1.4
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
/* @__PURE__ */ e.jsx(
|
|
642
|
+
"rect",
|
|
643
|
+
{
|
|
644
|
+
x: u.x,
|
|
645
|
+
y: u.y,
|
|
646
|
+
width: u.width,
|
|
647
|
+
height: u.height,
|
|
648
|
+
fill: "none",
|
|
649
|
+
stroke: t.paper.edge,
|
|
650
|
+
strokeWidth: 0.6,
|
|
651
|
+
opacity: 0.75
|
|
652
|
+
}
|
|
653
|
+
),
|
|
654
|
+
[
|
|
655
|
+
[u.x, u.y, 1, 1],
|
|
656
|
+
[u.x + u.width, u.y, -1, 1],
|
|
657
|
+
[u.x, u.y + u.height, 1, -1],
|
|
658
|
+
[u.x + u.width, u.y + u.height, -1, -1]
|
|
659
|
+
].map(([w, A, E, F], Y) => /* @__PURE__ */ e.jsx(
|
|
660
|
+
"path",
|
|
661
|
+
{
|
|
662
|
+
d: `M ${w + E * o(16)} ${A} L ${w} ${A} L ${w} ${A + F * o(16)}`,
|
|
663
|
+
fill: "none",
|
|
664
|
+
stroke: t.ink.line,
|
|
665
|
+
strokeWidth: 1.2
|
|
666
|
+
},
|
|
667
|
+
Y
|
|
668
|
+
)),
|
|
669
|
+
b.length > 0 && /* @__PURE__ */ e.jsxs("g", { children: [
|
|
670
|
+
/* @__PURE__ */ e.jsx(
|
|
671
|
+
"rect",
|
|
672
|
+
{
|
|
673
|
+
x: m,
|
|
674
|
+
y: M,
|
|
675
|
+
width: O,
|
|
676
|
+
height: S,
|
|
677
|
+
fill: t.paper.from,
|
|
678
|
+
fillOpacity: 0.55,
|
|
679
|
+
stroke: t.ink.line,
|
|
680
|
+
strokeWidth: 0.8
|
|
681
|
+
}
|
|
682
|
+
),
|
|
683
|
+
/* @__PURE__ */ e.jsx(
|
|
684
|
+
"line",
|
|
685
|
+
{
|
|
686
|
+
x1: m,
|
|
687
|
+
y1: M + c,
|
|
688
|
+
x2: m + O,
|
|
689
|
+
y2: M + c,
|
|
690
|
+
stroke: t.ink.line,
|
|
691
|
+
strokeWidth: 0.8
|
|
692
|
+
}
|
|
693
|
+
),
|
|
694
|
+
/* @__PURE__ */ e.jsx("text", { x: m + o(8), y: M + o(11), fill: t.ink.text, fontSize: o(8), fontWeight: 600, style: l, children: "COMPONENT INDEX" }),
|
|
695
|
+
/* @__PURE__ */ e.jsxs(
|
|
696
|
+
"text",
|
|
697
|
+
{
|
|
698
|
+
x: m + O - o(8),
|
|
699
|
+
y: M + o(11),
|
|
700
|
+
textAnchor: "end",
|
|
701
|
+
fill: t.ink.muted,
|
|
702
|
+
fontSize: o(8),
|
|
703
|
+
style: l,
|
|
704
|
+
children: [
|
|
705
|
+
mt(a.length),
|
|
706
|
+
" ITEMS"
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
),
|
|
710
|
+
b.map((w, A) => {
|
|
711
|
+
const E = M + c + A * d, F = Mt(w.color), Y = Pt(x, F, "top");
|
|
712
|
+
return /* @__PURE__ */ e.jsxs("g", { children: [
|
|
713
|
+
/* @__PURE__ */ e.jsx("text", { x: m + o(8), y: E + o(9.5), fill: t.ink.muted, fontSize: o(7.5), style: l, children: mt(w.n) }),
|
|
714
|
+
/* @__PURE__ */ e.jsx(
|
|
715
|
+
"rect",
|
|
716
|
+
{
|
|
717
|
+
x: m + o(28),
|
|
718
|
+
y: E + o(3),
|
|
719
|
+
width: o(14),
|
|
720
|
+
height: o(7),
|
|
721
|
+
fill: t.face.right,
|
|
722
|
+
stroke: t.ink.line,
|
|
723
|
+
strokeWidth: 0.4
|
|
724
|
+
}
|
|
725
|
+
),
|
|
726
|
+
Y.map((P) => /* @__PURE__ */ e.jsx(
|
|
727
|
+
"rect",
|
|
728
|
+
{
|
|
729
|
+
x: m + o(28),
|
|
730
|
+
y: E + o(3),
|
|
731
|
+
width: o(14),
|
|
732
|
+
height: o(7),
|
|
733
|
+
fill: `url(#${P})`,
|
|
734
|
+
opacity: 0.85
|
|
735
|
+
},
|
|
736
|
+
P
|
|
737
|
+
)),
|
|
738
|
+
/* @__PURE__ */ e.jsx("text", { x: m + o(50), y: E + o(9.5), fill: t.ink.text, fontSize: o(7.5), style: l, children: wt((w.name || "").toUpperCase(), 18) }),
|
|
739
|
+
/* @__PURE__ */ e.jsx(
|
|
740
|
+
"text",
|
|
741
|
+
{
|
|
742
|
+
x: m + O - o(8),
|
|
743
|
+
y: E + o(9.5),
|
|
744
|
+
textAnchor: "end",
|
|
745
|
+
fill: t.ink.muted,
|
|
746
|
+
fontSize: o(7),
|
|
747
|
+
style: l,
|
|
748
|
+
children: te[F]
|
|
749
|
+
}
|
|
750
|
+
)
|
|
751
|
+
] }, w.n);
|
|
752
|
+
}),
|
|
753
|
+
k > 0 && /* @__PURE__ */ e.jsx(
|
|
754
|
+
"text",
|
|
755
|
+
{
|
|
756
|
+
x: m + o(8),
|
|
757
|
+
y: M + c + b.length * d + o(9.5),
|
|
758
|
+
fill: t.ink.muted,
|
|
759
|
+
fontSize: o(7.5),
|
|
760
|
+
style: l,
|
|
761
|
+
children: `+ ${k} NOT LISTED`
|
|
762
|
+
}
|
|
763
|
+
)
|
|
764
|
+
] }),
|
|
765
|
+
/* @__PURE__ */ e.jsxs("g", { children: [
|
|
766
|
+
/* @__PURE__ */ e.jsx(
|
|
767
|
+
"rect",
|
|
768
|
+
{
|
|
769
|
+
x: R,
|
|
770
|
+
y: $,
|
|
771
|
+
width: g,
|
|
772
|
+
height: C,
|
|
773
|
+
fill: t.paper.from,
|
|
774
|
+
fillOpacity: 0.55,
|
|
775
|
+
stroke: t.ink.line,
|
|
776
|
+
strokeWidth: 0.8
|
|
777
|
+
}
|
|
778
|
+
),
|
|
779
|
+
/* @__PURE__ */ e.jsx("line", { x1: R, y1: $ + o(30), x2: R + g, y2: $ + o(30), stroke: t.ink.line, strokeWidth: 0.8 }),
|
|
780
|
+
/* @__PURE__ */ e.jsx("line", { x1: R, y1: $ + o(52), x2: R + g, y2: $ + o(52), stroke: t.ink.line, strokeWidth: 0.5 }),
|
|
781
|
+
/* @__PURE__ */ e.jsx("line", { x1: R + N, y1: $ + o(30), x2: R + N, y2: $ + C, stroke: t.ink.line, strokeWidth: 0.5 }),
|
|
782
|
+
/* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(12), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "DRAWING TITLE" }),
|
|
783
|
+
/* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(24), fill: t.ink.text, fontSize: o(10), fontWeight: 600, style: l, children: wt((i || "UNTITLED ASSEMBLY").toUpperCase(), 26) }),
|
|
784
|
+
/* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(43), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "PROJECTION" }),
|
|
785
|
+
/* @__PURE__ */ e.jsx("text", { x: R + N - o(9), y: $ + o(43), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: "ISOMETRIC 30°" }),
|
|
786
|
+
/* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(65), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "SCALE" }),
|
|
787
|
+
/* @__PURE__ */ e.jsx("text", { x: R + N - o(9), y: $ + o(65), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: "1:1" }),
|
|
788
|
+
/* @__PURE__ */ e.jsx("text", { x: R + N + o(9), y: $ + o(43), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "QTY" }),
|
|
789
|
+
/* @__PURE__ */ e.jsx("text", { x: R + g - o(9), y: $ + o(43), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: s || `${mt(a.length)} CMP` }),
|
|
790
|
+
/* @__PURE__ */ e.jsx("text", { x: R + N + o(9), y: $ + o(65), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "SHEET" }),
|
|
791
|
+
/* @__PURE__ */ e.jsx("text", { x: R + g - o(9), y: $ + o(65), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: "1 OF 1" })
|
|
792
|
+
] })
|
|
793
|
+
] });
|
|
794
|
+
}
|
|
795
|
+
function le({
|
|
796
|
+
uid: t,
|
|
797
|
+
style: r,
|
|
798
|
+
box: a,
|
|
799
|
+
color: i,
|
|
800
|
+
tag: s,
|
|
801
|
+
selected: f = !1,
|
|
802
|
+
opacity: x,
|
|
803
|
+
onClick: b,
|
|
804
|
+
onPointerDown: k
|
|
805
|
+
}) {
|
|
806
|
+
const u = Mt(i), l = f ? r.ink.accent : r.ink.line, O = f ? r.ink.accent : r.ink.text, d = [
|
|
807
|
+
{ face: "left", path: a.left },
|
|
808
|
+
{ face: "right", path: a.right },
|
|
809
|
+
{ face: "top", path: a.top }
|
|
810
|
+
];
|
|
811
|
+
return /* @__PURE__ */ e.jsxs(
|
|
812
|
+
"g",
|
|
813
|
+
{
|
|
814
|
+
className: b || k ? "cursor-pointer" : void 0,
|
|
815
|
+
opacity: x,
|
|
816
|
+
onClick: b,
|
|
817
|
+
onPointerDown: k,
|
|
818
|
+
children: [
|
|
819
|
+
d.map(({ face: c, path: S }) => /* @__PURE__ */ e.jsxs("g", { children: [
|
|
820
|
+
/* @__PURE__ */ e.jsx("path", { d: S, fill: r.face[c] }),
|
|
821
|
+
Pt(t, u, c).map((m) => /* @__PURE__ */ e.jsx("path", { d: S, fill: `url(#${m})`, opacity: r.hatchOpacity[c] }, m))
|
|
822
|
+
] }, c)),
|
|
823
|
+
/* @__PURE__ */ e.jsx(
|
|
824
|
+
"path",
|
|
825
|
+
{
|
|
826
|
+
d: a.hidden,
|
|
827
|
+
fill: "none",
|
|
828
|
+
stroke: r.ink.hidden,
|
|
829
|
+
strokeWidth: r.strokeWidth * 0.55,
|
|
830
|
+
strokeDasharray: "3.5 3",
|
|
831
|
+
opacity: 0.85
|
|
832
|
+
}
|
|
833
|
+
),
|
|
834
|
+
/* @__PURE__ */ e.jsx(
|
|
835
|
+
"path",
|
|
836
|
+
{
|
|
837
|
+
d: a.visible,
|
|
838
|
+
fill: "none",
|
|
839
|
+
stroke: l,
|
|
840
|
+
strokeWidth: f ? r.strokeWidth * 1.7 : r.strokeWidth,
|
|
841
|
+
strokeLinejoin: "round",
|
|
842
|
+
strokeLinecap: "round"
|
|
843
|
+
}
|
|
844
|
+
),
|
|
845
|
+
s != null && /* @__PURE__ */ e.jsx(
|
|
846
|
+
"text",
|
|
847
|
+
{
|
|
848
|
+
x: a.topCenter.x,
|
|
849
|
+
y: a.topCenter.y + o(3),
|
|
850
|
+
textAnchor: "middle",
|
|
851
|
+
fill: O,
|
|
852
|
+
fontSize: o(8),
|
|
853
|
+
fontWeight: 600,
|
|
854
|
+
fontFamily: r.font,
|
|
855
|
+
style: { letterSpacing: "0.1em" },
|
|
856
|
+
pointerEvents: "none",
|
|
857
|
+
children: mt(s)
|
|
858
|
+
}
|
|
859
|
+
)
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
}
|
|
864
|
+
function fe({
|
|
865
|
+
style: t,
|
|
866
|
+
box: r,
|
|
867
|
+
name: a,
|
|
868
|
+
subtitle: i,
|
|
869
|
+
selected: s = !1,
|
|
870
|
+
opacity: f
|
|
871
|
+
}) {
|
|
872
|
+
const x = s ? t.ink.accent : t.ink.line, b = s ? t.ink.accent : t.ink.text, k = (a || "").toUpperCase(), u = (i || "").toUpperCase(), l = r.minY - o(11), O = l - o(4), d = u ? l - o(15) : l - o(4), c = Math.max(k.length * o(5.6), u.length * o(4.4), o(24));
|
|
873
|
+
return /* @__PURE__ */ e.jsxs("g", { pointerEvents: "none", opacity: f, children: [
|
|
874
|
+
/* @__PURE__ */ e.jsx(
|
|
875
|
+
"line",
|
|
876
|
+
{
|
|
877
|
+
x1: r.topCenter.x,
|
|
878
|
+
y1: r.topCenter.y - o(6),
|
|
879
|
+
x2: r.topCenter.x,
|
|
880
|
+
y2: l,
|
|
881
|
+
stroke: x,
|
|
882
|
+
strokeWidth: t.strokeWidth * 0.6
|
|
883
|
+
}
|
|
884
|
+
),
|
|
885
|
+
/* @__PURE__ */ e.jsx(
|
|
886
|
+
"line",
|
|
887
|
+
{
|
|
888
|
+
x1: r.topCenter.x - c / 2,
|
|
889
|
+
y1: l,
|
|
890
|
+
x2: r.topCenter.x + c / 2,
|
|
891
|
+
y2: l,
|
|
892
|
+
stroke: x,
|
|
893
|
+
strokeWidth: t.strokeWidth * 0.6
|
|
894
|
+
}
|
|
895
|
+
),
|
|
896
|
+
/* @__PURE__ */ e.jsx(
|
|
897
|
+
"text",
|
|
898
|
+
{
|
|
899
|
+
x: r.topCenter.x,
|
|
900
|
+
y: d,
|
|
901
|
+
textAnchor: "middle",
|
|
902
|
+
fill: b,
|
|
903
|
+
fontSize: o(9.5),
|
|
904
|
+
fontWeight: 600,
|
|
905
|
+
fontFamily: t.font,
|
|
906
|
+
stroke: t.paper.from,
|
|
907
|
+
strokeWidth: o(3),
|
|
908
|
+
paintOrder: "stroke",
|
|
909
|
+
strokeLinejoin: "round",
|
|
910
|
+
style: { letterSpacing: "0.12em" },
|
|
911
|
+
children: k
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
u && /* @__PURE__ */ e.jsx(
|
|
915
|
+
"text",
|
|
916
|
+
{
|
|
917
|
+
x: r.topCenter.x,
|
|
918
|
+
y: O,
|
|
919
|
+
textAnchor: "middle",
|
|
920
|
+
fill: t.ink.muted,
|
|
921
|
+
fontSize: o(7.5),
|
|
922
|
+
fontFamily: t.font,
|
|
923
|
+
stroke: t.paper.from,
|
|
924
|
+
strokeWidth: o(2.5),
|
|
925
|
+
paintOrder: "stroke",
|
|
926
|
+
strokeLinejoin: "round",
|
|
927
|
+
style: { letterSpacing: "0.1em" },
|
|
928
|
+
children: u
|
|
929
|
+
}
|
|
930
|
+
)
|
|
931
|
+
] });
|
|
932
|
+
}
|
|
933
|
+
const Yt = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', de = {
|
|
361
934
|
blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
|
|
362
935
|
violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
|
|
363
936
|
cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
|
|
@@ -365,7 +938,7 @@ const bt = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Tt =
|
|
|
365
938
|
amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
|
|
366
939
|
rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
|
|
367
940
|
slate: { top: "#475569", side: "#334155", front: "#1e293b" }
|
|
368
|
-
},
|
|
941
|
+
}, he = {
|
|
369
942
|
blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
|
|
370
943
|
violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
|
|
371
944
|
cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
|
|
@@ -374,249 +947,340 @@ const bt = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Tt =
|
|
|
374
947
|
rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
|
|
375
948
|
slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
|
|
376
949
|
};
|
|
377
|
-
function
|
|
378
|
-
const
|
|
379
|
-
const
|
|
950
|
+
function ut(t, r, a) {
|
|
951
|
+
const i = (u) => {
|
|
952
|
+
const l = u.replace("#", "");
|
|
380
953
|
return {
|
|
381
|
-
r: parseInt(
|
|
382
|
-
g: parseInt(
|
|
383
|
-
b: parseInt(
|
|
954
|
+
r: parseInt(l.substring(0, 2), 16),
|
|
955
|
+
g: parseInt(l.substring(2, 4), 16),
|
|
956
|
+
b: parseInt(l.substring(4, 6), 16)
|
|
384
957
|
};
|
|
385
|
-
},
|
|
386
|
-
return `rgb(${
|
|
958
|
+
}, s = i(t), f = i(r), x = Math.round(s.r + (f.r - s.r) * a), b = Math.round(s.g + (f.g - s.g) * a), k = Math.round(s.b + (f.b - s.b) * a);
|
|
959
|
+
return `rgb(${x},${b},${k})`;
|
|
387
960
|
}
|
|
388
|
-
function
|
|
389
|
-
const
|
|
390
|
-
return /* @__PURE__ */
|
|
961
|
+
function pe({ x: t, y: r, z: a, children: i, fontSize: s = 8, color: f = "#1e293b", shadow: x }) {
|
|
962
|
+
const b = y(t, r, a);
|
|
963
|
+
return /* @__PURE__ */ e.jsx("g", { transform: `translate(${b.screenX}, ${b.screenY})`, filter: x, children: /* @__PURE__ */ e.jsx("g", { transform: "matrix(0.866, -0.5, 0.866, 0.5, 0, 0)", children: /* @__PURE__ */ e.jsx(
|
|
391
964
|
"text",
|
|
392
965
|
{
|
|
393
966
|
x: 0,
|
|
394
967
|
y: 0,
|
|
395
968
|
textAnchor: "middle",
|
|
396
|
-
fill:
|
|
397
|
-
fontSize:
|
|
969
|
+
fill: f,
|
|
970
|
+
fontSize: s,
|
|
398
971
|
fontWeight: 600,
|
|
399
|
-
fontFamily:
|
|
972
|
+
fontFamily: Yt,
|
|
400
973
|
style: { textTransform: "uppercase", letterSpacing: "0.06em" },
|
|
401
|
-
children:
|
|
974
|
+
children: i
|
|
402
975
|
}
|
|
403
976
|
) }) });
|
|
404
977
|
}
|
|
405
|
-
function
|
|
406
|
-
const
|
|
407
|
-
return /* @__PURE__ */
|
|
408
|
-
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
978
|
+
function ue({ width: t, depth: r, elevation: a, color: i, opacity: s, borderColor: f, theme: x, isGround: b }) {
|
|
979
|
+
const u = rt(t, r, b ? 8 : 2, 0, 0), l = y(0, 0, a);
|
|
980
|
+
return /* @__PURE__ */ e.jsxs("g", { transform: `translate(${l.screenX}, ${l.screenY})`, children: [
|
|
981
|
+
b && /* @__PURE__ */ e.jsx("g", { transform: "translate(4, 4)", opacity: 0.2, children: /* @__PURE__ */ e.jsx("path", { d: u.top, fill: "#000" }) }),
|
|
982
|
+
/* @__PURE__ */ e.jsx("path", { d: u.top, fill: i, opacity: s }),
|
|
983
|
+
b && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
984
|
+
/* @__PURE__ */ e.jsx("path", { d: u.left, fill: x === "dark" ? "#0f172a" : "#cbd5e1", opacity: 0.8 }),
|
|
985
|
+
/* @__PURE__ */ e.jsx("path", { d: u.right, fill: x === "dark" ? "#1e293b" : "#94a3b8", opacity: 0.8 })
|
|
413
986
|
] }),
|
|
414
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ e.jsx(
|
|
415
988
|
"path",
|
|
416
989
|
{
|
|
417
|
-
d:
|
|
990
|
+
d: u.top,
|
|
418
991
|
fill: "none",
|
|
419
|
-
stroke:
|
|
420
|
-
strokeWidth:
|
|
421
|
-
opacity:
|
|
992
|
+
stroke: f || (x === "dark" ? "#475569" : "#94a3b8"),
|
|
993
|
+
strokeWidth: b ? 1.5 : 0.75,
|
|
994
|
+
opacity: b ? 1 : 0.6
|
|
422
995
|
}
|
|
423
996
|
)
|
|
424
997
|
] });
|
|
425
998
|
}
|
|
426
|
-
function
|
|
427
|
-
const { interactive:
|
|
428
|
-
|
|
429
|
-
|
|
999
|
+
function $e({ config: t, options: r = {}, className: a, style: i, onNodeClick: s, onLayerClick: f }) {
|
|
1000
|
+
const { interactive: x = !0, animate: b = !0, showLabels: k = !0, expandOnHover: u = !0 } = r, { theme: l, canvas: O, origin: d, tiers: c, floorSize: S, nodes: m, cornerRadius: M = 0 } = t, g = Vt(t.style), C = g.technical, N = yt().replace(/:/g, ""), R = l === "dark" ? de : he, $ = C ? g.paper.to : l === "dark" ? "#0f172a" : "#fafafa", w = C ? g.ink.text : l === "dark" ? "#e2e8f0" : "#1e293b", A = C ? g.ink.muted : l === "dark" ? "#64748b" : "#94a3b8", E = It(() => {
|
|
1001
|
+
const T = m.map((n, h) => ({ node: n, i: h })).sort((n, h) => n.node.tier - h.node.tier || n.node.y - h.node.y || n.node.x - h.node.x), p = /* @__PURE__ */ new Map();
|
|
1002
|
+
return T.forEach(({ i: n }, h) => p.set(n, h + 1)), p;
|
|
1003
|
+
}, [m]), F = { minX: 16, minY: 16, maxX: O.width - 16, maxY: O.height - 16 }, [Y, P] = dt(/* @__PURE__ */ new Set());
|
|
1004
|
+
Ft(() => {
|
|
1005
|
+
b ? (P(/* @__PURE__ */ new Set()), c.forEach((T, p) => {
|
|
430
1006
|
setTimeout(() => {
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
})) :
|
|
434
|
-
}, [
|
|
435
|
-
const [
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
438
|
-
const
|
|
439
|
-
return
|
|
1007
|
+
P((n) => /* @__PURE__ */ new Set([...n, p]));
|
|
1008
|
+
}, p * 150 + 100);
|
|
1009
|
+
})) : P(new Set(c.map((T, p) => p)));
|
|
1010
|
+
}, [t.id, b, c.length]);
|
|
1011
|
+
const [L, J] = dt(null), [H, z] = dt(null), [v, D] = dt(null), G = [...m].sort((T, p) => {
|
|
1012
|
+
const n = c[T.tier]?.elevation || 0, h = c[p.tier]?.elevation || 0;
|
|
1013
|
+
if (n !== h) return n - h;
|
|
1014
|
+
const _ = T.x + T.width + (T.y + T.depth);
|
|
1015
|
+
return p.x + p.width + (p.y + p.depth) - _;
|
|
440
1016
|
});
|
|
441
|
-
return /* @__PURE__ */
|
|
1017
|
+
return /* @__PURE__ */ e.jsx("div", { className: a, style: { display: "inline-block", ...i }, children: /* @__PURE__ */ e.jsxs(
|
|
442
1018
|
"svg",
|
|
443
1019
|
{
|
|
444
|
-
width:
|
|
445
|
-
height:
|
|
446
|
-
style: { backgroundColor:
|
|
1020
|
+
width: O.width,
|
|
1021
|
+
height: O.height,
|
|
1022
|
+
style: { backgroundColor: $ },
|
|
447
1023
|
onClick: () => {
|
|
448
|
-
|
|
1024
|
+
x && (D(null), z(null));
|
|
449
1025
|
},
|
|
450
1026
|
children: [
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ e.jsxs("defs", { children: [
|
|
1028
|
+
/* @__PURE__ */ e.jsx("pattern", { id: `grid-${t.id}`, width: "24", height: "24", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "0.5", fill: l === "dark" ? "#1e293b" : "#e2e8f0" }) }),
|
|
1029
|
+
/* @__PURE__ */ e.jsx("filter", { id: `glow-${t.id}`, x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ e.jsx(
|
|
454
1030
|
"feDropShadow",
|
|
455
1031
|
{
|
|
456
1032
|
dx: "0",
|
|
457
1033
|
dy: "4",
|
|
458
1034
|
stdDeviation: "8",
|
|
459
|
-
floodColor:
|
|
1035
|
+
floodColor: l === "dark" ? "#60a5fa" : "#3b82f6",
|
|
460
1036
|
floodOpacity: "0.3"
|
|
461
1037
|
}
|
|
462
1038
|
) }),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ e.jsxs("radialGradient", { id: `bg-${t.id}`, cx: "48%", cy: "34%", r: "82%", children: [
|
|
1040
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: l === "dark" ? "#16203a" : "#ffffff" }),
|
|
1041
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "55%", stopColor: l === "dark" ? "#0e1526" : "#f2f5f9" }),
|
|
1042
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: l === "dark" ? "#080d18" : "#e7ecf2" })
|
|
467
1043
|
] }),
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */
|
|
1044
|
+
/* @__PURE__ */ e.jsx("filter", { id: `contact-${t.id}`, x: "-60%", y: "-60%", width: "220%", height: "220%", children: /* @__PURE__ */ e.jsx("feGaussianBlur", { stdDeviation: "5" }) }),
|
|
1045
|
+
/* @__PURE__ */ e.jsxs("linearGradient", { id: `sheen-${t.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1046
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: "#ffffff", stopOpacity: "0.18" }),
|
|
1047
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "55%", stopColor: "#ffffff", stopOpacity: "0.04" }),
|
|
1048
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: "#ffffff", stopOpacity: "0" })
|
|
473
1049
|
] }),
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
1050
|
+
/* @__PURE__ */ e.jsxs("linearGradient", { id: `shade-${t.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1051
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: "#000000", stopOpacity: "0" }),
|
|
1052
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0.24" })
|
|
477
1053
|
] }),
|
|
478
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ e.jsx("filter", { id: `label-${t.id}`, x: "-40%", y: "-40%", width: "180%", height: "180%", children: /* @__PURE__ */ e.jsx("feDropShadow", { dx: "0", dy: "0.5", stdDeviation: "0.7", floodColor: "#000000", floodOpacity: "0.7" }) })
|
|
479
1055
|
] }),
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
1056
|
+
C ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1057
|
+
/* @__PURE__ */ e.jsx(bt, { uid: N, style: g }),
|
|
1058
|
+
/* @__PURE__ */ e.jsx(
|
|
1059
|
+
ae,
|
|
1060
|
+
{
|
|
1061
|
+
style: g,
|
|
1062
|
+
rect: { x: 0, y: 0, width: O.width, height: O.height },
|
|
1063
|
+
className: ""
|
|
1064
|
+
}
|
|
1065
|
+
)
|
|
1066
|
+
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1067
|
+
/* @__PURE__ */ e.jsx("rect", { width: "100%", height: "100%", fill: `url(#bg-${t.id})` }),
|
|
1068
|
+
/* @__PURE__ */ e.jsx("rect", { width: "100%", height: "100%", fill: `url(#grid-${t.id})`, opacity: "0.5" })
|
|
1069
|
+
] }),
|
|
1070
|
+
/* @__PURE__ */ e.jsx("g", { transform: `translate(${d.x}, ${d.y})`, children: c.map((T, p) => {
|
|
1071
|
+
const n = G.filter((j) => j.tier === p), h = Y.has(p), _ = x && (H === p || H === null && v === null && L === p), I = x && (H !== null || L !== null || v !== null), Q = v?.tier === p, tt = I && !_ && !Q, W = h ? 0 : 60, q = h ? 1 : 0, K = _ && u ? { x: 10, y: -34 } : { x: 0, y: 0 }, st = _ ? 1.03 : 1, ft = y(S.width / 2, S.depth / 2, T.elevation), gt = T.offset || { x: 0, y: 0 };
|
|
1072
|
+
return /* @__PURE__ */ e.jsxs(
|
|
485
1073
|
"g",
|
|
486
1074
|
{
|
|
487
|
-
"data-tier":
|
|
488
|
-
onMouseEnter: () =>
|
|
489
|
-
onMouseLeave: () =>
|
|
490
|
-
onClick: (
|
|
491
|
-
|
|
1075
|
+
"data-tier": p,
|
|
1076
|
+
onMouseEnter: () => x && J(p),
|
|
1077
|
+
onMouseLeave: () => x && J(null),
|
|
1078
|
+
onClick: (j) => {
|
|
1079
|
+
x && (j.stopPropagation(), D(null), z((B) => B === p ? null : p), f?.(p));
|
|
492
1080
|
},
|
|
493
1081
|
style: {
|
|
494
|
-
transform: `translate(${
|
|
1082
|
+
transform: `translate(${gt.x + K.x}px, ${gt.y + K.y}px) translate(${ft.screenX}px, ${ft.screenY + W}px) scale(${st}) translate(${-ft.screenX}px, ${-ft.screenY}px)`,
|
|
495
1083
|
transition: "transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",
|
|
496
|
-
opacity:
|
|
497
|
-
filter:
|
|
498
|
-
cursor:
|
|
1084
|
+
opacity: q * (tt ? 0.35 : 1),
|
|
1085
|
+
filter: _ ? `url(#glow-${t.id})` : "none",
|
|
1086
|
+
cursor: x ? "pointer" : "default"
|
|
499
1087
|
},
|
|
500
1088
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
|
|
1089
|
+
C ? /* @__PURE__ */ e.jsx(
|
|
1090
|
+
xe,
|
|
1091
|
+
{
|
|
1092
|
+
width: S.width,
|
|
1093
|
+
depth: S.depth,
|
|
1094
|
+
elevation: p === 0 ? -2 : T.elevation,
|
|
1095
|
+
ink: p === 0 ? g.ink.line : g.ink.hidden,
|
|
1096
|
+
isGround: p === 0
|
|
1097
|
+
}
|
|
1098
|
+
) : /* @__PURE__ */ e.jsx(
|
|
1099
|
+
ue,
|
|
503
1100
|
{
|
|
504
|
-
width:
|
|
505
|
-
depth:
|
|
506
|
-
elevation:
|
|
507
|
-
color:
|
|
508
|
-
opacity:
|
|
509
|
-
borderColor:
|
|
510
|
-
theme:
|
|
511
|
-
isGround:
|
|
1101
|
+
width: S.width,
|
|
1102
|
+
depth: S.depth,
|
|
1103
|
+
elevation: p === 0 ? -2 : T.elevation,
|
|
1104
|
+
color: T.floorColor || (l === "dark" ? "#0f172a" : "#f8fafc"),
|
|
1105
|
+
opacity: T.floorOpacity || (p === 0 ? 0.95 : 0.5),
|
|
1106
|
+
borderColor: T.borderColor,
|
|
1107
|
+
theme: l,
|
|
1108
|
+
isGround: p === 0
|
|
512
1109
|
}
|
|
513
1110
|
),
|
|
514
|
-
|
|
515
|
-
const
|
|
516
|
-
return /* @__PURE__ */
|
|
1111
|
+
C && n.map((j, B) => {
|
|
1112
|
+
const ot = T.elevation + 5, et = y(j.x, j.y, ot), U = Tt(j.width, j.depth, j.height, et.screenX, et.screenY), X = v?.tier === p && v?.index === B, nt = x && v !== null && !X;
|
|
1113
|
+
return /* @__PURE__ */ e.jsx(
|
|
1114
|
+
le,
|
|
1115
|
+
{
|
|
1116
|
+
uid: N,
|
|
1117
|
+
style: g,
|
|
1118
|
+
box: U,
|
|
1119
|
+
color: j.color,
|
|
1120
|
+
tag: E.get(m.indexOf(j)),
|
|
1121
|
+
selected: X,
|
|
1122
|
+
opacity: (j.opacity ?? 1) * (nt ? 0.3 : 1),
|
|
1123
|
+
onClick: x ? () => {
|
|
1124
|
+
if (z(null), D((at) => at && at.tier === p && at.index === B ? null : { tier: p, index: B }), s?.(j, { tier: p, index: B }), j.link)
|
|
1125
|
+
try {
|
|
1126
|
+
window.open(j.link, "_blank");
|
|
1127
|
+
} catch {
|
|
1128
|
+
}
|
|
1129
|
+
} : void 0
|
|
1130
|
+
},
|
|
1131
|
+
`tech-${B}`
|
|
1132
|
+
);
|
|
1133
|
+
}),
|
|
1134
|
+
C && k && n.map((j, B) => {
|
|
1135
|
+
const ot = T.elevation + 5, et = y(j.x, j.y, ot), U = Tt(j.width, j.depth, j.height, et.screenX, et.screenY), X = v?.tier === p && v?.index === B, nt = x && v !== null && !X;
|
|
1136
|
+
return /* @__PURE__ */ e.jsx(
|
|
1137
|
+
fe,
|
|
1138
|
+
{
|
|
1139
|
+
style: g,
|
|
1140
|
+
box: U,
|
|
1141
|
+
name: j.label,
|
|
1142
|
+
selected: X,
|
|
1143
|
+
opacity: nt ? 0.3 : 1
|
|
1144
|
+
},
|
|
1145
|
+
`tech-label-${B}`
|
|
1146
|
+
);
|
|
1147
|
+
}),
|
|
1148
|
+
!C && n.map((j, B) => {
|
|
1149
|
+
const ot = T.elevation + 5, et = y(j.x, j.y, ot), U = rt(j.width, j.depth, j.height, et.screenX, et.screenY, M), X = R[j.color] || R.slate, nt = v?.tier === p && v?.index === B, at = x && v !== null && !nt, $t = y(j.x - 3, j.y - 3, T.elevation), Wt = rt(j.width + 6, j.depth + 6, 0, $t.screenX, $t.screenY, M).top;
|
|
1150
|
+
return /* @__PURE__ */ e.jsxs(
|
|
517
1151
|
"g",
|
|
518
1152
|
{
|
|
519
|
-
"data-node": `${
|
|
520
|
-
opacity: (
|
|
521
|
-
onClick:
|
|
522
|
-
if (
|
|
1153
|
+
"data-node": `${p}-${B}`,
|
|
1154
|
+
opacity: (j.opacity ?? 1) * (at ? 0.3 : 1),
|
|
1155
|
+
onClick: x ? (Z) => {
|
|
1156
|
+
if (Z.stopPropagation(), z(null), D((V) => V && V.tier === p && V.index === B ? null : { tier: p, index: B }), s?.(j, { tier: p, index: B }), j.link)
|
|
523
1157
|
try {
|
|
524
|
-
window.open(
|
|
1158
|
+
window.open(j.link, "_blank");
|
|
525
1159
|
} catch {
|
|
526
1160
|
}
|
|
527
1161
|
} : void 0,
|
|
528
|
-
style: { cursor:
|
|
1162
|
+
style: { cursor: x ? "pointer" : "default", transition: "opacity 0.3s ease-out" },
|
|
529
1163
|
children: [
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
|
|
1164
|
+
/* @__PURE__ */ e.jsx("path", { d: Wt, fill: "#000000", opacity: 0.3, filter: `url(#contact-${t.id})` }),
|
|
1165
|
+
U.cornerBackRight?.map((Z, V) => /* @__PURE__ */ e.jsx(
|
|
532
1166
|
"path",
|
|
533
1167
|
{
|
|
534
|
-
d:
|
|
535
|
-
fill:
|
|
1168
|
+
d: Z.path,
|
|
1169
|
+
fill: ut(X.front, X.side, Z.intensity)
|
|
536
1170
|
},
|
|
537
|
-
`cbr-${
|
|
1171
|
+
`cbr-${V}`
|
|
538
1172
|
)),
|
|
539
|
-
|
|
1173
|
+
U.cornerBackLeft?.map((Z, V) => /* @__PURE__ */ e.jsx(
|
|
540
1174
|
"path",
|
|
541
1175
|
{
|
|
542
|
-
d:
|
|
543
|
-
fill:
|
|
1176
|
+
d: Z.path,
|
|
1177
|
+
fill: ut(X.side, X.front, Z.intensity)
|
|
544
1178
|
},
|
|
545
|
-
`cbl-${
|
|
1179
|
+
`cbl-${V}`
|
|
546
1180
|
)),
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
|
|
1181
|
+
/* @__PURE__ */ e.jsx("path", { d: U.left, fill: X.side }),
|
|
1182
|
+
/* @__PURE__ */ e.jsx("path", { d: U.left, fill: `url(#shade-${t.id})` }),
|
|
1183
|
+
/* @__PURE__ */ e.jsx("path", { d: U.right, fill: X.front }),
|
|
1184
|
+
/* @__PURE__ */ e.jsx("path", { d: U.right, fill: `url(#shade-${t.id})` }),
|
|
1185
|
+
U.cornerFrontRight?.map((Z, V) => /* @__PURE__ */ e.jsx(
|
|
552
1186
|
"path",
|
|
553
1187
|
{
|
|
554
|
-
d:
|
|
555
|
-
fill:
|
|
1188
|
+
d: Z.path,
|
|
1189
|
+
fill: ut(X.front, X.side, Z.intensity)
|
|
556
1190
|
},
|
|
557
|
-
`cfr-${
|
|
1191
|
+
`cfr-${V}`
|
|
558
1192
|
)),
|
|
559
|
-
|
|
1193
|
+
U.cornerFrontLeft?.map((Z, V) => /* @__PURE__ */ e.jsx(
|
|
560
1194
|
"path",
|
|
561
1195
|
{
|
|
562
|
-
d:
|
|
563
|
-
fill:
|
|
1196
|
+
d: Z.path,
|
|
1197
|
+
fill: ut(X.front, X.side, Z.intensity)
|
|
564
1198
|
},
|
|
565
|
-
`cfl-${
|
|
1199
|
+
`cfl-${V}`
|
|
566
1200
|
)),
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ e.jsx("path", { d: U.top, fill: X.top }),
|
|
1202
|
+
/* @__PURE__ */ e.jsx("path", { d: U.top, fill: `url(#sheen-${t.id})` }),
|
|
1203
|
+
/* @__PURE__ */ e.jsx(
|
|
570
1204
|
"path",
|
|
571
1205
|
{
|
|
572
|
-
d:
|
|
1206
|
+
d: U.top,
|
|
573
1207
|
fill: "none",
|
|
574
|
-
stroke:
|
|
575
|
-
strokeWidth:
|
|
1208
|
+
stroke: nt ? "#ffffff" : "rgba(255,255,255,0.28)",
|
|
1209
|
+
strokeWidth: nt ? 1.4 : 0.75,
|
|
576
1210
|
strokeLinejoin: "round"
|
|
577
1211
|
}
|
|
578
1212
|
),
|
|
579
|
-
k &&
|
|
580
|
-
|
|
1213
|
+
k && j.label && /* @__PURE__ */ e.jsx(
|
|
1214
|
+
pe,
|
|
581
1215
|
{
|
|
582
|
-
x:
|
|
583
|
-
y:
|
|
584
|
-
z:
|
|
585
|
-
fontSize:
|
|
586
|
-
color:
|
|
587
|
-
shadow: `url(#label-${
|
|
588
|
-
children:
|
|
1216
|
+
x: j.x + j.width / 2,
|
|
1217
|
+
y: j.y + j.depth / 2,
|
|
1218
|
+
z: ot + j.height + 2,
|
|
1219
|
+
fontSize: j.width > 70 ? 9 : 8,
|
|
1220
|
+
color: w,
|
|
1221
|
+
shadow: `url(#label-${t.id})`,
|
|
1222
|
+
children: j.label
|
|
589
1223
|
}
|
|
590
1224
|
)
|
|
591
1225
|
]
|
|
592
1226
|
},
|
|
593
|
-
|
|
1227
|
+
B
|
|
594
1228
|
);
|
|
595
1229
|
}),
|
|
596
|
-
k && /* @__PURE__ */
|
|
1230
|
+
k && /* @__PURE__ */ e.jsx(
|
|
597
1231
|
"text",
|
|
598
1232
|
{
|
|
599
|
-
x:
|
|
600
|
-
y:
|
|
601
|
-
fill:
|
|
1233
|
+
x: y(-25, S.depth / 2, T.elevation + 15).screenX - 35,
|
|
1234
|
+
y: y(-25, S.depth / 2, T.elevation + 15).screenY,
|
|
1235
|
+
fill: A,
|
|
602
1236
|
fontSize: 9,
|
|
603
1237
|
fontWeight: 500,
|
|
604
|
-
fontFamily:
|
|
605
|
-
opacity: 0.6,
|
|
606
|
-
style: { letterSpacing: "0.05em" },
|
|
607
|
-
children:
|
|
1238
|
+
fontFamily: Yt,
|
|
1239
|
+
opacity: C ? 0.9 : 0.6,
|
|
1240
|
+
style: { letterSpacing: "0.05em", textTransform: C ? "uppercase" : "none" },
|
|
1241
|
+
children: T.name
|
|
608
1242
|
}
|
|
609
1243
|
)
|
|
610
1244
|
]
|
|
611
1245
|
},
|
|
612
|
-
|
|
1246
|
+
p
|
|
613
1247
|
);
|
|
614
|
-
}) })
|
|
1248
|
+
}) }),
|
|
1249
|
+
C && /* @__PURE__ */ e.jsx(
|
|
1250
|
+
ce,
|
|
1251
|
+
{
|
|
1252
|
+
style: g,
|
|
1253
|
+
plate: F,
|
|
1254
|
+
rows: m.map((T, p) => ({
|
|
1255
|
+
n: E.get(p) || p + 1,
|
|
1256
|
+
name: T.label,
|
|
1257
|
+
subtitle: c[T.tier]?.name,
|
|
1258
|
+
color: T.color
|
|
1259
|
+
})).sort((T, p) => T.n - p.n),
|
|
1260
|
+
title: t.title,
|
|
1261
|
+
tally: `${String(m.length).padStart(2, "0")} CMP / ${String(c.length).padStart(2, "0")} TIER`,
|
|
1262
|
+
className: ""
|
|
1263
|
+
}
|
|
1264
|
+
)
|
|
615
1265
|
]
|
|
616
1266
|
}
|
|
617
1267
|
) });
|
|
618
1268
|
}
|
|
619
|
-
|
|
1269
|
+
function xe({ width: t, depth: r, elevation: a, ink: i, isGround: s }) {
|
|
1270
|
+
const f = y(0, 0, a), x = rt(t, r, 0, f.screenX, f.screenY).top;
|
|
1271
|
+
return /* @__PURE__ */ e.jsx(
|
|
1272
|
+
"path",
|
|
1273
|
+
{
|
|
1274
|
+
d: x,
|
|
1275
|
+
fill: "none",
|
|
1276
|
+
stroke: i,
|
|
1277
|
+
strokeWidth: s ? 1 : 0.7,
|
|
1278
|
+
strokeDasharray: s ? void 0 : "5 4",
|
|
1279
|
+
opacity: s ? 0.9 : 0.7
|
|
1280
|
+
}
|
|
1281
|
+
);
|
|
1282
|
+
}
|
|
1283
|
+
const Ot = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', me = {
|
|
620
1284
|
blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
|
|
621
1285
|
violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
|
|
622
1286
|
cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
|
|
@@ -624,7 +1288,7 @@ const ut = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', St =
|
|
|
624
1288
|
amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
|
|
625
1289
|
rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
|
|
626
1290
|
slate: { top: "#475569", side: "#334155", front: "#1e293b" }
|
|
627
|
-
},
|
|
1291
|
+
}, ye = {
|
|
628
1292
|
blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
|
|
629
1293
|
violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
|
|
630
1294
|
cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
|
|
@@ -633,77 +1297,77 @@ const ut = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', St =
|
|
|
633
1297
|
rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
|
|
634
1298
|
slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
|
|
635
1299
|
};
|
|
636
|
-
function
|
|
637
|
-
const
|
|
638
|
-
const
|
|
1300
|
+
function xt(t, r, a) {
|
|
1301
|
+
const i = (u) => {
|
|
1302
|
+
const l = u.replace("#", "");
|
|
639
1303
|
return {
|
|
640
|
-
r: parseInt(
|
|
641
|
-
g: parseInt(
|
|
642
|
-
b: parseInt(
|
|
1304
|
+
r: parseInt(l.substring(0, 2), 16),
|
|
1305
|
+
g: parseInt(l.substring(2, 4), 16),
|
|
1306
|
+
b: parseInt(l.substring(4, 6), 16)
|
|
643
1307
|
};
|
|
644
|
-
},
|
|
645
|
-
return `rgb(${
|
|
1308
|
+
}, s = i(t), f = i(r), x = Math.round(s.r + (f.r - s.r) * a), b = Math.round(s.g + (f.g - s.g) * a), k = Math.round(s.b + (f.b - s.b) * a);
|
|
1309
|
+
return `rgb(${x},${b},${k})`;
|
|
646
1310
|
}
|
|
647
|
-
function
|
|
648
|
-
const { theme:
|
|
649
|
-
const
|
|
650
|
-
return
|
|
1311
|
+
function ke(t) {
|
|
1312
|
+
const { theme: r, canvas: a, origin: i, tiers: s, floorSize: f, nodes: x, cornerRadius: b = 0 } = t, k = r === "dark" ? me : ye, u = r === "dark" ? "#0f172a" : "#fafafa", l = r === "dark" ? "#e2e8f0" : "#1e293b", O = r === "dark" ? "#64748b" : "#94a3b8", d = [...x].sort((S, m) => {
|
|
1313
|
+
const M = s[S.tier]?.elevation || 0, g = s[m.tier]?.elevation || 0;
|
|
1314
|
+
return M !== g ? M - g : m.x + m.width + (m.y + m.depth) - (S.x + S.width + (S.y + S.depth));
|
|
651
1315
|
});
|
|
652
|
-
let
|
|
653
|
-
|
|
1316
|
+
let c = `<svg xmlns="http://www.w3.org/2000/svg" width="${a.width}" height="${a.height}" style="background:${u}">`;
|
|
1317
|
+
c += `<defs>
|
|
654
1318
|
<pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
|
|
655
|
-
<circle cx="12" cy="12" r="0.5" fill="${
|
|
1319
|
+
<circle cx="12" cy="12" r="0.5" fill="${r === "dark" ? "#1e293b" : "#e2e8f0"}"/>
|
|
656
1320
|
</pattern>
|
|
657
1321
|
<radialGradient id="bg" cx="48%" cy="34%" r="82%">
|
|
658
|
-
<stop offset="0%" stop-color="${
|
|
659
|
-
<stop offset="55%" stop-color="${
|
|
660
|
-
<stop offset="100%" stop-color="${
|
|
1322
|
+
<stop offset="0%" stop-color="${r === "dark" ? "#16203a" : "#ffffff"}"/>
|
|
1323
|
+
<stop offset="55%" stop-color="${r === "dark" ? "#0e1526" : "#f2f5f9"}"/>
|
|
1324
|
+
<stop offset="100%" stop-color="${r === "dark" ? "#080d18" : "#e7ecf2"}"/>
|
|
661
1325
|
</radialGradient>
|
|
662
1326
|
<filter id="contact" x="-60%" y="-60%" width="220%" height="220%"><feGaussianBlur stdDeviation="5"/></filter>
|
|
663
1327
|
<linearGradient id="sheen" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.18"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.04"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></linearGradient>
|
|
664
1328
|
<linearGradient id="shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000000" stop-opacity="0"/><stop offset="100%" stop-color="#000000" stop-opacity="0.24"/></linearGradient>
|
|
665
1329
|
<filter id="labelshadow" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="0" dy="0.5" stdDeviation="0.7" flood-color="#000000" flood-opacity="0.7"/></filter>
|
|
666
|
-
</defs>`,
|
|
667
|
-
for (let
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
for (const
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
for (const
|
|
678
|
-
|
|
679
|
-
if (
|
|
680
|
-
for (const
|
|
681
|
-
|
|
682
|
-
if (
|
|
683
|
-
for (const
|
|
684
|
-
|
|
685
|
-
if (
|
|
686
|
-
for (const
|
|
687
|
-
|
|
688
|
-
if (
|
|
689
|
-
const
|
|
690
|
-
|
|
1330
|
+
</defs>`, c += '<rect width="100%" height="100%" fill="url(#bg)"/>', c += '<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>', c += `<g transform="translate(${i.x},${i.y})">`;
|
|
1331
|
+
for (let S = 0; S < s.length; S++) {
|
|
1332
|
+
const m = s[S], M = d.filter((E) => E.tier === S), g = m.offset || { x: 0, y: 0 };
|
|
1333
|
+
c += `<g transform="translate(${g.x},${g.y})">`;
|
|
1334
|
+
const C = S === 0 ? 8 : 2, N = rt(f.width, f.depth, C, 0, 0), R = y(0, 0, S === 0 ? -2 : m.elevation), $ = m.floorColor || (r === "dark" ? "#0f172a" : "#f8fafc"), w = m.floorOpacity || (S === 0 ? 0.95 : 0.5);
|
|
1335
|
+
c += `<g transform="translate(${R.screenX},${R.screenY})">`, S === 0 && (c += `<g transform="translate(4,4)" opacity="0.2"><path d="${N.top}" fill="#000"/></g>`), c += `<path d="${N.top}" fill="${$}" opacity="${w}"/>`, S === 0 && (c += `<path d="${N.left}" fill="${r === "dark" ? "#0f172a" : "#cbd5e1"}" opacity="0.8"/>`, c += `<path d="${N.right}" fill="${r === "dark" ? "#1e293b" : "#94a3b8"}" opacity="0.8"/>`), c += `<path d="${N.top}" fill="none" stroke="${m.borderColor || (r === "dark" ? "#475569" : "#94a3b8")}" stroke-width="${S === 0 ? 1.5 : 0.75}" opacity="${S === 0 ? 1 : 0.6}"/>`, c += "</g>";
|
|
1336
|
+
for (const E of M) {
|
|
1337
|
+
const F = m.elevation + 5, Y = y(E.x, E.y, F), P = rt(E.width, E.depth, E.height, Y.screenX, Y.screenY, b), L = k[E.color] || k.slate, J = E.opacity ?? 1;
|
|
1338
|
+
c += `<g opacity="${J}">`;
|
|
1339
|
+
const H = y(E.x - 3, E.y - 3, m.elevation), z = rt(E.width + 6, E.depth + 6, 0, H.screenX, H.screenY, b).top;
|
|
1340
|
+
if (c += `<path d="${z}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`, P.cornerBackRight)
|
|
1341
|
+
for (const v of P.cornerBackRight)
|
|
1342
|
+
c += `<path d="${v.path}" fill="${xt(L.front, L.side, v.intensity)}"/>`;
|
|
1343
|
+
if (P.cornerBackLeft)
|
|
1344
|
+
for (const v of P.cornerBackLeft)
|
|
1345
|
+
c += `<path d="${v.path}" fill="${xt(L.side, L.front, v.intensity)}"/>`;
|
|
1346
|
+
if (c += `<path d="${P.left}" fill="${L.side}"/>`, c += `<path d="${P.left}" fill="url(#shade)"/>`, c += `<path d="${P.right}" fill="${L.front}"/>`, c += `<path d="${P.right}" fill="url(#shade)"/>`, P.cornerFrontRight)
|
|
1347
|
+
for (const v of P.cornerFrontRight)
|
|
1348
|
+
c += `<path d="${v.path}" fill="${xt(L.front, L.side, v.intensity)}"/>`;
|
|
1349
|
+
if (P.cornerFrontLeft)
|
|
1350
|
+
for (const v of P.cornerFrontLeft)
|
|
1351
|
+
c += `<path d="${v.path}" fill="${xt(L.front, L.side, v.intensity)}"/>`;
|
|
1352
|
+
if (c += `<path d="${P.top}" fill="${L.top}"/>`, c += `<path d="${P.top}" fill="url(#sheen)"/>`, c += `<path d="${P.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`, E.label) {
|
|
1353
|
+
const v = y(E.x + E.width / 2, E.y + E.depth / 2, F + E.height + 2), D = E.width > 70 ? 9 : 8;
|
|
1354
|
+
c += `<g transform="translate(${v.screenX},${v.screenY})" filter="url(#labelshadow)">`, c += '<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">', c += `<text x="0" y="0" text-anchor="middle" fill="${l}" font-size="${D}" font-weight="600" font-family='${Ot}' style="text-transform:uppercase;letter-spacing:0.06em">${E.label}</text>`, c += "</g></g>";
|
|
691
1355
|
}
|
|
692
|
-
|
|
1356
|
+
c += "</g>";
|
|
693
1357
|
}
|
|
694
|
-
const
|
|
695
|
-
|
|
1358
|
+
const A = y(-25, f.depth / 2, m.elevation + 15);
|
|
1359
|
+
c += `<text x="${A.screenX - 35}" y="${A.screenY}" fill="${O}" font-size="9" font-weight="500" font-family='${Ot}' opacity="0.6" style="letter-spacing:0.05em">${m.name}</text>`, c += "</g>";
|
|
696
1360
|
}
|
|
697
|
-
return
|
|
1361
|
+
return c += "</g></svg>", c;
|
|
698
1362
|
}
|
|
699
|
-
function
|
|
700
|
-
|
|
1363
|
+
function je(t, r) {
|
|
1364
|
+
t.innerHTML = ke(r);
|
|
701
1365
|
}
|
|
702
1366
|
export {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
1367
|
+
$e as ArcDiagram,
|
|
1368
|
+
ge as getColorShading,
|
|
1369
|
+
rt as isoBox,
|
|
1370
|
+
y as isoToScreen,
|
|
1371
|
+
je as renderToElement,
|
|
1372
|
+
ke as renderToString
|
|
709
1373
|
};
|