@phenx-inc/ctlsurf 0.14.2 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/THIRD-PARTY-NOTICES.md +82 -0
  2. package/out/headless/index.mjs +91 -72
  3. package/out/headless/index.mjs.map +3 -3
  4. package/out/main/index.js +117 -72
  5. package/out/preload/index.js +6 -1
  6. package/out/renderer/assets/{cssMode-bQYoCKra.js → cssMode-B77M9HlN.js} +3 -3
  7. package/out/renderer/assets/{freemarker2-BS1ERQl_.js → freemarker2-oUT2zvyQ.js} +1 -1
  8. package/out/renderer/assets/{handlebars-B-ZEHRLr.js → handlebars-jCckoi5j.js} +1 -1
  9. package/out/renderer/assets/{html-lk9e1Lkl.js → html-kAgrAaKW.js} +1 -1
  10. package/out/renderer/assets/{htmlMode-Ds1eMYgM.js → htmlMode-DIWkIawy.js} +3 -3
  11. package/out/renderer/assets/{index-BpCORklm.css → index-3sFJEz7i.css} +787 -399
  12. package/out/renderer/assets/{index-BJNR4hRK.js → index-CN3UN7Tm.js} +431 -104
  13. package/out/renderer/assets/{javascript-D6OeziKX.js → javascript-B9GYUE-I.js} +2 -2
  14. package/out/renderer/assets/{jsonMode-t5SESE75.js → jsonMode-BzFKTZjJ.js} +3 -3
  15. package/out/renderer/assets/{liquid-B5Wjh0p_.js → liquid-Ccw-S_Y6.js} +1 -1
  16. package/out/renderer/assets/{lspLanguageFeatures-BEgiDCIW.js → lspLanguageFeatures-BE0g7ubH.js} +1 -1
  17. package/out/renderer/assets/{mdx-ByNAXh8t.js → mdx-oXeAA0qU.js} +1 -1
  18. package/out/renderer/assets/{python-CIFO0XQW.js → python-DlSX3TvA.js} +1 -1
  19. package/out/renderer/assets/{razor-LXHhGcNO.js → razor-ButO9S7r.js} +1 -1
  20. package/out/renderer/assets/{tsMode-WiO8CDaI.js → tsMode-CTCpE-67.js} +1 -1
  21. package/out/renderer/assets/{typescript-ZBQlq256.js → typescript-9o62WOnS.js} +1 -1
  22. package/out/renderer/assets/{xml-DBaLJlQU.js → xml-C4nOH2_D.js} +1 -1
  23. package/out/renderer/assets/{yaml-CId9skah.js → yaml-mXYgKoWW.js} +1 -1
  24. package/out/renderer/index.html +60 -3
  25. package/package.json +5 -4
  26. package/src/main/index.ts +54 -3
  27. package/src/main/orchestrator.ts +10 -2
  28. package/src/main/ticketStore.ts +100 -66
  29. package/src/preload/index.ts +13 -3
  30. package/src/renderer/App.tsx +4 -2
  31. package/src/renderer/components/CtlsurfPanel.tsx +1 -1
  32. package/src/renderer/components/EditorPanel.tsx +29 -1
  33. package/src/renderer/components/ObserverPanel.tsx +13 -6
  34. package/src/renderer/components/SettingsDialog.tsx +82 -0
  35. package/src/renderer/components/TerminalPanel.tsx +12 -22
  36. package/src/renderer/components/TicketPanel.tsx +33 -15
  37. package/src/renderer/index.html +58 -1
  38. package/src/renderer/lib/theme.ts +173 -0
  39. package/src/renderer/lib/themes.ts +126 -0
  40. package/src/renderer/styles.css +787 -399
