sideby 0.22.0 → 0.23.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.
Files changed (52) hide show
  1. package/ai-tasks.json +14 -0
  2. package/dist/build.json +1 -1
  3. package/dist/src/cli/commands.d.ts +7 -0
  4. package/dist/src/cli/commands.js +326 -21
  5. package/dist/src/cli/json-schemas.js +76 -1
  6. package/dist/src/cli/main.js +32 -4
  7. package/dist/src/core/ask.js +6 -1
  8. package/dist/src/core/config.d.ts +5 -1
  9. package/dist/src/core/config.js +18 -3
  10. package/dist/src/core/quota-levels.d.ts +7 -2
  11. package/dist/src/core/quota-levels.js +13 -3
  12. package/dist/src/core/themes.d.ts +107 -0
  13. package/dist/src/core/themes.js +463 -0
  14. package/dist/src/menubar/snapshot.d.ts +10 -0
  15. package/dist/src/menubar/snapshot.js +14 -6
  16. package/dist/src/menubar/strings.d.ts +6 -0
  17. package/dist/src/menubar/strings.js +6 -0
  18. package/dist/src/panel/handler.d.ts +2 -0
  19. package/dist/src/panel/handler.js +125 -1
  20. package/dist/src/panel/i18n.d.ts +49 -0
  21. package/dist/src/panel/i18n.js +104 -6
  22. package/dist/src/panel/page-logic.d.ts +20 -1
  23. package/dist/src/panel/page-logic.js +41 -0
  24. package/dist/src/panel/page-script.js +264 -35
  25. package/dist/src/panel/page-styles.d.ts +2 -0
  26. package/dist/src/panel/page-styles.js +57 -31
  27. package/dist/src/panel/theme.d.ts +6 -1
  28. package/dist/src/panel/theme.js +4 -0
  29. package/dist/src/panel/themes.d.ts +14 -0
  30. package/dist/src/panel/themes.js +162 -0
  31. package/dist/src/runtime.d.ts +4 -0
  32. package/package.json +1 -1
  33. package/schemas/config.json +29 -1
  34. package/schemas/families.json +5 -0
  35. package/schemas/hide.json +157 -0
  36. package/schemas/list.json +10 -0
  37. package/schemas/order.json +26 -1
  38. package/schemas/pin.json +17 -0
  39. package/schemas/theme-check.json +140 -0
  40. package/schemas/theme-export.json +86 -0
  41. package/schemas/theme-import.json +92 -0
  42. package/schemas/theme-preview.json +86 -0
  43. package/schemas/theme-remove.json +87 -0
  44. package/schemas/theme-use.json +88 -0
  45. package/schemas/theme.json +137 -0
  46. package/schemas/unhide.json +157 -0
  47. package/schemas/unpin.json +17 -0
  48. package/skills/sideby/SKILL.md +3 -1
  49. package/skills/sideby/references/ai-tasks.md +1 -1
  50. package/skills/sideby/references/panel.md +9 -0
  51. package/skills/sideby/references/quota.md +1 -1
  52. package/skills/sideby/references/themes.md +47 -0
@@ -1,11 +1,18 @@
1
1
  // The Panel page's styles: design tokens (a host theme layers its values over them, see theme.ts) and the rules
2
2
  // that read them. Every color, radius and size below comes from a token, so a host theme reaches every component.
3
- import { resolveTheme } from './theme.js';
4
- // Colors defined from other tokens; repeated in both schemes so they follow that scheme's base colors. Dark mode keeps
5
- // the logo tile light: the mark's ink outline (core/brand-mark.ts) needs a light ground.
3
+ import { resolveTheme, THEME_TOKENS } from './theme.js';
4
+ import { BUILTIN_THEMES, DEFAULT_THEME_ID } from './themes.js';
5
+ // The default Theme's colors (spec §3.34): every color token, as declarations for the token blocks below.
6
+ const DEFAULT_THEME = BUILTIN_THEMES.find((t) => t.id === DEFAULT_THEME_ID);
7
+ const colorDecls = (tokens) => Object.entries(tokens)
8
+ .map(([k, v]) => `${THEME_TOKENS[k]}: ${v}`)
9
+ .join('; ');
10
+ // Colors defined from other tokens, before each scheme's Theme colors so a Theme can set them; repeated in both schemes so they follow that scheme's base colors. Dark mode keeps
11
+ // the logo tile light: the mark's ink outline (core/brand-mark.ts) needs a light ground. The mark's body stays the brand
12
+ // blue whatever the Theme (ADR-0050).
6
13
  const DERIVED_COLORS = `
7
14
  --btn-text: var(--text); --btn-hover-text: var(--accent); --check: var(--focus);
8
- --logo-bg: var(--accent-soft); --logo-fg: var(--focus); --logo-line: var(--border);
15
+ --logo-bg: var(--surface-2); --logo-fg: #3f8fc4; --logo-line: var(--border);
9
16
  --focus-outline: 2px solid var(--focus); --focus-ring: none;`;
