gitmaps 1.0.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.
- package/README.md +167 -0
- package/app/api/auth/favorites/route.ts +56 -0
- package/app/api/auth/github/callback/route.ts +103 -0
- package/app/api/auth/github/route.ts +32 -0
- package/app/api/auth/me/route.ts +52 -0
- package/app/api/auth/positions/route.ts +50 -0
- package/app/api/chat/route.ts +101 -0
- package/app/api/connections/route.ts +72 -0
- package/app/api/github/repos/route.ts +111 -0
- package/app/api/positions/route.ts +80 -0
- package/app/api/repo/branch-diff/route.ts +201 -0
- package/app/api/repo/branches/route.ts +53 -0
- package/app/api/repo/browse/route.ts +55 -0
- package/app/api/repo/clone/route.ts +78 -0
- package/app/api/repo/clone-stream/route.ts +131 -0
- package/app/api/repo/file-content/route.ts +28 -0
- package/app/api/repo/file-delete/route.ts +62 -0
- package/app/api/repo/file-history/route.ts +45 -0
- package/app/api/repo/file-rename/route.ts +83 -0
- package/app/api/repo/file-save/route.ts +45 -0
- package/app/api/repo/files/route.ts +169 -0
- package/app/api/repo/git-blame/route.ts +86 -0
- package/app/api/repo/git-commit/route.ts +40 -0
- package/app/api/repo/git-heatmap/route.ts +55 -0
- package/app/api/repo/imports/route.ts +154 -0
- package/app/api/repo/load/route.ts +56 -0
- package/app/api/repo/mode/route.ts +14 -0
- package/app/api/repo/search/route.ts +127 -0
- package/app/api/repo/tree/route.ts +104 -0
- package/app/api/repo/upload/route.ts +53 -0
- package/app/api/repo/validate-path.ts +53 -0
- package/app/canvas_users.db +0 -0
- package/app/canvas_users.db-shm +0 -0
- package/app/canvas_users.db-wal +0 -0
- package/app/globals.css +7899 -0
- package/app/layout.tsx +493 -0
- package/app/lib/auth.ts +193 -0
- package/app/lib/auto-save.ts +137 -0
- package/app/lib/branch-compare.ts +443 -0
- package/app/lib/breadcrumbs.ts +170 -0
- package/app/lib/canvas-export.ts +358 -0
- package/app/lib/canvas-text.ts +912 -0
- package/app/lib/canvas.ts +564 -0
- package/app/lib/card-arrangement.ts +188 -0
- package/app/lib/card-context-menu.tsx +453 -0
- package/app/lib/card-diff-markers.ts +270 -0
- package/app/lib/card-expand.ts +189 -0
- package/app/lib/card-groups.ts +246 -0
- package/app/lib/cards.tsx +914 -0
- package/app/lib/chat.tsx +308 -0
- package/app/lib/code-editor.ts +508 -0
- package/app/lib/command-palette.ts +262 -0
- package/app/lib/connections.tsx +1037 -0
- package/app/lib/context.ts +94 -0
- package/app/lib/cursor-sharing.ts +281 -0
- package/app/lib/dependency-graph.ts +438 -0
- package/app/lib/events.tsx +1747 -0
- package/app/lib/file-card-plugin.ts +134 -0
- package/app/lib/file-modal.tsx +849 -0
- package/app/lib/file-preview.ts +400 -0
- package/app/lib/file-tabs.ts +318 -0
- package/app/lib/galaxydraw-bridge.ts +477 -0
- package/app/lib/galaxydraw.test.ts +229 -0
- package/app/lib/global-search.ts +264 -0
- package/app/lib/goto-definition.ts +224 -0
- package/app/lib/heatmap.ts +178 -0
- package/app/lib/hidden-files.tsx +222 -0
- package/app/lib/layers.ts +0 -0
- package/app/lib/layers.tsx +365 -0
- package/app/lib/loading.tsx +45 -0
- package/app/lib/multi-repo.ts +286 -0
- package/app/lib/new-file-dialog.tsx +230 -0
- package/app/lib/onboarding.tsx +213 -0
- package/app/lib/perf-overlay.ts +360 -0
- package/app/lib/positions.ts +176 -0
- package/app/lib/pr-review.ts +374 -0
- package/app/lib/production-mode.ts +47 -0
- package/app/lib/repo.tsx +977 -0
- package/app/lib/settings-modal.tsx +374 -0
- package/app/lib/settings.ts +97 -0
- package/app/lib/shortcuts-panel.ts +141 -0
- package/app/lib/status-bar.ts +128 -0
- package/app/lib/symbol-outline.ts +212 -0
- package/app/lib/syntax.ts +177 -0
- package/app/lib/tab-diff.ts +238 -0
- package/app/lib/user.tsx +133 -0
- package/app/lib/utils.ts +78 -0
- package/app/lib/viewport-culling.ts +728 -0
- package/app/page.client.tsx +215 -0
- package/app/page.tsx +291 -0
- package/app/state/machine.js +196 -0
- package/app/styles/main.css +2168 -0
- package/banner.png +0 -0
- package/cli.ts +44 -0
- package/package.json +75 -0
- package/packages/galaxydraw/README.md +296 -0
- package/packages/galaxydraw/banner.png +0 -0
- package/packages/galaxydraw/demo/build-static.ts +100 -0
- package/packages/galaxydraw/demo/client.ts +154 -0
- package/packages/galaxydraw/demo/dist/client.js +8 -0
- package/packages/galaxydraw/demo/index.html +256 -0
- package/packages/galaxydraw/demo/server.ts +96 -0
- package/packages/galaxydraw/dist/index.js +984 -0
- package/packages/galaxydraw/dist/index.js.map +16 -0
- 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 +49 -0
- package/packages/galaxydraw/perf.test.ts +284 -0
- package/packages/galaxydraw/src/core/cards.ts +435 -0
- package/packages/galaxydraw/src/core/engine.ts +339 -0
- package/packages/galaxydraw/src/core/events.ts +81 -0
- package/packages/galaxydraw/src/core/layout.ts +136 -0
- package/packages/galaxydraw/src/core/minimap.ts +216 -0
- package/packages/galaxydraw/src/core/state.ts +177 -0
- package/packages/galaxydraw/src/core/viewport.ts +106 -0
- package/packages/galaxydraw/src/galaxydraw.css +166 -0
- package/packages/galaxydraw/src/index.ts +40 -0
- package/packages/galaxydraw/tsconfig.json +30 -0
- package/server.ts +62 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* FileCardPlugin — bridges galaxydraw's CardPlugin interface with
|
|
4
|
+
* the existing file card rendering in cards.tsx.
|
|
5
|
+
*
|
|
6
|
+
* Phase 4 of the GalaxyDraw migration:
|
|
7
|
+
* - Wraps createAllFileCard() and createFileCard() as a CardPlugin
|
|
8
|
+
* - Enables CardManager to handle drag, resize, z-order, selection
|
|
9
|
+
* - Enables ViewportCuller to handle virtualized rendering
|
|
10
|
+
*
|
|
11
|
+
* The plugin doesn't replace cards.tsx — it delegates to it.
|
|
12
|
+
* This allows incremental migration without breaking the existing flow.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { CardPlugin, CardData } from '../../packages/galaxydraw/src/core/cards';
|
|
16
|
+
|
|
17
|
+
// ─── File Card Plugin ─────────────────────────────────────
|
|
18
|
+
|
|
19
|
+
export const FILE_CARD_TYPE = 'file';
|
|
20
|
+
export const DIFF_CARD_TYPE = 'diff';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Plugin for rendering source code file cards on the canvas.
|
|
24
|
+
* Used by the "working tree" (all files) view.
|
|
25
|
+
*
|
|
26
|
+
* The render() method receives a CardData where:
|
|
27
|
+
* - meta.file: the file data object (path, name, content, etc.)
|
|
28
|
+
* - meta.ctx: the CanvasContext for interaction setup
|
|
29
|
+
* - meta.savedSize: optional saved dimensions
|
|
30
|
+
*/
|
|
31
|
+
export function createFileCardPlugin(): CardPlugin {
|
|
32
|
+
return {
|
|
33
|
+
type: FILE_CARD_TYPE,
|
|
34
|
+
|
|
35
|
+
render(data: CardData): HTMLElement {
|
|
36
|
+
const { file, ctx, savedSize } = data.meta || {};
|
|
37
|
+
if (!file || !ctx) {
|
|
38
|
+
// Fallback: empty placeholder card
|
|
39
|
+
const el = document.createElement('div');
|
|
40
|
+
el.className = 'file-card';
|
|
41
|
+
el.textContent = 'Missing file data';
|
|
42
|
+
return el;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Dynamically import to avoid circular dependencies
|
|
46
|
+
// The actual rendering is still in cards.tsx
|
|
47
|
+
// skipInteraction=true: CardManager handles drag/resize/z-order
|
|
48
|
+
const { createAllFileCard } = require('./cards');
|
|
49
|
+
const card = createAllFileCard(ctx, file, data.x, data.y, savedSize, true);
|
|
50
|
+
return card;
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
onResize(card: HTMLElement, width: number, height: number) {
|
|
54
|
+
// Dispatch the resize event that cards.tsx already listens for
|
|
55
|
+
const path = card.dataset.path;
|
|
56
|
+
if (path) {
|
|
57
|
+
card.dispatchEvent(new CustomEvent('card-resized', {
|
|
58
|
+
detail: { path, width, height },
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
onDestroy(card: HTMLElement) {
|
|
64
|
+
// Clean up any scroll timers or event listeners
|
|
65
|
+
// The card DOM is removed by CardManager, but we should
|
|
66
|
+
// clean up any overlays or attached state
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
consumesWheel(target: HTMLElement): boolean {
|
|
70
|
+
// File card bodies are scrollable — pass wheel events through
|
|
71
|
+
return !!target.closest('.file-card-body');
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
consumesMouse(target: HTMLElement): boolean {
|
|
75
|
+
// Buttons, links, and interactive elements within cards
|
|
76
|
+
// should receive mouse events directly
|
|
77
|
+
return !!(
|
|
78
|
+
target.closest('button') ||
|
|
79
|
+
target.closest('a') ||
|
|
80
|
+
target.closest('.connect-btn') ||
|
|
81
|
+
target.closest('.line-num') ||
|
|
82
|
+
target.closest('.diff-hunk-header')
|
|
83
|
+
);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Plugin for rendering commit diff cards on the canvas.
|
|
90
|
+
* Used by the "commit diff" view.
|
|
91
|
+
*/
|
|
92
|
+
export function createDiffCardPlugin(): CardPlugin {
|
|
93
|
+
return {
|
|
94
|
+
type: DIFF_CARD_TYPE,
|
|
95
|
+
|
|
96
|
+
render(data: CardData): HTMLElement {
|
|
97
|
+
const { file, ctx, commitHash } = data.meta || {};
|
|
98
|
+
if (!file || !ctx) {
|
|
99
|
+
const el = document.createElement('div');
|
|
100
|
+
el.className = 'file-card';
|
|
101
|
+
el.textContent = 'Missing diff data';
|
|
102
|
+
return el;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const { createFileCard } = require('./cards');
|
|
106
|
+
const card = createFileCard(ctx, file, data.x, data.y, commitHash, true);
|
|
107
|
+
return card;
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
onResize(card: HTMLElement, width: number, height: number) {
|
|
111
|
+
const path = card.dataset.path;
|
|
112
|
+
if (path) {
|
|
113
|
+
card.dispatchEvent(new CustomEvent('card-resized', {
|
|
114
|
+
detail: { path, width, height },
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
onDestroy() { },
|
|
120
|
+
|
|
121
|
+
consumesWheel(target: HTMLElement): boolean {
|
|
122
|
+
return !!target.closest('.file-card-body');
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
consumesMouse(target: HTMLElement): boolean {
|
|
126
|
+
return !!(
|
|
127
|
+
target.closest('button') ||
|
|
128
|
+
target.closest('a') ||
|
|
129
|
+
target.closest('.connect-btn') ||
|
|
130
|
+
target.closest('.diff-hunk-header')
|
|
131
|
+
);
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|