kishare 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.
@@ -0,0 +1,698 @@
1
+ /**
2
+ * Main stylesheet for KiShare
3
+ */
4
+
5
+ /* Reset and base styles */
6
+ * {
7
+ box-sizing: border-box;
8
+ margin: 0;
9
+ padding: 0;
10
+ }
11
+
12
+ :root {
13
+ --bg-primary: #1e1e1e;
14
+ --bg-secondary: #252525;
15
+ --bg-hover: #2d2d2d;
16
+ --bg-selected: #37373d;
17
+ --fg-primary: #cccccc;
18
+ --fg-secondary: #999999;
19
+ --border-color: #3e3e42;
20
+ --accent-color: #0e639c;
21
+ --accent-hover: #1177bb;
22
+ --badge-sch: #4ec9b0;
23
+ --badge-pcb: #ce9178;
24
+ }
25
+
26
+ body {
27
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
28
+ background-color: var(--bg-primary);
29
+ color: var(--fg-primary);
30
+ height: 100vh;
31
+ overflow: hidden;
32
+ }
33
+
34
+ /* Workspace layout */
35
+ workspace-app {
36
+ display: block;
37
+ height: 100vh;
38
+ }
39
+
40
+ .workspace {
41
+ display: flex;
42
+ height: 100%;
43
+ width: 100%;
44
+ position: relative;
45
+ }
46
+
47
+ /* Sidebar */
48
+ .sidebar {
49
+ position: relative;
50
+ width: 300px;
51
+ min-width: 300px;
52
+ background-color: var(--bg-secondary);
53
+ border-right: 1px solid var(--border-color);
54
+ display: flex;
55
+ flex-direction: column;
56
+ overflow: hidden;
57
+ transition: width 0.2s ease, min-width 0.2s ease;
58
+ }
59
+
60
+ .sidebar.collapsed {
61
+ width: 0 !important;
62
+ min-width: 0 !important;
63
+ border-right: none;
64
+ padding: 0;
65
+ overflow: hidden;
66
+ }
67
+
68
+ .sidebar.collapsed .sidebar-header,
69
+ .sidebar.collapsed .sidebar-content,
70
+ .sidebar.collapsed .sidebar-footer,
71
+ .sidebar.collapsed .sidebar-hints,
72
+ .sidebar.collapsed .sidebar-resize-handle {
73
+ opacity: 0;
74
+ pointer-events: none;
75
+ }
76
+
77
+ /* Sidebar hints */
78
+ .sidebar-hints {
79
+ padding: 12px 16px;
80
+ border-top: 1px solid var(--border-color);
81
+ font-size: 11px;
82
+ color: var(--fg-secondary);
83
+ }
84
+
85
+ .sidebar-hints .hint {
86
+ padding: 4px 0;
87
+ opacity: 0.7;
88
+ }
89
+
90
+ /* Sidebar footer */
91
+ .sidebar-footer {
92
+ padding: 12px 16px;
93
+ border-top: 1px solid var(--border-color);
94
+ font-size: 12px;
95
+ color: var(--fg-secondary);
96
+ }
97
+
98
+ .sidebar-footer .commit-link {
99
+ display: inline-flex;
100
+ align-items: center;
101
+ gap: 6px;
102
+ color: var(--fg-secondary);
103
+ text-decoration: none;
104
+ transition: color 0.15s;
105
+ }
106
+
107
+ .sidebar-footer .commit-link:hover {
108
+ color: var(--fg-primary);
109
+ }
110
+
111
+ .sidebar-footer .commit-link svg {
112
+ flex-shrink: 0;
113
+ opacity: 0.7;
114
+ }
115
+
116
+ .sidebar-footer .repo-path {
117
+ overflow: hidden;
118
+ text-overflow: ellipsis;
119
+ white-space: nowrap;
120
+ }
121
+
122
+ .sidebar-footer .commit-separator {
123
+ opacity: 0.5;
124
+ }
125
+
126
+ .sidebar-footer .commit-hash {
127
+ font-family: monospace;
128
+ flex-shrink: 0;
129
+ }
130
+
131
+ /* Sidebar toggle button */
132
+ .sidebar-toggle {
133
+ position: absolute;
134
+ left: 308px;
135
+ top: 12px;
136
+ z-index: 100;
137
+ width: 28px;
138
+ height: 28px;
139
+ background-color: var(--bg-secondary);
140
+ border: 1px solid var(--border-color);
141
+ border-radius: 4px;
142
+ color: var(--fg-secondary);
143
+ cursor: pointer;
144
+ display: flex;
145
+ align-items: center;
146
+ justify-content: center;
147
+ transition: left 0.2s ease, background-color 0.15s, transform 0.2s ease;
148
+ }
149
+
150
+ .sidebar-toggle:hover {
151
+ background-color: var(--bg-hover);
152
+ color: var(--fg-primary);
153
+ }
154
+
155
+ .sidebar-toggle.collapsed {
156
+ left: 8px;
157
+ }
158
+
159
+ .sidebar-toggle.collapsed svg {
160
+ transform: rotate(180deg);
161
+ }
162
+
163
+ /* Sidebar resize handle */
164
+ .sidebar-resize-handle {
165
+ position: absolute;
166
+ right: -4px;
167
+ top: 0;
168
+ bottom: 0;
169
+ width: 8px;
170
+ cursor: col-resize;
171
+ z-index: 99;
172
+ background-color: transparent;
173
+ transition: background-color 0.15s;
174
+ }
175
+
176
+ .sidebar-resize-handle::before {
177
+ content: '';
178
+ position: absolute;
179
+ left: 3px;
180
+ top: 0;
181
+ bottom: 0;
182
+ width: 2px;
183
+ background-color: var(--border-color);
184
+ transition: background-color 0.15s;
185
+ }
186
+
187
+ .sidebar-resize-handle:hover::before {
188
+ background-color: var(--accent-color);
189
+ width: 3px;
190
+ left: 2.5px;
191
+ }
192
+
193
+ .sidebar-resize-handle:active::before {
194
+ background-color: var(--accent-hover);
195
+ }
196
+
197
+ .sidebar-header {
198
+ padding: 16px;
199
+ border-bottom: 1px solid var(--border-color);
200
+ }
201
+
202
+ .sidebar-header h1 {
203
+ font-size: 18px;
204
+ font-weight: 600;
205
+ color: var(--fg-primary);
206
+ }
207
+
208
+ .sidebar-content {
209
+ flex: 1;
210
+ overflow-y: auto;
211
+ overflow-x: hidden;
212
+ }
213
+
214
+ /* Project list */
215
+ project-list {
216
+ display: block;
217
+ padding: 8px;
218
+ }
219
+
220
+ .project-list {
221
+ list-style: none;
222
+ }
223
+
224
+ .project-item {
225
+ padding: 8px 12px;
226
+ cursor: pointer;
227
+ border-radius: 4px;
228
+ margin-bottom: 2px;
229
+ display: flex;
230
+ justify-content: space-between;
231
+ align-items: center;
232
+ transition: background-color 0.15s;
233
+ }
234
+
235
+ .project-item:hover {
236
+ background-color: var(--bg-hover);
237
+ }
238
+
239
+ .project-item.selected {
240
+ background-color: var(--bg-selected);
241
+ border-left: 2px solid var(--accent-color);
242
+ padding-left: 10px;
243
+ }
244
+
245
+ .project-name {
246
+ flex: 1;
247
+ font-size: 13px;
248
+ color: var(--fg-primary);
249
+ overflow: hidden;
250
+ text-overflow: ellipsis;
251
+ white-space: nowrap;
252
+ }
253
+
254
+ .project-actions {
255
+ display: flex;
256
+ align-items: center;
257
+ gap: 8px;
258
+ margin-left: 8px;
259
+ }
260
+
261
+ .project-badges {
262
+ display: flex;
263
+ gap: 4px;
264
+ }
265
+
266
+ .download-btn {
267
+ display: flex;
268
+ align-items: center;
269
+ justify-content: center;
270
+ width: 24px;
271
+ height: 24px;
272
+ color: var(--fg-secondary);
273
+ border-radius: 4px;
274
+ transition: background-color 0.15s, color 0.15s;
275
+ }
276
+
277
+ .download-btn:hover {
278
+ background-color: var(--bg-hover);
279
+ color: var(--fg-primary);
280
+ }
281
+
282
+ .badge {
283
+ font-size: 10px;
284
+ font-weight: 600;
285
+ padding: 2px 6px;
286
+ border-radius: 3px;
287
+ text-transform: uppercase;
288
+ }
289
+
290
+ .badge-sch {
291
+ background-color: var(--badge-sch);
292
+ color: var(--bg-primary);
293
+ }
294
+
295
+ .badge-pcb {
296
+ background-color: var(--badge-pcb);
297
+ color: var(--bg-primary);
298
+ }
299
+
300
+ .project-group {
301
+ margin-bottom: 8px;
302
+ }
303
+
304
+ .group-name {
305
+ font-size: 12px;
306
+ font-weight: 600;
307
+ color: var(--fg-secondary);
308
+ padding: 4px 8px;
309
+ text-transform: uppercase;
310
+ letter-spacing: 0.5px;
311
+ }
312
+
313
+ .group-projects {
314
+ list-style: none;
315
+ padding-left: 8px;
316
+ }
317
+
318
+ .empty {
319
+ padding: 16px;
320
+ text-align: center;
321
+ color: var(--fg-secondary);
322
+ font-size: 13px;
323
+ }
324
+
325
+ /* Project detail view */
326
+ .project-detail {
327
+ padding: 8px;
328
+ }
329
+
330
+ .back-button {
331
+ display: flex;
332
+ align-items: center;
333
+ gap: 6px;
334
+ padding: 8px 12px;
335
+ margin-bottom: 12px;
336
+ background: none;
337
+ border: none;
338
+ color: var(--fg-secondary);
339
+ font-size: 13px;
340
+ cursor: pointer;
341
+ border-radius: 4px;
342
+ transition: background-color 0.15s, color 0.15s;
343
+ width: 100%;
344
+ text-align: left;
345
+ }
346
+
347
+ .back-button:hover {
348
+ background-color: var(--bg-hover);
349
+ color: var(--fg-primary);
350
+ }
351
+
352
+ .back-button svg {
353
+ flex-shrink: 0;
354
+ }
355
+
356
+ .project-detail .project-item {
357
+ margin-bottom: 12px;
358
+ cursor: default;
359
+ }
360
+
361
+ .detail-meta {
362
+ margin-bottom: 16px;
363
+ padding: 12px;
364
+ background-color: var(--bg-secondary);
365
+ border-radius: 4px;
366
+ }
367
+
368
+ .detail-meta-item {
369
+ display: flex;
370
+ justify-content: space-between;
371
+ padding: 4px 0;
372
+ font-size: 12px;
373
+ }
374
+
375
+ .meta-label {
376
+ color: var(--fg-secondary);
377
+ font-weight: 500;
378
+ }
379
+
380
+ .meta-value {
381
+ color: var(--fg-primary);
382
+ }
383
+
384
+ .detail-section {
385
+ margin-bottom: 16px;
386
+ }
387
+
388
+ .detail-section-header {
389
+ display: flex;
390
+ justify-content: space-between;
391
+ align-items: center;
392
+ margin-bottom: 8px;
393
+ }
394
+
395
+ .detail-section h3 {
396
+ font-size: 12px;
397
+ font-weight: 600;
398
+ color: var(--fg-secondary);
399
+ text-transform: uppercase;
400
+ letter-spacing: 0.5px;
401
+ margin: 0;
402
+ }
403
+
404
+ .github-link {
405
+ display: flex;
406
+ align-items: center;
407
+ color: var(--fg-secondary);
408
+ transition: color 0.15s;
409
+ text-decoration: none;
410
+ }
411
+
412
+ .github-link:hover {
413
+ color: var(--fg-primary);
414
+ }
415
+
416
+ .detail-readme {
417
+ max-height: 400px;
418
+ overflow-y: auto;
419
+ padding: 16px;
420
+ background-color: var(--bg-primary);
421
+ border: 1px solid var(--border-color);
422
+ border-radius: 4px;
423
+ font-size: 13px;
424
+ line-height: 1.6;
425
+ color: var(--fg-primary);
426
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
427
+ }
428
+
429
+ .detail-readme::-webkit-scrollbar {
430
+ width: 8px;
431
+ }
432
+
433
+ .detail-readme::-webkit-scrollbar-track {
434
+ background: transparent;
435
+ }
436
+
437
+ .detail-readme::-webkit-scrollbar-thumb {
438
+ background: var(--bg-hover);
439
+ border-radius: 4px;
440
+ }
441
+
442
+ .detail-readme::-webkit-scrollbar-thumb:hover {
443
+ background: var(--bg-selected);
444
+ }
445
+
446
+ .detail-readme h1 {
447
+ font-size: 18px;
448
+ font-weight: 600;
449
+ margin-bottom: 12px;
450
+ margin-top: 0;
451
+ color: var(--fg-primary);
452
+ }
453
+
454
+ .detail-readme h2 {
455
+ font-size: 16px;
456
+ font-weight: 600;
457
+ margin-top: 20px;
458
+ margin-bottom: 10px;
459
+ color: var(--fg-primary);
460
+ }
461
+
462
+ .detail-readme h3 {
463
+ font-size: 14px;
464
+ font-weight: 600;
465
+ margin-top: 16px;
466
+ margin-bottom: 8px;
467
+ color: var(--fg-primary);
468
+ text-transform: none;
469
+ letter-spacing: normal;
470
+ }
471
+
472
+ .detail-readme p {
473
+ margin-bottom: 12px;
474
+ }
475
+
476
+ .detail-readme p:last-child {
477
+ margin-bottom: 0;
478
+ }
479
+
480
+ .detail-readme a {
481
+ color: var(--accent-color);
482
+ text-decoration: none;
483
+ }
484
+
485
+ .detail-readme a:hover {
486
+ text-decoration: underline;
487
+ }
488
+
489
+ .detail-readme strong {
490
+ font-weight: 600;
491
+ color: var(--fg-primary);
492
+ }
493
+
494
+ .detail-readme em {
495
+ font-style: italic;
496
+ }
497
+
498
+ .detail-readme code {
499
+ background-color: var(--bg-primary);
500
+ padding: 2px 6px;
501
+ border-radius: 3px;
502
+ font-family: 'Courier New', monospace;
503
+ font-size: 12px;
504
+ }
505
+
506
+ .detail-readme pre {
507
+ background-color: var(--bg-primary);
508
+ padding: 12px;
509
+ border-radius: 4px;
510
+ overflow-x: auto;
511
+ margin: 12px 0;
512
+ }
513
+
514
+ .detail-readme pre code {
515
+ background: none;
516
+ padding: 0;
517
+ }
518
+
519
+ .detail-readme ul,
520
+ .detail-readme ol {
521
+ margin: 12px 0;
522
+ padding-left: 24px;
523
+ }
524
+
525
+ .detail-readme li {
526
+ margin: 6px 0;
527
+ }
528
+
529
+ .detail-readme ul {
530
+ list-style-type: disc;
531
+ }
532
+
533
+ .detail-readme ol {
534
+ list-style-type: decimal;
535
+ }
536
+
537
+ .detail-readme img {
538
+ max-width: 100%;
539
+ height: auto;
540
+ border-radius: 4px;
541
+ margin: 12px 0;
542
+ display: block;
543
+ }
544
+
545
+ /* Viewer area */
546
+ .viewer-area {
547
+ flex: 1;
548
+ display: flex;
549
+ flex-direction: column;
550
+ overflow: hidden;
551
+ }
552
+
553
+ viewer-panel {
554
+ display: block;
555
+ width: 100%;
556
+ height: 100%;
557
+ overflow: hidden;
558
+ position: relative;
559
+ }
560
+
561
+ /* Welcome screen */
562
+ .welcome {
563
+ display: flex;
564
+ flex-direction: column;
565
+ align-items: center;
566
+ justify-content: center;
567
+ height: 100%;
568
+ padding: 32px;
569
+ text-align: center;
570
+ }
571
+
572
+ .welcome h2 {
573
+ font-size: 24px;
574
+ font-weight: 600;
575
+ margin-bottom: 12px;
576
+ color: var(--fg-primary);
577
+ }
578
+
579
+ .welcome p {
580
+ font-size: 14px;
581
+ color: var(--fg-secondary);
582
+ }
583
+
584
+ /* Error display */
585
+ .error {
586
+ display: flex;
587
+ flex-direction: column;
588
+ align-items: center;
589
+ justify-content: center;
590
+ height: 100%;
591
+ padding: 32px;
592
+ text-align: center;
593
+ }
594
+
595
+ .error h3 {
596
+ font-size: 20px;
597
+ font-weight: 600;
598
+ margin-bottom: 12px;
599
+ color: #f48771;
600
+ }
601
+
602
+ .error p {
603
+ font-size: 14px;
604
+ color: var(--fg-secondary);
605
+ }
606
+
607
+ /* Scrollbar styling */
608
+ .sidebar-content::-webkit-scrollbar {
609
+ width: 10px;
610
+ }
611
+
612
+ .sidebar-content::-webkit-scrollbar-track {
613
+ background: var(--bg-secondary);
614
+ }
615
+
616
+ .sidebar-content::-webkit-scrollbar-thumb {
617
+ background: var(--bg-hover);
618
+ border-radius: 5px;
619
+ }
620
+
621
+ .sidebar-content::-webkit-scrollbar-thumb:hover {
622
+ background: var(--bg-selected);
623
+ }
624
+
625
+ /* Viewer container */
626
+ .viewer-container {
627
+ position: relative;
628
+ width: 100%;
629
+ height: 100%;
630
+ }
631
+
632
+ .viewer-container kicanvas-embed {
633
+ width: 100%;
634
+ height: 100%;
635
+ }
636
+
637
+ /* Toast notification */
638
+ .toast {
639
+ position: absolute;
640
+ bottom: 20px;
641
+ left: 50%;
642
+ transform: translateX(-50%) translateY(20px);
643
+ background-color: var(--bg-secondary);
644
+ border: 1px solid var(--border-color);
645
+ border-radius: 6px;
646
+ padding: 10px 16px;
647
+ color: var(--fg-primary);
648
+ font-size: 13px;
649
+ opacity: 0;
650
+ transition: opacity 0.3s, transform 0.3s;
651
+ pointer-events: none;
652
+ }
653
+
654
+ .toast.show {
655
+ opacity: 1;
656
+ transform: translateX(-50%) translateY(0);
657
+ }
658
+
659
+ /* Context menu */
660
+ .context-menu {
661
+ position: fixed;
662
+ z-index: 1000;
663
+ background-color: var(--bg-secondary);
664
+ border: 1px solid var(--border-color);
665
+ border-radius: 6px;
666
+ overflow: hidden;
667
+ min-width: 180px;
668
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
669
+ }
670
+
671
+ .context-menu.hidden {
672
+ display: none;
673
+ }
674
+
675
+ .context-menu-item {
676
+ display: flex;
677
+ align-items: center;
678
+ gap: 10px;
679
+ width: 100%;
680
+ padding: 10px 14px;
681
+ background: none;
682
+ border: none;
683
+ color: var(--fg-primary);
684
+ font-size: 13px;
685
+ cursor: pointer;
686
+ text-align: left;
687
+ transition: background-color 0.15s;
688
+ }
689
+
690
+ .context-menu-item:hover {
691
+ background-color: var(--bg-hover);
692
+ }
693
+
694
+ .context-menu-item svg {
695
+ color: var(--fg-secondary);
696
+ flex-shrink: 0;
697
+ }
698
+
package/tsconfig.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "strict": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ "esModuleInterop": true,
22
+ "allowSyntheticDefaultImports": true,
23
+ "forceConsistentCasingInFileNames": true
24
+ },
25
+ "include": ["src"]
26
+ }