@phenx-inc/ctlsurf 0.14.1 → 0.15.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 (40) hide show
  1. package/README.md +36 -0
  2. package/THIRD-PARTY-NOTICES.md +82 -0
  3. package/out/headless/index.mjs +13 -3
  4. package/out/headless/index.mjs.map +2 -2
  5. package/out/main/index.js +27 -0
  6. package/out/preload/index.js +5 -0
  7. package/out/renderer/assets/{cssMode-bQYoCKra.js → cssMode-CJR4iD-G.js} +3 -3
  8. package/out/renderer/assets/{freemarker2-BS1ERQl_.js → freemarker2-BRI9ISq9.js} +1 -1
  9. package/out/renderer/assets/{handlebars-B-ZEHRLr.js → handlebars-3hL6XIZI.js} +1 -1
  10. package/out/renderer/assets/{html-lk9e1Lkl.js → html-Dd5_vBoP.js} +1 -1
  11. package/out/renderer/assets/{htmlMode-Ds1eMYgM.js → htmlMode-DgNtlKcG.js} +3 -3
  12. package/out/renderer/assets/{index-BpCORklm.css → index-3sFJEz7i.css} +787 -399
  13. package/out/renderer/assets/{index-BJNR4hRK.js → index-5azC4yNn.js} +421 -99
  14. package/out/renderer/assets/{javascript-D6OeziKX.js → javascript-D0vPLEJg.js} +2 -2
  15. package/out/renderer/assets/{jsonMode-t5SESE75.js → jsonMode-DBvR0zMu.js} +3 -3
  16. package/out/renderer/assets/{liquid-B5Wjh0p_.js → liquid-CLoc6Tx7.js} +1 -1
  17. package/out/renderer/assets/{lspLanguageFeatures-BEgiDCIW.js → lspLanguageFeatures-CiaMaQoY.js} +1 -1
  18. package/out/renderer/assets/{mdx-ByNAXh8t.js → mdx-DTsq6tlv.js} +1 -1
  19. package/out/renderer/assets/{python-CIFO0XQW.js → python-D04DpZDr.js} +1 -1
  20. package/out/renderer/assets/{razor-LXHhGcNO.js → razor-Di6CJ6s8.js} +1 -1
  21. package/out/renderer/assets/{tsMode-WiO8CDaI.js → tsMode-mfv6mHOv.js} +1 -1
  22. package/out/renderer/assets/{typescript-ZBQlq256.js → typescript-CDA0Hhef.js} +1 -1
  23. package/out/renderer/assets/{xml-DBaLJlQU.js → xml-BU0voRuq.js} +1 -1
  24. package/out/renderer/assets/{yaml-CId9skah.js → yaml-qzFWnaZJ.js} +1 -1
  25. package/out/renderer/index.html +60 -3
  26. package/package.json +13 -3
  27. package/src/main/index.ts +52 -1
  28. package/src/main/orchestrator.ts +8 -0
  29. package/src/preload/index.ts +10 -0
  30. package/src/renderer/App.tsx +2 -0
  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 +17 -10
  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
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cssMode-bQYoCKra.js","./lspLanguageFeatures-BEgiDCIW.js","./htmlMode-Ds1eMYgM.js","./jsonMode-t5SESE75.js","./javascript-D6OeziKX.js","./typescript-ZBQlq256.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cssMode-CJR4iD-G.js","./lspLanguageFeatures-CiaMaQoY.js","./htmlMode-DgNtlKcG.js","./jsonMode-DBvR0zMu.js","./javascript-D0vPLEJg.js","./typescript-CDA0Hhef.js"])))=>i.map(i=>d[i]);
2
2
  function getDefaultExportFromCjs(x) {
3
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
4
  }
@@ -3129,15 +3129,15 @@ function requireReactDomClient_production() {
3129
3129
  return value;
3130
3130
  }
3131
3131
  var AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
