@jkwd/inbase 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.
Files changed (44) hide show
  1. package/README.md +76 -0
  2. package/apps/explorer/index.html +12 -0
  3. package/apps/explorer/package.json +28 -0
  4. package/apps/explorer/scripts/js-source.mjs +188 -0
  5. package/apps/explorer/scripts/patch-lib.d.ts +115 -0
  6. package/apps/explorer/scripts/patch-lib.mjs +472 -0
  7. package/apps/explorer/scripts/scan-target.mjs +188 -0
  8. package/apps/explorer/scripts/session-store.d.ts +156 -0
  9. package/apps/explorer/scripts/session-store.mjs +809 -0
  10. package/apps/explorer/scripts/target-config.d.ts +8 -0
  11. package/apps/explorer/scripts/target-config.mjs +42 -0
  12. package/apps/explorer/src/App.tsx +941 -0
  13. package/apps/explorer/src/agentIntent.ts +182 -0
  14. package/apps/explorer/src/codebase.ts +15 -0
  15. package/apps/explorer/src/index.css +632 -0
  16. package/apps/explorer/src/layout.ts +508 -0
  17. package/apps/explorer/src/main.tsx +16 -0
  18. package/apps/explorer/src/scene/BlockPlacer.tsx +87 -0
  19. package/apps/explorer/src/scene/Bridge.tsx +290 -0
  20. package/apps/explorer/src/scene/FileBlock.tsx +256 -0
  21. package/apps/explorer/src/scene/FolderArea.tsx +96 -0
  22. package/apps/explorer/src/scene/IslandPlacer.tsx +40 -0
  23. package/apps/explorer/src/scene/MapSelectBorder.tsx +57 -0
  24. package/apps/explorer/src/scene/MapView.tsx +247 -0
  25. package/apps/explorer/src/scene/Player.tsx +245 -0
  26. package/apps/explorer/src/scene/RelationLines.tsx +223 -0
  27. package/apps/explorer/src/scene/SelectionController.tsx +89 -0
  28. package/apps/explorer/src/scene/UserContextTracker.tsx +152 -0
  29. package/apps/explorer/src/scene/World.tsx +323 -0
  30. package/apps/explorer/src/theme.ts +111 -0
  31. package/apps/explorer/src/types.ts +245 -0
  32. package/apps/explorer/src/ui/CanvasErrorBoundary.tsx +38 -0
  33. package/apps/explorer/src/ui/HUD.tsx +1090 -0
  34. package/apps/explorer/src/ui/NameInput.tsx +45 -0
  35. package/apps/explorer/src/userContext.ts +73 -0
  36. package/apps/explorer/src/userCreated.ts +354 -0
  37. package/apps/explorer/src/vite-env.d.ts +1 -0
  38. package/apps/explorer/tsconfig.json +21 -0
  39. package/apps/explorer/vite.config.ts +295 -0
  40. package/bin/inbase.mjs +170 -0
  41. package/bin/project.mjs +94 -0
  42. package/bin/session.mjs +241 -0
  43. package/package.json +63 -0
  44. package/skill/inbase/SKILL.md +167 -0
