@lensmap/starlight 0.0.0-stage → 0.2.1

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,726 @@
1
+ /* ../../apps/web/src/viewer.css */
2
+ :where(.lensmap-viewer) {
3
+ font-family:
4
+ Inter,
5
+ ui-sans-serif,
6
+ system-ui,
7
+ sans-serif;
8
+ color: #e7eef4;
9
+ background: #10171f;
10
+ color-scheme: dark;
11
+ font-synthesis: none;
12
+ &,
13
+ & * {
14
+ box-sizing: border-box;
15
+ }
16
+ button,
17
+ input,
18
+ textarea {
19
+ font: inherit;
20
+ }
21
+ button {
22
+ color: inherit;
23
+ cursor: pointer;
24
+ border: 1px solid #374451;
25
+ border-radius: 8px;
26
+ background: #202c38;
27
+ padding: 8px 12px;
28
+ }
29
+ button:hover {
30
+ background: #2b3a49;
31
+ }
32
+ button:disabled {
33
+ opacity: 0.4;
34
+ cursor: default;
35
+ }
36
+ button:focus-visible,
37
+ a:focus-visible,
38
+ input:focus-visible,
39
+ textarea:focus-visible,
40
+ summary:focus-visible,
41
+ .sidebar-resizer:focus-visible,
42
+ .map:focus-visible {
43
+ outline: 3px solid #f7c46c;
44
+ outline-offset: 4px;
45
+ }
46
+ & {
47
+ max-width: 1800px;
48
+ margin: auto;
49
+ padding: 28px 36px 18px;
50
+ }
51
+ .masthead {
52
+ display: flex;
53
+ align-items: center;
54
+ gap: 24px;
55
+ margin-bottom: 26px;
56
+ }
57
+ .brand {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: 10px;
61
+ }
62
+ h1 {
63
+ margin: 0;
64
+ font-size: 25px;
65
+ letter-spacing: -1px;
66
+ }
67
+ .brand-mark {
68
+ color: #a9d7d2;
69
+ font-size: 34px;
70
+ }
71
+ .tag,
72
+ .phase,
73
+ .note-eyebrow,
74
+ .map-caption,
75
+ .page-footer {
76
+ font-family: ui-monospace, monospace;
77
+ font-size: 11px;
78
+ letter-spacing: 0.07em;
79
+ }
80
+ .tag {
81
+ color: #abc4c8;
82
+ background: #233238;
83
+ border-radius: 5px;
84
+ padding: 6px 8px;
85
+ margin-left: 6px;
86
+ }
87
+ .masthead > p {
88
+ color: #9aaab8;
89
+ font-size: 13px;
90
+ }
91
+ .phase {
92
+ color: #b4bec9;
93
+ margin-left: auto;
94
+ white-space: nowrap;
95
+ }
96
+ .workspace {
97
+ display: grid;
98
+ grid-template-columns: minmax(0, 1fr) 10px var(--sidebar-width, 340px);
99
+ border: 1px solid #35434f;
100
+ border-radius: 16px;
101
+ overflow: hidden;
102
+ background: #16212b;
103
+ }
104
+ .workspace.canvas-only {
105
+ grid-template-columns: minmax(0, 1fr);
106
+ }
107
+ .map-column {
108
+ min-width: 0;
109
+ }
110
+ .toolbar {
111
+ display: flex;
112
+ flex-wrap: wrap;
113
+ align-items: center;
114
+ gap: 14px;
115
+ padding: 14px 18px;
116
+ border-bottom: 1px solid #35434f;
117
+ background: #1b2732;
118
+ }
119
+ .segmented {
120
+ display: flex;
121
+ border: none;
122
+ margin: 0;
123
+ min-width: 0;
124
+ background: #101b25;
125
+ padding: 3px;
126
+ border-radius: 9px;
127
+ gap: 3px;
128
+ }
129
+ .segmented button {
130
+ border: none;
131
+ background: transparent;
132
+ color: #a7b7c6;
133
+ font-size: 12px;
134
+ }
135
+ .segmented button[aria-pressed=true] {
136
+ color: #edf8f7;
137
+ background: #365054;
138
+ }
139
+ .strength {
140
+ display: flex;
141
+ gap: 8px;
142
+ align-items: center;
143
+ color: #bdcbd6;
144
+ font-size: 12px;
145
+ }
146
+ .strength input {
147
+ accent-color: #9ad6c9;
148
+ width: 88px;
149
+ }
150
+ .strength output {
151
+ min-width: 28px;
152
+ font-variant-numeric: tabular-nums;
153
+ }
154
+ .quiet {
155
+ font-size: 12px;
156
+ margin-left: auto;
157
+ background: transparent;
158
+ }
159
+ .map {
160
+ height: clamp(490px, 67vh, 780px);
161
+ position: relative;
162
+ overflow: hidden;
163
+ isolation: isolate;
164
+ cursor: grab;
165
+ touch-action: none;
166
+ user-select: none;
167
+ background-color: #14202a;
168
+ background-image: radial-gradient(#3b4a553d 1px, transparent 1px);
169
+ background-size: 24px 24px;
170
+ }
171
+ .map.dragging {
172
+ cursor: grabbing;
173
+ }
174
+ .map.overview {
175
+ cursor: default;
176
+ }
177
+ .graph-scene {
178
+ position: absolute;
179
+ inset: 0;
180
+ transform-origin: center;
181
+ }
182
+ .focus-ring {
183
+ position: absolute;
184
+ width: 260px;
185
+ height: 260px;
186
+ border-radius: 50%;
187
+ left: 50%;
188
+ top: 50%;
189
+ transform: translate(-50%, -50%);
190
+ border: 1px solid #99cfcf15;
191
+ box-shadow: 0 0 100px 65px #9edbc704;
192
+ pointer-events: none;
193
+ }
194
+ .map-caption {
195
+ color: #98adb9;
196
+ font-size: 10px;
197
+ }
198
+ .connections {
199
+ position: absolute;
200
+ inset: 0;
201
+ pointer-events: none;
202
+ overflow: visible;
203
+ }
204
+ .edge {
205
+ fill: none;
206
+ stroke-width: 2.5;
207
+ opacity: 0.92;
208
+ }
209
+ .edge-hit {
210
+ fill: none;
211
+ stroke: transparent;
212
+ stroke-width: 16;
213
+ pointer-events: stroke;
214
+ }
215
+ .destination-icon {
216
+ display: block;
217
+ font-size: 1.4em;
218
+ }
219
+ .portal-actions p {
220
+ overflow-wrap: anywhere;
221
+ }
222
+ .edge.context {
223
+ opacity: 0.45;
224
+ }
225
+ .neighbourhood-action {
226
+ font-size: 12px;
227
+ }
228
+ .neighbourhood-label {
229
+ color: #a9d7d2;
230
+ font-size: 11px;
231
+ }
232
+ .edge.connected {
233
+ stroke-width: 3.5;
234
+ opacity: 1;
235
+ filter: drop-shadow(0 0 2px currentColor) drop-shadow(0 0 6px currentColor);
236
+ }
237
+ .edge.connection-preview {
238
+ stroke-width: 4;
239
+ opacity: 1;
240
+ filter: drop-shadow(0 0 2px #d5f4ed) drop-shadow(0 0 7px currentColor);
241
+ }
242
+ .connection-chooser {
243
+ position: absolute;
244
+ top: 12px;
245
+ right: 12px;
246
+ width: min(290px, calc(100% - 24px));
247
+ max-height: 45%;
248
+ z-index: 6;
249
+ display: flex;
250
+ flex-direction: column;
251
+ padding: 12px;
252
+ border: 1px solid #89bfb3;
253
+ border-radius: 10px;
254
+ background: #162832f5;
255
+ font-size: 11px;
256
+ user-select: text;
257
+ }
258
+ .connection-chooser h2 {
259
+ margin: 0 0 6px;
260
+ font-size: 13px;
261
+ }
262
+ .connection-chooser p {
263
+ margin: 0 0 8px;
264
+ line-height: 1.4;
265
+ }
266
+ .connection-chooser ol {
267
+ padding: 0;
268
+ margin: 0 0 8px;
269
+ list-style: none;
270
+ overflow: auto;
271
+ min-height: 0;
272
+ }
273
+ .connection-chooser li + li {
274
+ margin-top: 5px;
275
+ }
276
+ .connection-option {
277
+ width: 100%;
278
+ text-align: left;
279
+ overflow-wrap: anywhere;
280
+ padding: 7px 9px;
281
+ }
282
+ .connection-chooser strong,
283
+ .connection-chooser span {
284
+ display: block;
285
+ }
286
+ .connection-chooser span {
287
+ color: #bdcbd6;
288
+ margin-top: 3px;
289
+ }
290
+ .connection-option[aria-pressed=true] {
291
+ border-color: #d5f4ed;
292
+ background: #304c51;
293
+ }
294
+ .connection-chooser .outside-view {
295
+ color: #f7c46c;
296
+ }
297
+ .connection-actions {
298
+ display: flex;
299
+ flex-wrap: wrap;
300
+ gap: 6px;
301
+ }
302
+ .connection-actions button {
303
+ font-size: 11px;
304
+ padding: 6px 8px;
305
+ }
306
+ .edge-halo {
307
+ fill: none;
308
+ stroke: #14202a;
309
+ stroke-width: 8;
310
+ }
311
+ .node {
312
+ position: absolute;
313
+ width: 86px;
314
+ height: 86px;
315
+ border: 1.8px solid;
316
+ border-radius: 50%;
317
+ background: #1d303d;
318
+ display: flex;
319
+ justify-content: center;
320
+ align-items: center;
321
+ padding: 10px;
322
+ font-size: 12px;
323
+ line-height: 1.3;
324
+ text-align: center;
325
+ box-shadow: 0 5px 12px #0003;
326
+ transform-origin: center;
327
+ }
328
+ .node > span {
329
+ display: -webkit-box;
330
+ -webkit-line-clamp: 3;
331
+ -webkit-box-orient: vertical;
332
+ overflow: hidden;
333
+ }
334
+ .node.connected,
335
+ .node.selected {
336
+ border-width: 2.5px;
337
+ box-shadow:
338
+ 0 0 5px 1px var(--branch-colour),
339
+ 0 0 18px color-mix(in srgb, var(--branch-colour) 80%, transparent),
340
+ inset 0 0 8px color-mix(in srgb, var(--branch-colour) 30%, transparent);
341
+ }
342
+ .node:hover {
343
+ background: #334754;
344
+ z-index: 3;
345
+ }
346
+ .node.selected {
347
+ background: #2d4651;
348
+ filter: brightness(1.15);
349
+ z-index: 2;
350
+ }
351
+ .node:focus-visible {
352
+ z-index: 4;
353
+ outline: 3px solid #f7c46c;
354
+ outline-offset: 5px;
355
+ }
356
+ .node[data-keyboard-target=true]::after {
357
+ content: "";
358
+ position: absolute;
359
+ inset: -10px;
360
+ border: 2px dashed #d5f4ed;
361
+ border-radius: 50%;
362
+ pointer-events: none;
363
+ }
364
+ .keyboard-target-label {
365
+ color: #d5f4ed;
366
+ }
367
+ .node.unresolved {
368
+ border-style: dashed;
369
+ font-size: 26px;
370
+ }
371
+ .map.dragging .node {
372
+ cursor: grabbing;
373
+ }
374
+ .zoom-controls {
375
+ position: absolute;
376
+ bottom: 18px;
377
+ left: 18px;
378
+ display: flex;
379
+ align-items: center;
380
+ gap: 6px;
381
+ z-index: 5;
382
+ border: 1px solid #3b4a55;
383
+ padding: 4px;
384
+ border-radius: 10px;
385
+ background: #18242ff5;
386
+ }
387
+ .zoom-controls button {
388
+ border: none;
389
+ padding: 3px 10px;
390
+ font-size: 20px;
391
+ background: transparent;
392
+ }
393
+ .zoom-controls output {
394
+ font-size: 12px;
395
+ min-width: 42px;
396
+ text-align: center;
397
+ }
398
+ .map-footer {
399
+ padding: 13px 18px;
400
+ color: #aebfca;
401
+ font-size: 11px;
402
+ border-top: 1px solid #35434f;
403
+ }
404
+ .map-footer p {
405
+ margin: 0 0 9px;
406
+ line-height: 1.6;
407
+ }
408
+ .legend {
409
+ display: flex;
410
+ gap: 22px;
411
+ color: #d4dfeb;
412
+ }
413
+ .notes {
414
+ padding: 24px;
415
+ background: #1c2833;
416
+ display: flex;
417
+ flex-direction: column;
418
+ min-width: 0;
419
+ max-height: calc(clamp(490px, 67vh, 780px) + 200px);
420
+ overflow: auto;
421
+ }
422
+ .sidebar-resizer {
423
+ width: 10px;
424
+ border: none;
425
+ margin: 0;
426
+ background: #23333f;
427
+ cursor: col-resize;
428
+ touch-action: none;
429
+ user-select: none;
430
+ }
431
+ .sidebar-resizer:hover,
432
+ .sidebar-resizer:focus-visible {
433
+ background: #659a9b;
434
+ }
435
+ .sidebar-section {
436
+ border-top: 1px solid #3a4855;
437
+ padding: 14px 0;
438
+ }
439
+ .sidebar-section > summary {
440
+ color: #c3d5dc;
441
+ cursor: pointer;
442
+ font-size: 12px;
443
+ font-weight: 600;
444
+ }
445
+ .sidebar-section[open] > summary {
446
+ margin-bottom: 16px;
447
+ }
448
+ .source-label {
449
+ display: block;
450
+ font-size: 12px;
451
+ margin-bottom: 8px;
452
+ }
453
+ .playground textarea {
454
+ display: block;
455
+ width: 100%;
456
+ min-height: 220px;
457
+ height: 360px;
458
+ resize: vertical;
459
+ padding: 12px;
460
+ border: 1px solid #536b78;
461
+ border-radius: 6px;
462
+ background: #101b24;
463
+ color: #dce9ed;
464
+ font: 12px / 1.65 ui-monospace, monospace;
465
+ tab-size: 2;
466
+ }
467
+ .editor-help,
468
+ .editor-state {
469
+ color: #b0c2cd;
470
+ font-size: 11px;
471
+ line-height: 1.7;
472
+ }
473
+ .editor-state {
474
+ overflow-wrap: anywhere;
475
+ }
476
+ .editor-actions {
477
+ display: flex;
478
+ flex-wrap: wrap;
479
+ gap: 8px;
480
+ margin-top: 12px;
481
+ }
482
+ .editor-actions button {
483
+ font-size: 12px;
484
+ }
485
+ .source-error {
486
+ color: #ffc2b5;
487
+ background: #412c2b;
488
+ padding: 12px;
489
+ border-radius: 6px;
490
+ font-size: 11px;
491
+ white-space: pre-wrap;
492
+ overflow-wrap: anywhere;
493
+ }
494
+ .empty-map {
495
+ position: absolute;
496
+ inset: 0;
497
+ display: grid;
498
+ place-content: center;
499
+ padding: 32px;
500
+ text-align: center;
501
+ color: #b6cbd5;
502
+ }
503
+ .empty-map h2 {
504
+ font-family: Georgia, serif;
505
+ font-weight: normal;
506
+ }
507
+ .note-eyebrow {
508
+ display: flex;
509
+ justify-content: space-between;
510
+ color: #a3c7c7;
511
+ margin-bottom: 26px;
512
+ }
513
+ .note-content {
514
+ line-height: 1.8;
515
+ font-size: 14px;
516
+ color: #c9d5df;
517
+ overflow-wrap: anywhere;
518
+ }
519
+ .note-content h2 {
520
+ color: #f0f4f6;
521
+ font-family: Georgia, serif;
522
+ font-weight: normal;
523
+ font-size: 30px;
524
+ margin: 0 0 18px;
525
+ line-height: 1.25;
526
+ }
527
+ .note-content ul {
528
+ padding-left: 20px;
529
+ }
530
+ .note-content blockquote {
531
+ margin-left: 0;
532
+ padding-left: 16px;
533
+ border-left: 2px solid #a9d7d2;
534
+ font-style: italic;
535
+ }
536
+ a {
537
+ color: #a3d7ff;
538
+ text-underline-offset: 3px;
539
+ }
540
+ .outgoing {
541
+ margin-top: 0;
542
+ }
543
+ .outgoing button {
544
+ display: flex;
545
+ width: 100%;
546
+ justify-content: space-between;
547
+ background: transparent;
548
+ border: none;
549
+ padding: 9px 0;
550
+ font-size: 13px;
551
+ text-align: left;
552
+ }
553
+ .outgoing button:hover {
554
+ color: #aee2d7;
555
+ }
556
+ .outgoing p {
557
+ color: #a4b5c2;
558
+ font-size: 12px;
559
+ }
560
+ .page-footer {
561
+ display: flex;
562
+ justify-content: space-between;
563
+ color: #93a5b4;
564
+ padding-top: 18px;
565
+ font-size: 10px;
566
+ gap: 16px;
567
+ }
568
+ .sr-only {
569
+ position: absolute;
570
+ width: 1px;
571
+ height: 1px;
572
+ padding: 0;
573
+ margin: -1px;
574
+ overflow: hidden;
575
+ clip-path: inset(50%);
576
+ white-space: nowrap;
577
+ }
578
+ @media (max-width: 1100px) {
579
+ & {
580
+ padding: 20px;
581
+ }
582
+ .masthead > p {
583
+ display: none;
584
+ }
585
+ .toolbar {
586
+ gap: 9px;
587
+ }
588
+ .quiet {
589
+ margin-left: 0;
590
+ }
591
+ }
592
+ @media (max-width: 760px) {
593
+ & {
594
+ padding: 14px;
595
+ }
596
+ .masthead {
597
+ flex-wrap: wrap;
598
+ gap: 8px;
599
+ margin-bottom: 14px;
600
+ }
601
+ .phase {
602
+ display: none;
603
+ }
604
+ .tag {
605
+ font-size: 10px;
606
+ }
607
+ .workspace {
608
+ grid-template-columns: minmax(0, 1fr);
609
+ }
610
+ .map {
611
+ height: 510px;
612
+ }
613
+ .notes {
614
+ border-top: 1px solid #35434f;
615
+ max-height: none;
616
+ }
617
+ .sidebar-resizer {
618
+ display: none;
619
+ }
620
+ .note-eyebrow {
621
+ margin-bottom: 18px;
622
+ }
623
+ .page-footer {
624
+ flex-direction: column;
625
+ gap: 7px;
626
+ }
627
+ .map-caption {
628
+ font-size: 9px;
629
+ }
630
+ .toolbar {
631
+ padding: 12px;
632
+ }
633
+ .strength {
634
+ font-size: 11px;
635
+ }
636
+ .strength input {
637
+ width: 70px;
638
+ }
639
+ }
640
+ &.lensmap-embedded {
641
+ max-width: none;
642
+ margin: 0;
643
+ padding: 0;
644
+ }
645
+ }
646
+
647
+ /* src/viewer-theme.css */
648
+ [data-lensmap-document] .lensmap-viewer {
649
+ font-family: inherit;
650
+ color: var(--sl-color-text);
651
+ background: var(--sl-color-bg);
652
+ color-scheme: inherit;
653
+ }
654
+ [data-lensmap-document] .lensmap-viewer .workspace {
655
+ border-color: var(--sl-color-hairline-light);
656
+ background: var(--sl-color-bg);
657
+ }
658
+ [data-lensmap-document] .lensmap-viewer .toolbar {
659
+ border-color: var(--sl-color-hairline-light);
660
+ background: var(--sl-color-bg-nav);
661
+ }
662
+ [data-lensmap-document] .lensmap-viewer button:not(.node) {
663
+ color: var(--sl-color-text);
664
+ border-color: var(--sl-color-gray-5);
665
+ background: var(--sl-color-bg-sidebar);
666
+ }
667
+ [data-lensmap-document] .lensmap-viewer button:not(.node):hover {
668
+ background: var(--sl-color-gray-6);
669
+ }
670
+ [data-lensmap-document] .lensmap-viewer .segmented {
671
+ background: var(--sl-color-bg);
672
+ }
673
+ [data-lensmap-document] .lensmap-viewer .segmented button {
674
+ background: transparent;
675
+ color: var(--sl-color-text);
676
+ }
677
+ [data-lensmap-document] .lensmap-viewer .segmented button[aria-pressed=true],
678
+ [data-lensmap-document] .lensmap-viewer .connection-option[aria-pressed=true] {
679
+ background: var(--sl-color-accent-low);
680
+ color: var(--sl-color-text-accent);
681
+ border-color: var(--sl-color-text-accent);
682
+ }
683
+ [data-lensmap-document] .lensmap-viewer .map {
684
+ background-color: var(--sl-color-bg);
685
+ background-image: radial-gradient(color-mix(in srgb, var(--sl-color-gray-4) 25%, transparent) 1px, transparent 1px);
686
+ }
687
+ [data-lensmap-document] .lensmap-viewer .edge-halo {
688
+ stroke: var(--sl-color-bg);
689
+ }
690
+ [data-lensmap-document] .lensmap-viewer .focus-ring {
691
+ border-color: color-mix(in srgb, var(--sl-color-text-accent) 10%, transparent);
692
+ box-shadow: 0 0 100px 65px color-mix(in srgb, var(--sl-color-text-accent) 2%, transparent);
693
+ }
694
+ [data-lensmap-document] .lensmap-viewer .node {
695
+ color: #e7eef4;
696
+ }
697
+ [data-lensmap-document] .lensmap-viewer :is(.zoom-controls, .connection-chooser) {
698
+ background: var(--sl-color-bg-sidebar);
699
+ border-color: var(--sl-color-hairline-light);
700
+ }
701
+ [data-lensmap-document] .lensmap-viewer .zoom-controls button {
702
+ background: transparent;
703
+ }
704
+ [data-lensmap-document] .lensmap-viewer :is(.strength, .legend, .connection-chooser span) {
705
+ color: var(--sl-color-text);
706
+ }
707
+ [data-lensmap-document] .lensmap-viewer .strength input {
708
+ accent-color: var(--sl-color-text-accent);
709
+ }
710
+ [data-lensmap-document] .lensmap-viewer :is(.map-caption, .page-footer) {
711
+ font-family: inherit;
712
+ color: var(--sl-color-gray-3);
713
+ }
714
+ [data-lensmap-document] .lensmap-viewer .map-footer {
715
+ color: var(--sl-color-text);
716
+ border-color: var(--sl-color-hairline-light);
717
+ }
718
+ [data-lensmap-document] .lensmap-viewer :is(.neighbourhood-label, .keyboard-target-label) {
719
+ color: var(--sl-color-text-accent);
720
+ }
721
+ [data-lensmap-document] .lensmap-viewer .connection-chooser .outside-view {
722
+ color: var(--sl-color-orange-high);
723
+ }
724
+ [data-lensmap-document] .lensmap-viewer :is(button, a, input, summary, .map):focus-visible {
725
+ outline-color: var(--sl-color-text-accent);
726
+ }