gitmaps 1.0.0 → 1.1.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 (145) hide show
  1. package/README.md +265 -122
  2. package/app/[...slug]/page.client.tsx +1 -0
  3. package/app/[...slug]/page.tsx +6 -0
  4. package/app/[owner]/[repo]/page.client.tsx +5 -0
  5. package/app/[slug]/page.client.tsx +5 -0
  6. package/app/analytics.db +0 -0
  7. package/app/api/analytics/route.ts +64 -0
  8. package/app/api/auth/positions/route.ts +95 -33
  9. package/app/api/build-info/route.ts +19 -0
  10. package/app/api/chat/route.ts +13 -2
  11. package/app/api/manifest.json/route.ts +20 -0
  12. package/app/api/og-image/route.ts +14 -0
  13. package/app/api/pwa-icon/route.ts +14 -0
  14. package/app/api/repo/clone-stream/route.ts +20 -12
  15. package/app/api/repo/file-content/route.ts +73 -20
  16. package/app/api/repo/imports/route.ts +21 -3
  17. package/app/api/repo/list/route.ts +30 -0
  18. package/app/api/repo/load/route.test.ts +62 -0
  19. package/app/api/repo/load/route.ts +41 -1
  20. package/app/api/repo/pdf-thumb/route.ts +127 -0
  21. package/app/api/repo/resolve-slug/route.ts +51 -0
  22. package/app/api/repo/tree/route.ts +188 -104
  23. package/app/api/repo/upload/route.ts +6 -9
  24. package/app/api/sw.js/route.ts +70 -0
  25. package/app/api/version/route.ts +26 -0
  26. package/app/galaxy-canvas/page.client.tsx +2 -0
  27. package/app/galaxy-canvas/page.tsx +5 -0
  28. package/app/globals.css +5844 -4694
  29. package/app/icon.png +0 -0
  30. package/app/layout.tsx +1284 -467
  31. package/app/lib/auto-arrange.test.ts +158 -0
  32. package/app/lib/auto-arrange.ts +147 -0
  33. package/app/lib/canvas-export.ts +358 -358
  34. package/app/lib/canvas-text.ts +4 -72
  35. package/app/lib/canvas.ts +625 -564
  36. package/app/lib/card-arrangement.ts +21 -7
  37. package/app/lib/card-context-menu.tsx +2 -2
  38. package/app/lib/card-groups.ts +9 -2
  39. package/app/lib/cards.tsx +1361 -914
  40. package/app/lib/chat.tsx +65 -9
  41. package/app/lib/code-editor.ts +86 -2
  42. package/app/lib/connections.tsx +34 -43
  43. package/app/lib/context.test.ts +32 -0
  44. package/app/lib/context.ts +19 -3
  45. package/app/lib/cursor-sharing.ts +34 -0
  46. package/app/lib/events.tsx +76 -73
  47. package/app/lib/export-canvas.ts +287 -0
  48. package/app/lib/file-card-plugin.ts +148 -134
  49. package/app/lib/file-modal.tsx +49 -0
  50. package/app/lib/file-preview.ts +486 -400
  51. package/app/lib/github-import.test.ts +424 -0
  52. package/app/lib/global-search.ts +48 -27
  53. package/app/lib/initial-route-hydration.test.ts +283 -0
  54. package/app/lib/initial-route-hydration.ts +202 -0
  55. package/app/lib/landing-reset.test.ts +99 -0
  56. package/app/lib/landing-reset.ts +106 -0
  57. package/app/lib/landing-shell.test.ts +75 -0
  58. package/app/lib/large-repo-optimization.ts +37 -0
  59. package/app/lib/layers.tsx +17 -18
  60. package/app/lib/layout-snapshots.ts +320 -0
  61. package/app/lib/loading.test.ts +69 -0
  62. package/app/lib/loading.tsx +160 -45
  63. package/app/lib/mount-cleanup.test.ts +52 -0
  64. package/app/lib/mount-cleanup.ts +34 -0
  65. package/app/lib/mount-init.test.ts +123 -0
  66. package/app/lib/mount-init.ts +107 -0
  67. package/app/lib/mount-lifecycle.test.ts +39 -0
  68. package/app/lib/mount-lifecycle.ts +12 -0
  69. package/app/lib/mount-route-wiring.test.ts +87 -0
  70. package/app/lib/mount-route-wiring.ts +84 -0
  71. package/app/lib/multi-repo.ts +14 -0
  72. package/app/lib/onboarding-tutorial.ts +278 -0
  73. package/app/lib/perf-overlay.ts +78 -0
  74. package/app/lib/positions.ts +191 -122
  75. package/app/lib/recent-commits.test.ts +869 -0
  76. package/app/lib/recent-commits.ts +227 -0
  77. package/app/lib/repo-handoff.test.ts +23 -0
  78. package/app/lib/repo-handoff.ts +16 -0
  79. package/app/lib/repo-progressive.ts +119 -0
  80. package/app/lib/repo-select.test.ts +61 -0
  81. package/app/lib/repo-select.ts +74 -0
  82. package/app/lib/repo.tsx +1383 -977
  83. package/app/lib/role.ts +228 -0
  84. package/app/lib/route-catchall.test.ts +27 -0
  85. package/app/lib/route-repo-entry.test.ts +95 -0
  86. package/app/lib/route-repo-entry.ts +36 -0
  87. package/app/lib/router-contract.test.ts +22 -0
  88. package/app/lib/router-contract.ts +19 -0
  89. package/app/lib/shared-layout.test.ts +86 -0
  90. package/app/lib/shared-layout.ts +82 -0
  91. package/app/lib/shortcuts-panel.ts +2 -0
  92. package/app/lib/status-bar.test.ts +118 -0
  93. package/app/lib/status-bar.ts +365 -128
  94. package/app/lib/sync-controls.test.ts +43 -0
  95. package/app/lib/sync-controls.tsx +303 -0
  96. package/app/lib/test-dom.ts +145 -0
  97. package/app/lib/test-fixtures/router-contract/[...slug]/page.tsx +3 -0
  98. package/app/lib/test-fixtures/router-contract/api/health/route.ts +3 -0
  99. package/app/lib/test-fixtures/router-contract/api/version/route.ts +3 -0
  100. package/app/lib/test-fixtures/router-contract/galaxy-canvas/page.tsx +3 -0
  101. package/app/lib/test-fixtures/router-contract/page.tsx +3 -0
  102. package/app/lib/transclusion-smoke.test.ts +163 -0
  103. package/app/lib/tutorial.ts +301 -0
  104. package/app/lib/version.ts +93 -0
  105. package/app/lib/viewport-culling.ts +740 -728
  106. package/app/lib/virtual-files.ts +456 -0
  107. package/app/lib/webgl-text.ts +189 -0
  108. package/app/lib/{galaxydraw-bridge.ts → xydraw-bridge.ts} +485 -477
  109. package/app/lib/{galaxydraw.test.ts → xydraw.test.ts} +228 -229
  110. package/app/og-image.png +0 -0
  111. package/app/page.client.tsx +70 -215
  112. package/app/page.tsx +27 -92
  113. package/app/state/machine.js +13 -0
  114. package/banner.png +0 -0
  115. package/package.json +17 -8
  116. package/server.ts +11 -1
  117. package/app/api/connections/route.ts +0 -72
  118. package/app/api/positions/route.ts +0 -80
  119. package/app/api/repo/browse/route.ts +0 -55
  120. package/app/lib/pr-review.ts +0 -374
  121. package/packages/galaxydraw/README.md +0 -296
  122. package/packages/galaxydraw/banner.png +0 -0
  123. package/packages/galaxydraw/demo/build-static.ts +0 -100
  124. package/packages/galaxydraw/demo/client.ts +0 -154
  125. package/packages/galaxydraw/demo/dist/client.js +0 -8
  126. package/packages/galaxydraw/demo/index.html +0 -256
  127. package/packages/galaxydraw/demo/server.ts +0 -96
  128. package/packages/galaxydraw/dist/index.js +0 -984
  129. package/packages/galaxydraw/dist/index.js.map +0 -16
  130. package/packages/galaxydraw/node_modules/.bin/tsc.bunx +0 -0
  131. package/packages/galaxydraw/node_modules/.bin/tsc.exe +0 -0
  132. package/packages/galaxydraw/node_modules/.bin/tsserver.bunx +0 -0
  133. package/packages/galaxydraw/node_modules/.bin/tsserver.exe +0 -0
  134. package/packages/galaxydraw/package.json +0 -49
  135. package/packages/galaxydraw/perf.test.ts +0 -284
  136. package/packages/galaxydraw/src/core/cards.ts +0 -435
  137. package/packages/galaxydraw/src/core/engine.ts +0 -339
  138. package/packages/galaxydraw/src/core/events.ts +0 -81
  139. package/packages/galaxydraw/src/core/layout.ts +0 -136
  140. package/packages/galaxydraw/src/core/minimap.ts +0 -216
  141. package/packages/galaxydraw/src/core/state.ts +0 -177
  142. package/packages/galaxydraw/src/core/viewport.ts +0 -106
  143. package/packages/galaxydraw/src/galaxydraw.css +0 -166
  144. package/packages/galaxydraw/src/index.ts +0 -40
  145. package/packages/galaxydraw/tsconfig.json +0 -30
