kaizen-agent 1.56.1 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/board.test.ts +56 -0
- package/cli/docs.test.ts +92 -0
- package/cli/docs.ts +84 -0
- package/cli/install.ts +13 -0
- package/cli/project-tree.test.ts +39 -0
- package/cli/pty.test.ts +1 -1
- package/cli/state.test.ts +18 -2
- package/cli/state.ts +21 -17
- package/cli/usage.test.ts +142 -0
- package/cli/usage.ts +66 -0
- package/cli/web.ts +194 -7
- package/package.json +1 -1
- package/skills/kaizen/SKILL.md +1 -1
- package/skills/kaizen/docs.md +6 -1
- package/skills/kaizen/spec-main.md +4 -2
- package/web/board/api.ts +2 -0
- package/web/board/badge.ts +41 -0
- package/web/board/cards.ts +58 -11
- package/web/board/context.ts +247 -0
- package/web/board/home.ts +3 -3
- package/web/board/ideas.ts +176 -0
- package/web/board/keys.ts +2 -5
- package/web/board/labels.ts +4 -0
- package/web/board/live.ts +3 -1
- package/web/board/main.ts +21 -0
- package/web/board/panel.ts +33 -8
- package/web/board/projects.ts +42 -2
- package/web/board/run-view.ts +691 -0
- package/web/board/settings.ts +1 -0
- package/web/board/store.ts +2 -0
- package/web/board/terms.ts +7 -3
- package/web/board/views.ts +21 -4
- package/web/board/workspace.ts +318 -0
- package/web/board.html +199 -35
- package/web/board.js +43 -40
- package/web/notebook.js +24 -23
- package/web/notebook.ts +7 -1
- package/web/notes.html +67 -21
- package/web/term.js +34 -34
- package/web/term.ts +10 -6
- package/web/video.html +65 -21
- package/web/video.js +54 -53
- package/web/video.ts +5 -1
package/web/term.ts
CHANGED
|
@@ -10,19 +10,21 @@ import { SearchAddon } from "@xterm/addon-search";
|
|
|
10
10
|
function mountTerm(el: HTMLElement, key: string, onEnd?: () => void): () => void {
|
|
11
11
|
const css = getComputedStyle(el);
|
|
12
12
|
const tok = (n: string) => css.getPropertyValue(n).trim() || undefined;
|
|
13
|
+
const theme = () => ({ background: tok("--bg"), foreground: tok("--ink-hi"), cursor: tok("--accent"), selectionBackground: tok("--line") });
|
|
13
14
|
const term = new Terminal({
|
|
14
15
|
cursorBlink: true,
|
|
15
16
|
fontFamily: tok("--mono"),
|
|
16
17
|
fontSize: 12,
|
|
17
18
|
scrollback: 5000,
|
|
18
19
|
allowProposedApi: true, // search match decorations
|
|
19
|
-
theme:
|
|
20
|
-
background: tok("--bg"),
|
|
21
|
-
foreground: tok("--ink-hi"),
|
|
22
|
-
cursor: tok("--accent"),
|
|
23
|
-
selectionBackground: tok("--line"),
|
|
24
|
-
},
|
|
20
|
+
theme: theme(),
|
|
25
21
|
});
|
|
22
|
+
// The board's theme toggle, or the system's scheme when none is set: the terminal follows live.
|
|
23
|
+
// getComputedStyle is live, so the same tokens read the new values.
|
|
24
|
+
const retheme = () => requestAnimationFrame(() => (term.options.theme = theme()));
|
|
25
|
+
const os = matchMedia("(prefers-color-scheme: dark)");
|
|
26
|
+
addEventListener("kz-theme", retheme);
|
|
27
|
+
os.addEventListener("change", retheme);
|
|
26
28
|
const fit = new FitAddon();
|
|
27
29
|
term.loadAddon(fit);
|
|
28
30
|
term.loadAddon(new WebLinksAddon((_e, url) => window.open(url, "_blank", "noopener")));
|
|
@@ -275,6 +277,8 @@ function mountTerm(el: HTMLElement, key: string, onEnd?: () => void): () => void
|
|
|
275
277
|
clearTimeout(retry);
|
|
276
278
|
ws.onclose = null;
|
|
277
279
|
ws.close();
|
|
280
|
+
removeEventListener("kz-theme", retheme);
|
|
281
|
+
os.removeEventListener("change", retheme);
|
|
278
282
|
term.dispose();
|
|
279
283
|
};
|
|
280
284
|
}
|
package/web/video.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:root[data-theme=dark]{--bg:#0c162f;--bg-2:#121e3c;--line:#22305a;--ink:#eef2fa;--ink-hi:#deeeff;--dim:#96aacd;--accent:#486ed9;--run:#4fd6e6;--ok:#5fd28a;--warn:#e6b450;--danger:#e85050;color-scheme:dark}
|
|
16
16
|
*{box-sizing:border-box}
|
|
17
17
|
/* Shape, type and depth. --shade is the one shadow colour, themed like the rest. */
|
|
18
|
-
:root{--r:
|
|
18
|
+
:root{--r:4px;--r-s:4px;--r-pill:999px;--font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;--mono:ui-monospace,"JetBrains Mono","Cascadia Code","SF Mono",Menlo,Consolas,monospace;--on-accent:#fff;--hover:color-mix(in srgb,var(--dim) 12%,transparent);--shade:rgb(12 22 47/.08);--shadow-1:0 1px 2px var(--shade);--shadow-2:0 0 0 1px var(--shade),0 8px 24px -6px var(--shade);--canvas:color-mix(in srgb,var(--bg) 95.5%,var(--ink))}
|
|
19
19
|
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--shade:rgb(0 0 0/.45);--canvas:color-mix(in srgb,var(--bg) 70%,black)}}
|
|
20
20
|
:root[data-theme=dark]{--shade:rgb(0 0 0/.45);--canvas:color-mix(in srgb,var(--bg) 70%,black)}
|
|
21
21
|
body{margin:0;background:var(--canvas);color:var(--ink);font:14px/1.5 var(--font);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;height:100vh;height:100dvh;overflow:hidden;display:flex}
|
|
@@ -32,10 +32,10 @@ svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke
|
|
|
32
32
|
[hidden]{display:none!important}
|
|
33
33
|
|
|
34
34
|
/* side menu: the same lines in board.html and notes.html (a test holds them equal) */
|
|
35
|
-
.rail{width:
|
|
35
|
+
.rail{width:250px;flex:none;display:flex;flex-direction:column;gap:2px;padding:18px 12px 14px;overflow:hidden auto;transition:width .18s}
|
|
36
36
|
.rail .top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 0 18px 10px}
|
|
37
37
|
.rail .home{display:block;color:inherit;text-decoration:none}
|
|
38
|
-
.rail .top .mascot{display:none;width:
|
|
38
|
+
.rail .top .mascot{display:none;width:28px;height:26px}
|
|
39
39
|
.rail a.it{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:var(--r-s);font-size:13px;font-weight:500;color:var(--dim);text-decoration:none;white-space:nowrap;transition:background .12s,color .12s}
|
|
40
40
|
.rail a.it:hover{background:var(--hover);color:var(--ink)}
|
|
41
41
|
.rail a.it[aria-current=page]{background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--ink)}
|
|
@@ -63,8 +63,8 @@ svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke
|
|
|
63
63
|
.rail a.it,[data-rail=min] .rail a.it{flex:1;width:auto;flex-direction:column;justify-content:center;gap:2px;height:auto;min-height:48px;padding:4px 0;font-size:11px}
|
|
64
64
|
.rail a.it[aria-current=page]{background:none;color:var(--accent)}
|
|
65
65
|
[data-rail=min] .rail .lbl{position:static;width:auto;height:auto;overflow:visible;clip-path:none}
|
|
66
|
-
.rail a.it.fold{display:
|
|
67
|
-
.rail a.it[data-view=
|
|
66
|
+
.rail a.it.fold{display:flex}
|
|
67
|
+
.rail a.it[data-view=home]{order:1}.rail a.it[data-view=sources]{order:2}.rail a.it[data-view=board]{order:3}.rail a.it[data-view=video]{order:4}.rail a.it[data-view=settings]{order:5}.mtab{display:none}
|
|
68
68
|
.mtab{display:flex;flex:1;position:relative}
|
|
69
69
|
.mtab summary{flex:1;list-style:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;padding:4px 0;font-size:11px;font-weight:500;color:var(--dim);cursor:pointer}
|
|
70
70
|
.mtab summary::-webkit-details-marker{display:none}
|
|
@@ -75,12 +75,53 @@ svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke
|
|
|
75
75
|
.mpop a:hover{background:var(--hover)}
|
|
76
76
|
.rail:has(a.it.fold.upd) .mtab summary{position:relative}.rail:has(a.it.fold.upd) .mtab summary::after{content:"";position:absolute;left:calc(50% + 6px);top:4px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--bg)}
|
|
77
77
|
body .rail a.upd::after{left:calc(50% + 6px);top:4px}body .toast{left:16px;bottom:calc(68px + env(safe-area-inset-bottom))}}
|
|
78
|
+
.rail a.it[data-n]{position:relative}.rail a.it[data-n]::after{content:attr(data-n);position:absolute;left:24px;top:3px;min-width:16px;height:16px;padding:0 4px;box-sizing:border-box;border-radius:8px;background:var(--dim);color:var(--bg);font:600 10px/16px var(--font);text-align:center;box-shadow:0 0 0 2px var(--bg)}
|
|
79
|
+
@media(max-width:640px){body .rail a.it[data-n]::after{left:calc(50% + 4px);top:2px}}
|
|
80
|
+
.rail a.it:is([data-view=board],[data-view=ideas])[data-n]::after{left:auto;right:8px;top:9px;background:var(--warn)}
|
|
81
|
+
[data-rail=min] .rail a.it:is([data-view=board],[data-view=ideas])[data-n]::after{left:24px;right:auto;top:3px}
|
|
82
|
+
@media(max-width:640px){[data-rail=min] .rail a.it:is([data-view=board],[data-view=ideas])[data-n]::after{left:calc(50% + 4px);top:2px}}
|
|
83
|
+
/* the rail's Projects list: ideas and runs grouped by project, each with its state icon */
|
|
84
|
+
.rail a.it .n{margin-left:auto;font-size:11px;font-weight:400;color:var(--dim)}
|
|
85
|
+
.rail a.it .srcs+.n{margin-left:8px}.rail a.it .srcs{margin-left:auto;display:flex;gap:4px;opacity:.75}.rail a.it .srcs svg,.rail a.it .srcs img{width:13px;height:13px}
|
|
86
|
+
.rail a.it,.rail .theme,.rail .theme button{border-radius:4px}
|
|
87
|
+
.rail .psec{display:flex;align-items:center;gap:2px;margin:14px 0 2px;padding-left:10px;font-size:11px;font-weight:600;color:var(--dim)}.rail .psec .lbl{flex:1}
|
|
88
|
+
.rail .psec button,.rail .rib{width:26px;height:26px;display:grid;place-items:center;flex:none;border-radius:4px;color:var(--dim)}.rail .psec button:hover,.rail .rib:hover{background:var(--hover);color:var(--ink)}.rail .psec button svg,.rail .rib svg{width:15px;height:15px}
|
|
89
|
+
.rail .psec button[aria-pressed=true]{color:var(--accent)}.rail .psec button{position:relative}.rail .psec button[aria-pressed=true]::after{content:"";position:absolute;right:3px;top:3px;width:6px;height:6px;border-radius:50%;background:var(--accent)}
|
|
90
|
+
.pfpop{position:fixed;z-index:40;min-width:220px;max-width:280px;max-height:60vh;overflow:auto;padding:6px;display:flex;flex-direction:column;gap:1px;background:var(--bg-2);color:var(--ink);border:1px solid var(--line);border-radius:4px;box-shadow:var(--shadow-2);font-size:12.5px}
|
|
91
|
+
.pfpop .sel{margin:2px 2px 6px;padding:5px 8px;border-radius:4px}.pfrow{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:4px;cursor:pointer;white-space:nowrap}.pfrow:hover{background:var(--hover)}.pfrow input{accent-color:var(--accent);margin:0}.pfrow .plogo{width:16px;height:16px;font-size:9px;border-radius:4px;display:inline-grid;place-items:center;flex:none;font-weight:600;color:var(--dim);background:var(--hover)}.pfrow img.plogo{background:none}
|
|
92
|
+
.pfpop .pfh{margin:8px 8px 2px;font-size:11px;font-weight:600;color:var(--dim)}
|
|
93
|
+
.rail .plist{flex:1;min-height:40px;overflow:hidden auto;margin:0 -4px;padding:0 4px}
|
|
94
|
+
#kbd{display:none!important}.plist .proj{all:unset;box-sizing:border-box;display:flex;gap:8px;align-items:center;margin:10px 6px 4px;font-size:12.5px;font-weight:500;color:var(--ink);white-space:nowrap;cursor:pointer;width:calc(100% - 12px);border-radius:4px}.proj:hover{background:var(--hover)}.proj:focus-visible{outline:2px solid var(--accent)}.proj .fchev{width:12px;height:12px;flex:none;color:var(--dim);transition:transform .15s;transform:rotate(90deg)}.proj.shut .fchev{transform:none}.plist .proj .c{color:var(--dim);font-size:11px;font-weight:400}.plist .proj .plogo{width:16px;height:16px;font-size:9px;border-radius:4px;display:inline-grid;place-items:center;flex:none;font-weight:600;color:var(--dim);background:var(--hover);object-fit:contain}.plist .proj img.plogo{background:none}
|
|
95
|
+
.plist .row{display:grid;grid-template-columns:14px minmax(0,1fr);gap:8px;align-items:center;padding:5px 8px;border-radius:4px;color:var(--ink);text-decoration:none}.plist .row:hover,.plist .row[aria-current]{background:var(--hover)}.plist .row .si{margin-top:0}
|
|
96
|
+
.plist .row b{display:block;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.plist .row small{display:block;color:var(--dim);font:10.5px/1.4 var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
97
|
+
.plist .none{padding:6px 10px;color:var(--dim);font-size:12px}
|
|
98
|
+
.rail .rbot{display:flex;align-items:center;gap:2px;margin-top:6px}#themet .moon,#themet[data-dark=true] .sun{display:none}#themet[data-dark=true] .moon{display:block}.rail .rbot a.it{flex:1;min-width:0}
|
|
99
|
+
/* a card's state: idle ring, planning arc, building tailed arc, reviewing orbit, waiting ripple, done check, stalled pause */
|
|
100
|
+
.si{width:12px;height:12px;border-radius:50%;position:relative;flex:none;--ring:radial-gradient(farthest-side,#0000 calc(100% - 2px),#000 calc(100% - 1.5px))}
|
|
101
|
+
.si.idle{box-shadow:inset 0 0 0 1.5px var(--dim)}
|
|
102
|
+
.si.plan{background:conic-gradient(#8b7cf6 0 28%,color-mix(in srgb,#8b7cf6 22%,transparent) 0);-webkit-mask:var(--ring);mask:var(--ring);animation:si-spin .9s linear infinite}
|
|
103
|
+
.si.build{background:conic-gradient(from 0deg,transparent,var(--accent) 85%,transparent 0);-webkit-mask:var(--ring);mask:var(--ring);animation:si-spin .7s linear infinite}
|
|
104
|
+
.si.build::after{content:"";position:absolute;inset:0}
|
|
105
|
+
.si.review{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--warn) 35%,transparent);animation:si-spin 1.6s linear infinite}
|
|
106
|
+
.si.review::after{content:"";position:absolute;width:4px;height:4px;border-radius:50%;background:var(--warn);top:-1px;left:4px;box-shadow:0 0 4px var(--warn)}
|
|
107
|
+
.si.wait{background:var(--warn)}.si.wait::after{content:"";position:absolute;inset:0;border-radius:50%;background:var(--warn);animation:si-ping 1.6s cubic-bezier(0,0,.2,1) infinite}
|
|
108
|
+
.si.done{background:var(--ok)}.si.done::after{content:"";position:absolute;left:4.2px;top:2px;width:2.5px;height:5.5px;border:solid var(--bg);border-width:0 1.6px 1.6px 0;transform:rotate(45deg)}
|
|
109
|
+
.si.stalled{background:var(--danger)}.si.stalled::after{content:"";position:absolute;left:3.5px;top:3.5px;width:5px;height:5px;background:linear-gradient(90deg,var(--bg) 0 1.6px,transparent 0 3.4px,var(--bg) 0)}
|
|
110
|
+
.si.aband{box-shadow:inset 0 0 0 1.5px var(--dim);opacity:.5}
|
|
111
|
+
@keyframes si-spin{to{transform:rotate(360deg)}}@keyframes si-ping{75%,100%{transform:scale(2.2);opacity:0}}
|
|
112
|
+
@media (prefers-reduced-motion:reduce){:root:not([data-motion=full]) .si{animation:none!important}}
|
|
113
|
+
:root[data-motion=reduce] .si{animation:none!important}
|
|
114
|
+
[data-rail=min] .rail a.it .n,[data-rail=min] .rail a.it .srcs,[data-rail=min] .rail .rib:not(.th),[data-rail=min] .plist .proj :not(.plogo),[data-rail=min] .plist .row div{display:none}
|
|
115
|
+
[data-rail=min] .rail .psec{padding:0;margin:12px 0 2px;flex-direction:column}[data-rail=min] .rail .rbot{flex-direction:column}
|
|
116
|
+
[data-rail=min] .plist .proj{justify-content:center;margin:10px 0 4px}[data-rail=min] .plist .row{grid-template-columns:14px;justify-content:center;padding:7px 0}
|
|
117
|
+
@media(max-width:640px){.rail .psec,.rail .plist,.rail .rib{display:none}.rail .rbot,[data-rail=min] .rail .rbot{display:contents}.rail a.it[data-view=ideas]{order:3}.rail a.it[data-view=board]{order:4}.rail a.it .n,.rail a.it .srcs{display:none}}
|
|
78
118
|
/* end side menu */
|
|
119
|
+
#kbd{display:none}
|
|
79
120
|
/* the work area: an inset rounded panel on the canvas the side menu sits on */
|
|
80
|
-
.app{flex:1;min-width:0;display:flex;flex-direction:column;margin:8px 8px 8px 0;background:var(--bg);border:1px solid var(--line);border-radius:
|
|
121
|
+
.app{flex:1;min-width:0;display:flex;flex-direction:column;margin:8px 8px 8px 0;background:var(--bg);border:1px solid var(--line);border-radius:12px;overflow:hidden}
|
|
81
122
|
@media(max-width:640px){.app{margin:0;border:0;border-radius:0}html,body{background:var(--bg)}}
|
|
82
123
|
.hdr{display:flex;align-items:center;gap:12px;padding:10px 20px 10px 28px;border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent);flex-wrap:wrap}
|
|
83
|
-
pre.mark{margin:0;font:700
|
|
124
|
+
pre.mark{margin:0;font:700 5px/1 var(--mono)}
|
|
84
125
|
pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:color-mix(in srgb,var(--ink-hi),var(--accent))}pre.mark span:nth-child(3){color:var(--accent)}
|
|
85
126
|
.skel{display:block;border-radius:6px;background:linear-gradient(90deg,var(--line) 25%,color-mix(in srgb,var(--line) 45%,transparent) 50%,var(--line) 75%);background-size:200% 100%;animation:skel 1.2s ease-in-out infinite}@keyframes skel{from{background-position:200% 0}to{background-position:-200% 0}}
|
|
86
127
|
.grid .skel{break-inside:avoid;margin-bottom:16px;border-radius:var(--r)}
|
|
@@ -295,16 +336,21 @@ pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:
|
|
|
295
336
|
<div class="top"><a class="home" href="/" title="Home" aria-label="kaizen home"><pre class="mark"><span>█ █ ▄▀█ █ ▀▀█ █▀▀ █▄ █</span>
|
|
296
337
|
<span>█▀▄ █▀█ █ ▄▀ ██▄ █ ▀█</span>
|
|
297
338
|
<span>█ █ █ █ █ █▄▄ █▄▄ █ █</span></pre><span class="mascot"></span></a><button class="ib" id="fold" aria-label="Collapse menu" title="Collapse menu"><svg><use href="#i-side"/></svg></button></div>
|
|
339
|
+
<svg style="display:none"><defs>
|
|
340
|
+
<symbol id="r-bulb" viewBox="0 0 24 24"><path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z"/></symbol>
|
|
341
|
+
<symbol id="r-tray" viewBox="0 0 24 24"><path d="M12 3v9M8.5 8.5 12 12l3.5-3.5"/><path d="M3 14h5l1.5 2.5h5L16 14h5"/><path d="M3 14v5a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-5l-2.5-6H15M9 8H5.5L3 14"/></symbol>
|
|
342
|
+
<symbol id="r-filter" viewBox="0 0 24 24"><path d="M4 5h16l-6 8v6l-4-2v-4z"/></symbol>
|
|
343
|
+
<symbol id="r-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
|
|
344
|
+
<symbol id="r-bug" viewBox="0 0 24 24"><rect x="8" y="6" width="8" height="14" rx="4"/><path d="M12 20v-9M8 12H4M20 12h-4M9 7 7 4M15 7l2-3M8 17l-3 2M16 17l3 2"/></symbol>
|
|
345
|
+
<symbol id="r-kbd" viewBox="0 0 24 24"><rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M7 14h10"/></symbol>
|
|
346
|
+
</defs></svg>
|
|
298
347
|
<a class="it" href="/" data-view="home" title="Home: chat with the project's agent"><svg><use href="#i-home"/></svg><span class="lbl">Home</span></a>
|
|
299
|
-
<a class="it fold" href="/?view=icebox" data-view="sources" title="Icebox: requests gathered from your sources"><svg><use href="#
|
|
348
|
+
<a class="it fold" href="/?view=icebox" data-view="sources" title="Icebox: requests gathered from your sources"><svg><use href="#r-tray"/></svg><span class="lbl">Icebox</span><span class="srcs" id="rail-srcs"></span><span class="n" id="ice-n"></span></a>
|
|
349
|
+
<a class="it" href="/?view=ideas" data-view="ideas" title="Ideas: every idea and run, filtered"><svg><use href="#r-bulb"/></svg><span class="lbl">Ideas</span></a>
|
|
300
350
|
<a class="it" href="/?view=board" data-view="board" title="Board"><svg><use href="#i-board"/></svg><span class="lbl">Board</span></a>
|
|
301
|
-
<
|
|
302
|
-
<
|
|
303
|
-
<a class="it" href="/?view=
|
|
304
|
-
<a class="it fold" href="/?view=settings" data-view="settings" title="Settings"><svg><use href="#i-gear"/></svg><span class="lbl">Settings</span></a>
|
|
305
|
-
<details class="mtab"><summary title="More"><svg><use href="#i-more"/></svg><span class="lbl">More</span></summary><div class="mpop"><a href="/?view=icebox" data-view="sources"><svg><use href="#i-inbox"/></svg>Icebox</a><a href="/video" data-view="video"><svg><use href="#i-video"/></svg>Video</a><a href="/?view=settings" data-view="settings"><svg><use href="#i-gear"/></svg>Settings</a></div></details>
|
|
306
|
-
<span class="end"></span>
|
|
307
|
-
<div class="theme" role="group" aria-label="Theme"><button data-t="light" title="Light theme"><svg><use href="#i-sun"/></svg><span class="lbl">Light</span></button><button data-t="dark" title="Dark theme"><svg><use href="#i-moon"/></svg><span class="lbl">Dark</span></button></div>
|
|
351
|
+
<div class="psec"><span class="lbl">Projects</span><button id="pfilter" title="Show one project" aria-label="Show one project"><svg><use href="#r-filter"/></svg></button><button id="padd" title="New idea" aria-label="New idea"><svg><use href="#r-plus"/></svg></button></div>
|
|
352
|
+
<div class="plist" id="plist" aria-label="Ideas and runs by project"></div>
|
|
353
|
+
<div class="rbot"><a class="it fold" href="/?view=settings" data-view="settings" title="Settings"><svg><use href="#i-gear"/></svg><span class="lbl">Settings</span></a><a class="rib" href="/issue" target="_blank" rel="noopener" title="Report an issue" aria-label="Report an issue"><svg><use href="#r-bug"/></svg></a><button class="rib" id="kbd" title="Keyboard shortcuts" aria-label="Keyboard shortcuts"><svg><use href="#r-kbd"/></svg></button><button class="rib th" id="themet" title="Theme" aria-label="Theme"><svg class="sun"><use href="#i-sun"/></svg><svg class="moon"><use href="#i-moon"/></svg></button></div>
|
|
308
354
|
</nav>
|
|
309
355
|
<script>
|
|
310
356
|
// Side menu: theme and collapse, the same lines in board.html and notes.html. Runs before
|
|
@@ -315,18 +361,17 @@ pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:
|
|
|
315
361
|
const rail=()=>{const m=phone.matches||(fold?fold==="min":wide.matches),b=document.getElementById("fold");r.dataset.rail=m?"min":"full";b.title=m?"Expand menu":"Collapse menu";b.setAttribute("aria-label",b.title);b.setAttribute("aria-expanded",!m)};
|
|
316
362
|
wide.addEventListener("change",rail);phone.addEventListener("change",rail);rail();
|
|
317
363
|
document.getElementById("fold").onclick=()=>{fold=r.dataset.rail==="min"?"full":"min";try{localStorage.setItem("kz-rail",fold)}catch(e){}rail()};
|
|
318
|
-
// Theme: light, dark, or unset for system, in kz-theme. The
|
|
319
|
-
const paint=()=>{const d=r.dataset.theme?r.dataset.theme==="dark":os.matches;document.
|
|
364
|
+
// Theme: light, dark, or unset for system, in kz-theme. The toggle shows what is on screen and flips it.
|
|
365
|
+
const paint=()=>{const d=r.dataset.theme?r.dataset.theme==="dark":os.matches;const b=document.getElementById("themet");if(b){b.dataset.dark=d;b.title=d?"Dark theme: switch to light":"Light theme: switch to dark";b.setAttribute("aria-label",b.title)}};
|
|
320
366
|
window.setTheme=t=>{if(t==="system")delete r.dataset.theme;else r.dataset.theme=t;try{t==="system"?localStorage.removeItem("kz-theme"):localStorage.setItem("kz-theme",t)}catch(e){}paint();dispatchEvent(new Event("kz-theme"))};
|
|
321
367
|
try{const t=localStorage.getItem("kz-theme");if(t)r.dataset.theme=t}catch(e){}
|
|
322
368
|
// Motion: full, reduce, or unset to follow the system's reduced-motion, in kz-motion.
|
|
323
369
|
window.setMotion=m=>{if(m==="system")delete r.dataset.motion;else r.dataset.motion=m;try{m==="system"?localStorage.removeItem("kz-motion"):localStorage.setItem("kz-motion",m)}catch(e){}};
|
|
324
370
|
try{const m=localStorage.getItem("kz-motion");if(m)r.dataset.motion=m}catch(e){}
|
|
325
371
|
os.addEventListener("change",paint);paint();
|
|
326
|
-
document.
|
|
372
|
+
document.getElementById("themet").onclick=e=>setTheme(e.currentTarget.dataset.dark==="true"?"light":"dark");
|
|
327
373
|
// Phones: More holds the tabs that do not fit; a pick or a tap elsewhere closes it.
|
|
328
|
-
const more=document.querySelector(".mtab");more.querySelectorAll("a").forEach(a=>a.addEventListener("click",()=>more.open=false));
|
|
329
|
-
addEventListener("pointerdown",e=>{if(more.open&&!more.contains(e.target))more.open=false},true)})();
|
|
374
|
+
const more=document.querySelector(".mtab");if(more){more.querySelectorAll("a").forEach(a=>a.addEventListener("click",()=>more.open=false));addEventListener("pointerdown",e=>{if(more.open&&!more.contains(e.target))more.open=false},true)}})();
|
|
330
375
|
</script>
|
|
331
376
|
<div class="app">
|
|
332
377
|
<div class="hdr">
|
|
@@ -347,7 +392,6 @@ pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:
|
|
|
347
392
|
<div class="page" id="wiz" hidden></div>
|
|
348
393
|
</div>
|
|
349
394
|
<div class="toast" id="toast" role="status"></div>
|
|
350
|
-
<script>document.querySelector('.rail a[data-view="video"]').setAttribute("aria-current","page")</script>
|
|
351
395
|
<script src="/video.js"></script>
|
|
352
396
|
</body>
|
|
353
397
|
</html>
|