@filipc77/cowrite 0.1.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/LICENSE +21 -0
- package/README.md +202 -0
- package/dist/bin/cowrite.js +581 -0
- package/dist/bin/cowrite.js.map +1 -0
- package/package.json +37 -0
- package/ui/client.js +338 -0
- package/ui/index.html +39 -0
- package/ui/styles.css +451 -0
package/ui/styles.css
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--bg: #1e1e2e;
|
|
9
|
+
--surface: #282840;
|
|
10
|
+
--surface-hover: #313150;
|
|
11
|
+
--text: #cdd6f4;
|
|
12
|
+
--text-dim: #8888aa;
|
|
13
|
+
--accent: #89b4fa;
|
|
14
|
+
--yellow: #f9e2af;
|
|
15
|
+
--green: #a6e3a1;
|
|
16
|
+
--red: #f38ba8;
|
|
17
|
+
--border: #45475a;
|
|
18
|
+
--font-mono: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
|
|
19
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body {
|
|
23
|
+
background: var(--bg);
|
|
24
|
+
color: var(--text);
|
|
25
|
+
font-family: var(--font-sans);
|
|
26
|
+
height: 100vh;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
header {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 16px;
|
|
36
|
+
padding: 12px 20px;
|
|
37
|
+
background: var(--surface);
|
|
38
|
+
border-bottom: 1px solid var(--border);
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
header h1 {
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
color: var(--accent);
|
|
46
|
+
letter-spacing: 0.5px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.file-path {
|
|
50
|
+
font-family: var(--font-mono);
|
|
51
|
+
font-size: 13px;
|
|
52
|
+
color: var(--text-dim);
|
|
53
|
+
flex: 1;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.status {
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
padding: 4px 10px;
|
|
62
|
+
border-radius: 12px;
|
|
63
|
+
background: var(--surface-hover);
|
|
64
|
+
color: var(--text-dim);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.status.connected {
|
|
68
|
+
color: var(--green);
|
|
69
|
+
background: rgba(166, 227, 161, 0.1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
main {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex: 1;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Content Panel */
|
|
79
|
+
.content-panel {
|
|
80
|
+
flex: 1;
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
padding: 24px 32px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
#fileContent {
|
|
86
|
+
max-width: 800px;
|
|
87
|
+
margin: 0 auto;
|
|
88
|
+
line-height: 1.7;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Markdown styles */
|
|
92
|
+
.markdown-body h1, .markdown-body h2, .markdown-body h3,
|
|
93
|
+
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
|
|
94
|
+
margin: 1.2em 0 0.6em;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
color: var(--text);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.markdown-body h1 { font-size: 1.8em; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
|
|
100
|
+
.markdown-body h2 { font-size: 1.4em; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
|
|
101
|
+
.markdown-body h3 { font-size: 1.2em; }
|
|
102
|
+
|
|
103
|
+
.markdown-body p { margin: 0.8em 0; }
|
|
104
|
+
.markdown-body ul, .markdown-body ol { margin: 0.8em 0; padding-left: 2em; }
|
|
105
|
+
.markdown-body li { margin: 0.3em 0; }
|
|
106
|
+
|
|
107
|
+
.markdown-body code {
|
|
108
|
+
font-family: var(--font-mono);
|
|
109
|
+
font-size: 0.9em;
|
|
110
|
+
background: var(--surface-hover);
|
|
111
|
+
padding: 2px 6px;
|
|
112
|
+
border-radius: 4px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.markdown-body pre {
|
|
116
|
+
background: var(--surface);
|
|
117
|
+
padding: 16px;
|
|
118
|
+
border-radius: 8px;
|
|
119
|
+
overflow-x: auto;
|
|
120
|
+
margin: 1em 0;
|
|
121
|
+
border: 1px solid var(--border);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.markdown-body pre code {
|
|
125
|
+
background: none;
|
|
126
|
+
padding: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.markdown-body blockquote {
|
|
130
|
+
border-left: 3px solid var(--accent);
|
|
131
|
+
padding-left: 16px;
|
|
132
|
+
color: var(--text-dim);
|
|
133
|
+
margin: 1em 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.markdown-body a { color: var(--accent); text-decoration: none; }
|
|
137
|
+
.markdown-body a:hover { text-decoration: underline; }
|
|
138
|
+
|
|
139
|
+
.markdown-body table { border-collapse: collapse; margin: 1em 0; width: 100%; }
|
|
140
|
+
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
|
|
141
|
+
.markdown-body th { background: var(--surface); }
|
|
142
|
+
|
|
143
|
+
/* Plain text */
|
|
144
|
+
.plain-text {
|
|
145
|
+
font-family: var(--font-mono);
|
|
146
|
+
font-size: 14px;
|
|
147
|
+
line-height: 1.6;
|
|
148
|
+
white-space: pre-wrap;
|
|
149
|
+
word-wrap: break-word;
|
|
150
|
+
color: var(--text);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Comment highlights */
|
|
154
|
+
.comment-highlight {
|
|
155
|
+
background: rgba(249, 226, 175, 0.2);
|
|
156
|
+
border-bottom: 2px solid var(--yellow);
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
position: relative;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.comment-highlight.resolved {
|
|
162
|
+
background: rgba(166, 227, 161, 0.1);
|
|
163
|
+
border-bottom-color: var(--green);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.comment-highlight:hover {
|
|
167
|
+
background: rgba(249, 226, 175, 0.35);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Sidebar */
|
|
171
|
+
.sidebar {
|
|
172
|
+
width: 340px;
|
|
173
|
+
min-width: 340px;
|
|
174
|
+
background: var(--surface);
|
|
175
|
+
border-left: 1px solid var(--border);
|
|
176
|
+
overflow-y: auto;
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.sidebar h2 {
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
font-weight: 600;
|
|
184
|
+
padding: 16px 16px 12px;
|
|
185
|
+
border-bottom: 1px solid var(--border);
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
gap: 8px;
|
|
189
|
+
flex-shrink: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.comment-count {
|
|
193
|
+
background: var(--accent);
|
|
194
|
+
color: var(--bg);
|
|
195
|
+
font-size: 11px;
|
|
196
|
+
font-weight: 700;
|
|
197
|
+
padding: 2px 7px;
|
|
198
|
+
border-radius: 10px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
#commentList {
|
|
202
|
+
flex: 1;
|
|
203
|
+
overflow-y: auto;
|
|
204
|
+
padding: 8px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Comment Card */
|
|
208
|
+
.comment-card {
|
|
209
|
+
background: var(--bg);
|
|
210
|
+
border: 1px solid var(--border);
|
|
211
|
+
border-radius: 8px;
|
|
212
|
+
padding: 12px;
|
|
213
|
+
margin-bottom: 8px;
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
transition: border-color 0.15s;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.comment-card:hover {
|
|
219
|
+
border-color: var(--accent);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.comment-card.active {
|
|
223
|
+
border-color: var(--accent);
|
|
224
|
+
box-shadow: 0 0 0 1px var(--accent);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.comment-card.resolved {
|
|
228
|
+
opacity: 0.6;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.comment-selected-text {
|
|
232
|
+
font-family: var(--font-mono);
|
|
233
|
+
font-size: 12px;
|
|
234
|
+
color: var(--text-dim);
|
|
235
|
+
background: var(--surface-hover);
|
|
236
|
+
padding: 6px 8px;
|
|
237
|
+
border-radius: 4px;
|
|
238
|
+
margin-bottom: 8px;
|
|
239
|
+
max-height: 48px;
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
white-space: pre;
|
|
242
|
+
text-overflow: ellipsis;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.comment-text {
|
|
246
|
+
font-size: 13px;
|
|
247
|
+
line-height: 1.5;
|
|
248
|
+
margin-bottom: 8px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.comment-meta {
|
|
252
|
+
display: flex;
|
|
253
|
+
align-items: center;
|
|
254
|
+
justify-content: space-between;
|
|
255
|
+
font-size: 11px;
|
|
256
|
+
color: var(--text-dim);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.comment-status {
|
|
260
|
+
font-size: 11px;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
padding: 2px 8px;
|
|
263
|
+
border-radius: 10px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.comment-status.pending {
|
|
267
|
+
color: var(--yellow);
|
|
268
|
+
background: rgba(249, 226, 175, 0.1);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.comment-status.resolved {
|
|
272
|
+
color: var(--green);
|
|
273
|
+
background: rgba(166, 227, 161, 0.1);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Replies */
|
|
277
|
+
.comment-replies {
|
|
278
|
+
margin-top: 8px;
|
|
279
|
+
padding-top: 8px;
|
|
280
|
+
border-top: 1px solid var(--border);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.reply {
|
|
284
|
+
font-size: 12px;
|
|
285
|
+
line-height: 1.5;
|
|
286
|
+
margin-bottom: 6px;
|
|
287
|
+
padding: 6px 8px;
|
|
288
|
+
border-radius: 4px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.reply.user {
|
|
292
|
+
background: rgba(137, 180, 250, 0.08);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.reply.agent {
|
|
296
|
+
background: rgba(166, 227, 161, 0.08);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.reply-from {
|
|
300
|
+
font-weight: 600;
|
|
301
|
+
font-size: 11px;
|
|
302
|
+
text-transform: uppercase;
|
|
303
|
+
letter-spacing: 0.5px;
|
|
304
|
+
margin-bottom: 2px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.reply-from.user { color: var(--accent); }
|
|
308
|
+
.reply-from.agent { color: var(--green); }
|
|
309
|
+
|
|
310
|
+
/* Comment card actions */
|
|
311
|
+
.comment-actions {
|
|
312
|
+
display: flex;
|
|
313
|
+
gap: 6px;
|
|
314
|
+
margin-top: 8px;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.comment-actions button {
|
|
318
|
+
font-size: 11px;
|
|
319
|
+
padding: 4px 10px;
|
|
320
|
+
border-radius: 4px;
|
|
321
|
+
border: 1px solid var(--border);
|
|
322
|
+
background: var(--surface-hover);
|
|
323
|
+
color: var(--text-dim);
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
transition: all 0.15s;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.comment-actions button:hover {
|
|
329
|
+
color: var(--text);
|
|
330
|
+
border-color: var(--accent);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* Reply inline form */
|
|
334
|
+
.reply-form {
|
|
335
|
+
margin-top: 8px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.reply-form textarea {
|
|
339
|
+
width: 100%;
|
|
340
|
+
font-size: 12px;
|
|
341
|
+
font-family: var(--font-sans);
|
|
342
|
+
background: var(--bg);
|
|
343
|
+
color: var(--text);
|
|
344
|
+
border: 1px solid var(--border);
|
|
345
|
+
border-radius: 4px;
|
|
346
|
+
padding: 6px 8px;
|
|
347
|
+
resize: vertical;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.reply-form textarea:focus {
|
|
351
|
+
outline: none;
|
|
352
|
+
border-color: var(--accent);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* Comment Popup */
|
|
356
|
+
.comment-popup {
|
|
357
|
+
position: fixed;
|
|
358
|
+
z-index: 1000;
|
|
359
|
+
background: var(--surface);
|
|
360
|
+
border: 1px solid var(--border);
|
|
361
|
+
border-radius: 10px;
|
|
362
|
+
padding: 14px;
|
|
363
|
+
width: 320px;
|
|
364
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.popup-selection {
|
|
368
|
+
font-family: var(--font-mono);
|
|
369
|
+
font-size: 12px;
|
|
370
|
+
color: var(--text-dim);
|
|
371
|
+
background: var(--bg);
|
|
372
|
+
padding: 8px 10px;
|
|
373
|
+
border-radius: 6px;
|
|
374
|
+
margin-bottom: 10px;
|
|
375
|
+
max-height: 60px;
|
|
376
|
+
overflow: hidden;
|
|
377
|
+
white-space: pre;
|
|
378
|
+
text-overflow: ellipsis;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.comment-popup textarea {
|
|
382
|
+
width: 100%;
|
|
383
|
+
font-size: 13px;
|
|
384
|
+
font-family: var(--font-sans);
|
|
385
|
+
background: var(--bg);
|
|
386
|
+
color: var(--text);
|
|
387
|
+
border: 1px solid var(--border);
|
|
388
|
+
border-radius: 6px;
|
|
389
|
+
padding: 8px 10px;
|
|
390
|
+
resize: vertical;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.comment-popup textarea:focus {
|
|
394
|
+
outline: none;
|
|
395
|
+
border-color: var(--accent);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.popup-actions {
|
|
399
|
+
display: flex;
|
|
400
|
+
gap: 8px;
|
|
401
|
+
margin-top: 10px;
|
|
402
|
+
justify-content: flex-end;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.popup-actions button {
|
|
406
|
+
font-size: 13px;
|
|
407
|
+
font-weight: 500;
|
|
408
|
+
padding: 6px 16px;
|
|
409
|
+
border-radius: 6px;
|
|
410
|
+
border: none;
|
|
411
|
+
cursor: pointer;
|
|
412
|
+
transition: all 0.15s;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.popup-actions button#commentSubmit {
|
|
416
|
+
background: var(--accent);
|
|
417
|
+
color: var(--bg);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.popup-actions button#commentSubmit:hover {
|
|
421
|
+
filter: brightness(1.1);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.popup-actions button.secondary {
|
|
425
|
+
background: var(--surface-hover);
|
|
426
|
+
color: var(--text-dim);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.popup-actions button.secondary:hover {
|
|
430
|
+
color: var(--text);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/* Empty state */
|
|
434
|
+
.empty-state {
|
|
435
|
+
text-align: center;
|
|
436
|
+
padding: 40px 20px;
|
|
437
|
+
color: var(--text-dim);
|
|
438
|
+
font-size: 13px;
|
|
439
|
+
line-height: 1.6;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/* Scrollbar */
|
|
443
|
+
::-webkit-scrollbar { width: 8px; }
|
|
444
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
445
|
+
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
|
|
446
|
+
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
|
|
447
|
+
|
|
448
|
+
/* Selection */
|
|
449
|
+
::selection {
|
|
450
|
+
background: rgba(137, 180, 250, 0.3);
|
|
451
|
+
}
|