sideby 0.23.0 → 0.24.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/dist/build.json CHANGED
@@ -1 +1 @@
1
- {"id":"20261022T091443-e858af"}
1
+ {"id":"20261025T115040-215ace"}
@@ -3596,6 +3596,7 @@ async function messagesInbound(a, args, io, runtime) {
3596
3596
  export async function cmdTheme(a, io) {
3597
3597
  const t = await import('../core/themes.js');
3598
3598
  const { loadConfig } = await import('../core/config.js');
3599
+ const { DEFAULT_THEME_ID } = await import('../panel/themes.js');
3599
3600
  const [sub = 'list', target, ...more] = a.positionals;
3600
3601
  const wantJson = a.flags.has('json');
3601
3602
  const paths = resolvePaths();
@@ -3603,7 +3604,7 @@ export async function cmdTheme(a, io) {
3603
3604
  if (more.length)
3604
3605
  throw new UsageError(usage);
3605
3606
  const active = async () => (await loadConfig(paths.configFile).catch(() => ({}))).panel
3606
- ?.colorTheme ?? 'sky';
3607
+ ?.colorTheme ?? DEFAULT_THEME_ID;
3607
3608
  // A name, or a path to a Theme File not yet in the themes folder.
3608
3609
  const load = async (ref) => {
3609
3610
  if (t.THEME_ID_RE.test(ref) && !ref.endsWith('.json'))
@@ -407,8 +407,9 @@ sideby theme import <file> [--id <name>] [--yes] [--json]
407
407
  sideby theme export <name> [--out <file>] [--json]
408
408
  sideby theme remove <name> [--yes] [--json]
409
409
 
410
- The Panel's colors. Built-in Themes: sky (default) and leaf. A Theme File is JSON in <config>/themes/<name>.json:
411
- {"schemaVersion": 1, "name": "My blue", "base": "sky", "accent": "#2f7fbf", "light": {...}, "dark": {...}}
410
+ The Panel's colors. Built-in Themes: teal (default), leaf, celeste, claude and codex. A Theme File is JSON in
411
+ <config>/themes/<name>.json:
412
+ {"schemaVersion": 1, "name": "My blue", "base": "celeste", "accent": "#2f7fbf", "light": {...}, "dark": {...}}
412
413
  base and accent are optional; light and dark take the same tokens as a Portal Theme. Files hold colors only, never code.
413
414
  check reports text and control contrast in light and dark with a value that would pass (exit 1 when any fails); the
414
415
  Panel moves failing colors itself. preview shows a Theme once in the running Panel without switching. Exit 10: import
@@ -2,6 +2,7 @@ import { mkdir, readFile } from 'node:fs/promises';
2
2
  import { dirname } from 'node:path';
3
3
  import { Type } from 'typebox';
4
4
  import { Value } from 'typebox/value';
5
+ import { RENAMED_THEMES } from '../panel/themes.js';
5
6
  import { UserError } from './errors.js';
6
7
  import { lstatOrNull, parseJsonSafely, realpathOrNull, sha256, writeIfUnchanged } from './fs-safe.js';
7
8
  import { SHARE_MODES } from './share-mode-names.js';
@@ -124,7 +125,7 @@ export const ConfigSchema = Type.Object({
124
125
  })),
125
126
  colorTheme: Type.Optional(Type.String({
126
127
  pattern: '^[a-z0-9][a-z0-9-]{0,39}$',
127
- description: 'Panel Theme: a Built-in Theme (sky, the default, or leaf) or a Theme File in <config>/themes (spec §3.34).',
128
+ description: 'Panel Theme: a Built-in Theme (teal, the default, leaf, celeste, claude or codex; the old sky reads as celeste) or a Theme File in <config>/themes (spec §3.34).',
128
129
  })),
129
130
  }, { additionalProperties: false, description: 'How the Panel looks (spec §3.29).' })),
