spell-ui 0.8.15 → 0.8.17
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/README-components.md +4 -2
- package/README-runtime.md +26 -1
- package/README.md +2 -1
- package/dist/SliderScale-DunjyaDW.js +67 -0
- package/dist/SliderScale-DunjyaDW.js.map +1 -0
- package/dist/{ThemeDraft-CyX3YA_L.js → ThemeDraft-spaNC2dD.js} +2 -2
- package/dist/{ThemeDraft-CyX3YA_L.js.map → ThemeDraft-spaNC2dD.js.map} +1 -1
- package/dist/{UIInput-B3K0w4ow.js → UIInput-8s1aiaw1.js} +2 -2
- package/dist/UIInput-8s1aiaw1.js.map +1 -0
- package/dist/{UIRuntime-DCv4sy30.js → UIRuntime-BaokNnwk.js} +900 -158
- package/dist/UIRuntime-BaokNnwk.js.map +1 -0
- package/dist/_spell-element/UIComponent.d.ts +7 -0
- package/dist/_spell-element/elements.types.d.ts +6 -0
- package/dist/_spell-element/vocabulary.types.d.ts +27 -0
- package/dist/_util/dom.d.ts +7 -0
- package/dist/components/components.es.d.ts +1 -0
- package/dist/components/ui-dial/DialArc.d.ts +43 -0
- package/dist/components/ui-dial/UIDial.d.ts +263 -0
- package/dist/components/ui-dial/UIDial.en.d.ts +149 -0
- package/dist/components/ui-dial/UIDial.es.d.ts +25 -0
- package/dist/components/ui-dial/UIDial.fallback.d.ts +167 -0
- package/dist/components/ui-dial/UIDial.types.d.ts +11 -0
- package/dist/components/ui-dial/index.d.ts +3 -0
- package/dist/components/ui-graph/UIGraph.d.ts +17 -0
- package/dist/components/ui-graph/UIGraph.en.d.ts +17 -0
- package/dist/components/ui-graph/UIGraph.es.d.ts +6 -0
- package/dist/components/ui-input/UIInput.d.ts +46 -3
- package/dist/components/ui-input/UIInput.en.d.ts +6 -1
- package/dist/components/ui-input/UIInput.es.d.ts +1 -0
- package/dist/components/ui-input/UIInput.fallback.d.ts +6 -1
- package/dist/components/ui-json/UIJson.d.ts +5 -4
- package/dist/components/ui-modal/ChoiceRows.d.ts +61 -0
- package/dist/components/ui-modal/ModalDialogs.d.ts +15 -1
- package/dist/components/ui-modal/UIModal.d.ts +6 -2
- package/dist/components/ui-modal/UIModal.en.d.ts +6 -2
- package/dist/components/ui-modal/UIModal.es.d.ts +1 -0
- package/dist/components/ui-page-layout/UIPageLayout.d.ts +141 -8
- package/dist/components/ui-page-layout/UIPageLayout.en.d.ts +51 -2
- package/dist/components/ui-page-layout/UIPageLayout.es.d.ts +3 -0
- package/dist/components/ui-property-editor/UIProperty.d.ts +2 -2
- package/dist/components/ui-site-links/UISiteLinks.d.ts +124 -0
- package/dist/components/ui-site-links/UISiteLinks.en.d.ts +60 -0
- package/dist/components/ui-site-links/UISiteLinks.es.d.ts +26 -0
- package/dist/components/ui-site-links/index.d.ts +1 -0
- package/dist/components/ui-site-nav-button/UISiteNavButton.d.ts +12 -5
- package/dist/components/ui-site-nav-button/UISiteNavButton.en.d.ts +32 -12
- package/dist/components/ui-site-nav-button/UISiteNavButton.es.d.ts +3 -0
- package/dist/components/ui-site-tabs/UISiteTabs.d.ts +13 -0
- package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +9 -0
- package/dist/components/ui-slider/SliderScale.d.ts +26 -2
- package/dist/components/ui-slider/UISlider.d.ts +0 -2
- package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
- package/dist/components/ui-toc/TocIndex.d.ts +16 -1
- package/dist/components/ui-toc/UIToc.d.ts +27 -3
- package/dist/components/ui-toc/UIToc.en.d.ts +1 -1
- package/dist/components/ui-toc/UIToc.types.d.ts +5 -0
- package/dist/components/ui-tree/UITree.d.ts +38 -2
- package/dist/components/ui-tree/UITree.en.d.ts +9 -0
- package/dist/components/ui-tree/UITree.es.d.ts +4 -0
- package/dist/components/ui-uploader/UIUploader.d.ts +721 -0
- package/dist/components/ui-uploader/UIUploader.en.d.ts +394 -0
- package/dist/components/ui-uploader/UIUploader.es.d.ts +112 -0
- package/dist/components/ui-uploader/index.d.ts +1 -0
- package/dist/{components.es-DilRG1VO.js → components.es-jY2nBwuP.js} +249 -65
- package/dist/components.es-jY2nBwuP.js.map +1 -0
- package/dist/core.js +605 -571
- package/dist/core.js.map +1 -1
- package/dist/docs-components/docs-components.types.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +101 -97
- package/dist/jsx.d.ts +1138 -21
- package/dist/runtime/DataTooltips.d.ts +10 -0
- package/dist/runtime/Modals.d.ts +7 -2
- package/dist/runtime/Styles.d.ts +7 -1
- package/dist/runtime/UIRuntime.d.ts +6 -0
- package/dist/runtime/runtime.types.d.ts +26 -1
- package/dist/sound-library/back.ogg +0 -0
- package/dist/sound-library/beep.ogg +0 -0
- package/dist/sound-library/bell.ogg +0 -0
- package/dist/sound-library/big-punch.ogg +0 -0
- package/dist/sound-library/bong.ogg +0 -0
- package/dist/sound-library/book-close.ogg +0 -0
- package/dist/sound-library/book-down.ogg +0 -0
- package/dist/sound-library/book-open.ogg +0 -0
- package/dist/sound-library/card-fan-2.ogg +0 -0
- package/dist/sound-library/card-fan.ogg +0 -0
- package/dist/sound-library/card-place-2.ogg +0 -0
- package/dist/sound-library/card-place-3.ogg +0 -0
- package/dist/sound-library/card-place.ogg +0 -0
- package/dist/sound-library/card-shove-2.ogg +0 -0
- package/dist/sound-library/card-shove.ogg +0 -0
- package/dist/sound-library/card-slide-2.ogg +0 -0
- package/dist/sound-library/card-slide-3.ogg +0 -0
- package/dist/sound-library/card-slide-4.ogg +0 -0
- package/dist/sound-library/card-slide.ogg +0 -0
- package/dist/sound-library/chip-down-2.ogg +0 -0
- package/dist/sound-library/chip-down.ogg +0 -0
- package/dist/sound-library/chips-collide.ogg +0 -0
- package/dist/sound-library/chips-handle.ogg +0 -0
- package/dist/sound-library/chips-stack-2.ogg +0 -0
- package/dist/sound-library/chips-stack.ogg +0 -0
- package/dist/sound-library/chop.ogg +0 -0
- package/dist/sound-library/click-2.ogg +0 -0
- package/dist/sound-library/click-3.ogg +0 -0
- package/dist/sound-library/click.ogg +0 -0
- package/dist/sound-library/close.ogg +0 -0
- package/dist/sound-library/cloth.ogg +0 -0
- package/dist/sound-library/coins-2.ogg +0 -0
- package/dist/sound-library/coins.ogg +0 -0
- package/dist/sound-library/confirm-2.ogg +0 -0
- package/dist/sound-library/confirm.ogg +0 -0
- package/dist/sound-library/creak.ogg +0 -0
- package/dist/sound-library/deck-open.ogg +0 -0
- package/dist/sound-library/deck-take-out.ogg +0 -0
- package/dist/sound-library/dice-grab.ogg +0 -0
- package/dist/sound-library/dice-shake-2.ogg +0 -0
- package/dist/sound-library/dice-shake.ogg +0 -0
- package/dist/sound-library/dice-throw-2.ogg +0 -0
- package/dist/sound-library/dice-throw.ogg +0 -0
- package/dist/sound-library/die-throw-2.ogg +0 -0
- package/dist/sound-library/die-throw.ogg +0 -0
- package/dist/sound-library/door-close.ogg +0 -0
- package/dist/sound-library/door-open.ogg +0 -0
- package/dist/sound-library/drop.ogg +0 -0
- package/dist/sound-library/error-2.ogg +0 -0
- package/dist/sound-library/error.ogg +0 -0
- package/dist/sound-library/fail.ogg +0 -0
- package/dist/sound-library/fall.ogg +0 -0
- package/dist/sound-library/glass-break.ogg +0 -0
- package/dist/sound-library/glass-clink.ogg +0 -0
- package/dist/sound-library/glass-tap.ogg +0 -0
- package/dist/sound-library/glass.ogg +0 -0
- package/dist/sound-library/glitch.ogg +0 -0
- package/dist/sound-library/grow.ogg +0 -0
- package/dist/sound-library/high-up.ogg +0 -0
- package/dist/sound-library/hover-2.ogg +0 -0
- package/dist/sound-library/hover.ogg +0 -0
- package/dist/sound-library/jingle-2.ogg +0 -0
- package/dist/sound-library/jingle-3.ogg +0 -0
- package/dist/sound-library/jingle-4.ogg +0 -0
- package/dist/sound-library/jingle.ogg +0 -0
- package/dist/sound-library/jump.ogg +0 -0
- package/dist/sound-library/knife-draw.ogg +0 -0
- package/dist/sound-library/knife-slice.ogg +0 -0
- package/dist/sound-library/laser-2.ogg +0 -0
- package/dist/sound-library/laser.ogg +0 -0
- package/dist/sound-library/latch.ogg +0 -0
- package/dist/sound-library/level-up.ogg +0 -0
- package/dist/sound-library/lose-2.ogg +0 -0
- package/dist/sound-library/lose-3.ogg +0 -0
- package/dist/sound-library/lose-4.ogg +0 -0
- package/dist/sound-library/lose.ogg +0 -0
- package/dist/sound-library/low-down.ogg +0 -0
- package/dist/sound-library/metal-clang.ogg +0 -0
- package/dist/sound-library/metal-click.ogg +0 -0
- package/dist/sound-library/metal-crash.ogg +0 -0
- package/dist/sound-library/metal-tap.ogg +0 -0
- package/dist/sound-library/mouse-click.ogg +0 -0
- package/dist/sound-library/mouse-release.ogg +0 -0
- package/dist/sound-library/open.ogg +0 -0
- package/dist/sound-library/orchestra-hit-2.ogg +0 -0
- package/dist/sound-library/orchestra-hit.ogg +0 -0
- package/dist/sound-library/page-turn-2.ogg +0 -0
- package/dist/sound-library/page-turn.ogg +0 -0
- package/dist/sound-library/pickaxe.ogg +0 -0
- package/dist/sound-library/piece-down-2.ogg +0 -0
- package/dist/sound-library/piece-down-3.ogg +0 -0
- package/dist/sound-library/piece-down.ogg +0 -0
- package/dist/sound-library/piece-take-2.ogg +0 -0
- package/dist/sound-library/piece-take.ogg +0 -0
- package/dist/sound-library/piece-tap-2.ogg +0 -0
- package/dist/sound-library/piece-tap.ogg +0 -0
- package/dist/sound-library/plank.ogg +0 -0
- package/dist/sound-library/plate.ogg +0 -0
- package/dist/sound-library/pluck.ogg +0 -0
- package/dist/sound-library/pot.ogg +0 -0
- package/dist/sound-library/power-up-2.ogg +0 -0
- package/dist/sound-library/power-up-3.ogg +0 -0
- package/dist/sound-library/power-up.ogg +0 -0
- package/dist/sound-library/punch.ogg +0 -0
- package/dist/sound-library/question.ogg +0 -0
- package/dist/sound-library/rise.ogg +0 -0
- package/dist/sound-library/scratch.ogg +0 -0
- package/dist/sound-library/scroll.ogg +0 -0
- package/dist/sound-library/select-2.ogg +0 -0
- package/dist/sound-library/select.ogg +0 -0
- package/dist/sound-library/shrink.ogg +0 -0
- package/dist/sound-library/shuffle.ogg +0 -0
- package/dist/sound-library/soft-thud-2.ogg +0 -0
- package/dist/sound-library/soft-thud.ogg +0 -0
- package/dist/sound-library/space-junk.ogg +0 -0
- package/dist/sound-library/step-2.ogg +0 -0
- package/dist/sound-library/step-on-carpet.ogg +0 -0
- package/dist/sound-library/step-on-grass.ogg +0 -0
- package/dist/sound-library/step-on-snow.ogg +0 -0
- package/dist/sound-library/step-on-stone.ogg +0 -0
- package/dist/sound-library/step-on-wood.ogg +0 -0
- package/dist/sound-library/step.ogg +0 -0
- package/dist/sound-library/switch-2.ogg +0 -0
- package/dist/sound-library/switch.ogg +0 -0
- package/dist/sound-library/tap-2.ogg +0 -0
- package/dist/sound-library/tap.ogg +0 -0
- package/dist/sound-library/three-tones.ogg +0 -0
- package/dist/sound-library/tick-2.ogg +0 -0
- package/dist/sound-library/tick.ogg +0 -0
- package/dist/sound-library/tin.ogg +0 -0
- package/dist/sound-library/toggle-2.ogg +0 -0
- package/dist/sound-library/toggle.ogg +0 -0
- package/dist/sound-library/two-tones.ogg +0 -0
- package/dist/sound-library/win-2.ogg +0 -0
- package/dist/sound-library/win-3.ogg +0 -0
- package/dist/sound-library/win-4.ogg +0 -0
- package/dist/sound-library/win.ogg +0 -0
- package/dist/sound-library/wood-thud.ogg +0 -0
- package/dist/sound-library/zap.ogg +0 -0
- package/dist/sounds/BuiltInSounds.d.ts +41 -0
- package/dist/sounds/index.d.ts +9 -0
- package/dist/sounds/sounds.types.d.ts +22 -0
- package/dist/ui-calendar.js +1 -1
- package/dist/ui-dial.editor-CjjdKi5L.js +5 -0
- package/dist/ui-dial.editor-CjjdKi5L.js.map +1 -0
- package/dist/ui-dial.js +467 -0
- package/dist/ui-dial.js.map +1 -0
- package/dist/ui-graph.js +22 -0
- package/dist/ui-graph.js.map +1 -1
- package/dist/{ui-input.editor-budoNoB0.js → ui-input.editor-D11iRgXR.js} +2 -2
- package/dist/ui-input.editor-D11iRgXR.js.map +1 -0
- package/dist/ui-input.js +84 -54
- package/dist/ui-input.js.map +1 -1
- package/dist/ui-json.js +8 -8
- package/dist/ui-json.js.map +1 -1
- package/dist/ui-modal.js +183 -97
- package/dist/ui-modal.js.map +1 -1
- package/dist/ui-page-layout.editor-IgDEveUY.js +5 -0
- package/dist/ui-page-layout.editor-IgDEveUY.js.map +1 -0
- package/dist/ui-page-layout.js +217 -72
- package/dist/ui-page-layout.js.map +1 -1
- package/dist/ui-popup.js +34 -34
- package/dist/ui-popup.js.map +1 -1
- package/dist/ui-property-editor.js +7 -4
- package/dist/ui-property-editor.js.map +1 -1
- package/dist/ui-root.js +71 -5
- package/dist/ui-root.js.map +1 -1
- package/dist/ui-search.js +1 -1
- package/dist/ui-section.js +97 -96
- package/dist/ui-section.js.map +1 -1
- package/dist/ui-site-links.editor-BME3sw5H.js +5 -0
- package/dist/ui-site-links.editor-BME3sw5H.js.map +1 -0
- package/dist/ui-site-links.js +150 -0
- package/dist/ui-site-links.js.map +1 -0
- package/dist/ui-site-nav-button.editor-ChY4xe1U.js +5 -0
- package/dist/ui-site-nav-button.editor-ChY4xe1U.js.map +1 -0
- package/dist/ui-site-nav-button.js +57 -18
- package/dist/ui-site-nav-button.js.map +1 -1
- package/dist/{ui-site-tabs.editor-DDvQfH6S.js → ui-site-tabs.editor-CdMIw4jw.js} +2 -2
- package/dist/ui-site-tabs.editor-CdMIw4jw.js.map +1 -0
- package/dist/ui-site-tabs.js +30 -14
- package/dist/ui-site-tabs.js.map +1 -1
- package/dist/ui-slider.js +75 -124
- package/dist/ui-slider.js.map +1 -1
- package/dist/ui-statistic.js +1 -0
- package/dist/ui-statistic.js.map +1 -1
- package/dist/ui-theme-editor.js +2 -2
- package/dist/{ui-theme-menu-BZYUMrHe.js → ui-theme-menu-BEBu6dyq.js} +3 -3
- package/dist/{ui-theme-menu-BZYUMrHe.js.map → ui-theme-menu-BEBu6dyq.js.map} +1 -1
- package/dist/ui-toc.js +159 -122
- package/dist/ui-toc.js.map +1 -1
- package/dist/ui-tree.js +142 -87
- package/dist/ui-tree.js.map +1 -1
- package/dist/ui-uploader.editor-DrE80KjL.js +5 -0
- package/dist/ui-uploader.editor-DrE80KjL.js.map +1 -0
- package/dist/ui-uploader.js +1442 -0
- package/dist/ui-uploader.js.map +1 -0
- package/dist/vocabulary/hooks.generated.d.ts +7 -0
- package/package.json +1 -1
- package/dist/UIInput-B3K0w4ow.js.map +0 -1
- package/dist/UIRuntime-DCv4sy30.js.map +0 -1
- package/dist/components.es-DilRG1VO.js.map +0 -1
- package/dist/ui-input.editor-budoNoB0.js.map +0 -1
- package/dist/ui-page-layout.editor-xtQW0FZk.js +0 -5
- package/dist/ui-page-layout.editor-xtQW0FZk.js.map +0 -1
- package/dist/ui-site-nav-button.editor-6J-zJLtZ.js +0 -5
- package/dist/ui-site-nav-button.editor-6J-zJLtZ.js.map +0 -1
- package/dist/ui-site-tabs.editor-DDvQfH6S.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "./rolldown-runtime-c6e9CmGy.js";
|
|
2
|
-
import { APP_STYLESHEET_ID as e, ApiError as t, Bt as n, BuiltInPacks as r, CODE_LANGUAGES_EVENT as i, CssDisplay as a, Ct as o, DEFAULT_ICON_PACK as s, EN_STRINGS as c, F as l, Gt as u, IconName as d, Jt as f, Kt as p, LAYER_ORDER as m, LoadOnce as h, PAGE_SCOPE as g, Queued as ee, RUNTIME_KEY as
|
|
3
|
-
import { animationsCSS as
|
|
4
|
-
import { i as
|
|
2
|
+
import { APP_STYLESHEET_ID as e, ApiError as t, Bt as n, BuiltInPacks as r, CODE_LANGUAGES_EVENT as i, CssDisplay as a, Ct as o, DEFAULT_ICON_PACK as s, EN_STRINGS as c, F as l, Gt as u, IconName as d, Jt as f, Kt as p, LAYER_ORDER as m, LoadOnce as h, PAGE_SCOPE as g, Queued as ee, RUNTIME_KEY as te, RUNTIME_VERSION as ne, SCROLL_LOCK_CLASS as _, SourceError as v, TopLayerTip as y, UTILITIES_SHEET as re, Ut as b, VisibilityDirection as x, Vocabulary as ie, Warnings as S, Wt as C, Yt as w, after as T, answerOf as E, cssSecondsFor as ae, fetchOk as oe, fetchText as D, flatParentFor as se, isBrowser as ce, lazy as le, loadUI as ue, once as de, proto as O, soon as fe, zt as pe } from "./core.js";
|
|
3
|
+
import { animationsCSS as me, colorsCSS as he, layersCSS as ge, nativeCSS as _e, resetCSS as ve, sizesCSS as ye, tokensCSS as be, typographyCSS as xe, utilitiesCSS as Se } from "./styles.js";
|
|
4
|
+
import { i as Ce } from "./persist.types-D7N7GewC.js";
|
|
5
5
|
// ../src/util/Api.ts
|
|
6
|
-
var
|
|
6
|
+
var we = class Api {
|
|
7
7
|
latest = /* @__PURE__ */ new Map();
|
|
8
8
|
url(e, t = {}) {
|
|
9
|
-
return e.replace(
|
|
9
|
+
return e.replace(Te, (n, r) => {
|
|
10
10
|
let i = t[r];
|
|
11
11
|
if (i == null) throw TypeError(`Api.url(): no value for {${r}} in ${e}; pass it in the URL data`);
|
|
12
12
|
return encodeURIComponent(String(i));
|
|
13
|
-
}).replace(
|
|
13
|
+
}).replace(Ee, (e, n) => {
|
|
14
14
|
let r = t[n];
|
|
15
15
|
return r == null ? "" : `/${encodeURIComponent(String(r))}`;
|
|
16
16
|
});
|
|
@@ -37,7 +37,7 @@ var xe = class Api {
|
|
|
37
37
|
...d && { cache: d }
|
|
38
38
|
};
|
|
39
39
|
n === "GET" || n === "HEAD" ? f = this.withQuery(f, r) : this.setBody(e, r);
|
|
40
|
-
let t = await
|
|
40
|
+
let t = await oe(f, (e) => Api.failed(n, e), e);
|
|
41
41
|
return await this.read(t, n, l);
|
|
42
42
|
} finally {
|
|
43
43
|
this.latest.get(a) === p && this.latest.delete(a);
|
|
@@ -46,7 +46,7 @@ var xe = class Api {
|
|
|
46
46
|
delay(e, t) {
|
|
47
47
|
return new Promise((n, r) => {
|
|
48
48
|
if (t.aborted) return r(t.reason);
|
|
49
|
-
let i =
|
|
49
|
+
let i = T(e / 1e3, () => n());
|
|
50
50
|
t.addEventListener("abort", () => {
|
|
51
51
|
i.cancel(), r(t.reason);
|
|
52
52
|
}, { once: !0 });
|
|
@@ -82,11 +82,733 @@ var xe = class Api {
|
|
|
82
82
|
return t === Object.prototype || t === null;
|
|
83
83
|
}
|
|
84
84
|
static failed(e, { url: n, response: r, error: i }) {
|
|
85
|
-
return r ? new t(`Api.request(): ${e} ${n} answered ${
|
|
85
|
+
return r ? new t(`Api.request(): ${e} ${n} answered ${E(r)}`, { cause: { response: r } }) : i instanceof Error ? i : Error(String(i));
|
|
86
86
|
}
|
|
87
|
-
},
|
|
87
|
+
}, Te = /\{([\w-]+)\}/g, Ee = /\/?\{\/([\w-]+)\}/g, De = "sound-library", Oe = class BuiltInSounds {
|
|
88
|
+
static base = import.meta.url;
|
|
89
|
+
static get all() {
|
|
90
|
+
return k;
|
|
91
|
+
}
|
|
92
|
+
static ofKind(e) {
|
|
93
|
+
return k.filter((t) => t.kind === e);
|
|
94
|
+
}
|
|
95
|
+
static find(e) {
|
|
96
|
+
return je.get(nameKey(e));
|
|
97
|
+
}
|
|
98
|
+
static url(e, t = BuiltInSounds.base) {
|
|
99
|
+
let n = BuiltInSounds.find(e);
|
|
100
|
+
if (n && t) return new URL(`${De}/${BuiltInSounds.fileOf(n)}`, t).href;
|
|
101
|
+
}
|
|
102
|
+
static fileOf(e) {
|
|
103
|
+
return `${e.name.replaceAll(" ", "-")}.ogg`;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
function nameKey(e) {
|
|
107
|
+
return e.normalize("NFD").replace(ke, "").toLowerCase().replace(Ae, " ").trim();
|
|
108
|
+
}
|
|
109
|
+
var ke = /[̀-ͯ]/g, Ae = /[\s_-]+/g, k = [
|
|
110
|
+
[
|
|
111
|
+
"click",
|
|
112
|
+
"clic",
|
|
113
|
+
"interface"
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
"click 2",
|
|
117
|
+
"clic 2",
|
|
118
|
+
"interface"
|
|
119
|
+
],
|
|
120
|
+
[
|
|
121
|
+
"click 3",
|
|
122
|
+
"clic 3",
|
|
123
|
+
"interface"
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"tap",
|
|
127
|
+
"toque",
|
|
128
|
+
"interface"
|
|
129
|
+
],
|
|
130
|
+
[
|
|
131
|
+
"tap 2",
|
|
132
|
+
"toque 2",
|
|
133
|
+
"interface"
|
|
134
|
+
],
|
|
135
|
+
[
|
|
136
|
+
"mouse click",
|
|
137
|
+
"clic de ratón",
|
|
138
|
+
"interface"
|
|
139
|
+
],
|
|
140
|
+
[
|
|
141
|
+
"mouse release",
|
|
142
|
+
"soltar ratón",
|
|
143
|
+
"interface"
|
|
144
|
+
],
|
|
145
|
+
[
|
|
146
|
+
"toggle",
|
|
147
|
+
"alternar",
|
|
148
|
+
"interface"
|
|
149
|
+
],
|
|
150
|
+
[
|
|
151
|
+
"toggle 2",
|
|
152
|
+
"alternar 2",
|
|
153
|
+
"interface"
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
"switch",
|
|
157
|
+
"interruptor",
|
|
158
|
+
"interface"
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
"switch 2",
|
|
162
|
+
"interruptor 2",
|
|
163
|
+
"interface"
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
"select",
|
|
167
|
+
"elegir",
|
|
168
|
+
"interface"
|
|
169
|
+
],
|
|
170
|
+
[
|
|
171
|
+
"select 2",
|
|
172
|
+
"elegir 2",
|
|
173
|
+
"interface"
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
"tick",
|
|
177
|
+
"tic",
|
|
178
|
+
"interface"
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
"tick 2",
|
|
182
|
+
"tic 2",
|
|
183
|
+
"interface"
|
|
184
|
+
],
|
|
185
|
+
[
|
|
186
|
+
"scroll",
|
|
187
|
+
"desplazar",
|
|
188
|
+
"interface"
|
|
189
|
+
],
|
|
190
|
+
[
|
|
191
|
+
"open",
|
|
192
|
+
"abrir",
|
|
193
|
+
"interface"
|
|
194
|
+
],
|
|
195
|
+
[
|
|
196
|
+
"close",
|
|
197
|
+
"cerrar",
|
|
198
|
+
"interface"
|
|
199
|
+
],
|
|
200
|
+
[
|
|
201
|
+
"back",
|
|
202
|
+
"atrás",
|
|
203
|
+
"interface"
|
|
204
|
+
],
|
|
205
|
+
[
|
|
206
|
+
"grow",
|
|
207
|
+
"agrandar",
|
|
208
|
+
"interface"
|
|
209
|
+
],
|
|
210
|
+
[
|
|
211
|
+
"shrink",
|
|
212
|
+
"achicar",
|
|
213
|
+
"interface"
|
|
214
|
+
],
|
|
215
|
+
[
|
|
216
|
+
"drop",
|
|
217
|
+
"soltar",
|
|
218
|
+
"interface"
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
"confirm",
|
|
222
|
+
"confirmar",
|
|
223
|
+
"interface"
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
"confirm 2",
|
|
227
|
+
"confirmar 2",
|
|
228
|
+
"interface"
|
|
229
|
+
],
|
|
230
|
+
[
|
|
231
|
+
"error",
|
|
232
|
+
"error",
|
|
233
|
+
"interface"
|
|
234
|
+
],
|
|
235
|
+
[
|
|
236
|
+
"error 2",
|
|
237
|
+
"error 2",
|
|
238
|
+
"interface"
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
"question",
|
|
242
|
+
"pregunta",
|
|
243
|
+
"interface"
|
|
244
|
+
],
|
|
245
|
+
[
|
|
246
|
+
"bong",
|
|
247
|
+
"bong",
|
|
248
|
+
"interface"
|
|
249
|
+
],
|
|
250
|
+
[
|
|
251
|
+
"glass",
|
|
252
|
+
"cristal",
|
|
253
|
+
"interface"
|
|
254
|
+
],
|
|
255
|
+
[
|
|
256
|
+
"pluck",
|
|
257
|
+
"punteo",
|
|
258
|
+
"interface"
|
|
259
|
+
],
|
|
260
|
+
[
|
|
261
|
+
"glitch",
|
|
262
|
+
"interferencia",
|
|
263
|
+
"interface"
|
|
264
|
+
],
|
|
265
|
+
[
|
|
266
|
+
"scratch",
|
|
267
|
+
"rasguño",
|
|
268
|
+
"interface"
|
|
269
|
+
],
|
|
270
|
+
[
|
|
271
|
+
"hover",
|
|
272
|
+
"pasar por encima",
|
|
273
|
+
"interface"
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
"hover 2",
|
|
277
|
+
"pasar por encima 2",
|
|
278
|
+
"interface"
|
|
279
|
+
],
|
|
280
|
+
[
|
|
281
|
+
"card slide",
|
|
282
|
+
"deslizar carta",
|
|
283
|
+
"cards"
|
|
284
|
+
],
|
|
285
|
+
[
|
|
286
|
+
"card slide 2",
|
|
287
|
+
"deslizar carta 2",
|
|
288
|
+
"cards"
|
|
289
|
+
],
|
|
290
|
+
[
|
|
291
|
+
"card slide 3",
|
|
292
|
+
"deslizar carta 3",
|
|
293
|
+
"cards"
|
|
294
|
+
],
|
|
295
|
+
[
|
|
296
|
+
"card slide 4",
|
|
297
|
+
"deslizar carta 4",
|
|
298
|
+
"cards"
|
|
299
|
+
],
|
|
300
|
+
[
|
|
301
|
+
"card place",
|
|
302
|
+
"poner carta",
|
|
303
|
+
"cards"
|
|
304
|
+
],
|
|
305
|
+
[
|
|
306
|
+
"card place 2",
|
|
307
|
+
"poner carta 2",
|
|
308
|
+
"cards"
|
|
309
|
+
],
|
|
310
|
+
[
|
|
311
|
+
"card place 3",
|
|
312
|
+
"poner carta 3",
|
|
313
|
+
"cards"
|
|
314
|
+
],
|
|
315
|
+
[
|
|
316
|
+
"card shove",
|
|
317
|
+
"empujar carta",
|
|
318
|
+
"cards"
|
|
319
|
+
],
|
|
320
|
+
[
|
|
321
|
+
"card shove 2",
|
|
322
|
+
"empujar carta 2",
|
|
323
|
+
"cards"
|
|
324
|
+
],
|
|
325
|
+
[
|
|
326
|
+
"card fan",
|
|
327
|
+
"abanico de cartas",
|
|
328
|
+
"cards"
|
|
329
|
+
],
|
|
330
|
+
[
|
|
331
|
+
"card fan 2",
|
|
332
|
+
"abanico de cartas 2",
|
|
333
|
+
"cards"
|
|
334
|
+
],
|
|
335
|
+
[
|
|
336
|
+
"shuffle",
|
|
337
|
+
"barajar",
|
|
338
|
+
"cards"
|
|
339
|
+
],
|
|
340
|
+
[
|
|
341
|
+
"deck open",
|
|
342
|
+
"abrir baraja",
|
|
343
|
+
"cards"
|
|
344
|
+
],
|
|
345
|
+
[
|
|
346
|
+
"deck take out",
|
|
347
|
+
"sacar baraja",
|
|
348
|
+
"cards"
|
|
349
|
+
],
|
|
350
|
+
[
|
|
351
|
+
"dice shake",
|
|
352
|
+
"agitar dados",
|
|
353
|
+
"casino"
|
|
354
|
+
],
|
|
355
|
+
[
|
|
356
|
+
"dice shake 2",
|
|
357
|
+
"agitar dados 2",
|
|
358
|
+
"casino"
|
|
359
|
+
],
|
|
360
|
+
[
|
|
361
|
+
"dice throw",
|
|
362
|
+
"tirar dados",
|
|
363
|
+
"casino"
|
|
364
|
+
],
|
|
365
|
+
[
|
|
366
|
+
"dice throw 2",
|
|
367
|
+
"tirar dados 2",
|
|
368
|
+
"casino"
|
|
369
|
+
],
|
|
370
|
+
[
|
|
371
|
+
"die throw",
|
|
372
|
+
"tirar dado",
|
|
373
|
+
"casino"
|
|
374
|
+
],
|
|
375
|
+
[
|
|
376
|
+
"die throw 2",
|
|
377
|
+
"tirar dado 2",
|
|
378
|
+
"casino"
|
|
379
|
+
],
|
|
380
|
+
[
|
|
381
|
+
"dice grab",
|
|
382
|
+
"coger dados",
|
|
383
|
+
"casino"
|
|
384
|
+
],
|
|
385
|
+
[
|
|
386
|
+
"chip down",
|
|
387
|
+
"poner ficha",
|
|
388
|
+
"casino"
|
|
389
|
+
],
|
|
390
|
+
[
|
|
391
|
+
"chip down 2",
|
|
392
|
+
"poner ficha 2",
|
|
393
|
+
"casino"
|
|
394
|
+
],
|
|
395
|
+
[
|
|
396
|
+
"chips stack",
|
|
397
|
+
"apilar fichas",
|
|
398
|
+
"casino"
|
|
399
|
+
],
|
|
400
|
+
[
|
|
401
|
+
"chips stack 2",
|
|
402
|
+
"apilar fichas 2",
|
|
403
|
+
"casino"
|
|
404
|
+
],
|
|
405
|
+
[
|
|
406
|
+
"chips handle",
|
|
407
|
+
"mover fichas",
|
|
408
|
+
"casino"
|
|
409
|
+
],
|
|
410
|
+
[
|
|
411
|
+
"chips collide",
|
|
412
|
+
"chocar fichas",
|
|
413
|
+
"casino"
|
|
414
|
+
],
|
|
415
|
+
[
|
|
416
|
+
"coins",
|
|
417
|
+
"monedas",
|
|
418
|
+
"casino"
|
|
419
|
+
],
|
|
420
|
+
[
|
|
421
|
+
"coins 2",
|
|
422
|
+
"monedas 2",
|
|
423
|
+
"casino"
|
|
424
|
+
],
|
|
425
|
+
[
|
|
426
|
+
"piece down",
|
|
427
|
+
"poner pieza",
|
|
428
|
+
"pieces"
|
|
429
|
+
],
|
|
430
|
+
[
|
|
431
|
+
"piece down 2",
|
|
432
|
+
"poner pieza 2",
|
|
433
|
+
"pieces"
|
|
434
|
+
],
|
|
435
|
+
[
|
|
436
|
+
"piece down 3",
|
|
437
|
+
"poner pieza 3",
|
|
438
|
+
"pieces"
|
|
439
|
+
],
|
|
440
|
+
[
|
|
441
|
+
"piece take",
|
|
442
|
+
"comer pieza",
|
|
443
|
+
"pieces"
|
|
444
|
+
],
|
|
445
|
+
[
|
|
446
|
+
"piece take 2",
|
|
447
|
+
"comer pieza 2",
|
|
448
|
+
"pieces"
|
|
449
|
+
],
|
|
450
|
+
[
|
|
451
|
+
"piece tap",
|
|
452
|
+
"tocar pieza",
|
|
453
|
+
"pieces"
|
|
454
|
+
],
|
|
455
|
+
[
|
|
456
|
+
"piece tap 2",
|
|
457
|
+
"tocar pieza 2",
|
|
458
|
+
"pieces"
|
|
459
|
+
],
|
|
460
|
+
[
|
|
461
|
+
"wood thud",
|
|
462
|
+
"golpe de madera",
|
|
463
|
+
"impacts"
|
|
464
|
+
],
|
|
465
|
+
[
|
|
466
|
+
"plank",
|
|
467
|
+
"tablón",
|
|
468
|
+
"impacts"
|
|
469
|
+
],
|
|
470
|
+
[
|
|
471
|
+
"soft thud",
|
|
472
|
+
"golpe suave",
|
|
473
|
+
"impacts"
|
|
474
|
+
],
|
|
475
|
+
[
|
|
476
|
+
"soft thud 2",
|
|
477
|
+
"golpe suave 2",
|
|
478
|
+
"impacts"
|
|
479
|
+
],
|
|
480
|
+
[
|
|
481
|
+
"metal tap",
|
|
482
|
+
"toque de metal",
|
|
483
|
+
"impacts"
|
|
484
|
+
],
|
|
485
|
+
[
|
|
486
|
+
"metal clang",
|
|
487
|
+
"golpe de metal",
|
|
488
|
+
"impacts"
|
|
489
|
+
],
|
|
490
|
+
[
|
|
491
|
+
"metal crash",
|
|
492
|
+
"estruendo de metal",
|
|
493
|
+
"impacts"
|
|
494
|
+
],
|
|
495
|
+
[
|
|
496
|
+
"glass tap",
|
|
497
|
+
"toque de cristal",
|
|
498
|
+
"impacts"
|
|
499
|
+
],
|
|
500
|
+
[
|
|
501
|
+
"glass clink",
|
|
502
|
+
"tintineo de cristal",
|
|
503
|
+
"impacts"
|
|
504
|
+
],
|
|
505
|
+
[
|
|
506
|
+
"glass break",
|
|
507
|
+
"cristal roto",
|
|
508
|
+
"impacts"
|
|
509
|
+
],
|
|
510
|
+
[
|
|
511
|
+
"bell",
|
|
512
|
+
"campana",
|
|
513
|
+
"impacts"
|
|
514
|
+
],
|
|
515
|
+
[
|
|
516
|
+
"plate",
|
|
517
|
+
"plato",
|
|
518
|
+
"impacts"
|
|
519
|
+
],
|
|
520
|
+
[
|
|
521
|
+
"tin",
|
|
522
|
+
"lata",
|
|
523
|
+
"impacts"
|
|
524
|
+
],
|
|
525
|
+
[
|
|
526
|
+
"punch",
|
|
527
|
+
"puñetazo",
|
|
528
|
+
"impacts"
|
|
529
|
+
],
|
|
530
|
+
[
|
|
531
|
+
"big punch",
|
|
532
|
+
"puñetazo fuerte",
|
|
533
|
+
"impacts"
|
|
534
|
+
],
|
|
535
|
+
[
|
|
536
|
+
"pickaxe",
|
|
537
|
+
"pico",
|
|
538
|
+
"impacts"
|
|
539
|
+
],
|
|
540
|
+
[
|
|
541
|
+
"step",
|
|
542
|
+
"paso",
|
|
543
|
+
"footsteps"
|
|
544
|
+
],
|
|
545
|
+
[
|
|
546
|
+
"step 2",
|
|
547
|
+
"paso 2",
|
|
548
|
+
"footsteps"
|
|
549
|
+
],
|
|
550
|
+
[
|
|
551
|
+
"step on wood",
|
|
552
|
+
"paso en madera",
|
|
553
|
+
"footsteps"
|
|
554
|
+
],
|
|
555
|
+
[
|
|
556
|
+
"step on grass",
|
|
557
|
+
"paso en hierba",
|
|
558
|
+
"footsteps"
|
|
559
|
+
],
|
|
560
|
+
[
|
|
561
|
+
"step on snow",
|
|
562
|
+
"paso en nieve",
|
|
563
|
+
"footsteps"
|
|
564
|
+
],
|
|
565
|
+
[
|
|
566
|
+
"step on stone",
|
|
567
|
+
"paso en piedra",
|
|
568
|
+
"footsteps"
|
|
569
|
+
],
|
|
570
|
+
[
|
|
571
|
+
"step on carpet",
|
|
572
|
+
"paso en alfombra",
|
|
573
|
+
"footsteps"
|
|
574
|
+
],
|
|
575
|
+
[
|
|
576
|
+
"door open",
|
|
577
|
+
"abrir puerta",
|
|
578
|
+
"things"
|
|
579
|
+
],
|
|
580
|
+
[
|
|
581
|
+
"door close",
|
|
582
|
+
"cerrar puerta",
|
|
583
|
+
"things"
|
|
584
|
+
],
|
|
585
|
+
[
|
|
586
|
+
"creak",
|
|
587
|
+
"crujido",
|
|
588
|
+
"things"
|
|
589
|
+
],
|
|
590
|
+
[
|
|
591
|
+
"book open",
|
|
592
|
+
"abrir libro",
|
|
593
|
+
"things"
|
|
594
|
+
],
|
|
595
|
+
[
|
|
596
|
+
"book close",
|
|
597
|
+
"cerrar libro",
|
|
598
|
+
"things"
|
|
599
|
+
],
|
|
600
|
+
[
|
|
601
|
+
"page turn",
|
|
602
|
+
"pasar página",
|
|
603
|
+
"things"
|
|
604
|
+
],
|
|
605
|
+
[
|
|
606
|
+
"page turn 2",
|
|
607
|
+
"pasar página 2",
|
|
608
|
+
"things"
|
|
609
|
+
],
|
|
610
|
+
[
|
|
611
|
+
"book down",
|
|
612
|
+
"dejar libro",
|
|
613
|
+
"things"
|
|
614
|
+
],
|
|
615
|
+
[
|
|
616
|
+
"cloth",
|
|
617
|
+
"tela",
|
|
618
|
+
"things"
|
|
619
|
+
],
|
|
620
|
+
[
|
|
621
|
+
"latch",
|
|
622
|
+
"pestillo",
|
|
623
|
+
"things"
|
|
624
|
+
],
|
|
625
|
+
[
|
|
626
|
+
"metal click",
|
|
627
|
+
"clic de metal",
|
|
628
|
+
"things"
|
|
629
|
+
],
|
|
630
|
+
[
|
|
631
|
+
"knife draw",
|
|
632
|
+
"sacar cuchillo",
|
|
633
|
+
"things"
|
|
634
|
+
],
|
|
635
|
+
[
|
|
636
|
+
"knife slice",
|
|
637
|
+
"cortar",
|
|
638
|
+
"things"
|
|
639
|
+
],
|
|
640
|
+
[
|
|
641
|
+
"chop",
|
|
642
|
+
"hachazo",
|
|
643
|
+
"things"
|
|
644
|
+
],
|
|
645
|
+
[
|
|
646
|
+
"pot",
|
|
647
|
+
"olla",
|
|
648
|
+
"things"
|
|
649
|
+
],
|
|
650
|
+
[
|
|
651
|
+
"laser",
|
|
652
|
+
"láser",
|
|
653
|
+
"digital"
|
|
654
|
+
],
|
|
655
|
+
[
|
|
656
|
+
"laser 2",
|
|
657
|
+
"láser 2",
|
|
658
|
+
"digital"
|
|
659
|
+
],
|
|
660
|
+
[
|
|
661
|
+
"zap",
|
|
662
|
+
"chispazo",
|
|
663
|
+
"digital"
|
|
664
|
+
],
|
|
665
|
+
[
|
|
666
|
+
"power up",
|
|
667
|
+
"subir poder",
|
|
668
|
+
"digital"
|
|
669
|
+
],
|
|
670
|
+
[
|
|
671
|
+
"power up 2",
|
|
672
|
+
"subir poder 2",
|
|
673
|
+
"digital"
|
|
674
|
+
],
|
|
675
|
+
[
|
|
676
|
+
"power up 3",
|
|
677
|
+
"subir poder 3",
|
|
678
|
+
"digital"
|
|
679
|
+
],
|
|
680
|
+
[
|
|
681
|
+
"rise",
|
|
682
|
+
"subida",
|
|
683
|
+
"digital"
|
|
684
|
+
],
|
|
685
|
+
[
|
|
686
|
+
"fall",
|
|
687
|
+
"bajada",
|
|
688
|
+
"digital"
|
|
689
|
+
],
|
|
690
|
+
[
|
|
691
|
+
"jump",
|
|
692
|
+
"salto",
|
|
693
|
+
"digital"
|
|
694
|
+
],
|
|
695
|
+
[
|
|
696
|
+
"beep",
|
|
697
|
+
"pitido",
|
|
698
|
+
"digital"
|
|
699
|
+
],
|
|
700
|
+
[
|
|
701
|
+
"two tones",
|
|
702
|
+
"dos tonos",
|
|
703
|
+
"digital"
|
|
704
|
+
],
|
|
705
|
+
[
|
|
706
|
+
"three tones",
|
|
707
|
+
"tres tonos",
|
|
708
|
+
"digital"
|
|
709
|
+
],
|
|
710
|
+
[
|
|
711
|
+
"high up",
|
|
712
|
+
"agudo arriba",
|
|
713
|
+
"digital"
|
|
714
|
+
],
|
|
715
|
+
[
|
|
716
|
+
"low down",
|
|
717
|
+
"grave abajo",
|
|
718
|
+
"digital"
|
|
719
|
+
],
|
|
720
|
+
[
|
|
721
|
+
"space junk",
|
|
722
|
+
"chatarra espacial",
|
|
723
|
+
"digital"
|
|
724
|
+
],
|
|
725
|
+
[
|
|
726
|
+
"win",
|
|
727
|
+
"ganar",
|
|
728
|
+
"jingles"
|
|
729
|
+
],
|
|
730
|
+
[
|
|
731
|
+
"lose",
|
|
732
|
+
"perder",
|
|
733
|
+
"jingles"
|
|
734
|
+
],
|
|
735
|
+
[
|
|
736
|
+
"win 2",
|
|
737
|
+
"ganar 2",
|
|
738
|
+
"jingles"
|
|
739
|
+
],
|
|
740
|
+
[
|
|
741
|
+
"lose 2",
|
|
742
|
+
"perder 2",
|
|
743
|
+
"jingles"
|
|
744
|
+
],
|
|
745
|
+
[
|
|
746
|
+
"win 3",
|
|
747
|
+
"ganar 3",
|
|
748
|
+
"jingles"
|
|
749
|
+
],
|
|
750
|
+
[
|
|
751
|
+
"lose 3",
|
|
752
|
+
"perder 3",
|
|
753
|
+
"jingles"
|
|
754
|
+
],
|
|
755
|
+
[
|
|
756
|
+
"win 4",
|
|
757
|
+
"ganar 4",
|
|
758
|
+
"jingles"
|
|
759
|
+
],
|
|
760
|
+
[
|
|
761
|
+
"lose 4",
|
|
762
|
+
"perder 4",
|
|
763
|
+
"jingles"
|
|
764
|
+
],
|
|
765
|
+
[
|
|
766
|
+
"level up",
|
|
767
|
+
"subir de nivel",
|
|
768
|
+
"jingles"
|
|
769
|
+
],
|
|
770
|
+
[
|
|
771
|
+
"fail",
|
|
772
|
+
"fallo",
|
|
773
|
+
"jingles"
|
|
774
|
+
],
|
|
775
|
+
[
|
|
776
|
+
"jingle",
|
|
777
|
+
"sintonía",
|
|
778
|
+
"jingles"
|
|
779
|
+
],
|
|
780
|
+
[
|
|
781
|
+
"jingle 2",
|
|
782
|
+
"sintonía 2",
|
|
783
|
+
"jingles"
|
|
784
|
+
],
|
|
785
|
+
[
|
|
786
|
+
"jingle 3",
|
|
787
|
+
"sintonía 3",
|
|
788
|
+
"jingles"
|
|
789
|
+
],
|
|
790
|
+
[
|
|
791
|
+
"jingle 4",
|
|
792
|
+
"sintonía 4",
|
|
793
|
+
"jingles"
|
|
794
|
+
],
|
|
795
|
+
[
|
|
796
|
+
"orchestra hit",
|
|
797
|
+
"golpe de orquesta",
|
|
798
|
+
"jingles"
|
|
799
|
+
],
|
|
800
|
+
[
|
|
801
|
+
"orchestra hit 2",
|
|
802
|
+
"golpe de orquesta 2",
|
|
803
|
+
"jingles"
|
|
804
|
+
]
|
|
805
|
+
].map(([e, t, n]) => ({
|
|
806
|
+
name: e,
|
|
807
|
+
es: t,
|
|
808
|
+
kind: n
|
|
809
|
+
})), je = new Map(k.flatMap((e) => [[nameKey(e.name), e], [nameKey(e.es), e]])), Me = [le], A, j = class _Browser {
|
|
88
810
|
constructor() {
|
|
89
|
-
|
|
811
|
+
w(A, 5, this);
|
|
90
812
|
}
|
|
91
813
|
get supports() {
|
|
92
814
|
return this.detect();
|
|
@@ -121,7 +843,7 @@ var xe = class Api {
|
|
|
121
843
|
return this.matches("(prefers-reduced-motion: reduce)");
|
|
122
844
|
}
|
|
123
845
|
get isDark() {
|
|
124
|
-
return this.matches(
|
|
846
|
+
return this.matches(Ce);
|
|
125
847
|
}
|
|
126
848
|
get navigator() {
|
|
127
849
|
return globalThis.navigator;
|
|
@@ -133,7 +855,7 @@ var xe = class Api {
|
|
|
133
855
|
return typeof matchMedia == "function" && matchMedia(e).matches;
|
|
134
856
|
}
|
|
135
857
|
detect() {
|
|
136
|
-
let e =
|
|
858
|
+
let e = ce(), t = typeof CSS < "u" && typeof CSS.supports == "function";
|
|
137
859
|
return {
|
|
138
860
|
anchorPositioning: t && probe(() => CSS.supports("anchor-name: --x")),
|
|
139
861
|
popover: e && probe(() => Object.hasOwn(HTMLElement.prototype, "popover")),
|
|
@@ -150,7 +872,7 @@ var xe = class Api {
|
|
|
150
872
|
interpolateSize: t && probe(() => CSS.supports("interpolate-size: allow-keywords")),
|
|
151
873
|
anchoredQueries: t && probe(() => CSS.supports("container-type: anchored")),
|
|
152
874
|
fieldSizing: t && probe(() => CSS.supports("field-sizing: content")),
|
|
153
|
-
screenCapture:
|
|
875
|
+
screenCapture: pe()
|
|
154
876
|
};
|
|
155
877
|
function probe(e) {
|
|
156
878
|
try {
|
|
@@ -171,11 +893,11 @@ var xe = class Api {
|
|
|
171
893
|
return typeof CSSContainerRule < "u" && t instanceof CSSContainerRule && /style\(/.test(t.conditionText);
|
|
172
894
|
}
|
|
173
895
|
static isApplePlatform(e = globalThis.navigator) {
|
|
174
|
-
return !!e &&
|
|
896
|
+
return !!e && Pe.test(e.platform || e.userAgent);
|
|
175
897
|
}
|
|
176
898
|
};
|
|
177
|
-
A = u(null),
|
|
178
|
-
var
|
|
899
|
+
A = u(null), b(A, 2, "supports", Me, j), C(A, j), p(j, "Browser");
|
|
900
|
+
var Ne = j, Pe = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
|
|
179
901
|
version = 0;
|
|
180
902
|
languages = /* @__PURE__ */ new Map();
|
|
181
903
|
register(e, t) {
|
|
@@ -205,6 +927,7 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
|
|
|
205
927
|
bubble;
|
|
206
928
|
box;
|
|
207
929
|
shown;
|
|
930
|
+
pointedAt;
|
|
208
931
|
hovered;
|
|
209
932
|
focused;
|
|
210
933
|
pending;
|
|
@@ -214,16 +937,22 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
|
|
|
214
937
|
}
|
|
215
938
|
start() {
|
|
216
939
|
let { popover: e, anchorPositioning: t } = this.browser.supports;
|
|
217
|
-
e && t && (document.documentElement.setAttribute(
|
|
940
|
+
e && t && (document.documentElement.setAttribute(Fe, ""), document.addEventListener("pointerover", this.onPointerOver, !0), document.addEventListener("pointermove", this.onPointerMove, {
|
|
941
|
+
capture: !0,
|
|
942
|
+
passive: !0
|
|
943
|
+
}), document.addEventListener("pointerout", this.onPointerOut, !0), document.addEventListener("focusin", this.onFocusIn, !0), document.addEventListener("focusout", this.onFocusOut, !0), document.addEventListener("keydown", this.onKeyDown, !0), window.addEventListener("scroll", this.follow, {
|
|
218
944
|
capture: !0,
|
|
219
945
|
passive: !0
|
|
220
946
|
}), window.addEventListener("resize", this.follow, { passive: !0 }));
|
|
221
947
|
}
|
|
222
948
|
onPointerOver = (e) => {
|
|
223
|
-
this.hovered = tooltipTargetIn(e), this.update();
|
|
949
|
+
this.pointedAt = e.composedPath()[0], this.hovered = tooltipTargetIn(e), this.update();
|
|
950
|
+
};
|
|
951
|
+
onPointerMove = (e) => {
|
|
952
|
+
e.composedPath()[0] !== this.pointedAt && this.onPointerOver(e);
|
|
224
953
|
};
|
|
225
954
|
onPointerOut = (e) => {
|
|
226
|
-
e.relatedTarget || (this.hovered = void 0, this.update());
|
|
955
|
+
e.relatedTarget || (this.pointedAt = void 0, this.hovered = void 0, this.update());
|
|
227
956
|
};
|
|
228
957
|
onFocusIn = (e) => {
|
|
229
958
|
let t = e.composedPath()[0]?.matches?.(":focus-visible");
|
|
@@ -241,7 +970,7 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
|
|
|
241
970
|
else {
|
|
242
971
|
if (this.cancelPending(), !e) return this.hide();
|
|
243
972
|
if (this.focused || this.shown) return this.show(e);
|
|
244
|
-
this.pending =
|
|
973
|
+
this.pending = T(delayOf(e), () => {
|
|
245
974
|
this.pending = void 0, this.show(e);
|
|
246
975
|
});
|
|
247
976
|
}
|
|
@@ -252,28 +981,28 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
|
|
|
252
981
|
show(e) {
|
|
253
982
|
this.shown = e;
|
|
254
983
|
let t = this.ensureBubble();
|
|
255
|
-
this.fill(e, t), this.shown && (this.place(e),
|
|
984
|
+
this.fill(e, t), this.shown && (this.place(e), y.setShown(t, !0), this.pointArrow(e, t), this.observer ??= new MutationObserver(() => this.onTargetChanged()), this.observer.disconnect(), this.observer.observe(e, {
|
|
256
985
|
attributes: !0,
|
|
257
|
-
attributeFilter: [...
|
|
986
|
+
attributeFilter: [...Ie, M]
|
|
258
987
|
}));
|
|
259
988
|
}
|
|
260
989
|
hide() {
|
|
261
|
-
this.shown = void 0, this.observer?.disconnect(), this.bubble &&
|
|
990
|
+
this.shown = void 0, this.observer?.disconnect(), this.bubble && y.setShown(this.bubble, !1);
|
|
262
991
|
}
|
|
263
992
|
ensureBubble() {
|
|
264
|
-
let e = this.bubble ??= makeElement(
|
|
993
|
+
let e = this.bubble ??= makeElement(Re), t = this.box ??= makeElement(ze);
|
|
265
994
|
return e.setAttribute("role", "tooltip"), t.setAttribute("aria-hidden", "true"), t.isConnected || document.body.append(t), e.isConnected || document.body.append(e), e;
|
|
266
995
|
}
|
|
267
996
|
fill(e, t) {
|
|
268
997
|
let n = e.getAttribute(M);
|
|
269
998
|
if (!n) return this.hide();
|
|
270
999
|
t.textContent = n;
|
|
271
|
-
for (let n of
|
|
1000
|
+
for (let n of Ie) {
|
|
272
1001
|
let r = e.getAttribute(n);
|
|
273
1002
|
r === null ? t.removeAttribute(n) : t.setAttribute(n, r);
|
|
274
1003
|
}
|
|
275
1004
|
let r = getComputedStyle(e);
|
|
276
|
-
for (let e of
|
|
1005
|
+
for (let e of Le) {
|
|
277
1006
|
let n = r.getPropertyValue(e);
|
|
278
1007
|
n ? t.style.setProperty(e, n) : t.style.removeProperty(e);
|
|
279
1008
|
}
|
|
@@ -293,8 +1022,8 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
|
|
|
293
1022
|
Math.min(n.bottom, r.bottom),
|
|
294
1023
|
n.top,
|
|
295
1024
|
n.height
|
|
296
|
-
], l = Math.min(Math.max((a + o) / 2 - s,
|
|
297
|
-
t.setAttribute(
|
|
1025
|
+
], l = Math.min(Math.max((a + o) / 2 - s, He), c - He);
|
|
1026
|
+
t.setAttribute(Be, i), t.style.setProperty(Ve, `${l}px`);
|
|
298
1027
|
}
|
|
299
1028
|
follow = () => {
|
|
300
1029
|
let { shown: e, bubble: t } = this;
|
|
@@ -307,26 +1036,36 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
|
|
|
307
1036
|
let { shown: e, bubble: t } = this;
|
|
308
1037
|
e && t && (this.fill(e, t), this.shown && this.pointArrow(e, t));
|
|
309
1038
|
}
|
|
310
|
-
},
|
|
1039
|
+
}, Fe = "data-ui-top-layer-tooltips", M = "data-tooltip", Ie = [
|
|
311
1040
|
"data-position",
|
|
312
1041
|
"data-inverted",
|
|
313
1042
|
"data-variation"
|
|
314
|
-
],
|
|
1043
|
+
], Le = [
|
|
315
1044
|
"--ui-tooltip-background",
|
|
316
1045
|
"--ui-tooltip-color",
|
|
317
1046
|
"--ui-tooltip-edge",
|
|
318
1047
|
"--ui-font-size",
|
|
319
1048
|
"--ui-font-family"
|
|
320
|
-
],
|
|
1049
|
+
], Re = "ui-tooltip-bubble", ze = "ui-tooltip-target", Be = "data-side", Ve = "--ui-tooltip-arrow-at", He = 12;
|
|
321
1050
|
function boxOf(e) {
|
|
322
1051
|
let t = e.getBoundingClientRect();
|
|
323
|
-
if (t.width || t.height || getComputedStyle(e).display !==
|
|
1052
|
+
if (t.width || t.height || getComputedStyle(e).display !== Ue) return visiblePartOf(e, t);
|
|
324
1053
|
let n = [...e.shadowRoot?.children ?? [], ...e.children].map((e) => e.getBoundingClientRect()).filter((e) => e.width || e.height);
|
|
325
1054
|
if (!n.length) return t;
|
|
326
1055
|
let r = Math.min(...n.map((e) => e.left)), i = Math.min(...n.map((e) => e.top)), a = Math.max(...n.map((e) => e.right)), o = Math.max(...n.map((e) => e.bottom));
|
|
327
1056
|
return new DOMRect(r, i, a - r, o - i);
|
|
328
1057
|
}
|
|
329
|
-
|
|
1058
|
+
function visiblePartOf(e, t) {
|
|
1059
|
+
let { left: n, top: r, right: i, bottom: a } = t;
|
|
1060
|
+
for (let t = se(e); t; t = se(t)) {
|
|
1061
|
+
let { overflowX: e, overflowY: o } = getComputedStyle(t);
|
|
1062
|
+
if (e === N && o === N) continue;
|
|
1063
|
+
let s = t.getBoundingClientRect();
|
|
1064
|
+
e !== N && (n = Math.max(n, s.left), i = Math.min(i, s.right)), o !== N && (r = Math.max(r, s.top), a = Math.min(a, s.bottom));
|
|
1065
|
+
}
|
|
1066
|
+
return i <= n || a <= r ? t : new DOMRect(n, r, i - n, a - r);
|
|
1067
|
+
}
|
|
1068
|
+
var N = "visible", Ue = "contents";
|
|
330
1069
|
function makeElement(e) {
|
|
331
1070
|
let t = document.createElement("div");
|
|
332
1071
|
return t.className = e, t;
|
|
@@ -339,11 +1078,10 @@ function tooltipTargetIn(e) {
|
|
|
339
1078
|
}
|
|
340
1079
|
}
|
|
341
1080
|
function delayOf(e) {
|
|
342
|
-
|
|
343
|
-
return Number.isNaN(r) ? 0 : n.endsWith("ms") ? r / 1e3 : r;
|
|
1081
|
+
return ae(e, "--ui-tooltip-delay", "--ui-hover-delay") ?? 0;
|
|
344
1082
|
}
|
|
345
1083
|
// src/runtime/RovingTabindex.ts
|
|
346
|
-
var
|
|
1084
|
+
var We = class RovingTabindex {
|
|
347
1085
|
container;
|
|
348
1086
|
source;
|
|
349
1087
|
orientation;
|
|
@@ -478,10 +1216,10 @@ var N = class RovingTabindex {
|
|
|
478
1216
|
return t.addEventListener("keydown", (t) => this.trapTab(e, t), r), t.addEventListener("focusin", () => this.pullFocusInto(e), r), () => n.abort();
|
|
479
1217
|
}
|
|
480
1218
|
roving(e) {
|
|
481
|
-
return
|
|
1219
|
+
return We.attach(e);
|
|
482
1220
|
}
|
|
483
1221
|
arrowKey(e, t) {
|
|
484
|
-
return
|
|
1222
|
+
return We.arrowKey(e, t);
|
|
485
1223
|
}
|
|
486
1224
|
trapTab(e, t) {
|
|
487
1225
|
if (t.key !== l.tab || t.ctrlKey || t.metaKey) return;
|
|
@@ -513,9 +1251,9 @@ var N = class RovingTabindex {
|
|
|
513
1251
|
isTabbable(e) {
|
|
514
1252
|
return e.tabIndex < 0 || e instanceof HTMLDialogElement && !e.hasAttribute("tabindex") || e.matches(":disabled") || e.shadowRoot?.delegatesFocus || e instanceof HTMLInputElement && e.type === "hidden" ? !1 : (e instanceof HTMLAnchorElement || e instanceof HTMLAreaElement) && !e.href ? e.hasAttribute("tabindex") : !0;
|
|
515
1253
|
}
|
|
516
|
-
},
|
|
1254
|
+
}, Ge = [de], P, F = class _I18n {
|
|
517
1255
|
constructor({ locale: e, browser: t } = {}) {
|
|
518
|
-
|
|
1256
|
+
w(P, 5, this), f(this, "locale"), f(this, "packs", /* @__PURE__ */ new Map()), f(this, "scoped", /* @__PURE__ */ new Map()), f(this, "defaults", { ...c }), f(this, "scopedDefaults", /* @__PURE__ */ new Map()), f(this, "browser"), f(this, "polyfill"), f(this, "formatters", /* @__PURE__ */ new Map()), this.locale = e ?? globalThis.navigator?.language ?? I, this.browser = t;
|
|
519
1257
|
}
|
|
520
1258
|
register(e, t, n) {
|
|
521
1259
|
if (n === void 0) return void this.packs.set(e, {
|
|
@@ -559,14 +1297,14 @@ var N = class RovingTabindex {
|
|
|
559
1297
|
weekday: e,
|
|
560
1298
|
timeZone: "UTC"
|
|
561
1299
|
}, t);
|
|
562
|
-
return Array.from({ length: 7 }, (e, t) => n.format(Date.UTC(
|
|
1300
|
+
return Array.from({ length: 7 }, (e, t) => n.format(Date.UTC(qe, 0, 1 + t)));
|
|
563
1301
|
}
|
|
564
1302
|
months(e = "long", t = this.locale) {
|
|
565
1303
|
let n = this.dateFormat({
|
|
566
1304
|
month: e,
|
|
567
1305
|
timeZone: "UTC"
|
|
568
1306
|
}, t);
|
|
569
|
-
return Array.from({ length: 12 }, (e, t) => n.format(Date.UTC(
|
|
1307
|
+
return Array.from({ length: 12 }, (e, t) => n.format(Date.UTC(qe, t, 1)));
|
|
570
1308
|
}
|
|
571
1309
|
firstDayOfWeek(e = this.locale) {
|
|
572
1310
|
try {
|
|
@@ -616,8 +1354,8 @@ var N = class RovingTabindex {
|
|
|
616
1354
|
return i || this.formatters.set(r, i = new e(t, n)), i;
|
|
617
1355
|
}
|
|
618
1356
|
};
|
|
619
|
-
P = u(null),
|
|
620
|
-
var
|
|
1357
|
+
P = u(null), b(P, 1, "loadTemporal", Ge, F), C(P, F), p(F, "I18n");
|
|
1358
|
+
var Ke = F, I = "en", qe = 2023, Je = class IconPack {
|
|
621
1359
|
index;
|
|
622
1360
|
url;
|
|
623
1361
|
base;
|
|
@@ -655,8 +1393,8 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
655
1393
|
pack: this.id,
|
|
656
1394
|
key: e,
|
|
657
1395
|
url: new URL(`${e}.svg`, this.base).href,
|
|
658
|
-
width: t.width ?? n.width ??
|
|
659
|
-
height: t.height ?? n.height ??
|
|
1396
|
+
width: t.width ?? n.width ?? L,
|
|
1397
|
+
height: t.height ?? n.height ?? L
|
|
660
1398
|
};
|
|
661
1399
|
}
|
|
662
1400
|
static async load(e, t) {
|
|
@@ -674,7 +1412,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
674
1412
|
static pageUrl() {
|
|
675
1413
|
return globalThis.document?.baseURI;
|
|
676
1414
|
}
|
|
677
|
-
},
|
|
1415
|
+
}, L = 512, Ye = class IconPacks {
|
|
678
1416
|
sources = [];
|
|
679
1417
|
started = !1;
|
|
680
1418
|
templates;
|
|
@@ -752,16 +1490,16 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
752
1490
|
}
|
|
753
1491
|
add(e, t) {
|
|
754
1492
|
let n = e, r = IconPacks.urlFor(n.source, t);
|
|
755
|
-
return n.promise = r === void 0 ? Promise.resolve(void 0) :
|
|
756
|
-
|
|
1493
|
+
return n.promise = r === void 0 ? Promise.resolve(void 0) : Je.load(r, n.options).then((e) => n.pack = e, (e) => {
|
|
1494
|
+
S.warn(Xe, `icon pack ${r} didn't load:`, e);
|
|
757
1495
|
}), n.options.only && (this.sources = []), this.sources.push(n), n;
|
|
758
1496
|
}
|
|
759
1497
|
static urlFor(e, t) {
|
|
760
1498
|
try {
|
|
761
|
-
let n =
|
|
1499
|
+
let n = Je.pageUrl();
|
|
762
1500
|
return r.has(e) ? r.url(e, t === void 0 ? void 0 : new URL(t, n).href) : new URL(e, n).href;
|
|
763
1501
|
} catch (t) {
|
|
764
|
-
|
|
1502
|
+
S.warn(Xe, `icon pack ${e} has no usable URL:`, t);
|
|
765
1503
|
return;
|
|
766
1504
|
}
|
|
767
1505
|
}
|
|
@@ -769,7 +1507,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
769
1507
|
return this.templateLoads.get(e, () => this.fetchTemplate(e)).catch(() => void 0);
|
|
770
1508
|
}
|
|
771
1509
|
async fetchTemplate(e) {
|
|
772
|
-
let { text: t } = await
|
|
1510
|
+
let { text: t } = await D(e, ({ response: t, error: n }) => t ? /* @__PURE__ */ Error(`UI.icons: ${e} answered ${E(t)}`) : n instanceof Error ? n : Error(String(n))), n = IconPacks.parse(t);
|
|
773
1511
|
return n && this.templates.set(e, n), n;
|
|
774
1512
|
}
|
|
775
1513
|
static parse(e) {
|
|
@@ -780,19 +1518,19 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
780
1518
|
let t = document.importNode(e, !0), n = t.getAttribute("fill");
|
|
781
1519
|
return n === null ? t.setAttribute("fill", "currentColor") : t.style.setProperty("fill", n), t;
|
|
782
1520
|
}
|
|
783
|
-
},
|
|
1521
|
+
}, Xe = "UI.icons", Ids = class {
|
|
784
1522
|
counter = 0;
|
|
785
|
-
next(e =
|
|
1523
|
+
next(e = Ze, t = globalThis.document) {
|
|
786
1524
|
let n;
|
|
787
1525
|
do
|
|
788
1526
|
n = `${e}-${++this.counter}`;
|
|
789
1527
|
while (t?.getElementById(n));
|
|
790
1528
|
return n;
|
|
791
1529
|
}
|
|
792
|
-
ensure(e, t =
|
|
1530
|
+
ensure(e, t = Ze) {
|
|
793
1531
|
return e.id ||= this.next(t), e.id;
|
|
794
1532
|
}
|
|
795
|
-
},
|
|
1533
|
+
}, Ze = "ui", Qe = class Chord {
|
|
796
1534
|
key;
|
|
797
1535
|
keyText;
|
|
798
1536
|
modifiers;
|
|
@@ -824,12 +1562,12 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
824
1562
|
if (/^[a-z]$/.test(this.key)) return `Key${this.key.toUpperCase()}`;
|
|
825
1563
|
if (/^[0-9]$/.test(this.key)) return `Digit${this.key}`;
|
|
826
1564
|
}
|
|
827
|
-
static parse(e, { isApple: t =
|
|
1565
|
+
static parse(e, { isApple: t = Ne.isApplePlatform() } = {}) {
|
|
828
1566
|
let n = Chord.partsOf(e.trim()), r = n.pop()?.trim();
|
|
829
1567
|
if (!r) throw SyntaxError(`Chord.parse(): no key in ${JSON.stringify(e)}; end it with one, e.g. "Mod+K"`);
|
|
830
1568
|
let i = [];
|
|
831
1569
|
for (let r of n) {
|
|
832
|
-
let n =
|
|
1570
|
+
let n = $e[r.trim().toLowerCase()];
|
|
833
1571
|
if (!n) throw SyntaxError(`Chord.parse(): unknown modifier ${JSON.stringify(r)} in ${JSON.stringify(e)}; use Mod, Ctrl, Meta, Alt or Shift`);
|
|
834
1572
|
let a = n === "mod" ? t ? "meta" : "ctrl" : n;
|
|
835
1573
|
i.includes(a) || i.push(a);
|
|
@@ -845,9 +1583,9 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
845
1583
|
static normalizeKey(e) {
|
|
846
1584
|
if (e === " ") return e;
|
|
847
1585
|
let t = e.toLowerCase();
|
|
848
|
-
return
|
|
1586
|
+
return et[t] ?? t;
|
|
849
1587
|
}
|
|
850
|
-
},
|
|
1588
|
+
}, $e = {
|
|
851
1589
|
mod: "mod",
|
|
852
1590
|
modifier: "mod",
|
|
853
1591
|
ctrl: "ctrl",
|
|
@@ -858,7 +1596,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
858
1596
|
alt: "alt",
|
|
859
1597
|
option: "alt",
|
|
860
1598
|
shift: "shift"
|
|
861
|
-
},
|
|
1599
|
+
}, et = {
|
|
862
1600
|
esc: "escape",
|
|
863
1601
|
space: " ",
|
|
864
1602
|
spacebar: " ",
|
|
@@ -869,7 +1607,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
869
1607
|
del: "delete",
|
|
870
1608
|
return: "enter",
|
|
871
1609
|
plus: "+"
|
|
872
|
-
},
|
|
1610
|
+
}, tt = [O], R, z = class _Keyboard {
|
|
873
1611
|
constructor({ isApple: e = !1 } = {}) {
|
|
874
1612
|
f(this, "isApple"), f(this, "registrations", []), f(this, "scopes", [g]), f(this, "listener"), f(this, "onKeyDown", /* @__PURE__ */ p((e) => {
|
|
875
1613
|
if (e.defaultPrevented || e.isComposing) return;
|
|
@@ -882,13 +1620,13 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
882
1620
|
}
|
|
883
1621
|
}
|
|
884
1622
|
function isEditable(e) {
|
|
885
|
-
return e instanceof HTMLElement ? e.isContentEditable || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e instanceof HTMLInputElement && !
|
|
1623
|
+
return e instanceof HTMLElement ? e.isContentEditable || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e instanceof HTMLInputElement && !rt.has(e.type) : !1;
|
|
886
1624
|
}
|
|
887
1625
|
p(isEditable, "isEditable");
|
|
888
1626
|
}, "onKeyDown")), this.isApple = e;
|
|
889
1627
|
}
|
|
890
1628
|
chord(e, { isApple: t = this.isApple } = {}) {
|
|
891
|
-
return
|
|
1629
|
+
return Qe.parse(e, { isApple: t });
|
|
892
1630
|
}
|
|
893
1631
|
register({ scope: e = g, chord: t, handler: n, ...r }) {
|
|
894
1632
|
let i = {
|
|
@@ -925,14 +1663,14 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
|
|
|
925
1663
|
checkConflict(e) {
|
|
926
1664
|
if (e.options.layered) return;
|
|
927
1665
|
let t = e.chord.toString(), n = this.registrations.find((n) => n.scope === e.scope && n.chord.toString() === t && n.options.target === e.options.target);
|
|
928
|
-
n &&
|
|
1666
|
+
n && S.warn("UI.keyboard", `"${t}" registered twice in scope "${e.scope}"; the newer handler wins:`, {
|
|
929
1667
|
existing: n.handler,
|
|
930
1668
|
added: e.handler
|
|
931
1669
|
});
|
|
932
1670
|
}
|
|
933
1671
|
};
|
|
934
|
-
|
|
935
|
-
var
|
|
1672
|
+
R = u(null), b(R, 13, "warnConflicts", tt, z), C(R, z), p(z, "Keyboard"), f(z, "warnConflicts", w(R, 8, z, !1)), w(R, 11, z);
|
|
1673
|
+
var nt = z, rt = /* @__PURE__ */ new Set([
|
|
936
1674
|
"button",
|
|
937
1675
|
"checkbox",
|
|
938
1676
|
"radio",
|
|
@@ -942,7 +1680,7 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
|
|
|
942
1680
|
"color",
|
|
943
1681
|
"file",
|
|
944
1682
|
"image"
|
|
945
|
-
]),
|
|
1683
|
+
]), it = class Modals {
|
|
946
1684
|
static provider;
|
|
947
1685
|
register(e) {
|
|
948
1686
|
let t = Modals.provider;
|
|
@@ -966,6 +1704,9 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
|
|
|
966
1704
|
prompt(e) {
|
|
967
1705
|
return this.registeredProvider.prompt(this.optionsFor(e));
|
|
968
1706
|
}
|
|
1707
|
+
choose(e) {
|
|
1708
|
+
return this.registeredProvider.choose(e);
|
|
1709
|
+
}
|
|
969
1710
|
get registeredProvider() {
|
|
970
1711
|
if (!Modals.provider) throw Error("UI.modals: ui-modal not registered; import its family (`spell/ui/ui-modal`) first");
|
|
971
1712
|
return Modals.provider;
|
|
@@ -973,7 +1714,7 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
|
|
|
973
1714
|
optionsFor(e) {
|
|
974
1715
|
return typeof e == "string" ? { message: e } : e;
|
|
975
1716
|
}
|
|
976
|
-
},
|
|
1717
|
+
}, at = [O], B, V = class _Overlays {
|
|
977
1718
|
constructor({ keyboard: e, focus: t, browser: n, styles: r }) {
|
|
978
1719
|
f(this, "keyboard"), f(this, "focus"), f(this, "browser"), f(this, "styles"), f(this, "stack", []), f(this, "scrollLocks", 0), f(this, "press"), f(this, "listeners"), f(this, "counter", 0), f(this, "onPointerDown", /* @__PURE__ */ p((e) => {
|
|
979
1720
|
this.press = {
|
|
@@ -995,12 +1736,12 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
|
|
|
995
1736
|
}
|
|
996
1737
|
open(e) {
|
|
997
1738
|
if (this.recordOf(e)) return;
|
|
998
|
-
let t = e.kind ===
|
|
1739
|
+
let t = e.kind === st, n = {
|
|
999
1740
|
entry: e,
|
|
1000
|
-
pool: e.pool ?? (t ?
|
|
1741
|
+
pool: e.pool ?? (t ? st : ct),
|
|
1001
1742
|
closeOnEscape: e.closeOnEscape ?? !t,
|
|
1002
1743
|
closeOnOutsideClick: e.closeOnOutsideClick ?? !t,
|
|
1003
|
-
modal: e.modal ??
|
|
1744
|
+
modal: e.modal ?? lt.has(e.kind),
|
|
1004
1745
|
scope: `overlay-${++this.counter}`,
|
|
1005
1746
|
restoreTo: e.restoreFocus === !1 ? void 0 : this.focus.activeElementDeep()
|
|
1006
1747
|
};
|
|
@@ -1082,12 +1823,12 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
|
|
|
1082
1823
|
lockScroll() {
|
|
1083
1824
|
if (this.scrollLocks++ > 0) return;
|
|
1084
1825
|
let e = document.documentElement;
|
|
1085
|
-
this.styles?.register("scroll-lock",
|
|
1826
|
+
this.styles?.register("scroll-lock", ut, { page: !0 }), e.style.setProperty(H, `${Math.max(0, window.innerWidth - e.clientWidth)}px`), e.classList.add(_);
|
|
1086
1827
|
}
|
|
1087
1828
|
unlockScroll() {
|
|
1088
1829
|
if (this.scrollLocks === 0 || --this.scrollLocks > 0) return;
|
|
1089
1830
|
let e = document.documentElement;
|
|
1090
|
-
e.classList.remove(
|
|
1831
|
+
e.classList.remove(_), e.style.removeProperty(H);
|
|
1091
1832
|
}
|
|
1092
1833
|
restoreFocus(e) {
|
|
1093
1834
|
let t = e.restoreTo;
|
|
@@ -1102,19 +1843,19 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
|
|
|
1102
1843
|
return !!t.id && e.some((e) => e.getAttribute?.("commandfor") === t.id);
|
|
1103
1844
|
}
|
|
1104
1845
|
};
|
|
1105
|
-
|
|
1106
|
-
var
|
|
1846
|
+
B = u(null), b(B, 13, "useCloseWatcher", at, V), C(B, V), p(V, "Overlays"), f(V, "useCloseWatcher", w(B, 8, V, !0)), w(B, 11, V);
|
|
1847
|
+
var ot = V, st = "toast", ct = "default", lt = /* @__PURE__ */ new Set([
|
|
1107
1848
|
"modal",
|
|
1108
1849
|
"flyout",
|
|
1109
1850
|
"dimmer"
|
|
1110
|
-
]), H = "--ui-scrollbar-width",
|
|
1851
|
+
]), H = "--ui-scrollbar-width", ut = `${m}
|
|
1111
1852
|
@layer ui.base {
|
|
1112
|
-
html.${
|
|
1853
|
+
html.${_} {
|
|
1113
1854
|
overflow: hidden;
|
|
1114
1855
|
padding-inline-end: var(${H}, 0px);
|
|
1115
1856
|
}
|
|
1116
1857
|
}`, PropertyControls = class {
|
|
1117
|
-
kinds = new Map(Object.entries(
|
|
1858
|
+
kinds = new Map(Object.entries(ft));
|
|
1118
1859
|
choiceSources = /* @__PURE__ */ new Map();
|
|
1119
1860
|
rules = /* @__PURE__ */ new Map();
|
|
1120
1861
|
schemas = /* @__PURE__ */ new Map();
|
|
@@ -1127,7 +1868,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1127
1868
|
kindFor(e) {
|
|
1128
1869
|
let t;
|
|
1129
1870
|
for (let [n, r] of this.kinds) r.types?.includes(e) && (t = n);
|
|
1130
|
-
return t ??
|
|
1871
|
+
return t ?? dt;
|
|
1131
1872
|
}
|
|
1132
1873
|
addChoices(e, t) {
|
|
1133
1874
|
this.choiceSources.set(e, t);
|
|
@@ -1152,7 +1893,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1152
1893
|
schema(e) {
|
|
1153
1894
|
return this.schemas.get(e);
|
|
1154
1895
|
}
|
|
1155
|
-
},
|
|
1896
|
+
}, dt = "input", U = { fluid: "" }, ft = {
|
|
1156
1897
|
input: {
|
|
1157
1898
|
tag: "ui-input",
|
|
1158
1899
|
attributes: U,
|
|
@@ -1237,14 +1978,14 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1237
1978
|
tag: "ui-property-editor",
|
|
1238
1979
|
types: ["thing"]
|
|
1239
1980
|
}
|
|
1240
|
-
},
|
|
1981
|
+
}, pt = class Sources {
|
|
1241
1982
|
saver;
|
|
1242
1983
|
inlineSaver;
|
|
1243
1984
|
cache = new h({ failures: "forgotten" });
|
|
1244
1985
|
resolve(e, t = document.baseURI) {
|
|
1245
|
-
if (location.protocol === "file:") throw new
|
|
1986
|
+
if (location.protocol === "file:") throw new v(`Sources.resolve(): can't reach ${e} from a page opened from disk; serve the page`, { cause: { kind: "file-protocol" } });
|
|
1246
1987
|
let n = new URL(e, t);
|
|
1247
|
-
if (n.origin !== location.origin) throw new
|
|
1988
|
+
if (n.origin !== location.origin) throw new v(`Sources.resolve(): ${n.href} is on another origin; serve it from ${location.origin}`, { cause: { kind: "cross-origin" } });
|
|
1248
1989
|
return n;
|
|
1249
1990
|
}
|
|
1250
1991
|
load(e, { fresh: t, signal: n } = {}) {
|
|
@@ -1261,7 +2002,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1261
2002
|
this.cache.forget(e === void 0 ? void 0 : new URL(e, document.baseURI).href);
|
|
1262
2003
|
}
|
|
1263
2004
|
async fetch(e) {
|
|
1264
|
-
let { text: t, response: n } = await
|
|
2005
|
+
let { text: t, response: n } = await D(e, Sources.failed, { cache: "no-cache" });
|
|
1265
2006
|
return {
|
|
1266
2007
|
url: e,
|
|
1267
2008
|
text: t,
|
|
@@ -1271,7 +2012,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1271
2012
|
}
|
|
1272
2013
|
async save(e) {
|
|
1273
2014
|
let t = this.resolve(e.url).href;
|
|
1274
|
-
if (!this.saver) throw new
|
|
2015
|
+
if (!this.saver) throw new v(`Sources.save(): this page has no saver for ${t}; set \`UI.sources.saver\``, { cause: { kind: "no-saver" } });
|
|
1275
2016
|
let n;
|
|
1276
2017
|
try {
|
|
1277
2018
|
n = await this.saver({
|
|
@@ -1288,7 +2029,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1288
2029
|
}), n;
|
|
1289
2030
|
}
|
|
1290
2031
|
async saveInline(e) {
|
|
1291
|
-
if (!this.inlineSaver) throw new
|
|
2032
|
+
if (!this.inlineSaver) throw new v("Sources.saveInline(): this page has no inline saver; set `UI.sources.inlineSaver`", { cause: { kind: "no-saver" } });
|
|
1292
2033
|
try {
|
|
1293
2034
|
return await this.inlineSaver(e);
|
|
1294
2035
|
} catch (t) {
|
|
@@ -1296,26 +2037,26 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1296
2037
|
}
|
|
1297
2038
|
}
|
|
1298
2039
|
static saverFailed(e, t) {
|
|
1299
|
-
if (e instanceof
|
|
2040
|
+
if (e instanceof v) return e;
|
|
1300
2041
|
let { kind: n, message: r, status: i } = e ?? {};
|
|
1301
|
-
return new
|
|
1302
|
-
kind:
|
|
2042
|
+
return new v(`${t}: ${typeof r == "string" ? r : String(e)}`, { cause: {
|
|
2043
|
+
kind: v.isKind(n) ? n : "save",
|
|
1303
2044
|
status: typeof i == "number" ? i : void 0,
|
|
1304
2045
|
error: e
|
|
1305
2046
|
} });
|
|
1306
2047
|
}
|
|
1307
2048
|
static failed({ url: e, response: t, error: n }) {
|
|
1308
|
-
if (t) return new
|
|
2049
|
+
if (t) return new v(`Sources.load(): ${e} answered ${E(t)}; check the path`, { cause: {
|
|
1309
2050
|
kind: "load",
|
|
1310
2051
|
status: t.status
|
|
1311
2052
|
} });
|
|
1312
2053
|
let r = n instanceof Error ? n.message : String(n);
|
|
1313
|
-
return new
|
|
2054
|
+
return new v(`Sources.load(): ${e} didn't answer (${r}); is its server up?`, { cause: {
|
|
1314
2055
|
kind: "load",
|
|
1315
2056
|
error: n
|
|
1316
2057
|
} });
|
|
1317
2058
|
}
|
|
1318
|
-
},
|
|
2059
|
+
}, mt = class AppStylesheet {
|
|
1319
2060
|
sheet;
|
|
1320
2061
|
onSheetChange;
|
|
1321
2062
|
syncDelay;
|
|
@@ -1354,7 +2095,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1354
2095
|
}
|
|
1355
2096
|
syncSoon() {
|
|
1356
2097
|
this.timer?.cancel(), this.latest = new Promise((e) => {
|
|
1357
|
-
this.timer =
|
|
2098
|
+
this.timer = T(this.syncDelay / 1e3, () => e(this.sync()));
|
|
1358
2099
|
});
|
|
1359
2100
|
}
|
|
1360
2101
|
watch(e) {
|
|
@@ -1373,12 +2114,12 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1373
2114
|
}
|
|
1374
2115
|
async sync() {
|
|
1375
2116
|
let t = ++this.generation, n = document.getElementById(e), r = n instanceof HTMLLinkElement || n instanceof HTMLStyleElement ? n : void 0;
|
|
1376
|
-
n && !r &&
|
|
2117
|
+
n && !r && S.warn(W, "must be a <link rel=\"stylesheet\"> or <style>:", n), this.watch(r);
|
|
1377
2118
|
let i = "", a = document.baseURI;
|
|
1378
2119
|
try {
|
|
1379
2120
|
r instanceof HTMLLinkElement ? r.href && (a = r.href, i = await this.readLink(r)) : r && (i = await this.inlineImports(r.textContent ?? "", a));
|
|
1380
2121
|
} catch (e) {
|
|
1381
|
-
|
|
2122
|
+
S.warn(W, "couldn't read the stylesheet:", e);
|
|
1382
2123
|
return;
|
|
1383
2124
|
}
|
|
1384
2125
|
t === this.generation && this.apply(i, a);
|
|
@@ -1421,7 +2162,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1421
2162
|
try {
|
|
1422
2163
|
r = this.absolutizeUrls(this.serialize(e.cssRules), e.href ?? document.baseURI);
|
|
1423
2164
|
} catch {
|
|
1424
|
-
|
|
2165
|
+
S.warn(W, `can't read cross-origin @import ${n.href}; use a <style> instead`);
|
|
1425
2166
|
continue;
|
|
1426
2167
|
}
|
|
1427
2168
|
let i = {
|
|
@@ -1443,8 +2184,8 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1443
2184
|
return e.replace(G, () => r[i++] ?? "");
|
|
1444
2185
|
}
|
|
1445
2186
|
async fetchSheetText(e, t) {
|
|
1446
|
-
let { text: n } = await
|
|
1447
|
-
return G.test(r) &&
|
|
2187
|
+
let { text: n } = await D(e, AppStylesheet.failed), r = this.absolutizeUrls(n, t);
|
|
2188
|
+
return G.test(r) && S.warn(W, `nested @import in ${e} is ignored (only one level is inlined)`), G.lastIndex = 0, r;
|
|
1448
2189
|
}
|
|
1449
2190
|
importConditionsFor(e) {
|
|
1450
2191
|
let t = e.trim(), n, r, i = /^layer(?:\(\s*([^)]*?)\s*\))?/.exec(t);
|
|
@@ -1461,7 +2202,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1461
2202
|
return t !== void 0 && (i = `@layer ${t} {\n${i}\n}`), n && (i = `@supports (${n.replace(/^\((.*)\)$/, "$1")}) {\n${i}\n}`), r && r !== "all" && (i = `@media ${r} {\n${i}\n}`), t === void 0 ? i : `${m}\n${i}`;
|
|
1462
2203
|
}
|
|
1463
2204
|
absolutizeUrls(e, t) {
|
|
1464
|
-
return e.replace(
|
|
2205
|
+
return e.replace(ht, (e, n, r) => {
|
|
1465
2206
|
try {
|
|
1466
2207
|
return `url(${n}${new URL(r, t).href}${n})`;
|
|
1467
2208
|
} catch {
|
|
@@ -1470,9 +2211,9 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1470
2211
|
});
|
|
1471
2212
|
}
|
|
1472
2213
|
static failed({ url: e, response: t, error: n }) {
|
|
1473
|
-
return t ? /* @__PURE__ */ Error(`AppStylesheet.fetchSheetText(): ${e} answered ${
|
|
2214
|
+
return t ? /* @__PURE__ */ Error(`AppStylesheet.fetchSheetText(): ${e} answered ${E(t)}; check the stylesheet's URL`) : n instanceof Error ? n : Error(String(n));
|
|
1474
2215
|
}
|
|
1475
|
-
}, W = `#${e}`, G = /@import\s+(?:url\(\s*(['"]?)([^'")]+)\1\s*\)|(['"])([^'"]+)\3)\s*([^;]*);/g,
|
|
2216
|
+
}, W = `#${e}`, G = /@import\s+(?:url\(\s*(['"]?)([^'")]+)\1\s*\)|(['"])([^'"]+)\3)\s*([^;]*);/g, ht = /url\(\s*(['"]?)(?![a-z][\w+.-]*:|#)([^'")]+)\1\s*\)/gi, Styles = class {
|
|
1476
2217
|
sheets = /* @__PURE__ */ new Map();
|
|
1477
2218
|
texts = /* @__PURE__ */ new Map();
|
|
1478
2219
|
owned = /* @__PURE__ */ new WeakSet();
|
|
@@ -1480,7 +2221,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1480
2221
|
shadowNames = /* @__PURE__ */ new Set();
|
|
1481
2222
|
linkedNames = /* @__PURE__ */ new Set();
|
|
1482
2223
|
foundation = [];
|
|
1483
|
-
utilities = [
|
|
2224
|
+
utilities = [re];
|
|
1484
2225
|
roots = /* @__PURE__ */ new Set();
|
|
1485
2226
|
rootNames = /* @__PURE__ */ new WeakMap();
|
|
1486
2227
|
pageSheetRoots = /* @__PURE__ */ new WeakSet();
|
|
@@ -1533,7 +2274,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1533
2274
|
this.app?.stop(), this.app = void 0, this.roots.clear();
|
|
1534
2275
|
}
|
|
1535
2276
|
startApp() {
|
|
1536
|
-
if (typeof document < "u") return this.app || (this.app = new
|
|
2277
|
+
if (typeof document < "u") return this.app || (this.app = new mt({ onSheetChange: (e) => {
|
|
1537
2278
|
this.owned.add(e), this.refreshRoots();
|
|
1538
2279
|
} }), this.owned.add(this.app.sheet)), this.app.start(), this.app.ready;
|
|
1539
2280
|
}
|
|
@@ -1550,9 +2291,10 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1550
2291
|
e.adoptedStyleSheets = [...new Set(r)];
|
|
1551
2292
|
}
|
|
1552
2293
|
refreshRoots() {
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
2294
|
+
let e = typeof document > "u" ? void 0 : document;
|
|
2295
|
+
for (let t of this.roots) {
|
|
2296
|
+
let n = t.deref();
|
|
2297
|
+
n ? e && n.ownerDocument !== e || this.push(n) : this.roots.delete(t);
|
|
1556
2298
|
}
|
|
1557
2299
|
}
|
|
1558
2300
|
refreshPage() {
|
|
@@ -1561,7 +2303,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1561
2303
|
document.adoptedStyleSheets = [...e, ...n], !t && !this.isWatchingLoad && document.readyState !== "complete" && (this.isWatchingLoad = !0, window.addEventListener("load", () => this.refreshPage(), { once: !0 }));
|
|
1562
2304
|
}
|
|
1563
2305
|
get isPageLinked() {
|
|
1564
|
-
return getComputedStyle(document.documentElement).getPropertyValue(
|
|
2306
|
+
return getComputedStyle(document.documentElement).getPropertyValue(gt).trim() === _t;
|
|
1565
2307
|
}
|
|
1566
2308
|
lookup(e) {
|
|
1567
2309
|
let t = [];
|
|
@@ -1571,7 +2313,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1571
2313
|
}
|
|
1572
2314
|
return t;
|
|
1573
2315
|
}
|
|
1574
|
-
},
|
|
2316
|
+
}, gt = "--ui-page-sheet", _t = "linked", Themes = class {
|
|
1575
2317
|
static RENAMED = {
|
|
1576
2318
|
studio: "merlot",
|
|
1577
2319
|
"spell-brand": "spell"
|
|
@@ -1610,7 +2352,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1610
2352
|
return t();
|
|
1611
2353
|
}
|
|
1612
2354
|
async apply(e, { tint: t = "" } = {}) {
|
|
1613
|
-
if (e === "" && (e = void 0), e !== void 0 && (!this.has(e) || e ===
|
|
2355
|
+
if (e === "" && (e = void 0), e !== void 0 && (!this.has(e) || e === bt)) throw TypeError(`Themes.apply(): \`${e}\` isn't a theme; pick \`${K}\` or one of: ${this.own.join(", ")}`);
|
|
1614
2356
|
let n = ++this.calls;
|
|
1615
2357
|
this.current = e;
|
|
1616
2358
|
let r = e === void 0 ? "" : await this.load(K), i = e === void 0 || e === K ? "" : await this.load(e);
|
|
@@ -1632,7 +2374,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
|
|
|
1632
2374
|
function rootRulesOn(e, t) {
|
|
1633
2375
|
let n = [];
|
|
1634
2376
|
for (let r of e) if (r instanceof CSSStyleRule) {
|
|
1635
|
-
let e = r.selectorText.split(",").map((e) => e.trim()).filter((e) =>
|
|
2377
|
+
let e = r.selectorText.split(",").map((e) => e.trim()).filter((e) => yt.test(e)), i = r.style.cssText.replace(vt, "");
|
|
1636
2378
|
e.length && i.trim() && n.push(`${e.map((e) => `${e} ${t}`).join(", ")} { ${i} }`);
|
|
1637
2379
|
} else if (r instanceof CSSMediaRule || r instanceof CSSSupportsRule) {
|
|
1638
2380
|
let e = rootRulesOn(r.cssRules, t);
|
|
@@ -1640,7 +2382,7 @@ function rootRulesOn(e, t) {
|
|
|
1640
2382
|
} else r instanceof CSSLayerBlockRule && n.push(rootRulesOn(r.cssRules, t));
|
|
1641
2383
|
return n.filter(Boolean).join("\n");
|
|
1642
2384
|
}
|
|
1643
|
-
var
|
|
2385
|
+
var vt = /* @__PURE__ */ RegExp("(?<=^|;\\s*)(?:color-scheme|--ui-scheme|--ui-control-cursor)\\s*:[^;]*;\\s*", "g"), yt = /^:root(?:[.:[][^\s>+~]*)?$/, K = "classic", bt = "dark", q = Object.fromEntries(Object.entries(/* #__PURE__ */ Object.assign({
|
|
1644
2386
|
"../styles/themes/classic.css": () => import("./classic-BHyJFvQa.js").then((e) => e.default),
|
|
1645
2387
|
"../styles/themes/crisp.css": () => import("./crisp-DIpY320U.js").then((e) => e.default),
|
|
1646
2388
|
"../styles/themes/dark.css": () => import("./dark-B5s4QbmU.js").then((e) => e.default),
|
|
@@ -1653,7 +2395,7 @@ var lt = /* @__PURE__ */ RegExp("(?<=^|;\\s*)(?:color-scheme|--ui-scheme|--ui-co
|
|
|
1653
2395
|
"../styles/themes/paper.css": () => import("./paper-DPxolmdy.js").then((e) => e.default),
|
|
1654
2396
|
"../styles/themes/pop.css": () => import("./pop-Dw_6k177.js").then((e) => e.default),
|
|
1655
2397
|
"../styles/themes/spell.css": () => import("./spell-CB-MivSX.js").then((e) => e.default)
|
|
1656
|
-
})).map(([e, t]) => [e.replace(/^.*\//, "").replace(/\.css$/, ""), t])),
|
|
2398
|
+
})).map(([e, t]) => [e.replace(/^.*\//, "").replace(/\.css$/, ""), t])), xt = class Toasts {
|
|
1657
2399
|
static provider;
|
|
1658
2400
|
register(e) {
|
|
1659
2401
|
let t = Toasts.provider;
|
|
@@ -1678,8 +2420,8 @@ var lt = /* @__PURE__ */ RegExp("(?<=^|;\\s*)(?:color-scheme|--ui-scheme|--ui-co
|
|
|
1678
2420
|
if (!Toasts.provider) throw Error("UI.toasts: ui-toast not registered; import its family (`spell/ui/ui-toast`) first");
|
|
1679
2421
|
return Toasts.provider;
|
|
1680
2422
|
}
|
|
1681
|
-
},
|
|
1682
|
-
|
|
2423
|
+
}, St, Ct = [O], J;
|
|
2424
|
+
St = [O];
|
|
1683
2425
|
var Y = class _Transitions {
|
|
1684
2426
|
constructor({ browser: e }) {
|
|
1685
2427
|
f(this, "browser"), f(this, "running", /* @__PURE__ */ new WeakMap()), this.browser = e;
|
|
@@ -1693,14 +2435,14 @@ var Y = class _Transitions {
|
|
|
1693
2435
|
return a === 0 ? (this.cleanup(e, n, r), Promise.resolve(!0)) : new Promise((t) => {
|
|
1694
2436
|
let i = new AbortController(), o = /* @__PURE__ */ p((t) => {
|
|
1695
2437
|
t.target === e && c(!0);
|
|
1696
|
-
}, "onEnd"), s =
|
|
2438
|
+
}, "onEnd"), s = T((a + this.failSafeDelay) / 1e3, () => c(!0)), c = /* @__PURE__ */ p((a) => {
|
|
1697
2439
|
this.running.get(e) === l && (this.running.delete(e), s.cancel(), i.abort(), a && this.cleanup(e, n, r), t(a));
|
|
1698
2440
|
}, "finish"), l = {
|
|
1699
2441
|
direction: n,
|
|
1700
2442
|
finish: c
|
|
1701
2443
|
};
|
|
1702
2444
|
this.running.set(e, l);
|
|
1703
|
-
for (let t of
|
|
2445
|
+
for (let t of Dt) e.addEventListener(t, o, { signal: i.signal });
|
|
1704
2446
|
});
|
|
1705
2447
|
}
|
|
1706
2448
|
isAnimating(e, t) {
|
|
@@ -1717,10 +2459,10 @@ var Y = class _Transitions {
|
|
|
1717
2459
|
e.hidden = !0, e.isConnected && getComputedStyle(e).display !== a.none && (e.style.setProperty("display", a.none), e.setAttribute(this.forcedDisplayAttribute, ""));
|
|
1718
2460
|
}
|
|
1719
2461
|
setOptions(e, { duration: t, easing: n }) {
|
|
1720
|
-
t !== void 0 && e.style.setProperty(
|
|
2462
|
+
t !== void 0 && e.style.setProperty(Tt, typeof t == "number" ? `${t}ms` : t), n !== void 0 && e.style.setProperty(Et, n);
|
|
1721
2463
|
}
|
|
1722
2464
|
cleanup(e, t, n) {
|
|
1723
|
-
t === "out" && this.hide(e), e.removeAttribute(X), n.duration !== void 0 && e.style.removeProperty(
|
|
2465
|
+
t === "out" && this.hide(e), e.removeAttribute(X), n.duration !== void 0 && e.style.removeProperty(Tt), n.easing !== void 0 && e.style.removeProperty(Et);
|
|
1724
2466
|
}
|
|
1725
2467
|
expectedDuration(e) {
|
|
1726
2468
|
if (!e.isConnected) return 0;
|
|
@@ -1736,21 +2478,21 @@ var Y = class _Transitions {
|
|
|
1736
2478
|
}
|
|
1737
2479
|
}
|
|
1738
2480
|
};
|
|
1739
|
-
J = u(null),
|
|
1740
|
-
var
|
|
2481
|
+
J = u(null), b(J, 13, "failSafeDelay", Ct, Y), b(J, 13, "forcedDisplayAttribute", St, Y), C(J, Y), p(Y, "Transitions"), f(Y, "failSafeDelay", w(J, 8, Y, 100)), w(J, 11, Y), f(Y, "forcedDisplayAttribute", w(J, 12, Y, "data-ui-hidden-by-animation")), w(J, 15, Y);
|
|
2482
|
+
var wt = Y, X = "data-ui-animation", Tt = "--ui-animation-duration", Et = "--ui-animation-easing", Dt = ["animationend", "animationcancel"], Visibility = class {
|
|
1741
2483
|
transitions;
|
|
1742
2484
|
constructor({ transitions: e }) {
|
|
1743
2485
|
this.transitions = e;
|
|
1744
2486
|
}
|
|
1745
2487
|
observe(e, t = {}) {
|
|
1746
|
-
let n = new
|
|
2488
|
+
let n = new Ot({
|
|
1747
2489
|
element: e,
|
|
1748
2490
|
options: t
|
|
1749
2491
|
});
|
|
1750
2492
|
return () => n.dispose();
|
|
1751
2493
|
}
|
|
1752
2494
|
lazyImage(e, t = {}) {
|
|
1753
|
-
let n = e.getAttribute(
|
|
2495
|
+
let n = e.getAttribute(Nt.src);
|
|
1754
2496
|
if (!n) return () => void 0;
|
|
1755
2497
|
let r = this.observe(e, {
|
|
1756
2498
|
once: !0,
|
|
@@ -1763,7 +2505,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1763
2505
|
return r;
|
|
1764
2506
|
}
|
|
1765
2507
|
async load(e, t, n) {
|
|
1766
|
-
let { transition: r =
|
|
2508
|
+
let { transition: r = Pt.transition, duration: i = Pt.duration } = n, a = e.getAttribute(Nt.srcset), o = new Image();
|
|
1767
2509
|
a && (o.srcset = a), o.src = t;
|
|
1768
2510
|
try {
|
|
1769
2511
|
await o.decode();
|
|
@@ -1775,7 +2517,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1775
2517
|
duration: i
|
|
1776
2518
|
}), n.onLoad?.(e);
|
|
1777
2519
|
}
|
|
1778
|
-
},
|
|
2520
|
+
}, Ot = class VisibilityWatch {
|
|
1779
2521
|
element;
|
|
1780
2522
|
target;
|
|
1781
2523
|
hasWaited = !1;
|
|
@@ -1786,7 +2528,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1786
2528
|
previous;
|
|
1787
2529
|
lastTop;
|
|
1788
2530
|
checks = new ee({
|
|
1789
|
-
when:
|
|
2531
|
+
when: fe,
|
|
1790
2532
|
run: () => {
|
|
1791
2533
|
this.observers.length && this.check();
|
|
1792
2534
|
}
|
|
@@ -1832,8 +2574,8 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1832
2574
|
if (!e.width && !e.height) return;
|
|
1833
2575
|
let t = this.calculate(e), n = this.previous;
|
|
1834
2576
|
this.previous = t;
|
|
1835
|
-
for (let e of
|
|
1836
|
-
for (let e of
|
|
2577
|
+
for (let e of At) n?.[e] && !t[e] && this.reverse(Mt[e], t);
|
|
2578
|
+
for (let e of kt) this.forward(jt[e], t[e], t);
|
|
1837
2579
|
this.options.onUpdate?.(t);
|
|
1838
2580
|
}
|
|
1839
2581
|
retarget() {
|
|
@@ -1848,7 +2590,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1848
2590
|
calculate(e) {
|
|
1849
2591
|
let t = this.options.context, n = (t ? t.getBoundingClientRect().top + t.clientTop : 0) + (this.options.offset ?? 0), r = t ? t.getBoundingClientRect().top + t.clientTop + t.clientHeight : this.element.ownerDocument.documentElement.clientHeight, i = n >= e.top, a = n >= e.bottom, o = r >= e.top && !i, s = r >= e.bottom && !a, c = i && !a, l = (o || c) && !a, u = this.lastTop;
|
|
1850
2592
|
this.lastTop = e.top;
|
|
1851
|
-
let d = u === void 0 || u === e.top ?
|
|
2593
|
+
let d = u === void 0 || u === e.top ? x.static : e.top < u ? x.down : x.up;
|
|
1852
2594
|
return {
|
|
1853
2595
|
topPassed: i,
|
|
1854
2596
|
bottomPassed: a,
|
|
@@ -1879,7 +2621,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1879
2621
|
if (t) return t;
|
|
1880
2622
|
}
|
|
1881
2623
|
}
|
|
1882
|
-
},
|
|
2624
|
+
}, kt = [
|
|
1883
2625
|
"onScreen",
|
|
1884
2626
|
"offScreen",
|
|
1885
2627
|
"passing",
|
|
@@ -1887,13 +2629,13 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1887
2629
|
"bottomVisible",
|
|
1888
2630
|
"topPassed",
|
|
1889
2631
|
"bottomPassed"
|
|
1890
|
-
],
|
|
2632
|
+
], At = [
|
|
1891
2633
|
"passing",
|
|
1892
2634
|
"topVisible",
|
|
1893
2635
|
"bottomVisible",
|
|
1894
2636
|
"topPassed",
|
|
1895
2637
|
"bottomPassed"
|
|
1896
|
-
],
|
|
2638
|
+
], jt = {
|
|
1897
2639
|
onScreen: "onOnScreen",
|
|
1898
2640
|
offScreen: "onOffScreen",
|
|
1899
2641
|
passing: "onPassing",
|
|
@@ -1901,26 +2643,26 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1901
2643
|
bottomVisible: "onBottomVisible",
|
|
1902
2644
|
topPassed: "onTopPassed",
|
|
1903
2645
|
bottomPassed: "onBottomPassed"
|
|
1904
|
-
},
|
|
2646
|
+
}, Mt = {
|
|
1905
2647
|
passing: "onPassingReverse",
|
|
1906
2648
|
topVisible: "onTopVisibleReverse",
|
|
1907
2649
|
bottomVisible: "onBottomVisibleReverse",
|
|
1908
2650
|
topPassed: "onTopPassedReverse",
|
|
1909
2651
|
bottomPassed: "onBottomPassedReverse"
|
|
1910
|
-
},
|
|
2652
|
+
}, Nt = {
|
|
1911
2653
|
src: "data-src",
|
|
1912
2654
|
srcset: "data-srcset"
|
|
1913
|
-
},
|
|
2655
|
+
}, Pt = {
|
|
1914
2656
|
transition: "fade",
|
|
1915
2657
|
duration: 1e3
|
|
1916
|
-
},
|
|
2658
|
+
}, Ft = [O], Z, Q = class _UIRuntime {
|
|
1917
2659
|
constructor() {
|
|
1918
|
-
f(this, "browser", new
|
|
2660
|
+
f(this, "browser", new Ne()), f(this, "ids", new Ids()), f(this, "keyboard", new nt({ isApple: this.browser.isApple })), f(this, "focus", new Focus()), f(this, "styles", new Styles()), f(this, "themes", new Themes({ styles: this.styles })), f(this, "overlays", new ot({
|
|
1919
2661
|
keyboard: this.keyboard,
|
|
1920
2662
|
focus: this.focus,
|
|
1921
2663
|
browser: this.browser,
|
|
1922
2664
|
styles: this.styles
|
|
1923
|
-
})), f(this, "transitions", new
|
|
2665
|
+
})), f(this, "transitions", new wt({ browser: this.browser })), f(this, "visibility", new Visibility({ transitions: this.transitions })), f(this, "i18n", new Ke({ browser: this.browser })), f(this, "toasts", new xt()), f(this, "modals", new it()), f(this, "api", new we()), f(this, "icons", new Ye()), f(this, "sounds", Oe), f(this, "sources", new pt()), f(this, "code", new CodeLanguages()), f(this, "vocabulary", new ie()), f(this, "propertyControls", new PropertyControls()), f(this, "dataTooltips", new DataTooltips({ browser: this.browser })), f(this, "ready"), this.registerFoundation(), this.dataTooltips.start(), this.ready = Promise.resolve();
|
|
1924
2666
|
}
|
|
1925
2667
|
async load() {
|
|
1926
2668
|
return await this.ready, this;
|
|
@@ -1932,34 +2674,34 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
|
|
|
1932
2674
|
return this.visibility.observe(e, t);
|
|
1933
2675
|
}
|
|
1934
2676
|
registerFoundation() {
|
|
1935
|
-
for (let [e, t] of Object.entries(
|
|
2677
|
+
for (let [e, t] of Object.entries(Lt)) this.styles.register(e, t, {
|
|
1936
2678
|
page: !0,
|
|
1937
2679
|
linked: !0
|
|
1938
2680
|
});
|
|
1939
|
-
this.styles.setFoundation(Object.keys(
|
|
2681
|
+
this.styles.setFoundation(Object.keys($));
|
|
1940
2682
|
}
|
|
1941
2683
|
static get instance() {
|
|
1942
2684
|
let e = globalThis;
|
|
1943
|
-
return e[
|
|
2685
|
+
return e[te] || (e[te] = new _UIRuntime());
|
|
1944
2686
|
}
|
|
1945
2687
|
static load() {
|
|
1946
|
-
return
|
|
2688
|
+
return ue();
|
|
1947
2689
|
}
|
|
1948
2690
|
};
|
|
1949
|
-
|
|
1950
|
-
var
|
|
1951
|
-
layers:
|
|
1952
|
-
reset:
|
|
1953
|
-
tokens:
|
|
1954
|
-
colors:
|
|
1955
|
-
sizes:
|
|
1956
|
-
animations:
|
|
1957
|
-
},
|
|
1958
|
-
|
|
1959
|
-
[
|
|
1960
|
-
typography:
|
|
1961
|
-
native:
|
|
2691
|
+
Z = u(null), b(Z, 13, "version", Ft, Q), C(Z, Q), p(Q, "UIRuntime"), f(Q, "version", w(Z, 8, Q, ne)), w(Z, 11, Q);
|
|
2692
|
+
var It = Q, $ = {
|
|
2693
|
+
layers: ge,
|
|
2694
|
+
reset: ve,
|
|
2695
|
+
tokens: be,
|
|
2696
|
+
colors: he,
|
|
2697
|
+
sizes: ye,
|
|
2698
|
+
animations: me
|
|
2699
|
+
}, Lt = {
|
|
2700
|
+
...$,
|
|
2701
|
+
[re]: Se,
|
|
2702
|
+
typography: xe,
|
|
2703
|
+
native: _e
|
|
1962
2704
|
};
|
|
1963
|
-
export {
|
|
2705
|
+
export { It as UIRuntime };
|
|
1964
2706
|
|
|
1965
|
-
//# sourceMappingURL=UIRuntime-
|
|
2707
|
+
//# sourceMappingURL=UIRuntime-BaokNnwk.js.map
|