10
17
  // Design tokens. A host theme (theme.ts) layers its values over these: light values after LIGHT_TOKENS, dark values after
11
18
  // DARK_TOKENS. DARK_TOKENS sets every color token again, so a host's light colors never leak into dark mode, while
@@ -15,34 +22,24 @@ const LIGHT_TOKENS = `
15
22
  --font-size: 14px; --small: 12.5px; --control-size: 13.5px; --heading-size: 15px; --large: 16px; --title-size: 22px;
16
23
  --title-weight: 750; --heading-weight: 650; --strong-weight: 600; --button-weight: 600; --primary-weight: 650;
17
24
  --radius: 14px; --ctl-radius: 8px; --chip-radius: 999px; --ctl-h: 34px; --ctl-h-sm: 28px; --field-h: 36px;
18
- --content-width: 1180px; --gutter: 24px;
19
- --bg: #f2f8fc; --surface: #fcfcfa; --surface-2: #f6fafd; --border: #dce8f0; --border-strong: #c5d7e4;
20
- --text: #15171c; --muted: #555b63; --faint: #8b93a1; --accent: #27658f; --accent-soft: #e5f2fb;
21
- --primary: #d9ebf9; --primary-hover: #cbe3f7; --primary-active: #bcdbf4; --on-primary: #17588a;
22
- --primary-border: #7eb2dd; --primary-hover-border: #5f9dd0; --btn-hover-border: #8fbde3;
23
- --hover: #f0f7fc; --active: #e6f1fa; --focus: #3f8fc4;
24
- --ok: #15803d; --ok-bar: #22c55e; --ok-soft: #e8f7ee; --warn: #b45309; --warn-bar: #f59e0b; --warn-soft: #fdf3e2;
25
- --fail: #c81e1e; --fail-bar: #ef4444; --fail-soft: #fdecec; --track: #e4edf4;
25
+ --content-width: 1180px; --gutter: 24px;${DERIVED_COLORS}
26
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);
27
- --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 8px rgba(16,24,40,.05);
28
- --float-shadow: 0 10px 30px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.06);${DERIVED_COLORS}`;
29
- const DARK_TOKENS = `
30
- --bg: #0e1621; --surface: #141e2a; --surface-2: #111a25; --border: #233244; --border-strong: #30455b;
31
- --text: #e6edf3; --muted: #9aa9b8; --faint: #6b7a8a; --accent: #8cc4ee; --accent-soft: #16314a;
32
- --primary: #1a4366; --primary-hover: #20507a; --primary-active: #265c8a; --on-primary: #dcedfb;
33
- --primary-border: #3d74a3; --primary-hover-border: #4f86b5; --btn-hover-border: #4a7fa8;
34
- --hover: #182736; --active: #1c2f42; --focus: #5aa7dc;
35
- --ok: #4ade80; --ok-bar: #22c55e; --ok-soft: #13291c; --warn: #fbbf24; --warn-bar: #f59e0b; --warn-soft: #2d2410;
36
- --fail: #f87171; --fail-bar: #ef4444; --fail-soft: #331717; --track: #1f2c3a;
27
+ ${colorDecls(DEFAULT_THEME.light)};
28
+ --float-shadow: 0 10px 30px rgba(20,22,24,.14), 0 2px 6px rgba(20,22,24,.06);`;
29
+ const DARK_TOKENS = `${DERIVED_COLORS}
37
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);
38
- --shadow: 0 1px 2px rgba(0,0,0,.3); --float-shadow: 0 12px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);${DERIVED_COLORS}
39
- --logo-bg: #dcebf7; --logo-line: transparent;`;
31
+ ${colorDecls(DEFAULT_THEME.dark)};
32
+ --float-shadow: 0 12px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);`;
40
33
  /**
41
34
  * The page's style block: default tokens, the host's tokens over them, then the rules that read them. With
42
35
  * `colorScheme: 'auto'` the page follows the system unless the viewer picked light or dark in the Panel, which sets
43
36
  * `data-theme` on the root element.
44
37
  */
45
38
  export function pageStyles(theme = resolveTheme(undefined)) {
39
+ return tokenStyles(theme) + CSS;
40
+ }
41
+ /** Only the token rules of `pageStyles`: the page swaps them in when the user picks another Theme (spec §3.34). */
42
+ export function tokenStyles(theme) {
46
43
  const rule = (decls, sel = ':root') => (decls.length ? `${sel} { ${decls.join('; ')}; }\n` : '');
47
44
  const scheme = theme.colorScheme === 'auto' ? 'light dark' : theme.colorScheme;
48
45
  let css = `:root {${LIGHT_TOKENS}\n color-scheme: ${scheme};\n}\n${rule(theme.light)}`;
@@ -54,7 +51,7 @@ export function pageStyles(theme = resolveTheme(undefined)) {
54
51
  }
55
52
  else if (theme.colorScheme === 'dark')
56
53
  css += `:root {${DARK_TOKENS}\n}\n${rule(theme.dark)}`;
57
- return css + CSS;
54
+ return css;
58
55
  }
59
56
  const CSS = `