3132
- var listeners = [], signal = this.signal = {
3132
+ var listeners2 = [], signal = this.signal = {
3133
3133
  aborted: false,
3134
3134
  addEventListener: function(type, listener) {
3135
- listeners.push(listener);
3135
+ listeners2.push(listener);
3136
3136
  }
3137
3137
  };
3138
3138
  this.abort = function() {
3139
3139
  signal.aborted = true;
3140
- listeners.forEach(function(listener) {
3140
+ listeners2.forEach(function(listener) {
3141
3141
  return listener();
3142
3142
  });
3143
3143
  };
@@ -3183,33 +3183,33 @@ function requireReactDomClient_production() {
3183
3183
  function pingEngtangledActionScope() {
3184
3184
  if (0 === --currentEntangledPendingCount && null !== currentEntangledListeners) {
3185
3185
  null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
3186
- var listeners = currentEntangledListeners;
3186
+ var listeners2 = currentEntangledListeners;
3187
3187
  currentEntangledListeners = null;
3188
3188
  currentEntangledLane = 0;
3189
3189
  currentEntangledActionThenable = null;
3190
- for (var i2 = 0; i2 < listeners.length; i2++) (0, listeners[i2])();
3190
+ for (var i2 = 0; i2 < listeners2.length; i2++) (0, listeners2[i2])();
3191
3191
  }
3192
3192
  }
3193
3193
  function chainThenableValue(thenable, result) {
3194
- var listeners = [], thenableWithOverride = {
3194
+ var listeners2 = [], thenableWithOverride = {
3195
3195
  status: "pending",
3196
3196
  value: null,
3197
3197
  reason: null,
3198
3198
  then: function(resolve2) {
3199
- listeners.push(resolve2);
3199
+ listeners2.push(resolve2);
3200
3200
  }
3201
3201
  };
3202
3202
  thenable.then(
3203
3203
  function() {
3204
3204
  thenableWithOverride.status = "fulfilled";
3205
3205
  thenableWithOverride.value = result;
3206
- for (var i2 = 0; i2 < listeners.length; i2++) (0, listeners[i2])(result);
3206
+ for (var i2 = 0; i2 < listeners2.length; i2++) (0, listeners2[i2])(result);
3207
3207
  },
3208
3208
  function(error) {
3209
3209
  thenableWithOverride.status = "rejected";
3210
3210
  thenableWithOverride.reason = error;
3211
- for (error = 0; error < listeners.length; error++)
3212
- (0, listeners[error])(void 0);
3211
+ for (error = 0; error < listeners2.length; error++)
3212
+ (0, listeners2[error])(void 0);
3213
3213
  }
3214
3214
  );
3215
3215
  return thenableWithOverride;
@@ -10150,15 +10150,15 @@ function requireReactDomClient_production() {
10150
10150
  };
10151
10151
  }
10152
10152
  function accumulateTwoPhaseListeners(targetFiber, reactName) {
10153
- for (var captureName = reactName + "Capture", listeners = []; null !== targetFiber; ) {
10153
+ for (var captureName = reactName + "Capture", listeners2 = []; null !== targetFiber; ) {
10154
10154
  var _instance2 = targetFiber, stateNode = _instance2.stateNode;
10155
10155
  _instance2 = _instance2.tag;
10156
- 5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2 || null === stateNode || (_instance2 = getListener(targetFiber, captureName), null != _instance2 && listeners.unshift(
10156
+ 5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2 || null === stateNode || (_instance2 = getListener(targetFiber, captureName), null != _instance2 && listeners2.unshift(
10157
10157
  createDispatchListener(targetFiber, _instance2, stateNode)
10158
- ), _instance2 = getListener(targetFiber, reactName), null != _instance2 && listeners.push(
10158
+ ), _instance2 = getListener(targetFiber, reactName), null != _instance2 && listeners2.push(
10159
10159
  createDispatchListener(targetFiber, _instance2, stateNode)
10160
10160
  ));
10161
- if (3 === targetFiber.tag) return listeners;
10161
+ if (3 === targetFiber.tag) return listeners2;
10162
10162
  targetFiber = targetFiber.return;
10163
10163
  }
10164
10164
  return [];
@@ -10171,18 +10171,18 @@ function requireReactDomClient_production() {
10171
10171
  return inst ? inst : null;
10172
10172
  }
10173
10173
  function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
10174
- for (var registrationName = event._reactName, listeners = []; null !== target && target !== common; ) {
10174
+ for (var registrationName = event._reactName, listeners2 = []; null !== target && target !== common; ) {
10175
10175
  var _instance3 = target, alternate = _instance3.alternate, stateNode = _instance3.stateNode;
10176
10176
  _instance3 = _instance3.tag;
10177
10177
  if (null !== alternate && alternate === common) break;
10178
- 5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3 || null === stateNode || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), null != stateNode && listeners.unshift(
10178
+ 5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3 || null === stateNode || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), null != stateNode && listeners2.unshift(
10179
10179
  createDispatchListener(target, stateNode, alternate)
10180
- )) : inCapturePhase || (stateNode = getListener(target, registrationName), null != stateNode && listeners.push(
10180
+ )) : inCapturePhase || (stateNode = getListener(target, registrationName), null != stateNode && listeners2.push(
10181
10181
  createDispatchListener(target, stateNode, alternate)
10182
10182
  )));
10183
10183
  target = target.return;
10184
10184
  }
10185
- 0 !== listeners.length && dispatchQueue.push({ event, listeners });
10185
+ 0 !== listeners2.length && dispatchQueue.push({ event, listeners: listeners2 });
10186
10186
  }
10187
10187
  var NORMALIZE_NEWLINES_REGEX = /\r\n?/g, NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
10188
10188
  function normalizeMarkupForTextOrAttribute(markup) {
@@ -19184,6 +19184,250 @@ class SpeechController {
19184
19184
  }
19185
19185
  }
19186
19186
  const speech = new SpeechController();
19187
+ const THEMES = [
19188
+ {
19189
+ id: "tokyo-night",
19190
+ name: "Tokyo Night",
19191
+ family: "Tokyo Night",
19192
+ mode: "dark",
19193
+ swatch: { bg: "#1a1b26", surface: "#2a2b3d", accent: "#7aa2f7", text: "#a9b1d6" },
19194
+ background: "#1a1b26",
19195
+ terminal: {
19196
+ background: "#1a1b26",
19197
+ foreground: "#a9b1d6",
19198
+ cursor: "#c0caf5",
19199
+ selectionBackground: "#33467c",
19200
+ black: "#15161e",
19201
+ red: "#f7768e",
19202
+ green: "#9ece6a",
19203
+ yellow: "#e0af68",
19204
+ blue: "#7aa2f7",
19205
+ magenta: "#bb9af7",
19206
+ cyan: "#7dcfff",
19207
+ white: "#a9b1d6",
19208
+ brightBlack: "#414868",
19209
+ brightRed: "#f7768e",
19210
+ brightGreen: "#9ece6a",
19211
+ brightYellow: "#e0af68",
19212
+ brightBlue: "#7aa2f7",
19213
+ brightMagenta: "#bb9af7",
19214
+ brightCyan: "#7dcfff",
19215
+ brightWhite: "#c0caf5"
19216
+ },
19217
+ editor: { base: "vs-dark", background: "#1a1b26", foreground: "#a9b1d6", lineHighlight: "#1f2335", selection: "#33467c" }
19218
+ },
19219
+ {
19220
+ id: "tokyo-day",
19221
+ name: "Tokyo Night Day",
19222
+ family: "Tokyo Night",
19223
+ mode: "light",
19224
+ swatch: { bg: "#e9eaef", surface: "#d4d7e2", accent: "#2e7de9", text: "#3a4060" },
19225
+ background: "#e9eaef",
19226
+ terminal: {
19227
+ background: "#e9eaef",
19228
+ foreground: "#3760bf",
19229
+ cursor: "#3760bf",
19230
+ selectionBackground: "#b6c8f0",
19231
+ black: "#b4b5b9",
19232
+ red: "#c64343",
19233
+ green: "#587539",
19234
+ yellow: "#8c6c3e",
19235
+ blue: "#2e7de9",
19236
+ magenta: "#9854f1",
19237
+ cyan: "#007197",
19238
+ white: "#6172b0",
19239
+ // Deliberately darker than `black`: remote TUIs use bright-black for dim
19240
+ // text, which would vanish on a light background otherwise.
19241
+ brightBlack: "#8990ad",
19242
+ brightRed: "#f52a65",
19243
+ brightGreen: "#4d7a1f",
19244
+ brightYellow: "#8f5e15",
19245
+ brightBlue: "#1a68d6",
19246
+ brightMagenta: "#7847d1",
19247
+ brightCyan: "#006594",
19248
+ brightWhite: "#3760bf"
19249
+ },
19250
+ editor: { base: "vs", background: "#e9eaef", foreground: "#3760bf", lineHighlight: "#dfe1e8", selection: "#b6c8f0" }
19251
+ },
19252
+ {
19253
+ id: "catppuccin-mocha",
19254
+ name: "Catppuccin Mocha",
19255
+ family: "Catppuccin",
19256
+ mode: "dark",
19257
+ swatch: { bg: "#1e1e2e", surface: "#313244", accent: "#89b4fa", text: "#cdd6f4" },
19258
+ background: "#1e1e2e",
19259
+ terminal: {
19260
+ background: "#1e1e2e",
19261
+ foreground: "#cdd6f4",
19262
+ cursor: "#f5e0dc",
19263
+ selectionBackground: "#45475a",
19264
+ black: "#45475a",
19265
+ red: "#f38ba8",
19266
+ green: "#a6e3a1",
19267
+ yellow: "#f9e2af",
19268
+ blue: "#89b4fa",
19269
+ magenta: "#f5c2e7",
19270
+ cyan: "#94e2d5",
19271
+ white: "#bac2de",
19272
+ brightBlack: "#585b70",
19273
+ brightRed: "#f38ba8",
19274
+ brightGreen: "#a6e3a1",
19275
+ brightYellow: "#f9e2af",
19276
+ brightBlue: "#89b4fa",
19277
+ brightMagenta: "#f5c2e7",
19278
+ brightCyan: "#94e2d5",
19279
+ brightWhite: "#a6adc8"
19280
+ },
19281
+ editor: { base: "vs-dark", background: "#1e1e2e", foreground: "#cdd6f4", lineHighlight: "#272739", selection: "#45475a" }
19282
+ },
19283
+ {
19284
+ id: "catppuccin-latte",
19285
+ name: "Catppuccin Latte",
19286
+ family: "Catppuccin",
19287
+ mode: "light",
19288
+ swatch: { bg: "#eff1f5", surface: "#ccd0da", accent: "#1e66f5", text: "#4c4f69" },
19289
+ background: "#eff1f5",
19290
+ terminal: {
19291
+ background: "#eff1f5",
19292
+ foreground: "#4c4f69",
19293
+ cursor: "#dc8a78",
19294
+ selectionBackground: "#bcc0cc",
19295
+ black: "#5c5f77",
19296
+ red: "#d20f39",
19297
+ green: "#40a02b",
19298
+ yellow: "#df8e1d",
19299
+ blue: "#1e66f5",
19300
+ magenta: "#ea76cb",
19301
+ cyan: "#179299",
19302
+ white: "#acb0be",
19303
+ brightBlack: "#6c6f85",
19304
+ brightRed: "#de293e",
19305
+ brightGreen: "#49af3d",
19306
+ brightYellow: "#eea416",
19307
+ brightBlue: "#456eff",
19308
+ brightMagenta: "#dd63bd",
19309
+ brightCyan: "#2d9fa8",
19310
+ brightWhite: "#8c8fa1"
19311
+ },
19312
+ editor: { base: "vs", background: "#eff1f5", foreground: "#4c4f69", lineHighlight: "#e6e9ef", selection: "#bcc0cc" }
19313
+ }
19314
+ ];
19315
+ const DEFAULT_DARK = "tokyo-night";
19316
+ const DEFAULT_LIGHT = "tokyo-day";
19317
+ const byId = new Map(THEMES.map((t) => [t.id, t]));
19318
+ function getTheme(id) {
19319
+ return id && byId.get(id) || byId.get(DEFAULT_DARK);
19320
+ }
19321
+ function isThemeId(v2) {
19322
+ return typeof v2 === "string" && byId.has(v2);
19323
+ }
19324
+ const themesByMode = (mode) => THEMES.filter((t) => t.mode === mode);
19325
+ const KEY = "ctlsurf.appearance";
19326
+ const LEGACY_KEY = "ctlsurf.theme";
19327
+ const DEFAULT_APPEARANCE = {
19328
+ sync: true,
19329
+ theme: DEFAULT_DARK,
19330
+ light: DEFAULT_LIGHT,
19331
+ dark: DEFAULT_DARK
19332
+ };
19333
+ function coerce(raw) {
19334
+ if (!raw || typeof raw !== "object") return null;
19335
+ const o = raw;
19336
+ return {
19337
+ sync: o.sync !== false,
19338
+ theme: isThemeId(o.theme) ? o.theme : DEFAULT_APPEARANCE.theme,
19339
+ light: isThemeId(o.light) ? o.light : DEFAULT_APPEARANCE.light,
19340
+ dark: isThemeId(o.dark) ? o.dark : DEFAULT_APPEARANCE.dark
19341
+ };
19342
+ }
19343
+ function stored() {
19344
+ try {
19345
+ const raw = localStorage.getItem(KEY);
19346
+ if (raw) return coerce(JSON.parse(raw));
19347
+ const legacy = localStorage.getItem(LEGACY_KEY);
19348
+ if (legacy === "light") return { ...DEFAULT_APPEARANCE, sync: false, theme: DEFAULT_LIGHT };
19349
+ if (legacy === "dark") return { ...DEFAULT_APPEARANCE, sync: false, theme: DEFAULT_DARK };
19350
+ if (legacy === "system") return { ...DEFAULT_APPEARANCE };
19351
+ } catch {
19352
+ }
19353
+ return null;
19354
+ }
19355
+ function getAppearance() {
19356
+ return stored() ?? { ...DEFAULT_APPEARANCE };
19357
+ }
19358
+ const darkQuery = () => typeof window.matchMedia === "function" ? window.matchMedia("(prefers-color-scheme: dark)") : null;
19359
+ function prefersDark() {
19360
+ return darkQuery()?.matches !== false;
19361
+ }
19362
+ function resolveThemeId(a = getAppearance()) {
19363
+ if (!a.sync) return a.theme;
19364
+ return prefersDark() ? a.dark : a.light;
19365
+ }
19366
+ const listeners = /* @__PURE__ */ new Set();
19367
+ function subscribeTheme(fn) {
19368
+ listeners.add(fn);
19369
+ return () => {
19370
+ listeners.delete(fn);
19371
+ };
19372
+ }
19373
+ function currentTheme() {
19374
+ return getTheme(resolveThemeId());
19375
+ }
19376
+ function applyDom() {
19377
+ const theme = currentTheme();
19378
+ document.documentElement.setAttribute("data-theme", theme.id);
19379
+ for (const fn of listeners) fn(theme);
19380
+ return theme;
19381
+ }
19382
+ function syncNative(a) {
19383
+ const theme = getTheme(resolveThemeId(a));
19384
+ void window.worker?.setAppearance?.({
19385
+ pref: a,
19386
+ source: a.sync ? "system" : theme.mode,
19387
+ background: theme.background
19388
+ }).catch(() => {
19389
+ });
19390
+ }
19391
+ function setAppearance(next) {
19392
+ try {
19393
+ localStorage.setItem(KEY, JSON.stringify(next));
19394
+ } catch {
19395
+ }
19396
+ syncNative(next);
19397
+ return applyDom();
19398
+ }
19399
+ function updateAppearance(patch) {
19400
+ return setAppearance({ ...getAppearance(), ...patch });
19401
+ }
19402
+ darkQuery()?.addEventListener("change", () => {
19403
+ const a = getAppearance();
19404
+ if (a.sync) {
19405
+ applyDom();
19406
+ syncNative(a);
19407
+ }
19408
+ });
19409
+ applyDom();
19410
+ if (stored() === null) {
19411
+ const restore = window.worker?.getAppearance?.();
19412
+ if (restore) {
19413
+ void restore.then((r) => {
19414
+ const recovered = coerce(r?.pref);
19415
+ if (recovered && stored() === null) setAppearance(recovered);
19416
+ }).catch(() => {
19417
+ });
19418
+ }
19419
+ } else {
19420
+ syncNative(getAppearance());
19421
+ }
19422
+ function useAppearance() {
19423
+ const [appearance, setState2] = reactExports.useState(getAppearance);
19424
+ const [theme, setTheme2] = reactExports.useState(currentTheme);
19425
+ reactExports.useEffect(() => subscribeTheme((t) => {
19426
+ setTheme2(t);
19427
+ setState2(getAppearance());
19428
+ }), []);
19429
+ return { appearance, theme, update: updateAppearance };
19430
+ }
19187
19431
  function showTerminalToast(message) {
19188
19432
  window.dispatchEvent(new CustomEvent("terminal-toast", { detail: { message } }));
19189
19433
  }
@@ -19246,6 +19490,11 @@ function handleTerminalLink(_event, uri) {
19246
19490
  window.worker.getEmbedUrl(uri).then((embedUrl) => openInPanel(embedUrl || uri)).catch(() => openInPanel(uri));
19247
19491
  }
19248
19492
  const _terminals = /* @__PURE__ */ new Map();
19493
+ subscribeTheme((theme) => {
19494
+ for (const state of _terminals.values()) {
19495
+ state.terminal.options.theme = theme.terminal;
19496
+ }
19497
+ });
19249
19498
  function isAtBottom(terminal) {
19250
19499
  const buf = terminal.buffer.active;
19251
19500
  return buf.baseY - buf.viewportY <= 2;
@@ -19294,28 +19543,7 @@ function getOrCreateTerminal(tabId, onExit) {
19294
19543
  macOptionClickForcesSelection: true,
19295
19544
  fontSize: 14,
19296
19545
  fontFamily: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace",
19297
- theme: {
19298
- background: "#1a1b26",
19299
- foreground: "#a9b1d6",
19300
- cursor: "#c0caf5",
19301
- selectionBackground: "#33467C",
19302
- black: "#15161e",
19303
- red: "#f7768e",
19304
- green: "#9ece6a",
19305
- yellow: "#e0af68",
19306
- blue: "#7aa2f7",
19307
- magenta: "#bb9af7",
19308
- cyan: "#7dcfff",
19309
- white: "#a9b1d6",
19310
- brightBlack: "#414868",
19311
- brightRed: "#f7768e",
19312
- brightGreen: "#9ece6a",
19313
- brightYellow: "#e0af68",
19314
- brightBlue: "#7aa2f7",
19315
- brightMagenta: "#bb9af7",
19316
- brightCyan: "#7dcfff",
19317
- brightWhite: "#c0caf5"
19318
- },
19546
+ theme: currentTheme().terminal,
19319
19547
  scrollback: 1e4,
19320
19548
  scrollOnUserInput: true,
19321
19549
  allowTransparency: false
@@ -20635,7 +20863,7 @@ function CtlsurfPanel({ navigate }) {
20635
20863
  allowpopups: "true"
20636
20864
  },
20637
20865
  key
20638
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ctlsurf-webview-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#565f89", fontSize: "13px" }, children: "Loading ctlsurf..." }) }) })
20866
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ctlsurf-webview-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "var(--text-muted)", fontSize: "13px" }, children: "Loading ctlsurf..." }) }) })
20639
20867
  ] });