@@ -5,7 +5,7 @@ export interface CanvasTextOptions {
5
5
  isAllAdded?: boolean;
6
6
  isAllDeleted?: boolean;
7
7
  visibleLineIndices?: Set<number>;
8
- /** File path for PR review comments (if set, enables inline commenting) */
8
+ /** File path for connections (if set, enables line-click for connections) */
9
9
  filePath?: string;
10
10
  }
11
11
 
@@ -43,10 +43,7 @@ export class CanvasTextRenderer {
43
43
  private _longLineGradW: number = 0;
44
44
  /** rAF batching — only one render per animation frame */
45
45
  private _rafId: number = 0;
46
- /** Cached file comments for rendering markers (refreshed on changes) */
47
- private _fileComments: Map<number, import('./pr-review').ReviewComment[]> = new Map();
48
- /** Unsubscribe from review change listener */
49
- private _reviewUnsub: (() => void) | null = null;
46
+
50
47
 
51
48
  constructor(container: HTMLElement, options: CanvasTextOptions) {
52
49
  this.options = options;
@@ -221,46 +218,6 @@ export class CanvasTextRenderer {
221
218
  this.render();
222
219
  }
223
220
  }) as EventListener);
224
- // PR Review — load file comments and wire click handler
225
- if (options.filePath) {
226
- this._loadFileComments();
227
- // Re-render when comments change
228
- import('./pr-review').then(({ onReviewChange }) => {
229
- this._reviewUnsub = onReviewChange(() => {
230
- this._loadFileComments();
231
- this.render();
232
- });
233
- });
234
-
235
- // Click handler on gutter area — open comment popup
236
- container.addEventListener('click', (e: MouseEvent) => {
237
- if (!this.options.filePath) return;
238
- const rect = container.getBoundingClientRect();
239
- const x = e.clientX - rect.left;
240
- const y = e.clientY - rect.top;
241
-
242
- // Only trigger on gutter click (left of content area)
243
- if (x > this.contentX) return;
244
-
245
- // Calculate which line was clicked
246
- const lineIdx = Math.floor((y + this.scrollTop) / this.lineHeight);
247
- if (lineIdx < 0 || lineIdx >= this.drawnLines.length) return;
248
-
249
- const lineData = this.drawnLines[lineIdx];
250
- import('./pr-review').then(({ showCommentPopup }) => {
251
- showCommentPopup(
252
- this.options.filePath!,
253
- lineData.num,
254
- e.clientX,
255
- e.clientY,
256
- () => {
257
- this._loadFileComments();
258
- this.render();
259
- }
260
- );
261
- });
262
- });
263
- }
264
221
 
