@handylib/kai-code 0.1.0 → 0.1.2
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 +87 -9
- package/dist/index.cjs +275 -43
- package/dist/index.css +138 -83
- package/dist/index.d.cts +33 -4
- package/dist/index.d.ts +33 -4
- package/dist/index.js +275 -43
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -7,15 +7,22 @@
|
|
|
7
7
|
--kc-muted: #858585;
|
|
8
8
|
--kc-text: #cccccc;
|
|
9
9
|
--kc-accent: #007acc;
|
|
10
|
+
--kc-titlebar: #181818;
|
|
11
|
+
--kc-status-background: #007acc;
|
|
12
|
+
--kc-status-foreground: #ffffff;
|
|
13
|
+
--kc-selection: #37373d;
|
|
10
14
|
position: relative;
|
|
15
|
+
container-type: inline-size;
|
|
11
16
|
display: flex;
|
|
12
17
|
flex-direction: column;
|
|
13
|
-
min-width:
|
|
18
|
+
min-width: 0;
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
min-height: 0;
|
|
21
|
+
max-height: 100dvh;
|
|
14
22
|
overflow: hidden;
|
|
15
23
|
color: var(--kc-text);
|
|
16
24
|
background: var(--kc-background);
|
|
17
|
-
border: 1px solid
|
|
18
|
-
border-radius: 6px;
|
|
25
|
+
border: 1px solid var(--kc-border);
|
|
19
26
|
font-family:
|
|
20
27
|
-apple-system,
|
|
21
28
|
BlinkMacSystemFont,
|
|
@@ -40,8 +47,8 @@
|
|
|
40
47
|
align-items: center;
|
|
41
48
|
gap: 9px;
|
|
42
49
|
padding: 0 12px;
|
|
43
|
-
background:
|
|
44
|
-
border-bottom: 1px solid
|
|
50
|
+
background: var(--kc-titlebar);
|
|
51
|
+
border-bottom: 1px solid var(--kc-border);
|
|
45
52
|
user-select: none;
|
|
46
53
|
}
|
|
47
54
|
.kai-code__brand-mark,
|
|
@@ -49,7 +56,7 @@
|
|
|
49
56
|
display: grid;
|
|
50
57
|
place-items: center;
|
|
51
58
|
color: white;
|
|
52
|
-
background:
|
|
59
|
+
background: var(--kc-accent);
|
|
53
60
|
border-radius: 5px;
|
|
54
61
|
font-weight: 700;
|
|
55
62
|
}
|
|
@@ -59,17 +66,17 @@
|
|
|
59
66
|
font-size: 13px;
|
|
60
67
|
}
|
|
61
68
|
.kai-code__brand {
|
|
62
|
-
color:
|
|
69
|
+
color: var(--kc-text);
|
|
63
70
|
font-weight: 600;
|
|
64
71
|
}
|
|
65
72
|
.kai-code__title-divider {
|
|
66
73
|
width: 1px;
|
|
67
74
|
height: 17px;
|
|
68
75
|
margin: 0 3px;
|
|
69
|
-
background:
|
|
76
|
+
background: var(--kc-border);
|
|
70
77
|
}
|
|
71
78
|
.kai-code__workspace-title {
|
|
72
|
-
color:
|
|
79
|
+
color: var(--kc-muted);
|
|
73
80
|
}
|
|
74
81
|
.kai-code__title-actions {
|
|
75
82
|
display: flex;
|
|
@@ -78,9 +85,9 @@
|
|
|
78
85
|
}
|
|
79
86
|
.kai-code__title-button {
|
|
80
87
|
padding: 3px 9px;
|
|
81
|
-
color:
|
|
82
|
-
background:
|
|
83
|
-
border: 1px solid
|
|
88
|
+
color: var(--kc-text);
|
|
89
|
+
background: var(--kc-panel);
|
|
90
|
+
border: 1px solid var(--kc-border);
|
|
84
91
|
border-radius: 3px;
|
|
85
92
|
cursor: pointer;
|
|
86
93
|
}
|
|
@@ -99,8 +106,8 @@
|
|
|
99
106
|
flex-direction: column;
|
|
100
107
|
align-items: center;
|
|
101
108
|
padding: 5px 0;
|
|
102
|
-
background:
|
|
103
|
-
border-right: 1px solid
|
|
109
|
+
background: var(--kc-titlebar);
|
|
110
|
+
border-right: 1px solid var(--kc-border);
|
|
104
111
|
}
|
|
105
112
|
.kai-code__activity-button {
|
|
106
113
|
position: relative;
|
|
@@ -108,19 +115,27 @@
|
|
|
108
115
|
width: 47px;
|
|
109
116
|
height: 48px;
|
|
110
117
|
place-items: center;
|
|
111
|
-
color:
|
|
118
|
+
color: var(--kc-muted);
|
|
112
119
|
background: transparent;
|
|
113
120
|
border: 0;
|
|
114
121
|
border-left: 2px solid transparent;
|
|
115
122
|
cursor: pointer;
|
|
116
123
|
}
|
|
117
124
|
.kai-code__activity-button.is-active {
|
|
118
|
-
color:
|
|
119
|
-
border-left-color:
|
|
125
|
+
color: var(--kc-text);
|
|
126
|
+
border-left-color: var(--kc-text);
|
|
127
|
+
}
|
|
128
|
+
.kai-code__activity-icon {
|
|
129
|
+
display: grid;
|
|
130
|
+
width: 23px;
|
|
131
|
+
height: 23px;
|
|
132
|
+
place-items: center;
|
|
120
133
|
}
|
|
121
|
-
.kai-code__activity-
|
|
134
|
+
.kai-code__activity-icon svg {
|
|
122
135
|
width: 23px;
|
|
123
136
|
height: 23px;
|
|
137
|
+
}
|
|
138
|
+
.kai-code__activity-icon .kai-code__default-explorer-icon {
|
|
124
139
|
fill: none;
|
|
125
140
|
stroke: currentColor;
|
|
126
141
|
stroke-linecap: round;
|
|
@@ -136,8 +151,8 @@
|
|
|
136
151
|
height: 24px;
|
|
137
152
|
place-items: center;
|
|
138
153
|
margin-bottom: 7px;
|
|
139
|
-
color:
|
|
140
|
-
background:
|
|
154
|
+
color: var(--kc-text);
|
|
155
|
+
background: var(--kc-panel);
|
|
141
156
|
border-radius: 50%;
|
|
142
157
|
font-size: 11px;
|
|
143
158
|
}
|
|
@@ -161,7 +176,7 @@
|
|
|
161
176
|
align-items: center;
|
|
162
177
|
justify-content: space-between;
|
|
163
178
|
padding: 0 12px 0 18px;
|
|
164
|
-
color:
|
|
179
|
+
color: var(--kc-muted);
|
|
165
180
|
font-size: 11px;
|
|
166
181
|
letter-spacing: 0.7px;
|
|
167
182
|
}
|
|
@@ -169,15 +184,15 @@
|
|
|
169
184
|
min-width: 24px;
|
|
170
185
|
height: 24px;
|
|
171
186
|
padding: 0 3px;
|
|
172
|
-
color:
|
|
187
|
+
color: var(--kc-muted);
|
|
173
188
|
background: transparent;
|
|
174
189
|
border: 0;
|
|
175
190
|
font-size: 17px !important;
|
|
176
191
|
cursor: pointer;
|
|
177
192
|
}
|
|
178
193
|
.kai-code__icon-button:hover {
|
|
179
|
-
color:
|
|
180
|
-
background:
|
|
194
|
+
color: var(--kc-text);
|
|
195
|
+
background: var(--kc-panel);
|
|
181
196
|
}
|
|
182
197
|
.kai-code__resizer {
|
|
183
198
|
z-index: 1;
|
|
@@ -196,7 +211,7 @@
|
|
|
196
211
|
align-items: center;
|
|
197
212
|
gap: 6px;
|
|
198
213
|
padding: 0 9px;
|
|
199
|
-
color:
|
|
214
|
+
color: var(--kc-text);
|
|
200
215
|
font-size: 11px;
|
|
201
216
|
font-weight: 700;
|
|
202
217
|
letter-spacing: 0.35px;
|
|
@@ -213,7 +228,7 @@
|
|
|
213
228
|
gap: 6px;
|
|
214
229
|
padding: 0 8px 0 calc(9px + var(--tree-depth, 0) * 13px);
|
|
215
230
|
overflow: hidden;
|
|
216
|
-
color:
|
|
231
|
+
color: var(--kc-text);
|
|
217
232
|
background: transparent;
|
|
218
233
|
border: 0;
|
|
219
234
|
cursor: pointer;
|
|
@@ -226,16 +241,16 @@
|
|
|
226
241
|
}
|
|
227
242
|
.kai-code__directory summary:hover,
|
|
228
243
|
.kai-code__file:hover {
|
|
229
|
-
background:
|
|
244
|
+
background: var(--kc-panel);
|
|
230
245
|
}
|
|
231
246
|
.kai-code__file.is-active {
|
|
232
|
-
color:
|
|
233
|
-
background:
|
|
247
|
+
color: var(--kc-text);
|
|
248
|
+
background: var(--kc-selection);
|
|
234
249
|
}
|
|
235
250
|
.kai-code__chevron {
|
|
236
251
|
display: inline-block;
|
|
237
252
|
width: 10px;
|
|
238
|
-
color:
|
|
253
|
+
color: var(--kc-muted);
|
|
239
254
|
font-size: 10px;
|
|
240
255
|
transition: transform 100ms ease;
|
|
241
256
|
}
|
|
@@ -243,7 +258,7 @@
|
|
|
243
258
|
transform: rotate(90deg);
|
|
244
259
|
}
|
|
245
260
|
.kai-code__folder-icon {
|
|
246
|
-
color:
|
|
261
|
+
color: var(--kc-accent);
|
|
247
262
|
font-size: 12px;
|
|
248
263
|
}
|
|
249
264
|
.kai-code__file-icon {
|
|
@@ -251,7 +266,7 @@
|
|
|
251
266
|
width: 15px;
|
|
252
267
|
flex: 0 0 15px;
|
|
253
268
|
place-items: center;
|
|
254
|
-
color:
|
|
269
|
+
color: var(--kc-accent);
|
|
255
270
|
font-size: 11px;
|
|
256
271
|
}
|
|
257
272
|
.kai-code__editor-area {
|
|
@@ -265,7 +280,7 @@
|
|
|
265
280
|
display: flex;
|
|
266
281
|
flex: 0 0 35px;
|
|
267
282
|
overflow: auto hidden;
|
|
268
|
-
background:
|
|
283
|
+
background: var(--kc-titlebar);
|
|
269
284
|
scrollbar-width: none;
|
|
270
285
|
}
|
|
271
286
|
.kai-code__tabs::-webkit-scrollbar {
|
|
@@ -276,8 +291,8 @@
|
|
|
276
291
|
min-width: 120px;
|
|
277
292
|
max-width: 200px;
|
|
278
293
|
align-items: center;
|
|
279
|
-
background:
|
|
280
|
-
border-right: 1px solid
|
|
294
|
+
background: var(--kc-panel);
|
|
295
|
+
border-right: 1px solid var(--kc-border);
|
|
281
296
|
}
|
|
282
297
|
.kai-code__tab.is-active {
|
|
283
298
|
background: var(--kc-background);
|
|
@@ -292,7 +307,7 @@
|
|
|
292
307
|
gap: 6px;
|
|
293
308
|
padding: 0 5px 0 12px;
|
|
294
309
|
overflow: hidden;
|
|
295
|
-
color:
|
|
310
|
+
color: var(--kc-muted);
|
|
296
311
|
background: transparent;
|
|
297
312
|
border: 0;
|
|
298
313
|
cursor: pointer;
|
|
@@ -300,7 +315,7 @@
|
|
|
300
315
|
white-space: nowrap;
|
|
301
316
|
}
|
|
302
317
|
.kai-code__tab.is-active .kai-code__tab-label {
|
|
303
|
-
color:
|
|
318
|
+
color: var(--kc-text);
|
|
304
319
|
}
|
|
305
320
|
.kai-code__tab-close {
|
|
306
321
|
display: grid;
|
|
@@ -308,7 +323,7 @@
|
|
|
308
323
|
height: 25px;
|
|
309
324
|
flex: 0 0 25px;
|
|
310
325
|
place-items: center;
|
|
311
|
-
color:
|
|
326
|
+
color: var(--kc-muted);
|
|
312
327
|
background: transparent;
|
|
313
328
|
border: 0;
|
|
314
329
|
border-radius: 4px;
|
|
@@ -316,7 +331,7 @@
|
|
|
316
331
|
font-size: 17px !important;
|
|
317
332
|
}
|
|
318
333
|
.kai-code__tab-close:hover {
|
|
319
|
-
background:
|
|
334
|
+
background: var(--kc-border);
|
|
320
335
|
}
|
|
321
336
|
.kai-code__dirty-dot {
|
|
322
337
|
width: 7px;
|
|
@@ -331,7 +346,7 @@
|
|
|
331
346
|
align-items: center;
|
|
332
347
|
gap: 4px;
|
|
333
348
|
padding: 0 15px;
|
|
334
|
-
color:
|
|
349
|
+
color: var(--kc-muted);
|
|
335
350
|
font-size: 11px;
|
|
336
351
|
}
|
|
337
352
|
.kai-code__breadcrumb-separator {
|
|
@@ -352,8 +367,8 @@
|
|
|
352
367
|
align-items: center;
|
|
353
368
|
justify-content: space-between;
|
|
354
369
|
padding: 0 9px;
|
|
355
|
-
|
|
356
|
-
|
|
370
|
+
background: var(--kc-status-background);
|
|
371
|
+
color: var(--kc-status-foreground);
|
|
357
372
|
font-size: 11px;
|
|
358
373
|
user-select: none;
|
|
359
374
|
}
|
|
@@ -389,7 +404,7 @@
|
|
|
389
404
|
flex-direction: column;
|
|
390
405
|
align-items: center;
|
|
391
406
|
justify-content: center;
|
|
392
|
-
color:
|
|
407
|
+
color: var(--kc-muted);
|
|
393
408
|
text-align: center;
|
|
394
409
|
}
|
|
395
410
|
.kai-code__welcome-mark {
|
|
@@ -399,7 +414,7 @@
|
|
|
399
414
|
}
|
|
400
415
|
.kai-code__welcome h1 {
|
|
401
416
|
margin: 14px 0 2px;
|
|
402
|
-
color:
|
|
417
|
+
color: var(--kc-text);
|
|
403
418
|
font-size: 20px;
|
|
404
419
|
font-weight: 500;
|
|
405
420
|
}
|
|
@@ -414,9 +429,9 @@
|
|
|
414
429
|
justify-content: space-between;
|
|
415
430
|
gap: 12px;
|
|
416
431
|
padding: 4px 10px;
|
|
417
|
-
color:
|
|
418
|
-
background:
|
|
419
|
-
border-bottom: 1px solid
|
|
432
|
+
color: var(--kc-text);
|
|
433
|
+
background: var(--kc-panel);
|
|
434
|
+
border-bottom: 1px solid var(--kc-border);
|
|
420
435
|
}
|
|
421
436
|
.kai-code__error button {
|
|
422
437
|
color: inherit;
|
|
@@ -430,9 +445,9 @@
|
|
|
430
445
|
z-index: 20;
|
|
431
446
|
min-width: 170px;
|
|
432
447
|
padding: 4px;
|
|
433
|
-
color:
|
|
434
|
-
background:
|
|
435
|
-
border: 1px solid
|
|
448
|
+
color: var(--kc-text);
|
|
449
|
+
background: var(--kc-panel);
|
|
450
|
+
border: 1px solid var(--kc-border);
|
|
436
451
|
border-radius: 5px;
|
|
437
452
|
box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
|
|
438
453
|
}
|
|
@@ -448,7 +463,7 @@
|
|
|
448
463
|
text-align: left;
|
|
449
464
|
}
|
|
450
465
|
.kai-code__context-menu button:hover {
|
|
451
|
-
background:
|
|
466
|
+
background: var(--kc-accent);
|
|
452
467
|
}
|
|
453
468
|
.kai-code__context-menu button.is-danger:hover {
|
|
454
469
|
background: #5a2727;
|
|
@@ -456,7 +471,7 @@
|
|
|
456
471
|
.kai-code__context-divider {
|
|
457
472
|
height: 1px;
|
|
458
473
|
margin: 4px 5px;
|
|
459
|
-
background:
|
|
474
|
+
background: var(--kc-border);
|
|
460
475
|
}
|
|
461
476
|
.kai-code__dialog-backdrop {
|
|
462
477
|
position: absolute;
|
|
@@ -470,21 +485,21 @@
|
|
|
470
485
|
.kai-code__dialog {
|
|
471
486
|
width: min(360px, 100%);
|
|
472
487
|
padding: 18px;
|
|
473
|
-
color:
|
|
474
|
-
background:
|
|
475
|
-
border: 1px solid
|
|
488
|
+
color: var(--kc-text);
|
|
489
|
+
background: var(--kc-panel);
|
|
490
|
+
border: 1px solid var(--kc-border);
|
|
476
491
|
border-radius: 6px;
|
|
477
492
|
box-shadow: 0 12px 36px rgb(0 0 0 / 40%);
|
|
478
493
|
}
|
|
479
494
|
.kai-code__dialog h2 {
|
|
480
495
|
margin: 0 0 8px;
|
|
481
|
-
color:
|
|
496
|
+
color: var(--kc-text);
|
|
482
497
|
font-size: 15px;
|
|
483
498
|
font-weight: 600;
|
|
484
499
|
}
|
|
485
500
|
.kai-code__dialog p {
|
|
486
501
|
margin: 0 0 14px;
|
|
487
|
-
color:
|
|
502
|
+
color: var(--kc-muted);
|
|
488
503
|
overflow-wrap: anywhere;
|
|
489
504
|
}
|
|
490
505
|
.kai-code__dialog p.kai-code__dialog-error {
|
|
@@ -494,14 +509,14 @@
|
|
|
494
509
|
.kai-code__dialog label {
|
|
495
510
|
display: block;
|
|
496
511
|
margin-bottom: 5px;
|
|
497
|
-
color:
|
|
512
|
+
color: var(--kc-text);
|
|
498
513
|
}
|
|
499
514
|
.kai-code__dialog input {
|
|
500
515
|
width: 100%;
|
|
501
516
|
padding: 7px 8px;
|
|
502
|
-
color:
|
|
503
|
-
background:
|
|
504
|
-
border: 1px solid
|
|
517
|
+
color: var(--kc-text);
|
|
518
|
+
background: var(--kc-background);
|
|
519
|
+
border: 1px solid var(--kc-accent);
|
|
505
520
|
border-radius: 3px;
|
|
506
521
|
font: inherit;
|
|
507
522
|
outline: 0;
|
|
@@ -515,9 +530,9 @@
|
|
|
515
530
|
.kai-code__dialog-actions button {
|
|
516
531
|
min-width: 70px;
|
|
517
532
|
padding: 5px 10px;
|
|
518
|
-
color:
|
|
519
|
-
background:
|
|
520
|
-
border: 1px solid
|
|
533
|
+
color: var(--kc-text);
|
|
534
|
+
background: var(--kc-background);
|
|
535
|
+
border: 1px solid var(--kc-border);
|
|
521
536
|
border-radius: 3px;
|
|
522
537
|
cursor: pointer;
|
|
523
538
|
}
|
|
@@ -539,12 +554,16 @@
|
|
|
539
554
|
--kc-muted: #777;
|
|
540
555
|
--kc-text: #333;
|
|
541
556
|
--kc-accent: #007acc;
|
|
542
|
-
|
|
557
|
+
--kc-titlebar: #f3f3f3;
|
|
558
|
+
--kc-status-background: #007acc;
|
|
559
|
+
--kc-status-foreground: #ffffff;
|
|
560
|
+
--kc-selection: #cce8ff;
|
|
561
|
+
border-color: var(--kc-border);
|
|
543
562
|
}
|
|
544
563
|
.kai-code--light .kai-code__titlebar,
|
|
545
564
|
.kai-code--light .kai-code__activity-bar,
|
|
546
565
|
.kai-code--light .kai-code__tabs {
|
|
547
|
-
background:
|
|
566
|
+
background: var(--kc-titlebar);
|
|
548
567
|
}
|
|
549
568
|
.kai-code--light .kai-code__brand,
|
|
550
569
|
.kai-code--light .kai-code__workspace-title,
|
|
@@ -553,42 +572,51 @@
|
|
|
553
572
|
.kai-code--light .kai-code__directory summary,
|
|
554
573
|
.kai-code--light .kai-code__file,
|
|
555
574
|
.kai-code--light .kai-code__tab.is-active .kai-code__tab-label {
|
|
556
|
-
color:
|
|
575
|
+
color: var(--kc-text);
|
|
557
576
|
}
|
|
558
577
|
.kai-code--light .kai-code__tab {
|
|
559
|
-
background:
|
|
578
|
+
background: var(--kc-panel);
|
|
560
579
|
}
|
|
561
580
|
.kai-code--light .kai-code__tab.is-active {
|
|
562
|
-
background:
|
|
581
|
+
background: var(--kc-background);
|
|
563
582
|
}
|
|
564
583
|
.kai-code--light .kai-code__file.is-active {
|
|
565
|
-
color:
|
|
566
|
-
background:
|
|
584
|
+
color: var(--kc-text);
|
|
585
|
+
background: var(--kc-selection);
|
|
567
586
|
}
|
|
568
587
|
.kai-code--light .kai-code__context-menu,
|
|
569
588
|
.kai-code--light .kai-code__dialog {
|
|
570
|
-
color:
|
|
571
|
-
background:
|
|
572
|
-
border-color:
|
|
589
|
+
color: var(--kc-text);
|
|
590
|
+
background: var(--kc-panel);
|
|
591
|
+
border-color: var(--kc-border);
|
|
573
592
|
}
|
|
574
593
|
.kai-code--light .kai-code__dialog h2,
|
|
575
594
|
.kai-code--light .kai-code__dialog label {
|
|
576
|
-
color:
|
|
595
|
+
color: var(--kc-text);
|
|
577
596
|
}
|
|
578
597
|
.kai-code--light .kai-code__dialog p {
|
|
579
|
-
color:
|
|
598
|
+
color: var(--kc-muted);
|
|
580
599
|
}
|
|
581
600
|
.kai-code--light .kai-code__dialog input {
|
|
582
|
-
color:
|
|
583
|
-
background:
|
|
584
|
-
border-color:
|
|
601
|
+
color: var(--kc-text);
|
|
602
|
+
background: var(--kc-background);
|
|
603
|
+
border-color: var(--kc-accent);
|
|
604
|
+
}
|
|
605
|
+
.kai-code__brand-mark svg,
|
|
606
|
+
.kai-code__welcome-mark svg,
|
|
607
|
+
.kai-code__file-icon svg,
|
|
608
|
+
.kai-code__folder-icon svg,
|
|
609
|
+
.kai-code__icon-button svg,
|
|
610
|
+
.kai-code__context-menu svg,
|
|
611
|
+
.kai-code__tab-close svg {
|
|
612
|
+
display: block;
|
|
613
|
+
width: 1em;
|
|
614
|
+
height: 1em;
|
|
585
615
|
}
|
|
586
616
|
@media (max-width: 760px) {
|
|
587
|
-
.kai-code {
|
|
588
|
-
min-width: 360px;
|
|
589
|
-
}
|
|
590
617
|
.kai-code__sidebar {
|
|
591
|
-
flex-basis: 185px;
|
|
618
|
+
flex-basis: min(38vw, 185px) !important;
|
|
619
|
+
min-width: 125px;
|
|
592
620
|
}
|
|
593
621
|
.kai-code__activity-bar {
|
|
594
622
|
flex-basis: 40px;
|
|
@@ -597,3 +625,30 @@
|
|
|
597
625
|
width: 39px;
|
|
598
626
|
}
|
|
599
627
|
}
|
|
628
|
+
@container (max-width: 560px) {
|
|
629
|
+
.kai-code__activity-bar {
|
|
630
|
+
flex-basis: 38px;
|
|
631
|
+
}
|
|
632
|
+
.kai-code__activity-button {
|
|
633
|
+
width: 37px;
|
|
634
|
+
}
|
|
635
|
+
.kai-code__sidebar {
|
|
636
|
+
flex-basis: 38% !important;
|
|
637
|
+
min-width: 112px;
|
|
638
|
+
}
|
|
639
|
+
.kai-code__sidebar-heading {
|
|
640
|
+
padding-right: 5px;
|
|
641
|
+
padding-left: 9px;
|
|
642
|
+
}
|
|
643
|
+
.kai-code__sidebar-actions {
|
|
644
|
+
gap: 0;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
@container (max-height: 480px) {
|
|
648
|
+
.kai-code__titlebar {
|
|
649
|
+
flex-basis: 32px;
|
|
650
|
+
}
|
|
651
|
+
.kai-code__statusbar {
|
|
652
|
+
flex-basis: 18px;
|
|
653
|
+
}
|
|
654
|
+
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
3
|
import { editor } from 'monaco-editor';
|
|
3
4
|
|
|
4
5
|
interface KaiCodeFile {
|
|
@@ -28,6 +29,10 @@ interface KaiCodeFileSystem {
|
|
|
28
29
|
deleteFile?(path: string): Promise<void>;
|
|
29
30
|
/** Must delete the directory and all of its descendants. */
|
|
30
31
|
deleteDirectory?(path: string): Promise<void>;
|
|
32
|
+
moveFile?(oldPath: string, newPath: string): Promise<void>;
|
|
33
|
+
/** Must move the directory and all of its descendants. */
|
|
34
|
+
moveDirectory?(oldPath: string, newPath: string): Promise<void>;
|
|
35
|
+
/** @deprecated Use `moveFile` instead. */
|
|
31
36
|
renameFile?(oldPath: string, newPath: string): Promise<void>;
|
|
32
37
|
watch?(listener: () => void): () => void;
|
|
33
38
|
}
|
|
@@ -47,10 +52,20 @@ interface KaiCodeProps {
|
|
|
47
52
|
initialActiveFile?: string;
|
|
48
53
|
/** Monaco theme name. Defaults to `vs-dark`. */
|
|
49
54
|
theme?: string;
|
|
55
|
+
/** Name shown in the title bar and Explorer. Defaults to `Workspace`. */
|
|
56
|
+
workspaceName?: string;
|
|
50
57
|
/** Additional Monaco editor options. */
|
|
51
58
|
options?: editor.IStandaloneEditorConstructionOptions;
|
|
52
|
-
/**
|
|
53
|
-
height?:
|
|
59
|
+
/** Height, CSS length, or CSS expression. Defaults to a viewport-responsive height. */
|
|
60
|
+
height?: CSSProperties["height"];
|
|
61
|
+
/** Workbench color overrides. Unspecified colors follow the selected theme. */
|
|
62
|
+
colors?: KaiCodeColors;
|
|
63
|
+
/** Use rounded outer corners by default, or set false for a flat edge-to-edge surface. */
|
|
64
|
+
rounded?: boolean;
|
|
65
|
+
/** Override built-in interface icons with React elements, SVGs, or emoji. */
|
|
66
|
+
icons?: Partial<Record<KaiCodeIconName, ReactNode>>;
|
|
67
|
+
/** Override file icons by lowercase extension (for example `tsx`) or `default`. */
|
|
68
|
+
fileIcons?: Record<string, ReactNode>;
|
|
54
69
|
/** Makes the editor read-only. */
|
|
55
70
|
readOnly?: boolean;
|
|
56
71
|
/** Optional class applied to the outermost element. */
|
|
@@ -60,6 +75,20 @@ interface KaiCodeProps {
|
|
|
60
75
|
/** Called after a document is successfully saved to the filesystem. */
|
|
61
76
|
onSave?: (path: string, contents: string) => void;
|
|
62
77
|
}
|
|
63
|
-
|
|
78
|
+
interface KaiCodeColors {
|
|
79
|
+
background?: string;
|
|
80
|
+
sidebarBackground?: string;
|
|
81
|
+
titlebarBackground?: string;
|
|
82
|
+
panelBackground?: string;
|
|
83
|
+
foreground?: string;
|
|
84
|
+
mutedForeground?: string;
|
|
85
|
+
border?: string;
|
|
86
|
+
accent?: string;
|
|
87
|
+
statusBarBackground?: string;
|
|
88
|
+
statusBarForeground?: string;
|
|
89
|
+
fileSelectionBackground?: string;
|
|
90
|
+
}
|
|
91
|
+
type KaiCodeIconName = "brand" | "explorer" | "folder" | "file" | "newFile" | "newFolder" | "collapseAll" | "close" | "delete" | "move";
|
|
92
|
+
declare function KaiCode({ fileSystem, initialFiles, initialActiveFile, theme, workspaceName, options, height, colors, rounded, icons, fileIcons, readOnly, className, onFileChange, onSave, }: KaiCodeProps): react.JSX.Element;
|
|
64
93
|
|
|
65
|
-
export { KaiCode, type KaiCodeDirectory, type KaiCodeEntry, type KaiCodeFile, type KaiCodeFileSystem, type KaiCodeProps, createMemoryFileSystem, KaiCode as default, normalizePath };
|
|
94
|
+
export { KaiCode, type KaiCodeColors, type KaiCodeDirectory, type KaiCodeEntry, type KaiCodeFile, type KaiCodeFileSystem, type KaiCodeIconName, type KaiCodeProps, createMemoryFileSystem, KaiCode as default, normalizePath };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
3
|
import { editor } from 'monaco-editor';
|
|
3
4
|
|
|
4
5
|
interface KaiCodeFile {
|
|
@@ -28,6 +29,10 @@ interface KaiCodeFileSystem {
|
|
|
28
29
|
deleteFile?(path: string): Promise<void>;
|
|
29
30
|
/** Must delete the directory and all of its descendants. */
|
|
30
31
|
deleteDirectory?(path: string): Promise<void>;
|
|
32
|
+
moveFile?(oldPath: string, newPath: string): Promise<void>;
|
|
33
|
+
/** Must move the directory and all of its descendants. */
|
|
34
|
+
moveDirectory?(oldPath: string, newPath: string): Promise<void>;
|
|
35
|
+
/** @deprecated Use `moveFile` instead. */
|
|
31
36
|
renameFile?(oldPath: string, newPath: string): Promise<void>;
|
|
32
37
|
watch?(listener: () => void): () => void;
|
|
33
38
|
}
|
|
@@ -47,10 +52,20 @@ interface KaiCodeProps {
|
|
|
47
52
|
initialActiveFile?: string;
|
|
48
53
|
/** Monaco theme name. Defaults to `vs-dark`. */
|
|
49
54
|
theme?: string;
|
|
55
|
+
/** Name shown in the title bar and Explorer. Defaults to `Workspace`. */
|
|
56
|
+
workspaceName?: string;
|
|
50
57
|
/** Additional Monaco editor options. */
|
|
51
58
|
options?: editor.IStandaloneEditorConstructionOptions;
|
|
52
|
-
/**
|
|
53
|
-
height?:
|
|
59
|
+
/** Height, CSS length, or CSS expression. Defaults to a viewport-responsive height. */
|
|
60
|
+
height?: CSSProperties["height"];
|
|
61
|
+
/** Workbench color overrides. Unspecified colors follow the selected theme. */
|
|
62
|
+
colors?: KaiCodeColors;
|
|
63
|
+
/** Use rounded outer corners by default, or set false for a flat edge-to-edge surface. */
|
|
64
|
+
rounded?: boolean;
|
|
65
|
+
/** Override built-in interface icons with React elements, SVGs, or emoji. */
|
|
66
|
+
icons?: Partial<Record<KaiCodeIconName, ReactNode>>;
|
|
67
|
+
/** Override file icons by lowercase extension (for example `tsx`) or `default`. */
|
|
68
|
+
fileIcons?: Record<string, ReactNode>;
|
|
54
69
|
/** Makes the editor read-only. */
|
|
55
70
|
readOnly?: boolean;
|
|
56
71
|
/** Optional class applied to the outermost element. */
|
|
@@ -60,6 +75,20 @@ interface KaiCodeProps {
|
|
|
60
75
|
/** Called after a document is successfully saved to the filesystem. */
|
|
61
76
|
onSave?: (path: string, contents: string) => void;
|
|
62
77
|
}
|
|
63
|
-
|
|
78
|
+
interface KaiCodeColors {
|
|
79
|
+
background?: string;
|
|
80
|
+
sidebarBackground?: string;
|
|
81
|
+
titlebarBackground?: string;
|
|
82
|
+
panelBackground?: string;
|
|
83
|
+
foreground?: string;
|
|
84
|
+
mutedForeground?: string;
|
|
85
|
+
border?: string;
|
|
86
|
+
accent?: string;
|
|
87
|
+
statusBarBackground?: string;
|
|
88
|
+
statusBarForeground?: string;
|
|
89
|
+
fileSelectionBackground?: string;
|
|
90
|
+
}
|
|
91
|
+
type KaiCodeIconName = "brand" | "explorer" | "folder" | "file" | "newFile" | "newFolder" | "collapseAll" | "close" | "delete" | "move";
|
|
92
|
+
declare function KaiCode({ fileSystem, initialFiles, initialActiveFile, theme, workspaceName, options, height, colors, rounded, icons, fileIcons, readOnly, className, onFileChange, onSave, }: KaiCodeProps): react.JSX.Element;
|
|
64
93
|
|
|
65
|
-
export { KaiCode, type KaiCodeDirectory, type KaiCodeEntry, type KaiCodeFile, type KaiCodeFileSystem, type KaiCodeProps, createMemoryFileSystem, KaiCode as default, normalizePath };
|
|
94
|
+
export { KaiCode, type KaiCodeColors, type KaiCodeDirectory, type KaiCodeEntry, type KaiCodeFile, type KaiCodeFileSystem, type KaiCodeIconName, type KaiCodeProps, createMemoryFileSystem, KaiCode as default, normalizePath };
|