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.
- package/README.md +265 -122
- package/app/[...slug]/page.client.tsx +1 -0
- package/app/[...slug]/page.tsx +6 -0
- package/app/[owner]/[repo]/page.client.tsx +5 -0
- package/app/[slug]/page.client.tsx +5 -0
- package/app/analytics.db +0 -0
- package/app/api/analytics/route.ts +64 -0
- package/app/api/auth/positions/route.ts +95 -33
- package/app/api/build-info/route.ts +19 -0
- package/app/api/chat/route.ts +13 -2
- package/app/api/manifest.json/route.ts +20 -0
- package/app/api/og-image/route.ts +14 -0
- package/app/api/pwa-icon/route.ts +14 -0
- package/app/api/repo/clone-stream/route.ts +20 -12
- package/app/api/repo/file-content/route.ts +73 -20
- package/app/api/repo/imports/route.ts +21 -3
- package/app/api/repo/list/route.ts +30 -0
- package/app/api/repo/load/route.test.ts +62 -0
- package/app/api/repo/load/route.ts +41 -1
- package/app/api/repo/pdf-thumb/route.ts +127 -0
- package/app/api/repo/resolve-slug/route.ts +51 -0
- package/app/api/repo/tree/route.ts +188 -104
- package/app/api/repo/upload/route.ts +6 -9
- package/app/api/sw.js/route.ts +70 -0
- package/app/api/version/route.ts +26 -0
- package/app/galaxy-canvas/page.client.tsx +2 -0
- package/app/galaxy-canvas/page.tsx +5 -0
- package/app/globals.css +5844 -4694
- package/app/icon.png +0 -0
- package/app/layout.tsx +1284 -467
- package/app/lib/auto-arrange.test.ts +158 -0
- package/app/lib/auto-arrange.ts +147 -0
- package/app/lib/canvas-export.ts +358 -358
- package/app/lib/canvas-text.ts +4 -72
- package/app/lib/canvas.ts +625 -564
- package/app/lib/card-arrangement.ts +21 -7
- package/app/lib/card-context-menu.tsx +2 -2
- package/app/lib/card-groups.ts +9 -2
- package/app/lib/cards.tsx +1361 -914
- package/app/lib/chat.tsx +65 -9
- package/app/lib/code-editor.ts +86 -2
- package/app/lib/connections.tsx +34 -43
- package/app/lib/context.test.ts +32 -0
- package/app/lib/context.ts +19 -3
- package/app/lib/cursor-sharing.ts +34 -0
- package/app/lib/events.tsx +76 -73
- package/app/lib/export-canvas.ts +287 -0
- package/app/lib/file-card-plugin.ts +148 -134
- package/app/lib/file-modal.tsx +49 -0
- package/app/lib/file-preview.ts +486 -400
- package/app/lib/github-import.test.ts +424 -0
- package/app/lib/global-search.ts +48 -27
- package/app/lib/initial-route-hydration.test.ts +283 -0
- package/app/lib/initial-route-hydration.ts +202 -0
- package/app/lib/landing-reset.test.ts +99 -0
- package/app/lib/landing-reset.ts +106 -0
- package/app/lib/landing-shell.test.ts +75 -0
- package/app/lib/large-repo-optimization.ts +37 -0
- package/app/lib/layers.tsx +17 -18
- package/app/lib/layout-snapshots.ts +320 -0
- package/app/lib/loading.test.ts +69 -0
- package/app/lib/loading.tsx +160 -45
- package/app/lib/mount-cleanup.test.ts +52 -0
- package/app/lib/mount-cleanup.ts +34 -0
- package/app/lib/mount-init.test.ts +123 -0
- package/app/lib/mount-init.ts +107 -0
- package/app/lib/mount-lifecycle.test.ts +39 -0
- package/app/lib/mount-lifecycle.ts +12 -0
- package/app/lib/mount-route-wiring.test.ts +87 -0
- package/app/lib/mount-route-wiring.ts +84 -0
- package/app/lib/multi-repo.ts +14 -0
- package/app/lib/onboarding-tutorial.ts +278 -0
- package/app/lib/perf-overlay.ts +78 -0
- package/app/lib/positions.ts +191 -122
- package/app/lib/recent-commits.test.ts +869 -0
- package/app/lib/recent-commits.ts +227 -0
- package/app/lib/repo-handoff.test.ts +23 -0
- package/app/lib/repo-handoff.ts +16 -0
- package/app/lib/repo-progressive.ts +119 -0
- package/app/lib/repo-select.test.ts +61 -0
- package/app/lib/repo-select.ts +74 -0
- package/app/lib/repo.tsx +1383 -977
- package/app/lib/role.ts +228 -0
- package/app/lib/route-catchall.test.ts +27 -0
- package/app/lib/route-repo-entry.test.ts +95 -0
- package/app/lib/route-repo-entry.ts +36 -0
- package/app/lib/router-contract.test.ts +22 -0
- package/app/lib/router-contract.ts +19 -0
- package/app/lib/shared-layout.test.ts +86 -0
- package/app/lib/shared-layout.ts +82 -0
- package/app/lib/shortcuts-panel.ts +2 -0
- package/app/lib/status-bar.test.ts +118 -0
- package/app/lib/status-bar.ts +365 -128
- package/app/lib/sync-controls.test.ts +43 -0
- package/app/lib/sync-controls.tsx +303 -0
- package/app/lib/test-dom.ts +145 -0
- package/app/lib/test-fixtures/router-contract/[...slug]/page.tsx +3 -0
- package/app/lib/test-fixtures/router-contract/api/health/route.ts +3 -0
- package/app/lib/test-fixtures/router-contract/api/version/route.ts +3 -0
- package/app/lib/test-fixtures/router-contract/galaxy-canvas/page.tsx +3 -0
- package/app/lib/test-fixtures/router-contract/page.tsx +3 -0
- package/app/lib/transclusion-smoke.test.ts +163 -0
- package/app/lib/tutorial.ts +301 -0
- package/app/lib/version.ts +93 -0
- package/app/lib/viewport-culling.ts +740 -728
- package/app/lib/virtual-files.ts +456 -0
- package/app/lib/webgl-text.ts +189 -0
- package/app/lib/{galaxydraw-bridge.ts → xydraw-bridge.ts} +485 -477
- package/app/lib/{galaxydraw.test.ts → xydraw.test.ts} +228 -229
- package/app/og-image.png +0 -0
- package/app/page.client.tsx +70 -215
- package/app/page.tsx +27 -92
- package/app/state/machine.js +13 -0
- package/banner.png +0 -0
- package/package.json +17 -8
- package/server.ts +11 -1
- package/app/api/connections/route.ts +0 -72
- package/app/api/positions/route.ts +0 -80
- package/app/api/repo/browse/route.ts +0 -55
- package/app/lib/pr-review.ts +0 -374
- package/packages/galaxydraw/README.md +0 -296
- package/packages/galaxydraw/banner.png +0 -0
- package/packages/galaxydraw/demo/build-static.ts +0 -100
- package/packages/galaxydraw/demo/client.ts +0 -154
- package/packages/galaxydraw/demo/dist/client.js +0 -8
- package/packages/galaxydraw/demo/index.html +0 -256
- package/packages/galaxydraw/demo/server.ts +0 -96
- package/packages/galaxydraw/dist/index.js +0 -984
- package/packages/galaxydraw/dist/index.js.map +0 -16
- package/packages/galaxydraw/node_modules/.bin/tsc.bunx +0 -0
- package/packages/galaxydraw/node_modules/.bin/tsc.exe +0 -0
- package/packages/galaxydraw/node_modules/.bin/tsserver.bunx +0 -0
- package/packages/galaxydraw/node_modules/.bin/tsserver.exe +0 -0
- package/packages/galaxydraw/package.json +0 -49
- package/packages/galaxydraw/perf.test.ts +0 -284
- package/packages/galaxydraw/src/core/cards.ts +0 -435
- package/packages/galaxydraw/src/core/engine.ts +0 -339
- package/packages/galaxydraw/src/core/events.ts +0 -81
- package/packages/galaxydraw/src/core/layout.ts +0 -136
- package/packages/galaxydraw/src/core/minimap.ts +0 -216
- package/packages/galaxydraw/src/core/state.ts +0 -177
- package/packages/galaxydraw/src/core/viewport.ts +0 -106
- package/packages/galaxydraw/src/galaxydraw.css +0 -166
- package/packages/galaxydraw/src/index.ts +0 -40
- package/packages/galaxydraw/tsconfig.json +0 -30
package/app/lib/canvas-text.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface CanvasTextOptions {
|
|
|
5
5
|
isAllAdded?: boolean;
|
|
6
6
|
isAllDeleted?: boolean;
|
|
7
7
|
visibleLineIndices?: Set<number>;
|
|
8
|
-
/** File path for
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|