gh-here 3.0.3 → 3.2.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 (47) hide show
  1. package/.env +0 -0
  2. package/lib/constants.js +21 -16
  3. package/lib/content-search.js +212 -0
  4. package/lib/error-handler.js +39 -28
  5. package/lib/file-utils.js +438 -287
  6. package/lib/git.js +11 -55
  7. package/lib/gitignore.js +70 -41
  8. package/lib/renderers.js +17 -33
  9. package/lib/server.js +73 -196
  10. package/lib/symbol-parser.js +600 -0
  11. package/package.json +1 -1
  12. package/public/app.js +135 -68
  13. package/public/css/components/buttons.css +423 -0
  14. package/public/css/components/forms.css +171 -0
  15. package/public/css/components/modals.css +286 -0
  16. package/public/css/components/notifications.css +36 -0
  17. package/public/css/file-table.css +318 -0
  18. package/public/css/file-tree.css +269 -0
  19. package/public/css/file-viewer.css +1259 -0
  20. package/public/css/layout.css +372 -0
  21. package/public/css/main.css +35 -0
  22. package/public/css/reset.css +64 -0
  23. package/public/css/search.css +694 -0
  24. package/public/css/symbol-outline.css +279 -0
  25. package/public/css/variables.css +135 -0
  26. package/public/js/constants.js +50 -34
  27. package/public/js/content-search-handler.js +551 -0
  28. package/public/js/file-viewer.js +437 -0
  29. package/public/js/focus-mode.js +280 -0
  30. package/public/js/inline-search.js +659 -0
  31. package/public/js/modal-manager.js +14 -28
  32. package/public/js/symbol-outline.js +454 -0
  33. package/public/js/utils.js +152 -94
  34. package/.claude/settings.local.json +0 -30
  35. package/SAMPLE.md +0 -287
  36. package/lib/validation.js +0 -77
  37. package/public/app.js.backup +0 -1902
  38. package/public/highlight.css +0 -121
  39. package/public/js/draft-manager.js +0 -36
  40. package/public/js/editor-manager.js +0 -159
  41. package/public/styles.css +0 -2727
  42. package/test.js +0 -138
  43. package/tests/draftManager.test.js +0 -241
  44. package/tests/fileTypeDetection.test.js +0 -111
  45. package/tests/httpService.test.js +0 -268
  46. package/tests/languageDetection.test.js +0 -145
  47. package/tests/pathUtils.test.js +0 -136
