@phenx-inc/ctlsurf 0.10.0 → 0.11.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 (27) hide show
  1. package/out/headless/index.mjs +1 -1
  2. package/out/headless/index.mjs.map +1 -1
  3. package/out/main/index.js +46 -21
  4. package/out/renderer/assets/{cssMode-BbCVOTaJ.js → cssMode-Bmzy9hKX.js} +3 -3
  5. package/out/renderer/assets/{freemarker2-DryLywQv.js → freemarker2-CDAsExTa.js} +1 -1
  6. package/out/renderer/assets/{handlebars-CdUMtSdr.js → handlebars-CvpBYG1L.js} +1 -1
  7. package/out/renderer/assets/{html-Cwkf2GMH.js → html-CNhEQqr8.js} +1 -1
  8. package/out/renderer/assets/{htmlMode-C7PzhXxH.js → htmlMode-DD7YPgga.js} +3 -3
  9. package/out/renderer/assets/{index-Dg1vMspf.js → index-BDlCPzCG.js} +144 -144
  10. package/out/renderer/assets/{index-BIceGcz3.css → index-CGHeDwZa.css} +5 -46
  11. package/out/renderer/assets/{javascript-Cy7ROXJl.js → javascript-CsGLsswK.js} +2 -2
  12. package/out/renderer/assets/{jsonMode-BtZtt3QW.js → jsonMode-CTuGgRvC.js} +3 -3
  13. package/out/renderer/assets/{liquid-xReAQeYs.js → liquid-BrrN4uul.js} +1 -1
  14. package/out/renderer/assets/{lspLanguageFeatures-Dmx0L0Bw.js → lspLanguageFeatures-Bhdn2Eqy.js} +1 -1
  15. package/out/renderer/assets/{mdx-YMNFO1Zz.js → mdx-DJo-gax4.js} +1 -1
  16. package/out/renderer/assets/{python-BExaDVxv.js → python-DYHeg5b2.js} +1 -1
  17. package/out/renderer/assets/{razor-HL8ANmQ4.js → razor-Cqcks14K.js} +1 -1
  18. package/out/renderer/assets/{tsMode-Dqd8vdLE.js → tsMode-YTLgCayh.js} +1 -1
  19. package/out/renderer/assets/{typescript-Dysz1PTX.js → typescript-oxBn_Vcw.js} +1 -1
  20. package/out/renderer/assets/{xml-BHp5Z9nc.js → xml-BEqGMCTc.js} +1 -1
  21. package/out/renderer/assets/{yaml-CPDHxVup.js → yaml-BGSrk5HC.js} +1 -1
  22. package/out/renderer/index.html +2 -2
  23. package/package.json +1 -1
  24. package/src/main/index.ts +60 -31
  25. package/src/renderer/App.tsx +9 -7
  26. package/src/renderer/components/TicketPanel.tsx +20 -25
  27. package/src/renderer/styles.css +5 -46
package/out/main/index.js CHANGED
@@ -11865,10 +11865,10 @@ function getProjectAbbrev(cwdPath) {
11865
11865
  if (word.length <= 3) return word.toUpperCase();
11866
11866
  return word.slice(0, 2).toUpperCase();
11867
11867
  }
