@harmonics/lattice-ui 0.6.0 → 0.7.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/CHANGELOG.md +10 -0
- package/README.md +39 -6
- package/dist/board.js +204 -204
- package/dist/define.js +1 -1
- package/dist/elements-DdyLdkzr.js +1346 -0
- package/dist/index.js +2 -2
- package/dist/types/elements/icon.d.ts +1 -1
- package/dist/types/elements/index.d.ts +1 -1
- package/dist/types/elements/shape.d.ts +35 -3
- package/dist/types/elements/solid.d.ts +5 -1
- package/dist/{woods-FI5aDpfQ.js → woods-C8W11GkD.js} +96 -144
- package/package.json +1 -1
- package/react.d.ts +5 -0
- package/dist/elements-GhyUSrb9.js +0 -1099
|
@@ -19,7 +19,7 @@ function s(e) {
|
|
|
19
19
|
function c(e) {
|
|
20
20
|
o.context = e;
|
|
21
21
|
}
|
|
22
|
-
var l = (e, t) => e === t, u = Symbol("solid-track"), d = { equals: l }, f = null, p =
|
|
22
|
+
var l = (e, t) => e === t, u = Symbol("solid-track"), d = { equals: l }, f = null, p = oe, m = 1, h = 2, g = {
|
|
23
23
|
owned: null,
|
|
24
24
|
cleanups: null,
|
|
25
25
|
context: null,
|
|
@@ -31,10 +31,10 @@ function C(e, t) {
|
|
|
31
31
|
cleanups: null,
|
|
32
32
|
context: a ? a.context : null,
|
|
33
33
|
owner: a
|
|
34
|
-
}, s = i ? e : () => e(() => D(() =>
|
|
34
|
+
}, s = i ? e : () => e(() => D(() => z(o)));
|
|
35
35
|
_ = o, y = null;
|
|
36
36
|
try {
|
|
37
|
-
return
|
|
37
|
+
return I(s, !0);
|
|
38
38
|
} finally {
|
|
39
39
|
y = n, _ = r;
|
|
40
40
|
}
|
|
@@ -50,16 +50,16 @@ function w(e, t) {
|
|
|
50
50
|
return [A.bind(n), (e) => (typeof e == "function" && (e = v && v.running && v.sources.has(n) ? e(n.tValue) : e(n.value)), j(n, e))];
|
|
51
51
|
}
|
|
52
52
|
function T(e, t, n) {
|
|
53
|
-
M(
|
|
53
|
+
M(P(e, t, !1, m));
|
|
54
54
|
}
|
|
55
55
|
function ee(e, t, n) {
|
|
56
|
-
p =
|
|
57
|
-
let r =
|
|
56
|
+
p = se;
|
|
57
|
+
let r = P(e, t, !1, m), i = k && ie(k);
|
|
58
58
|
i && (r.suspense = i), (!n || !n.render) && (r.user = !0), x ? x.push(r) : M(r);
|
|
59
59
|
}
|
|
60
60
|
function E(e, t, n) {
|
|
61
61
|
n = n ? Object.assign({}, d, n) : d;
|
|
62
|
-
let r =
|
|
62
|
+
let r = P(e, t, !0, 0);
|
|
63
63
|
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, M(r), A.bind(r);
|
|
64
64
|
}
|
|
65
65
|
function D(e) {
|
|
@@ -93,13 +93,6 @@ function ie(e) {
|
|
|
93
93
|
let t;
|
|
94
94
|
return _ && _.context && (t = _.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
95
95
|
}
|
|
96
|
-
function ae(e) {
|
|
97
|
-
let t = E(e), n = E(() => H(t()));
|
|
98
|
-
return n.toArray = () => {
|
|
99
|
-
let e = n();
|
|
100
|
-
return Array.isArray(e) ? e : e == null ? [] : [e];
|
|
101
|
-
}, n;
|
|
102
|
-
}
|
|
103
96
|
var k;
|
|
104
97
|
function A() {
|
|
105
98
|
let e = v && v.running;
|
|
@@ -107,7 +100,7 @@ function A() {
|
|
|
107
100
|
if ((e ? this.tState : this.state) === m) M(this);
|
|
108
101
|
else {
|
|
109
102
|
let e = b;
|
|
110
|
-
b = null,
|
|
103
|
+
b = null, I(() => L(this), !1), b = e;
|
|
111
104
|
}
|
|
112
105
|
}
|
|
113
106
|
if (y) {
|
|
@@ -126,10 +119,10 @@ function j(e, t, n) {
|
|
|
126
119
|
let r = v.running;
|
|
127
120
|
(r || !n && v.sources.has(e)) && (v.sources.add(e), e.tValue = t), r || (e.value = t);
|
|
128
121
|
} else e.value = t;
|
|
129
|
-
e.observers && e.observers.length &&
|
|
122
|
+
e.observers && e.observers.length && I(() => {
|
|
130
123
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
131
124
|
let n = e.observers[t], r = v && v.running;
|
|
132
|
-
r && v.disposed.has(n) || ((r ? !n.tState : !n.state) && (n.pure ? b.push(n) : x.push(n), n.observers &&
|
|
125
|
+
r && v.disposed.has(n) || ((r ? !n.tState : !n.state) && (n.pure ? b.push(n) : x.push(n), n.observers && R(n)), r ? n.tState = m : n.state = m);
|
|
133
126
|
}
|
|
134
127
|
if (b.length > 1e6) throw b = [], Error();
|
|
135
128
|
}, !1);
|
|
@@ -138,27 +131,27 @@ function j(e, t, n) {
|
|
|
138
131
|
}
|
|
139
132
|
function M(e) {
|
|
140
133
|
if (!e.fn) return;
|
|
141
|
-
|
|
134
|
+
z(e);
|
|
142
135
|
let t = S;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
v && (v.running = !0), y = _ = e,
|
|
136
|
+
N(e, v && v.running && v.sources.has(e) ? e.tValue : e.value, t), v && !v.running && v.sources.has(e) && queueMicrotask(() => {
|
|
137
|
+
I(() => {
|
|
138
|
+
v && (v.running = !0), y = _ = e, N(e, e.tValue, t), y = _ = null;
|
|
146
139
|
}, !1);
|
|
147
140
|
});
|
|
148
141
|
}
|
|
149
|
-
function
|
|
142
|
+
function N(e, t, n) {
|
|
150
143
|
let r, i = _, a = y;
|
|
151
144
|
y = _ = e;
|
|
152
145
|
try {
|
|
153
146
|
r = e.fn(t);
|
|
154
147
|
} catch (t) {
|
|
155
|
-
return e.pure && (v && v.running ? (e.tState = m, e.tOwned && e.tOwned.forEach(
|
|
148
|
+
return e.pure && (v && v.running ? (e.tState = m, e.tOwned && e.tOwned.forEach(z), e.tOwned = void 0) : (e.state = m, e.owned && e.owned.forEach(z), e.owned = null)), e.updatedAt = n + 1, H(t);
|
|
156
149
|
} finally {
|
|
157
150
|
y = a, _ = i;
|
|
158
151
|
}
|
|
159
152
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? j(e, r, !0) : v && v.running && e.pure ? (v.sources.has(e) || (e.value = r), v.sources.add(e), e.tValue = r) : e.value = r, e.updatedAt = n);
|
|
160
153
|
}
|
|
161
|
-
function
|
|
154
|
+
function P(e, t, n, r = m, i) {
|
|
162
155
|
let a = {
|
|
163
156
|
fn: e,
|
|
164
157
|
state: r,
|
|
@@ -174,10 +167,10 @@ function N(e, t, n, r = m, i) {
|
|
|
174
167
|
};
|
|
175
168
|
return v && v.running && (a.state = 0, a.tState = r), _ === null || _ !== g && (v && v.running && _.pure ? _.tOwned ? _.tOwned.push(a) : _.tOwned = [a] : _.owned ? _.owned.push(a) : _.owned = [a]), a;
|
|
176
169
|
}
|
|
177
|
-
function
|
|
170
|
+
function F(e) {
|
|
178
171
|
let t = v && v.running;
|
|
179
172
|
if ((t ? e.tState : e.state) === 0) return;
|
|
180
|
-
if ((t ? e.tState : e.state) === h) return
|
|
173
|
+
if ((t ? e.tState : e.state) === h) return L(e);
|
|
181
174
|
if (e.suspense && D(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
182
175
|
let n = [e];
|
|
183
176
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < S);) {
|
|
@@ -192,33 +185,33 @@ function P(e) {
|
|
|
192
185
|
if ((t ? e.tState : e.state) === m) M(e);
|
|
193
186
|
else if ((t ? e.tState : e.state) === h) {
|
|
194
187
|
let t = b;
|
|
195
|
-
b = null,
|
|
188
|
+
b = null, I(() => L(e, n[0]), !1), b = t;
|
|
196
189
|
}
|
|
197
190
|
}
|
|
198
191
|
}
|
|
199
|
-
function
|
|
192
|
+
function I(e, t) {
|
|
200
193
|
if (b) return e();
|
|
201
194
|
let n = !1;
|
|
202
195
|
t || (b = []), x ? n = !0 : x = [], S++;
|
|
203
196
|
try {
|
|
204
197
|
let t = e();
|
|
205
|
-
return
|
|
198
|
+
return ae(n), t;
|
|
206
199
|
} catch (e) {
|
|
207
|
-
n || (x = null), b = null,
|
|
200
|
+
n || (x = null), b = null, H(e);
|
|
208
201
|
}
|
|
209
202
|
}
|
|
210
|
-
function
|
|
211
|
-
if (b &&= (
|
|
203
|
+
function ae(e) {
|
|
204
|
+
if (b &&= (oe(b), null), e) return;
|
|
212
205
|
let t;
|
|
213
206
|
if (v) {
|
|
214
207
|
if (!v.promises.size && !v.queue.size) {
|
|
215
208
|
let e = v.sources, n = v.disposed;
|
|
216
209
|
x.push.apply(x, v.effects), t = v.resolve;
|
|
217
210
|
for (let e of x) "tState" in e && (e.state = e.tState), delete e.tState;
|
|
218
|
-
v = null,
|
|
219
|
-
for (let e of n)
|
|
211
|
+
v = null, I(() => {
|
|
212
|
+
for (let e of n) z(e);
|
|
220
213
|
for (let t of e) {
|
|
221
|
-
if (t.value = t.tValue, t.owned) for (let e = 0, n = t.owned.length; e < n; e++)
|
|
214
|
+
if (t.value = t.tValue, t.owned) for (let e = 0, n = t.owned.length; e < n; e++) z(t.owned[e]);
|
|
222
215
|
t.tOwned && (t.owned = t.tOwned), delete t.tValue, delete t.tOwned, t.tState = 0;
|
|
223
216
|
}
|
|
224
217
|
re(!1);
|
|
@@ -229,16 +222,16 @@ function se(e) {
|
|
|
229
222
|
}
|
|
230
223
|
}
|
|
231
224
|
let n = x;
|
|
232
|
-
x = null, n.length &&
|
|
225
|
+
x = null, n.length && I(() => p(n), !1), t && t();
|
|
233
226
|
}
|
|
234
|
-
function
|
|
235
|
-
for (let t = 0; t < e.length; t++)
|
|
227
|
+
function oe(e) {
|
|
228
|
+
for (let t = 0; t < e.length; t++) F(e[t]);
|
|
236
229
|
}
|
|
237
|
-
function
|
|
230
|
+
function se(e) {
|
|
238
231
|
let t, n = 0;
|
|
239
232
|
for (t = 0; t < e.length; t++) {
|
|
240
233
|
let r = e[t];
|
|
241
|
-
r.user ? e[n++] = r :
|
|
234
|
+
r.user ? e[n++] = r : F(r);
|
|
242
235
|
}
|
|
243
236
|
if (o.context) {
|
|
244
237
|
if (o.count) {
|
|
@@ -247,27 +240,27 @@ function le(e) {
|
|
|
247
240
|
}
|
|
248
241
|
c();
|
|
249
242
|
}
|
|
250
|
-
for (o.effects && (o.done || !o.count) && (e = [...o.effects, ...e], n += o.effects.length, delete o.effects), t = 0; t < n; t++)
|
|
243
|
+
for (o.effects && (o.done || !o.count) && (e = [...o.effects, ...e], n += o.effects.length, delete o.effects), t = 0; t < n; t++) F(e[t]);
|
|
251
244
|
}
|
|
252
|
-
function
|
|
245
|
+
function L(e, t) {
|
|
253
246
|
let n = v && v.running;
|
|
254
247
|
n ? e.tState = 0 : e.state = 0;
|
|
255
248
|
for (let r = 0; r < e.sources.length; r += 1) {
|
|
256
249
|
let i = e.sources[r];
|
|
257
250
|
if (i.sources) {
|
|
258
251
|
let e = n ? i.tState : i.state;
|
|
259
|
-
e === m ? i !== t && (!i.updatedAt || i.updatedAt < S) &&
|
|
252
|
+
e === m ? i !== t && (!i.updatedAt || i.updatedAt < S) && F(i) : e === h && L(i, t);
|
|
260
253
|
}
|
|
261
254
|
}
|
|
262
255
|
}
|
|
263
|
-
function
|
|
256
|
+
function R(e) {
|
|
264
257
|
let t = v && v.running;
|
|
265
258
|
for (let n = 0; n < e.observers.length; n += 1) {
|
|
266
259
|
let r = e.observers[n];
|
|
267
|
-
(t ? !r.tState : !r.state) && (t ? r.tState = h : r.state = h, r.pure ? b.push(r) : x.push(r), r.observers &&
|
|
260
|
+
(t ? !r.tState : !r.state) && (t ? r.tState = h : r.state = h, r.pure ? b.push(r) : x.push(r), r.observers && R(r));
|
|
268
261
|
}
|
|
269
262
|
}
|
|
270
|
-
function
|
|
263
|
+
function z(e) {
|
|
271
264
|
let t;
|
|
272
265
|
if (e.sources) for (; e.sources.length;) {
|
|
273
266
|
let t = e.sources.pop(), n = e.sourceSlots.pop(), r = t.observers;
|
|
@@ -277,12 +270,12 @@ function R(e) {
|
|
|
277
270
|
}
|
|
278
271
|
}
|
|
279
272
|
if (e.tOwned) {
|
|
280
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
273
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) z(e.tOwned[t]);
|
|
281
274
|
delete e.tOwned;
|
|
282
275
|
}
|
|
283
|
-
if (v && v.running && e.pure)
|
|
276
|
+
if (v && v.running && e.pure) B(e, !0);
|
|
284
277
|
else if (e.owned) {
|
|
285
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
278
|
+
for (t = e.owned.length - 1; t >= 0; t--) z(e.owned[t]);
|
|
286
279
|
e.owned = null;
|
|
287
280
|
}
|
|
288
281
|
if (e.cleanups) {
|
|
@@ -291,49 +284,34 @@ function R(e) {
|
|
|
291
284
|
}
|
|
292
285
|
v && v.running ? e.tState = 0 : e.state = 0;
|
|
293
286
|
}
|
|
294
|
-
function
|
|
295
|
-
if (t || (e.tState = 0, v.disposed.add(e)), e.owned) for (let t = 0; t < e.owned.length; t++)
|
|
287
|
+
function B(e, t) {
|
|
288
|
+
if (t || (e.tState = 0, v.disposed.add(e)), e.owned) for (let t = 0; t < e.owned.length; t++) B(e.owned[t]);
|
|
296
289
|
}
|
|
297
|
-
function
|
|
290
|
+
function ce(e) {
|
|
298
291
|
return e instanceof Error ? e : Error(typeof e == "string" ? e : "Unknown error", { cause: e });
|
|
299
292
|
}
|
|
300
|
-
function
|
|
293
|
+
function V(e, t, n) {
|
|
301
294
|
try {
|
|
302
295
|
for (let n of t) n(e);
|
|
303
296
|
} catch (e) {
|
|
304
|
-
|
|
297
|
+
H(e, n && n.owner || null);
|
|
305
298
|
}
|
|
306
299
|
}
|
|
307
|
-
function
|
|
308
|
-
let n = f && t && t.context && t.context[f], r =
|
|
300
|
+
function H(e, t = _) {
|
|
301
|
+
let n = f && t && t.context && t.context[f], r = ce(e);
|
|
309
302
|
if (!n) throw r;
|
|
310
303
|
x ? x.push({
|
|
311
304
|
fn() {
|
|
312
|
-
|
|
305
|
+
V(r, n, t);
|
|
313
306
|
},
|
|
314
307
|
state: m
|
|
315
|
-
}) :
|
|
316
|
-
}
|
|
317
|
-
function H(e) {
|
|
318
|
-
if (typeof e == "function" && !e.length) return H(e());
|
|
319
|
-
if (Array.isArray(e)) {
|
|
320
|
-
let t = [];
|
|
321
|
-
for (let n = 0; n < e.length; n++) {
|
|
322
|
-
let r = H(e[n]);
|
|
323
|
-
if (Array.isArray(r)) {
|
|
324
|
-
if (r.length < 32768) t.push.apply(t, r);
|
|
325
|
-
else for (let e = 0; e < r.length; e++) t.push(r[e]);
|
|
326
|
-
} else t.push(r);
|
|
327
|
-
}
|
|
328
|
-
return t;
|
|
329
|
-
}
|
|
330
|
-
return e;
|
|
308
|
+
}) : V(r, n, t);
|
|
331
309
|
}
|
|
332
310
|
var U = Symbol("fallback");
|
|
333
311
|
function W(e) {
|
|
334
312
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
335
313
|
}
|
|
336
|
-
function
|
|
314
|
+
function le(e, t, n = {}) {
|
|
337
315
|
let r = [], i = [], a = [], o = 0, s = t.length > 1 ? [] : null;
|
|
338
316
|
return O(() => W(a)), () => {
|
|
339
317
|
let c = e() || [], l = c.length, d, f;
|
|
@@ -362,7 +340,7 @@ function de(e, t, n = {}) {
|
|
|
362
340
|
}
|
|
363
341
|
};
|
|
364
342
|
}
|
|
365
|
-
function
|
|
343
|
+
function ue(e, t, n = {}) {
|
|
366
344
|
let r = [], i = [], a = [], o = [], s = 0, c;
|
|
367
345
|
return O(() => W(a)), () => {
|
|
368
346
|
let l = e() || [], d = l.length;
|
|
@@ -379,62 +357,36 @@ function fe(e, t, n = {}) {
|
|
|
379
357
|
}
|
|
380
358
|
};
|
|
381
359
|
}
|
|
382
|
-
function
|
|
360
|
+
function de(e, t) {
|
|
383
361
|
return D(() => e(t || {}));
|
|
384
362
|
}
|
|
385
|
-
var
|
|
386
|
-
function
|
|
363
|
+
var fe = (e) => `Stale read from <${e}>.`;
|
|
364
|
+
function pe(e) {
|
|
387
365
|
let t = "fallback" in e && { fallback: () => e.fallback };
|
|
388
|
-
return E(
|
|
366
|
+
return E(le(() => e.each, e.children, t || void 0));
|
|
389
367
|
}
|
|
390
|
-
function
|
|
368
|
+
function me(e) {
|
|
391
369
|
let t = "fallback" in e && { fallback: () => e.fallback };
|
|
392
|
-
return E(
|
|
370
|
+
return E(ue(() => e.each, e.children, t || void 0));
|
|
393
371
|
}
|
|
394
|
-
function
|
|
372
|
+
function he(e) {
|
|
395
373
|
let t = e.keyed, n = E(() => e.when, void 0, void 0), r = t ? n : E(n, void 0, { equals: (e, t) => !e == !t });
|
|
396
374
|
return E(() => {
|
|
397
375
|
let i = r();
|
|
398
376
|
if (i) {
|
|
399
377
|
let a = e.children;
|
|
400
378
|
return typeof a == "function" && a.length > 0 ? D(() => a(t ? i : () => {
|
|
401
|
-
if (!D(r)) throw
|
|
379
|
+
if (!D(r)) throw fe("Show");
|
|
402
380
|
return n();
|
|
403
381
|
})) : a;
|
|
404
382
|
}
|
|
405
383
|
return e.fallback;
|
|
406
384
|
}, void 0, void 0);
|
|
407
385
|
}
|
|
408
|
-
function _e(e) {
|
|
409
|
-
let t = ae(() => e.children), n = E(() => {
|
|
410
|
-
let e = t(), n = Array.isArray(e) ? e : [e], r = () => void 0;
|
|
411
|
-
for (let e = 0; e < n.length; e++) {
|
|
412
|
-
let t = e, i = n[e], a = r, o = E(() => a() ? void 0 : i.when, void 0, void 0), s = i.keyed ? o : E(o, void 0, { equals: (e, t) => !e == !t });
|
|
413
|
-
r = () => a() || (s() ? [
|
|
414
|
-
t,
|
|
415
|
-
o,
|
|
416
|
-
i
|
|
417
|
-
] : void 0);
|
|
418
|
-
}
|
|
419
|
-
return r;
|
|
420
|
-
});
|
|
421
|
-
return E(() => {
|
|
422
|
-
let t = n()();
|
|
423
|
-
if (!t) return e.fallback;
|
|
424
|
-
let [r, i, a] = t, o = a.children;
|
|
425
|
-
return typeof o == "function" && o.length > 0 ? D(() => o(a.keyed ? i() : () => {
|
|
426
|
-
if (D(n)()?.[0] !== r) throw G("Match");
|
|
427
|
-
return i();
|
|
428
|
-
})) : o;
|
|
429
|
-
}, void 0, void 0);
|
|
430
|
-
}
|
|
431
|
-
function ve(e) {
|
|
432
|
-
return e;
|
|
433
|
-
}
|
|
434
386
|
//#endregion
|
|
435
387
|
//#region ../../node_modules/.bun/solid-js@1.9.17/node_modules/solid-js/web/dist/web.js
|
|
436
|
-
var
|
|
437
|
-
function
|
|
388
|
+
var ge = (e) => E(() => e());
|
|
389
|
+
function _e(e, t, n) {
|
|
438
390
|
let r = n.length, i = t.length, a = r, o = 0, s = 0, c = t[i - 1].nextSibling, l = null;
|
|
439
391
|
for (; o < i || s < a;) if (t[o] === n[s]) o++, s++;
|
|
440
392
|
else {
|
|
@@ -466,43 +418,43 @@ function be(e, t, n) {
|
|
|
466
418
|
}
|
|
467
419
|
}
|
|
468
420
|
}
|
|
469
|
-
function
|
|
421
|
+
function ve(e, t, n, r = {}) {
|
|
470
422
|
let i;
|
|
471
423
|
return C((r) => {
|
|
472
|
-
i = r, t === document ? e() :
|
|
424
|
+
i = r, t === document ? e() : G(t, e(), !n && t.firstChild ? null : void 0, n);
|
|
473
425
|
}, r.owner), () => {
|
|
474
426
|
i(), t.textContent = "";
|
|
475
427
|
};
|
|
476
428
|
}
|
|
477
|
-
function
|
|
429
|
+
function ye(e, t, n, r) {
|
|
478
430
|
let i, a = () => {
|
|
479
431
|
let t = r ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
480
432
|
return t.innerHTML = e, n ? t.content.firstChild.firstChild : r ? t.firstChild : t.content.firstChild;
|
|
481
433
|
}, o = t ? () => D(() => document.importNode(i ||= a(), !0)) : () => (i ||= a()).cloneNode(!0);
|
|
482
434
|
return o.cloneNode = o, o;
|
|
483
435
|
}
|
|
484
|
-
function
|
|
485
|
-
|
|
436
|
+
function be(e, t, n) {
|
|
437
|
+
K(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
486
438
|
}
|
|
487
|
-
function
|
|
439
|
+
function xe(e, t, n, r) {
|
|
488
440
|
if (r) Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
489
441
|
else if (Array.isArray(n)) {
|
|
490
442
|
let r = n[0];
|
|
491
443
|
e.addEventListener(t, n[0] = (t) => r.call(e, n[1], t));
|
|
492
444
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
493
445
|
}
|
|
494
|
-
function
|
|
446
|
+
function Se(e, t, n) {
|
|
495
447
|
return D(() => e(t, n));
|
|
496
448
|
}
|
|
497
|
-
function
|
|
449
|
+
function G(e, t, n, r) {
|
|
498
450
|
if (n !== void 0 && !r && (r = []), typeof t != "function") return q(e, t, r, n);
|
|
499
451
|
T((r) => q(e, t(), r, n), r);
|
|
500
452
|
}
|
|
501
|
-
function
|
|
453
|
+
function K(e) {
|
|
502
454
|
return !!o.context && !o.done && (!e || e.isConnected);
|
|
503
455
|
}
|
|
504
456
|
function q(e, t, n, r, i) {
|
|
505
|
-
let a =
|
|
457
|
+
let a = K(e);
|
|
506
458
|
if (a) {
|
|
507
459
|
!n && (n = [...e.childNodes]);
|
|
508
460
|
let t = [];
|
|
@@ -543,7 +495,7 @@ function q(e, t, n, r, i) {
|
|
|
543
495
|
}
|
|
544
496
|
if (o.length === 0) {
|
|
545
497
|
if (n = Y(e, n, r), s) return n;
|
|
546
|
-
} else c ? n.length === 0 ?
|
|
498
|
+
} else c ? n.length === 0 ? Ce(e, o, r) : _e(e, n, o) : (n && Y(e), Ce(e, o));
|
|
547
499
|
n = o;
|
|
548
500
|
} else if (t.nodeType) {
|
|
549
501
|
if (a && t.parentNode) return n = s ? [t] : t;
|
|
@@ -575,7 +527,7 @@ function J(e, t, n, r) {
|
|
|
575
527
|
}
|
|
576
528
|
return i;
|
|
577
529
|
}
|
|
578
|
-
function
|
|
530
|
+
function Ce(e, t, n = null) {
|
|
579
531
|
for (let r = 0, i = t.length; r < i; r++) e.insertBefore(t[r], n);
|
|
580
532
|
}
|
|
581
533
|
function Y(e, t, n, r) {
|
|
@@ -595,11 +547,11 @@ function Y(e, t, n, r) {
|
|
|
595
547
|
}
|
|
596
548
|
//#endregion
|
|
597
549
|
//#region src/draw.ts
|
|
598
|
-
var
|
|
550
|
+
var we = (e) => `M ${e.map((e) => `${e.x} ${e.y}`).join(" L ")} Z`, Te = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
599
551
|
//#endregion
|
|
600
552
|
//#region src/calm.ts
|
|
601
|
-
function
|
|
602
|
-
let [e, t] = w(
|
|
553
|
+
function Ee() {
|
|
554
|
+
let [e, t] = w(Te());
|
|
603
555
|
if (typeof window < "u" && typeof window.matchMedia == "function") {
|
|
604
556
|
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), n = () => t(e.matches);
|
|
605
557
|
e.addEventListener("change", n), O(() => e.removeEventListener("change", n));
|
|
@@ -608,20 +560,20 @@ function Ae() {
|
|
|
608
560
|
}
|
|
609
561
|
//#endregion
|
|
610
562
|
//#region ../client/src/tokens.css?inline
|
|
611
|
-
var je = ":root{--color-primary:#6f9584;--color-secondary:#55524b;--color-neutral:#f7f5f0;--color-surface:var(--color-neutral);--color-on-surface:#2b2a27;--color-on-surface-muted:var(--color-secondary);--color-edge:var(--color-neutral);--color-error:#b3261e;--color-depth-0:#c9d6cf;--color-depth-1:#b7c9c0;--color-depth-2:#a5bcb1;--color-depth-3:#93afa2;--color-depth-4:#81a293;--color-depth-5:var(--color-primary);--color-cell-empty:#e4ebe6;--color-tree-sky:#f4f4f0;--color-tree-earth:#2a302c;--color-tree-topsoil:#1f2522;--color-tree-raised:#fff;--color-tree-ink:#1e2219;--color-tree-ink-soft:#565c50;--color-tree-rule:#cfd1c9;--color-tree-on-ink:#f7f6f0;--color-tree-ink-under:#e8eae2;--color-tree-ink-under-soft:#b4bbae;--color-tree-rule-under:#414945;--color-tree-raised-under:#343b37;--color-tree-alert:#a3441e;--color-tree-wood-0:#705f4a;--color-tree-wood-1:#9a7b3c;--color-tree-wood-2:#566c78;--color-tree-wood-3:#6f5873;--color-tree-wood-4:#5f7a57;--color-tree-wood-under-0:#b5a48e;--color-tree-wood-under-1:#d4b26a;--color-tree-wood-under-2:#97b2c0;--color-tree-wood-under-3:#b79bbe;--color-tree-wood-under-4:#9dbb94;--color-tree-leaf:#546d41;--color-tree-leaf-under:#9dbb94;--color-tree-olive:#3e3348;--color-tree-olive-under:#b7a9cf;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#1e22190d;--color-tree-lattice-earth:#e8eae20f;--font-body:400 15px/1.5 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-size:15px;--font-body-weight:400;--font-body-leading:1.5;--font-goal:600 15px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-size:15px;--font-goal-weight:600;--font-goal-leading:1.3;--font-label:400 14px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-size:14px;--font-label-weight:400;--font-label-leading:1.3;--font-excerpt:400 13px/1.4 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-size:13px;--font-excerpt-weight:400;--font-excerpt-leading:1.4;--font-tree-body:400 .8125rem/1.5 Roboto Mono Variable, Menlo, monospace;--font-tree-body-family:Roboto Mono Variable, Menlo, monospace;--font-tree-body-size:.8125rem;--font-tree-body-weight:400;--font-tree-body-leading:1.5;--font-tree-tight:400 .8125rem/1.1 Roboto Mono Variable, Menlo, monospace;--font-tree-tight-family:Roboto Mono Variable, Menlo, monospace;--font-tree-tight-size:.8125rem;--font-tree-tight-weight:400;--font-tree-tight-leading:1.1;--font-tree-small:400 .75rem Roboto Mono Variable, Menlo, monospace;--font-tree-small-family:Roboto Mono Variable, Menlo, monospace;--font-tree-small-size:.75rem;--font-tree-small-weight:400;--font-tree-lead:400 .875rem Roboto Mono Variable, Menlo, monospace;--font-tree-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-lead-size:.875rem;--font-tree-lead-weight:400;--font-tree-title:400 1rem Roboto Mono Variable, Menlo, monospace;--font-tree-title-family:Roboto Mono Variable, Menlo, monospace;--font-tree-title-size:1rem;--font-tree-title-weight:400;--font-tree-italic:400 .8125rem Victor Mono Variable, Menlo, monospace;--font-tree-italic-family:Victor Mono Variable, Menlo, monospace;--font-tree-italic-size:.8125rem;--font-tree-italic-weight:400;--font-tree-voice:600 1.125rem/1.2 Roboto Mono Variable, Menlo, monospace;--font-tree-voice-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-size:1.125rem;--font-tree-voice-weight:600;--font-tree-voice-leading:1.2;--font-tree-voice-lead:600 .9375rem Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-size:.9375rem;--font-tree-voice-lead-weight:600;--font-tree-label:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-label-family:Roboto Mono Variable, Menlo, monospace;--font-tree-label-size:12px;--font-tree-label-weight:400;--font-tree-heading:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-heading-family:Roboto Mono Variable, Menlo, monospace;--font-tree-heading-size:12px;--font-tree-heading-weight:400;--font-tree-section:400 14px Roboto Mono Variable, Menlo, monospace;--font-tree-section-family:Roboto Mono Variable, Menlo, monospace;--font-tree-section-size:14px;--font-tree-section-weight:400;--space-xs:4px;--space-sm:8px;--space-md:16px;--space-lg:24px;--space-xl:32px;--space-tree-1:.25rem;--space-tree-2:.5rem;--space-tree-3:.75rem;--space-tree-4:1rem;--space-tree-5:1.5rem;--space-tree-6:2.5rem;--space-tree-7:4rem;--radius-tree:.375rem;--canvas-background-color:var(--color-surface);--canvas-text-color:var(--color-on-surface);--canvas-typography:var(--font-body);--canvas-padding:var(--space-md);--goal-background-color:var(--color-surface);--goal-text-color:var(--color-on-surface);--goal-typography:var(--font-goal);--goal-padding:var(--space-sm);--goal-base-edge-width:225px;--corner-text-color:var(--color-on-surface);--corner-typography:var(--font-label);--corner-padding:var(--space-sm);--corner-excerpt-text-color:var(--color-on-surface-muted);--corner-excerpt-typography:var(--font-excerpt);--depth-0-background-color:var(--color-depth-0);--depth-1-background-color:var(--color-depth-1);--depth-2-background-color:var(--color-depth-2);--depth-3-background-color:var(--color-depth-3);--depth-4-background-color:var(--color-depth-4);--depth-5-background-color:var(--color-depth-5);--cell-empty-background-color:var(--color-cell-empty);--triangle-edge-background-color:var(--color-edge);--triangle-edge-width:1.5px;--selection-ring-background-color:var(--color-on-surface-muted);--selection-ring-width:1.5px;--hex-width:320px;--breadcrumb-background-color:var(--color-surface);--breadcrumb-text-color:var(--color-on-surface-muted);--breadcrumb-typography:var(--font-body);--breadcrumb-padding:var(--space-md);--breadcrumb-error-background-color:var(--color-surface);--breadcrumb-error-text-color:var(--color-error);--tree-column-width:26rem;--tree-measure-width:34rem;--tree-drawing-width:790px;--tree-sheet-height:70dvh;--tree-sheet-small-height:9rem;--tree-swatch-width:4rem;--tree-swatch-height:1.5rem;--tree-todo-height:26px;--tree-select-height:2rem;--tree-target-size:2.75rem;--tree-icon-target-size:2.5rem;--tree-row-icon-size:1.5rem;--tree-rootrow-box-size:40px;--tree-marker-size:.4rem;--tree-dot-size:.5rem;--tree-legend-inset-width:240px;--tree-legend-inset-narrow-width:128px;--tree-root-name-width:280px;--tree-count-width:104px;--tree-count-narrow-width:44px;--tree-comb-over-width:26px;--tree-topsoil-height:10px;--tree-rule-width:1px;--tree-rule-thick-width:3px;--tree-rule-thicker-width:6px;--tree-ground-line-width:1.5px;--tree-sprig-width:1.4px;--tree-halo-width:4px;--tree-focus-width:2px;--tree-focus-offset-width:2px;--tree-paper-background-color:var(--color-tree-sky);--tree-paper-text-color:var(--color-tree-ink);--tree-paper-soft-background-color:var(--color-tree-sky);--tree-paper-soft-text-color:var(--color-tree-ink-soft);--tree-box-background-color:var(--color-tree-raised);--tree-box-text-color:var(--color-tree-ink);--tree-toast-background-color:var(--color-tree-ink);--tree-toast-text-color:var(--color-tree-on-ink);--tree-alert-background-color:var(--color-tree-sky);--tree-alert-text-color:var(--color-tree-alert);--tree-ground-background-color:var(--color-tree-earth);--tree-ground-text-color:var(--color-tree-ink-under);--tree-ground-soft-background-color:var(--color-tree-earth);--tree-ground-soft-text-color:var(--color-tree-ink-under-soft);--tree-ground-box-background-color:var(--color-tree-raised-under);--tree-ground-box-text-color:var(--color-tree-ink-under);--tree-ground-topsoil-background-color:var(--color-tree-topsoil);--tree-ground-topsoil-text-color:var(--color-tree-ink-under);--tree-wood-0-background-color:var(--color-tree-sky);--tree-wood-0-text-color:var(--color-tree-wood-0);--tree-wood-1-background-color:var(--color-tree-sky);--tree-wood-1-text-color:var(--color-tree-wood-1);--tree-wood-2-background-color:var(--color-tree-sky);--tree-wood-2-text-color:var(--color-tree-wood-2);--tree-wood-3-background-color:var(--color-tree-sky);--tree-wood-3-text-color:var(--color-tree-wood-3);--tree-wood-4-background-color:var(--color-tree-sky);--tree-wood-4-text-color:var(--color-tree-wood-4);--tree-wood-under-0-background-color:var(--color-tree-earth);--tree-wood-under-0-text-color:var(--color-tree-wood-under-0);--tree-wood-under-1-background-color:var(--color-tree-earth);--tree-wood-under-1-text-color:var(--color-tree-wood-under-1);--tree-wood-under-2-background-color:var(--color-tree-earth);--tree-wood-under-2-text-color:var(--color-tree-wood-under-2);--tree-wood-under-3-background-color:var(--color-tree-earth);--tree-wood-under-3-text-color:var(--color-tree-wood-under-3);--tree-wood-under-4-background-color:var(--color-tree-earth);--tree-wood-under-4-text-color:var(--color-tree-wood-under-4);--tree-leaf-background-color:var(--color-tree-sky);--tree-leaf-text-color:var(--color-tree-leaf);--tree-leaf-under-background-color:var(--color-tree-earth);--tree-leaf-under-text-color:var(--color-tree-leaf-under);--tree-olive-background-color:var(--color-tree-sky);--tree-olive-text-color:var(--color-tree-olive);--tree-olive-under-background-color:var(--color-tree-earth);--tree-olive-under-text-color:var(--color-tree-olive-under);--tree-rule-line-background-color:var(--color-tree-rule);--tree-rule-under-background-color:var(--color-tree-rule-under);--tree-toast-shadow-background-color:var(--color-tree-shadow);--tree-lattice-sky-background-color:var(--color-tree-lattice-sky);--tree-lattice-earth-background-color:var(--color-tree-lattice-earth);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--color-surface:#1b1c1e;--color-on-surface:#e6e4df;--color-on-surface-muted:#aeaba3;--color-edge:#1b1c1e;--color-error:#f2b8b5;--color-depth-0:#2e3a35;--color-depth-1:#34433c;--color-depth-2:#3a4c44;--color-depth-3:#40554b;--color-depth-4:#465e53;--color-depth-5:#4c675a;--color-cell-empty:#232a27;--color-tree-sky:#1a1e21;--color-tree-earth:#0c0f0e;--color-tree-topsoil:#060807;--color-tree-raised:#22272a;--color-tree-ink:#e6e7de;--color-tree-ink-soft:#a6ab9f;--color-tree-rule:#353a38;--color-tree-on-ink:#131513;--color-tree-ink-under:#e6e7de;--color-tree-ink-under-soft:#a6ab9f;--color-tree-rule-under:#2a302d;--color-tree-raised-under:#1e2224;--color-tree-alert:#f09a74;--color-tree-wood-0:#a3907b;--color-tree-wood-1:#c9a65c;--color-tree-wood-2:#8aa5b3;--color-tree-wood-3:#a98db0;--color-tree-wood-4:#8fae86;--color-tree-wood-under-0:#a3907b;--color-tree-wood-under-1:#c9a65c;--color-tree-wood-under-2:#8aa5b3;--color-tree-wood-under-3:#a98db0;--color-tree-wood-under-4:#8fae86;--color-tree-leaf:#8aa373;--color-tree-leaf-under:#8aa373;--color-tree-olive:#9b8db5;--color-tree-olive-under:#9b8db5;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#e6e7de0d;--color-tree-lattice-earth:#e6e7de0d;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}", Me = ":host{--sky:var(--color-tree-sky);vertical-align:middle;display:inline-block}:host([hidden]){display:none}svg{display:block;overflow:visible}", Ne = typeof HTMLElement > "u" ? class {} : HTMLElement, Pe = je.replaceAll(":root", ":host");
|
|
612
|
-
function
|
|
563
|
+
var De = ":root{--color-primary:#6f9584;--color-secondary:#55524b;--color-neutral:#f7f5f0;--color-surface:var(--color-neutral);--color-on-surface:#2b2a27;--color-on-surface-muted:var(--color-secondary);--color-edge:var(--color-neutral);--color-error:#b3261e;--color-depth-0:#c9d6cf;--color-depth-1:#b7c9c0;--color-depth-2:#a5bcb1;--color-depth-3:#93afa2;--color-depth-4:#81a293;--color-depth-5:var(--color-primary);--color-cell-empty:#e4ebe6;--color-tree-sky:#f4f4f0;--color-tree-earth:#2a302c;--color-tree-topsoil:#1f2522;--color-tree-raised:#fff;--color-tree-ink:#1e2219;--color-tree-ink-soft:#565c50;--color-tree-rule:#cfd1c9;--color-tree-on-ink:#f7f6f0;--color-tree-ink-under:#e8eae2;--color-tree-ink-under-soft:#b4bbae;--color-tree-rule-under:#414945;--color-tree-raised-under:#343b37;--color-tree-alert:#a3441e;--color-tree-wood-0:#705f4a;--color-tree-wood-1:#9a7b3c;--color-tree-wood-2:#566c78;--color-tree-wood-3:#6f5873;--color-tree-wood-4:#5f7a57;--color-tree-wood-under-0:#b5a48e;--color-tree-wood-under-1:#d4b26a;--color-tree-wood-under-2:#97b2c0;--color-tree-wood-under-3:#b79bbe;--color-tree-wood-under-4:#9dbb94;--color-tree-leaf:#546d41;--color-tree-leaf-under:#9dbb94;--color-tree-olive:#3e3348;--color-tree-olive-under:#b7a9cf;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#1e22190d;--color-tree-lattice-earth:#e8eae20f;--font-body:400 15px/1.5 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-size:15px;--font-body-weight:400;--font-body-leading:1.5;--font-goal:600 15px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-size:15px;--font-goal-weight:600;--font-goal-leading:1.3;--font-label:400 14px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-size:14px;--font-label-weight:400;--font-label-leading:1.3;--font-excerpt:400 13px/1.4 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-size:13px;--font-excerpt-weight:400;--font-excerpt-leading:1.4;--font-tree-body:400 .8125rem/1.5 Roboto Mono Variable, Menlo, monospace;--font-tree-body-family:Roboto Mono Variable, Menlo, monospace;--font-tree-body-size:.8125rem;--font-tree-body-weight:400;--font-tree-body-leading:1.5;--font-tree-tight:400 .8125rem/1.1 Roboto Mono Variable, Menlo, monospace;--font-tree-tight-family:Roboto Mono Variable, Menlo, monospace;--font-tree-tight-size:.8125rem;--font-tree-tight-weight:400;--font-tree-tight-leading:1.1;--font-tree-small:400 .75rem Roboto Mono Variable, Menlo, monospace;--font-tree-small-family:Roboto Mono Variable, Menlo, monospace;--font-tree-small-size:.75rem;--font-tree-small-weight:400;--font-tree-lead:400 .875rem Roboto Mono Variable, Menlo, monospace;--font-tree-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-lead-size:.875rem;--font-tree-lead-weight:400;--font-tree-title:400 1rem Roboto Mono Variable, Menlo, monospace;--font-tree-title-family:Roboto Mono Variable, Menlo, monospace;--font-tree-title-size:1rem;--font-tree-title-weight:400;--font-tree-italic:400 .8125rem Victor Mono Variable, Menlo, monospace;--font-tree-italic-family:Victor Mono Variable, Menlo, monospace;--font-tree-italic-size:.8125rem;--font-tree-italic-weight:400;--font-tree-voice:600 1.125rem/1.2 Roboto Mono Variable, Menlo, monospace;--font-tree-voice-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-size:1.125rem;--font-tree-voice-weight:600;--font-tree-voice-leading:1.2;--font-tree-voice-lead:600 .9375rem Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-size:.9375rem;--font-tree-voice-lead-weight:600;--font-tree-label:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-label-family:Roboto Mono Variable, Menlo, monospace;--font-tree-label-size:12px;--font-tree-label-weight:400;--font-tree-heading:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-heading-family:Roboto Mono Variable, Menlo, monospace;--font-tree-heading-size:12px;--font-tree-heading-weight:400;--font-tree-section:400 14px Roboto Mono Variable, Menlo, monospace;--font-tree-section-family:Roboto Mono Variable, Menlo, monospace;--font-tree-section-size:14px;--font-tree-section-weight:400;--space-xs:4px;--space-sm:8px;--space-md:16px;--space-lg:24px;--space-xl:32px;--space-tree-1:.25rem;--space-tree-2:.5rem;--space-tree-3:.75rem;--space-tree-4:1rem;--space-tree-5:1.5rem;--space-tree-6:2.5rem;--space-tree-7:4rem;--radius-tree:.375rem;--canvas-background-color:var(--color-surface);--canvas-text-color:var(--color-on-surface);--canvas-typography:var(--font-body);--canvas-padding:var(--space-md);--goal-background-color:var(--color-surface);--goal-text-color:var(--color-on-surface);--goal-typography:var(--font-goal);--goal-padding:var(--space-sm);--goal-base-edge-width:225px;--corner-text-color:var(--color-on-surface);--corner-typography:var(--font-label);--corner-padding:var(--space-sm);--corner-excerpt-text-color:var(--color-on-surface-muted);--corner-excerpt-typography:var(--font-excerpt);--depth-0-background-color:var(--color-depth-0);--depth-1-background-color:var(--color-depth-1);--depth-2-background-color:var(--color-depth-2);--depth-3-background-color:var(--color-depth-3);--depth-4-background-color:var(--color-depth-4);--depth-5-background-color:var(--color-depth-5);--cell-empty-background-color:var(--color-cell-empty);--triangle-edge-background-color:var(--color-edge);--triangle-edge-width:1.5px;--selection-ring-background-color:var(--color-on-surface-muted);--selection-ring-width:1.5px;--hex-width:320px;--breadcrumb-background-color:var(--color-surface);--breadcrumb-text-color:var(--color-on-surface-muted);--breadcrumb-typography:var(--font-body);--breadcrumb-padding:var(--space-md);--breadcrumb-error-background-color:var(--color-surface);--breadcrumb-error-text-color:var(--color-error);--tree-column-width:26rem;--tree-measure-width:34rem;--tree-drawing-width:790px;--tree-sheet-height:70dvh;--tree-sheet-small-height:9rem;--tree-swatch-width:4rem;--tree-swatch-height:1.5rem;--tree-todo-height:26px;--tree-select-height:2rem;--tree-target-size:2.75rem;--tree-icon-target-size:2.5rem;--tree-row-icon-size:1.5rem;--tree-rootrow-box-size:40px;--tree-marker-size:.4rem;--tree-dot-size:.5rem;--tree-legend-inset-width:240px;--tree-legend-inset-narrow-width:128px;--tree-root-name-width:280px;--tree-count-width:104px;--tree-count-narrow-width:44px;--tree-comb-over-width:26px;--tree-topsoil-height:10px;--tree-rule-width:1px;--tree-rule-thick-width:3px;--tree-rule-thicker-width:6px;--tree-ground-line-width:1.5px;--tree-sprig-width:1.4px;--tree-halo-width:4px;--tree-focus-width:2px;--tree-focus-offset-width:2px;--tree-paper-background-color:var(--color-tree-sky);--tree-paper-text-color:var(--color-tree-ink);--tree-paper-soft-background-color:var(--color-tree-sky);--tree-paper-soft-text-color:var(--color-tree-ink-soft);--tree-box-background-color:var(--color-tree-raised);--tree-box-text-color:var(--color-tree-ink);--tree-toast-background-color:var(--color-tree-ink);--tree-toast-text-color:var(--color-tree-on-ink);--tree-alert-background-color:var(--color-tree-sky);--tree-alert-text-color:var(--color-tree-alert);--tree-ground-background-color:var(--color-tree-earth);--tree-ground-text-color:var(--color-tree-ink-under);--tree-ground-soft-background-color:var(--color-tree-earth);--tree-ground-soft-text-color:var(--color-tree-ink-under-soft);--tree-ground-box-background-color:var(--color-tree-raised-under);--tree-ground-box-text-color:var(--color-tree-ink-under);--tree-ground-topsoil-background-color:var(--color-tree-topsoil);--tree-ground-topsoil-text-color:var(--color-tree-ink-under);--tree-wood-0-background-color:var(--color-tree-sky);--tree-wood-0-text-color:var(--color-tree-wood-0);--tree-wood-1-background-color:var(--color-tree-sky);--tree-wood-1-text-color:var(--color-tree-wood-1);--tree-wood-2-background-color:var(--color-tree-sky);--tree-wood-2-text-color:var(--color-tree-wood-2);--tree-wood-3-background-color:var(--color-tree-sky);--tree-wood-3-text-color:var(--color-tree-wood-3);--tree-wood-4-background-color:var(--color-tree-sky);--tree-wood-4-text-color:var(--color-tree-wood-4);--tree-wood-under-0-background-color:var(--color-tree-earth);--tree-wood-under-0-text-color:var(--color-tree-wood-under-0);--tree-wood-under-1-background-color:var(--color-tree-earth);--tree-wood-under-1-text-color:var(--color-tree-wood-under-1);--tree-wood-under-2-background-color:var(--color-tree-earth);--tree-wood-under-2-text-color:var(--color-tree-wood-under-2);--tree-wood-under-3-background-color:var(--color-tree-earth);--tree-wood-under-3-text-color:var(--color-tree-wood-under-3);--tree-wood-under-4-background-color:var(--color-tree-earth);--tree-wood-under-4-text-color:var(--color-tree-wood-under-4);--tree-leaf-background-color:var(--color-tree-sky);--tree-leaf-text-color:var(--color-tree-leaf);--tree-leaf-under-background-color:var(--color-tree-earth);--tree-leaf-under-text-color:var(--color-tree-leaf-under);--tree-olive-background-color:var(--color-tree-sky);--tree-olive-text-color:var(--color-tree-olive);--tree-olive-under-background-color:var(--color-tree-earth);--tree-olive-under-text-color:var(--color-tree-olive-under);--tree-rule-line-background-color:var(--color-tree-rule);--tree-rule-under-background-color:var(--color-tree-rule-under);--tree-toast-shadow-background-color:var(--color-tree-shadow);--tree-lattice-sky-background-color:var(--color-tree-lattice-sky);--tree-lattice-earth-background-color:var(--color-tree-lattice-earth);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--color-surface:#1b1c1e;--color-on-surface:#e6e4df;--color-on-surface-muted:#aeaba3;--color-edge:#1b1c1e;--color-error:#f2b8b5;--color-depth-0:#2e3a35;--color-depth-1:#34433c;--color-depth-2:#3a4c44;--color-depth-3:#40554b;--color-depth-4:#465e53;--color-depth-5:#4c675a;--color-cell-empty:#232a27;--color-tree-sky:#1a1e21;--color-tree-earth:#0c0f0e;--color-tree-topsoil:#060807;--color-tree-raised:#22272a;--color-tree-ink:#e6e7de;--color-tree-ink-soft:#a6ab9f;--color-tree-rule:#353a38;--color-tree-on-ink:#131513;--color-tree-ink-under:#e6e7de;--color-tree-ink-under-soft:#a6ab9f;--color-tree-rule-under:#2a302d;--color-tree-raised-under:#1e2224;--color-tree-alert:#f09a74;--color-tree-wood-0:#a3907b;--color-tree-wood-1:#c9a65c;--color-tree-wood-2:#8aa5b3;--color-tree-wood-3:#a98db0;--color-tree-wood-4:#8fae86;--color-tree-wood-under-0:#a3907b;--color-tree-wood-under-1:#c9a65c;--color-tree-wood-under-2:#8aa5b3;--color-tree-wood-under-3:#a98db0;--color-tree-wood-under-4:#8fae86;--color-tree-leaf:#8aa373;--color-tree-leaf-under:#8aa373;--color-tree-olive:#9b8db5;--color-tree-olive-under:#9b8db5;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#e6e7de0d;--color-tree-lattice-earth:#e6e7de0d;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}", Oe = ":host{--sky:var(--color-tree-sky);vertical-align:middle;display:inline-block}:host([hidden]){display:none}svg{display:block;overflow:visible}", ke = typeof HTMLElement > "u" ? class {} : HTMLElement, Ae = De.replaceAll(":root", ":host");
|
|
564
|
+
function je(e) {
|
|
613
565
|
let t;
|
|
614
|
-
return () => (t || (t = new CSSStyleSheet(), t.replaceSync(`${
|
|
566
|
+
return () => (t || (t = new CSSStyleSheet(), t.replaceSync(`${Ae}\n${Oe}\n${e}`)), t);
|
|
615
567
|
}
|
|
616
|
-
function
|
|
568
|
+
function Me(e, t, n = e) {
|
|
617
569
|
if (typeof customElements > "u") return;
|
|
618
570
|
let r = customElements.get(n);
|
|
619
571
|
r ? r !== t && !(r.prototype instanceof t) && console.warn(`<${n}> is already defined by another element; define ${e} as another name`) : customElements.define(n, n === e ? t : class extends t {});
|
|
620
572
|
}
|
|
621
|
-
var
|
|
573
|
+
var Ne = (e, t) => {
|
|
622
574
|
let n = typeof e == "number" ? e : Number.parseFloat(String(e ?? ""));
|
|
623
575
|
return Number.isFinite(n) ? n : t;
|
|
624
|
-
},
|
|
576
|
+
}, Pe = (e) => typeof e == "boolean" ? e : e != null && e !== "false", Fe = class extends ke {
|
|
625
577
|
dispose;
|
|
626
578
|
connectedCallback() {
|
|
627
579
|
for (let e of this.inputs) if (Object.hasOwn(this, e)) {
|
|
@@ -630,7 +582,7 @@ var Le = (e, t) => {
|
|
|
630
582
|
}
|
|
631
583
|
if (this.dispose) return;
|
|
632
584
|
let e = this.shadowRoot ?? this.attachShadow({ mode: "open" });
|
|
633
|
-
e.adoptedStyleSheets = [this.sheet()], this.dispose =
|
|
585
|
+
e.adoptedStyleSheets = [this.sheet()], this.dispose = ve(() => this.draw(), e);
|
|
634
586
|
}
|
|
635
587
|
disconnectedCallback() {
|
|
636
588
|
queueMicrotask(() => {
|
|
@@ -645,7 +597,7 @@ var Le = (e, t) => {
|
|
|
645
597
|
cancelable: n
|
|
646
598
|
}));
|
|
647
599
|
}
|
|
648
|
-
},
|
|
600
|
+
}, Ie = ".shape .flat-top{fill:color-mix(in srgb, var(--wood) 28%, var(--sky));stroke:color-mix(in srgb, var(--wood) 55%, var(--sky));stroke-width:var(--tree-rule-width);stroke-linejoin:round;vector-effect:non-scaling-stroke}.shape .flat-top[data-tone=\"5\"],.shape .flat-top[data-tone=\"6\"]{fill:var(--wood)}.shape .flat-top[data-tone=\"7\"]{fill:var(--color-tree-raised)}.shape .flat-shade{fill:color-mix(in srgb, var(--wood) 70%, var(--sky))}.shape .flat-shadow{fill:var(--wood)}.shape .seams{fill:none;stroke:color-mix(in srgb, var(--color-tree-ink) 18%, transparent);stroke-width:var(--tree-rule-width);stroke-linecap:round;vector-effect:non-scaling-stroke}:host([pressable]){pointer-events:none;outline:none}:host([pressable]) .faces path{pointer-events:visiblePainted;cursor:pointer}:host([pressable][aria-disabled=true]) .faces path{cursor:default}:host([pressable][aria-disabled=true]) .shape{opacity:.45}.ring{visibility:hidden}.ring line{stroke:var(--color-tree-ink);stroke-width:var(--tree-rule-thick-width);stroke-linecap:round;vector-effect:non-scaling-stroke}:host([aria-pressed=true]) .ring{visibility:visible}:host([aria-pressed=true]) .ring line{stroke:var(--color-tree-ink-soft);stroke-width:var(--tree-rule-width)}:host(:focus-visible) .ring{visibility:visible}:host(:focus-visible) .ring line{stroke:var(--color-tree-ink);stroke-width:var(--tree-rule-thick-width)}", Le = 8, X = (e, t, n) => ({
|
|
649
601
|
kind: "cell",
|
|
650
602
|
at: {
|
|
651
603
|
q: e,
|
|
@@ -660,7 +612,7 @@ var Le = (e, t) => {
|
|
|
660
612
|
k: n
|
|
661
613
|
},
|
|
662
614
|
tone: r
|
|
663
|
-
}),
|
|
615
|
+
}), Re = [
|
|
664
616
|
{
|
|
665
617
|
q: 1,
|
|
666
618
|
r: 0
|
|
@@ -693,7 +645,7 @@ var Le = (e, t) => {
|
|
|
693
645
|
X(0, 0, e),
|
|
694
646
|
X(1, 0, e)
|
|
695
647
|
],
|
|
696
|
-
flower: (e) => [X(0, 0, e), ...
|
|
648
|
+
flower: (e) => [X(0, 0, e), ...Re.map((t) => X(t.q, t.r, e))],
|
|
697
649
|
triangle: (e) => [Z(0, 0, 0, e)],
|
|
698
650
|
diamond: (e) => [Z(0, 0, 0, e), Z(0, 0, 1, e)],
|
|
699
651
|
trapezoid: (e) => [
|
|
@@ -711,23 +663,23 @@ var Le = (e, t) => {
|
|
|
711
663
|
q: 0,
|
|
712
664
|
r: 0
|
|
713
665
|
}).map((e) => Z(e.i, e.j, e.k, t))
|
|
714
|
-
},
|
|
715
|
-
|
|
666
|
+
}, ze = Object.keys(Q), Be = (e) => Math.min(7, Math.max(0, Math.round(Number.isFinite(e) ? e : 0))), $ = (e) => typeof e == "number" && Number.isInteger(e), Ve = !1, He = (e) => {
|
|
667
|
+
Ve || (Ve = !0, console.warn(`<lattice-shape> parts is not JSON (${e.slice(0, 40)}): set parts as a property, and define the elements before the page first draws them`));
|
|
716
668
|
};
|
|
717
|
-
function
|
|
669
|
+
function Ue(e, t) {
|
|
718
670
|
let n = e;
|
|
719
671
|
if (typeof n == "string") try {
|
|
720
672
|
n = JSON.parse(n);
|
|
721
673
|
} catch {
|
|
722
|
-
return
|
|
674
|
+
return He(n), [];
|
|
723
675
|
}
|
|
724
676
|
return Array.isArray(n) ? n.flatMap((e) => {
|
|
725
677
|
if (typeof e != "object" || !e) return [];
|
|
726
|
-
let { kind: n, at: r, tone: i } = e, a =
|
|
678
|
+
let { kind: n, at: r, tone: i } = e, a = Be(typeof i == "number" ? i : t);
|
|
727
679
|
return n === "cell" && r && $(r.q) && $(r.r) ? [X(r.q, r.r, a)] : n === "tri" && r && $(r.i) && $(r.j) && (r.k === 0 || r.k === 1) ? [Z(r.i, r.j, r.k, a)] : [];
|
|
728
680
|
}) : [];
|
|
729
681
|
}
|
|
730
|
-
function
|
|
682
|
+
function We(e, o, s = 2) {
|
|
731
683
|
if (e.length === 0) return {
|
|
732
684
|
faces: [],
|
|
733
685
|
seams: "",
|
|
@@ -751,6 +703,6 @@ function Je(e, o, s = 2) {
|
|
|
751
703
|
}
|
|
752
704
|
//#endregion
|
|
753
705
|
//#region src/elements/woods.css?inline
|
|
754
|
-
var
|
|
706
|
+
var Ge = ".woods [data-tone]{--wood:var(--color-tree-wood-0)}.woods [data-tone=\"1\"]{--wood:var(--color-tree-wood-1)}.woods [data-tone=\"2\"]{--wood:var(--color-tree-wood-2)}.woods [data-tone=\"3\"]{--wood:var(--color-tree-wood-3)}.woods [data-tone=\"4\"]{--wood:var(--color-tree-wood-4)}.woods [data-tone=\"5\"],.woods [data-tone=\"7\"]{--wood:var(--color-tree-olive)}";
|
|
755
707
|
//#endregion
|
|
756
|
-
export {
|
|
708
|
+
export { te as A, me as C, E as D, ee as E, D as M, T as O, pe as S, de as T, G as _, We as a, ye as b, Ie as c, Pe as d, Ne as f, xe as g, we as h, Le as i, O as j, w as k, Fe as l, Ee as m, Q as n, Ue as o, je as p, ze as r, Be as s, Ge as t, Me as u, ge as v, he as w, Se as x, be as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harmonics/lattice-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The Harmonics tree's look as Custom Elements: a lattice face, the hexagon sky, raised lattice shapes, a shears cut gesture, two marks and a board of pieces to build on. Any page, any framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/react.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
LatticeIcon,
|
|
14
14
|
LatticeShape,
|
|
15
15
|
Part,
|
|
16
|
+
PressDetail,
|
|
16
17
|
ShapeName,
|
|
17
18
|
ShearsPadElement,
|
|
18
19
|
StrokeDetail,
|
|
@@ -47,6 +48,10 @@ declare module "react" {
|
|
|
47
48
|
lift?: number;
|
|
48
49
|
scale?: number;
|
|
49
50
|
label?: string;
|
|
51
|
+
pressable?: boolean;
|
|
52
|
+
pressed?: boolean;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
onpress?: (event: CustomEvent<PressDetail>) => void;
|
|
50
55
|
};
|
|
51
56
|
"shears-pad": Base<ShearsPadElement> & {
|
|
52
57
|
disabled?: boolean;
|