@@ -0,0 +1,171 @@
1
+ /**
2
+ * Form Styles
3
+ * Search inputs, file inputs, and form controls
4
+ */
5
+
6
+ /* ========================================
7
+ Search Container
8
+ ======================================== */
9
+
10
+ .search-container {
11
+ align-items: center;
12
+ display: flex;
13
+ flex-shrink: 1;
14
+ max-width: 100%;
15
+ min-width: 0;
16
+ position: relative;
17
+ }
18
+
19
+ .search-input {
20
+ backdrop-filter: blur(10px);
21
+ background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
22
+ border: 1.5px solid var(--border-subtle);
23
+ border-radius: var(--radius-lg);
24
+ box-shadow: var(--shadow-sm);
25
+ color: var(--text-primary);
26
+ flex-shrink: 1;
27
+ font-size: 14px;
28
+ font-weight: 500;
29
+ max-width: 280px;
30
+ min-width: 120px;
31
+ padding: 8px 38px 8px 36px;
32
+ transition: all var(--transition-base);
33
+ width: 100%;
34
+ }
35
+
36
+ .search-input:hover {
37
+ background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
38
+ border-color: var(--border-primary);
39
+ box-shadow: var(--shadow-md);
40
+ transform: translateY(-1px);
41
+ }
42
+
43
+ .search-input:focus {
44
+ background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
45
+ border-color: var(--link-color);
46
+ box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2), var(--shadow-md), var(--shadow-glow);
47
+ outline: none;
48
+ transform: translateY(-1px);
49
+ }
50
+
51
+ [data-theme="light"] .search-input:focus {
52
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), var(--shadow-md);
53
+ }
54
+
55
+ .search-icon {
56
+ fill: var(--text-secondary);
57
+ height: 16px;
58
+ left: 8px;
59
+ pointer-events: none;
60
+ position: absolute;
61
+ width: 16px;
62
+ }
63
+
64
+ .search-hotkey {
65
+ background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-tertiary) 100%);
66
+ border: 1px solid var(--border-subtle);
67
+ border-radius: var(--radius-sm);
68
+ box-shadow: var(--shadow-xs);
69
+ color: var(--text-secondary);
70
+ font-family: ui-monospace, SFMono-Regular, monospace;
71
+ font-size: 11px;
72
+ font-weight: 600;
73
+ padding: 2px 6px;
74
+ position: absolute;
75
+ right: 12px;
76
+ transition: all var(--transition-base);
77
+ }
78
+
79
+ .search-input:focus ~ .search-hotkey {
80
+ border-color: var(--link-color);
81
+ box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2);
82
+ color: var(--link-color);
83
+ }
84
+
85
+ /* ========================================
86
+ Sidebar Search
87
+ ======================================== */
88
+
89
+ .sidebar-search {
90
+ flex-shrink: 0;
91
+ width: 100%;
92
+ }
93
+
94
+ .sidebar-search .search-input {
95
+ border-radius: var(--radius-md);
96
+ box-shadow: var(--shadow-inner);
97
+ font-size: 12px;
98
+ height: 32px;
99
+ min-width: 0;
100
+ padding: 6px 32px 6px 30px;
101
+ transition: all var(--transition-base);
102
+ width: 100%;
103
+ }
104
+
105
+ .sidebar-search .search-input:hover {
106
+ background: var(--bg-elevated);
107
+ border-color: var(--border-secondary);
108
+ }
109
+
110
+ .sidebar-search .search-input:focus {
111
+ box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15), var(--shadow-inner);
112
+ }
113
+
114
+ .sidebar-search .search-hotkey {
115
+ border-radius: var(--radius-sm);
116
+ box-shadow: var(--shadow-sm);
117
+ font-size: 10px;
118
+ font-weight: 500;
119
+ padding: 2px 5px;
120
+ }
121
+
122
+ /* Repo controls search */
123
+ .repo-controls .search-container:not(.sidebar-search) {
124
+ flex: 1;
125
+ max-width: 300px;
126
+ min-width: 150px;
127
+ }
128
+
129
+ .repo-controls .search-container:not(.sidebar-search) .search-input {
130
+ width: 100%;
131
+ }
132
+
133
+ /* ========================================
134
+ New File Input
135
+ ======================================== */
136
+
137
+ .filename-section {
138
+ align-items: center;
139
+ display: flex;
140
+ flex: 1;
141
+ gap: 12px;
142
+ }
143
+
144
+ .filename-label {
145
+ color: var(--text-primary);
146
+ font-size: 14px;
147
+ font-weight: 600;
148
+ white-space: nowrap;
149
+ }
150
+
151
+ .new-filename-input {
152
+ background: var(--bg-primary);
153
+ border: 1px solid var(--border-primary);
154
+ border-radius: 6px;
155
+ color: var(--text-primary);
156
+ flex: 1;
157
+ font-size: 14px;
158
+ outline: none;
159
+ padding: 8px 12px;
160
+ transition: border-color 0.15s ease;
161
+ }
162
+
163
+ .new-filename-input:focus {
164
+ border-color: #0969da;
165
+ box-shadow: 0 0 0 0.2em rgba(9, 105, 218, 0.3);
166
+ }
167
+
168
+ [data-theme="dark"] .new-filename-input:focus {
169
+ border-color: #58a6ff;
170
+ box-shadow: 0 0 0 0.2em rgba(88, 166, 255, 0.3);
171
+ }
@@ -0,0 +1,286 @@
1
+ /**
2
+ * Modal and Overlay Styles
3
+ * Keyboard help, diff viewer, and general modal dialogs
4
+ */
5
+
6
+ /* ========================================
7
+ Keyboard Help Overlay
8
+ ======================================== */
9
+
10
+ .keyboard-help-overlay {
11
+ align-items: center;
12
+ animation: fadeIn 0.2s ease-out;
13
+ backdrop-filter: blur(4px);
14
+ background: rgba(0, 0, 0, 0.8);
15
+ display: flex;
16
+ height: 100%;
17
+ justify-content: center;
18
+ left: 0;
19
+ position: fixed;
20
+ top: 0;
21
+ width: 100%;
22
+ z-index: 99999;
23
+ }
24
+
25
+ .keyboard-help-content {
26
+ animation: slideUp 0.3s ease-out;
27
+ background: var(--bg-primary);
28
+ border: 1px solid var(--border-primary);
29
+ border-radius: 8px;
30
+ box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
31
+ margin: 20px;
32
+ max-height: 80vh;
33
+ max-width: 800px;
34
+ overflow-y: auto;
35
+ }
36
+
37
+ .keyboard-help-header {
38
+ align-items: center;
39
+ background: var(--bg-secondary);
40
+ border-bottom: 1px solid var(--border-primary);
41
+ border-radius: 8px 8px 0 0;
42
+ display: flex;
43
+ justify-content: space-between;
44
+ padding: 24px 30px 16px;
45
+ }
46
+
47
+ .keyboard-help-header h2 {
48
+ color: var(--text-primary);
49
+ font-size: 24px;
50
+ font-weight: 600;
51
+ margin: 0;
52
+ }
53
+
54
+ .keyboard-help-close {
55
+ background: none;
56
+ border: none;
57
+ border-radius: 4px;
58
+ color: var(--text-secondary);
59
+ cursor: pointer;
60
+ font-size: 24px;
61
+ padding: 4px;
62
+ transition: color 0.2s ease;
63
+ }
64
+
65
+ .keyboard-help-close:hover {
66
+ background: var(--hover-bg);
67
+ color: var(--text-primary);
68
+ }
69
+
70
+ .keyboard-help-body {
71
+ padding: 0;
72
+ }
73
+
74
+ .shortcuts-container {
75
+ display: grid;
76
+ gap: 0;
77
+ grid-template-columns: 1fr 1fr;
78
+ }
79
+
80
+ .shortcut-section {
81
+ border-right: 1px solid var(--border-primary);
82
+ padding: 40px 50px;
83
+ }
84
+
85
+ .shortcut-section:last-child {
86
+ border-right: none;
87
+ }
88
+
89
+ .shortcut-section h3 {
90
+ color: var(--text-primary);
91
+ font-size: 16px;
92
+ font-weight: 600;
93
+ margin: 0 0 24px 0;
94
+ }
95
+
96
+ .shortcut-list {
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: 20px;
100
+ }
101
+
102
+ .shortcut-item {
103
+ align-items: center;
104
+ border-radius: 0;
105
+ display: flex;
106
+ justify-content: space-between;
107
+ padding: 0;
108
+ transition: none;
109
+ }
110
+
111
+ .shortcut-keys {
112
+ align-items: center;
113
+ display: flex;
114
+ gap: 6px;
115
+ }
116
+
117
+ .shortcut-keys kbd {
118
+ background: var(--bg-tertiary);
119
+ border: 1px solid var(--border-secondary);
120
+ border-radius: 4px;
121
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
122
+ color: var(--text-primary);
123
+ font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
124
+ font-size: 11px;
125
+ min-width: 20px;
126
+ padding: 4px 8px;
127
+ text-align: center;
128
+ white-space: nowrap;
129
+ }
130
+
131
+ .shortcut-desc {
132
+ color: var(--text-primary);
133
+ flex: 1;
134
+ font-size: 14px;
135
+ text-align: left;
136
+ }
137
+
138
+ /* ========================================
139
+ Diff Viewer Modal
140
+ ======================================== */
141
+
142
+ .diff-viewer-overlay {
143
+ align-items: center;
144
+ animation: fadeIn 0.2s ease-out;
145
+ backdrop-filter: blur(4px);
146
+ background: rgba(0, 0, 0, 0.8);
147
+ display: flex;
148
+ height: 100%;
149
+ justify-content: center;
150
+ left: 0;
151
+ position: fixed;
152
+ top: 0;
153
+ width: 100%;
154
+ z-index: 99999;
155
+ }
156
+
157
+ .diff-viewer-modal {
158
+ animation: slideUp 0.3s ease-out;
159
+ background: var(--bg-primary);
160
+ border: 1px solid var(--border-primary);
161
+ border-radius: 8px;
162
+ box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
163
+ display: flex;
164
+ flex-direction: column;
165
+ height: 80vh;
166
+ max-width: 1200px;
167
+ width: 90vw;
168
+ }
169
+
170
+ .diff-viewer-header {
171
+ align-items: center;
172
+ background: var(--bg-secondary);
173
+ border-bottom: 1px solid var(--border-primary);
174
+ border-radius: 8px 8px 0 0;
175
+ display: flex;
176
+ justify-content: space-between;
177
+ padding: 16px 20px;
178
+ }
179
+
180
+ .diff-viewer-title {
181
+ align-items: center;
182
+ color: var(--text-primary);
183
+ display: flex;
184
+ font-size: 16px;
185
+ font-weight: 600;
186
+ gap: 8px;
187
+ margin: 0;
188
+ }
189
+
190
+ .diff-close-btn {
191
+ background: none;
192
+ border: none;
193
+ border-radius: 4px;
194
+ color: var(--text-secondary);
195
+ cursor: pointer;
196
+ font-size: 24px;
197
+ padding: 4px;
198
+ transition: color 0.2s ease;
199
+ }
200
+
201
+ .diff-close-btn:hover {
202
+ background: var(--hover-bg);
203
+ color: var(--text-primary);
204
+ }
205
+
206
+ .diff-viewer-content {
207
+ flex: 1;
208
+ overflow: auto;
209
+ padding: 0;
210
+ }
211
+
212
+ /* ========================================
213
+ Draft Dialog
214
+ ======================================== */
215
+
216
+ .draft-modal {
217
+ max-width: 400px;
218
+ text-align: center;
219
+ }
220
+
221
+ .draft-modal h3 {
222
+ color: var(--text-accent);
223
+ font-size: 18px;
224
+ margin: 0 0 12px 0;
225
+ }
226
+
227
+ .draft-modal p {
228
+ color: var(--text-secondary);
229
+ line-height: 1.5;
230
+ margin: 0 0 20px 0;
231
+ }
232
+
233
+ .draft-actions {
234
+ display: flex;
235
+ gap: 8px;
236
+ justify-content: center;
237
+ }
238
+
239
+ .draft-actions .btn {
240
+ flex: 1;
241
+ max-width: 120px;
242
+ }
243
+
244
+ /* ========================================
245
+ Animations
246
+ ======================================== */
247
+
248
+ @keyframes fadeIn {
249
+ from {
250
+ opacity: 0;
251
+ }
252
+ to {
253
+ opacity: 1;
254
+ }
255
+ }
256
+
257
+ @keyframes slideUp {
258
+ from {
259
+ opacity: 0;
260
+ transform: translateY(30px);
261
+ }
262
+ to {
263
+ opacity: 1;
264
+ transform: translateY(0);
265
+ }
266
+ }
267
+
268
+ /* ========================================
269
+ Responsive - Mobile
270
+ ======================================== */
271
+
272
+ @media (max-width: 768px) {
273
+ .keyboard-help-content {
274
+ margin: 20px;
275
+ max-width: calc(100% - 40px);
276
+ }
277
+
278
+ .shortcuts-container {
279
+ gap: 24px;
280
+ grid-template-columns: 1fr;
281
+ }
282
+
283
+ .keyboard-help-body {
284
+ padding: 20px;
285
+ }
286
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Notification Styles
3
+ * Toast notifications and alerts
4
+ */
5
+
6
+ .notification {
7
+ backdrop-filter: blur(10px);
8
+ border: 1px solid rgba(255, 255, 255, 0.1);
9
+ border-radius: 6px;
10
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
11
+ color: white;
12
+ font-size: 14px;
13
+ font-weight: 500;
14
+ max-width: 400px;
15
+ padding: 12px 16px;
16
+ position: fixed;
17
+ right: 20px;
18
+ top: 20px;
19
+ transition: opacity 0.3s ease;
20
+ z-index: 10000;
21
+ }
22
+
23
+ .notification-success {
24
+ background: rgba(46, 160, 67, 0.9);
25
+ border-color: rgba(46, 160, 67, 0.5);
26
+ }
27
+
28
+ .notification-error {
29
+ background: rgba(248, 81, 73, 0.9);
30
+ border-color: rgba(248, 81, 73, 0.5);
31
+ }
32
+
33
+ .notification-info {
34
+ background: rgba(88, 166, 255, 0.9);
35
+ border-color: rgba(88, 166, 255, 0.5);
36
+ }