60
57
  * { box-sizing: border-box; }
@@ -107,6 +104,26 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
107
104
  .block { margin-bottom: 22px; }
108
105
  .ic { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
109
106
 
107
+ /* 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); }
117
+ .theme-status { display: flex; align-items: center; gap: 8px; margin: 0 auto 0 0; min-width: 0; color: var(--muted); }
118
+ .theme-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
119
+ .theme-label { font-weight: var(--strong-weight); }
120
+ .theme-row input[type=color] { width: 40px; height: 30px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--ctl-radius); background: var(--surface); cursor: pointer; }
121
+ .theme-files { margin-top: 16px; display: grid; gap: 6px; }
122
+ .theme-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
123
+ .theme-file-name { display: flex; flex-direction: column; min-width: 0; }
124
+ .theme-bad { color: var(--fail); }
125
+ .theme-fade, .theme-fade * { transition: background-color .18s ease, color .18s ease, border-color .18s ease, fill .18s ease !important; }
126
+ @media (prefers-reduced-motion: reduce) { .theme-fade, .theme-fade * { transition: none !important; } }
110
127
  /* Summary: four quiet numbers in one surface. */
111
128
  .summary[hidden], #checkup[hidden] { display: none; }
112
129
  .summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
@@ -647,7 +664,8 @@ a.btn:hover { text-decoration: none; }
647
664
  .ah-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
648
665
  .disabled-why { color: var(--muted); font-size: var(--small); margin-top: 10px; }
649
666
  .actions { display: flex; gap: 8px; flex-wrap: wrap; }
650
- .spin { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; vertical-align: -2px; flex: none; }
667
+ /* 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; }
651
669
  @keyframes spin { to { transform: rotate(360deg); } }
652
670
  .copy { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
653
671
  .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; }
@@ -1192,12 +1210,11 @@ select:is(:hover, :focus) { --chevron: var(--text); }
1192
1210
  .tab::before { content: ""; position: absolute; inset: 6px 2px 7px; z-index: -1; border-radius: var(--ctl-radius); background: var(--hover); opacity: 0; transition: opacity .12s; }
1193
1211
  .tab:hover { color: var(--text); }
1194
1212
  .tab:hover::before { opacity: 1; }
1195
- .tab .ic { width: 16px; height: 16px; color: var(--faint); transition: color .12s; }
1196
- .tab:hover .ic { color: var(--muted); }
1213
+ /* The icon takes its tab's text color, so a tab is always one color: muted, then the accent once selected. */
1214
+ .tab .ic { width: 16px; height: 16px; color: currentColor; transition: color .12s; }
1197
1215
  .tab-label { display: inline-grid; }
1198
1216
  .tab-label::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-weight: var(--strong-weight); }
1199
- .tab[aria-selected=true] { color: var(--text); font-weight: var(--strong-weight); }
1200
- .tab[aria-selected=true] .ic { color: var(--accent); }
1217
+ .tab[aria-selected=true] { color: var(--accent); font-weight: var(--strong-weight); }
1201
1218
  .tab[aria-selected=true]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); animation: tab-line .22s cubic-bezier(.16, 1, .3, 1); }
1202
1219
  @keyframes tab-line { from { opacity: 0; transform: scaleX(.3); } }
1203
1220
  .tab:focus-visible { outline: var(--focus-outline); outline-offset: -5px; border-radius: var(--ctl-radius); }