11868
- function createDotOverlay(red) {
11868
+ function createDotOverlay(ready) {
11869
11869
  const size = 32;
11870
11870
  const canvas = Buffer.alloc(size * size * 4, 0);
11871
- const [r, g2, b2] = red ? [235, 64, 52] : [122, 162, 247];
11871
+ const [r, g2, b2] = ready ? [52, 199, 89] : [122, 162, 247];
11872
11872
  for (let y2 = 0; y2 < size; y2++) {
11873
11873
  for (let x = 0; x < size; x++) {
11874
11874
  const cx = x - size / 2;
@@ -11884,6 +11884,37 @@ function createDotOverlay(red) {
11884
11884
  }
11885
11885
  return electron.nativeImage.createFromBuffer(canvas, { width: size, height: size });
11886
11886
  }
11887
+ let baseDockIcon = null;
11888
+ function dockIconWithReadyDot(base) {
11889
+ const { width, height } = base.getSize();
11890
+ if (!width || !height) return base;
11891
+ const bmp = base.toBitmap();
11892
+ const r = Math.round(Math.min(width, height) * 0.17);
11893
+ const ring = Math.max(2, Math.round(r * 0.22));
11894
+ const cx = width - r - Math.round(width * 0.05);
11895
+ const cy = height - r - Math.round(height * 0.05);
11896
+ const put = (x, y2, b2, g2, rr) => {
11897
+ const idx = (y2 * width + x) * 4;
11898
+ bmp[idx] = b2;
11899
+ bmp[idx + 1] = g2;
11900
+ bmp[idx + 2] = rr;
11901
+ bmp[idx + 3] = 255;
11902
+ };
11903
+ for (let y2 = cy - r - ring; y2 <= cy + r + ring; y2++) {
11904
+ if (y2 < 0 || y2 >= height) continue;
11905
+ for (let x = cx - r - ring; x <= cx + r + ring; x++) {
11906
+ if (x < 0 || x >= width) continue;
11907
+ const d = Math.sqrt((x - cx) ** 2 + (y2 - cy) ** 2);
11908
+ if (d <= r) put(x, y2, 89, 199, 52);
11909
+ else if (d <= r + ring) put(x, y2, 24, 26, 31);
11910
+ }
11911
+ }
11912
+ return electron.nativeImage.createFromBitmap(bmp, { width, height });
11913
+ }
11914
+ function setDockReadyDot(on) {
11915
+ if (process.platform !== "darwin" || !electron.app.dock || !baseDockIcon) return;
11916
+ electron.app.dock.setIcon(on ? dockIconWithReadyDot(baseDockIcon) : baseDockIcon);
11917
+ }
11887
11918
  let projectAbbrev = "";
11888
11919
  function applySteadyBadge() {
11889
11920
  if (process.platform === "darwin" && electron.app.dock) {
@@ -11896,15 +11927,14 @@ function applySteadyBadge() {
11896
11927
  function updateProjectBadge(cwdPath) {
11897
11928
  if (!cwdPath) return;
11898
11929
  projectAbbrev = getProjectAbbrev(cwdPath);
11899
- if (!blinkTimer) applySteadyBadge();
11930
+ applySteadyBadge();
11900
11931
  if (mainWindow) {
11901
11932
  const folderName = cwdPath.split("/").filter(Boolean).pop() || "ctlsurf-worker";
11902
11933
  mainWindow.setTitle(`ctlsurf-worker — ${folderName}`);
11903
11934
  }
11904
11935
  }
11905
11936
  const attention = new AttentionController();
11906
- let blinkTimer = null;
11907
- let blinkOn = false;
11937
+ let attentionActive = false;
11908
11938
  let bounceId = -1;
11909
11939
  function setAwaitingIndicator(on) {
11910
11940
  applyAttention(attention.setAwaiting(on));
@@ -11914,34 +11944,28 @@ function applyAttention(active) {
11914
11944
  else stopAttention();
11915
11945
  }
11916
11946
  function startAttention() {
11917
- if (blinkTimer) return;
11918
- log("[agent-state] attention START (blink + bounce)");
11947
+ if (attentionActive) return;
11948
+ attentionActive = true;
11949
+ log("[agent-state] attention START (green ready dot + bounce)");
11919
11950
  if (process.platform === "darwin" && electron.app.dock) {
11951
+ setDockReadyDot(true);
11920
11952
  bounceId = electron.app.dock.bounce("informational");
11921
11953
  }
11922
11954
  if (process.platform === "win32" && mainWindow) {
11923
- mainWindow.setOverlayIcon(createDotOverlay(true), "Awaiting input");
11955
+ mainWindow.setOverlayIcon(createDotOverlay(true), "Ready for you");
11924
11956
  mainWindow.flashFrame(true);
11925
11957
  }
11926
11958
  if (process.platform === "linux") {
11927
11959
  if (typeof electron.app.badgeCount === "number") electron.app.badgeCount = 1;
11928
11960
  mainWindow?.flashFrame(true);
11929
11961
  }
11930
- blinkOn = true;
11931
- blinkTimer = setInterval(() => {
11932
- blinkOn = !blinkOn;
11933
- if (process.platform === "darwin" && electron.app.dock) {
11934
- electron.app.dock.setBadge(blinkOn ? projectAbbrev || "●" : "");
11935
- }
11936
- }, 600);
11937
11962
  }
11938
11963
  function stopAttention() {
11939
- if (blinkTimer) {
11940
- clearInterval(blinkTimer);
11941
- blinkTimer = null;
11942
- log("[agent-state] attention STOP");
11943
- }
11964
+ if (!attentionActive) return;
11965
+ attentionActive = false;
11966
+ log("[agent-state] attention STOP");
11944
11967
  if (process.platform === "darwin" && electron.app.dock) {
11968
+ setDockReadyDot(false);
11945
11969
  if (bounceId >= 0) {
11946
11970
  electron.app.dock.cancelBounce(bounceId);
11947
11971
  bounceId = -1;
@@ -12266,7 +12290,8 @@ electron.app.whenReady().then(() => {
12266
12290
  if (process.platform === "darwin" && electron.app.dock) {
12267
12291
  const iconPath = path.join(__dirname, "../../resources/icon.png");
12268
12292
  try {
12269
- electron.app.dock.setIcon(electron.nativeImage.createFromPath(iconPath));
12293
+ baseDockIcon = electron.nativeImage.createFromPath(iconPath);
12294
+ electron.app.dock.setIcon(baseDockIcon);
12270
12295
  } catch {
12271
12296
  }
12272
12297
  }
@@ -1,6 +1,6 @@
1
- import { c as createWebWorker, l as languages } from "./index-Dg1vMspf.js";
2
- import { C as CompletionAdapter, H as HoverAdapter, D as DocumentHighlightAdapter, a as DefinitionAdapter, R as ReferenceAdapter, b as DocumentSymbolAdapter, c as RenameAdapter, d as DocumentColorAdapter, F as FoldingRangeAdapter, e as DiagnosticsAdapter, S as SelectionRangeAdapter, f as DocumentFormattingEditProvider, g as DocumentRangeFormattingEditProvider } from "./lspLanguageFeatures-Dmx0L0Bw.js";
3
- import { h, i, j, t, k } from "./lspLanguageFeatures-Dmx0L0Bw.js";
1
+ import { c as createWebWorker, l as languages } from "./index-BDlCPzCG.js";
2
+ import { C as CompletionAdapter, H as HoverAdapter, D as DocumentHighlightAdapter, a as DefinitionAdapter, R as ReferenceAdapter, b as DocumentSymbolAdapter, c as RenameAdapter, d as DocumentColorAdapter, F as FoldingRangeAdapter, e as DiagnosticsAdapter, S as SelectionRangeAdapter, f as DocumentFormattingEditProvider, g as DocumentRangeFormattingEditProvider } from "./lspLanguageFeatures-Bhdn2Eqy.js";
3
+ import { h, i, j, t, k } from "./lspLanguageFeatures-Bhdn2Eqy.js";
4
4
  const STOP_WHEN_IDLE_FOR = 2 * 60 * 1e3;
5
5
  class WorkerManager {
6
6
  constructor(defaults) {
@@ -1,4 +1,4 @@
1
- import { l as languages } from "./index-Dg1vMspf.js";
1
+ import { l as languages } from "./index-BDlCPzCG.js";
2
2
  const EMPTY_ELEMENTS = [
3
3
  "assign",
4
4
  "flush",
@@ -1,4 +1,4 @@
1
- import { l as languages } from "./index-Dg1vMspf.js";
1
+ import { l as languages } from "./index-BDlCPzCG.js";
2
2
  const EMPTY_ELEMENTS = [
3
3
  "area",
4
4
  "base",
@@ -1,4 +1,4 @@
1
- import { l as languages } from "./index-Dg1vMspf.js";
1
+ import { l as languages } from "./index-BDlCPzCG.js";
2
2
  const EMPTY_ELEMENTS = [
3
3
  "area",
4
4
  "base",
@@ -1,6 +1,6 @@
1
- import { c as createWebWorker, l as languages } from "./index-Dg1vMspf.js";
2
- import { H as HoverAdapter, D as DocumentHighlightAdapter, h as DocumentLinkAdapter, F as FoldingRangeAdapter, b as DocumentSymbolAdapter, S as SelectionRangeAdapter, c as RenameAdapter, f as DocumentFormattingEditProvider, g as DocumentRangeFormattingEditProvider, C as CompletionAdapter } from "./lspLanguageFeatures-Dmx0L0Bw.js";
3
- import { a, e, d, R, i, j, t, k } from "./lspLanguageFeatures-Dmx0L0Bw.js";
1
+ import { c as createWebWorker, l as languages } from "./index-BDlCPzCG.js";
2
+ import { H as HoverAdapter, D as DocumentHighlightAdapter, h as DocumentLinkAdapter, F as FoldingRangeAdapter, b as DocumentSymbolAdapter, S as SelectionRangeAdapter, c as RenameAdapter, f as DocumentFormattingEditProvider, g as DocumentRangeFormattingEditProvider, C as CompletionAdapter } from "./lspLanguageFeatures-Bhdn2Eqy.js";
3
+ import { a, e, d, R, i, j, t, k } from "./lspLanguageFeatures-Bhdn2Eqy.js";
4
4
  const STOP_WHEN_IDLE_FOR = 2 * 60 * 1e3;
5
5
  class WorkerManager {
6
6
  constructor(defaults) {