20640
20868
  }
20641
20869
  function _arrayLikeToArray(r, a) {
@@ -23610,8 +23838,8 @@ let Emitter$1 = class Emitter {
23610
23838
  this._size = 0;
23611
23839
  return;
23612
23840
  }
23613
- const listeners = this._listeners;
23614
- const index2 = listeners.indexOf(listener);
23841
+ const listeners2 = this._listeners;
23842
+ const index2 = listeners2.indexOf(listener);
23615
23843
  if (index2 === -1) {
23616
23844
  console.log("disposed?", this._disposed);
23617
23845
  console.log("size?", this._size);
@@ -23619,13 +23847,13 @@ let Emitter$1 = class Emitter {
23619
23847
  throw new Error("Attempted to dispose unknown listener");
23620
23848
  }
23621
23849
  this._size--;
23622
- listeners[index2] = void 0;
23850
+ listeners2[index2] = void 0;
23623
23851
  const adjustDeliveryQueue = this._deliveryQueue.current === this;
23624
- if (this._size * compactionThreshold <= listeners.length) {
23852
+ if (this._size * compactionThreshold <= listeners2.length) {
23625
23853
  let n2 = 0;
23626
- for (let i2 = 0; i2 < listeners.length; i2++) {
23627
- if (listeners[i2]) {
23628
- listeners[n2++] = listeners[i2];
23854
+ for (let i2 = 0; i2 < listeners2.length; i2++) {
23855
+ if (listeners2[i2]) {
23856
+ listeners2[n2++] = listeners2[i2];
23629
23857
  } else if (adjustDeliveryQueue && n2 < this._deliveryQueue.end) {
23630
23858
  this._deliveryQueue.end--;
23631
23859
  if (n2 < this._deliveryQueue.i) {
@@ -23633,7 +23861,7 @@ let Emitter$1 = class Emitter {
23633
23861
  }
23634
23862
  }
23635
23863
  }
23636
- listeners.length = n2;
23864
+ listeners2.length = n2;
23637
23865
  }
23638
23866
  }
23639
23867
  _deliver(listener, value) {
@@ -23653,9 +23881,9 @@ let Emitter$1 = class Emitter {
23653
23881
  }
23654
23882
  /** Delivers items in the queue. Assumes the queue is ready to go. */
23655
23883
  _deliverQueue(dq) {
23656
- const listeners = dq.current._listeners;
23884
+ const listeners2 = dq.current._listeners;
23657
23885
  while (dq.i < dq.end) {
23658
- this._deliver(listeners[dq.i++], dq.value);
23886
+ this._deliver(listeners2[dq.i++], dq.value);
23659
23887
  }
23660
23888
  dq.reset();
23661
23889
  }
@@ -70601,9 +70829,9 @@ class ObjectCollectionBuffer extends Disposable$1 {
70601
70829
  }
70602
70830
  const value = new ObjectCollectionBufferEntry(this.view, this._propertySpecsMap, this._dirtyTracker, this._entries.size, data);
70603
70831
  const removeFromEntries = this._entries.push(value);
70604
- const listeners = [];
70605
- listeners.push(Event$1.forward(value.onDidChange, this._onDidChange));
70606
- listeners.push(value.onWillDispose(() => {
70832
+ const listeners2 = [];
70833
+ listeners2.push(Event$1.forward(value.onDidChange, this._onDidChange));
70834
+ listeners2.push(value.onWillDispose(() => {
70607
70835
  const deletedEntryIndex = value.i;
70608
70836
  removeFromEntries();
70609
70837
  this.view.set(this.view.subarray(deletedEntryIndex * this._entrySize + 2, this._entries.size * this._entrySize + 2), deletedEntryIndex * this._entrySize);
@@ -70613,7 +70841,7 @@ class ObjectCollectionBuffer extends Disposable$1 {
70613
70841
  }
70614
70842
  }
70615
70843
  this._dirtyTracker.flag(deletedEntryIndex, (this._entries.size - deletedEntryIndex) * this._entrySize);
70616
- dispose(listeners);
70844
+ dispose(listeners2);
70617
70845
  }));
70618
70846
  return value;
70619
70847
  }
@@ -188241,13 +188469,13 @@ class ToggleHighContrast extends EditorAction {
188241
188469
  }
188242
188470
  run(accessor, editor2) {
188243
188471
  const standaloneThemeService = accessor.get(IStandaloneThemeService);
188244
- const currentTheme = standaloneThemeService.getColorTheme();
188245
- if (isHighContrast(currentTheme.type)) {
188246
- standaloneThemeService.setTheme(this._originalThemeName || (isDark(currentTheme.type) ? VS_DARK_THEME_NAME : VS_LIGHT_THEME_NAME));
188472
+ const currentTheme2 = standaloneThemeService.getColorTheme();
188473
+ if (isHighContrast(currentTheme2.type)) {
188474
+ standaloneThemeService.setTheme(this._originalThemeName || (isDark(currentTheme2.type) ? VS_DARK_THEME_NAME : VS_LIGHT_THEME_NAME));
188247
188475
  this._originalThemeName = null;
188248
188476
  } else {
188249
- standaloneThemeService.setTheme(isDark(currentTheme.type) ? HC_BLACK_THEME_NAME : HC_LIGHT_THEME_NAME);
188250
- this._originalThemeName = currentTheme.themeName;
188477
+ standaloneThemeService.setTheme(isDark(currentTheme2.type) ? HC_BLACK_THEME_NAME : HC_LIGHT_THEME_NAME);
188478
+ this._originalThemeName = currentTheme2.themeName;
188251
188479
  }
188252
188480
  }
188253
188481
  }
@@ -208188,7 +208416,7 @@ const lessDefaults = new LanguageServiceDefaultsImpl$3(
208188
208416
  modeConfigurationDefault$2
208189
208417
  );
208190
208418
  function getMode$3() {
208191
- return __vitePreload(() => import("./cssMode-bQYoCKra.js"), true ? __vite__mapDeps([0,1]) : void 0, import.meta.url);
208419
+ return __vitePreload(() => import("./cssMode-CJR4iD-G.js"), true ? __vite__mapDeps([0,1]) : void 0, import.meta.url);
208192
208420
  }
208193
208421
  languages.onLanguage("less", () => {
208194
208422
  getMode$3().then((mode2) => mode2.setupMode(lessDefaults));
@@ -208293,7 +208521,7 @@ const razorLanguageService = registerHTMLLanguageService(
208293
208521
  );
208294
208522
  const razorDefaults = razorLanguageService.defaults;
208295
208523
  function getMode$2() {
208296
- return __vitePreload(() => import("./htmlMode-Ds1eMYgM.js"), true ? __vite__mapDeps([2,1]) : void 0, import.meta.url);
208524
+ return __vitePreload(() => import("./htmlMode-DgNtlKcG.js"), true ? __vite__mapDeps([2,1]) : void 0, import.meta.url);
208297
208525
  }
208298
208526
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
208299
208527
  const defaults = new LanguageServiceDefaultsImpl$2(languageId, options, modeConfiguration);
@@ -208377,7 +208605,7 @@ const jsonDefaults = new LanguageServiceDefaultsImpl$1(
208377
208605
  );
208378
208606
  const getWorker$1 = () => getMode$1().then((mode2) => mode2.getWorker());
208379
208607
  function getMode$1() {
208380
- return __vitePreload(() => import("./jsonMode-t5SESE75.js"), true ? __vite__mapDeps([3,1]) : void 0, import.meta.url);
208608
+ return __vitePreload(() => import("./jsonMode-DBvR0zMu.js"), true ? __vite__mapDeps([3,1]) : void 0, import.meta.url);
208381
208609
  }
208382
208610
  languages.register({
208383
208611
  id: "json",
@@ -208623,7 +208851,7 @@ const getJavaScriptWorker = () => {
208623
208851
  return getMode().then((mode) => mode.getJavaScriptWorker());
208624
208852
  };
208625
208853
  function getMode() {
208626
- return __vitePreload(() => import("./tsMode-WiO8CDaI.js"), true ? [] : void 0, import.meta.url);
208854
+ return __vitePreload(() => import("./tsMode-mfv6mHOv.js"), true ? [] : void 0, import.meta.url);
208627
208855
  }
208628
208856
  languages.onLanguage("typescript", () => {
208629
208857
  return getMode().then((mode) => mode.setupTypeScript(typescriptDefaults));
@@ -208818,49 +209046,49 @@ registerLanguage({
208818
209046
  extensions: [".ftl", ".ftlh", ".ftlx"],
208819
209047
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
208820
209048
  loader: () => {
208821
- return __vitePreload(() => import("./freemarker2-BS1ERQl_.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationDollar);
209049
+ return __vitePreload(() => import("./freemarker2-BRI9ISq9.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationDollar);
208822
209050
  }
208823
209051
  });
208824
209052
  registerLanguage({
208825
209053
  id: "freemarker2.tag-angle.interpolation-dollar",
208826
209054
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
208827
209055
  loader: () => {
208828
- return __vitePreload(() => import("./freemarker2-BS1ERQl_.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAngleInterpolationDollar);
209056
+ return __vitePreload(() => import("./freemarker2-BRI9ISq9.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAngleInterpolationDollar);
208829
209057
  }
208830
209058
  });
208831
209059
  registerLanguage({
208832
209060
  id: "freemarker2.tag-bracket.interpolation-dollar",
208833
209061
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
208834
209062
  loader: () => {
208835
- return __vitePreload(() => import("./freemarker2-BS1ERQl_.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagBracketInterpolationDollar);
209063
+ return __vitePreload(() => import("./freemarker2-BRI9ISq9.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagBracketInterpolationDollar);
208836
209064
  }
208837
209065
  });
208838
209066
  registerLanguage({
208839
209067
  id: "freemarker2.tag-angle.interpolation-bracket",
208840
209068
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
208841
209069
  loader: () => {
208842
- return __vitePreload(() => import("./freemarker2-BS1ERQl_.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAngleInterpolationBracket);
209070
+ return __vitePreload(() => import("./freemarker2-BRI9ISq9.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAngleInterpolationBracket);
208843
209071
  }
208844
209072
  });
208845
209073
  registerLanguage({
208846
209074
  id: "freemarker2.tag-bracket.interpolation-bracket",
208847
209075
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
208848
209076
  loader: () => {
208849
- return __vitePreload(() => import("./freemarker2-BS1ERQl_.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagBracketInterpolationBracket);
209077
+ return __vitePreload(() => import("./freemarker2-BRI9ISq9.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagBracketInterpolationBracket);
208850
209078
  }
208851
209079
  });
208852
209080
  registerLanguage({
208853
209081
  id: "freemarker2.tag-auto.interpolation-dollar",
208854
209082
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
208855
209083
  loader: () => {
208856
- return __vitePreload(() => import("./freemarker2-BS1ERQl_.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationDollar);
209084
+ return __vitePreload(() => import("./freemarker2-BRI9ISq9.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationDollar);
208857
209085
  }
208858
209086
  });
208859
209087
  registerLanguage({
208860
209088
  id: "freemarker2.tag-auto.interpolation-bracket",
208861
209089
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
208862
209090
  loader: () => {
208863
- return __vitePreload(() => import("./freemarker2-BS1ERQl_.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationBracket);
209091
+ return __vitePreload(() => import("./freemarker2-BRI9ISq9.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationBracket);
208864
209092
  }
208865
209093
  });
208866
209094
  registerLanguage({
@@ -208881,7 +209109,7 @@ registerLanguage({
208881
209109
  extensions: [".handlebars", ".hbs"],
208882
209110
  aliases: ["Handlebars", "handlebars", "hbs"],
208883
209111
  mimetypes: ["text/x-handlebars-template"],
208884
- loader: () => __vitePreload(() => import("./handlebars-B-ZEHRLr.js"), true ? [] : void 0, import.meta.url)
209112
+ loader: () => __vitePreload(() => import("./handlebars-3hL6XIZI.js"), true ? [] : void 0, import.meta.url)
208885
209113
  });
208886
209114
  registerLanguage({
208887
209115
  id: "hcl",
@@ -208894,7 +209122,7 @@ registerLanguage({
208894
209122
  extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
208895
209123
  aliases: ["HTML", "htm", "html", "xhtml"],
208896
209124
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
208897
- loader: () => __vitePreload(() => import("./html-lk9e1Lkl.js"), true ? [] : void 0, import.meta.url)
209125
+ loader: () => __vitePreload(() => import("./html-Dd5_vBoP.js"), true ? [] : void 0, import.meta.url)
208898
209126
  });
208899
209127
  registerLanguage({
208900
209128
  id: "ini",
@@ -208917,7 +209145,7 @@ registerLanguage({
208917
209145
  filenames: ["jakefile"],
208918
209146
  aliases: ["JavaScript", "javascript", "js"],
208919
209147
  mimetypes: ["text/javascript"],
208920
- loader: () => __vitePreload(() => import("./javascript-D6OeziKX.js"), true ? __vite__mapDeps([4,5]) : void 0, import.meta.url)
209148
+ loader: () => __vitePreload(() => import("./javascript-D0vPLEJg.js"), true ? __vite__mapDeps([4,5]) : void 0, import.meta.url)
208921
209149
  });
208922
209150
  registerLanguage({
208923
209151
  id: "julia",
@@ -208956,7 +209184,7 @@ registerLanguage({
208956
209184
  extensions: [".liquid", ".html.liquid"],
208957
209185
  aliases: ["Liquid", "liquid"],
208958
209186
  mimetypes: ["application/liquid"],
208959
- loader: () => __vitePreload(() => import("./liquid-B5Wjh0p_.js"), true ? [] : void 0, import.meta.url)
209187
+ loader: () => __vitePreload(() => import("./liquid-CLoc6Tx7.js"), true ? [] : void 0, import.meta.url)
208960
209188
  });
208961
209189
  registerLanguage({
208962
209190
  id: "m3",
@@ -208974,7 +209202,7 @@ registerLanguage({
208974
209202
  id: "mdx",
208975
209203
  extensions: [".mdx"],
208976
209204
  aliases: ["MDX", "mdx"],
208977
- loader: () => __vitePreload(() => import("./mdx-ByNAXh8t.js"), true ? [] : void 0, import.meta.url)
209205
+ loader: () => __vitePreload(() => import("./mdx-DTsq6tlv.js"), true ? [] : void 0, import.meta.url)
208978
209206
  });
208979
209207
  registerLanguage({
208980
209208
  id: "mips",
@@ -209073,7 +209301,7 @@ registerLanguage({
209073
209301
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
209074
209302
  aliases: ["Python", "py"],
209075
209303
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
209076
- loader: () => __vitePreload(() => import("./python-CIFO0XQW.js"), true ? [] : void 0, import.meta.url)
209304
+ loader: () => __vitePreload(() => import("./python-D04DpZDr.js"), true ? [] : void 0, import.meta.url)
209077
209305
  });
209078
209306
  registerLanguage({
209079
209307
  id: "qsharp",
@@ -209092,7 +209320,7 @@ registerLanguage({
209092
209320
  extensions: [".cshtml"],
209093
209321
  aliases: ["Razor", "razor"],
209094
209322
  mimetypes: ["text/x-cshtml"],
209095
- loader: () => __vitePreload(() => import("./razor-LXHhGcNO.js"), true ? [] : void 0, import.meta.url)
209323
+ loader: () => __vitePreload(() => import("./razor-Di6CJ6s8.js"), true ? [] : void 0, import.meta.url)
209096
209324
  });
209097
209325
  registerLanguage({
209098
209326
  id: "redis",
@@ -209225,7 +209453,7 @@ registerLanguage({
209225
209453
  aliases: ["TypeScript", "ts", "typescript"],
209226
209454
  mimetypes: ["text/typescript"],
209227
209455
  loader: () => {
209228
- return __vitePreload(() => import("./typescript-ZBQlq256.js"), true ? [] : void 0, import.meta.url);
209456
+ return __vitePreload(() => import("./typescript-CDA0Hhef.js"), true ? [] : void 0, import.meta.url);
209229
209457
  }
209230
209458
  });
209231
209459
  registerLanguage({
@@ -209270,14 +209498,14 @@ registerLanguage({
209270
209498
  firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
209271
209499
  aliases: ["XML", "xml"],
209272
209500
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
209273
- loader: () => __vitePreload(() => import("./xml-DBaLJlQU.js"), true ? [] : void 0, import.meta.url)
209501
+ loader: () => __vitePreload(() => import("./xml-BU0voRuq.js"), true ? [] : void 0, import.meta.url)
209274
209502
  });
209275
209503
  registerLanguage({
209276
209504
  id: "yaml",
209277
209505
  extensions: [".yaml", ".yml"],
209278
209506
  aliases: ["YAML", "yaml", "YML", "yml"],
209279
209507
  mimetypes: ["application/x-yaml", "text/x-yaml"],
209280
- loader: () => __vitePreload(() => import("./yaml-CId9skah.js"), true ? [] : void 0, import.meta.url)
209508
+ loader: () => __vitePreload(() => import("./yaml-qzFWnaZJ.js"), true ? [] : void 0, import.meta.url)
209281
209509
  });
209282
209510
  var __defProp = Object.defineProperty;
209283
209511
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -212581,6 +212809,25 @@ self.MonacoEnvironment = {
212581
212809
  }
212582
212810
  };
212583
212811
  loader.config({ monaco });
212812
+ for (const t of THEMES) {
212813
+ editor.defineTheme(`ctlsurf-${t.id}`, {
212814
+ base: t.editor.base,
212815
+ inherit: true,
212816
+ rules: [],
212817
+ colors: {
212818
+ "editor.background": t.editor.background,
212819
+ "editor.foreground": t.editor.foreground,
212820
+ "editor.lineHighlightBackground": t.editor.lineHighlight,
212821
+ "editor.selectionBackground": t.editor.selection,
212822
+ "editorLineNumber.foreground": t.swatch.surface,
212823
+ "editorLineNumber.activeForeground": t.swatch.accent,
212824
+ "editorGutter.background": t.editor.background,
212825
+ "editorWidget.background": t.editor.lineHighlight,
212826
+ "editorCursor.foreground": t.terminal.cursor,
212827
+ "scrollbarSlider.background": `${t.swatch.surface}99`
212828
+ }
212829
+ });
212830
+ }
212584
212831
  function TreeNode2({ entry, depth, selectedPath, onSelect }) {
212585
212832
  const [expanded2, setExpanded] = reactExports.useState(false);
212586
212833
  const [children, setChildren] = reactExports.useState([]);
@@ -212624,6 +212871,7 @@ function TreeNode2({ entry, depth, selectedPath, onSelect }) {
212624
212871
  ] });
212625
212872
  }
212626
212873
  function EditorPanel({ cwd: cwd2 }) {
212874
+ const { theme } = useAppearance();
212627
212875
  const [rootEntries, setRootEntries] = reactExports.useState([]);
212628
212876
  const [openFile, setOpenFile] = reactExports.useState(null);
212629
212877
  const [fileContent, setFileContent] = reactExports.useState("");
@@ -212751,7 +212999,7 @@ function EditorPanel({ cwd: cwd2 }) {
212751
212999
  setFileContent(val || "");
212752
213000
  setModified(true);
212753
213001
  },
212754
- theme: "vs-dark",
213002
+ theme: `ctlsurf-${theme.id}`,
212755
213003
  options: {
212756
213004
  minimap: { enabled: false },
212757
213005
  fontSize: 13,
@@ -213558,7 +213806,30 @@ Run: npm i -g @phenx-inc/ctlsurf` : "@phenx-inc/ctlsurf",
213558
213806
  ] })
213559
213807
  ] });
213560
213808
  }
213809
+ function ThemeGrid({ themes, value, onChange }) {
213810
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "theme-options", role: "radiogroup", children: themes.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
213811
+ "button",
213812
+ {
213813
+ type: "button",
213814
+ role: "radio",
213815
+ "aria-checked": value === t.id,
213816
+ title: t.name,
213817
+ className: `theme-option ${value === t.id ? "active" : ""}`,
213818
+ onClick: () => onChange(t.id),
213819
+ children: [
213820
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "theme-swatch", style: { background: t.swatch.bg }, "aria-hidden": "true", children: [
213821
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "theme-swatch-bar", style: { background: t.swatch.surface } }),
213822
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "theme-swatch-dot", style: { background: t.swatch.accent } }),
213823
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "theme-swatch-line", style: { background: t.swatch.text } })
213824
+ ] }),
213825
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "theme-option-label", children: t.name })
213826
+ ]
213827
+ },
213828
+ t.id
213829
+ )) });
213830
+ }
213561
213831
  function SettingsDialog({ open, onClose }) {
213832
+ const { appearance, theme, update: updateAppearance2 } = useAppearance();
213562
213833
  const [profileList, setProfileList] = reactExports.useState(null);
213563
213834
  const [activeProfileId, setActiveProfileId] = reactExports.useState("production");
213564
213835
  const [editingId, setEditingId] = reactExports.useState(null);
@@ -213673,6 +213944,55 @@ function SettingsDialog({ open, onClose }) {
213673
213944
  const profiles = profileList?.profiles || [];
213674
213945
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "settings-overlay", onClick: onClose, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "settings-dialog", onClick: (e) => e.stopPropagation(), children: [
213675
213946
  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Settings" }),
213947
+ !editingId && // ─── Appearance (global) ───────────────
213948
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "settings-section", children: [
213949
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Appearance" }),
213950
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "settings-hint", children: "Applies everywhere, including the terminal and code editor." }),
213951
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "settings-checkbox", children: [
213952
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
213953
+ "input",
213954
+ {
213955
+ type: "checkbox",
213956
+ checked: appearance.sync,
213957
+ onChange: (e) => updateAppearance2({ sync: e.target.checked })
213958
+ }
213959
+ ),
213960
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Sync with system appearance" }),
213961
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "settings-hint", children: "Switches between your light and dark picks as the OS changes." })
213962
+ ] }),
213963
+ appearance.sync ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
213964
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "theme-group-label", children: "Light" }),
213965
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
213966
+ ThemeGrid,
213967
+ {
213968
+ themes: themesByMode("light"),
213969
+ value: appearance.light,
213970
+ onChange: (id) => updateAppearance2({ light: id })
213971
+ }
213972
+ ),
213973
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "theme-group-label", children: "Dark" }),
213974
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
213975
+ ThemeGrid,
213976
+ {
213977
+ themes: themesByMode("dark"),
213978
+ value: appearance.dark,
213979
+ onChange: (id) => updateAppearance2({ dark: id })
213980
+ }
213981
+ ),
213982
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "settings-hint", children: [
213983
+ "Currently ",
213984
+ theme.name,
213985
+ "."
213986
+ ] })
213987
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
213988
+ ThemeGrid,
213989
+ {
213990
+ themes: THEMES,
213991
+ value: appearance.theme,
213992
+ onChange: (id) => updateAppearance2({ theme: id })
213993
+ }
213994
+ )
213995
+ ] }),
213676
213996
  editingId ? (
213677
213997
  // ─── Profile Edit Form ─────────────────
213678
213998
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "settings-section", children: [
@@ -213844,17 +214164,18 @@ function SettingsDialog({ open, onClose }) {
213844
214164
  ] }) });
213845
214165
  }
213846
214166
  const STATUS_OPTIONS = [
213847
- { value: "Open", color: "#7aa2f7" },
213848
- { value: "In Progress", color: "#e0af68" },
213849
- { value: "Blocked", color: "#f7768e" },
213850
- { value: "Done", color: "#9ece6a" }
214167
+ { value: "Open", color: "var(--accent)" },
214168
+ { value: "In Progress", color: "var(--warning)" },
214169
+ { value: "Blocked", color: "var(--danger)" },
214170
+ { value: "Done", color: "var(--success)" }
213851
214171
  ];
213852
214172
  const PRIORITY_OPTIONS = [
213853
- { value: "Low", color: "#565f89" },
213854
- { value: "Med", color: "#e0af68" },
213855
- { value: "High", color: "#f7768e" }
214173
+ { value: "Low", color: "var(--text-muted)" },
214174
+ { value: "Med", color: "var(--warning)" },
214175
+ { value: "High", color: "var(--danger)" }
213856
214176
  ];
213857
- const colorOf = (opts, value) => opts.find((o) => o.value === value)?.color ?? "#565f89";
214177
+ const colorOf = (opts, value) => opts.find((o) => o.value === value)?.color ?? "var(--text-muted)";
214178
+ const tint$1 = (color, pct) => `color-mix(in srgb, ${color} ${pct}%, transparent)`;
213858
214179
  function formatDate(iso) {
213859
214180
  if (!iso) return "";
213860
214181
  const d = new Date(iso);
@@ -213930,7 +214251,7 @@ function Segmented({ options, value, onChange }) {
213930
214251
  {
213931
214252
  type: "button",
213932
214253
  className: `ticket-seg ${active ? "active" : ""}`,
213933
- style: active ? { borderColor: o.color, color: o.color, background: `${o.color}1f` } : void 0,
214254
+ style: active ? { borderColor: o.color, color: o.color, background: tint$1(o.color, 12) } : void 0,
213934
214255
  onClick: () => onChange(o.value),
213935
214256
  children: [
213936
214257
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ticket-seg-dot", style: { background: o.color } }),
@@ -213959,7 +214280,7 @@ function TicketCard({ ticket, onClick, onSend }) {
213959
214280
  "span",
213960
214281
  {
213961
214282
  className: "ticket-card-pri",
213962
- style: { color: colorOf(PRIORITY_OPTIONS, ticket.priority), borderColor: `${colorOf(PRIORITY_OPTIONS, ticket.priority)}66` },
214283
+ style: { color: colorOf(PRIORITY_OPTIONS, ticket.priority), borderColor: tint$1(colorOf(PRIORITY_OPTIONS, ticket.priority), 40) },
213963
214284
  children: ticket.priority
213964
214285
  }
213965
214286
  )
@@ -214192,12 +214513,12 @@ const SENSITIVITY_LEVELS = [
214192
214513
  { value: "all", label: "All signals", hint: "Everything, including low-confidence observations" }
214193
214514
  ];
214194
214515
  const SEVERITY_COLORS = {
214195
- info: "#7aa2f7",
214196
- warn: "#e0af68",
214197
- high: "#ff9e64",
214198
- critical: "#f7768e"
214516
+ info: "var(--accent)",
214517
+ warn: "var(--warning)",
214518
+ high: "var(--sev-high)",
214519
+ critical: "var(--danger)"
214199
214520
  };
214200
- const DIGEST_COLOR = "#bb9af7";
214521
+ const DIGEST_COLOR = "var(--sev-digest)";
214201
214522
  function EyeIcon({ size: size2 = 16 }) {
214202
214523
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
214203
214524
  "svg",
@@ -214223,8 +214544,9 @@ function formatTime(iso) {
214223
214544
  if (Number.isNaN(d.getTime())) return "";
214224
214545
  return d.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
214225
214546
  }
214547
+ const tint = (color, pct) => `color-mix(in srgb, ${color} ${pct}%, transparent)`;
214226
214548
  function Chip({ color, label }) {
214227
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "obs-chip", style: { color, borderColor: `${color}55`, background: `${color}14` }, children: [
214549
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "obs-chip", style: { color, borderColor: tint(color, 33), background: tint(color, 8) }, children: [
214228
214550
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "obs-chip-dot", style: { background: color } }),
214229
214551
  label
214230
214552
  ] });