@@ -1250,8 +1267,17 @@ select:is(:hover, :focus) { --chevron: var(--text); }
1250
1267
  :where(:root[data-width=phone]) .tg-stat { border-left: 0; border-top: 1px solid var(--border); }
1251
1268
  :where(:root[data-width=phone]) .tg-stat:first-child { border-top: 0; }
1252
1269
 
1270
+ /* Hidden Families and Accounts (spec §3.25): the line under the list, and the marks while they are shown. */
1271
+ .hidden-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0 2px; animation: chip-in .16s ease-out; }
1272
+ .hidden-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fail); flex: none; }
1273
+ .hidden-chip .ic { width: 12px; height: 12px; }
1274
+ .ident-name .hidden-chip { margin-left: 2px; }
1275
+ .group.is-hidden .group-title, .row.is-hidden .name { color: var(--muted); }
1276
+ .hide-btn .ic { width: 16px; height: 16px; }
1277
+ .hide-btn.is-on { color: var(--muted); }
1278
+ .hide-btn:disabled { opacity: .4; cursor: not-allowed; }
1253
1279
  @media (prefers-reduced-motion: reduce) {
1254
- .sk, .spin, .is-spinning svg, .toast, .toast.bump, .toast.toast-out, .view-in > *, .set-pane.view-in, .row.flash, .sess-row.flash, .sess-msg, .seg-badge, .card.flash, .pulse, .sess-busy .sess-dot, .menu, .menu.float-out, .dialog[open], .dialog[open]::backdrop, .enter, .fade-in, .hist-list.swap-in, .tip-body, .tip-float, .row-run.is-done .ic, .tab[aria-selected=true]::after { animation: none; }
1280
+ .sk, .spin, .hidden-bar, .is-spinning svg, .toast, .toast.bump, .toast.toast-out, .view-in > *, .set-pane.view-in, .row.flash, .sess-row.flash, .sess-msg, .seg-badge, .card.flash, .pulse, .sess-busy .sess-dot, .menu, .menu.float-out, .dialog[open], .dialog[open]::backdrop, .enter, .fade-in, .hist-list.swap-in, .tip-body, .tip-float, .row-run.is-done .ic, .tab[aria-selected=true]::after { animation: none; }
1255
1281
  .bar > span, .chev, .row, .sess-row, .sess-copy, .hist-row, .hist-cont, .hist-proj, .hist-catbody, .hist-opt, .hist-list, .icon-btn, .seg-btn, .menu-item, .set-tab, .link-btn, .tag-btn, .email-btn, .btn, .chip-btn, .set-link .ic, .dialog, .dialog[open], .dialog::backdrop, .tab, .tab::before, .tab .ic, .hp-status { transition: none; }
1256
1282
  :is(.btn, .icon-btn, .seg-btn, .set-tab, .chip-btn):active:not(:disabled), .set-link:hover .ic, .dialog:not([open]) { transform: none; }
1257
1283
  }
