intent-prompt-graph 0.0.0-stage → 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/web/style.css ADDED
@@ -0,0 +1,640 @@
1
+ /*
2
+ * Two themes, chosen by data-theme on <html>: "ink" (dark) and "paper" (light). The inline script in
3
+ * index.html sets the attribute before first paint. Every colour on the page is one of these
4
+ * variables; rules below the theme blocks hold no colour literals.
5
+ */
6
+ :root, [data-theme="ink"] {
7
+ color-scheme: dark;
8
+ --bg: #111111;
9
+ --panel: #151515;
10
+ --card: #191919;
11
+ --border: #2a2a2a;
12
+ --border-hi: #444444;
13
+ --text: #ededed;
14
+ --muted: #8a8a8a;
15
+
16
+ /* Three colour groups. Kinds inside a group are told apart by their badge text. */
17
+ --chosen: #e8b34b;
18
+ /* Grey by design: in Ink a rejected path recedes instead of standing out. */
19
+ --rejected: #6b6b6b;
20
+ --other: #3a3a3a;
21
+
22
+ --sel: #ededed;
23
+ --inset: #1f1f1f;
24
+ --hover: rgba(255, 255, 255, .05);
25
+ --why-label: var(--muted);
26
+ --grid: #2a2a2a;
27
+ --shadow: none;
28
+ --float-shadow: 0 6px 20px rgba(0, 0, 0, .25);
29
+ --danger: #d0583d;
30
+ --danger-bg: #2b1612;
31
+ --danger-text: #f3bcae;
32
+ }
33
+ [data-theme="paper"] {
34
+ color-scheme: light;
35
+ --bg: #f6f3ee;
36
+ --panel: #fbf9f5;
37
+ --card: #ffffff;
38
+ --border: #e2ddd4;
39
+ --border-hi: #bdb5a7;
40
+ --text: #1d1b18;
41
+ --muted: #7a746b;
42
+
43
+ --chosen: #2f7d55;
44
+ --rejected: #b4472f;
45
+ --other: #cfc8bc;
46
+
47
+ --sel: #1d1b18;
48
+ --inset: #f3efe8;
49
+ --hover: rgba(0, 0, 0, .045);
50
+ --why-label: var(--rejected);
51
+ --grid: #e2ddd4;
52
+ --shadow: 0 1px 2px rgba(0, 0, 0, .05);
53
+ --float-shadow: 0 6px 20px rgba(0, 0, 0, .12);
54
+ --danger: #b4472f;
55
+ --danger-bg: #f9e5de;
56
+ --danger-text: #7a2a18;
57
+ }
58
+
59
+ /*
60
+ * A card shows its group as a 3px left bar and nowhere else: background, border and text are neutral.
61
+ * goal, chosen
62
+ */
63
+ .grp-chosen { --accent: var(--chosen); }
64
+ /* rejected, option */
65
+ .grp-rejected { --accent: var(--rejected); }
66
+ /* decision, loop, side */
67
+ .grp-other { --accent: var(--other); }
68
+
69
+ * { box-sizing: border-box; }
70
+ [hidden] { display: none !important; }
71
+
72
+ html, body {
73
+ margin: 0;
74
+ height: 100%;
75
+ background: var(--bg);
76
+ color: var(--text);
77
+ font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
78
+ overflow: hidden;
79
+ }
80
+
81
+ #app {
82
+ display: grid;
83
+ grid-template-columns: 280px 1fr 350px;
84
+ grid-template-rows: 46px 1fr;
85
+ height: 100vh;
86
+ }
87
+
88
+ #topbar {
89
+ grid-column: 1 / -1;
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: space-between;
93
+ padding: 0 14px;
94
+ background: var(--panel);
95
+ border-bottom: 1px solid var(--border);
96
+ gap: 12px;
97
+ }
98
+ .brand {
99
+ display: flex;
100
+ align-items: center;
101
+ gap: 9px;
102
+ font-weight: 600;
103
+ font-size: 13px;
104
+ min-width: 0;
105
+ }
106
+ #session-title {
107
+ white-space: nowrap;
108
+ overflow: hidden;
109
+ text-overflow: ellipsis;
110
+ max-width: 420px;
111
+ }
112
+ .brand .dot {
113
+ width: 8px;
114
+ height: 8px;
115
+ border-radius: 50%;
116
+ flex-shrink: 0;
117
+ background: var(--chosen);
118
+ }
119
+ .brand .dot.offline { background: var(--danger); }
120
+ .pill {
121
+ display: inline-flex;
122
+ align-items: center;
123
+ gap: 4px;
124
+ padding: 2px 8px;
125
+ border-radius: 999px;
126
+ font-size: 10.5px;
127
+ font-weight: 500;
128
+ border: 1px solid var(--border);
129
+ color: var(--muted);
130
+ white-space: nowrap;
131
+ }
132
+ .top-right {
133
+ display: flex;
134
+ align-items: center;
135
+ gap: 14px;
136
+ flex-shrink: 0;
137
+ }
138
+ .legend {
139
+ display: flex;
140
+ align-items: center;
141
+ gap: 14px;
142
+ font-size: 11px;
143
+ color: var(--muted);
144
+ }
145
+ .legend span { display: inline-flex; align-items: center; gap: 5px; }
146
+ .swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; background: var(--accent); }
147
+ #theme {
148
+ min-width: 58px;
149
+ padding: 4px 10px;
150
+ border-radius: 7px;
151
+ background: var(--card);
152
+ border: 1px solid var(--border);
153
+ color: var(--text);
154
+ font: inherit;
155
+ font-size: 11.5px;
156
+ cursor: pointer;
157
+ }
158
+ #theme:hover { border-color: var(--border-hi); }
159
+
160
+ #sidebar {
161
+ background: var(--panel);
162
+ border-right: 1px solid var(--border);
163
+ overflow-y: auto;
164
+ padding: 14px;
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: 16px;
168
+ }
169
+ .sec-title {
170
+ font-size: 10px;
171
+ font-weight: 700;
172
+ text-transform: uppercase;
173
+ letter-spacing: .09em;
174
+ color: var(--muted);
175
+ margin: 0 0 8px;
176
+ }
177
+ .session-heading {
178
+ font-size: 14.5px;
179
+ font-weight: 600;
180
+ line-height: 1.3;
181
+ margin: 0 0 8px;
182
+ }
183
+ .session-meta {
184
+ display: flex;
185
+ flex-wrap: wrap;
186
+ gap: 6px;
187
+ }
188
+ .summary-list {
189
+ list-style: none;
190
+ margin: 0;
191
+ padding: 0;
192
+ display: flex;
193
+ flex-direction: column;
194
+ gap: 7px;
195
+ }
196
+ .summary-item {
197
+ padding: 7px 9px;
198
+ border-radius: 6px;
199
+ background: var(--card);
200
+ border: 1px solid var(--border);
201
+ border-left: 3px solid var(--accent);
202
+ box-shadow: var(--shadow);
203
+ cursor: pointer;
204
+ transition: border-color .15s;
205
+ }
206
+ .summary-item:hover { border-color: var(--border-hi); border-left-color: var(--accent); }
207
+ .summary-item.on { outline: 1.5px solid var(--sel); outline-offset: 1px; }
208
+ .summary-item .st { font-size: 12px; font-weight: 600; color: var(--text); }
209
+ .summary-item .sd {
210
+ font-size: 11px;
211
+ color: var(--muted);
212
+ margin-top: 2px;
213
+ display: -webkit-box;
214
+ -webkit-line-clamp: 2;
215
+ -webkit-box-orient: vertical;
216
+ overflow: hidden;
217
+ }
218
+ .empty-note { font-size: 11.5px; color: var(--muted); margin: 0; }
219
+
220
+ /*
221
+ * The viewport only frames its children. It clips instead of hiding overflow so that nothing
222
+ * (focus, script, text selection) can scroll it and drag #bar off-centre; the wide graph lives in
223
+ * #stage, which clips on its own, and the only scrolling box is #tl-rows.
224
+ */
225
+ #viewport {
226
+ position: relative;
227
+ min-width: 0;
228
+ min-height: 0;
229
+ overflow: hidden;
230
+ overflow: clip;
231
+ isolation: isolate;
232
+ background: var(--bg);
233
+ }
234
+ #viewport[data-view="timeline"] #stage,
235
+ #viewport[data-view="timeline"] .graph-only,
236
+ #viewport[data-view="graph"] #timeline { display: none; }
237
+
238
+ /* ── Timeline view ─────────────────────────────────────────────────────── */
239
+ #timeline {
240
+ position: absolute;
241
+ inset: 0;
242
+ display: flex;
243
+ flex-direction: column;
244
+ }
245
+ #tl-summary {
246
+ flex: none;
247
+ display: flex;
248
+ flex-direction: column;
249
+ gap: 1px;
250
+ padding: 9px 24px;
251
+ background: var(--bg);
252
+ border-bottom: 1px solid var(--border);
253
+ }
254
+ .tl-sum {
255
+ display: flex;
256
+ align-items: baseline;
257
+ gap: 12px;
258
+ width: 100%;
259
+ max-width: 760px;
260
+ margin: 0 auto;
261
+ padding: 2px 6px;
262
+ border-radius: 5px;
263
+ cursor: pointer;
264
+ }
265
+ .tl-sum:hover { background: var(--hover); }
266
+ .tl-sum.none { cursor: default; background: none; }
267
+ .tl-sum .k {
268
+ flex: none;
269
+ width: 64px;
270
+ font-size: 10px;
271
+ font-weight: 700;
272
+ letter-spacing: .09em;
273
+ text-transform: uppercase;
274
+ color: var(--muted);
275
+ }
276
+ .tl-sum .v {
277
+ min-width: 0;
278
+ font-size: 13px;
279
+ font-weight: 600;
280
+ white-space: nowrap;
281
+ overflow: hidden;
282
+ text-overflow: ellipsis;
283
+ }
284
+ .tl-sum.none .v { font-weight: 400; color: var(--muted); }
285
+
286
+ #tl-rows {
287
+ position: relative;
288
+ flex: 1;
289
+ min-height: 0;
290
+ overflow-y: auto;
291
+ padding: 16px 24px 76px;
292
+ }
293
+ #tl-rows > .empty-note { max-width: 760px; margin: 0 auto; }
294
+ .tl-list {
295
+ max-width: 760px;
296
+ margin: 0 auto;
297
+ display: flex;
298
+ flex-direction: column;
299
+ gap: 10px;
300
+ }
301
+ .tl-step.branch { margin-left: 40px; }
302
+ .tl-via {
303
+ margin: 0 0 4px 15px;
304
+ font-size: 10.5px;
305
+ font-weight: 600;
306
+ color: var(--muted);
307
+ }
308
+ .tl-via::before { content: "↓ "; }
309
+ .tl-step.branch .tl-via::before { content: "↳ "; }
310
+ .tl-row {
311
+ display: flex;
312
+ gap: 12px;
313
+ padding: 10px 14px;
314
+ border-radius: 8px;
315
+ background: var(--card);
316
+ border: 1px solid var(--border);
317
+ border-left: 3px solid var(--accent);
318
+ box-shadow: var(--shadow);
319
+ cursor: pointer;
320
+ transition: border-color .15s ease;
321
+ }
322
+ .tl-row:hover { border-color: var(--border-hi); border-left-color: var(--accent); }
323
+ .tl-row.selected { outline: 1.5px solid var(--sel); outline-offset: 1px; }
324
+ .tl-step.branch .tl-row { padding: 7px 12px; }
325
+ .tl-main { flex: 1; min-width: 0; }
326
+ .tl-head {
327
+ display: flex;
328
+ align-items: center;
329
+ gap: 8px;
330
+ margin-bottom: 3px;
331
+ font-size: 10px;
332
+ font-weight: 700;
333
+ letter-spacing: .07em;
334
+ text-transform: uppercase;
335
+ color: var(--muted);
336
+ }
337
+ .tl-latest {
338
+ flex: none;
339
+ padding: 0 6px;
340
+ border-radius: 999px;
341
+ border: 1px solid var(--border);
342
+ font-size: 9px;
343
+ color: var(--text);
344
+ }
345
+ .tl-meta {
346
+ margin-left: auto;
347
+ font-weight: 400;
348
+ letter-spacing: 0;
349
+ text-transform: none;
350
+ white-space: nowrap;
351
+ }
352
+ .tl-title { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text); }
353
+ .tl-desc { margin-top: 3px; font-size: 12px; line-height: 1.42; color: var(--muted); }
354
+ .tl-step.branch .tl-title { font-size: 12.5px; }
355
+ .tl-step.branch .tl-desc { font-size: 11.5px; }
356
+ .tl-why {
357
+ margin-top: 6px;
358
+ padding: 5px 9px;
359
+ border-radius: 6px;
360
+ background: var(--inset);
361
+ font-size: 11.5px;
362
+ line-height: 1.42;
363
+ color: var(--text);
364
+ }
365
+ .tl-why .lbl {
366
+ margin-right: 8px;
367
+ font-size: 9.5px;
368
+ font-weight: 700;
369
+ letter-spacing: .08em;
370
+ text-transform: uppercase;
371
+ color: var(--why-label);
372
+ }
373
+ .tl-rounds {
374
+ flex: none;
375
+ display: flex;
376
+ flex-direction: column;
377
+ align-items: center;
378
+ justify-content: center;
379
+ min-width: 60px;
380
+ padding: 4px 8px;
381
+ border-radius: 7px;
382
+ background: var(--inset);
383
+ color: var(--text);
384
+ }
385
+ .tl-rounds b { font-size: 24px; font-weight: 700; line-height: 1.05; }
386
+ .tl-rounds span { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
387
+
388
+ /* ── Graph view ────────────────────────────────────────────────────────── */
389
+ #stage {
390
+ position: absolute;
391
+ inset: 0;
392
+ overflow: hidden;
393
+ overflow: clip;
394
+ cursor: grab;
395
+ user-select: none;
396
+ background-image: radial-gradient(circle, var(--grid) 1.1px, transparent 1.2px);
397
+ background-size: 24px 24px;
398
+ }
399
+ #stage:active { cursor: grabbing; }
400
+
401
+ #world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
402
+ #world.glide { transition: transform .35s cubic-bezier(.22,1,.36,1); }
403
+ #edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
404
+ /* Above every card, the selected one included, so a card never hides a label. */
405
+ #labels { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; }
406
+
407
+ /* An edge takes the group colour of the node it leads to, and is dashed into a rejected or unchosen one. */
408
+ .edge { fill: none; stroke: var(--accent); stroke-width: 1.6; }
409
+ .edge.grp-other { stroke: var(--muted); }
410
+ .edge.grp-rejected { stroke-dasharray: 5 5; }
411
+
412
+ .edge-label {
413
+ position: absolute;
414
+ width: max-content;
415
+ transform: translate(-50%, -50%);
416
+ padding: 1px 5px;
417
+ border-radius: 4px;
418
+ background: var(--bg);
419
+ font-size: 10.5px;
420
+ font-weight: 600;
421
+ line-height: 1.25;
422
+ text-align: center;
423
+ color: var(--muted);
424
+ display: -webkit-box;
425
+ -webkit-line-clamp: 3;
426
+ -webkit-box-orient: vertical;
427
+ overflow: hidden;
428
+ }
429
+ .edge-label.above { transform: translate(-50%, calc(-100% - 4px)); }
430
+ .edge-label.vertical { -webkit-line-clamp: 2; }
431
+
432
+ .node {
433
+ position: absolute;
434
+ width: 248px;
435
+ height: 128px;
436
+ padding: 10px 12px;
437
+ border-radius: 8px;
438
+ background: var(--card);
439
+ border: 1px solid var(--border);
440
+ border-left: 3px solid var(--accent);
441
+ box-shadow: var(--shadow);
442
+ cursor: pointer;
443
+ overflow: hidden;
444
+ transition: left .35s ease, top .35s ease, opacity .2s ease, border-color .15s ease;
445
+ }
446
+ .node:hover { border-color: var(--border-hi); border-left-color: var(--accent); }
447
+ .node.selected { outline: 2px solid var(--sel); outline-offset: 2px; z-index: 5; }
448
+ /* The node Follow tracks, when another one is selected: a thinner, greyer ring than the selection. */
449
+ .node.latest:not(.selected) { outline: 1px solid var(--muted); outline-offset: 2px; }
450
+
451
+ .node-head {
452
+ display: flex;
453
+ align-items: center;
454
+ justify-content: space-between;
455
+ gap: 6px;
456
+ font-size: 10px;
457
+ font-weight: 700;
458
+ letter-spacing: .07em;
459
+ text-transform: uppercase;
460
+ color: var(--muted);
461
+ margin-bottom: 5px;
462
+ }
463
+ .node-turns { font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; }
464
+ .node-title {
465
+ font-size: 12.5px;
466
+ font-weight: 600;
467
+ color: var(--text);
468
+ line-height: 1.3;
469
+ margin-bottom: 4px;
470
+ display: -webkit-box;
471
+ -webkit-line-clamp: 2;
472
+ -webkit-box-orient: vertical;
473
+ overflow: hidden;
474
+ }
475
+ .kind-rejected .node-title,
476
+ .kind-rejected .tl-title,
477
+ .kind-option .node-title,
478
+ .kind-option .tl-title {
479
+ text-decoration: line-through;
480
+ color: var(--muted);
481
+ }
482
+ .node-desc {
483
+ font-size: 11px;
484
+ color: var(--muted);
485
+ line-height: 1.38;
486
+ display: -webkit-box;
487
+ -webkit-line-clamp: 3;
488
+ -webkit-box-orient: vertical;
489
+ overflow: hidden;
490
+ }
491
+
492
+ /* ── Overlays shared by both views ─────────────────────────────────────── */
493
+ #banner {
494
+ position: absolute;
495
+ top: 0;
496
+ left: 0;
497
+ right: 0;
498
+ padding: 8px 14px;
499
+ background: var(--danger-bg);
500
+ color: var(--danger-text);
501
+ border-bottom: 1px solid var(--danger);
502
+ font-size: 12px;
503
+ z-index: 12;
504
+ }
505
+ #toast {
506
+ position: absolute;
507
+ top: 12px;
508
+ right: 12px;
509
+ padding: 7px 12px;
510
+ border-radius: 8px;
511
+ background: var(--card);
512
+ border: 1px solid var(--border);
513
+ border-left: 3px solid var(--chosen);
514
+ box-shadow: var(--float-shadow);
515
+ color: var(--text);
516
+ font-size: 12px;
517
+ cursor: pointer;
518
+ z-index: 12;
519
+ }
520
+
521
+ #bar {
522
+ position: absolute;
523
+ bottom: 14px;
524
+ left: 0;
525
+ right: 0;
526
+ width: fit-content;
527
+ max-width: calc(100% - 24px);
528
+ margin: 0 auto;
529
+ display: flex;
530
+ flex-wrap: wrap;
531
+ align-items: center;
532
+ justify-content: center;
533
+ gap: 5px;
534
+ padding: 6px 8px;
535
+ background: color-mix(in srgb, var(--panel) 92%, transparent);
536
+ backdrop-filter: blur(8px);
537
+ border: 1px solid var(--border);
538
+ border-radius: 10px;
539
+ box-shadow: var(--float-shadow);
540
+ z-index: 10;
541
+ }
542
+ #bar button {
543
+ background: transparent;
544
+ border: 1px solid transparent;
545
+ color: var(--muted);
546
+ padding: 5px 10px;
547
+ border-radius: 6px;
548
+ font: inherit;
549
+ font-size: 11.5px;
550
+ cursor: pointer;
551
+ white-space: nowrap;
552
+ }
553
+ #bar button:hover { color: var(--text); background: var(--hover); }
554
+ #bar button.active, #bar button[aria-pressed="true"] {
555
+ background: var(--card);
556
+ color: var(--text);
557
+ border-color: var(--border);
558
+ }
559
+ #bar .sep { width: 1px; height: 16px; background: var(--border); margin: 0 2px; }
560
+
561
+ #panel {
562
+ background: var(--panel);
563
+ border-left: 1px solid var(--border);
564
+ overflow-y: auto;
565
+ padding: 16px;
566
+ display: flex;
567
+ flex-direction: column;
568
+ gap: 14px;
569
+ }
570
+ /* Carries the colour group for the rationale box's left bar without adding a layout box. */
571
+ .panel-head { display: contents; }
572
+ .panel-badge {
573
+ display: inline-flex;
574
+ align-items: center;
575
+ gap: 6px;
576
+ font-size: 10.5px;
577
+ font-weight: 700;
578
+ letter-spacing: .07em;
579
+ text-transform: uppercase;
580
+ padding: 3px 8px;
581
+ border-radius: 5px;
582
+ align-self: flex-start;
583
+ color: var(--muted);
584
+ border: 1px solid var(--border);
585
+ }
586
+ .panel-title { font-size: 15.5px; font-weight: 600; margin: 0; line-height: 1.3; }
587
+ .rationale-box {
588
+ padding: 10px 12px;
589
+ border-radius: 6px;
590
+ background: var(--card);
591
+ border: 1px solid var(--border);
592
+ border-left: 3px solid var(--accent);
593
+ box-shadow: var(--shadow);
594
+ }
595
+ .rationale-box .lbl {
596
+ font-size: 10px;
597
+ font-weight: 700;
598
+ text-transform: uppercase;
599
+ letter-spacing: .08em;
600
+ color: var(--muted);
601
+ margin-bottom: 4px;
602
+ }
603
+ .rationale-box p { margin: 0; font-size: 12.5px; color: var(--text); white-space: pre-wrap; }
604
+
605
+ .turn-list { display: flex; flex-direction: column; gap: 8px; }
606
+ .turn-card {
607
+ padding: 10px 11px;
608
+ border-radius: 8px;
609
+ background: var(--card);
610
+ border: 1px solid var(--border);
611
+ display: flex;
612
+ flex-direction: column;
613
+ gap: 6px;
614
+ }
615
+ .turn-who {
616
+ display: flex;
617
+ justify-content: space-between;
618
+ font-size: 10.5px;
619
+ font-weight: 700;
620
+ letter-spacing: .06em;
621
+ text-transform: uppercase;
622
+ color: var(--muted);
623
+ }
624
+ .turn-who span:last-child { font-weight: 400; text-transform: none; }
625
+ .turn-body {
626
+ font-size: 12px;
627
+ color: var(--text);
628
+ white-space: pre-wrap;
629
+ word-break: break-word;
630
+ line-height: 1.48;
631
+ max-height: 360px;
632
+ overflow-y: auto;
633
+ }
634
+ .turn-actions {
635
+ margin: 0;
636
+ padding-left: 16px;
637
+ font-size: 11px;
638
+ color: var(--muted);
639
+ }
640
+ .turn-actions b { color: var(--text); font-weight: 600; }