130
131
  menubar: Type.Optional(Type.Object({
@@ -299,6 +300,11 @@ export async function loadConfig(file) {
299
300
  const shortProblem = shortCommandProblem(data);
300
301
  if (shortProblem)
301
302
  throw new ConfigError(`${file}: ${shortProblem}`);
303
+ // Built-in Themes renamed with the design system (sky is now celeste): an old name reads as the new one,
304
+ // so a Panel set up before keeps a Theme instead of falling back.
305
+ const color = data.panel?.colorTheme;
306
+ if (color && Object.hasOwn(RENAMED_THEMES, color))
307
+ data.panel = { ...data.panel, colorTheme: RENAMED_THEMES[color] };
302
308
  return data;
303
309
  }
304
310
  /** A Pick Command whose name is unsafe in a shell or also an Alias (they share one namespace), or null. */
@@ -27,7 +27,7 @@ export interface ResolvedColors {
27
27
  dark: PanelThemeTokens;
28
28
  /** How many colors were moved to pass the contrast check. */
29
29
  adjusted: number;
30
- /** Set when the chosen Theme could not be used and Sky stands in. */
30
+ /** Set when the chosen Theme could not be used and the Default Theme stands in. */
31
31
  fallback?: string;
32
32
  }
33
33
  export declare const themesDir: (paths: Paths) => string;
@@ -54,7 +54,7 @@ export declare function themeColors(theme: ThemeFile): {
54
54
  light: PanelThemeTokens;
55
55
  dark: PanelThemeTokens;
56
56
  };
57
- /** The colors for a Theme id (Built-in or file), with failing pairs moved until they pass. Unknown or broken: Sky. */
57
+ /** The colors for a Theme id (Built-in or file), with failing pairs moved until they pass. Unknown or broken: the Default Theme. */
58
58
  export declare function resolveColors(paths: Paths, id: string | undefined): Promise<ResolvedColors>;
59
59
  /** A 12-step scale around one color: step 9 is the color, the others follow the template's lightness. */
60
60
  export declare function accentScale(hex: string, dark: boolean): string[];
@@ -1,10 +1,10 @@
1
- // Themes (spec §3.34, ADR-0050): the two Built-in Themes plus the user's Theme Files in <config>/themes/<id>.json.
1
+ // Themes (spec §3.34, ADR-0050): the Built-in Themes plus the user's Theme Files in <config>/themes/<id>.json.
2
2
  // A Theme File is data only: a base Built-in Theme, an optional accent that regenerates the accent roles, and token
3
3
  // overrides checked like a Portal Theme's. This module lists, checks, resolves and switches them; it never runs code.
4
4
  import { lstat, mkdir, readdir, readFile, rm } from 'node:fs/promises';
5
5
  import { join } from 'node:path';
6
6
  import { THEME_TOKENS, themeValueProblem } from '../panel/theme.js';
7
- import { BUILTIN_THEMES, DEFAULT_THEME_ID } from '../panel/themes.js';
7
+ import { BUILTIN_THEMES, DEFAULT_THEME_ID, RENAMED_THEMES } from '../panel/themes.js';
8
8
  import { editConfigPanel, loadConfig } from './config.js';
9
9
  import { writeFileAtomic } from './fs-safe.js';
10
10
  export const THEME_ID_RE = /^[a-z0-9][a-z0-9-]{0,39}$/;
@@ -13,7 +13,8 @@ const HEX_RE = /^#[0-9a-fA-F]{6}$/;
13
13
  export const themesDir = (paths) => join(paths.configDir, 'themes');
14
14
  const undoFile = (paths) => join(paths.stateDir, 'theme-undo.json');
15
15
  const previewFile = (paths) => join(paths.stateDir, 'theme-preview.json');
16
- const builtin = (id) => BUILTIN_THEMES.find((t) => t.id === id);
16
+ /** A Built-in Theme by id; a renamed one's old id (sky) finds the Theme it became. */
17
+ const builtin = (id) => BUILTIN_THEMES.find((t) => t.id === (Object.hasOwn(RENAMED_THEMES, id) ? RENAMED_THEMES[id] : id));
17
18
  /**
18
19
  * The name `sideby theme use` takes for "no Theme chosen": the Panel then shows the Default Theme on its own and,
19
20
  * inside a Portal, the Portal's colors. It names no Theme File.
@@ -160,12 +161,12 @@ export function themeColors(theme) {
160
161
  dark: { ...base.dark, ...accent.dark, ...theme.dark },
161
162
  };
162
163
  }
163
- /** The colors for a Theme id (Built-in or file), with failing pairs moved until they pass. Unknown or broken: Sky. */
164
+ /** The colors for a Theme id (Built-in or file), with failing pairs moved until they pass. Unknown or broken: the Default Theme. */
164
165
  export async function resolveColors(paths, id) {
165
166
  const want = id === undefined || id === NO_THEME ? DEFAULT_THEME_ID : id;
166
167
  const b = builtin(want);
167
168
  if (b)
168
- return { id: want, light: { ...b.light }, dark: { ...b.dark }, adjusted: 0 };
169
+ return { id: b.id, light: { ...b.light }, dark: { ...b.dark }, adjusted: 0 };
169
170
  if (!THEME_ID_RE.test(want))
170
171
  return { ...defaults(), fallback: `${want} is not a Theme name; using ${DEFAULT.name.en}` };
171
172
  const r = await readThemeFile(join(themesDir(paths), `${want}.json`));
@@ -279,12 +280,14 @@ export function accentTokens(hex) {
279
280
  },
280
281
  };
281
282
  }
282
- // Text pairs need 4.5:1; the main button (bold text, ADR-0050) and the focus outline need 3:1.
283
+ // Text pairs need 4.5:1 (faint too: the Panel uses it for captions, units and reset times people read); the main button (bold text, ADR-0050) and the focus outline need 3:1.
283
284
  const PAIRS = [
284
285
  ['text', 'bg', 4.5],
285
286
  ['text', 'surface', 4.5],
286
287
  ['muted', 'bg', 4.5],
287
288
  ['muted', 'surface', 4.5],
289
+ ['faint', 'bg', 4.5],
290
+ ['faint', 'surface', 4.5],
288
291
  ['accent', 'bg', 4.5],
289
292
  ['accent', 'surface', 4.5],
290
293
  ['ok', 'okSoft', 4.5],
@@ -324,6 +327,7 @@ function passing(fg, bg, min) {
324
327
  // ---- Switching
325
328
  /** Sets `panel.colorTheme`, keeping what it was so `undo` can put it back. */
326
329
  export async function useTheme(paths, id) {
330
+ id = builtin(id)?.id ?? id;
327
331
  if (id !== NO_THEME) {
328
332
  const entry = (await listThemes(paths)).find((t) => t.id === id);
329
333
  if (!entry)
@@ -627,8 +627,6 @@ declare const en: {
627
627
  'th.title': string;
628
628
  'th.intro': string;
629
629
  'th.loading': string;
630
- 'th.inUse': string;
631
- 'th.mine': string;
632
630
  'th.switched': string;
633
631
  'th.custom': string;
634
632
  'th.undo': string;
@@ -629,8 +629,6 @@ const en = {
629
629
  'th.title': 'Theme',
630
630
  'th.intro': 'The colors of this Panel. Warnings and errors stay easy to read in every Theme.',
631
631
  'th.loading': 'Reading Themes…',
632
- 'th.inUse': 'In use',
633
- 'th.mine': 'Your Theme',
634
632
  'th.switched': 'Switched to {name}.',
635
633
  'th.custom': 'Your color',
636
634
  'th.undo': 'Undo',
@@ -2024,8 +2022,6 @@ const zh = {
2024
2022
  'th.title': '主题',
2025
2023
  'th.intro': '这个面板的颜色。每套主题里,提醒和报错都看得清。',
2026
2024
  'th.loading': '正在读取主题…',
2027
- 'th.inUse': '使用中',
2028
- 'th.mine': '你的主题',
2029
2025
  'th.switched': '已换成「{name}」。',
2030
2026
  'th.custom': '自选颜色',
2031
2027
  'th.undo': '撤销',
@@ -511,6 +511,17 @@ export declare function menuPlacement(anchor: {
511
511
  maxHeight: number;
512
512
  above: boolean;
513
513
  };
514
+ /**
515
+ * The option a key moves to in a row of radio buttons (WAI-ARIA radio group): the arrows step and wrap around, Home
516
+ * and End go to the ends. -1 for any other key, or an empty row.
517
+ */
518
+ export declare function radioStep(count: number, index: number, key: string): number;
519
+ /**
520
+ * Whether arrow-key use of a row of radio dots carries into the next render, which puts focus back on the dot in use.
521
+ * `focus` is where focus is before the render: nowhere in particular (the page or the dialog, as when a busy render
522
+ * disabled the dots), on a dot, or on another control. Once the user has moved to another control, keyboard use ends.
523
+ */
524
+ export declare function dotsKeepKeyboard(focus: 'none' | 'dot' | 'other'): boolean;
514
525
  /** The key a Same Login group keeps its folded state under: its members, in a fixed order. */
515
526
  export declare function loginKey(refs: readonly string[]): string;
516
527
  /**
@@ -902,6 +902,31 @@ export function menuPlacement(anchor, size, view, align, gap = 4, margin = 8, mi
902
902
  return { left, top: anchor.bottom + gap, maxHeight: below, above: false };
903
903
  return { left, top: margin, maxHeight: above, above: true };
904
904
  }
905
+ /**
906
+ * The option a key moves to in a row of radio buttons (WAI-ARIA radio group): the arrows step and wrap around, Home
907
+ * and End go to the ends. -1 for any other key, or an empty row.
908
+ */
909
+ export function radioStep(count, index, key) {
910
+ if (count < 1)
911
+ return -1;
912
+ if (key === 'ArrowRight' || key === 'ArrowDown')
913
+ return (index + 1) % count;
914
+ if (key === 'ArrowLeft' || key === 'ArrowUp')
915
+ return (index - 1 + count) % count;
916
+ if (key === 'Home')
917
+ return 0;
918
+ if (key === 'End')
919
+ return count - 1;
920
+ return -1;
921
+ }
922
+ /**
923
+ * Whether arrow-key use of a row of radio dots carries into the next render, which puts focus back on the dot in use.
924
+ * `focus` is where focus is before the render: nowhere in particular (the page or the dialog, as when a busy render
925
+ * disabled the dots), on a dot, or on another control. Once the user has moved to another control, keyboard use ends.
926
+ */
927
+ export function dotsKeepKeyboard(focus) {
928
+ return focus !== 'other';
929
+ }
905
930
  /** The key a Same Login group keeps its folded state under: its members, in a fixed order. */
906
931
  export function loginKey(refs) {
907
932
  return `login:${[...refs].sort().join(',')}`;
@@ -1074,7 +1099,7 @@ export function taskPrompt(input, strip) {
1074
1099
  pAccount: '地址、模型名、环境变量以厂商的官方文档为准。账号建好后,让我用 `sideby key <账号>` 输入密钥,再用 `sideby try <账号>` 试一次。订阅账号要登录时,让我点面板上的「登录」,或者自己运行 `sideby login <账号>`。',
1075
1100
  pHost: '用 `sideby plugins new <id>` 生成插件骨架;收集事实时写明宿主的版本和日期;用 `sideby plugins check <id>` 检查,并在演示 HOME 里试一遍。',
1076
1101
  pPlugin: '照 sideby 仓库的插件指南 docs/guide/plugins.zh-CN.md 写;写完用 `sideby plugins check <id>` 检查。',
1077
- pTheme: '先跑 `sideby theme --json` 看现有主题和正在用的那套,再问我想要的感觉;我给了截图、网址或品牌色,就从里面取色。写一个主题文件(JSON,只放颜色,不放代码):`{"schemaVersion":1,"name":"…","base":"sky" 或 "leaf","accent":"#rrggbb","light":{…},"dark":{…}}`;多数时候给 `base` 和 `accent` 就够了,`light` / `dark` 只写要改的 token(`sideby theme export sky` 能看到全部 token)。先放在当前目录,跑 `sideby theme check <文件>`,有不达标的就按建议值改到全部通过;再跑 `sideby theme preview <文件>` 让我在面板里看一眼。我满意后才 `sideby theme import <文件>` 和 `sideby theme use <名字>`;不满意就接着改。随时可以用 `sideby theme use --undo` 换回去。',
1102
+ pTheme: '先跑 `sideby theme --json` 看现有主题和正在用的那套,再问我想要的感觉;我给了截图、网址或品牌色,就从里面取色。写一个主题文件(JSON,只放颜色,不放代码):`{"schemaVersion":1,"name":"…","base":"teal"、"leaf"、"celeste"、"claude" 或 "codex","accent":"#rrggbb","light":{…},"dark":{…}}`;多数时候给 `base` 和 `accent` 就够了,`light` / `dark` 只写要改的 token(`sideby theme export teal` 能看到全部 token)。先放在当前目录,跑 `sideby theme check <文件>`,有不达标的就按建议值改到全部通过;再跑 `sideby theme preview <文件>` 让我在面板里看一眼。我满意后才 `sideby theme import <文件>` 和 `sideby theme use <名字>`;不满意就接着改。随时可以用 `sideby theme use --undo` 换回去。',
1078
1103
  pTerminal: "先问我用的是什么终端。只看这个终端的官方文档和它的 `--help`,找出「在指定目录新开一个窗口运行一条命令」的写法,写明你看的版本。写成一个模板:`{cmd}` 是要运行的命令,`{cwd}` 是文件夹,sideby 按参数填入,不经过 shell。保存要用 `sideby terminal --custom '<模板>'`,它会改 sideby 的设置,先问我。保存后让我在面板上点一次「让 AI 帮我」试一下,打不开就一起看错误再改。",
1079
1104
  share: '做好之后,问我愿不愿意把这次的改进分享给 sideby。我同意后,按 sideby 仓库的 CONTRIBUTING.md 提一个 pull request,提交前去掉我自己的账号名、路径和邮箱。',
1080
1105
  shareTerminal: '跑通之后,问我愿不愿意把这个终端做成 sideby 的内置终端。我同意后,在 sideby 仓库 src/core/terminal.ts 的终端表里加一行并补上测试,按 CONTRIBUTING.md 提一个 pull request,提交前去掉我自己的账号名、路径和邮箱。',
@@ -1120,7 +1145,7 @@ export function taskPrompt(input, strip) {
1120
1145
  pAccount: "Take addresses, model names and variables from the vendor's official docs. When the account exists, have me enter the key with `sideby key <account>`, then try it with `sideby try <account>`. For a subscription sign-in, have me click Sign in in the Panel or run `sideby login <account>` myself.",
1121
1146
  pHost: 'Start with `sideby plugins new <id>`; note the Host version and the date with every fact you gather; check it with `sideby plugins check <id>` and try it in a demo HOME.',
1122
1147
  pPlugin: 'Follow the plugins guide in the sideby repository (docs/guide/plugins.md); check it with `sideby plugins check <id>`.',
1123
- pTheme: 'Run `sideby theme --json` first to see the Themes and the one in use, then ask me what feel I want; if I give you a screenshot, a website or a brand color, take the colors from it. Write a Theme File (JSON, colors only, never code): `{"schemaVersion":1,"name":"…","base":"sky" or "leaf","accent":"#rrggbb","light":{…},"dark":{…}}`; usually `base` and `accent` are enough, and `light` / `dark` hold only the tokens to change (`sideby theme export sky` shows them all). Keep it in the current folder, run `sideby theme check <file>` and change what fails to the suggested values until every pair passes, then run `sideby theme preview <file>` so I can look at it in the Panel. Only when I like it, run `sideby theme import <file>` and `sideby theme use <name>`; otherwise keep changing it. `sideby theme use --undo` goes back at any time.',
1148
+ pTheme: 'Run `sideby theme --json` first to see the Themes and the one in use, then ask me what feel I want; if I give you a screenshot, a website or a brand color, take the colors from it. Write a Theme File (JSON, colors only, never code): `{"schemaVersion":1,"name":"…","base":"teal", "leaf", "celeste", "claude" or "codex","accent":"#rrggbb","light":{…},"dark":{…}}`; usually `base` and `accent` are enough, and `light` / `dark` hold only the tokens to change (`sideby theme export teal` shows them all). Keep it in the current folder, run `sideby theme check <file>` and change what fails to the suggested values until every pair passes, then run `sideby theme preview <file>` so I can look at it in the Panel. Only when I like it, run `sideby theme import <file>` and `sideby theme use <name>`; otherwise keep changing it. `sideby theme use --undo` goes back at any time.',
1124
1149
  pTerminal: "Ask me which terminal I use first. Read only that terminal's official docs and its `--help` to find how it opens a new window that runs one command in a given folder, and note the version you read. Write it as a template: `{cmd}` is the command and `{cwd}` the folder; sideby fills them in as separate arguments, no shell runs it. Save it with `sideby terminal --custom '<template>'`, which changes sideby's settings, so ask me first. Then have me click Let AI do it in the Panel once to try it; if it does not open, look at the error with me and fix the template.",
1125
1150
  share: 'When it works, ask me whether to share the improvement with sideby. Only with my yes, follow the CONTRIBUTING.md of the sideby repository to open a pull request, and first remove my own account names, paths and emails.',
1126
1151
  shareTerminal: 'When it works, ask me whether to make this terminal built into sideby. Only with my yes, add a row to the terminal table in src/core/terminal.ts of the sideby repository with tests, follow its CONTRIBUTING.md to open a pull request, and first remove my own account names, paths and emails.',
@@ -3,7 +3,7 @@
3
3
  import { groupsToAccept } from '../core/inbound.js';
4
4
  import { quotaIsStale } from '../core/quota-levels.js';
5
5
  import { remoteControlTodo } from '../core/remote-control.js';
6
- import { aiTaskAccounts, aliasArgsOf, aliasIssue, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, bindingWindow, cacheHitRate, canLeaveLocal, categoryOrder, codeSwapOutcome, enableOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, hiddenIn, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, newAccountDir, nextReset, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, quotaAskable, quotaHighLevel, quotaPressure, remoteControlSummary, reorder, rowBadge, runCodeSwap, saveHandoffChange, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, shortCwd, shortSessionLabel, sortAccounts, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, updatedAge, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
6
+ import { aiTaskAccounts, aliasArgsOf, aliasIssue, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, bindingWindow, cacheHitRate, canLeaveLocal, categoryOrder, codeSwapOutcome, dotsKeepKeyboard, enableOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, hiddenIn, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, newAccountDir, nextReset, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, quotaAskable, quotaHighLevel, quotaPressure, radioStep, remoteControlSummary, reorder, rowBadge, runCodeSwap, saveHandoffChange, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, shortCwd, shortSessionLabel, sortAccounts, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, updatedAge, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
7
7
  const LOGIC = [
8
8
  quotaIsStale,
9
9
  aiTaskAccounts,
@@ -40,6 +40,8 @@ const LOGIC = [
40
40
  maskEmail,
41
41
  matchesQuery,
42
42
  menuPlacement,
43
+ radioStep,
44
+ dotsKeepKeyboard,
43
45
  mergeDaily,
44
46
  mergeUsage,
45
47
  messageChip,
@@ -6290,7 +6292,7 @@ const MAIN = String.raw `
6290
6292
  const ATTACH_ACCEPT = 'image/png,image/jpeg,image/gif,image/webp,video/mp4,video/quicktime,video/webm'
6291
6293
  let dropsHooked = false
6292
6294
  // Which open dialog takes pasted or dropped files now: the AI Task's or "Send to it"'s, until it shows its result.
6293
- function dropTarget() {
6295
+ function fileDropTarget() {
6294
6296
  if (BOOT.readOnly) return null
6295
6297
  if (dlg.kind === 'ask' && ak && !ak.result) return askAddFiles
6296
6298
  if (dlg.kind === 'send' && sd && !sd.result) return sendAddFiles
@@ -6300,7 +6302,7 @@ const MAIN = String.raw `
6300
6302
  if (dropsHooked) return
6301
6303
  dropsHooked = true
6302
6304
  const el = dlg.el
6303
- const active = () => Boolean(dropTarget())
6305
+ const active = () => Boolean(fileDropTarget())
6304
6306
  const hasFiles = (e) => e.dataTransfer && Array.prototype.indexOf.call(e.dataTransfer.types || [], 'Files') >= 0
6305
6307
  el.addEventListener('paste', (e) => {
6306
6308
  const cd = e.clipboardData
@@ -6310,7 +6312,7 @@ const MAIN = String.raw `
6310
6312
  if (!active() || !files.length) return
6311
6313
  // A file copied in Finder also carries its name as text; only the file is wanted.
6312
6314
  e.preventDefault()
6313
- dropTarget()(files)
6315
+ fileDropTarget()(files)
6314
6316
  })
6315
6317
  el.addEventListener('dragover', (e) => {
6316
6318
  if (!active() || !hasFiles(e)) return
@@ -6323,7 +6325,7 @@ const MAIN = String.raw `
6323
6325
  el.classList.remove('drop-on')
6324
6326
  if (!active() || !hasFiles(e)) return
6325
6327
  e.preventDefault()
6326
- dropTarget()(Array.from(e.dataTransfer.files || []))
6328
+ fileDropTarget()(Array.from(e.dataTransfer.files || []))
6327
6329
  })
6328
6330
  }
6329
6331
  function askAttachField() {
@@ -6747,14 +6749,14 @@ const MAIN = String.raw `
6747
6749
  let themeFetching = false
6748
6750
  // The Theme config names ('default' when none) and the one the page shows (inside a Portal, 'default' is its colors).
6749
6751
  let themeChosen = (BOOT.panel && BOOT.panel.colorTheme) || 'default'
6750
- let themeNow = themeChosen === 'default' ? 'sky' : themeChosen
6752
+ let themeNow = themeChosen === 'default' ? BOOT.themes.default : themeChosen
6751
6753
  function themeName(x) { return x.source === 'portal' ? t('th.page') : x.id === 'custom' && x.source === 'file' ? t('th.custom') : lang === 'zh' && x.nameZh ? x.nameZh : x.name }
6752
6754
  function themeLabel() {
6753
6755
  const x = th && th.data && th.data.themes.find((y) => y.id === themeNow)
6754
6756
  if (x) return themeName(x)
6755
6757
  if (themeNow === 'default') return t('th.page')
6756
- const b = { sky: ['Sky', '晴空'], leaf: ['New Leaf', '新叶'] }[themeNow]
6757
- return b ? b[lang === 'zh' ? 1 : 0] : themeNow
6758
+ const b = BOOT.themes.names[themeNow]
6759
+ return b ? b[lang === 'zh' ? 'zh' : 'en'] : themeNow
6758
6760
  }
6759
6761
  function applyThemeCss(css) {
6760
6762
  if (!css || typeof CSSStyleSheet !== 'function' || !('adoptedStyleSheets' in document)) { location.reload(); return }
@@ -6808,6 +6810,11 @@ const MAIN = String.raw `
6808
6810
  }
6809
6811
  function renderThemes() {
6810
6812
  if (!th) return
6813
+ // Keyboard use of the dots ends once focus sits on another control (Tab to Remove, a field), so this render
6814
+ // leaves it there instead of pulling it back to the dot in use.
6815
+ const was = document.activeElement
6816
+ const at = !was || was === document.body || was === dlg.el ? 'none' : was.classList.contains('theme-dot') ? 'dot' : 'other'
6817
+ if (th.keyed && !dotsKeepKeyboard(at)) th.keyed = false
6811
6818
  const d = th.data
6812
6819
  const body = [h('p', { class: 'muted small' }, t('th.intro'))]
6813
6820
  // What changed, with undo, sits in the footer beside Close, so the dialog never grows when it appears.
@@ -6817,15 +6824,29 @@ const MAIN = String.raw `
6817
6824
  if (d) {
6818
6825
  if (d.fallback) body.push(h('p', { class: 'note note-warn' }, d.fallback))
6819
6826
  else if (d.adjusted) body.push(h('p', { class: 'note' }, t('th.adjusted', { n: d.adjusted })))
6820
- body.push(h('div', { class: 'theme-grid', role: 'radiogroup', 'aria-label': t('th.title') }, d.themes.filter((x) => x.source === 'builtin' || !x.problems.length).map((x) => {
6827
+ // One row of color dots, a radio group: the arrows move the choice (and switch the Theme), the dot in use has a
6828
+ // ring in its own color and a check; the name is in its tooltip.
6829
+ const now = d.themes.find((y) => y.id === d.active)
6830
+ const dots = h('div', { class: 'theme-dots', role: 'radiogroup', 'aria-labelledby': 'th-dots-head', onkeydown: (e) => {
6831
+ const all = [...dots.querySelectorAll('.theme-dot')]
6832
+ const next = radioStep(all.length, all.indexOf(document.activeElement), e.key)
6833
+ if (next < 0 || all[next].disabled) return
6834
+ e.preventDefault()
6835
+ th.keyed = true
6836
+ all[next].focus()
6837
+ all[next].click()
6838
+ } }, d.themes.filter((x) => x.source === 'builtin' || !x.problems.length).map((x) => {
6821
6839
  const on = x.id === d.active
6822
- return h('button', { class: 'theme-card' + (on ? ' is-on' : ''), type: 'button', role: 'radio', 'aria-checked': String(on), disabled: th.busy || (BOOT.readOnly && !on), onclick: () => { if (!on && !BOOT.readOnly) useThemeBy({ use: x.id }) } },
6823
- h('span', { class: 'theme-sw', 'aria-hidden': 'true' }, x.swatches.map((c) => h('span', { css: { background: c } }))),
6824
- h('span', { class: 'theme-name' }, h('span', null, themeName(x)), on ? h('span', { class: 'chip chip-sm chip-ok' }, t('th.inUse')) : x.source === 'file' ? h('span', { class: 'faint small' }, t('th.mine')) : null))
6825
- })))
6840
+ return h('button', { class: 'theme-dot', type: 'button', role: 'radio', 'aria-checked': String(on), tabindex: on ? '0' : '-1', 'aria-label': themeName(x), title: themeName(x), css: { '--dot': x.swatches[2] || x.swatches[0] }, disabled: th.busy || (BOOT.readOnly && !on), onclick: (e) => {
6841
+ // A pointer click (detail > 0) ends keyboard use; the arrows click with detail 0.
6842
+ if (e.detail > 0) th.keyed = false
6843
+ if (!on && !BOOT.readOnly) useThemeBy({ use: x.id })
6844
+ } })
6845
+ }))
6846
+ body.push(h('p', { class: 'theme-head', id: 'th-dots-head' }, t('th.title')), dots)
6826
6847
  if (!BOOT.readOnly) {
6827
6848
  const cur = d.themes.find((y) => y.id === d.active)
6828
- const pick = h('input', { id: 'th-accent', type: 'color', value: th.accent || (cur && cur.swatches[2]) || '#3f8fc4', disabled: th.busy, 'aria-label': t('th.accent') })
6849
+ const pick = h('input', { id: 'th-accent', type: 'color', value: th.accent || (cur && cur.swatches[2]) || '#3f8fc4', disabled: th.busy, 'aria-label': t('th.accent') }) // design-system-ignore: a color input needs a hex start value when no Theme has one
6829
6850
  pick.addEventListener('input', () => { th.accent = pick.value })
6830
6851
  body.push(h('div', { class: 'theme-row' },
6831
6852
  h('label', { class: 'theme-label', for: 'th-accent' }, t('th.accent')), pick,
@@ -6855,6 +6876,11 @@ const MAIN = String.raw `
6855
6876
  }
6856
6877
  if (th.error) body.push(errorNote(th.error, null))
6857
6878
  setKids(dlg.el, dialogFrame(t('th.title'), null, body, [status, h('button', { class: 'btn', type: 'button', onclick: () => dlg.el.close() }, t('btn.close'))]))
6879
+ // A switch made with the arrows re-renders the dialog (more than once): keep the keyboard on the dot now in use.
6880
+ if (th.keyed && !th.busy) {
6881
+ const on = dlg.el.querySelector('.theme-dot[aria-checked="true"]')
6882
+ if (on) on.focus()
6883
+ }
6858
6884
  }
6859
6885
 
6860
6886
  // ---------- pick commands (spec §3.13, ADR-0035) ----------
@@ -12,24 +12,28 @@ const colorDecls = (tokens) => Object.entries(tokens)
12
12
  // blue whatever the Theme (ADR-0050).
13
13
  const DERIVED_COLORS = `
14
14
  --btn-text: var(--text); --btn-hover-text: var(--accent); --check: var(--focus);
15
- --logo-bg: var(--surface-2); --logo-fg: #3f8fc4; --logo-line: var(--border);
16
- --focus-outline: 2px solid var(--focus); --focus-ring: none;`;
15
+ --logo-bg: var(--surface-2); --logo-fg: #3f8fc4; /* design-system-ignore: the mark's body keeps the brand blue (ADR-0050) */ --logo-line: var(--border);
16
+ --focus-outline: 2px solid var(--focus); --focus-ring: none;
17
+ --scrim: color-mix(in srgb, var(--text) 40%, transparent);`;
18
+ // The usage chart (--spark) takes the main button's hue at a readable lightness, keeping its chroma: a black-and-white
19
+ // Theme gets a gray chart instead of a made-up color.
17
20
  // Design tokens. A host theme (theme.ts) layers its values over these: light values after LIGHT_TOKENS, dark values after
18
21
  // DARK_TOKENS. DARK_TOKENS sets every color token again, so a host's light colors never leak into dark mode, while
19
22
  // type, shape and layout tokens are shared by both schemes.
20
23
  const LIGHT_TOKENS = `
21
24
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
22
25
  --font-size: 14px; --small: 12.5px; --control-size: 13.5px; --heading-size: 15px; --large: 16px; --title-size: 22px;
23
- --title-weight: 750; --heading-weight: 650; --strong-weight: 600; --button-weight: 600; --primary-weight: 650;
24
- --radius: 14px; --ctl-radius: 8px; --chip-radius: 999px; --ctl-h: 34px; --ctl-h-sm: 28px; --field-h: 36px;
26
+ --title-weight: 750; --heading-weight: 650; --strong-weight: 600; --button-weight: 600; --primary-weight: 500;
27
+ --radius: 14px; --ctl-radius: 8px; --primary-radius: 999px; --chip-radius: 999px; --ctl-h: 34px; --ctl-h-sm: 28px; --field-h: 36px;
25
28
  --content-width: 1180px; --gutter: 24px;${DERIVED_COLORS}
26
- --spark: oklch(from var(--accent) clamp(0.55, l, 0.62) max(c, 0.14) h); --spark-soft: oklch(from var(--accent) 0.83 calc(max(c, 0.14) * 0.6) h);
29
+ --spark: oklch(from var(--primary) clamp(0.55, l, 0.62) c h); --spark-soft: oklch(from var(--primary) 0.83 calc(c * 0.6) h);
27
30
  ${colorDecls(DEFAULT_THEME.light)};
28
- --float-shadow: 0 10px 30px rgba(20,22,24,.14), 0 2px 6px rgba(20,22,24,.06);`;
31
+ --float-shadow: 0 10px 30px color-mix(in srgb, var(--text) 14%, transparent), 0 2px 6px color-mix(in srgb, var(--text) 6%, transparent);`;
29
32
  const DARK_TOKENS = `${DERIVED_COLORS}
30
- --spark: oklch(from var(--accent) clamp(0.7, l, 0.78) max(c, 0.14) h); --spark-soft: oklch(from var(--accent) 0.45 calc(max(c, 0.14) * 0.6) h);
33
+ --scrim: rgba(0,0,0,.55); /* design-system-ignore: a dark page's dialog backdrop darkens it; the text color would wash it out */
34
+ --spark: oklch(from var(--primary) clamp(0.7, l, 0.78) c h); --spark-soft: oklch(from var(--primary) 0.45 calc(c * 0.6) h);
31
35
  ${colorDecls(DEFAULT_THEME.dark)};
32
- --float-shadow: 0 12px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);`;
36
+ --float-shadow: 0 12px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);`; // design-system-ignore: a shadow on a dark page is black whatever the Theme
33
37
  /**
34
38
  * The page's style block: default tokens, the host's tokens over them, then the rules that read them. With
35
39
  * `colorScheme: 'auto'` the page follows the system unless the viewer picked light or dark in the Panel, which sets
@@ -105,15 +109,17 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
105
109
  .ic { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
106
110
 
107
111
  /* Themes (spec §3.34): the cards in the Theme dialog, and the short fade while the page takes a new Theme. */
108
- .theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 18px; }
109
- .theme-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: calc(var(--radius) - 4px); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
110
- .theme-card:hover:not(:disabled) { border-color: var(--btn-hover-border); }
111
- .theme-card.is-on { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); cursor: default; }
112
- .theme-card:disabled:not(.is-on) { opacity: .6; cursor: default; }
113
- .theme-card:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
114
- .theme-sw { display: flex; height: 28px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
115
- .theme-sw span { flex: 1; }
116
- .theme-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: var(--strong-weight); }
112
+ .theme-head { margin: 12px 0 8px; color: var(--muted); font-size: var(--small); }
113
+ .theme-head b { color: var(--text); font-weight: var(--strong-weight); }
114
+ /* Theme dots: a 28px dot per Theme; the hairline keeps a black or white dot visible on a page of the same color. */
115
+ .theme-dots { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; padding: 4px; }
116
+ .theme-dot { position: relative; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent); cursor: pointer; transition: transform .12s; }
117
+ .theme-dot:hover:not(:disabled) { transform: scale(1.08); }
118
+ .theme-dot[aria-checked=true] { outline: 2px solid var(--dot); outline-offset: 2px; cursor: default; }
119
+ .theme-dot[aria-checked=true]::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 700; text-shadow: 0 0 2px rgba(0,0,0,.45); } /* design-system-ignore: the check sits on the dot's own color, white with a soft edge reads on every accent */
120
+ .theme-dot:disabled:not([aria-checked=true]) { opacity: .6; cursor: default; }
121
+ .theme-dot:focus-visible { outline: var(--focus-outline); outline-offset: 3px; }
122
+ .theme-dot[aria-checked=true]:focus-visible { outline: 2px solid var(--focus); }
117
123
  .theme-status { display: flex; align-items: center; gap: 8px; margin: 0 auto 0 0; min-width: 0; color: var(--muted); }
118
124
  .theme-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
119
125
  .theme-label { font-weight: var(--strong-weight); }
@@ -132,7 +138,7 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
132
138
  .stat-text { min-width: 0; }
133
139
  .stat-label { color: var(--muted); font-size: var(--small); display: flex; align-items: center; gap: 6px; }
134
140
  .stat-value { font-size: 22px; font-weight: var(--heading-weight); letter-spacing: -0.02em; line-height: 1.35; white-space: nowrap; }
135
- .stat-sub { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
141
+ .stat-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
136
142
  .stat-btn { font: inherit; color: inherit; background: none; border: 0; border-left: 1px solid var(--border); cursor: pointer; transition: background-color .12s; }
137
143
  .stat-btn:hover { background: var(--hover); }
138
144
  .stat-btn[aria-pressed=true] { background: var(--warn-soft); }
@@ -145,7 +151,7 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
145
151
  .search { position: relative; flex: 1 1 160px; min-width: 120px; display: block; }
146
152
  .search-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
147
153
  .search .search-input { padding-left: 34px; padding-right: 34px; height: var(--ctl-h); }
148
- .kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px/16px var(--mono); color: var(--faint); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; pointer-events: none; }
154
+ .kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px/16px var(--mono); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; pointer-events: none; }
149
155
  .search:focus-within .kbd, .search input:not(:placeholder-shown) ~ .kbd { display: none; }
150
156
  .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
151
157
  .tb-select { width: auto; height: var(--ctl-h); font-size: var(--control-size); }
@@ -253,7 +259,7 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
253
259
  .is-dragging { opacity: .45; }
254
260
  .drop-before { box-shadow: inset 0 2px 0 var(--accent); }
255
261
  .drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
256
- .menu-head { padding: 6px 10px 2px; color: var(--faint); font-size: 11px; font-weight: var(--strong-weight); }
262
+ .menu-head { padding: 6px 10px 2px; color: var(--muted); font-size: 11px; font-weight: var(--strong-weight); }
257
263
  /* The arrow at a row's start opens and closes its details; so does a click anywhere else in the row. */
258
264
  .row-toggle { width: 28px; height: 28px; margin: -4px -6px -4px -8px; }
259
265
  .fold-hit { cursor: pointer; }
@@ -426,7 +432,7 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
426
432
  .rows .m-label, .rows .m-unit { display: none; }
427
433
 
428
434
  /* Chips and badges */
429
- .badge { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em; }
435
+ .badge { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em; } /* design-system-ignore: white initials on each Host's fixed logo color */
430
436
  .badge-logo { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
431
437
  .badge svg { display: block; width: 20px; height: 20px; fill: currentColor; }
432
438
  .badge-sm { width: 26px; height: 26px; border-radius: 7px; font-size: 10.5px; }
@@ -515,7 +521,7 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
515
521
  a.btn:hover { text-decoration: none; }
516
522
  .btn:hover:not(:disabled) { background: var(--hover); border-color: var(--btn-hover-border); color: var(--btn-hover-text); }
517
523
  .btn:active:not(:disabled) { background: var(--active); }
518
- .btn-primary { background: var(--primary); border-color: var(--primary-border); color: var(--on-primary); font-weight: var(--primary-weight); }
524
+ .btn-primary { background: var(--primary); border-color: var(--primary-border); color: var(--on-primary); font-weight: var(--primary-weight); border-radius: var(--primary-radius); }
519
525
  .btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover-border); color: var(--on-primary); }
520
526
  .btn-primary:active:not(:disabled) { background: var(--primary-active); border-color: var(--primary-hover-border); }
521
527
  .btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
@@ -654,7 +660,7 @@ a.btn:hover { text-decoration: none; }
654
660
  .tune-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
655
661
  .tune-vals { display: flex; gap: 24px; }
656
662
  .tune-num { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
657
- .tune-best { color: var(--ok, var(--accent)); }
663
+ .tune-best { color: var(--ok); }
658
664
  .ah-fam { border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
659
665
  .ah-fam-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
660
666
  .ah-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
@@ -665,7 +671,7 @@ a.btn:hover { text-decoration: none; }
665
671
  .disabled-why { color: var(--muted); font-size: var(--small); margin-top: 10px; }
666
672
  .actions { display: flex; gap: 8px; flex-wrap: wrap; }
667
673
  /* A thin ring with an arc that fades out behind its head: lighter than a thick broken circle at text size. */
668
- .spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 8%, color-mix(in srgb, currentColor 18%, transparent) 30%, currentColor); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.75px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 1.75px), #000 calc(100% - 1.5px)); animation: spin .75s linear infinite; vertical-align: -2px; flex: none; }
674
+ .spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 8%, color-mix(in srgb, currentColor 18%, transparent) 30%, currentColor); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.75px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 1.75px), #000 calc(100% - 1.5px)); animation: spin .75s linear infinite; vertical-align: -2px; flex: none; } /* design-system-ignore: #000 sets mask opacity, not a color */
669
675
  @keyframes spin { to { transform: rotate(360deg); } }
670
676
  .copy { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
671
677
  .copy code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 3px 8px; overflow-x: auto; white-space: nowrap; color: var(--text); min-width: 0; }
@@ -784,7 +790,11 @@ select:is(:hover, :focus) { --chevron: var(--text); }
784
790
  /* Dialog */
785
791
  .dialog { padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); box-shadow: var(--float-shadow); }
786
792
  .dialog[open] { display: flex; }
787
- .dialog::backdrop { background: rgba(10, 12, 16, .4); }
793
+ .dialog::backdrop { background: var(--scrim); }
794
+ /* The dialog box takes focus when it opens (showModal) but is not a control: no ring around it. Any other focusable
795
+ element without its own rule gets the Theme's focus ring, never the browser's default blue. */
796
+ .dialog:focus, .dialog:focus-visible { outline: none; }
797
+ :where(:focus-visible) { outline: var(--focus-outline); outline-offset: 2px; }
788
798
  .dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 4px; }
789
799
  .dlg-head h2 { font-size: var(--large); }
790
800
  .dlg-body { padding: 10px 18px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
@@ -11,6 +11,7 @@ import { widthTier } from './page-logic.js';
11
11
  import { PAGE_SCRIPT } from './page-script.js';
12
12
  import { pageStyles } from './page-styles.js';
13
13
  import { resolveTheme } from './theme.js';
14
+ import { BUILTIN_THEMES, DEFAULT_THEME_ID } from './themes.js';
14
15
  /** GitHub's mark, from Simple Icons (CC0 1.0, https://simpleicons.org); a trademark of GitHub that only names the site. */
15
16
  const GITHUB_MARK = 'M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12';
16
17
  /** Browsers keep a favicon past `no-cache`; a link that changes with the mark makes them fetch the new one. */
@@ -49,6 +50,11 @@ export function renderPage(opts) {
49
50
  colorScheme: theme.colorScheme,
50
51
  lang,
51
52
  panel: opts.panel ?? {},
53
+ // Built-in Theme names and the default, for the Theme row in Settings before /api/themes answers.
54
+ themes: {
55
+ default: DEFAULT_THEME_ID,
56
+ names: Object.fromEntries(BUILTIN_THEMES.map((t) => [t.id, t.name])),
57
+ },
52
58
  warn: QUOTA_WARN_PERCENT,
53
59
  fail: QUOTA_FAIL_PERCENT,
54
60
  usageDays: USAGE_DAYS,
@@ -21,7 +21,7 @@ export interface PanelThemeTokens {
21
21
  /** Labels, emphasis and numbers. */
22
22
  strongWeight?: string;
23
23
  buttonWeight?: string;
24
- /** Main action button; defaults to `buttonWeight`. */
24
+ /** Main action button. */
25
25
  primaryWeight?: string;
26
26
  /** Page background. */
27
27
  bg?: string;
@@ -81,6 +81,8 @@ export interface PanelThemeTokens {
81
81
  /** Buttons and fields. */
82
82
  controlRadius?: string;
83
83
  chipRadius?: string;
84
+ /** Main action button; a pill by default (design system, 2026-10-25). */
85
+ primaryRadius?: string;
84
86
  /** Button height; `controlHeightSmall` for buttons inside cards and banners. */
85
87
  controlHeight?: string;
86
88
  controlHeightSmall?: string;
@@ -57,6 +57,7 @@ export const THEME_TOKENS = {
57
57
  radius: '--radius',
58
58
  controlRadius: '--ctl-radius',
59
59
  chipRadius: '--chip-radius',
60
+ primaryRadius: '--primary-radius',
60
61
  controlHeight: '--ctl-h',
61
62
  controlHeightSmall: '--ctl-h-sm',
62
63
  fieldHeight: '--field-h',
@@ -5,10 +5,12 @@ export interface BuiltinTheme {
5
5
  en: string;
6
6
  zh: string;
7
7
  };
8
- /** A few colors for the Theme's card in Settings: page, card, accent tint, main button, dark page. */
8
+ /** A few colors for the Theme's card in Settings: page, accent tint, main button, dark page. */
9
9
  swatches: readonly string[];
10
10
  light: PanelThemeTokens;
11
11
  dark: PanelThemeTokens;
12
12
  }
13
- export declare const DEFAULT_THEME_ID = "sky";
13
+ export declare const DEFAULT_THEME_ID = "teal";
14
+ /** Built-in Themes that were renamed, and the Theme each became; config and Theme Files naming the old id still work. */
15
+ export declare const RENAMED_THEMES: Readonly<Record<string, string>>;
14
16
  export declare const BUILTIN_THEMES: readonly BuiltinTheme[];
@@ -1,160 +1,398 @@
1
- export const DEFAULT_THEME_ID = 'sky';
1
+ export const DEFAULT_THEME_ID = 'teal';
2
+ /** Built-in Themes that were renamed, and the Theme each became; config and Theme Files naming the old id still work. */
3
+ export const RENAMED_THEMES = { sky: 'celeste' };
2
4
  export const BUILTIN_THEMES = [
3
5
  {
4
- id: 'sky',
5
- name: { en: 'Sky', zh: '晴空' },
6
- swatches: ['#f2f8fc', '#e5f2fb', '#27658f', '#0e1621'],
6
+ id: 'teal',
7
+ name: { en: 'Teal', zh: '青绿' },
8
+ swatches: ['#f9f9fb', '#e3f2f2', '#0e8c88', '#111113'],
7
9
  light: {
8
- bg: '#f2f8fc',
9
- surface: '#fcfcfa',
10
- surfaceMuted: '#f6fafd',
11
- border: '#dce8f0',
12
- borderStrong: '#c5d7e4',
13
- text: '#15171c',
14
- muted: '#555b63',
15
- faint: '#6b7380',
16
- hover: '#f0f7fc',
17
- active: '#e6f1fa',
18
- accent: '#27658f',
19
- accentSoft: '#e5f2fb',
20
- focus: '#3f8fc4',
21
- primary: '#d9ebf9',
22
- primaryHover: '#cbe3f7',
23
- primaryActive: '#cbe3f7',
24
- onPrimary: '#17588a',
25
- primaryBorder: '#7eb2dd',
26
- primaryHoverBorder: '#5f9dd0',
27
- buttonHoverBorder: '#8fbde3',
28
- buttonHoverText: '#27658f',
29
- checkColor: '#3f8fc4',
30
- ok: '#15803d',
31
- okSoft: '#e8f7ee',
32
- warn: '#b45309',
33
- warnSoft: '#fdf3e2',
34
- fail: '#c81e1e',
35
- failSoft: '#fdecec',
36
- okBar: '#22c55e',
37
- warnBar: '#f59e0b',
38
- failBar: '#ef4444',
39
- track: '#e4edf4',
40
- logoBg: '#e5f2fb',
41
- logoBorder: '#dce8f0',
42
- shadow: '0 1px 2px #10182814',
10
+ bg: '#f9f9fb',
11
+ surface: '#fcfcfd',
12
+ surfaceMuted: '#f0f0f3',
13
+ border: '#e0e1e6',
14
+ borderStrong: '#d9d9e0',
15
+ text: '#1c2024',
16
+ muted: '#60646c',
17
+ faint: '#70727d',
18
+ hover: '#f9f9fb',
19
+ active: '#e8e8ec',
20
+ accent: '#04706d',
21
+ accentSoft: '#e3f2f2',
22
+ focus: '#37a29d',
23
+ primary: '#0e8c88',
24
+ primaryHover: '#2b9a96',
25
+ primaryActive: '#2b9a96',
26
+ onPrimary: '#ffffff',
27
+ primaryBorder: '#0e8c88',
28
+ primaryHoverBorder: '#2b9a96',
29
+ buttonHoverBorder: '#cdced6',
30
+ buttonHoverText: '#1c2024',
31
+ checkColor: '#04706d',
32
+ ok: '#1c2024',
33
+ okSoft: '#daeedf',
34
+ warn: '#4f3422',
35
+ warnSoft: '#faf0ca',
36
+ fail: '#641723',
37
+ failSoft: '#f9e2e2',
38
+ okBar: '#27a644',
39
+ warnBar: '#f0bf00',
40
+ failBar: '#eb5757',
41
+ track: '#e8e8ec',
42
+ logoBg: '#e3f2f2',
43
+ logoBorder: '#e0e1e6',
44
+ shadow: 'none',
43
45
  },
44
46
  dark: {
45
- bg: '#0e1621',
46
- surface: '#141e2a',
47
- surfaceMuted: '#111a25',
48
- border: '#233244',
49
- borderStrong: '#30455b',
50
- text: '#e6edf3',
51
- muted: '#9aa9b8',
52
- faint: '#8796a6',
53
- hover: '#182736',
54
- active: '#1c2f42',
55
- accent: '#8cc4ee',
56
- accentSoft: '#16314a',
57
- focus: '#5aa7dc',
58
- primary: '#1a4366',
59
- primaryHover: '#20507a',
60
- primaryActive: '#20507a',
61
- onPrimary: '#dcedfb',
62
- primaryBorder: '#3d74a3',
63
- primaryHoverBorder: '#4f86b5',
64
- buttonHoverBorder: '#4a7fa8',
65
- buttonHoverText: '#8cc4ee',
66
- checkColor: '#5aa7dc',
67
- ok: '#4ade80',
68
- okSoft: '#13291c',
69
- warn: '#fbbf24',
70
- warnSoft: '#2d2410',
71
- fail: '#f87171',
72
- failSoft: '#331717',
73
- okBar: '#22c55e',
74
- warnBar: '#f59e0b',
75
- failBar: '#ef4444',
76
- track: '#1f2c3a',
77
- logoBg: '#e5f2fb',
47
+ bg: '#111113',
48
+ surface: '#212225',
49
+ surfaceMuted: '#212225',
50
+ border: '#2e3135',
51
+ borderStrong: '#363a3f',
52
+ text: '#edeef0',
53
+ muted: '#b0b4ba',
54
+ faint: '#868b95',
55
+ hover: '#212225',
56
+ active: '#272a2d',
57
+ accent: '#89c7c3',
58
+ accentSoft: '#253d3f',
59
+ focus: '#289591',
60
+ primary: '#1ba5a0',
61
+ primaryHover: '#36b0ab',
62
+ primaryActive: '#36b0ab',
63
+ onPrimary: '#ffffff',
64
+ primaryBorder: '#1ba5a0',
65
+ primaryHoverBorder: '#36b0ab',
66
+ buttonHoverBorder: '#43484e',
67
+ buttonHoverText: '#edeef0',
68
+ checkColor: '#89c7c3',
69
+ ok: '#edeef0',
70
+ okSoft: '#22372a',
71
+ warn: '#ffca16',
72
+ warnSoft: '#4a411e',
73
+ fail: '#ff9592',
74
+ failSoft: '#412a2d',
75
+ okBar: '#27a644',
76
+ warnBar: '#f0bf00',
77
+ failBar: '#eb5757',
78
+ track: '#272a2d',
79
+ logoBg: '#e3f2f2',
78
80
  logoBorder: 'transparent',
79
81
  shadow: 'none',
80
82
  },
81
83
  },
82
84
  {
83
- // Colors: Radix Colors (MIT, https://github.com/radix-ui/colors).
84
85
  id: 'leaf',
85
- name: { en: 'New Leaf', zh: '新叶' },
86
- swatches: ['#f5fbf5', '#e9f6e9', '#2a7e3b', '#0e1511'],
86
+ name: { en: 'Leaf', zh: '叶绿' },
87
+ swatches: ['#f9f9fb', '#edf5e5', '#568c11', '#111113'],
87
88
  light: {
88
- bg: '#f5fbf5',
89
- surface: '#fcfdfc',
90
- surfaceMuted: '#f8faf8',
91
- border: '#d7dad7',
92
- borderStrong: '#cccfcc',
93
- text: '#1d211c',
94
- muted: '#60655f',
95
- faint: '#60655f',
96
- hover: '#eff1ef',
97
- active: '#e7e9e7',
98
- accent: '#2a7e3b',
99
- accentSoft: '#e9f6e9',
100
- focus: '#2a7e3b',
101
- primary: '#daf1db',
102
- primaryHover: '#c9e8ca',
103
- primaryActive: '#c9e8ca',
104
- onPrimary: '#2a7e3b',
105
- primaryBorder: '#94ce9a',
106
- primaryHoverBorder: '#65ba74',
107
- buttonHoverBorder: '#94ce9a',
108
- buttonHoverText: '#2a7e3b',
109
- checkColor: '#46a758',
110
- ok: '#193b2d',
111
- okSoft: '#e6f6eb',
89
+ bg: '#f9f9fb',
90
+ surface: '#fcfcfd',
91
+ surfaceMuted: '#f0f0f3',
92
+ border: '#e0e1e6',
93
+ borderStrong: '#d9d9e0',
94
+ text: '#1c2024',
95
+ muted: '#60646c',
96
+ faint: '#70727d',
97
+ hover: '#f9f9fb',
98
+ active: '#e8e8ec',
99
+ accent: '#43721d',
100
+ accentSoft: '#edf5e5',
101
+ focus: '#6ca021',
102
+ primary: '#568c11',
103
+ primaryHover: '#6a9a2e',
104
+ primaryActive: '#6a9a2e',
105
+ onPrimary: '#ffffff',
106
+ primaryBorder: '#568c11',
107
+ primaryHoverBorder: '#6a9a2e',
108
+ buttonHoverBorder: '#cdced6',
109
+ buttonHoverText: '#1c2024',
110
+ checkColor: '#43721d',
111
+ ok: '#1c2024',
112
+ okSoft: '#daeedf',
112
113
  warn: '#4f3422',
113
- warnSoft: '#fff7c2',
114
- fail: '#ce2c31',
115
- failSoft: '#feebec',
116
- okBar: '#30a46c',
117
- warnBar: '#ffba18',
118
- failBar: '#e5484d',
119
- track: '#e7e9e7',
120
- logoBg: '#e9f6e9',
121
- logoBorder: '#c9e8ca',
122
- shadow: '0 1px 2px #203c2514',
114
+ warnSoft: '#faf0ca',
115
+ fail: '#641723',
116
+ failSoft: '#f9e2e2',
117
+ okBar: '#27a644',
118
+ warnBar: '#f0bf00',
119
+ failBar: '#eb5757',
120
+ track: '#e8e8ec',
121
+ logoBg: '#edf5e5',
122
+ logoBorder: '#e0e1e6',
123
+ shadow: 'none',
124
+ },
125
+ dark: {
126
+ bg: '#111113',
127
+ surface: '#212225',
128
+ surfaceMuted: '#212225',
129
+ border: '#2e3135',
130
+ borderStrong: '#363a3f',
131
+ text: '#edeef0',
132
+ muted: '#b0b4ba',
133
+ faint: '#868b95',
134
+ hover: '#212225',
135
+ active: '#272a2d',
136
+ accent: '#b0dc75',
137
+ accentSoft: '#344127',
138
+ focus: '#4c7810',
139
+ primary: '#64a400',
140
+ primaryHover: '#77af1f',
141
+ primaryActive: '#77af1f',
142
+ onPrimary: '#ffffff',
143
+ primaryBorder: '#64a400',
144
+ primaryHoverBorder: '#77af1f',
145
+ buttonHoverBorder: '#43484e',
146
+ buttonHoverText: '#edeef0',
147
+ checkColor: '#b0dc75',
148
+ ok: '#edeef0',
149
+ okSoft: '#22372a',
150
+ warn: '#ffca16',
151
+ warnSoft: '#4a411e',
152
+ fail: '#ff9592',
153
+ failSoft: '#412a2d',
154
+ okBar: '#27a644',
155
+ warnBar: '#f0bf00',
156
+ failBar: '#eb5757',
157
+ track: '#272a2d',
158
+ logoBg: '#edf5e5',
159
+ logoBorder: 'transparent',
160
+ shadow: 'none',
161
+ },
162
+ },
163
+ {
164
+ id: 'celeste',
165
+ name: { en: 'Argentine Blue', zh: '阿根廷蓝' },
166
+ swatches: ['#f9f9fb', '#ecf2f9', '#0182d3', '#111113'],
167
+ light: {
168
+ bg: '#f9f9fb',
169
+ surface: '#fcfcfd',
170
+ surfaceMuted: '#f0f0f3',
171
+ border: '#e0e1e6',
172
+ borderStrong: '#d9d9e0',
173
+ text: '#1c2024',
174
+ muted: '#60646c',
175
+ faint: '#70727d',
176
+ hover: '#f9f9fb',
177
+ active: '#e8e8ec',
178
+ accent: '#0067a9',
179
+ accentSoft: '#ecf2f9',
180
+ focus: '#4d97d8',
181
+ primary: '#0182d3',
182
+ primaryHover: '#1f91d8',
183
+ primaryActive: '#1f91d8',
184
+ onPrimary: '#ffffff',
185
+ primaryBorder: '#0182d3',
186
+ primaryHoverBorder: '#1f91d8',
187
+ buttonHoverBorder: '#cdced6',
188
+ buttonHoverText: '#1c2024',
189
+ checkColor: '#0067a9',
190
+ ok: '#1c2024',
191
+ okSoft: '#daeedf',
192
+ warn: '#4f3422',
193
+ warnSoft: '#faf0ca',
194
+ fail: '#641723',
195
+ failSoft: '#f9e2e2',
196
+ okBar: '#27a644',
197
+ warnBar: '#f0bf00',
198
+ failBar: '#eb5757',
199
+ track: '#e8e8ec',
200
+ logoBg: '#ecf2f9',
201
+ logoBorder: '#e0e1e6',
202
+ shadow: 'none',
203
+ },
204
+ dark: {
205
+ bg: '#111113',
206
+ surface: '#212225',
207
+ surfaceMuted: '#212225',
208
+ border: '#2e3135',
209
+ borderStrong: '#363a3f',
210
+ text: '#edeef0',
211
+ muted: '#b0b4ba',
212
+ faint: '#868b95',
213
+ hover: '#212225',
214
+ active: '#272a2d',
215
+ accent: '#6bb9fe',
216
+ accentSoft: '#323e4a',
217
+ focus: '#0873bb',
218
+ primary: '#0f99f6',
219
+ primaryHover: '#2ca5f7',
220
+ primaryActive: '#2ca5f7',
221
+ onPrimary: '#ffffff',
222
+ primaryBorder: '#0f99f6',
223
+ primaryHoverBorder: '#2ca5f7',
224
+ buttonHoverBorder: '#43484e',
225
+ buttonHoverText: '#edeef0',
226
+ checkColor: '#6bb9fe',
227
+ ok: '#edeef0',
228
+ okSoft: '#22372a',
229
+ warn: '#ffca16',
230
+ warnSoft: '#4a411e',
231
+ fail: '#ff9592',
232
+ failSoft: '#412a2d',
233
+ okBar: '#27a644',
234
+ warnBar: '#f0bf00',
235
+ failBar: '#eb5757',
236
+ track: '#272a2d',
237
+ logoBg: '#ecf2f9',
238
+ logoBorder: 'transparent',
239
+ shadow: 'none',
240
+ },
241
+ },
242
+ {
243
+ id: 'claude',
244
+ name: { en: 'Claude Orange', zh: 'Claude 橙' },
245
+ swatches: ['#f9f9fb', '#f8ece9', '#de4e13', '#111113'],
246
+ light: {
247
+ bg: '#f9f9fb',
248
+ surface: '#fcfcfd',
249
+ surfaceMuted: '#f0f0f3',
250
+ border: '#e0e1e6',
251
+ borderStrong: '#d9d9e0',
252
+ text: '#1c2024',
253
+ muted: '#60646c',
254
+ faint: '#70727d',
255
+ hover: '#f9f9fb',
256
+ active: '#e8e8ec',
257
+ accent: '#af3a08',
258
+ accentSoft: '#f8ece9',
259
+ focus: '#d17c61',
260
+ primary: '#de4e13',
261
+ primaryHover: '#e2632f',
262
+ primaryActive: '#e2632f',
263
+ onPrimary: '#ffffff',
264
+ primaryBorder: '#de4e13',
265
+ primaryHoverBorder: '#e2632f',
266
+ buttonHoverBorder: '#cdced6',
267
+ buttonHoverText: '#1c2024',
268
+ checkColor: '#af3a08',
269
+ ok: '#1c2024',
270
+ okSoft: '#daeedf',
271
+ warn: '#4f3422',
272
+ warnSoft: '#faf0ca',
273
+ fail: '#641723',
274
+ failSoft: '#f9e2e2',
275
+ okBar: '#27a644',
276
+ warnBar: '#f0bf00',
277
+ failBar: '#eb5757',
278
+ track: '#e8e8ec',
279
+ logoBg: '#f8ece9',
280
+ logoBorder: '#e0e1e6',
281
+ shadow: 'none',
282
+ },
283
+ dark: {
284
+ bg: '#111113',
285
+ surface: '#212225',
286
+ surfaceMuted: '#212225',
287
+ border: '#2e3135',
288
+ borderStrong: '#363a3f',
289
+ text: '#edeef0',
290
+ muted: '#b0b4ba',
291
+ faint: '#868b95',
292
+ hover: '#212225',
293
+ active: '#272a2d',
294
+ accent: '#fd9a79',
295
+ accentSoft: '#46332f',
296
+ focus: '#b54c28',
297
+ primary: '#fd632a',
298
+ primaryHover: '#fd7644',
299
+ primaryActive: '#fd7644',
300
+ onPrimary: '#ffffff',
301
+ primaryBorder: '#fd632a',
302
+ primaryHoverBorder: '#fd7644',
303
+ buttonHoverBorder: '#43484e',
304
+ buttonHoverText: '#edeef0',
305
+ checkColor: '#fd9a79',
306
+ ok: '#edeef0',
307
+ okSoft: '#22372a',
308
+ warn: '#ffca16',
309
+ warnSoft: '#4a411e',
310
+ fail: '#ff9592',
311
+ failSoft: '#412a2d',
312
+ okBar: '#27a644',
313
+ warnBar: '#f0bf00',
314
+ failBar: '#eb5757',
315
+ track: '#272a2d',
316
+ logoBg: '#f8ece9',
317
+ logoBorder: 'transparent',
318
+ shadow: 'none',
319
+ },
320
+ },
321
+ {
322
+ id: 'codex',
323
+ name: { en: 'Codex Ink', zh: 'Codex 墨黑' },
324
+ swatches: ['#f9f9fb', '#dfdfe0', '#0d0d0d', '#111113'],
325
+ light: {
326
+ bg: '#f9f9fb',
327
+ surface: '#fcfcfd',
328
+ surfaceMuted: '#f0f0f3',
329
+ border: '#e0e1e6',
330
+ borderStrong: '#d9d9e0',
331
+ text: '#1c2024',
332
+ muted: '#60646c',
333
+ faint: '#70727d',
334
+ hover: '#f9f9fb',
335
+ active: '#e8e8ec',
336
+ accent: '#0d0d0d',
337
+ accentSoft: '#dfdfe0',
338
+ focus: '#3a83f7',
339
+ primary: '#0d0d0d',
340
+ primaryHover: '#2a2a2a',
341
+ primaryActive: '#2a2a2a',
342
+ onPrimary: '#ffffff',
343
+ primaryBorder: '#0d0d0d',
344
+ primaryHoverBorder: '#2a2a2a',
345
+ buttonHoverBorder: '#cdced6',
346
+ buttonHoverText: '#1c2024',
347
+ checkColor: '#0d0d0d',
348
+ ok: '#1c2024',
349
+ okSoft: '#daeedf',
350
+ warn: '#4f3422',
351
+ warnSoft: '#faf0ca',
352
+ fail: '#641723',
353
+ failSoft: '#f9e2e2',
354
+ okBar: '#27a644',
355
+ warnBar: '#f0bf00',
356
+ failBar: '#eb5757',
357
+ track: '#e8e8ec',
358
+ logoBg: '#dfdfe0',
359
+ logoBorder: '#e0e1e6',
360
+ shadow: 'none',
123
361
  },
124
362
  dark: {
125
- bg: '#0e1511',
126
- surface: '#141a15',
127
- surfaceMuted: '#0e1511',
128
- border: '#383a36',
129
- borderStrong: '#454843',
130
- text: '#eceeec',
131
- muted: '#afb5ad',
132
- faint: '#afb5ad',
133
- hover: '#212220',
134
- active: '#282a27',
135
- accent: '#71d083',
136
- accentSoft: '#1b2a1e',
137
- focus: '#53b365',
138
- primary: '#1d3a24',
139
- primaryHover: '#25482d',
140
- primaryActive: '#25482d',
141
- onPrimary: '#c2f0c2',
142
- primaryBorder: '#2d5736',
143
- primaryHoverBorder: '#366740',
144
- buttonHoverBorder: '#2d5736',
145
- buttonHoverText: '#71d083',
146
- checkColor: '#46a758',
147
- ok: '#3dd68c',
148
- okSoft: '#132d21',
363
+ bg: '#111113',
364
+ surface: '#212225',
365
+ surfaceMuted: '#212225',
366
+ border: '#2e3135',
367
+ borderStrong: '#363a3f',
368
+ text: '#edeef0',
369
+ muted: '#b0b4ba',
370
+ faint: '#868b95',
371
+ hover: '#212225',
372
+ active: '#272a2d',
373
+ accent: '#ececec',
374
+ accentSoft: '#4d4e51',
375
+ focus: '#3a83f7',
376
+ primary: '#ffffff',
377
+ primaryHover: '#e2e2e2',
378
+ primaryActive: '#e2e2e2',
379
+ onPrimary: '#0d0d0d',
380
+ primaryBorder: '#ffffff',
381
+ primaryHoverBorder: '#e2e2e2',
382
+ buttonHoverBorder: '#43484e',
383
+ buttonHoverText: '#edeef0',
384
+ checkColor: '#ececec',
385
+ ok: '#edeef0',
386
+ okSoft: '#22372a',
149
387
  warn: '#ffca16',
150
- warnSoft: '#302008',
388
+ warnSoft: '#4a411e',
151
389
  fail: '#ff9592',
152
- failSoft: '#3b1219',
153
- okBar: '#30a46c',
154
- warnBar: '#ffc53d',
155
- failBar: '#e5484d',
156
- track: '#282a27',
157
- logoBg: '#e9f6e9',
390
+ failSoft: '#412a2d',
391
+ okBar: '#27a644',
392
+ warnBar: '#f0bf00',
393
+ failBar: '#eb5757',
394
+ track: '#272a2d',
395
+ logoBg: '#dfdfe0',
158
396
  logoBorder: 'transparent',
159
397
  shadow: 'none',
160
398
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Run work, personal and API-key accounts at the same time, without their configs drifting apart.",
5
5
  "license": "MIT",
6
6
  "author": "Adonis0123 (https://github.com/Adonis0123)",
@@ -30,7 +30,7 @@
30
30
  "colorTheme": {
31
31
  "type": "string",
32
32
  "pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
33
- "description": "Panel Theme: a Built-in Theme (sky, the default, or leaf) or a Theme File in <config>/themes (spec §3.34)."
33
+ "description": "Panel Theme: a Built-in Theme (teal, the default, leaf, celeste, claude or codex; the old sky reads as celeste) or a Theme File in <config>/themes (spec §3.34)."
34
34
  }
35
35
  },
36
36
  "additionalProperties": false,
@@ -2,7 +2,7 @@
2
2
  name: sideby
3
3
  description: Use when the user runs, or wants to run, several AI coding accounts (Claude Code, Codex, Grok Build, pi) side by side. Covers installing sideby and setting up a new account ("install sideby", "set up another Claude account", "add cc008", "配置一个 cc00x", "再加一个 Codex 账号"), explaining what accounts share and what stays separate ("what do my accounts share?", "这些账号共享了什么"), showing which account a session is ("show [cc001] in the status line", "加上账号标识"), finding a past session of any account ("找一下我上周改登录页的那个会话"), seeing accounts, quota and usage, moving on when one hits its 5-hour or weekly limit, moving the current task to another account ("用 cc008 继续", "交回 cc008"), adding a short command (alias) or a pick command that starts whichever account has the most quota ("加个 cc"), adding an API account from a vendor's docs ("加一个 DeepSeek API 账号"), supporting a new tool, and repairing drifted account directories (skills, hooks, rules or settings not shared, wrong symlinks, credential file permissions). Drives the `sideby` CLI with `--json`; the agent does every step except browser sign-in, filling in secrets and starting interactive sessions, which it hands to the user as one command (inside an Auto Handoff session, `sideby handoff ready --to` moves the task itself).
4
4
  metadata:
5
- version: "0.23.0"
5
+ version: "0.24.0"
6
6
  requires:
7
7
  bins: [sideby, node]
8
8
  cliHelp: sideby --help
@@ -1,14 +1,14 @@
1
1
  # Themes: the Panel's colors
2
2
 
3
- A Theme is a named set of Panel colors, one version for light and one for dark (spec §3.34, ADR-0050). sideby has two Built-in Themes: `sky` (default: light blue) and `leaf` (light green with green quota bars, from Radix Colors). The user can pick one, give their own accent color, or keep a Theme File of their own. Light, dark or system is a separate setting (`panel.theme`).
3
+ A Theme is a named set of Panel colors, one version for light and one for dark (spec §3.34, ADR-0050). sideby has five Built-in Themes, one per interface accent on the same cool-gray base: `teal` (default), `leaf` (green), `celeste` (light blue), `claude` (orange) and `codex` (black and white). The old name `sky` still works and means `celeste`. The user can pick one, give their own accent color, or keep a Theme File of their own. Light, dark or system is a separate setting (`panel.theme`).
4
4
 
5
5
  ## See and switch
6
6
 
7
7
  ```sh
8
8
  sideby theme --json # every Theme: id, name, source (builtin|file), active, problems
9
- sideby theme use leaf --json # switch; the Panel shows it on its next refresh
9
+ sideby theme use codex --json # switch; the Panel shows it on its next refresh
10
10
  sideby theme use --undo --json # back to the Theme before the last switch
11
- sideby theme use default --json # no Theme chosen: Sky, or inside a Portal the Portal's colors
11
+ sideby theme use default --json # no Theme chosen: Teal, or inside a Portal the Portal's colors
12
12
  ```
13
13
 
14
14
  `use` changes only config `panel.colorTheme`, nothing else; it needs no `--yes`, because undo is one command. Tell the user they can also click **Settings › Theme** in the Panel.
@@ -18,11 +18,11 @@ sideby theme use default --json # no Theme chosen: Sky, or inside a Portal the
18
18
  A Theme File is JSON in `~/.config/sideby/themes/<name>.json` (the folder `sideby theme --json` prints as `folder`). It holds colors only, never code:
19
19
 
20
20
  ```json
21
- { "schemaVersion": 1, "name": "Calm green", "base": "leaf", "accent": "#4f9d69",
21
+ { "schemaVersion": 1, "name": "Calm green", "base": "teal", "accent": "#4f9d69",
22
22
  "light": { "bg": "#fafaf7" }, "dark": {} }
23
23
  ```
24
24
 
25
- - `base`: the Built-in Theme to start from (default `sky`).
25
+ - `base`: the Built-in Theme to start from (default `teal`).
26
26
  - `accent`: one `#rrggbb` color; sideby makes the main button, links, selection, focus and the normal quota bar from it. Neutrals and warning colors stay the base's. Usually `base` plus `accent` is enough.
27
27
  - `light` / `dark`: single tokens to change, by the names `sideby theme export sky` prints. Unknown keys are ignored with a warning.
28
28
  - The file name is the Theme's name: lowercase letters, digits and hyphens.
@@ -40,7 +40,7 @@ Keep warnings and errors readable: do not set `warn`, `fail`, `warnBar` or `fail
40
40
  ## Other commands
41
41
 
42
42
  ```sh
43
- sideby theme export sky --out my-theme.json # a full copy to edit (refuses to overwrite a file)
43
+ sideby theme export teal --out my-theme.json # a full copy to edit (refuses to overwrite a file)
44
44
  sideby theme remove <name> --yes --json # delete a Theme File; the Panel goes back to sky if it was in use
45
45
  ```
46
46