@@ -62,7 +62,12 @@ export interface PanelThemeTokens {
62
62
  warnSoft?: string;
63
63
  fail?: string;
64
64
  failSoft?: string;
65
- /** The sideby mark in the page header. */
65
+ /** Quota bars: normal (the accent by default), running out and used up; `track` is the empty part of a bar. */
66
+ okBar?: string;
67
+ warnBar?: string;
68
+ failBar?: string;
69
+ track?: string;
70
+ /** The sideby mark in the page header; `logoColor` stays the brand blue whatever the Theme unless set. */
66
71
  logoBg?: string;
67
72
  logoColor?: string;
68
73
  logoBorder?: string;
@@ -44,6 +44,10 @@ export const THEME_TOKENS = {
44
44
  warnSoft: '--warn-soft',
45
45
  fail: '--fail',
46
46
  failSoft: '--fail-soft',
47
+ okBar: '--ok-bar',
48
+ warnBar: '--warn-bar',
49
+ failBar: '--fail-bar',
50
+ track: '--track',
47
51
  logoBg: '--logo-bg',
48
52
  logoColor: '--logo-fg',
49
53
  logoBorder: '--logo-line',
@@ -0,0 +1,14 @@
1
+ import type { PanelThemeTokens } from './theme.ts';
2
+ export interface BuiltinTheme {
3
+ id: string;
4
+ name: {
5
+ en: string;
6
+ zh: string;
7
+ };
8
+ /** A few colors for the Theme's card in Settings: page, card, accent tint, main button, dark page. */
9
+ swatches: readonly string[];
10
+ light: PanelThemeTokens;
11
+ dark: PanelThemeTokens;
12
+ }
13
+ export declare const DEFAULT_THEME_ID = "sky";
14
+ export declare const BUILTIN_THEMES: readonly BuiltinTheme[];
@@ -0,0 +1,162 @@
1
+ export const DEFAULT_THEME_ID = 'sky';
2
+ export const BUILTIN_THEMES = [
3
+ {
4
+ id: 'sky',
5
+ name: { en: 'Sky', zh: '晴空' },
6
+ swatches: ['#f2f8fc', '#e5f2fb', '#27658f', '#0e1621'],
7
+ 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',
43
+ },
44
+ 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',
78
+ logoBorder: 'transparent',
79
+ shadow: 'none',
80
+ },
81
+ },
82
+ {
83
+ // Colors: Radix Colors (MIT, https://github.com/radix-ui/colors).
84
+ id: 'leaf',
85
+ name: { en: 'New Leaf', zh: '新叶' },
86
+ swatches: ['#f5fbf5', '#e9f6e9', '#2a7e3b', '#0e1511'],
87
+ 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',
112
+ 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',
123
+ },
124
+ 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',
149
+ warn: '#ffca16',
150
+ warnSoft: '#302008',
151
+ fail: '#ff9592',
152
+ failSoft: '#3b1219',
153
+ okBar: '#30a46c',
154
+ warnBar: '#ffc53d',
155
+ failBar: '#e5484d',
156
+ track: '#282a27',
157
+ logoBg: '#e9f6e9',
158
+ logoBorder: 'transparent',
159
+ shadow: 'none',
160
+ },
161
+ },
162
+ ];
@@ -81,6 +81,8 @@ export interface FamilyInfo {
81
81
  settingsFile?: string;
82
82
  /** Set only for a Main-only Family: sideby knows only its Main Account and creates no other (ADR-0047). */
83
83
  mainOnly?: true;
84
+ /** Hidden from the lists (spec §3.25); set by `sideby list` only, absent when shown. */
85
+ hidden?: true;
84
86
  }
85
87
  /** One Shared Item as `sideby families` reports it (spec §3.16). */
86
88
  export interface SharedItemInfo {
@@ -128,6 +130,8 @@ export interface AccountStatus extends Account {
128
130
  sameLogin?: string[];
129
131
  /** Pinned to the top of its Family (spec §3.25); set by `sideby list` only, absent when not pinned. */
130
132
  pinned?: true;
133
+ /** Hidden from the lists (spec §3.25); set by `sideby list` only, absent when shown. */
134
+ hidden?: true;
131
135
  /** Plugin errors met while reading this Account (for example an unreadable settings file). */
132
136
  problems?: string[];
133
137
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.22.0",
3
+ "version": "0.23.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)",
@@ -26,6 +26,11 @@
26
26
  "zh"
27
27
  ],
28
28
  "description": "Panel language: the browser's (default), English, or Chinese."
29
+ },
30
+ "colorTheme": {
31
+ "type": "string",
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)."
29
34
  }
30
35
  },
31
36
  "additionalProperties": false,
@@ -423,10 +428,33 @@
423
428
  }
424
429
  },
425
430
  "description": "Per family, the names of the accounts pinned to the top of their group, in the order they are shown; they lead the group in every sort. Resetting the order keeps them."
431
+ },
432
+ "hiddenFamilies": {
433
+ "type": "array",
434
+ "items": {
435
+ "type": "string",
436
+ "minLength": 1
437
+ },
438
+ "uniqueItems": true,
439
+ "description": "Family ids hidden from the Panel, the menu bar and `sideby list` (spec §3.25). Display only: they can still be started and picked by a Handoff."
440
+ },
441
+ "hidden": {
442
+ "type": "object",
443
+ "patternProperties": {
444
+ "^.*$": {
445
+ "type": "array",
446
+ "items": {
447
+ "type": "string",
448
+ "minLength": 1
449
+ },
450
+ "uniqueItems": true
451
+ }
452
+ },
453
+ "description": "Per family, the names of the accounts hidden from the Panel, the menu bar and `sideby list`. Display only: they can still be started and picked by a Handoff."
426
454
  }
427
455
  },
428
456
  "additionalProperties": false,
429
- "description": "Display Order (spec §3.25): the order you gave families and accounts in the Panel, and the accounts you pinned. Display only: it never changes which account a Handoff picks."
457
+ "description": "Display Order (spec §3.25): the order you gave families and accounts in the Panel, the accounts you pinned, and what you hid. Display only: it never changes which account a Handoff picks."
430
458
  },