@@ -0,0 +1,632 @@
1
+ :root {
2
+ /* Greys mirror the Cursor Dark Midnight editor theme. */
3
+ --vc-chrome: #191c22;
4
+ --vc-editor: #1e2127;
5
+ --vc-surface: #272c36;
6
+ --vc-border: #272c36;
7
+ }
8
+
9
+ html,
10
+ body,
11
+ #root {
12
+ width: 100%;
13
+ height: 100%;
14
+ margin: 0;
15
+ overflow: hidden;
16
+ background: var(--vc-chrome);
17
+ color: #e7ebf2;
18
+ font-family: Inter, ui-sans-serif, system-ui, sans-serif;
19
+ }
20
+
21
+ .stage {
22
+ position: absolute;
23
+ inset: 0;
24
+ }
25
+
26
+ * {
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ button {
31
+ font: inherit;
32
+ }
33
+
34
+ .hud {
35
+ position: fixed;
36
+ inset: 0;
37
+ pointer-events: none;
38
+ z-index: 2;
39
+ }
40
+
41
+ .hud-top,
42
+ .hud-panel,
43
+ .hud-gate {
44
+ pointer-events: none;
45
+ }
46
+
47
+ .hud-gate {
48
+ position: absolute;
49
+ inset: 0;
50
+ display: grid;
51
+ place-items: center;
52
+ background: rgba(25, 28, 34, 0.72);
53
+ }
54
+
55
+ .boot {
56
+ position: fixed;
57
+ inset: 0;
58
+ display: grid;
59
+ place-items: center;
60
+ background: var(--vc-chrome);
61
+ color: #e7ebf2;
62
+ font-size: 15px;
63
+ }
64
+
65
+ .canvas-error .hud-button {
66
+ margin-top: 12px;
67
+ }
68
+
69
+ .hud-gate-card {
70
+ width: min(520px, calc(100% - 32px));
71
+ padding: 28px;
72
+ background: var(--vc-editor);
73
+ border: 1px solid var(--vc-border);
74
+ }
75
+
76
+ .hud-gate-card h1 {
77
+ margin: 0 0 8px;
78
+ font-size: 28px;
79
+ font-weight: 600;
80
+ }
81
+
82
+ .hud-gate-card p {
83
+ margin: 0 0 12px;
84
+ color: #b7c0ce;
85
+ line-height: 1.5;
86
+ }
87
+
88
+ .hud-gate-card kbd {
89
+ display: inline-block;
90
+ padding: 1px 6px;
91
+ border: 1px solid #3a4250;
92
+ background: var(--vc-surface);
93
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
94
+ font-size: 12px;
95
+ }
96
+
97
+ .crosshair {
98
+ position: absolute;
99
+ top: 50%;
100
+ left: 50%;
101
+ width: 10px;
102
+ height: 10px;
103
+ transform: translate(-50%, -50%);
104
+ }
105
+
106
+ .crosshair::before,
107
+ .crosshair::after {
108
+ content: '';
109
+ position: absolute;
110
+ background: #e7ebf2;
111
+ }
112
+
113
+ .crosshair::before {
114
+ left: 4px;
115
+ top: 0;
116
+ width: 2px;
117
+ height: 10px;
118
+ }
119
+
120
+ .crosshair::after {
121
+ left: 0;
122
+ top: 4px;
123
+ width: 10px;
124
+ height: 2px;
125
+ }
126
+
127
+ .crosshair[data-aim='true']::before,
128
+ .crosshair[data-aim='true']::after {
129
+ background: #6ad2ff;
130
+ }
131
+
132
+ .hud-aim {
133
+ position: absolute;
134
+ top: calc(50% + 18px);
135
+ left: 50%;
136
+ transform: translateX(-50%);
137
+ padding: 6px 10px;
138
+ background: rgba(25, 28, 34, 0.86);
139
+ border: 1px solid #6ad2ff;
140
+ color: #d7eef8;
141
+ font-size: 12px;
142
+ letter-spacing: 0.02em;
143
+ white-space: nowrap;
144
+ }
145
+
146
+ .hud-top {
147
+ position: absolute;
148
+ top: 20px;
149
+ left: 20px;
150
+ right: 20px;
151
+ display: flex;
152
+ justify-content: space-between;
153
+ gap: 16px;
154
+ align-items: center;
155
+ flex-wrap: wrap;
156
+ }
157
+
158
+ .hud-mode {
159
+ display: flex;
160
+ gap: 8px;
161
+ pointer-events: auto;
162
+ flex-wrap: wrap;
163
+ justify-content: flex-end;
164
+ }
165
+
166
+ .hud-button {
167
+ pointer-events: auto;
168
+ cursor: pointer;
169
+ color: inherit;
170
+ background: rgba(25, 28, 34, 0.86);
171
+ border: 1px solid var(--vc-border);
172
+ padding: 8px 12px;
173
+ }
174
+
175
+ .hud-button[data-active='true'] {
176
+ border-color: #5d9ec4;
177
+ color: #d7eef8;
178
+ }
179
+
180
+ .hud-chip,
181
+ .hud-panel {
182
+ background: rgba(25, 28, 34, 0.86);
183
+ border: 1px solid var(--vc-border);
184
+ }
185
+
186
+ .hud-chip {
187
+ padding: 8px 12px;
188
+ font-size: 13px;
189
+ letter-spacing: 0.02em;
190
+ }
191
+
192
+ .map-folder-label {
193
+ display: grid;
194
+ min-width: max-content;
195
+ padding: 4px 7px;
196
+ color: #f1f5fa;
197
+ background: rgba(25, 28, 34, 0.92);
198
+ border: 1px solid #59697d;
199
+ border-radius: 3px;
200
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
201
+ text-align: center;
202
+ white-space: nowrap;
203
+ }
204
+
205
+ .map-folder-name {
206
+ font-size: 12px;
207
+ font-weight: 700;
208
+ line-height: 1.2;
209
+ }
210
+
211
+ .map-folder-label-added {
212
+ color: #d7f3ff;
213
+ border-color: #7ec8e8;
214
+ background: rgba(18, 48, 62, 0.92);
215
+ }
216
+
217
+ .map-folder-label-add {
218
+ color: #b8ffd0;
219
+ border-color: #22ff66;
220
+ background: rgba(8, 48, 24, 0.94);
221
+ }
222
+
223
+ .map-folder-label-edit {
224
+ color: #cde4ff;
225
+ border-color: #2f8cff;
226
+ background: rgba(6, 28, 58, 0.94);
227
+ }
228
+
229
+ .map-folder-label-remove {
230
+ color: #ffd0d6;
231
+ border-color: #ff2d4a;
232
+ background: rgba(58, 8, 16, 0.94);
233
+ }
234
+
235
+ .map-folder-label-selected {
236
+ color: #f1f5fa;
237
+ border: 3px solid #000000;
238
+ background: rgba(25, 28, 34, 0.94);
239
+ }
240
+
241
+ .hud-bottom {
242
+ position: absolute;
243
+ left: 0;
244
+ right: 0;
245
+ bottom: 0;
246
+ display: flex;
247
+ align-items: center;
248
+ justify-content: space-between;
249
+ gap: 16px;
250
+ padding: 10px 20px;
251
+ background: rgba(25, 28, 34, 0.92);
252
+ border-top: 1px solid var(--vc-border);
253
+ pointer-events: auto;
254
+ }
255
+
256
+ .hud-hints {
257
+ display: flex;
258
+ gap: 8px;
259
+ flex-wrap: wrap;
260
+ color: #9aa3b2;
261
+ font-size: 12px;
262
+ }
263
+
264
+ .hud-icon-row {
265
+ display: flex;
266
+ gap: 8px;
267
+ flex: none;
268
+ }
269
+
270
+ .hud-icon-button {
271
+ position: relative;
272
+ display: grid;
273
+ place-items: center;
274
+ width: 36px;
275
+ height: 36px;
276
+ padding: 0;
277
+ flex: none;
278
+ }
279
+
280
+ .hud-tooltip {
281
+ position: absolute;
282
+ right: 0;
283
+ bottom: calc(100% + 8px);
284
+ padding: 6px 10px;
285
+ background: rgba(25, 28, 34, 0.96);
286
+ border: 1px solid var(--vc-border);
287
+ color: #e7ebf2;
288
+ font-size: 12px;
289
+ letter-spacing: 0.02em;
290
+ white-space: nowrap;
291
+ opacity: 0;
292
+ pointer-events: none;
293
+ transform: translateY(4px);
294
+ transition:
295
+ opacity 0.12s ease,
296
+ transform 0.12s ease;
297
+ }
298
+
299
+ .hud-icon-button:hover .hud-tooltip,
300
+ .hud-icon-button:focus-visible .hud-tooltip {
301
+ opacity: 1;
302
+ transform: translateY(0);
303
+ }
304
+
305
+ .hud-panel {
306
+ position: absolute;
307
+ top: 68px;
308
+ right: 20px;
309
+ width: min(320px, calc(100% - 40px));
310
+ max-height: calc(100dvh - 132px);
311
+ overflow: auto;
312
+ overscroll-behavior: contain;
313
+ padding: 16px;
314
+ }
315
+
316
+ .hud-panel-info {
317
+ pointer-events: auto;
318
+ }
319
+
320
+ .hud-panel-planned {
321
+ left: 20px;
322
+ right: auto;
323
+ width: min(360px, calc(100% - 40px));
324
+ border-color: #9ad8ff;
325
+ pointer-events: auto;
326
+ }
327
+
328
+ .hud-panel-done {
329
+ border-color: #22ff66;
330
+ }
331
+
332
+ .hud-feature {
333
+ margin: 6px 0 8px;
334
+ color: #e7ebf2;
335
+ font-weight: 600;
336
+ }
337
+
338
+ .hud-panel-planned kbd {
339
+ display: inline-block;
340
+ padding: 1px 6px;
341
+ border: 1px solid #3a4250;
342
+ background: var(--vc-surface);
343
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
344
+ font-size: 12px;
345
+ }
346
+
347
+ .hud-panel-planned p {
348
+ margin: 0;
349
+ color: #b7c0ce;
350
+ line-height: 1.4;
351
+ }
352
+
353
+ .hud-steps {
354
+ margin: 10px 0 0;
355
+ padding-left: 18px;
356
+ color: #8b95a5;
357
+ }
358
+
359
+ .hud-steps li {
360
+ margin: 0 0 6px;
361
+ }
362
+
363
+ .hud-step-main {
364
+ display: inline-flex;
365
+ align-items: baseline;
366
+ gap: 8px;
367
+ }
368
+
369
+ .hud-steps li[data-next='true'] {
370
+ color: #ffffff;
371
+ }
372
+
373
+ .hud-steps li[data-next='true'] .hud-step-title {
374
+ color: #ffffff;
375
+ text-decoration: underline;
376
+ text-underline-offset: 3px;
377
+ }
378
+
379
+ .hud-steps li[data-current='true']:not([data-next='true']):not([data-done='true']) {
380
+ color: #9ad8ff;
381
+ }
382
+
383
+ .hud-steps li[data-done='true'],
384
+ .hud-steps li[data-done='true'] .hud-step-title {
385
+ color: #3dff78;
386
+ font-weight: 600;
387
+ text-decoration: none;
388
+ }
389
+
390
+ .hud-run-step {
391
+ flex: none;
392
+ padding: 4px 8px;
393
+ font-size: 11px;
394
+ text-decoration: none;
395
+ }
396
+
397
+ .hud-panel-planned .hud-section-title {
398
+ margin-top: 0;
399
+ color: #9ad8ff;
400
+ }
401
+
402
+ .hud-panel-planned p + .hud-section-title,
403
+ .hud-panel-planned ol + .hud-section-title,
404
+ .hud-panel-planned .hud-section-title + .hud-section-title,
405
+ .hud-panel-planned ul + .hud-section-title {
406
+ margin-top: 12px;
407
+ }
408
+
409
+ .hud-instruction {
410
+ display: grid;
411
+ gap: 6px;
412
+ margin-top: 14px;
413
+ color: #b7c0ce;
414
+ font-size: 11px;
415
+ }
416
+
417
+ .hud-instruction textarea {
418
+ width: 100%;
419
+ resize: vertical;
420
+ color: #e7ebf2;
421
+ background: var(--vc-surface);
422
+ border: 1px solid #3a4250;
423
+ padding: 8px;
424
+ font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
425
+ }
426
+
427
+ .hud-instruction textarea:focus {
428
+ border-color: #d6b56a;
429
+ outline: none;
430
+ }
431
+
432
+ .hud-working {
433
+ display: flex;
434
+ align-items: center;
435
+ gap: 9px;
436
+ margin-top: 12px;
437
+ color: #d7eef8;
438
+ font-size: 12px;
439
+ }
440
+
441
+ .hud-spinner {
442
+ width: 14px;
443
+ height: 14px;
444
+ border: 2px solid #34495a;
445
+ border-top-color: #9ad8ff;
446
+ border-radius: 50%;
447
+ animation: hud-spin 0.8s linear infinite;
448
+ }
449
+
450
+ @keyframes hud-spin {
451
+ to {
452
+ transform: rotate(360deg);
453
+ }
454
+ }
455
+
456
+ .hud-map-blueprint {
457
+ margin-top: 14px;
458
+ }
459
+
460
+ .hud-decide {
461
+ display: flex;
462
+ flex-wrap: wrap;
463
+ gap: 8px;
464
+ margin-top: 16px;
465
+ }
466
+
467
+ .hud-decide .hud-button:disabled {
468
+ cursor: default;
469
+ opacity: 0.4;
470
+ }
471
+
472
+ .hud-chain {
473
+ display: flex;
474
+ align-items: center;
475
+ justify-content: space-between;
476
+ gap: 8px;
477
+ margin-top: 14px;
478
+ color: #b7c0ce;
479
+ font-size: 11px;
480
+ }
481
+
482
+ .hud-chain .hud-button {
483
+ padding: 5px 8px;
484
+ }
485
+
486
+ .hud-chain .hud-button:disabled {
487
+ cursor: default;
488
+ opacity: 0.35;
489
+ }
490
+
491
+ .hud-button-approve {
492
+ border-color: #9ad8ff;
493
+ color: #d7eef8;
494
+ }
495
+
496
+ .hud-button-extend {
497
+ border-color: #d6b56a;
498
+ color: #f3e6c4;
499
+ }
500
+
501
+ .hud-button-reject {
502
+ border-color: #8a4a4a;
503
+ }
504
+
505
+ .hud-panel h2 {
506
+ margin: 0 0 4px;
507
+ font-size: 16px;
508
+ }
509
+
510
+ .hud-panel .path {
511
+ margin: 0 0 12px;
512
+ color: #8b95a5;
513
+ font-size: 12px;
514
+ word-break: break-all;
515
+ }
516
+
517
+ .hud-panel ul {
518
+ margin: 8px 0 0;
519
+ padding-left: 18px;
520
+ }
521
+
522
+ .hud-panel li {
523
+ margin: 0 0 4px;
524
+ display: flex;
525
+ align-items: center;
526
+ justify-content: space-between;
527
+ gap: 8px;
528
+ }
529
+
530
+ .hud-intended {
531
+ color: #7ec8e8;
532
+ }
533
+
534
+ .hud-item-remove {
535
+ flex: none;
536
+ padding: 0 6px;
537
+ color: #b7c0ce;
538
+ background: transparent;
539
+ border: 1px solid transparent;
540
+ cursor: pointer;
541
+ line-height: 1.2;
542
+ }
543
+
544
+ .hud-item-remove:hover,
545
+ .hud-item-remove:focus-visible {
546
+ color: #ff5a72;
547
+ border-color: #8a4a4a;
548
+ }
549
+
550
+ .hud-add-row {
551
+ display: flex;
552
+ gap: 6px;
553
+ margin-top: 8px;
554
+ }
555
+
556
+ .hud-add-row input {
557
+ min-width: 0;
558
+ flex: 1;
559
+ padding: 6px 8px;
560
+ color: #e7ebf2;
561
+ background: rgba(25, 28, 34, 0.96);
562
+ border: 1px solid #3a4250;
563
+ font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
564
+ outline: none;
565
+ }
566
+
567
+ .hud-add-row input:focus {
568
+ border-color: #9ad8ff;
569
+ }
570
+
571
+ .hud-add-row .hud-button {
572
+ flex: none;
573
+ padding: 5px 8px;
574
+ }
575
+
576
+ .hud-section-title {
577
+ margin: 12px 0 0;
578
+ color: #b7c0ce;
579
+ font-size: 11px;
580
+ letter-spacing: 0.08em;
581
+ text-transform: uppercase;
582
+ }
583
+
584
+ .hud-file-add,
585
+ .hud-panel-planned .hud-section-title.hud-section-title-add {
586
+ color: #3dff78;
587
+ font-weight: 600;
588
+ }
589
+
590
+ .hud-file-edit,
591
+ .hud-panel-planned .hud-section-title.hud-section-title-edit {
592
+ color: #5cb8ff;
593
+ font-weight: 600;
594
+ }
595
+
596
+ .hud-file-remove,
597
+ .hud-panel-planned .hud-section-title.hud-section-title-remove {
598
+ color: #ff5a72;
599
+ font-weight: 600;
600
+ }
601
+
602
+ .block-name-overlay {
603
+ z-index: 20 !important;
604
+ pointer-events: auto;
605
+ }
606
+
607
+ .hud-name-gate {
608
+ position: absolute;
609
+ top: 42%;
610
+ left: 50%;
611
+ transform: translate(-50%, -50%);
612
+ pointer-events: auto;
613
+ z-index: 4;
614
+ }
615
+
616
+ .block-name-form {
617
+ pointer-events: auto;
618
+ }
619
+
620
+ .block-name-input {
621
+ width: 220px;
622
+ padding: 8px 10px;
623
+ color: #e7ebf2;
624
+ background: rgba(25, 28, 34, 0.96);
625
+ border: 1px solid #9ad8ff;
626
+ font: 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
627
+ outline: none;
628
+ }
629
+
630
+ .block-name-input:focus {
631
+ border-color: #d7eef8;
632
+ }