265
222
  this.render();
266
223
  }
@@ -283,16 +240,7 @@ export class CanvasTextRenderer {
283
240
  }
284
241
  }
285
242
 
286
- /** Load file comments from the review store */
287
- private _loadFileComments() {
288
- if (!this.options.filePath) {
289
- this._fileComments = new Map();
290
- return;
291
- }
292
- import('./pr-review').then(({ getAllFileComments }) => {
293
- this._fileComments = getAllFileComments(this.options.filePath!);
294
- });
295
- }
243
+
296
244
 
297
245
  /** Build a custom scrollbar track on the right side */
298
246
  private _buildScrollTrack(container: HTMLElement) {
@@ -890,23 +838,7 @@ export class CanvasTextRenderer {
890
838
  this.ctx.fillRect(w - 3, y + 3, 2, lh - 6);
891
839
  }
892
840
 
893
- // PR Review comment marker (purple dot in gutter)
894
- if (this._fileComments.has(lineNum)) {
895
- const commentCount = this._fileComments.get(lineNum)!.length;
896
- // Purple dot
897
- this.ctx.beginPath();
898
- this.ctx.arc(diffGutterW - 3, y + lh / 2, 3, 0, Math.PI * 2);
899
- this.ctx.fillStyle = 'rgba(168, 139, 250, 0.9)';
900
- this.ctx.fill();
901
- // Count badge if > 1
902
- if (commentCount > 1) {
903
- this.ctx.fillStyle = 'rgba(168, 139, 250, 0.7)';
904
- this.ctx.font = '9px sans-serif';
905
- this.ctx.fillText(String(commentCount), diffGutterW - 7, y + 2);
906
- // Restore font
907
- this.ctx.font = `${this.fontSize}px "JetBrains Mono", Consolas, monospace`;
908
- }
909
- }
841
+
910
842
  }
911
843
  }
912
844
  }