@ixfx/components 0.5.19 → 0.5.20
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/bundle/index.d.ts +95 -115
- package/bundle/index.d.ts.map +1 -1
- package/bundle/index.js +484 -325
- package/bundle/index.js.map +1 -1
- package/dist/ac-text.d.ts +7 -12
- package/dist/ac-text.d.ts.map +1 -1
- package/dist/ac-text.js +5 -4
- package/dist/ac-text.js.map +1 -1
- package/dist/{button-CphdEaZd.js → button-pcDaCemT.js} +2 -2
- package/dist/{button-CphdEaZd.js.map → button-pcDaCemT.js.map} +1 -1
- package/dist/button.d.ts +3 -2
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +1 -1
- package/dist/checkbox.d.ts +1 -0
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/checkbox.js.map +1 -1
- package/dist/{colour-picker-37NyVenk.js → colour-picker-D43Q96r0.js} +28 -15
- package/dist/colour-picker-D43Q96r0.js.map +1 -0
- package/dist/colour-picker.d.ts +1 -1
- package/dist/colour-picker.js +1 -1
- package/dist/{crumb-navigation-BrB0r14u.js → crumb-navigation-Pif-kupA.js} +10 -9
- package/dist/{crumb-navigation-BrB0r14u.js.map → crumb-navigation-Pif-kupA.js.map} +1 -1
- package/dist/crumbs.d.ts +2 -4
- package/dist/crumbs.d.ts.map +1 -1
- package/dist/crumbs.js +1 -1
- package/dist/data-display.d.ts +2 -1
- package/dist/data-display.d.ts.map +1 -1
- package/dist/data-display.js +23 -25
- package/dist/data-display.js.map +1 -1
- package/dist/{decorate-VRK8rslU.js → decorate-DdjvVHS-.js} +2 -2
- package/dist/{decorate-VRK8rslU.js.map → decorate-DdjvVHS-.js.map} +1 -1
- package/dist/editable-label.d.ts +2 -1
- package/dist/editable-label.d.ts.map +1 -1
- package/dist/editable-label.js +2 -2
- package/dist/editable-label.js.map +1 -1
- package/dist/fallbacks-DEE1nCTt.js +406 -0
- package/dist/fallbacks-DEE1nCTt.js.map +1 -0
- package/dist/{hex-editor-Bk6rxhfg.js → hex-editor-B-UI4OZu.js} +8 -6
- package/dist/{hex-editor-Bk6rxhfg.js.map → hex-editor-B-UI4OZu.js.map} +1 -1
- package/dist/{hex-editor-Caq8vNQk.d.ts → hex-editor-CMIxtNgT.d.ts} +3 -2
- package/dist/hex-editor-CMIxtNgT.d.ts.map +1 -0
- package/dist/hex.d.ts +1 -1
- package/dist/hex.js +1 -1
- package/dist/highlight-B-eQrhhb.js.map +1 -1
- package/dist/{icon-BUwP1CZ1.d.ts → icon-Bd5BiU4b.d.ts} +4 -3
- package/dist/icon-Bd5BiU4b.d.ts.map +1 -0
- package/dist/{icon-DG9Lm3LT.js → icon-CK14NUcE.js} +5 -7
- package/dist/{icon-DG9Lm3LT.js.map → icon-CK14NUcE.js.map} +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -1
- package/dist/{incr-search-2pz21xtR.js → incr-search-CeERfijK.js} +6 -9
- package/dist/{incr-search-2pz21xtR.js.map → incr-search-CeERfijK.js.map} +1 -1
- package/dist/incr-search.d.ts +1 -1
- package/dist/incr-search.js +1 -1
- package/dist/{index-D9u_Q7-b.d.ts → index-BslNaMLo.d.ts} +3 -3
- package/dist/index-BslNaMLo.d.ts.map +1 -0
- package/dist/{index-DkhBGHgF.d.ts → index-Cdmrn0SZ.d.ts} +11 -11
- package/dist/index-Cdmrn0SZ.d.ts.map +1 -0
- package/dist/{index-BUB5SICW.d.ts → index-CkMIKEWp.d.ts} +4 -3
- package/dist/index-CkMIKEWp.d.ts.map +1 -0
- package/dist/{index-RqMh1i-O.d.ts → index-D87kRcEs.d.ts} +1 -2
- package/dist/index-D87kRcEs.d.ts.map +1 -0
- package/dist/{index-BKAlRgbq.d.ts → index-DrKRD8_a.d.ts} +7 -4
- package/dist/index-DrKRD8_a.d.ts.map +1 -0
- package/dist/{index-BeuCXtiO.d.ts → index-tX6fKF8m.d.ts} +3 -3
- package/dist/index-tX6fKF8m.d.ts.map +1 -0
- package/dist/index.d.ts +48 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +126 -118
- package/dist/index.js.map +1 -1
- package/dist/interaction-_Y2qO3QI.js +1 -0
- package/dist/{labelled-input-base-hoKGwyKT.js → labelled-input-base-9K_w3oLj.js} +2 -2
- package/dist/{labelled-input-base-hoKGwyKT.js.map → labelled-input-base-9K_w3oLj.js.map} +1 -1
- package/dist/{labelled-input-base-Dp_9KP0G.d.ts → labelled-input-base-ORb1rGq6.d.ts} +3 -2
- package/dist/labelled-input-base-ORb1rGq6.d.ts.map +1 -0
- package/dist/labelled-radial-input.d.ts +5 -4
- package/dist/labelled-radial-input.d.ts.map +1 -1
- package/dist/labelled-radial-input.js +4 -4
- package/dist/labelled-radial-input.js.map +1 -1
- package/dist/labelled-range-input.d.ts +1 -1
- package/dist/labelled-range-input.js +2 -2
- package/dist/labelled-range-input.js.map +1 -1
- package/dist/led.d.ts +2 -2
- package/dist/led.d.ts.map +1 -1
- package/dist/led.js +3 -5
- package/dist/led.js.map +1 -1
- package/dist/{menu-CdwSe_XN.js → menu-BiFarLUA.js} +9 -8
- package/dist/{menu-CdwSe_XN.js.map → menu-BiFarLUA.js.map} +1 -1
- package/dist/{menu-item-BG5w7fi4.d.ts → menu-item-AtoP6bD4.d.ts} +4 -4
- package/dist/menu-item-AtoP6bD4.d.ts.map +1 -0
- package/dist/{menu-item-CrmUwIoJ.js → menu-item-yHSPV8nS.js} +10 -9
- package/dist/{menu-item-CrmUwIoJ.js.map → menu-item-yHSPV8nS.js.map} +1 -1
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +2 -2
- package/dist/miller.d.ts +5 -7
- package/dist/miller.d.ts.map +1 -1
- package/dist/miller.js +26 -24
- package/dist/miller.js.map +1 -1
- package/dist/narrowed-text.d.ts +2 -1
- package/dist/narrowed-text.d.ts.map +1 -1
- package/dist/narrowed-text.js +14 -15
- package/dist/narrowed-text.js.map +1 -1
- package/dist/panel.d.ts +1 -1
- package/dist/panel.d.ts.map +1 -1
- package/dist/panel.js +3 -3
- package/dist/panel.js.map +1 -1
- package/dist/plots.d.ts +1 -1
- package/dist/plots.js +1 -1
- package/dist/polar-pad.d.ts +2 -1
- package/dist/polar-pad.d.ts.map +1 -1
- package/dist/polar-pad.js +3 -3
- package/dist/polar-pad.js.map +1 -1
- package/dist/{radial-input-CVxGH-Cp.js → radial-input-C4f-2Bya.js} +15 -25
- package/dist/{radial-input-CVxGH-Cp.js.map → radial-input-C4f-2Bya.js.map} +1 -1
- package/dist/{radial-input-BhZeyyP-.d.ts → radial-input-Dhu5ZGP5.d.ts} +3 -2
- package/dist/radial-input-Dhu5ZGP5.d.ts.map +1 -0
- package/dist/radial-input.d.ts +1 -1
- package/dist/radial-input.js +1 -1
- package/dist/range-input.d.ts +3 -2
- package/dist/range-input.d.ts.map +1 -1
- package/dist/range-input.js +3 -3
- package/dist/range-input.js.map +1 -1
- package/dist/range.d.ts +3 -2
- package/dist/range.d.ts.map +1 -1
- package/dist/range.js +3 -3
- package/dist/range.js.map +1 -1
- package/dist/selecthorizontal.d.ts +2 -1
- package/dist/selecthorizontal.d.ts.map +1 -1
- package/dist/selecthorizontal.js +2 -2
- package/dist/selecthorizontal.js.map +1 -1
- package/dist/{slider-input-TidGhvXt.d.ts → slider-input-BEaztT-g.d.ts} +3 -2
- package/dist/slider-input-BEaztT-g.d.ts.map +1 -0
- package/dist/{slider-input-CzmSVgm7.js → slider-input-SW7e2Ac2.js} +28 -31
- package/dist/{slider-input-CzmSVgm7.js.map → slider-input-SW7e2Ac2.js.map} +1 -1
- package/dist/slider-input.d.ts +1 -1
- package/dist/slider-input.js +1 -1
- package/dist/snap-container.d.ts +2 -1
- package/dist/snap-container.d.ts.map +1 -1
- package/dist/snap-container.js +5 -6
- package/dist/snap-container.js.map +1 -1
- package/dist/split-layout.d.ts +2 -1
- package/dist/split-layout.d.ts.map +1 -1
- package/dist/split-layout.js +4 -6
- package/dist/split-layout.js.map +1 -1
- package/dist/swipe.d.ts +2 -1
- package/dist/swipe.d.ts.map +1 -1
- package/dist/swipe.js +4 -5
- package/dist/swipe.js.map +1 -1
- package/dist/{tab-list-Beuh2nom.d.ts → tab-list-B8v9KntS.d.ts} +4 -4
- package/dist/tab-list-B8v9KntS.d.ts.map +1 -0
- package/dist/{tab-list-mAoD6L0e.js → tab-list-CR0v53KJ.js} +3 -3
- package/dist/{tab-list-mAoD6L0e.js.map → tab-list-CR0v53KJ.js.map} +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +1 -1
- package/dist/{tickled-controller-BF2Ea0DE.d.ts → tickled-controller-JDOR9B8V.d.ts} +9 -6
- package/dist/tickled-controller-JDOR9B8V.d.ts.map +1 -0
- package/dist/{tickled-styles-fNDdqf6l.js → tickled-styles-Bgo_Lpw-.js} +28 -28
- package/dist/tickled-styles-Bgo_Lpw-.js.map +1 -0
- package/dist/{timeline-B2fgDL4U.js → timeline-CdSI003L.js} +3 -3
- package/dist/{timeline-B2fgDL4U.js.map → timeline-CdSI003L.js.map} +1 -1
- package/dist/timeline.d.ts +1 -1
- package/dist/timeline.js +1 -1
- package/dist/{tooltip-BlvBUQxx.d.ts → tooltip-BMTSUPBU.d.ts} +3 -2
- package/dist/tooltip-BMTSUPBU.d.ts.map +1 -0
- package/dist/{tree-BtiiDX1a.js → tree-CqPhQRHo.js} +11 -10
- package/dist/{tree-BtiiDX1a.js.map → tree-CqPhQRHo.js.map} +1 -1
- package/dist/{tree-component-DQ9vzdy5.d.ts → tree-component-CDLO1ITF.d.ts} +124 -8
- package/dist/tree-component-CDLO1ITF.d.ts.map +1 -0
- package/dist/tree.d.ts +4 -9
- package/dist/tree.d.ts.map +1 -1
- package/dist/tree.js +1 -1
- package/dist/types-DSfbtHs3.d.ts +8 -0
- package/dist/types-DSfbtHs3.d.ts.map +1 -0
- package/dist/{wheel-nudge-DgMTRYlh.d.ts → wheel-nudge-C-ra_1os.d.ts} +2 -1
- package/dist/wheel-nudge-C-ra_1os.d.ts.map +1 -0
- package/dist/{wheel-nudge-BlSCe_hD.js → wheel-nudge-Dhzi5nHc.js} +2 -2
- package/dist/{wheel-nudge-BlSCe_hD.js.map → wheel-nudge-Dhzi5nHc.js.map} +1 -1
- package/dist/{xy-axis-CxHC8z5E.js → xy-axis-BpA2eJq6.js} +4 -6
- package/dist/{xy-axis-CxHC8z5E.js.map → xy-axis-BpA2eJq6.js.map} +1 -1
- package/dist/{xy-axis-5KhVTNoX.d.ts → xy-axis-CtDDQzGZ.d.ts} +6 -8
- package/dist/xy-axis-CtDDQzGZ.d.ts.map +1 -0
- package/dist/xy-pad.d.ts +2 -1
- package/dist/xy-pad.d.ts.map +1 -1
- package/dist/xy-pad.js +3 -3
- package/dist/xy-pad.js.map +1 -1
- package/docs-user/ac-token.md +7 -1
- package/docs-user/colour-picker.md +8 -4
- package/docs-user/menu.md +11 -8
- package/package.json +1 -1
- package/dist/colour-picker-37NyVenk.js.map +0 -1
- package/dist/fallbacks-DPgPEqo8.js +0 -218
- package/dist/fallbacks-DPgPEqo8.js.map +0 -1
- package/dist/hex-editor-Caq8vNQk.d.ts.map +0 -1
- package/dist/icon-BUwP1CZ1.d.ts.map +0 -1
- package/dist/index-BKAlRgbq.d.ts.map +0 -1
- package/dist/index-BUB5SICW.d.ts.map +0 -1
- package/dist/index-BeuCXtiO.d.ts.map +0 -1
- package/dist/index-D9u_Q7-b.d.ts.map +0 -1
- package/dist/index-DkhBGHgF.d.ts.map +0 -1
- package/dist/index-RqMh1i-O.d.ts.map +0 -1
- package/dist/interaction-D6efrBLo.js +0 -1
- package/dist/labelled-input-base-Dp_9KP0G.d.ts.map +0 -1
- package/dist/menu-item-BG5w7fi4.d.ts.map +0 -1
- package/dist/radial-input-BhZeyyP-.d.ts.map +0 -1
- package/dist/slider-input-TidGhvXt.d.ts.map +0 -1
- package/dist/tab-list-Beuh2nom.d.ts.map +0 -1
- package/dist/tickled-controller-BF2Ea0DE.d.ts.map +0 -1
- package/dist/tickled-styles-fNDdqf6l.js.map +0 -1
- package/dist/tooltip-BlvBUQxx.d.ts.map +0 -1
- package/dist/tree-component-DQ9vzdy5.d.ts.map +0 -1
- package/dist/types-DO3gt5vg.d.ts +0 -130
- package/dist/types-DO3gt5vg.d.ts.map +0 -1
- package/dist/wheel-nudge-DgMTRYlh.d.ts.map +0 -1
- package/dist/xy-axis-5KhVTNoX.d.ts.map +0 -1
- /package/bundle/{rolldown-runtime-D7D4PA-g.js → chunk-D7D4PA-g.js} +0 -0
- /package/dist/{rolldown-runtime-D7D4PA-g.js → chunk-D7D4PA-g.js} +0 -0
package/bundle/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./
|
|
1
|
+
import { t as __exportAll } from "./chunk-D7D4PA-g.js";
|
|
2
2
|
import { eventOptions, property, query, queryAssignedElements, state } from "lit/decorators.js";
|
|
3
3
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
4
4
|
import { Fzf } from "fzf";
|
|
@@ -18,10 +18,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
20
|
*/
|
|
21
|
-
const t$1 = globalThis;
|
|
22
|
-
const e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
23
|
-
const s$2 = Symbol();
|
|
24
|
-
const o$3 = /* @__PURE__ */ new WeakMap();
|
|
21
|
+
const t$1 = globalThis, e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$3 = /* @__PURE__ */ new WeakMap();
|
|
25
22
|
var n$2 = class {
|
|
26
23
|
constructor(t, e, o) {
|
|
27
24
|
if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -40,22 +37,19 @@ var n$2 = class {
|
|
|
40
37
|
return this.cssText;
|
|
41
38
|
}
|
|
42
39
|
};
|
|
43
|
-
const r$2 = (t) => new n$2("string" == typeof t ? t : t + "", void 0, s$2)
|
|
44
|
-
const i$3 = (t, ...e) => {
|
|
40
|
+
const r$2 = (t) => new n$2("string" == typeof t ? t : t + "", void 0, s$2), i$3 = (t, ...e) => {
|
|
45
41
|
return new n$2(1 === t.length ? t[0] : e.reduce((e, s, o) => e + ((t) => {
|
|
46
42
|
if (!0 === t._$cssResult$) return t.cssText;
|
|
47
43
|
if ("number" == typeof t) return t;
|
|
48
44
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
49
45
|
})(s) + t[o + 1], t[0]), t, s$2);
|
|
50
|
-
}
|
|
51
|
-
const S$1 = (s, o) => {
|
|
46
|
+
}, S$1 = (s, o) => {
|
|
52
47
|
if (e$2) s.adoptedStyleSheets = o.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
53
48
|
else for (const e of o) {
|
|
54
49
|
const o = document.createElement("style"), n = t$1.litNonce;
|
|
55
50
|
void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
56
51
|
}
|
|
57
|
-
}
|
|
58
|
-
const c$2 = e$2 ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => {
|
|
52
|
+
}, c$2 = e$2 ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => {
|
|
59
53
|
let e = "";
|
|
60
54
|
for (const s of t.cssRules) e += s.cssText;
|
|
61
55
|
return r$2(e);
|
|
@@ -165,7 +159,7 @@ var y$1 = class extends HTMLElement {
|
|
|
165
159
|
static finalizeStyles(s) {
|
|
166
160
|
const i = [];
|
|
167
161
|
if (Array.isArray(s)) {
|
|
168
|
-
const e = new Set(s.flat(
|
|
162
|
+
const e = new Set(s.flat(Infinity).reverse());
|
|
169
163
|
for (const s of e) i.unshift(c$2(s));
|
|
170
164
|
} else void 0 !== s && i.push(c$2(s));
|
|
171
165
|
return i;
|
|
@@ -297,38 +291,11 @@ y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("eleme
|
|
|
297
291
|
* Copyright 2017 Google LLC
|
|
298
292
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
299
293
|
*/
|
|
300
|
-
const t = globalThis
|
|
301
|
-
const i$1 = (t) => t;
|
|
302
|
-
const s$1 = t.trustedTypes;
|
|
303
|
-
const e = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t) => t }) : void 0;
|
|
304
|
-
const h = "$lit$";
|
|
305
|
-
const o$1 = `lit$${Math.random().toFixed(9).slice(2)}$`;
|
|
306
|
-
const n = "?" + o$1;
|
|
307
|
-
const r = `<${n}>`;
|
|
308
|
-
const l = document;
|
|
309
|
-
const c = () => l.createComment("");
|
|
310
|
-
const a = (t) => null === t || "object" != typeof t && "function" != typeof t;
|
|
311
|
-
const u = Array.isArray;
|
|
312
|
-
const d = (t) => u(t) || "function" == typeof t?.[Symbol.iterator];
|
|
313
|
-
const f = "[ \n\f\r]";
|
|
314
|
-
const v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
|
|
315
|
-
const _ = /-->/g;
|
|
316
|
-
const m = />/g;
|
|
317
|
-
const p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g");
|
|
318
|
-
const g = /'/g;
|
|
319
|
-
const $ = /"/g;
|
|
320
|
-
const y = /^(?:script|style|textarea|title)$/i;
|
|
321
|
-
const x = (t) => (i, ...s) => ({
|
|
294
|
+
const t = globalThis, i$1 = (t) => t, s$1 = t.trustedTypes, e = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, h = "$lit$", o$1 = `lit$${Math.random().toFixed(9).slice(2)}$`, n = "?" + o$1, r = `<${n}>`, l = document, c = () => l.createComment(""), a = (t) => null === t || "object" != typeof t && "function" != typeof t, u = Array.isArray, d = (t) => u(t) || "function" == typeof t?.[Symbol.iterator], f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, x = (t) => (i, ...s) => ({
|
|
322
295
|
_$litType$: t,
|
|
323
296
|
strings: i,
|
|
324
297
|
values: s
|
|
325
|
-
});
|
|
326
|
-
const b = x(1);
|
|
327
|
-
const w = x(2);
|
|
328
|
-
const E = Symbol.for("lit-noChange");
|
|
329
|
-
const A = Symbol.for("lit-nothing");
|
|
330
|
-
const C = /* @__PURE__ */ new WeakMap();
|
|
331
|
-
const P = l.createTreeWalker(l, 129);
|
|
298
|
+
}), b = x(1), w = x(2), E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
|
|
332
299
|
function V(t, i) {
|
|
333
300
|
if (!u(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
334
301
|
return void 0 !== e ? e.createHTML(i) : i;
|
|
@@ -666,10 +633,11 @@ function findTextNode(element, expectedText) {
|
|
|
666
633
|
*
|
|
667
634
|
* ## Global Mouse Tracking
|
|
668
635
|
*
|
|
669
|
-
* This controller uses a
|
|
670
|
-
* mouse movement. This prevents `pointerenter`
|
|
671
|
-
* from incorrectly switching to mouse mode when
|
|
672
|
-
* navigation.
|
|
636
|
+
* This controller uses a single, ref-counted global `pointermove` listener (shared
|
|
637
|
+
* across all instances) to track actual mouse movement. This prevents `pointerenter`
|
|
638
|
+
* events caused by content scrolling from incorrectly switching to mouse mode when
|
|
639
|
+
* the user is actually using keyboard navigation. The listener is attached when the
|
|
640
|
+
* first host connects and removed once the last host disconnects.
|
|
673
641
|
*
|
|
674
642
|
* @example
|
|
675
643
|
* ```ts
|
|
@@ -716,7 +684,12 @@ var TickledController = class TickledController {
|
|
|
716
684
|
this._mouseMovedSinceKeyboard = true;
|
|
717
685
|
}
|
|
718
686
|
static {
|
|
719
|
-
this.
|
|
687
|
+
this._listenerRefCount = 0;
|
|
688
|
+
}
|
|
689
|
+
static {
|
|
690
|
+
this._onGlobalPointerMove = (e) => {
|
|
691
|
+
TickledController.handleGlobalPointerMove(e.clientX, e.clientY);
|
|
692
|
+
};
|
|
720
693
|
}
|
|
721
694
|
constructor(host, config) {
|
|
722
695
|
this._tickledId = void 0;
|
|
@@ -726,14 +699,13 @@ var TickledController = class TickledController {
|
|
|
726
699
|
host.addController(this);
|
|
727
700
|
}
|
|
728
701
|
hostConnected() {
|
|
729
|
-
if (
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
702
|
+
if (TickledController._listenerRefCount === 0) document.addEventListener(`pointermove`, TickledController._onGlobalPointerMove, { passive: true });
|
|
703
|
+
TickledController._listenerRefCount++;
|
|
704
|
+
}
|
|
705
|
+
hostDisconnected() {
|
|
706
|
+
TickledController._listenerRefCount--;
|
|
707
|
+
if (TickledController._listenerRefCount === 0) document.removeEventListener(`pointermove`, TickledController._onGlobalPointerMove);
|
|
735
708
|
}
|
|
736
|
-
hostDisconnected() {}
|
|
737
709
|
/**
|
|
738
710
|
* Get the current input mode
|
|
739
711
|
*/
|
|
@@ -876,19 +848,14 @@ var TickledController = class TickledController {
|
|
|
876
848
|
*
|
|
877
849
|
* ## CSS Variable Contract
|
|
878
850
|
*
|
|
879
|
-
* **Style variables
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
883
|
-
* - `--item-bg-
|
|
884
|
-
* - `--item-border
|
|
885
|
-
* - `--item-
|
|
886
|
-
* - `--item-border-
|
|
887
|
-
* - `--item-text-tickled`: Text color when tickled (default: inherit)
|
|
888
|
-
* - `--item-text-selected`: Text color when selected (default: #fff)
|
|
889
|
-
* - `--item-padding`: Item padding (default: 4px 8px)
|
|
890
|
-
* - `--item-border-radius`: Border radius (default: 4px)
|
|
891
|
-
* - `--item-icon-spacing`: Gap between icon and text (default: 4px)
|
|
851
|
+
* **Style variables** — `tickledItemStyles` only consumes these via `var()`; it
|
|
852
|
+
* defines no defaults itself. Fallback values (used when no theme CSS is loaded)
|
|
853
|
+
* are registered in `themeFallbacks` (`../styles/fallbacks.ts`) and mirror the
|
|
854
|
+
* documented base theme in `user-theming.md`:
|
|
855
|
+
* - `--item-bg`, `--item-bg-tickled`, `--item-bg-selected`, `--item-bg-selected-tickled`
|
|
856
|
+
* - `--item-border`, `--item-border-tickled`, `--item-border-selected` (full border shorthands, not colours)
|
|
857
|
+
* - `--item-text-tickled`, `--item-text-selected`
|
|
858
|
+
* - `--item-padding`, `--item-border-radius`, `--item-icon-spacing`
|
|
892
859
|
*
|
|
893
860
|
* ## Usage
|
|
894
861
|
*
|
|
@@ -940,13 +907,13 @@ const tickledItemStyles = i$3`
|
|
|
940
907
|
|
|
941
908
|
.item.tickled {
|
|
942
909
|
background: var(--item-bg-tickled);
|
|
943
|
-
border
|
|
910
|
+
border: var(--item-border-tickled);
|
|
944
911
|
color: var(--item-text-tickled);
|
|
945
912
|
}
|
|
946
913
|
|
|
947
914
|
.item.selected {
|
|
948
915
|
background: var(--item-bg-selected);
|
|
949
|
-
border
|
|
916
|
+
border: var(--item-border-selected);
|
|
950
917
|
color: var(--item-text-selected);
|
|
951
918
|
}
|
|
952
919
|
|
|
@@ -968,12 +935,13 @@ const tickledItemStyles = i$3`
|
|
|
968
935
|
* - If no theme CSS is loaded, these initial values ensure components still
|
|
969
936
|
* have visible backgrounds, text colours, etc.
|
|
970
937
|
*
|
|
971
|
-
*
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
*
|
|
938
|
+
* `@property` registration is document-global — it is not scoped per shadow
|
|
939
|
+
* root — so this is registered exactly once (via `_registerThemeFallbacksOnce`
|
|
940
|
+
* below) rather than adopted into every component's shadow-root stylesheet.
|
|
941
|
+
* Registering the same `@property` rule repeatedly across many shadow roots
|
|
942
|
+
* causes Chrome to log "Ignored @property rule" for every repeat.
|
|
975
943
|
*/
|
|
976
|
-
const
|
|
944
|
+
const _themeFallbacksCss = i$3`
|
|
977
945
|
@property --surface-0 {
|
|
978
946
|
syntax: '<color>';
|
|
979
947
|
inherits: true;
|
|
@@ -1017,7 +985,7 @@ const themeFallbacks = i$3`
|
|
|
1017
985
|
@property --surface-5 {
|
|
1018
986
|
syntax: '<color>';
|
|
1019
987
|
inherits: true;
|
|
1020
|
-
initial-value: oklch(
|
|
988
|
+
initial-value: oklch(19% 0.02 240);
|
|
1021
989
|
}
|
|
1022
990
|
@property --surface-5-text {
|
|
1023
991
|
syntax: '<color>';
|
|
@@ -1169,7 +1137,194 @@ const themeFallbacks = i$3`
|
|
|
1169
1137
|
inherits: true;
|
|
1170
1138
|
initial-value: 5ch;
|
|
1171
1139
|
}
|
|
1140
|
+
@property --space-xs {
|
|
1141
|
+
syntax: '<length>';
|
|
1142
|
+
inherits: true;
|
|
1143
|
+
initial-value: 3px;
|
|
1144
|
+
}
|
|
1145
|
+
@property --space-s {
|
|
1146
|
+
syntax: '<length>';
|
|
1147
|
+
inherits: true;
|
|
1148
|
+
initial-value: 4px;
|
|
1149
|
+
}
|
|
1150
|
+
@property --space-m {
|
|
1151
|
+
syntax: '<length>';
|
|
1152
|
+
inherits: true;
|
|
1153
|
+
initial-value: 8px;
|
|
1154
|
+
}
|
|
1155
|
+
@property --space-l {
|
|
1156
|
+
syntax: '<length>';
|
|
1157
|
+
inherits: true;
|
|
1158
|
+
initial-value: 12px;
|
|
1159
|
+
}
|
|
1160
|
+
@property --space-xl {
|
|
1161
|
+
syntax: '<length>';
|
|
1162
|
+
inherits: true;
|
|
1163
|
+
initial-value: 16px;
|
|
1164
|
+
}
|
|
1165
|
+
@property --space-2xl {
|
|
1166
|
+
syntax: '<length>';
|
|
1167
|
+
inherits: true;
|
|
1168
|
+
initial-value: 20px;
|
|
1169
|
+
}
|
|
1170
|
+
@property --text-xs {
|
|
1171
|
+
syntax: '<length>';
|
|
1172
|
+
inherits: true;
|
|
1173
|
+
initial-value: 10px;
|
|
1174
|
+
}
|
|
1175
|
+
@property --text-s {
|
|
1176
|
+
syntax: '<length>';
|
|
1177
|
+
inherits: true;
|
|
1178
|
+
initial-value: 11px;
|
|
1179
|
+
}
|
|
1180
|
+
@property --text-m {
|
|
1181
|
+
syntax: '<length>';
|
|
1182
|
+
inherits: true;
|
|
1183
|
+
initial-value: 12px;
|
|
1184
|
+
}
|
|
1185
|
+
@property --text-l {
|
|
1186
|
+
syntax: '<length>';
|
|
1187
|
+
inherits: true;
|
|
1188
|
+
initial-value: 13px;
|
|
1189
|
+
}
|
|
1190
|
+
@property --text-xl {
|
|
1191
|
+
syntax: '<length>';
|
|
1192
|
+
inherits: true;
|
|
1193
|
+
initial-value: 16px;
|
|
1194
|
+
}
|
|
1195
|
+
@property --text-2xl {
|
|
1196
|
+
syntax: '<length>';
|
|
1197
|
+
inherits: true;
|
|
1198
|
+
initial-value: 20px;
|
|
1199
|
+
}
|
|
1200
|
+
@property --font-weight-bold {
|
|
1201
|
+
syntax: '<number>';
|
|
1202
|
+
inherits: true;
|
|
1203
|
+
initial-value: 600;
|
|
1204
|
+
}
|
|
1205
|
+
@property --radius-s {
|
|
1206
|
+
syntax: '<length>';
|
|
1207
|
+
inherits: true;
|
|
1208
|
+
initial-value: 3px;
|
|
1209
|
+
}
|
|
1210
|
+
@property --radius-m {
|
|
1211
|
+
syntax: '<length>';
|
|
1212
|
+
inherits: true;
|
|
1213
|
+
initial-value: 4px;
|
|
1214
|
+
}
|
|
1215
|
+
@property --radius-l {
|
|
1216
|
+
syntax: '<length>';
|
|
1217
|
+
inherits: true;
|
|
1218
|
+
initial-value: 6px;
|
|
1219
|
+
}
|
|
1220
|
+
@property --radius-xl {
|
|
1221
|
+
syntax: '<length>';
|
|
1222
|
+
inherits: true;
|
|
1223
|
+
initial-value: 8px;
|
|
1224
|
+
}
|
|
1225
|
+
@property --shadow-m {
|
|
1226
|
+
syntax: '*';
|
|
1227
|
+
inherits: true;
|
|
1228
|
+
initial-value: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
1229
|
+
}
|
|
1230
|
+
@property --shadow-l {
|
|
1231
|
+
syntax: '*';
|
|
1232
|
+
inherits: true;
|
|
1233
|
+
initial-value: 0 4px 24px rgba(0, 0, 0, 0.5);
|
|
1234
|
+
}
|
|
1235
|
+
@property --item-bg {
|
|
1236
|
+
syntax: '<color>';
|
|
1237
|
+
inherits: true;
|
|
1238
|
+
initial-value: transparent;
|
|
1239
|
+
}
|
|
1240
|
+
@property --item-bg-tickled {
|
|
1241
|
+
syntax: '<color>';
|
|
1242
|
+
inherits: true;
|
|
1243
|
+
initial-value: oklch(19% 0.02 240);
|
|
1244
|
+
}
|
|
1245
|
+
@property --item-bg-selected {
|
|
1246
|
+
syntax: '<color>';
|
|
1247
|
+
inherits: true;
|
|
1248
|
+
initial-value: oklch(60% 0.15 140);
|
|
1249
|
+
}
|
|
1250
|
+
@property --item-bg-selected-tickled {
|
|
1251
|
+
syntax: '<color>';
|
|
1252
|
+
inherits: true;
|
|
1253
|
+
initial-value: color-mix(in oklch, oklch(60% 0.15 140) 80%, oklch(0% 0 0));
|
|
1254
|
+
}
|
|
1255
|
+
@property --item-text-tickled {
|
|
1256
|
+
syntax: '<color>';
|
|
1257
|
+
inherits: true;
|
|
1258
|
+
initial-value: #fff;
|
|
1259
|
+
}
|
|
1260
|
+
@property --item-text-selected {
|
|
1261
|
+
syntax: '<color>';
|
|
1262
|
+
inherits: true;
|
|
1263
|
+
initial-value: #fff;
|
|
1264
|
+
}
|
|
1265
|
+
@property --item-border {
|
|
1266
|
+
syntax: '*';
|
|
1267
|
+
inherits: true;
|
|
1268
|
+
initial-value: 1px solid oklch(19% 0.02 240);
|
|
1269
|
+
}
|
|
1270
|
+
@property --item-border-tickled {
|
|
1271
|
+
syntax: '*';
|
|
1272
|
+
inherits: true;
|
|
1273
|
+
initial-value: 1px solid color-mix(in oklch, oklch(60% 0.15 140) 40%, transparent);
|
|
1274
|
+
}
|
|
1275
|
+
@property --item-border-selected {
|
|
1276
|
+
syntax: '*';
|
|
1277
|
+
inherits: true;
|
|
1278
|
+
initial-value: 1px dashed oklch(60% 0.15 140);
|
|
1279
|
+
}
|
|
1280
|
+
@property --item-border-active {
|
|
1281
|
+
syntax: '*';
|
|
1282
|
+
inherits: true;
|
|
1283
|
+
initial-value: 2px solid oklch(60% 0.15 140);
|
|
1284
|
+
}
|
|
1285
|
+
@property --item-border-dragged {
|
|
1286
|
+
syntax: '*';
|
|
1287
|
+
inherits: true;
|
|
1288
|
+
initial-value: 2px dotted color-mix(in oklch, oklch(60% 0.15 140) 80%, transparent);
|
|
1289
|
+
}
|
|
1290
|
+
@property --item-border-disabled {
|
|
1291
|
+
syntax: '*';
|
|
1292
|
+
inherits: true;
|
|
1293
|
+
initial-value: 1px solid oklch(22% 0.02 240);
|
|
1294
|
+
}
|
|
1295
|
+
@property --item-padding {
|
|
1296
|
+
syntax: '*';
|
|
1297
|
+
inherits: true;
|
|
1298
|
+
initial-value: 4px 8px;
|
|
1299
|
+
}
|
|
1300
|
+
@property --item-border-radius {
|
|
1301
|
+
syntax: '<length>';
|
|
1302
|
+
inherits: true;
|
|
1303
|
+
initial-value: 4px;
|
|
1304
|
+
}
|
|
1305
|
+
@property --item-icon-spacing {
|
|
1306
|
+
syntax: '<length>';
|
|
1307
|
+
inherits: true;
|
|
1308
|
+
initial-value: 4px;
|
|
1309
|
+
}
|
|
1172
1310
|
`;
|
|
1311
|
+
let _themeFallbacksRegistered = false;
|
|
1312
|
+
function _registerThemeFallbacksOnce() {
|
|
1313
|
+
if (_themeFallbacksRegistered || typeof document === `undefined`) return;
|
|
1314
|
+
_themeFallbacksRegistered = true;
|
|
1315
|
+
const styleEl = document.createElement(`style`);
|
|
1316
|
+
styleEl.textContent = _themeFallbacksCss.cssText;
|
|
1317
|
+
document.head.append(styleEl);
|
|
1318
|
+
}
|
|
1319
|
+
_registerThemeFallbacksOnce();
|
|
1320
|
+
/**
|
|
1321
|
+
* Spread this into any component whose styles reference theme variables.
|
|
1322
|
+
* It is an empty stylesheet — the actual `@property` rules are registered
|
|
1323
|
+
* once at the document level as a side effect of importing this module — so
|
|
1324
|
+
* this exists only to keep the familiar `static styles = [themeFallbacks, ...]`
|
|
1325
|
+
* pattern working across all consuming components.
|
|
1326
|
+
*/
|
|
1327
|
+
const themeFallbacks = i$3``;
|
|
1173
1328
|
//#endregion
|
|
1174
1329
|
//#region src/styles/popup.ts
|
|
1175
1330
|
/**
|
|
@@ -1227,7 +1382,7 @@ function svgToDataUri(svg) {
|
|
|
1227
1382
|
return `url("data:image/svg+xml,${encodeURIComponent(svg)}")`;
|
|
1228
1383
|
}
|
|
1229
1384
|
//#endregion
|
|
1230
|
-
//#region \0@oxc-project+runtime@0.
|
|
1385
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
|
|
1231
1386
|
function __decorate(decorators, target, key, desc) {
|
|
1232
1387
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1233
1388
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1270,10 +1425,8 @@ let IxfxIconElement = class IxfxIconElement extends i {
|
|
|
1270
1425
|
}
|
|
1271
1426
|
updated(changed) {
|
|
1272
1427
|
super.updated(changed);
|
|
1273
|
-
if (changed.has(`rotate`))
|
|
1274
|
-
|
|
1275
|
-
else this.style.removeProperty(`--rotate`);
|
|
1276
|
-
}
|
|
1428
|
+
if (changed.has(`rotate`)) if (this.rotate?.length > 0) this.style.setProperty(`--rotate`, this.rotate);
|
|
1429
|
+
else this.style.removeProperty(`--rotate`);
|
|
1277
1430
|
}
|
|
1278
1431
|
static {
|
|
1279
1432
|
this.styles = [themeFallbacks, i$3`
|
|
@@ -1438,6 +1591,7 @@ let AcTextElement = class AcTextElement extends i {
|
|
|
1438
1591
|
if (!this._isOpen) return;
|
|
1439
1592
|
e.preventDefault();
|
|
1440
1593
|
this.#closePopup();
|
|
1594
|
+
break;
|
|
1441
1595
|
}
|
|
1442
1596
|
};
|
|
1443
1597
|
this.#onItemPointerDown = (e, item) => {
|
|
@@ -2014,9 +2168,8 @@ function defaultSelector(item) {
|
|
|
2014
2168
|
return String(item);
|
|
2015
2169
|
}
|
|
2016
2170
|
function createFuzzySearch(items, options = {}) {
|
|
2017
|
-
const selector = options.selector ?? defaultSelector;
|
|
2018
2171
|
const fzf = new Fzf(items, {
|
|
2019
|
-
selector,
|
|
2172
|
+
selector: options.selector ?? defaultSelector,
|
|
2020
2173
|
...options.fzf ?? {}
|
|
2021
2174
|
});
|
|
2022
2175
|
const find = (query) => {
|
|
@@ -2458,6 +2611,15 @@ let AcTokenElement = class AcTokenElement extends i {
|
|
|
2458
2611
|
this._tokens = [...value];
|
|
2459
2612
|
this.#emitChange();
|
|
2460
2613
|
}
|
|
2614
|
+
/**
|
|
2615
|
+
* Set the token list programmatically. Unlike the `tokens` property setter,
|
|
2616
|
+
* this does not dispatch `ac-token-change` — use it for initialisation or any
|
|
2617
|
+
* other programmatic update that should not re-enter a parent's own
|
|
2618
|
+
* `ac-token-change` handler.
|
|
2619
|
+
*/
|
|
2620
|
+
setTokens(value) {
|
|
2621
|
+
this._tokens = [...value];
|
|
2622
|
+
}
|
|
2461
2623
|
/** All committed token labels joined with commas. */
|
|
2462
2624
|
get value() {
|
|
2463
2625
|
return this._tokens.map((t) => t.label).join(`, `);
|
|
@@ -2478,7 +2640,8 @@ let AcTokenElement = class AcTokenElement extends i {
|
|
|
2478
2640
|
if (changedProps.has(`completionProvider`)) this.#buildStaticProvider();
|
|
2479
2641
|
if (this.#data.items !== this.#lastSuggestions) {
|
|
2480
2642
|
this.#lastSuggestions = this.#data.items;
|
|
2481
|
-
this._tickled.
|
|
2643
|
+
if (this.#data.items.length > 0) this._tickled.setTickled(0);
|
|
2644
|
+
else this._tickled.clearTickled();
|
|
2482
2645
|
}
|
|
2483
2646
|
}
|
|
2484
2647
|
#buildStaticProvider() {
|
|
@@ -2548,6 +2711,7 @@ let AcTokenElement = class AcTokenElement extends i {
|
|
|
2548
2711
|
e.preventDefault();
|
|
2549
2712
|
this.#closePopup();
|
|
2550
2713
|
this._selectedTokenIndex = void 0;
|
|
2714
|
+
break;
|
|
2551
2715
|
}
|
|
2552
2716
|
}
|
|
2553
2717
|
#onPaste;
|
|
@@ -2665,10 +2829,9 @@ let AcTokenElement = class AcTokenElement extends i {
|
|
|
2665
2829
|
});
|
|
2666
2830
|
}
|
|
2667
2831
|
#renderChip(item, index) {
|
|
2668
|
-
const isSelected = this._selectedTokenIndex === index;
|
|
2669
2832
|
return b`
|
|
2670
2833
|
<span
|
|
2671
|
-
class="token-chip ${
|
|
2834
|
+
class="token-chip ${this._selectedTokenIndex === index ? `selected` : ``}"
|
|
2672
2835
|
title=${item.subLabel ?? A}
|
|
2673
2836
|
@pointerdown=${(e) => this.#onChipPointerDown(e, index)}
|
|
2674
2837
|
>
|
|
@@ -3475,6 +3638,11 @@ let RadioGroup = class RadioGroup extends i {
|
|
|
3475
3638
|
.radio-item:hover:not([disabled]) {
|
|
3476
3639
|
opacity: 0.9;
|
|
3477
3640
|
background: color-mix(in oklch, var(--surface-4) 80%, transparent);
|
|
3641
|
+
border-color: var(--accent, #666);
|
|
3642
|
+
box-shadow:
|
|
3643
|
+
inset 1px 1px 1px 1px color-mix(in oklch, var(--surface-5) 70%, transparent),
|
|
3644
|
+
inset -1px -1px 1px 1px color-mix(in oklch, var(--surface-2) 60%, transparent),
|
|
3645
|
+
2px 2px 1px 0px color-mix(in oklch, var(--surface-2) 90%, transparent);
|
|
3478
3646
|
}
|
|
3479
3647
|
|
|
3480
3648
|
.radio-item.selected {
|
|
@@ -3638,6 +3806,7 @@ let MenuContainer = class MenuContainer extends i {
|
|
|
3638
3806
|
e.preventDefault();
|
|
3639
3807
|
e.stopPropagation();
|
|
3640
3808
|
this._activateFocusedItem(items);
|
|
3809
|
+
break;
|
|
3641
3810
|
}
|
|
3642
3811
|
};
|
|
3643
3812
|
}
|
|
@@ -4254,9 +4423,9 @@ let MenuItem = class MenuItem extends i {
|
|
|
4254
4423
|
}
|
|
4255
4424
|
|
|
4256
4425
|
:host(.tickled) .item {
|
|
4257
|
-
background:
|
|
4258
|
-
border:
|
|
4259
|
-
color:
|
|
4426
|
+
background: var(--item-bg-tickled);
|
|
4427
|
+
border: var(--item-border-tickled);
|
|
4428
|
+
color: var(--item-text-tickled);
|
|
4260
4429
|
}
|
|
4261
4430
|
|
|
4262
4431
|
:host(:focus) {
|
|
@@ -5370,7 +5539,9 @@ let ColourPicker = class ColourPicker extends i {
|
|
|
5370
5539
|
case `h`:
|
|
5371
5540
|
this.h = value;
|
|
5372
5541
|
break;
|
|
5373
|
-
case `a`:
|
|
5542
|
+
case `a`:
|
|
5543
|
+
this.a = value;
|
|
5544
|
+
break;
|
|
5374
5545
|
}
|
|
5375
5546
|
e.stopPropagation();
|
|
5376
5547
|
this.requestUpdate();
|
|
@@ -5480,7 +5651,9 @@ let ColourPicker = class ColourPicker extends i {
|
|
|
5480
5651
|
case `h`:
|
|
5481
5652
|
this.h = this._clampToRange(`h`, this.h);
|
|
5482
5653
|
break;
|
|
5483
|
-
case `a`:
|
|
5654
|
+
case `a`:
|
|
5655
|
+
this.a = this._clampToRange(`a`, this.a);
|
|
5656
|
+
break;
|
|
5484
5657
|
}
|
|
5485
5658
|
this.requestUpdate();
|
|
5486
5659
|
}
|
|
@@ -5592,25 +5765,25 @@ let ColourPicker = class ColourPicker extends i {
|
|
|
5592
5765
|
for (const v of trackBgVars) el.style.setProperty(v, grad);
|
|
5593
5766
|
for (const v of trackValueVars) el.style.setProperty(v, `transparent`);
|
|
5594
5767
|
}
|
|
5595
|
-
if (this._previewEl) {
|
|
5596
|
-
|
|
5597
|
-
const previewBg = `
|
|
5768
|
+
if (this._previewEl) if (this.a < 1) {
|
|
5769
|
+
const previewBg = `
|
|
5598
5770
|
linear-gradient(oklch(${l} ${c} ${h} / ${a}), oklch(${l} ${c} ${h} / ${a})),
|
|
5599
5771
|
repeating-conic-gradient(
|
|
5600
5772
|
var(--surface-2) 0% 25%,
|
|
5601
5773
|
var(--surface-4) 0% 50%
|
|
5602
5774
|
) 50% / 16px 16px
|
|
5603
5775
|
`;
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
}
|
|
5776
|
+
this._previewEl.style.background = previewBg;
|
|
5777
|
+
} else this._previewEl.style.background = this.value;
|
|
5607
5778
|
}
|
|
5608
5779
|
_dispatchInput() {
|
|
5609
5780
|
const detail = {
|
|
5610
5781
|
l: this.l,
|
|
5611
5782
|
c: this.c,
|
|
5612
5783
|
h: this.h,
|
|
5613
|
-
a: this.a
|
|
5784
|
+
a: this.a,
|
|
5785
|
+
unit: `scalar`,
|
|
5786
|
+
space: `oklch`
|
|
5614
5787
|
};
|
|
5615
5788
|
this.dispatchEvent(new CustomEvent(`input`, {
|
|
5616
5789
|
detail,
|
|
@@ -5623,7 +5796,9 @@ let ColourPicker = class ColourPicker extends i {
|
|
|
5623
5796
|
l: this.l,
|
|
5624
5797
|
c: this.c,
|
|
5625
5798
|
h: this.h,
|
|
5626
|
-
a: this.a
|
|
5799
|
+
a: this.a,
|
|
5800
|
+
unit: `scalar`,
|
|
5801
|
+
space: `oklch`
|
|
5627
5802
|
};
|
|
5628
5803
|
this.dispatchEvent(new CustomEvent(`change`, {
|
|
5629
5804
|
detail,
|
|
@@ -5965,6 +6140,9 @@ let ColourPickerPopup = class ColourPickerPopup extends i {
|
|
|
5965
6140
|
get value() {
|
|
5966
6141
|
return oklchToCss(this.l, this.c, this.h, this.a);
|
|
5967
6142
|
}
|
|
6143
|
+
set value(colour) {
|
|
6144
|
+
this.setColour(colour);
|
|
6145
|
+
}
|
|
5968
6146
|
get _innerHidePreview() {
|
|
5969
6147
|
if (this.mode === `fluid`) return !this.showPreview;
|
|
5970
6148
|
return false;
|
|
@@ -6002,7 +6180,9 @@ let ColourPickerPopup = class ColourPickerPopup extends i {
|
|
|
6002
6180
|
l: this.l,
|
|
6003
6181
|
c: this.c,
|
|
6004
6182
|
h: this.h,
|
|
6005
|
-
a: this.a
|
|
6183
|
+
a: this.a,
|
|
6184
|
+
unit: `scalar`,
|
|
6185
|
+
space: `oklch`
|
|
6006
6186
|
};
|
|
6007
6187
|
this.dispatchEvent(new CustomEvent(`input`, {
|
|
6008
6188
|
detail,
|
|
@@ -6015,7 +6195,9 @@ let ColourPickerPopup = class ColourPickerPopup extends i {
|
|
|
6015
6195
|
l: this.l,
|
|
6016
6196
|
c: this.c,
|
|
6017
6197
|
h: this.h,
|
|
6018
|
-
a: this.a
|
|
6198
|
+
a: this.a,
|
|
6199
|
+
unit: `scalar`,
|
|
6200
|
+
space: `oklch`
|
|
6019
6201
|
};
|
|
6020
6202
|
this.dispatchEvent(new CustomEvent(`change`, {
|
|
6021
6203
|
detail,
|
|
@@ -6598,6 +6780,7 @@ let NarrowedTextElement = class NarrowedTextElement extends i {
|
|
|
6598
6780
|
this._query = ``;
|
|
6599
6781
|
this.tickled.clearTickled();
|
|
6600
6782
|
this._updateFilteredItems();
|
|
6783
|
+
break;
|
|
6601
6784
|
}
|
|
6602
6785
|
};
|
|
6603
6786
|
this.#onFocus = () => {
|
|
@@ -6817,13 +7000,12 @@ let NarrowedTextElement = class NarrowedTextElement extends i {
|
|
|
6817
7000
|
(this.shadowRoot?.querySelector(`.search-input`))?.focus();
|
|
6818
7001
|
}
|
|
6819
7002
|
_selectItem(item, clearFilter = true) {
|
|
6820
|
-
if (this.selectionMode === `single`)
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
} else if (this._selectedValues.has(item.value)) {
|
|
7003
|
+
if (this.selectionMode === `single`) if (this._selectedValues.has(item.value) && !this.requiredSelection) this._selectedValues.clear();
|
|
7004
|
+
else {
|
|
7005
|
+
this._selectedValues.clear();
|
|
7006
|
+
this._selectedValues.add(item.value);
|
|
7007
|
+
}
|
|
7008
|
+
else if (this._selectedValues.has(item.value)) {
|
|
6827
7009
|
if (!this.requiredSelection || this._selectedValues.size > 1) this._selectedValues.delete(item.value);
|
|
6828
7010
|
} else this._selectedValues.add(item.value);
|
|
6829
7011
|
this._updateValueFromSelected();
|
|
@@ -7205,6 +7387,7 @@ let CrumbNavigationElement = class CrumbNavigationElement extends i {
|
|
|
7205
7387
|
e.preventDefault();
|
|
7206
7388
|
this.#shiftFocusToNarrowedText();
|
|
7207
7389
|
}
|
|
7390
|
+
break;
|
|
7208
7391
|
}
|
|
7209
7392
|
};
|
|
7210
7393
|
this.#onNarrowedTextBlur = () => {
|
|
@@ -7513,9 +7696,9 @@ let CrumbNavigationElement = class CrumbNavigationElement extends i {
|
|
|
7513
7696
|
const previous = this.selectedNode;
|
|
7514
7697
|
if (previous) this.#previousSelectionKey = previous.item?.key ?? ``;
|
|
7515
7698
|
else this.#previousSelectionKey = ``;
|
|
7516
|
-
const previousSet = previous ?
|
|
7699
|
+
const previousSet = previous ? new Set([previous]) : /* @__PURE__ */ new Set();
|
|
7517
7700
|
this.selectedNode = node;
|
|
7518
|
-
this._selectedNodes =
|
|
7701
|
+
this._selectedNodes = new Set([node]);
|
|
7519
7702
|
if (this.root) {
|
|
7520
7703
|
const path = this.#findPath(this.root, node);
|
|
7521
7704
|
if (path) {
|
|
@@ -7530,7 +7713,7 @@ let CrumbNavigationElement = class CrumbNavigationElement extends i {
|
|
|
7530
7713
|
}
|
|
7531
7714
|
this.dispatchEvent(new CustomEvent(`select`, {
|
|
7532
7715
|
detail: {
|
|
7533
|
-
selected:
|
|
7716
|
+
selected: new Set([node]),
|
|
7534
7717
|
previous: previousSet
|
|
7535
7718
|
},
|
|
7536
7719
|
bubbles: true,
|
|
@@ -8354,6 +8537,7 @@ let CrumbPathElement = class CrumbPathElement extends i {
|
|
|
8354
8537
|
case `Escape`:
|
|
8355
8538
|
e.preventDefault();
|
|
8356
8539
|
this.#closeDropdown();
|
|
8540
|
+
break;
|
|
8357
8541
|
}
|
|
8358
8542
|
};
|
|
8359
8543
|
this.#onHostKeyDown = (e) => {
|
|
@@ -8692,11 +8876,9 @@ let CrumbPathElement = class CrumbPathElement extends i {
|
|
|
8692
8876
|
#onHostKeyDown;
|
|
8693
8877
|
render() {
|
|
8694
8878
|
const segments = this.#getSegments();
|
|
8695
|
-
if (this._editing)
|
|
8696
|
-
const editValue = this.path;
|
|
8697
|
-
return b`
|
|
8879
|
+
if (this._editing) return b`
|
|
8698
8880
|
<ixfx-ac-text
|
|
8699
|
-
.value=${
|
|
8881
|
+
.value=${this.path}
|
|
8700
8882
|
.tabSuffix=${this.separator}
|
|
8701
8883
|
.completionProvider=${this.#makeCompletionProvider()}
|
|
8702
8884
|
@change=${this.#onAcChange}
|
|
@@ -8704,7 +8886,6 @@ let CrumbPathElement = class CrumbPathElement extends i {
|
|
|
8704
8886
|
@keydown=${this.#onAcKeyDown}
|
|
8705
8887
|
></ixfx-ac-text>
|
|
8706
8888
|
`;
|
|
8707
|
-
}
|
|
8708
8889
|
const rootSegments = this.#getRootSegments();
|
|
8709
8890
|
const leadingCaret = this.siblingLookup && rootSegments.length === 0 ? b`
|
|
8710
8891
|
<div class="caret ${this._openIdx === -1 ? `open` : ``} ${this._confirmedLeafIndices.has(``) ? `disabled` : ``}"
|
|
@@ -9049,16 +9230,15 @@ let DataDisplayComponent = class DataDisplayComponent extends i {
|
|
|
9049
9230
|
}
|
|
9050
9231
|
continue;
|
|
9051
9232
|
}
|
|
9052
|
-
if (typeof value === `object` && value !== null && !Array.isArray(value))
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
this.#renderNestedDisplay(row, value, true);
|
|
9057
|
-
} else {
|
|
9058
|
-
const row = this.#ensureRow(fullPath, key);
|
|
9059
|
-
this.#renderNestedDisplay(row, value);
|
|
9060
|
-
}
|
|
9233
|
+
if (typeof value === `object` && value !== null && !Array.isArray(value)) if (this.#hasDescendantConfig(fullPath)) this.#walk(value, fullPath, activePaths);
|
|
9234
|
+
else if (this.automap) {
|
|
9235
|
+
const row = this.#ensureRow(fullPath, key);
|
|
9236
|
+
this.#renderNestedDisplay(row, value, true);
|
|
9061
9237
|
} else {
|
|
9238
|
+
const row = this.#ensureRow(fullPath, key);
|
|
9239
|
+
this.#renderNestedDisplay(row, value);
|
|
9240
|
+
}
|
|
9241
|
+
else {
|
|
9062
9242
|
const autoStyle = this.#determineAutoStyle(value);
|
|
9063
9243
|
if (autoStyle !== void 0) {
|
|
9064
9244
|
const row = this.#ensureRow(fullPath, key);
|
|
@@ -9139,15 +9319,13 @@ let DataDisplayComponent = class DataDisplayComponent extends i {
|
|
|
9139
9319
|
case `plot`:
|
|
9140
9320
|
if (typeof value === `number`) {
|
|
9141
9321
|
if (changed) el.add(value);
|
|
9142
|
-
} else if (typeof value === `object` && value !== null && changed) {
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
} else el.addData(value);
|
|
9150
|
-
}
|
|
9322
|
+
} else if (typeof value === `object` && value !== null && changed) if (Array.isArray(value)) {
|
|
9323
|
+
const record = {};
|
|
9324
|
+
value.forEach((v, i) => {
|
|
9325
|
+
if (typeof v === `number`) record[String(i)] = v;
|
|
9326
|
+
});
|
|
9327
|
+
if (Object.keys(record).length > 0) el.addData(record);
|
|
9328
|
+
} else el.addData(value);
|
|
9151
9329
|
this.#applyPlotOptions(el, style, options);
|
|
9152
9330
|
break;
|
|
9153
9331
|
case `plot-xy`:
|
|
@@ -9159,7 +9337,9 @@ let DataDisplayComponent = class DataDisplayComponent extends i {
|
|
|
9159
9337
|
if (typeof value === `number` && changed) el.add(value);
|
|
9160
9338
|
this.#applyPlotOptions(el, style, options);
|
|
9161
9339
|
break;
|
|
9162
|
-
case `time-elapsed`:
|
|
9340
|
+
case `time-elapsed`:
|
|
9341
|
+
el.textContent = this.#formatTimeElapsed(value);
|
|
9342
|
+
break;
|
|
9163
9343
|
}
|
|
9164
9344
|
this.#previousValues.set(path, value);
|
|
9165
9345
|
}
|
|
@@ -9205,10 +9385,9 @@ let DataDisplayComponent = class DataDisplayComponent extends i {
|
|
|
9205
9385
|
#formatTimeElapsed(value) {
|
|
9206
9386
|
let timestamp;
|
|
9207
9387
|
if (value instanceof Date) timestamp = value.getTime();
|
|
9208
|
-
else if (typeof value === `number`)
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
} else if (typeof value === `string`) timestamp = new Date(value).getTime();
|
|
9388
|
+
else if (typeof value === `number`) if (value > 0xe8d4a51000) timestamp = value;
|
|
9389
|
+
else timestamp = Date.now();
|
|
9390
|
+
else if (typeof value === `string`) timestamp = new Date(value).getTime();
|
|
9212
9391
|
else return String(value);
|
|
9213
9392
|
if (Number.isNaN(timestamp)) return String(value);
|
|
9214
9393
|
const elapsed = Date.now() - timestamp;
|
|
@@ -9940,15 +10119,14 @@ let EditableNumber = class EditableNumber extends WheelNudgeMixin(EditableLabel)
|
|
|
9940
10119
|
this.style.setProperty(`--value`, String(normalized));
|
|
9941
10120
|
let valueStart = 0;
|
|
9942
10121
|
let valueEnd = normalized;
|
|
9943
|
-
if (this.linearStyle === `bipolar`) {
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
} else if (this.linearStyle === `unipolar`) {
|
|
10122
|
+
if (this.linearStyle === `bipolar`) if (normalized <= .5) {
|
|
10123
|
+
valueStart = normalized;
|
|
10124
|
+
valueEnd = .5;
|
|
10125
|
+
} else {
|
|
10126
|
+
valueStart = .5;
|
|
10127
|
+
valueEnd = normalized;
|
|
10128
|
+
}
|
|
10129
|
+
else if (this.linearStyle === `unipolar`) {
|
|
9952
10130
|
valueStart = .5 - normalized * .5;
|
|
9953
10131
|
valueEnd = .5 + normalized * .5;
|
|
9954
10132
|
}
|
|
@@ -10011,6 +10189,7 @@ let EditableNumber = class EditableNumber extends WheelNudgeMixin(EditableLabel)
|
|
|
10011
10189
|
case `End`:
|
|
10012
10190
|
delta = (this.max ?? 0) - this._parseValue();
|
|
10013
10191
|
handled = true;
|
|
10192
|
+
break;
|
|
10014
10193
|
}
|
|
10015
10194
|
if (handled) {
|
|
10016
10195
|
e.preventDefault();
|
|
@@ -10359,15 +10538,13 @@ function collectFormValues(root) {
|
|
|
10359
10538
|
root.querySelectorAll(`[name]`).forEach((el) => {
|
|
10360
10539
|
const name = el.getAttribute(`name`);
|
|
10361
10540
|
if (!name) return;
|
|
10362
|
-
if (el instanceof HTMLInputElement) {
|
|
10363
|
-
if (el.
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
else values[name] = el.value;
|
|
10370
|
-
} else if (el instanceof HTMLTextAreaElement) values[name] = el.value;
|
|
10541
|
+
if (el instanceof HTMLInputElement) if (el.type === `radio`) {
|
|
10542
|
+
if (el.checked) values[name] = el.value;
|
|
10543
|
+
} else if (el.type === `checkbox`) values[name] = el.checked;
|
|
10544
|
+
else values[name] = el.value;
|
|
10545
|
+
else if (el instanceof HTMLSelectElement) if (el.multiple) values[name] = Array.from(el.selectedOptions).map((opt) => opt.value);
|
|
10546
|
+
else values[name] = el.value;
|
|
10547
|
+
else if (el instanceof HTMLTextAreaElement) values[name] = el.value;
|
|
10371
10548
|
else if (`value` in el) values[name] = el.value;
|
|
10372
10549
|
});
|
|
10373
10550
|
return values;
|
|
@@ -11103,6 +11280,7 @@ let TreeBaseElement = class TreeBaseElement extends i {
|
|
|
11103
11280
|
case `Escape`:
|
|
11104
11281
|
event.preventDefault();
|
|
11105
11282
|
this.#abortPending();
|
|
11283
|
+
break;
|
|
11106
11284
|
}
|
|
11107
11285
|
};
|
|
11108
11286
|
this.#onDblClick = (e) => {
|
|
@@ -11364,7 +11542,9 @@ let TreeBaseElement = class TreeBaseElement extends i {
|
|
|
11364
11542
|
case `manual`:
|
|
11365
11543
|
this.#handleManualClick(node, depth, event);
|
|
11366
11544
|
break;
|
|
11367
|
-
case `checked`:
|
|
11545
|
+
case `checked`:
|
|
11546
|
+
this.#handleExpandOnly(node, depth);
|
|
11547
|
+
break;
|
|
11368
11548
|
}
|
|
11369
11549
|
this.requestUpdate();
|
|
11370
11550
|
}
|
|
@@ -11531,10 +11711,8 @@ let TreeBaseElement = class TreeBaseElement extends i {
|
|
|
11531
11711
|
return node.children.every((child) => this.#allDescendantsSelected(child));
|
|
11532
11712
|
}
|
|
11533
11713
|
#applyCheckedToggle(node, selected) {
|
|
11534
|
-
if (this.#canSelect(node))
|
|
11535
|
-
|
|
11536
|
-
else this._selectedNodes.delete(node);
|
|
11537
|
-
}
|
|
11714
|
+
if (this.#canSelect(node)) if (selected) this._selectedNodes.add(node);
|
|
11715
|
+
else this._selectedNodes.delete(node);
|
|
11538
11716
|
if (node.children) for (const child of node.children) this.#applyCheckedToggle(child, selected);
|
|
11539
11717
|
}
|
|
11540
11718
|
#getFlatIndexOf(node) {
|
|
@@ -12352,7 +12530,9 @@ let VerticalListElement = class VerticalListElement extends i {
|
|
|
12352
12530
|
}
|
|
12353
12531
|
break;
|
|
12354
12532
|
}
|
|
12355
|
-
case `Escape`:
|
|
12533
|
+
case `Escape`:
|
|
12534
|
+
this._clearSelection();
|
|
12535
|
+
break;
|
|
12356
12536
|
}
|
|
12357
12537
|
};
|
|
12358
12538
|
this._onClick = (e) => {
|
|
@@ -12540,7 +12720,7 @@ let VerticalListElement = class VerticalListElement extends i {
|
|
|
12540
12720
|
if (this.selectionMode === `none`) return;
|
|
12541
12721
|
if (!this._isCheckable(item)) return;
|
|
12542
12722
|
const previous = this._selectedItems;
|
|
12543
|
-
const next =
|
|
12723
|
+
const next = new Set([item]);
|
|
12544
12724
|
this._selectedItems = next;
|
|
12545
12725
|
this.#selectionAnchor = item;
|
|
12546
12726
|
this._syncItemStates();
|
|
@@ -12630,7 +12810,9 @@ let VerticalListElement = class VerticalListElement extends i {
|
|
|
12630
12810
|
else this._replaceSelection(item);
|
|
12631
12811
|
break;
|
|
12632
12812
|
case `checked`: break;
|
|
12633
|
-
case `sticky`:
|
|
12813
|
+
case `sticky`:
|
|
12814
|
+
this._toggleItem(item);
|
|
12815
|
+
break;
|
|
12634
12816
|
}
|
|
12635
12817
|
}
|
|
12636
12818
|
_handleSpaceKey(item) {
|
|
@@ -12717,10 +12899,7 @@ let VerticalListElement = class VerticalListElement extends i {
|
|
|
12717
12899
|
if (wantsCustom) {
|
|
12718
12900
|
cb.setAttribute(`aria-checked`, String(checked));
|
|
12719
12901
|
cb.toggleAttribute(`data-checked`, checked);
|
|
12720
|
-
if (this.checkboxRenderer)
|
|
12721
|
-
const renderer = typeof this.checkboxRenderer === `function` ? this.checkboxRenderer : this.checkboxRenderer.renderer;
|
|
12722
|
-
D(renderer(checked), cb);
|
|
12723
|
-
}
|
|
12902
|
+
if (this.checkboxRenderer) D((typeof this.checkboxRenderer === `function` ? this.checkboxRenderer : this.checkboxRenderer.renderer)(checked), cb);
|
|
12724
12903
|
} else {
|
|
12725
12904
|
const input = cb.querySelector(`input.ixfx-list-checkbox`);
|
|
12726
12905
|
if (input) input.checked = checked;
|
|
@@ -13130,7 +13309,7 @@ function createVerticalListAdapter(renderItem, options) {
|
|
|
13130
13309
|
}
|
|
13131
13310
|
//#endregion
|
|
13132
13311
|
//#region src/hex/colour.ts
|
|
13133
|
-
const WHITESPACE_BYTES =
|
|
13312
|
+
const WHITESPACE_BYTES = new Set([
|
|
13134
13313
|
9,
|
|
13135
13314
|
10,
|
|
13136
13315
|
11,
|
|
@@ -13179,7 +13358,7 @@ function clamp$3(value) {
|
|
|
13179
13358
|
function writeByte(store, pos, value) {
|
|
13180
13359
|
const clampedValue = clamp$3(value);
|
|
13181
13360
|
const before = store.data[pos];
|
|
13182
|
-
const diff =
|
|
13361
|
+
const diff = new Map([[pos, {
|
|
13183
13362
|
before,
|
|
13184
13363
|
after: clampedValue
|
|
13185
13364
|
}]]);
|
|
@@ -13388,7 +13567,9 @@ function extendRectangular(sel, dir, columns, _dataLength, anchorX = 0, anchorY
|
|
|
13388
13567
|
height += 1;
|
|
13389
13568
|
}
|
|
13390
13569
|
break;
|
|
13391
|
-
case `down`:
|
|
13570
|
+
case `down`:
|
|
13571
|
+
height += 1;
|
|
13572
|
+
break;
|
|
13392
13573
|
}
|
|
13393
13574
|
return {
|
|
13394
13575
|
kind: `rectangular`,
|
|
@@ -13434,7 +13615,7 @@ let IxfxHexEditorElement = class IxfxHexEditorElement extends i {
|
|
|
13434
13615
|
this._containerH = 0;
|
|
13435
13616
|
this._shadeMap = null;
|
|
13436
13617
|
this._focusSide = null;
|
|
13437
|
-
this._store = createHexStore(
|
|
13618
|
+
this._store = createHexStore(new Uint8Array(0));
|
|
13438
13619
|
this._undoStack = createUndoRedoStack();
|
|
13439
13620
|
this._copyBuffer = null;
|
|
13440
13621
|
this._rowHeight = 24;
|
|
@@ -14312,10 +14493,7 @@ function valueToAngle(relativeValue, valueMode, flatten) {
|
|
|
14312
14493
|
switch (valueMode) {
|
|
14313
14494
|
case `range`: return startAngle + relativeValue * totalArc;
|
|
14314
14495
|
case `bipolar`: if (relativeValue <= .5) return startAngle + relativeValue / .5 * (MIDPOINT_ANGLE - startAngle);
|
|
14315
|
-
else
|
|
14316
|
-
const t = (relativeValue - .5) / .5;
|
|
14317
|
-
return MIDPOINT_ANGLE + t * (endAngle - MIDPOINT_ANGLE);
|
|
14318
|
-
}
|
|
14496
|
+
else return MIDPOINT_ANGLE + (relativeValue - .5) / .5 * (endAngle - MIDPOINT_ANGLE);
|
|
14319
14497
|
case `unipolar`: return MIDPOINT_ANGLE;
|
|
14320
14498
|
default: return startAngle;
|
|
14321
14499
|
}
|
|
@@ -14338,14 +14516,11 @@ function getValueArcAngles(relativeValue, valueMode, flatten) {
|
|
|
14338
14516
|
startAngle: startAngle + relativeValue / .5 * (MIDPOINT_ANGLE - startAngle),
|
|
14339
14517
|
endAngle: MIDPOINT_ANGLE
|
|
14340
14518
|
};
|
|
14341
|
-
else if (relativeValue > .5) {
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
endAngle: valueAngle
|
|
14347
|
-
};
|
|
14348
|
-
} else return {
|
|
14519
|
+
else if (relativeValue > .5) return {
|
|
14520
|
+
startAngle: MIDPOINT_ANGLE,
|
|
14521
|
+
endAngle: MIDPOINT_ANGLE + (relativeValue - .5) / .5 * (endAngle - MIDPOINT_ANGLE)
|
|
14522
|
+
};
|
|
14523
|
+
else return {
|
|
14349
14524
|
startAngle: MIDPOINT_ANGLE,
|
|
14350
14525
|
endAngle: MIDPOINT_ANGLE
|
|
14351
14526
|
};
|
|
@@ -14536,10 +14711,9 @@ function getMidpointPosition(radius, center = {
|
|
|
14536
14711
|
x: 50,
|
|
14537
14712
|
y: 50
|
|
14538
14713
|
}) {
|
|
14539
|
-
const position = polarToCartesian(MIDPOINT_ANGLE, radius, center);
|
|
14540
14714
|
return {
|
|
14541
14715
|
angle: MIDPOINT_ANGLE,
|
|
14542
|
-
position
|
|
14716
|
+
position: polarToCartesian(MIDPOINT_ANGLE, radius, center)
|
|
14543
14717
|
};
|
|
14544
14718
|
}
|
|
14545
14719
|
/**
|
|
@@ -14647,6 +14821,7 @@ let RadialInputElement = class RadialInputElement extends WheelNudgeMixin(i) {
|
|
|
14647
14821
|
case `End`:
|
|
14648
14822
|
this.#setValueFromRelative(1, true);
|
|
14649
14823
|
handled = true;
|
|
14824
|
+
break;
|
|
14650
14825
|
}
|
|
14651
14826
|
if (handled) event.preventDefault();
|
|
14652
14827
|
};
|
|
@@ -14769,13 +14944,10 @@ let RadialInputElement = class RadialInputElement extends WheelNudgeMixin(i) {
|
|
|
14769
14944
|
#renderCircleBorder() {
|
|
14770
14945
|
const path = generateCircleBorderPath(this.radius, this.flatten, CENTER);
|
|
14771
14946
|
const borderWidth = this.#getCssVar(`--dial-border-width`, 2);
|
|
14772
|
-
|
|
14773
|
-
return w`<path class="dial-border" d="${path}" fill="none" stroke="${borderColor}" stroke-width="${borderWidth}" stroke-linecap="round" vector-effect="non-scaling-stroke" />`;
|
|
14947
|
+
return w`<path class="dial-border" d="${path}" fill="none" stroke="${getComputedStyle(this).getPropertyValue(`--dial-border-color`).trim() || `var(--surface-4)`}" stroke-width="${borderWidth}" stroke-linecap="round" vector-effect="non-scaling-stroke" />`;
|
|
14774
14948
|
}
|
|
14775
14949
|
#renderCircleFill() {
|
|
14776
|
-
|
|
14777
|
-
const fill = getComputedStyle(this).getPropertyValue(`--dial-fill`).trim() || `transparent`;
|
|
14778
|
-
return w`<path class="dial-fill" d="${path}" fill="${fill}" />`;
|
|
14950
|
+
return w`<path class="dial-fill" d="${generateCircleBorderPath(this.radius, this.flatten, CENTER)}" fill="${getComputedStyle(this).getPropertyValue(`--dial-fill`).trim() || `transparent`}" />`;
|
|
14779
14951
|
}
|
|
14780
14952
|
#renderWedge() {
|
|
14781
14953
|
const { startAngle, endAngle, clockwise } = getWedgeAngles(this.#getRelativeValue(), this.valueMode, this.flatten);
|
|
@@ -14849,10 +15021,9 @@ let RadialInputElement = class RadialInputElement extends WheelNudgeMixin(i) {
|
|
|
14849
15021
|
`;
|
|
14850
15022
|
const length = this.#getCssVar(`--marker-length`, .8);
|
|
14851
15023
|
const offset = this.#getCssVar(`--marker-offset`, .2);
|
|
14852
|
-
const path = this.#getNeedlePath(angle, length, offset);
|
|
14853
15024
|
return w`
|
|
14854
15025
|
<g class="value-marker" part="value-marker">
|
|
14855
|
-
<path d="${
|
|
15026
|
+
<path d="${this.#getNeedlePath(angle, length, offset)}" />
|
|
14856
15027
|
</g>
|
|
14857
15028
|
`;
|
|
14858
15029
|
}
|
|
@@ -15327,16 +15498,14 @@ let LedElement = class LedElement extends i {
|
|
|
15327
15498
|
}
|
|
15328
15499
|
#blinkInterval;
|
|
15329
15500
|
willUpdate(changedProperties) {
|
|
15330
|
-
if (changedProperties.has(`
|
|
15501
|
+
if (changedProperties.has(`lit`)) this.value = this.lit ? 1 : 0;
|
|
15502
|
+
if (changedProperties.has(`value`) || changedProperties.has(`lit`)) this.style.setProperty(`--value`, String(this.value));
|
|
15331
15503
|
if (changedProperties.has(`blinking`) || changedProperties.has(`rate`)) this.#updateBlinking();
|
|
15332
15504
|
if (changedProperties.has(`rate`)) {
|
|
15333
15505
|
const transitionMs = this.rate < 300 ? this.rate * .5 : 150;
|
|
15334
15506
|
this.style.setProperty(`--transition-duration`, `${transitionMs}ms`);
|
|
15335
15507
|
}
|
|
15336
15508
|
}
|
|
15337
|
-
updated(changedProperties) {
|
|
15338
|
-
if (changedProperties.has(`lit`)) this.value = this.lit ? 1 : 0;
|
|
15339
|
-
}
|
|
15340
15509
|
disconnectedCallback() {
|
|
15341
15510
|
super.disconnectedCallback();
|
|
15342
15511
|
this.#stopBlinking();
|
|
@@ -15801,6 +15970,7 @@ let MenuSubTrigger = class MenuSubTrigger extends i {
|
|
|
15801
15970
|
e.preventDefault();
|
|
15802
15971
|
e.stopPropagation();
|
|
15803
15972
|
this._hideSubmenu();
|
|
15973
|
+
break;
|
|
15804
15974
|
}
|
|
15805
15975
|
}
|
|
15806
15976
|
static {
|
|
@@ -16372,20 +16542,19 @@ let MillerBaseElement = class MillerBaseElement extends i {
|
|
|
16372
16542
|
const tickled = this.#getTickledNodeAndDepth();
|
|
16373
16543
|
if (!tickled) return;
|
|
16374
16544
|
const { node, depth, index } = tickled;
|
|
16375
|
-
if (this.interactionMode === `standard` || this.interactionMode === `vscode`) {
|
|
16376
|
-
|
|
16377
|
-
|
|
16378
|
-
|
|
16379
|
-
|
|
16380
|
-
|
|
16381
|
-
|
|
16382
|
-
|
|
16383
|
-
|
|
16384
|
-
|
|
16385
|
-
|
|
16386
|
-
|
|
16387
|
-
|
|
16388
|
-
} else this._selectedByDepth.set(depth, node);
|
|
16545
|
+
if (this.interactionMode === `standard` || this.interactionMode === `vscode`) if (event.shiftKey && this.#anchor?.depth === depth) {
|
|
16546
|
+
const from = Math.min(this.#anchor.index, index);
|
|
16547
|
+
const to = Math.max(this.#anchor.index, index);
|
|
16548
|
+
this._selectedKeys = new Set(col.slice(from, to + 1).map((n) => n.item.key));
|
|
16549
|
+
} else {
|
|
16550
|
+
this._selectedKeys.add(node.item.key);
|
|
16551
|
+
this.#anchor = {
|
|
16552
|
+
key: node.item.key,
|
|
16553
|
+
depth,
|
|
16554
|
+
index
|
|
16555
|
+
};
|
|
16556
|
+
}
|
|
16557
|
+
else this._selectedByDepth.set(depth, node);
|
|
16389
16558
|
this.dispatchEvent(new CustomEvent(`activate`, {
|
|
16390
16559
|
detail: {
|
|
16391
16560
|
node,
|
|
@@ -16411,6 +16580,7 @@ let MillerBaseElement = class MillerBaseElement extends i {
|
|
|
16411
16580
|
}
|
|
16412
16581
|
this.requestUpdate();
|
|
16413
16582
|
}
|
|
16583
|
+
break;
|
|
16414
16584
|
}
|
|
16415
16585
|
};
|
|
16416
16586
|
this.#onResizeStart = (event, depth) => {
|
|
@@ -16539,7 +16709,7 @@ let MillerBaseElement = class MillerBaseElement extends i {
|
|
|
16539
16709
|
set selectedNode(node) {
|
|
16540
16710
|
this.#lastSelectedNode = node;
|
|
16541
16711
|
if (node) {
|
|
16542
|
-
if (this.interactionMode === `implicit` || this.interactionMode === `standard`) this._selectedKeys =
|
|
16712
|
+
if (this.interactionMode === `implicit` || this.interactionMode === `standard`) this._selectedKeys = new Set([node.item.key]);
|
|
16543
16713
|
}
|
|
16544
16714
|
this.requestUpdate();
|
|
16545
16715
|
}
|
|
@@ -16640,7 +16810,7 @@ let MillerBaseElement = class MillerBaseElement extends i {
|
|
|
16640
16810
|
if (lastNode) this.tickled.setTickled(this.#buildTickledId(lastNode, lastDepth));
|
|
16641
16811
|
if (this.interactionMode !== `implicit` && this.interactionMode !== `manual`) {
|
|
16642
16812
|
const leafKey = keys.at(-1);
|
|
16643
|
-
if (leafKey) this._selectedKeys =
|
|
16813
|
+
if (leafKey) this._selectedKeys = new Set([leafKey]);
|
|
16644
16814
|
}
|
|
16645
16815
|
this.requestUpdate();
|
|
16646
16816
|
this.#scrollNavigatedItemIntoView();
|
|
@@ -16845,14 +17015,16 @@ let MillerBaseElement = class MillerBaseElement extends i {
|
|
|
16845
17015
|
this.#handleStandardClick(node, depth, event);
|
|
16846
17016
|
break;
|
|
16847
17017
|
case `manual`: break;
|
|
16848
|
-
case `checked`:
|
|
17018
|
+
case `checked`:
|
|
17019
|
+
this.#expandNode(node, depth);
|
|
17020
|
+
break;
|
|
16849
17021
|
}
|
|
16850
17022
|
}
|
|
16851
17023
|
#handleImplicitClick(node, depth) {
|
|
16852
17024
|
const previous = new Set(this._selectedNodes);
|
|
16853
17025
|
this._selectedByDepth.set(depth, node);
|
|
16854
17026
|
this.#lastSelectedNode = node;
|
|
16855
|
-
this._selectedKeys =
|
|
17027
|
+
this._selectedKeys = new Set([node.item.key]);
|
|
16856
17028
|
this._selectedNodes.clear();
|
|
16857
17029
|
this._selectedNodes.add(node);
|
|
16858
17030
|
this.#expandNode(node, depth);
|
|
@@ -16889,8 +17061,8 @@ let MillerBaseElement = class MillerBaseElement extends i {
|
|
|
16889
17061
|
return;
|
|
16890
17062
|
}
|
|
16891
17063
|
const previous = new Set(this._selectedNodes);
|
|
16892
|
-
this._selectedKeys =
|
|
16893
|
-
this._selectedNodes =
|
|
17064
|
+
this._selectedKeys = new Set([node.item.key]);
|
|
17065
|
+
this._selectedNodes = new Set([node]);
|
|
16894
17066
|
this.#anchor = index >= 0 ? {
|
|
16895
17067
|
key: node.item.key,
|
|
16896
17068
|
depth,
|
|
@@ -18958,7 +19130,6 @@ let PlotHistogram = class PlotHistogram extends i {
|
|
|
18958
19130
|
};
|
|
18959
19131
|
} else {
|
|
18960
19132
|
const y = padding + i * bucketSize;
|
|
18961
|
-
const height = i === bucketCount - 1 ? Math.max(0, padding + availableMain - y) : Math.max(0, bucketSize - gap);
|
|
18962
19133
|
return {
|
|
18963
19134
|
count,
|
|
18964
19135
|
valueMin,
|
|
@@ -18967,7 +19138,7 @@ let PlotHistogram = class PlotHistogram extends i {
|
|
|
18967
19138
|
x: padding,
|
|
18968
19139
|
y,
|
|
18969
19140
|
width: barLen,
|
|
18970
|
-
height
|
|
19141
|
+
height: i === bucketCount - 1 ? Math.max(0, padding + availableMain - y) : Math.max(0, bucketSize - gap)
|
|
18971
19142
|
};
|
|
18972
19143
|
}
|
|
18973
19144
|
});
|
|
@@ -19219,8 +19390,7 @@ function renderArea(points, cr, bottom, areaColor) {
|
|
|
19219
19390
|
if (points.length < 2) return w``;
|
|
19220
19391
|
const lineD = buildLinePath(points);
|
|
19221
19392
|
const fillColor = areaColor || cr.fill;
|
|
19222
|
-
|
|
19223
|
-
return w`<path d=${areaD} fill=${fillColor} opacity=${cr.opacity * .2} />`;
|
|
19393
|
+
return w`<path d=${`${lineD} L ${points[points.length - 1].x},${bottom} L ${points[0].x},${bottom} Z`} fill=${fillColor} opacity=${cr.opacity * .2} />`;
|
|
19224
19394
|
}
|
|
19225
19395
|
function renderCircles(points, crs, radius, ageStyle) {
|
|
19226
19396
|
return points.map((p, i) => {
|
|
@@ -21222,13 +21392,11 @@ let RangeMultiElement = class RangeMultiElement extends i {
|
|
|
21222
21392
|
}
|
|
21223
21393
|
a = newA;
|
|
21224
21394
|
b = newB;
|
|
21225
|
-
} else if (which === `a`)
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
|
|
21230
|
-
else b = v;
|
|
21231
|
-
} else throw new Error(`Expected 'a' or 'b', got: '${t.id}'`);
|
|
21395
|
+
} else if (which === `a`) if (v > this.b && this.crossover === `stop`) t.valueAsNumber = this.#scaleTo100(this.a);
|
|
21396
|
+
else a = v;
|
|
21397
|
+
else if (which === `b`) if (v < a && this.crossover === `stop`) t.valueAsNumber = this.#scaleTo100(this.b);
|
|
21398
|
+
else b = v;
|
|
21399
|
+
else throw new Error(`Expected 'a' or 'b', got: '${t.id}'`);
|
|
21232
21400
|
this.setPoles(a, b);
|
|
21233
21401
|
}
|
|
21234
21402
|
setPoles(a, b) {
|
|
@@ -21287,65 +21455,63 @@ let RangeMultiElement = class RangeMultiElement extends i {
|
|
|
21287
21455
|
const currentPos = isVertical ? current.offset.y : current.offset.x;
|
|
21288
21456
|
const amt = (isVertical ? startPos - currentPos : currentPos - startPos) / valuePerPix;
|
|
21289
21457
|
polesChanged = true;
|
|
21290
|
-
if (draggingWhich === `a`) {
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
calcB = startB - amt;
|
|
21304
|
-
}
|
|
21305
|
-
if (calcA < min) calcA = min;
|
|
21306
|
-
if (calcA > max) calcA = max;
|
|
21307
|
-
if (calcB < min) calcB = min;
|
|
21308
|
-
if (calcB > max) calcB = max;
|
|
21309
|
-
if (calcA > calcB) return;
|
|
21310
|
-
setPoles(calcA, calcB);
|
|
21311
|
-
} else {
|
|
21312
|
-
let constrainedAmt = amt;
|
|
21313
|
-
if (startA + amt < min) constrainedAmt = min - startA;
|
|
21314
|
-
if (startB + constrainedAmt > max) constrainedAmt = max - startB;
|
|
21315
|
-
const finalA = startA + constrainedAmt;
|
|
21316
|
-
const finalB = startB + constrainedAmt;
|
|
21317
|
-
if (finalA >= min && finalB <= max) setPoles(finalA, finalB);
|
|
21458
|
+
if (draggingWhich === `a`) if (resizeMode === `bipolar`) {
|
|
21459
|
+
const calcA = startA + amt;
|
|
21460
|
+
const calcB = startB - amt;
|
|
21461
|
+
if (calcA < min || calcB > max || calcA > max || calcB < min) return;
|
|
21462
|
+
setPoles(calcA, calcB);
|
|
21463
|
+
} else if (resizeMode === `bipolar-flex`) {
|
|
21464
|
+
let calcA = startA + amt;
|
|
21465
|
+
let calcB = startB;
|
|
21466
|
+
if (startB <= min) calcB = min;
|
|
21467
|
+
else if (startB >= max) calcB = max;
|
|
21468
|
+
else {
|
|
21469
|
+
calcA = startA + amt;
|
|
21470
|
+
calcB = startB - amt;
|
|
21318
21471
|
}
|
|
21319
|
-
|
|
21320
|
-
if (
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
|
|
21326
|
-
|
|
21327
|
-
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
|
|
21344
|
-
|
|
21345
|
-
|
|
21346
|
-
if (finalA >= min && finalB <= max) setPoles(finalA, finalB);
|
|
21472
|
+
if (calcA < min) calcA = min;
|
|
21473
|
+
if (calcA > max) calcA = max;
|
|
21474
|
+
if (calcB < min) calcB = min;
|
|
21475
|
+
if (calcB > max) calcB = max;
|
|
21476
|
+
if (calcA > calcB) return;
|
|
21477
|
+
setPoles(calcA, calcB);
|
|
21478
|
+
} else {
|
|
21479
|
+
let constrainedAmt = amt;
|
|
21480
|
+
if (startA + amt < min) constrainedAmt = min - startA;
|
|
21481
|
+
if (startB + constrainedAmt > max) constrainedAmt = max - startB;
|
|
21482
|
+
const finalA = startA + constrainedAmt;
|
|
21483
|
+
const finalB = startB + constrainedAmt;
|
|
21484
|
+
if (finalA >= min && finalB <= max) setPoles(finalA, finalB);
|
|
21485
|
+
}
|
|
21486
|
+
else if (draggingWhich === `b`) if (resizeMode === `bipolar`) {
|
|
21487
|
+
const calcA = startA - amt;
|
|
21488
|
+
const calcB = startB + amt;
|
|
21489
|
+
if (calcA < min || calcB > max || calcA > max || calcB < min) return;
|
|
21490
|
+
setPoles(calcA, calcB);
|
|
21491
|
+
} else if (resizeMode === `bipolar-flex`) {
|
|
21492
|
+
let calcA = startA;
|
|
21493
|
+
let calcB = startB + amt;
|
|
21494
|
+
if (startA <= min) calcA = min;
|
|
21495
|
+
else if (startA >= max) calcA = max;
|
|
21496
|
+
else {
|
|
21497
|
+
calcA = startA - amt;
|
|
21498
|
+
calcB = startB + amt;
|
|
21347
21499
|
}
|
|
21348
|
-
|
|
21500
|
+
if (calcA < min) calcA = min;
|
|
21501
|
+
if (calcA > max) calcA = max;
|
|
21502
|
+
if (calcB < min) calcB = min;
|
|
21503
|
+
if (calcB > max) calcB = max;
|
|
21504
|
+
if (calcA > calcB) return;
|
|
21505
|
+
setPoles(calcA, calcB);
|
|
21506
|
+
} else {
|
|
21507
|
+
let constrainedAmt = amt;
|
|
21508
|
+
if (startA + amt < min) constrainedAmt = min - startA;
|
|
21509
|
+
if (startB + constrainedAmt > max) constrainedAmt = max - startB;
|
|
21510
|
+
const finalA = startA + constrainedAmt;
|
|
21511
|
+
const finalB = startB + constrainedAmt;
|
|
21512
|
+
if (finalA >= min && finalB <= max) setPoles(finalA, finalB);
|
|
21513
|
+
}
|
|
21514
|
+
else if (resizeMode === `bipolar`) {
|
|
21349
21515
|
const calcA = startA + amt;
|
|
21350
21516
|
const calcB = startB + amt;
|
|
21351
21517
|
if (calcA < min || calcB > max) return;
|
|
@@ -21906,13 +22072,13 @@ let SelectHorizElement = class SelectHorizElement extends WheelNudgeMixin(i) {
|
|
|
21906
22072
|
|
|
21907
22073
|
::slotted(.tickled) {
|
|
21908
22074
|
background: var(--item-bg-tickled);
|
|
21909
|
-
border
|
|
22075
|
+
border: var(--item-border-tickled);
|
|
21910
22076
|
color: var(--item-text-tickled);
|
|
21911
22077
|
}
|
|
21912
22078
|
|
|
21913
22079
|
::slotted([selected]) {
|
|
21914
22080
|
background: var(--item-bg-selected);
|
|
21915
|
-
border
|
|
22081
|
+
border: var(--item-border-selected);
|
|
21916
22082
|
color: var(--item-text-selected);
|
|
21917
22083
|
}
|
|
21918
22084
|
|
|
@@ -22037,14 +22203,14 @@ function getTrackBounds(orientation) {
|
|
|
22037
22203
|
if (orientation === `horizontal`) return {
|
|
22038
22204
|
trackStart: 5,
|
|
22039
22205
|
trackEnd: 95,
|
|
22040
|
-
centre:
|
|
22041
|
-
crossCentre:
|
|
22206
|
+
centre: 100 / 2,
|
|
22207
|
+
crossCentre: 24 / 2
|
|
22042
22208
|
};
|
|
22043
22209
|
return {
|
|
22044
22210
|
trackStart: 5,
|
|
22045
22211
|
trackEnd: 95,
|
|
22046
|
-
centre:
|
|
22047
|
-
crossCentre:
|
|
22212
|
+
centre: 100 / 2,
|
|
22213
|
+
crossCentre: 24 / 2
|
|
22048
22214
|
};
|
|
22049
22215
|
}
|
|
22050
22216
|
/**
|
|
@@ -22064,12 +22230,11 @@ function valueToPosition(relativeValue, singleStyle, trackBounds, orientation) {
|
|
|
22064
22230
|
const crossCentre = trackBounds.crossCentre;
|
|
22065
22231
|
let pos;
|
|
22066
22232
|
if (singleStyle === `range`) pos = trackBounds.trackStart + relativeValue * span;
|
|
22067
|
-
else if (singleStyle === `bipolar`) {
|
|
22068
|
-
|
|
22069
|
-
|
|
22070
|
-
|
|
22071
|
-
|
|
22072
|
-
} else pos = centre + relativeValue * span / 2;
|
|
22233
|
+
else if (singleStyle === `bipolar`) if (relativeValue <= .5) {
|
|
22234
|
+
const t = relativeValue / .5;
|
|
22235
|
+
pos = trackBounds.trackStart + t * (centre - trackBounds.trackStart);
|
|
22236
|
+
} else pos = centre + (relativeValue - .5) / .5 * (trackBounds.trackEnd - centre);
|
|
22237
|
+
else pos = centre + relativeValue * span / 2;
|
|
22073
22238
|
if (orientation === `horizontal`) return {
|
|
22074
22239
|
x: pos,
|
|
22075
22240
|
y: crossCentre
|
|
@@ -22480,6 +22645,7 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
22480
22645
|
if (this.valueMode === `single`) this.#setSingleValueFromRelative(1, true);
|
|
22481
22646
|
else this.#stepHandleByRelativeDelta(handle, 1);
|
|
22482
22647
|
handled = true;
|
|
22648
|
+
break;
|
|
22483
22649
|
}
|
|
22484
22650
|
if (handled) event.preventDefault();
|
|
22485
22651
|
};
|
|
@@ -22725,10 +22891,9 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
22725
22891
|
const gap = this.#getEffectiveValueMin();
|
|
22726
22892
|
const other = handle === `a` ? poleB : poleA;
|
|
22727
22893
|
let desired = this.#quantise(clamp$1(proposed, this.min, this.max));
|
|
22728
|
-
if (this.crossover === `none`)
|
|
22729
|
-
|
|
22730
|
-
|
|
22731
|
-
} else if (desired > other - gap && desired < other + gap) desired = Math.abs(desired - (other - gap)) <= Math.abs(desired - (other + gap)) ? other - gap : other + gap;
|
|
22894
|
+
if (this.crossover === `none`) if ((handle === `a` ? poleA : poleB) <= other) desired = Math.min(desired, other - gap);
|
|
22895
|
+
else desired = Math.max(desired, other + gap);
|
|
22896
|
+
else if (desired > other - gap && desired < other + gap) desired = Math.abs(desired - (other - gap)) <= Math.abs(desired - (other + gap)) ? other - gap : other + gap;
|
|
22732
22897
|
desired = clamp$1(desired, this.min, this.max);
|
|
22733
22898
|
if (handle === `a`) {
|
|
22734
22899
|
if (desired === poleA) return null;
|
|
@@ -23001,7 +23166,7 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
23001
23166
|
if (isVertical) return w`
|
|
23002
23167
|
<rect
|
|
23003
23168
|
class="track"
|
|
23004
|
-
x="${
|
|
23169
|
+
x="${24 / 2 - strokeWidth / 2}"
|
|
23005
23170
|
y="${5}"
|
|
23006
23171
|
width="${strokeWidth}"
|
|
23007
23172
|
height="${90}"
|
|
@@ -23014,7 +23179,7 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
23014
23179
|
<rect
|
|
23015
23180
|
class="track"
|
|
23016
23181
|
x="${5}"
|
|
23017
|
-
y="${
|
|
23182
|
+
y="${24 / 2 - strokeWidth / 2}"
|
|
23018
23183
|
width="${90}"
|
|
23019
23184
|
height="${strokeWidth}"
|
|
23020
23185
|
fill="${fill}"
|
|
@@ -23082,9 +23247,9 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
23082
23247
|
const markerBorderWidth = this.#getCssVar(`--marker-border-width`, 0);
|
|
23083
23248
|
const center = isHorizontal ? {
|
|
23084
23249
|
x: pos.x,
|
|
23085
|
-
y: bounds.crossCentre + markerOffset *
|
|
23250
|
+
y: bounds.crossCentre + markerOffset * (24 / 2)
|
|
23086
23251
|
} : {
|
|
23087
|
-
x: bounds.crossCentre + markerOffset *
|
|
23252
|
+
x: bounds.crossCentre + markerOffset * (24 / 2),
|
|
23088
23253
|
y: pos.y
|
|
23089
23254
|
};
|
|
23090
23255
|
const lowCenter = this.valueMode === `single` && this.singleStyle === `unipolar` ? isHorizontal ? {
|
|
@@ -23097,7 +23262,7 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
23097
23262
|
const id = handle ?? `s`;
|
|
23098
23263
|
const effectiveMarkerStyle = handle === `c` && this.markerStyleC ? this.markerStyleC : this.markerStyle;
|
|
23099
23264
|
if (effectiveMarkerStyle === `dot`) {
|
|
23100
|
-
const r = markerThickness *
|
|
23265
|
+
const r = markerThickness * (24 / 2);
|
|
23101
23266
|
const renderDot = (cx, cy, mid) => {
|
|
23102
23267
|
if (markerBorderWidth > 0) {
|
|
23103
23268
|
defs.push(w`<circle id="dot-${mid}-path" cx="${cx}" cy="${cy}" r="${r}" />`);
|
|
@@ -23152,7 +23317,7 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
23152
23317
|
}
|
|
23153
23318
|
if (effectiveMarkerStyle === `triangle`) {
|
|
23154
23319
|
const halfLen = markerLength * 24 / 4;
|
|
23155
|
-
const halfBase = markerThickness *
|
|
23320
|
+
const halfBase = markerThickness * (24 / 2);
|
|
23156
23321
|
const renderTriangle = (cx, cy, mid) => {
|
|
23157
23322
|
let apex;
|
|
23158
23323
|
let base1;
|
|
@@ -23217,7 +23382,7 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
23217
23382
|
const size = this.#getCssVar(`--midpoint-thickness`, .08);
|
|
23218
23383
|
return w`
|
|
23219
23384
|
<g class="midpoint-marker" part="midpoint-marker">
|
|
23220
|
-
<circle cx="${center.x}" cy="${center.y}" r="${size *
|
|
23385
|
+
<circle cx="${center.x}" cy="${center.y}" r="${size * (24 / 2)}" />
|
|
23221
23386
|
</g>
|
|
23222
23387
|
`;
|
|
23223
23388
|
}
|
|
@@ -23289,12 +23454,10 @@ let SliderInputElement = class SliderInputElement extends WheelNudgeMixin(i) {
|
|
|
23289
23454
|
} else this.#poleC = void 0;
|
|
23290
23455
|
if (changed.has(`valueA`) || changed.has(`valueB`) || changed.has(`valueMode`) || changed.has(`singleStyle`) || !this.hasUpdated) {
|
|
23291
23456
|
const valueLane = this.#lanes.get(`value`);
|
|
23292
|
-
if (valueLane && valueLane.type === `value`)
|
|
23293
|
-
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
valueLane.valueMax = valueToRelative(this.#high(), this.min, this.max);
|
|
23297
|
-
}
|
|
23457
|
+
if (valueLane && valueLane.type === `value`) if (this.valueMode === `single`) this.#applySingleStyleValueLane(valueLane, this.#getRelativeValueA());
|
|
23458
|
+
else {
|
|
23459
|
+
valueLane.valueMin = valueToRelative(this.#low(), this.min, this.max);
|
|
23460
|
+
valueLane.valueMax = valueToRelative(this.#high(), this.min, this.max);
|
|
23298
23461
|
}
|
|
23299
23462
|
}
|
|
23300
23463
|
}
|
|
@@ -23963,11 +24126,10 @@ let SnapContainer = class SnapContainer extends i {
|
|
|
23963
24126
|
};
|
|
23964
24127
|
this._onKeyDown = (e) => {
|
|
23965
24128
|
let newSnap = this.snap;
|
|
23966
|
-
if (this._isHorizontal)
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
} else if (e.key === `ArrowUp`) newSnap = Math.max(0, this.snap - 1);
|
|
24129
|
+
if (this._isHorizontal) if (e.key === `ArrowLeft`) newSnap = Math.max(0, this.snap - 1);
|
|
24130
|
+
else if (e.key === `ArrowRight`) newSnap = Math.min(this.snapPositions - 1, this.snap + 1);
|
|
24131
|
+
else return;
|
|
24132
|
+
else if (e.key === `ArrowUp`) newSnap = Math.max(0, this.snap - 1);
|
|
23971
24133
|
else if (e.key === `ArrowDown`) newSnap = Math.min(this.snapPositions - 1, this.snap + 1);
|
|
23972
24134
|
else return;
|
|
23973
24135
|
e.preventDefault();
|
|
@@ -24207,8 +24369,7 @@ let SplitLayoutElement = class SplitLayoutElement extends i {
|
|
|
24207
24369
|
if (!bounds) return;
|
|
24208
24370
|
const threshold = 5;
|
|
24209
24371
|
if (this.layout === `horizontal`) {
|
|
24210
|
-
const
|
|
24211
|
-
const relativeY = clamp(y / bounds.height);
|
|
24372
|
+
const relativeY = clamp((event.y - bounds.y) / bounds.height);
|
|
24212
24373
|
if (this.collapsible && this.collapsedA) {
|
|
24213
24374
|
if (relativeY > (this.#collapsedAPointerAtCollapse ?? .05) + this.#hysteresisThreshold) {
|
|
24214
24375
|
this.collapsedA = false;
|
|
@@ -24246,8 +24407,7 @@ let SplitLayoutElement = class SplitLayoutElement extends i {
|
|
|
24246
24407
|
this.#collapsedBPointerAtCollapse = relativeY;
|
|
24247
24408
|
}
|
|
24248
24409
|
} else {
|
|
24249
|
-
const
|
|
24250
|
-
const relativeX = clamp(x / bounds.width);
|
|
24410
|
+
const relativeX = clamp((event.x - bounds.x) / bounds.width);
|
|
24251
24411
|
if (this.collapsible && this.collapsedA) {
|
|
24252
24412
|
if (relativeX > (this.#collapsedAPointerAtCollapse ?? .05) + this.#hysteresisThreshold) {
|
|
24253
24413
|
this.collapsedA = false;
|
|
@@ -24933,8 +25093,7 @@ let SwipeElement = class SwipeElement extends WheelNudgeMixin(i) {
|
|
|
24933
25093
|
const x0 = cx - half;
|
|
24934
25094
|
const x1 = cx + half;
|
|
24935
25095
|
const colorVar = i % 2 === 0 ? `var(--swipe-color-a, var(--surface-4))` : `var(--swipe-color-b, var(--surface-5))`;
|
|
24936
|
-
|
|
24937
|
-
return w`<path d=${d} style="fill:${colorVar}"></path>`;
|
|
25096
|
+
return w`<path d=${`M${x0},0 L${x1},0 L${x1 + off},${mid} L${x1},${h} L${x0},${h} L${x0 + off},${mid}Z`} style="fill:${colorVar}"></path>`;
|
|
24938
25097
|
})}`;
|
|
24939
25098
|
}
|
|
24940
25099
|
static {
|
|
@@ -26498,7 +26657,7 @@ function drawEventRects(ctx, region, events, trackLayout, selectedIds, tickledId
|
|
|
26498
26657
|
const x = evt.start * ppu;
|
|
26499
26658
|
const w = (evt.end - evt.start) * ppu;
|
|
26500
26659
|
const y = layout.y + padding;
|
|
26501
|
-
const h = layout.height -
|
|
26660
|
+
const h = layout.height - padding * 2;
|
|
26502
26661
|
if (w < 1) continue;
|
|
26503
26662
|
const isSelected = selectedIds.has(evt.id);
|
|
26504
26663
|
const isTickled = tickledId === evt.id;
|