431
459
  "quota": {
432
460
  "type": "object",
@@ -62,6 +62,11 @@
62
62
  "type": "boolean",
63
63
  "const": true,
64
64
  "description": "The Host keeps one sign-in per computer, so sideby knows only its Main Account and refuses to create others (ADR-0047)."
65
+ },
66
+ "hidden": {
67
+ "type": "boolean",
68
+ "const": true,
69
+ "description": "Hidden from the Panel, the menu bar and the text of `sideby list` (spec §3.25). Display only; set by `sideby list`, absent when shown."
65
70
  }
66
71
  }
67
72
  },
@@ -0,0 +1,157 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/hide.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "target",
8
+ "kind",
9
+ "hidden",
10
+ "changed",
11
+ "message",
12
+ "display"
13
+ ],
14
+ "properties": {
15
+ "schemaVersion": {
16
+ "type": "number",
17
+ "const": 1
18
+ },
19
+ "target": {
20
+ "type": "string",
21
+ "description": "The Family id or account ref that was hidden or shown again."
22
+ },
23
+ "kind": {
24
+ "anyOf": [
25
+ {
26
+ "type": "string",
27
+ "const": "family"
28
+ },
29
+ {
30
+ "type": "string",
31
+ "const": "account"
32
+ }
33
+ ]
34
+ },
35
+ "hidden": {
36
+ "type": "boolean"
37
+ },
38
+ "changed": {
39
+ "type": "boolean"
40
+ },
41
+ "message": {
42
+ "type": "string"
43
+ },
44
+ "display": {
45
+ "type": "object",
46
+ "properties": {
47
+ "families": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "accounts": {
54
+ "type": "object",
55
+ "patternProperties": {
56
+ "^.*$": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string"
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "pinned": {
65
+ "type": "object",
66
+ "patternProperties": {
67
+ "^.*$": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "string"
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "hiddenFamilies": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "hidden": {
82
+ "type": "object",
83
+ "patternProperties": {
84
+ "^.*$": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "string"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ },
94
+ "_notice": {
95
+ "type": "object",
96
+ "properties": {
97
+ "update": {
98
+ "type": "object",
99
+ "required": [
100
+ "current",
101
+ "latest",
102
+ "command",
103
+ "message"
104
+ ],
105
+ "properties": {
106
+ "current": {
107
+ "type": "string"
108
+ },
109
+ "latest": {
110
+ "type": "string"
111
+ },
112
+ "command": {
113
+ "type": "string",
114
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
115
+ },
116
+ "message": {
117
+ "type": "string"
118
+ }
119
+ }
120
+ },
121
+ "skill": {
122
+ "type": "object",
123
+ "required": [
124
+ "installed",
125
+ "current",
126
+ "command",
127
+ "message"
128
+ ],
129
+ "properties": {
130
+ "installed": {
131
+ "anyOf": [
132
+ {
133
+ "type": "string"
134
+ },
135
+ {
136
+ "type": "null"
137
+ }
138
+ ],
139
+ "description": "The skill's version; null when it has none."
140
+ },
141
+ "current": {
142
+ "type": "string"
143
+ },
144
+ "command": {
145
+ "type": "string",
146
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
147
+ },
148
+ "message": {
149
+ "type": "string"
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
155
+ }
156
+ }
157
+ }
package/schemas/list.json CHANGED
@@ -62,6 +62,11 @@
62
62
  "type": "boolean",
63
63
  "const": true,
64
64
  "description": "The Host keeps one sign-in per computer, so sideby knows only its Main Account and refuses to create others (ADR-0047)."
65
+ },
66
+ "hidden": {
67
+ "type": "boolean",
68
+ "const": true,
69
+ "description": "Hidden from the Panel, the menu bar and the text of `sideby list` (spec §3.25). Display only; set by `sideby list`, absent when shown."
65
70
  }
66
71
  }
67
72
  }
@@ -174,6 +179,11 @@
174
179
  "const": true,
175
180
  "description": "Pinned to the top of its family in the Panel and `sideby list` (spec §3.25). Display only; absent when not pinned."
176
181
  },
182
+ "hidden": {
183
+ "type": "boolean",
184
+ "const": true,
185
+ "description": "Hidden from the Panel, the menu bar and the text of `sideby list` (spec §3.25). Display only; set by `sideby list`, absent when shown."
186
+ },
177
187
  "problems": {
178
188
  "type": "array",
179
189
  "items": {