@@ -0,0 +1,126 @@
1
+ // The theme registry.
2
+ //
3
+ // Palette values are transcribed from each project's published palette spec —
4
+ // no upstream code is copied. Scheme names identify which palette a theme
5
+ // reproduces; see THIRD-PARTY-NOTICES.md for licences and attribution.
6
+ //
7
+ // Each entry owns everything that can't be reached from CSS: the xterm palette
8
+ // (canvas, not DOM), the Monaco override colours, and the swatch shown in the
9
+ // picker. The chrome colours themselves live in styles.css, under a
10
+ // `:root[data-theme='<id>']` block keyed by the ids below — the two must stay
11
+ // in step, which is why `id` is the single source of truth for both.
12
+
13
+ export type ThemeMode = 'light' | 'dark'
14
+
15
+ // Structural subset of xterm's ITheme. Declared locally so this module stays
16
+ // importable from places that don't depend on xterm (the Settings dialog).
17
+ export interface XtermPalette {
18
+ background: string
19
+ foreground: string
20
+ cursor: string
21
+ selectionBackground: string
22
+ black: string; red: string; green: string; yellow: string
23
+ blue: string; magenta: string; cyan: string; white: string
24
+ brightBlack: string; brightRed: string; brightGreen: string; brightYellow: string
25
+ brightBlue: string; brightMagenta: string; brightCyan: string; brightWhite: string
26
+ }
27
+
28
+ export interface ThemeDef {
29
+ id: string
30
+ name: string
31
+ family: string
32
+ mode: ThemeMode
33
+ // Preview tile in Settings — drawn from literal values, because a swatch has
34
+ // to show its own palette rather than the active one.
35
+ swatch: { bg: string; surface: string; accent: string; text: string }
36
+ // Painted by Electron before the renderer loads, so it must match --bg-app.
37
+ background: string
38
+ terminal: XtermPalette
39
+ // Monaco ships only 'vs' / 'vs-dark'; these ride on top so the editor at
40
+ // least shares the scheme's background and gutter rather than clashing.
41
+ editor: { base: 'vs' | 'vs-dark'; background: string; foreground: string; lineHighlight: string; selection: string }
42
+ }
43
+
44
+ export const THEMES: ThemeDef[] = [
45
+ {
46
+ id: 'tokyo-night',
47
+ name: 'Tokyo Night',
48
+ family: 'Tokyo Night',
49
+ mode: 'dark',
50
+ swatch: { bg: '#1a1b26', surface: '#2a2b3d', accent: '#7aa2f7', text: '#a9b1d6' },
51
+ background: '#1a1b26',
52
+ terminal: {
53
+ background: '#1a1b26', foreground: '#a9b1d6', cursor: '#c0caf5', selectionBackground: '#33467c',
54
+ black: '#15161e', red: '#f7768e', green: '#9ece6a', yellow: '#e0af68',
55
+ blue: '#7aa2f7', magenta: '#bb9af7', cyan: '#7dcfff', white: '#a9b1d6',
56
+ brightBlack: '#414868', brightRed: '#f7768e', brightGreen: '#9ece6a', brightYellow: '#e0af68',
57
+ brightBlue: '#7aa2f7', brightMagenta: '#bb9af7', brightCyan: '#7dcfff', brightWhite: '#c0caf5',
58
+ },
59
+ editor: { base: 'vs-dark', background: '#1a1b26', foreground: '#a9b1d6', lineHighlight: '#1f2335', selection: '#33467c' },
60
+ },
61
+ {
62
+ id: 'tokyo-day',
63
+ name: 'Tokyo Night Day',
64
+ family: 'Tokyo Night',
65
+ mode: 'light',
66
+ swatch: { bg: '#e9eaef', surface: '#d4d7e2', accent: '#2e7de9', text: '#3a4060' },
67
+ background: '#e9eaef',
68
+ terminal: {
69
+ background: '#e9eaef', foreground: '#3760bf', cursor: '#3760bf', selectionBackground: '#b6c8f0',
70
+ black: '#b4b5b9', red: '#c64343', green: '#587539', yellow: '#8c6c3e',
71
+ blue: '#2e7de9', magenta: '#9854f1', cyan: '#007197', white: '#6172b0',
72
+ // Deliberately darker than `black`: remote TUIs use bright-black for dim
73
+ // text, which would vanish on a light background otherwise.
74
+ brightBlack: '#8990ad', brightRed: '#f52a65', brightGreen: '#4d7a1f', brightYellow: '#8f5e15',
75
+ brightBlue: '#1a68d6', brightMagenta: '#7847d1', brightCyan: '#006594', brightWhite: '#3760bf',
76
+ },
77
+ editor: { base: 'vs', background: '#e9eaef', foreground: '#3760bf', lineHighlight: '#dfe1e8', selection: '#b6c8f0' },
78
+ },
79
+ {
80
+ id: 'catppuccin-mocha',
81
+ name: 'Catppuccin Mocha',
82
+ family: 'Catppuccin',
83
+ mode: 'dark',
84
+ swatch: { bg: '#1e1e2e', surface: '#313244', accent: '#89b4fa', text: '#cdd6f4' },
85
+ background: '#1e1e2e',
86
+ terminal: {
87
+ background: '#1e1e2e', foreground: '#cdd6f4', cursor: '#f5e0dc', selectionBackground: '#45475a',
88
+ black: '#45475a', red: '#f38ba8', green: '#a6e3a1', yellow: '#f9e2af',
89
+ blue: '#89b4fa', magenta: '#f5c2e7', cyan: '#94e2d5', white: '#bac2de',
90
+ brightBlack: '#585b70', brightRed: '#f38ba8', brightGreen: '#a6e3a1', brightYellow: '#f9e2af',
91
+ brightBlue: '#89b4fa', brightMagenta: '#f5c2e7', brightCyan: '#94e2d5', brightWhite: '#a6adc8',
92
+ },
93
+ editor: { base: 'vs-dark', background: '#1e1e2e', foreground: '#cdd6f4', lineHighlight: '#272739', selection: '#45475a' },
94
+ },
95
+ {
96
+ id: 'catppuccin-latte',
97
+ name: 'Catppuccin Latte',
98
+ family: 'Catppuccin',
99
+ mode: 'light',
100
+ swatch: { bg: '#eff1f5', surface: '#ccd0da', accent: '#1e66f5', text: '#4c4f69' },
101
+ background: '#eff1f5',
102
+ terminal: {
103
+ background: '#eff1f5', foreground: '#4c4f69', cursor: '#dc8a78', selectionBackground: '#bcc0cc',
104
+ black: '#5c5f77', red: '#d20f39', green: '#40a02b', yellow: '#df8e1d',
105
+ blue: '#1e66f5', magenta: '#ea76cb', cyan: '#179299', white: '#acb0be',
106
+ brightBlack: '#6c6f85', brightRed: '#de293e', brightGreen: '#49af3d', brightYellow: '#eea416',
107
+ brightBlue: '#456eff', brightMagenta: '#dd63bd', brightCyan: '#2d9fa8', brightWhite: '#8c8fa1',
108
+ },
109
+ editor: { base: 'vs', background: '#eff1f5', foreground: '#4c4f69', lineHighlight: '#e6e9ef', selection: '#bcc0cc' },
110
+ },
111
+ ]
112
+
113
+ export const DEFAULT_DARK = 'tokyo-night'
114
+ export const DEFAULT_LIGHT = 'tokyo-day'
115
+
116
+ const byId = new Map(THEMES.map(t => [t.id, t]))
117
+
118
+ export function getTheme(id: string | null | undefined): ThemeDef {
119
+ return (id && byId.get(id)) || byId.get(DEFAULT_DARK)!
120
+ }
121
+
122
+ export function isThemeId(v: unknown): v is string {
123
+ return typeof v === 'string' && byId.has(v)
124
+ }
125
+
126
+ export const themesByMode = (mode: ThemeMode): ThemeDef[] => THEMES.filter(t => t.mode === mode)