@wildwinter/app-shell 0.39.0 → 0.40.1
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.md +7 -0
- package/dist/about.css +5 -5
- package/dist/about.css.map +1 -1
- package/dist/anchored.css +5 -5
- package/dist/anchored.css.map +1 -1
- package/dist/chunk-4OAORWEM.js +56 -0
- package/dist/chunk-4OAORWEM.js.map +1 -0
- package/dist/{chunk-K2AOLQW4.js → chunk-EHR2KBZC.js} +3 -3
- package/dist/{chunk-K2AOLQW4.js.map → chunk-EHR2KBZC.js.map} +1 -1
- package/dist/{chunk-KGAMP5LW.js → chunk-G2JT3HZH.js} +16 -3
- package/dist/chunk-G2JT3HZH.js.map +1 -0
- package/dist/{chunk-S4KWQLYN.js → chunk-OPZPFOPS.js} +4 -4
- package/dist/{chunk-S4KWQLYN.js.map → chunk-OPZPFOPS.js.map} +1 -1
- package/dist/{chunk-L5HOBEKL.js → chunk-R3NXPHRZ.js} +3 -3
- package/dist/{chunk-L5HOBEKL.js.map → chunk-R3NXPHRZ.js.map} +1 -1
- package/dist/{chunk-C6UVQYKI.js → chunk-SEWJLUOD.js} +3 -3
- package/dist/{chunk-C6UVQYKI.js.map → chunk-SEWJLUOD.js.map} +1 -1
- package/dist/{chunk-XZYZXY7I.js → chunk-UG2P777F.js} +36 -3
- package/dist/chunk-UG2P777F.js.map +1 -0
- package/dist/{chunk-2NMVIM54.js → chunk-YRFJLJUH.js} +3 -3
- package/dist/{chunk-2NMVIM54.js.map → chunk-YRFJLJUH.js.map} +1 -1
- package/dist/chunk-YWMSQFXX.js +146 -0
- package/dist/chunk-YWMSQFXX.js.map +1 -0
- package/dist/comments.css +11 -11
- package/dist/comments.css.map +1 -1
- package/dist/confirm.css +2 -2
- package/dist/confirm.css.map +1 -1
- package/dist/context-menu.cjs.map +1 -1
- package/dist/context-menu.css +1 -1
- package/dist/context-menu.css.map +1 -1
- package/dist/context-menu.js +2 -2
- package/dist/controls.css +70 -11
- package/dist/controls.css.map +1 -1
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.css +3 -2
- package/dist/dialog.css.map +1 -1
- package/dist/dialog.js +2 -2
- package/dist/identity.css +2 -2
- package/dist/identity.css.map +1 -1
- package/dist/index.cjs +270 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -6
- package/dist/index.d.ts +39 -6
- package/dist/index.js +17 -13
- package/dist/index.js.map +1 -1
- package/dist/job.css +1 -1
- package/dist/job.css.map +1 -1
- package/dist/keys.cjs +155 -0
- package/dist/keys.cjs.map +1 -0
- package/dist/keys.css +41 -0
- package/dist/keys.css.map +1 -0
- package/dist/keys.d.cts +57 -0
- package/dist/keys.d.ts +57 -0
- package/dist/keys.js +3 -0
- package/dist/keys.js.map +1 -0
- package/dist/link-status.cjs +13 -0
- package/dist/link-status.cjs.map +1 -1
- package/dist/link-status.css +8 -8
- package/dist/link-status.css.map +1 -1
- package/dist/link-status.js +2 -2
- package/dist/notes-editor.css +7 -7
- package/dist/notes-editor.css.map +1 -1
- package/dist/pane-shell.css +7 -2
- package/dist/pane-shell.css.map +1 -1
- package/dist/problems.cjs +61 -0
- package/dist/problems.cjs.map +1 -0
- package/dist/problems.d.cts +57 -0
- package/dist/problems.d.ts +57 -0
- package/dist/problems.js +3 -0
- package/dist/problems.js.map +1 -0
- package/dist/property-list.cjs.map +1 -1
- package/dist/property-list.js +2 -2
- package/dist/save.css +1 -1
- package/dist/save.css.map +1 -1
- package/dist/settings.css +13 -13
- package/dist/settings.css.map +1 -1
- package/dist/stale.css +1 -1
- package/dist/stale.css.map +1 -1
- package/dist/stepper.css +14 -4
- package/dist/stepper.css.map +1 -1
- package/dist/toast.css +5 -5
- package/dist/toast.css.map +1 -1
- package/dist/tokens.css +2 -1
- package/dist/tokens.css.map +1 -1
- package/dist/tool-window.css +3 -2
- package/dist/tool-window.css.map +1 -1
- package/dist/tooltip.css +3 -3
- package/dist/tooltip.css.map +1 -1
- package/dist/updater-view.cjs.map +1 -1
- package/dist/updater-view.js +3 -3
- package/dist/updater.css +5 -5
- package/dist/updater.css.map +1 -1
- package/dist/vc.css +1 -1
- package/dist/vc.css.map +1 -1
- package/dist/welcome.cjs.map +1 -1
- package/dist/welcome.css +21 -21
- package/dist/welcome.css.map +1 -1
- package/dist/welcome.js +2 -2
- package/package.json +15 -1
- package/dist/chunk-KGAMP5LW.js.map +0 -1
- package/dist/chunk-XZYZXY7I.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -403,18 +403,18 @@ function tagChips(holder, onChange) {
|
|
|
403
403
|
input.placeholder = "Add value";
|
|
404
404
|
input.spellcheck = false;
|
|
405
405
|
const makeChip = (v) => {
|
|
406
|
-
const
|
|
406
|
+
const chip2 = el("span", "shell-tag", v);
|
|
407
407
|
const x = el("button", "shell-tag-x", iconNode("close", CHIP_ICON));
|
|
408
408
|
x.type = "button";
|
|
409
409
|
x.dataset["tip"] = `Remove ${v}`;
|
|
410
410
|
x.setAttribute("aria-label", `Remove ${v}`);
|
|
411
411
|
x.addEventListener("click", () => {
|
|
412
412
|
holder.values = (holder.values ?? []).filter((o) => o !== v);
|
|
413
|
-
|
|
413
|
+
chip2.remove();
|
|
414
414
|
onChange?.();
|
|
415
415
|
});
|
|
416
|
-
|
|
417
|
-
return
|
|
416
|
+
chip2.append(x);
|
|
417
|
+
return chip2;
|
|
418
418
|
};
|
|
419
419
|
const commit = () => {
|
|
420
420
|
const v = input.value.trim();
|
|
@@ -455,9 +455,9 @@ function stageChips(holder, onChange) {
|
|
|
455
455
|
for (const c of Array.from(wrap.children)) if (c !== input) c.remove();
|
|
456
456
|
const stages = holder.stages ?? [];
|
|
457
457
|
stages.forEach((v, i) => {
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
|
|
458
|
+
const chip2 = el("span", "shell-tag", `${i + 1}. ${v}`);
|
|
459
|
+
chip2.dataset["stage"] = v;
|
|
460
|
+
chip2.append(
|
|
461
461
|
control(
|
|
462
462
|
"back",
|
|
463
463
|
`Move ${v} earlier`,
|
|
@@ -490,8 +490,8 @@ function stageChips(holder, onChange) {
|
|
|
490
490
|
rebuild();
|
|
491
491
|
onChange?.();
|
|
492
492
|
});
|
|
493
|
-
|
|
494
|
-
wrap.insertBefore(
|
|
493
|
+
chip2.append(x);
|
|
494
|
+
wrap.insertBefore(chip2, input);
|
|
495
495
|
});
|
|
496
496
|
};
|
|
497
497
|
const commit = () => {
|
|
@@ -550,6 +550,39 @@ function wireReorder(el2, id, axis, onMove) {
|
|
|
550
550
|
if (reorderDragId && reorderDragId !== id) onMove(reorderDragId, before, id);
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
+
function metaLine(parts) {
|
|
554
|
+
const row = el("span", "shell-meta");
|
|
555
|
+
for (const part of parts) {
|
|
556
|
+
if (part === null || part === void 0 || part === "") continue;
|
|
557
|
+
const seg = el("span", "shell-meta-part");
|
|
558
|
+
seg.append(part);
|
|
559
|
+
row.append(seg);
|
|
560
|
+
}
|
|
561
|
+
return row;
|
|
562
|
+
}
|
|
563
|
+
function breadcrumb(parts) {
|
|
564
|
+
const trail = el("nav", "shell-crumbs");
|
|
565
|
+
trail.setAttribute("aria-label", "Where this is");
|
|
566
|
+
parts.forEach((part, i) => {
|
|
567
|
+
const crumb = typeof part === "string" ? { label: part } : part;
|
|
568
|
+
const last = i === parts.length - 1;
|
|
569
|
+
if (i > 0) {
|
|
570
|
+
const sep = iconNode("forward", 12);
|
|
571
|
+
sep.classList.add("shell-crumb-sep");
|
|
572
|
+
trail.append(sep);
|
|
573
|
+
}
|
|
574
|
+
if (crumb.onClick && !last) {
|
|
575
|
+
const b = el("button", { className: "shell-crumb shell-crumb-link", text: crumb.label, onClick: crumb.onClick });
|
|
576
|
+
b.type = "button";
|
|
577
|
+
trail.append(b);
|
|
578
|
+
} else {
|
|
579
|
+
const s = el("span", "shell-crumb", crumb.label);
|
|
580
|
+
if (last) s.setAttribute("aria-current", "location");
|
|
581
|
+
trail.append(s);
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
return trail;
|
|
585
|
+
}
|
|
553
586
|
|
|
554
587
|
// src/colour.ts
|
|
555
588
|
var PALETTE_SIZE = 12;
|
|
@@ -571,6 +604,149 @@ function colourFor(name) {
|
|
|
571
604
|
return PALETTE[colourIndex(name)];
|
|
572
605
|
}
|
|
573
606
|
|
|
607
|
+
// src/keys.ts
|
|
608
|
+
var override;
|
|
609
|
+
function setKeyPlatform(platform) {
|
|
610
|
+
override = platform;
|
|
611
|
+
}
|
|
612
|
+
function keyPlatform() {
|
|
613
|
+
if (override) return override;
|
|
614
|
+
if (typeof navigator !== "undefined") {
|
|
615
|
+
const s = `${navigator.platform ?? ""} ${navigator.userAgent ?? ""}`;
|
|
616
|
+
if (/mac|iphone|ipad/i.test(s)) return "mac";
|
|
617
|
+
if (/win/i.test(s)) return "win";
|
|
618
|
+
if (s.trim()) return "linux";
|
|
619
|
+
}
|
|
620
|
+
const p = typeof process !== "undefined" ? process.platform : void 0;
|
|
621
|
+
return p === "darwin" ? "mac" : p === "win32" ? "win" : "linux";
|
|
622
|
+
}
|
|
623
|
+
var MAC_ORDER = ["ctrl", "alt", "shift", "mod"];
|
|
624
|
+
var OTHER_ORDER = ["mod", "ctrl", "alt", "shift"];
|
|
625
|
+
var MAC_MOD = { ctrl: "\u2303", alt: "\u2325", shift: "\u21E7", mod: "\u2318" };
|
|
626
|
+
var OTHER_MOD = { ctrl: "Ctrl", alt: "Alt", shift: "Shift", mod: "Ctrl" };
|
|
627
|
+
var MODIFIER_ALIASES = {
|
|
628
|
+
mod: "mod",
|
|
629
|
+
cmd: "mod",
|
|
630
|
+
command: "mod",
|
|
631
|
+
meta: "mod",
|
|
632
|
+
super: "mod",
|
|
633
|
+
ctrl: "ctrl",
|
|
634
|
+
control: "ctrl",
|
|
635
|
+
alt: "alt",
|
|
636
|
+
option: "alt",
|
|
637
|
+
opt: "alt",
|
|
638
|
+
shift: "shift"
|
|
639
|
+
};
|
|
640
|
+
var NAMED = {
|
|
641
|
+
enter: { mac: "\u21A9", other: "Enter" },
|
|
642
|
+
return: { mac: "\u21A9", other: "Enter" },
|
|
643
|
+
esc: { mac: "esc", other: "Esc" },
|
|
644
|
+
escape: { mac: "esc", other: "Esc" },
|
|
645
|
+
up: { mac: "\u2191", other: "Up" },
|
|
646
|
+
down: { mac: "\u2193", other: "Down" },
|
|
647
|
+
left: { mac: "\u2190", other: "Left" },
|
|
648
|
+
right: { mac: "\u2192", other: "Right" },
|
|
649
|
+
backspace: { mac: "\u232B", other: "Backspace" },
|
|
650
|
+
delete: { mac: "\u2326", other: "Del" },
|
|
651
|
+
del: { mac: "\u2326", other: "Del" },
|
|
652
|
+
tab: { mac: "\u21E5", other: "Tab" },
|
|
653
|
+
space: { mac: "Space", other: "Space" },
|
|
654
|
+
home: { mac: "\u2196", other: "Home" },
|
|
655
|
+
end: { mac: "\u2198", other: "End" },
|
|
656
|
+
pageup: { mac: "\u21DE", other: "PgUp" },
|
|
657
|
+
pagedown: { mac: "\u21DF", other: "PgDn" }
|
|
658
|
+
};
|
|
659
|
+
var PORTABLE_MODS = /* @__PURE__ */ new Set(["mod", "ctrl", "alt", "shift"]);
|
|
660
|
+
function parse(combo) {
|
|
661
|
+
const parts = combo.split("+");
|
|
662
|
+
const mods = [];
|
|
663
|
+
let key;
|
|
664
|
+
for (let i = 0; i < parts.length; i++) {
|
|
665
|
+
const raw = parts[i] ?? "";
|
|
666
|
+
if (raw === "" && i > 0) {
|
|
667
|
+
key = "+";
|
|
668
|
+
continue;
|
|
669
|
+
}
|
|
670
|
+
const mod = MODIFIER_ALIASES[raw.toLowerCase()];
|
|
671
|
+
if (mod) {
|
|
672
|
+
if (!mods.includes(mod)) mods.push(mod);
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
key = raw;
|
|
676
|
+
}
|
|
677
|
+
return { mods, key };
|
|
678
|
+
}
|
|
679
|
+
function isKeyCombo(value) {
|
|
680
|
+
const plus = value.length > 2 && value.endsWith("++");
|
|
681
|
+
const parts = (plus ? value.slice(0, -2) : value).split("+");
|
|
682
|
+
let keys = plus ? 1 : 0;
|
|
683
|
+
for (const raw of parts) {
|
|
684
|
+
if (raw === "") return false;
|
|
685
|
+
const word = raw.toLowerCase();
|
|
686
|
+
if (PORTABLE_MODS.has(word)) continue;
|
|
687
|
+
if (raw.length === 1 || word in NAMED) {
|
|
688
|
+
keys++;
|
|
689
|
+
continue;
|
|
690
|
+
}
|
|
691
|
+
return false;
|
|
692
|
+
}
|
|
693
|
+
return keys === 1;
|
|
694
|
+
}
|
|
695
|
+
function keyLegend(key, mac) {
|
|
696
|
+
const named = NAMED[key.toLowerCase()];
|
|
697
|
+
if (named) return mac ? named.mac : named.other;
|
|
698
|
+
return key.length === 1 ? key.toUpperCase() : key;
|
|
699
|
+
}
|
|
700
|
+
function keyLabel(combo, platform = keyPlatform()) {
|
|
701
|
+
const mac = platform === "mac";
|
|
702
|
+
const { mods, key } = parse(combo);
|
|
703
|
+
const order = mac ? MAC_ORDER : OTHER_ORDER;
|
|
704
|
+
const words = order.filter((m) => mods.includes(m)).map((m) => (mac ? MAC_MOD : OTHER_MOD)[m]);
|
|
705
|
+
const seen = /* @__PURE__ */ new Set();
|
|
706
|
+
const modWords = words.filter((w) => seen.has(w) ? false : (seen.add(w), true));
|
|
707
|
+
const legend = key === void 0 ? [] : [keyLegend(key, mac)];
|
|
708
|
+
return mac ? [...modWords, ...legend].join("") : [...modWords, ...legend].join("+");
|
|
709
|
+
}
|
|
710
|
+
function keyLegends(combo, platform = keyPlatform()) {
|
|
711
|
+
if (platform === "mac") return [keyLabel(combo, platform)];
|
|
712
|
+
const { mods, key } = parse(combo);
|
|
713
|
+
const seen = /* @__PURE__ */ new Set();
|
|
714
|
+
const words = OTHER_ORDER.filter((m) => mods.includes(m)).map((m) => OTHER_MOD[m]).filter((w) => seen.has(w) ? false : (seen.add(w), true));
|
|
715
|
+
return key === void 0 ? words : [...words, keyLegend(key, false)];
|
|
716
|
+
}
|
|
717
|
+
function chip(legend) {
|
|
718
|
+
const k = document.createElement("kbd");
|
|
719
|
+
k.className = "shell-kbd";
|
|
720
|
+
k.textContent = legend;
|
|
721
|
+
return k;
|
|
722
|
+
}
|
|
723
|
+
function keyHint(combo, opts = {}) {
|
|
724
|
+
const platform = opts.platform ?? keyPlatform();
|
|
725
|
+
const legends = combo.trim().split(/\s+/).flatMap((c) => keyLegends(c, platform));
|
|
726
|
+
if (legends.length === 1) return chip(legends[0]);
|
|
727
|
+
const group = document.createElement("span");
|
|
728
|
+
group.className = "shell-keys";
|
|
729
|
+
for (const legend of legends) group.append(chip(legend));
|
|
730
|
+
return group;
|
|
731
|
+
}
|
|
732
|
+
function hintBar(items, opts = {}) {
|
|
733
|
+
const bar = document.createElement("div");
|
|
734
|
+
bar.className = "shell-hintbar";
|
|
735
|
+
for (const item of items) {
|
|
736
|
+
const hint = document.createElement("span");
|
|
737
|
+
hint.className = "shell-hint";
|
|
738
|
+
const label2 = document.createElement("span");
|
|
739
|
+
label2.className = "shell-hint-label";
|
|
740
|
+
label2.textContent = item.label;
|
|
741
|
+
hint.append(keyHint(item.keys, opts), label2);
|
|
742
|
+
bar.append(hint);
|
|
743
|
+
}
|
|
744
|
+
return bar;
|
|
745
|
+
}
|
|
746
|
+
function tipWithKey(text, combo, platform = keyPlatform()) {
|
|
747
|
+
return `${text} (${keyLabel(combo, platform)})`;
|
|
748
|
+
}
|
|
749
|
+
|
|
574
750
|
// src/pane-shell.ts
|
|
575
751
|
var DEFAULT_MAX = (w) => Math.min(640, w - 420);
|
|
576
752
|
var openVar = { nav: "--nav-open-w", inspector: "--insp-open-w" };
|
|
@@ -616,9 +792,10 @@ function mountPaneShell(host, opts) {
|
|
|
616
792
|
if (!offered("nav")) navToggle.remove();
|
|
617
793
|
if (!offered("inspector")) inspToggle.remove();
|
|
618
794
|
const defaultTip = (side, isOpen) => {
|
|
619
|
-
const
|
|
620
|
-
const hint = cfg[side].shortcutHint
|
|
621
|
-
|
|
795
|
+
const text = `${isOpen ? "Hide" : "Show"} ${cfg[side].label ?? side}`;
|
|
796
|
+
const hint = cfg[side].shortcutHint;
|
|
797
|
+
if (!hint) return text;
|
|
798
|
+
return isKeyCombo(hint) ? tipWithKey(text, hint) : `${text} (${hint})`;
|
|
622
799
|
};
|
|
623
800
|
const tipFor = opts.tipFor ?? defaultTip;
|
|
624
801
|
function applyToggleGlyph(side, button) {
|
|
@@ -779,6 +956,59 @@ var VIEW_MENU = {
|
|
|
779
956
|
colourTheme: { label: "Colour Theme" }
|
|
780
957
|
};
|
|
781
958
|
|
|
959
|
+
// src/problems.ts
|
|
960
|
+
function problemName(p, dangling = false) {
|
|
961
|
+
if (p.title) return `\u201C${p.title}\u201D`;
|
|
962
|
+
if (dangling && p.where) return `(id ${p.where})`;
|
|
963
|
+
return "This";
|
|
964
|
+
}
|
|
965
|
+
function describeProblem(problem, table = {}) {
|
|
966
|
+
const entry = problem.code ? table[problem.code] : void 0;
|
|
967
|
+
if (entry) {
|
|
968
|
+
const copy = entry(problem);
|
|
969
|
+
const text = copy.dangling && !problem.title && problem.where && !copy.text.includes(`(id ${problem.where})`) ? `${copy.text} (id ${problem.where})` : copy.text;
|
|
970
|
+
return copy.next ? { text, next: copy.next } : { text };
|
|
971
|
+
}
|
|
972
|
+
const message = problem.message.replace(/\s*\[[^\]]*\]\s*$/, "").trim();
|
|
973
|
+
return { text: problem.title ? `${problem.title}: ${message}` : message };
|
|
974
|
+
}
|
|
975
|
+
function problemLine(problem, table) {
|
|
976
|
+
const { text, next } = describeProblem(problem, table);
|
|
977
|
+
return next ? `${text} ${next}` : text;
|
|
978
|
+
}
|
|
979
|
+
var defaultProblemCopy = {
|
|
980
|
+
"duplicate-gameid": (p) => ({
|
|
981
|
+
text: `The Game ID on ${problemName(p)} is already used elsewhere.`,
|
|
982
|
+
next: "Each one must be unique; change one of them."
|
|
983
|
+
}),
|
|
984
|
+
"invalid-gameid": (p) => ({
|
|
985
|
+
text: `The Game ID on ${problemName(p)} isn't valid.`,
|
|
986
|
+
next: "Use lowercase letters, digits and hyphens."
|
|
987
|
+
}),
|
|
988
|
+
"dangling-reference": (p) => ({
|
|
989
|
+
text: `${problemName(p, true)} points at something that no longer exists.`,
|
|
990
|
+
next: "Choose where it goes.",
|
|
991
|
+
dangling: true
|
|
992
|
+
}),
|
|
993
|
+
"unknown-property": (p) => ({
|
|
994
|
+
text: `${problemName(p)} uses a property that isn't set up yet.`,
|
|
995
|
+
next: "Declare it in the project settings, or fix the name."
|
|
996
|
+
}),
|
|
997
|
+
"missing-name": (p) => ({ text: `${problemName(p)} needs a name.` }),
|
|
998
|
+
"empty": (p) => ({
|
|
999
|
+
text: `${problemName(p)} is empty.`,
|
|
1000
|
+
next: "Add something inside it, or remove it."
|
|
1001
|
+
}),
|
|
1002
|
+
"stale-build": (p) => ({
|
|
1003
|
+
text: `Your playable build${p.path ? ` (${p.path})` : ""} is out of date.`,
|
|
1004
|
+
next: "It refreshes the next time you publish."
|
|
1005
|
+
}),
|
|
1006
|
+
"merge-conflict": (p) => ({
|
|
1007
|
+
text: `${p.path ?? "This file"} still has an unresolved merge conflict in it.`,
|
|
1008
|
+
next: "Resolve it in your version control tool, then reopen the project."
|
|
1009
|
+
})
|
|
1010
|
+
};
|
|
1011
|
+
|
|
782
1012
|
// src/settings.ts
|
|
783
1013
|
function expandableRow(opts) {
|
|
784
1014
|
const row = el("div", "set-row");
|
|
@@ -2400,7 +2630,7 @@ function renderStepperBar(host, opts) {
|
|
|
2400
2630
|
"button",
|
|
2401
2631
|
{ className: "stepbar-cur", tip: opts.tips?.go ?? "Go to this", onClick: () => opts.onGo(index) },
|
|
2402
2632
|
item.kind === void 0 ? null : el("span", { className: `stepbar-cat${item.kindClass ? ` ${item.kindClass}` : ""}`, text: item.kind }),
|
|
2403
|
-
item.where === void 0 ? null : el("span", { className: "stepbar-where", text: item.where }),
|
|
2633
|
+
item.where === void 0 ? null : typeof item.where === "string" ? el("span", { className: "stepbar-where", text: item.where }) : el("span", "stepbar-where", item.where),
|
|
2404
2634
|
el("span", { className: "stepbar-msg", text: item.text })
|
|
2405
2635
|
),
|
|
2406
2636
|
...actions,
|
|
@@ -2559,6 +2789,8 @@ function linkAddress(s) {
|
|
|
2559
2789
|
if (s.state !== "listening" && s.state !== "connected") return void 0;
|
|
2560
2790
|
return s.address ?? `ws://127.0.0.1:${s.port}`;
|
|
2561
2791
|
}
|
|
2792
|
+
var CORNER_INSET = 14.5;
|
|
2793
|
+
var CORNER_GAP = 12;
|
|
2562
2794
|
function mountLinkStatus(host, opts) {
|
|
2563
2795
|
const wrap = el("div", "linkstatus");
|
|
2564
2796
|
wrap.hidden = true;
|
|
@@ -2572,6 +2804,15 @@ function mountLinkStatus(host, opts) {
|
|
|
2572
2804
|
wrap.append(...opts.lead ?? [], url, toggle);
|
|
2573
2805
|
host.append(wrap);
|
|
2574
2806
|
let status = { state: "off" };
|
|
2807
|
+
const root = host.ownerDocument.documentElement;
|
|
2808
|
+
const publishReserve = () => {
|
|
2809
|
+
const width = wrap.hidden ? 0 : wrap.getBoundingClientRect().width;
|
|
2810
|
+
root.style.setProperty(
|
|
2811
|
+
"--linkstatus-reserve",
|
|
2812
|
+
width > 0 ? `${Math.ceil(width + CORNER_INSET + CORNER_GAP)}px` : "0px"
|
|
2813
|
+
);
|
|
2814
|
+
};
|
|
2815
|
+
if (typeof ResizeObserver !== "undefined") new ResizeObserver(publishReserve).observe(wrap);
|
|
2575
2816
|
const render = () => {
|
|
2576
2817
|
toggle.className = `linkstatus-toggle ${linkStatusClass(status)}`;
|
|
2577
2818
|
const tip2 = linkStatusTip(status);
|
|
@@ -2583,6 +2824,7 @@ function mountLinkStatus(host, opts) {
|
|
|
2583
2824
|
url.dataset["tip"] = "Click to copy the live link address";
|
|
2584
2825
|
url.hidden = false;
|
|
2585
2826
|
} else url.hidden = true;
|
|
2827
|
+
publishReserve();
|
|
2586
2828
|
};
|
|
2587
2829
|
const apply = (s) => {
|
|
2588
2830
|
status = s;
|
|
@@ -2607,6 +2849,7 @@ function mountLinkStatus(host, opts) {
|
|
|
2607
2849
|
status: () => status,
|
|
2608
2850
|
setVisible(on) {
|
|
2609
2851
|
wrap.hidden = !on;
|
|
2852
|
+
publishReserve();
|
|
2610
2853
|
},
|
|
2611
2854
|
toggle() {
|
|
2612
2855
|
toggle.click();
|
|
@@ -2854,6 +3097,7 @@ exports.VIEW_MENU = VIEW_MENU;
|
|
|
2854
3097
|
exports.askIdentity = askIdentity;
|
|
2855
3098
|
exports.bindPropertyName = bindPropertyName;
|
|
2856
3099
|
exports.bindPropertyRef = bindPropertyRef;
|
|
3100
|
+
exports.breadcrumb = breadcrumb;
|
|
2857
3101
|
exports.closeAnchoredPanel = closeAnchoredPanel;
|
|
2858
3102
|
exports.closeWithExit = closeWithExit;
|
|
2859
3103
|
exports.colourFor = colourFor;
|
|
@@ -2865,6 +3109,8 @@ exports.createNavHistory = createNavHistory;
|
|
|
2865
3109
|
exports.createSaveController = createSaveController;
|
|
2866
3110
|
exports.debounce = debounce;
|
|
2867
3111
|
exports.defaultControl = defaultControl;
|
|
3112
|
+
exports.defaultProblemCopy = defaultProblemCopy;
|
|
3113
|
+
exports.describeProblem = describeProblem;
|
|
2868
3114
|
exports.dialogFrame = dialogFrame;
|
|
2869
3115
|
exports.dismissToast = dismissToast;
|
|
2870
3116
|
exports.dupGuard = dupGuard;
|
|
@@ -2878,6 +3124,7 @@ exports.followButton = followButton;
|
|
|
2878
3124
|
exports.formatCount = formatCount;
|
|
2879
3125
|
exports.gameIdify = gameIdify;
|
|
2880
3126
|
exports.hideTip = hideTip;
|
|
3127
|
+
exports.hintBar = hintBar;
|
|
2881
3128
|
exports.historyNav = historyNav;
|
|
2882
3129
|
exports.icon = icon;
|
|
2883
3130
|
exports.iconBtn = iconBtn;
|
|
@@ -2889,14 +3136,20 @@ exports.initTooltips = initTooltips;
|
|
|
2889
3136
|
exports.isCaseOnlyPropertyName = isCaseOnlyPropertyName;
|
|
2890
3137
|
exports.isEditableTarget = isEditableTarget;
|
|
2891
3138
|
exports.isIconName = isIconName;
|
|
3139
|
+
exports.isKeyCombo = isKeyCombo;
|
|
2892
3140
|
exports.isValidGameId = isValidGameId;
|
|
2893
3141
|
exports.isValidPropertyName = isValidPropertyName;
|
|
3142
|
+
exports.keyHint = keyHint;
|
|
3143
|
+
exports.keyLabel = keyLabel;
|
|
3144
|
+
exports.keyLegends = keyLegends;
|
|
3145
|
+
exports.keyPlatform = keyPlatform;
|
|
2894
3146
|
exports.labelled = labelled;
|
|
2895
3147
|
exports.linkAddress = linkAddress;
|
|
2896
3148
|
exports.linkStatusClass = linkStatusClass;
|
|
2897
3149
|
exports.linkStatusTip = linkStatusTip;
|
|
2898
3150
|
exports.lockControls = lockControls;
|
|
2899
3151
|
exports.lockNotice = lockNotice;
|
|
3152
|
+
exports.metaLine = metaLine;
|
|
2900
3153
|
exports.mountJobProgress = mountJobProgress;
|
|
2901
3154
|
exports.mountLinkStatus = mountLinkStatus;
|
|
2902
3155
|
exports.mountPaneShell = mountPaneShell;
|
|
@@ -2914,6 +3167,8 @@ exports.paintVcBadges = paintVcBadges;
|
|
|
2914
3167
|
exports.pinButton = pinButton;
|
|
2915
3168
|
exports.placeAnchored = placeAnchored;
|
|
2916
3169
|
exports.plural = plural;
|
|
3170
|
+
exports.problemLine = problemLine;
|
|
3171
|
+
exports.problemName = problemName;
|
|
2917
3172
|
exports.propertyNameProblem = propertyNameProblem;
|
|
2918
3173
|
exports.propertyNameify = propertyNameify;
|
|
2919
3174
|
exports.propertyRefProblem = propertyRefProblem;
|
|
@@ -2923,6 +3178,7 @@ exports.revalidatePropertyRefs = revalidatePropertyRefs;
|
|
|
2923
3178
|
exports.revealRow = revealRow;
|
|
2924
3179
|
exports.revealRowWhenReady = revealRowWhenReady;
|
|
2925
3180
|
exports.saveIndicator = saveIndicator;
|
|
3181
|
+
exports.setKeyPlatform = setKeyPlatform;
|
|
2926
3182
|
exports.showAbout = showAbout;
|
|
2927
3183
|
exports.showUpdaterDialog = showUpdaterDialog;
|
|
2928
3184
|
exports.stageChips = stageChips;
|
|
@@ -2930,6 +3186,7 @@ exports.staleBar = staleBar;
|
|
|
2930
3186
|
exports.tagChips = tagChips;
|
|
2931
3187
|
exports.tipAt = tipAt;
|
|
2932
3188
|
exports.tipBold = tipBold;
|
|
3189
|
+
exports.tipWithKey = tipWithKey;
|
|
2933
3190
|
exports.toast = toast;
|
|
2934
3191
|
exports.toolWindowHead = toolWindowHead;
|
|
2935
3192
|
exports.vcBadgeFor = vcBadgeFor;
|