@jfrader/storybook-docs 0.0.0-stage → 0.4.3

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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +138 -2
  3. package/dist/app.d.ts +1 -0
  4. package/dist/base.d.ts +3 -0
  5. package/dist/build/catalog.d.ts +20 -0
  6. package/dist/build/code.d.ts +2 -0
  7. package/dist/build/global-styles.d.ts +1 -0
  8. package/dist/build/guidance.d.ts +4 -0
  9. package/dist/build/module-ids.d.ts +2 -0
  10. package/dist/build/props.d.ts +10 -0
  11. package/dist/build/releases.d.ts +7 -0
  12. package/dist/build/site.d.ts +2 -0
  13. package/dist/build/storybook-test.d.ts +2 -0
  14. package/dist/build/tokens.d.ts +2 -0
  15. package/dist/code.d.ts +16 -0
  16. package/dist/component-demo.d.ts +23 -0
  17. package/dist/config.d.ts +98 -0
  18. package/dist/controls.d.ts +49 -0
  19. package/dist/guidance-model.d.ts +74 -0
  20. package/dist/guidance.d.ts +9 -0
  21. package/dist/index.css +424 -0
  22. package/dist/index.d.ts +4 -0
  23. package/dist/index.js +1930 -0
  24. package/dist/pages/component-page.d.ts +4 -0
  25. package/dist/pages/foundations-color.d.ts +3 -0
  26. package/dist/pages/foundations-effects.d.ts +3 -0
  27. package/dist/pages/foundations-spacing.d.ts +3 -0
  28. package/dist/pages/foundations-type.d.ts +3 -0
  29. package/dist/pages/overview.d.ts +3 -0
  30. package/dist/pages/releases.d.ts +3 -0
  31. package/dist/prop-docs.d.ts +20 -0
  32. package/dist/props.d.ts +4 -0
  33. package/dist/scan.d.ts +19 -0
  34. package/dist/search-match.d.ts +21 -0
  35. package/dist/search.d.ts +5 -0
  36. package/dist/sections.d.ts +52 -0
  37. package/dist/skeleton.d.ts +11 -0
  38. package/dist/start.d.ts +4 -0
  39. package/dist/story-view.d.ts +20 -0
  40. package/dist/styles.css +688 -0
  41. package/dist/toc.d.ts +10 -0
  42. package/dist/virtual.d.ts +42 -0
  43. package/dist/vite-plugin.d.ts +10 -0
  44. package/dist/vite-plugin.js +697 -0
  45. package/docs/CONFIG.md +287 -0
  46. package/docs/RELEASING.md +127 -0
  47. package/package.json +83 -4
@@ -0,0 +1,688 @@
1
+ /* The docs chrome reads --sd-* roles, which the consumer maps to its own design tokens.
2
+ Fallbacks keep the engine usable with no theme at all; nothing here is design-system specific. */
3
+ :root {
4
+ --sd-bg: #0b0c0e;
5
+ --sd-surface: #121316;
6
+ --sd-surface-raised: #17181c;
7
+ --sd-surface-hover: #1d1e23;
8
+ --sd-border: #26272d;
9
+ --sd-border-subtle: #1e2025;
10
+ --sd-text: #f5f6f8;
11
+ --sd-text-muted: #9aa0ab;
12
+ --sd-text-subtle: #7b818c;
13
+ --sd-accent: #8b7cf6;
14
+ --sd-accent-text: #a99bff;
15
+ --sd-accent-soft: rgba(139, 124, 246, 0.16);
16
+ --sd-accent-contrast: #10111a;
17
+ --sd-danger: #cf3f3f;
18
+ --sd-danger-text: #ff8a8a;
19
+ --sd-success: #2f9e5b;
20
+ --sd-focus-ring: #a99bff;
21
+ --sd-radius: 12px;
22
+ }
23
+ /* The consumer's theme bridge is injected later and overrides these defaults. */
24
+
25
+ html {
26
+ scroll-padding-top: max(72px, var(--sd-header-height, 55px));
27
+ }
28
+ html,
29
+ body {
30
+ margin: 0;
31
+ background: var(--sd-bg);
32
+ color: var(--sd-text);
33
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Inter, 'Helvetica Neue', Arial, sans-serif;
34
+ -webkit-font-smoothing: antialiased;
35
+ }
36
+
37
+ .app {
38
+ display: grid;
39
+ grid-template-columns: 276px minmax(0, 1fr);
40
+ min-height: 100vh;
41
+ }
42
+
43
+ .top {
44
+ position: sticky;
45
+ top: 0;
46
+ z-index: 5;
47
+ grid-column: 1 / -1;
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 12px;
51
+ padding: 10px 18px;
52
+ background: var(--sd-surface);
53
+ border-bottom: 1px solid var(--sd-border-subtle);
54
+ }
55
+ .sr-only {
56
+ position: absolute;
57
+ width: 1px;
58
+ height: 1px;
59
+ margin: -1px;
60
+ padding: 0;
61
+ overflow: hidden;
62
+ clip-path: inset(50%);
63
+ white-space: nowrap;
64
+ }
65
+ .skip {
66
+ position: fixed;
67
+ top: 8px;
68
+ left: 8px;
69
+ z-index: 30;
70
+ padding: 8px 14px;
71
+ border-radius: 8px;
72
+ background: var(--sd-accent);
73
+ color: var(--sd-accent-contrast);
74
+ font-weight: 600;
75
+ text-decoration: none;
76
+ transform: translateY(-200%);
77
+ }
78
+ .skip:focus {
79
+ transform: none;
80
+ }
81
+ .nav-toggle {
82
+ display: none;
83
+ }
84
+ .main:focus {
85
+ outline: none;
86
+ }
87
+ .table-scroll {
88
+ overflow-x: auto;
89
+ }
90
+ .table-scroll tbody th code {
91
+ color: var(--sd-text);
92
+ background: none;
93
+ padding: 0;
94
+ font-weight: 600;
95
+ }
96
+ .table-scroll td .guidance {
97
+ margin: 0;
98
+ }
99
+ .table-scroll td .guidance > :first-child {
100
+ margin-top: 0;
101
+ }
102
+ .table-scroll td .guidance > :last-child {
103
+ margin-bottom: 0;
104
+ }
105
+ .table-scroll td p {
106
+ font-size: inherit;
107
+ }
108
+ .table-scroll summary {
109
+ min-block-size: 24px;
110
+ cursor: pointer;
111
+ }
112
+ .mark {
113
+ width: 26px;
114
+ height: 26px;
115
+ border-radius: 7px;
116
+ display: grid;
117
+ place-items: center;
118
+ font-weight: 700;
119
+ font-size: 14px;
120
+ color: var(--sd-accent-contrast);
121
+ background: var(--sd-accent);
122
+ }
123
+ .brand {
124
+ font-weight: 650;
125
+ letter-spacing: -0.01em;
126
+ }
127
+ .brand-link {
128
+ display: inline-flex;
129
+ align-items: center;
130
+ gap: 12px;
131
+ color: var(--sd-text);
132
+ text-decoration: none;
133
+ border-radius: 7px;
134
+ }
135
+ .search {
136
+ position: relative;
137
+ flex: 0 1 430px;
138
+ }
139
+ .search input {
140
+ box-sizing: border-box;
141
+ width: 100%;
142
+ border: 1px solid var(--sd-text-subtle);
143
+ background: var(--sd-bg);
144
+ border-radius: 10px;
145
+ padding: 7px 10px;
146
+ color: var(--sd-text);
147
+ font: inherit;
148
+ font-size: 13px;
149
+ }
150
+ .search input::placeholder {
151
+ color: var(--sd-text-muted);
152
+ }
153
+ .search input:focus-visible {
154
+ outline: 2px solid var(--sd-focus-ring);
155
+ outline-offset: 1px;
156
+ }
157
+ /* The results list, options, marks and empty state live in src/search.css. */
158
+ .spacer {
159
+ flex: 1;
160
+ }
161
+ .chip {
162
+ font-size: 11px;
163
+ color: var(--sd-text-muted);
164
+ padding: 2px 0;
165
+ }
166
+ .tool {
167
+ border: 1px solid var(--sd-text-subtle);
168
+ background: var(--sd-surface-raised);
169
+ color: var(--sd-text);
170
+ border-radius: 8px;
171
+ padding: 5px 10px;
172
+ font: inherit;
173
+ font-size: 12.5px;
174
+ cursor: pointer;
175
+ text-decoration: none;
176
+ }
177
+ .tool:hover {
178
+ background: var(--sd-surface-hover);
179
+ }
180
+ .tool:focus-visible,
181
+ :where(.app) summary:focus-visible:where(:not(.story-lane *)),
182
+ .table-scroll:focus-visible,
183
+ .shot:focus-visible,
184
+ :where(.app) a:focus-visible:where(:not(.story-lane *)) {
185
+ outline: 2px solid var(--sd-focus-ring);
186
+ outline-offset: 2px;
187
+ }
188
+
189
+ .nav {
190
+ border-right: 0;
191
+ background: var(--sd-surface);
192
+ padding: 14px 12px 80px;
193
+ }
194
+ .nav a {
195
+ display: block;
196
+ padding: 6px 10px;
197
+ border-radius: 8px;
198
+ color: var(--sd-text-muted);
199
+ font-size: 13.5px;
200
+ text-decoration: none;
201
+ }
202
+ .nav a:hover {
203
+ background: var(--sd-surface-hover);
204
+ color: var(--sd-text);
205
+ }
206
+ .nav a.on {
207
+ background: var(--sd-accent-soft);
208
+ color: var(--sd-text);
209
+ font-weight: 600;
210
+ }
211
+ .grp {
212
+ margin: 16px 0 4px;
213
+ padding: 0 10px;
214
+ font-size: 10.5px;
215
+ letter-spacing: 0.09em;
216
+ text-transform: uppercase;
217
+ color: var(--sd-text-muted);
218
+ font-weight: 700;
219
+ }
220
+ .nav-note {
221
+ margin: 22px 10px 0;
222
+ font-size: 11.5px;
223
+ line-height: 1.6;
224
+ color: var(--sd-text-muted);
225
+ }
226
+
227
+ .main {
228
+ padding: 48px clamp(28px, 4vw, 64px) 160px;
229
+ min-width: 0;
230
+ }
231
+ .crumb {
232
+ font-size: 12.5px;
233
+ color: var(--sd-text-muted);
234
+ margin-bottom: 10px;
235
+ }
236
+ /* Zero-specificity boundaries keep chrome typography out of stories and document portals. */
237
+ :where(.app) h1:where(:not(.story-lane *)) {
238
+ font-size: clamp(36px, 3.5vw, 52px);
239
+ line-height: 1.12;
240
+ font-weight: 650;
241
+ letter-spacing: -0.04em;
242
+ margin: 0 0 18px;
243
+ }
244
+ :where(.app) h2:where(:not(.story-lane *)) {
245
+ font-size: 24px;
246
+ line-height: 1.3;
247
+ font-weight: 650;
248
+ letter-spacing: -0.025em;
249
+ margin: 48px 0 16px;
250
+ }
251
+ :where(.app) h3:where(:not(.story-lane *)) {
252
+ font-size: 17px;
253
+ line-height: 1.4;
254
+ margin: 0 0 6px;
255
+ }
256
+ :where(.app) p:where(:not(.story-lane *)),
257
+ :where(.app) li:where(:not(.story-lane *)) {
258
+ color: var(--sd-text-muted);
259
+ line-height: 1.65;
260
+ font-size: 14.5px;
261
+ }
262
+ .lede {
263
+ font-size: 18px;
264
+ max-width: 64ch;
265
+ line-height: 1.7;
266
+ }
267
+ :where(.app) a:where(:not(.story-lane *)) {
268
+ color: var(--sd-accent-text);
269
+ }
270
+ :where(.app) code:where(:not(.story-lane *)) {
271
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
272
+ font-size: 12.5px;
273
+ background: var(--sd-surface-raised);
274
+ border: 0;
275
+ border-radius: 5px;
276
+ padding: 1px 5px;
277
+ }
278
+ .card {
279
+ padding: 16px 0;
280
+ margin: 12px 0;
281
+ }
282
+ .grid2 {
283
+ display: grid;
284
+ grid-template-columns: 1fr 1fr;
285
+ gap: 24px 40px;
286
+ }
287
+ .tiles {
288
+ display: grid;
289
+ grid-template-columns: repeat(3, minmax(0, 1fr));
290
+ gap: 32px;
291
+ margin: 32px 0 48px;
292
+ }
293
+ .tile .num {
294
+ font-size: 36px;
295
+ font-weight: 600;
296
+ letter-spacing: -0.04em;
297
+ font-variant-numeric: tabular-nums;
298
+ }
299
+ .tile b {
300
+ display: block;
301
+ margin: 2px 0 4px;
302
+ font-size: 14px;
303
+ }
304
+ .tile span {
305
+ color: var(--sd-text-muted);
306
+ font-size: 13px;
307
+ }
308
+
309
+ .summary-row {
310
+ display: flex;
311
+ align-items: center;
312
+ gap: 6px 18px;
313
+ flex-wrap: wrap;
314
+ margin: 4px 0 14px;
315
+ }
316
+
317
+ .story-failed {
318
+ color: color-mix(in srgb, var(--sd-danger) 55%, var(--sd-text));
319
+ font-size: 13px;
320
+ }
321
+ .lazy-placeholder {
322
+ padding: 26px;
323
+ color: var(--sd-text-muted);
324
+ font-size: 13px;
325
+ }
326
+
327
+ /* Skeletons: one pulse shared by every loading state (frames, guidance, props, header). */
328
+ .skeleton {
329
+ display: block;
330
+ background: var(--sd-surface-raised);
331
+ border-radius: 6px;
332
+ animation: sd-pulse 1.4s ease-in-out infinite;
333
+ }
334
+ .skeleton-stack {
335
+ display: grid;
336
+ gap: 10px;
337
+ }
338
+ .skeleton-page {
339
+ display: grid;
340
+ gap: 16px;
341
+ margin: 18px 0;
342
+ }
343
+ @keyframes sd-pulse {
344
+ 0%,
345
+ 100% {
346
+ opacity: 0.5;
347
+ }
348
+ 50% {
349
+ opacity: 1;
350
+ }
351
+ }
352
+ @media (prefers-reduced-motion: reduce) {
353
+ html {
354
+ scroll-behavior: auto;
355
+ }
356
+ .skeleton {
357
+ animation: none;
358
+ }
359
+ }
360
+
361
+ pre.code {
362
+ background: var(--sd-surface);
363
+ border: 0;
364
+ border-radius: var(--sd-radius);
365
+ padding: 16px 18px;
366
+ overflow: auto;
367
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
368
+ font-size: 12.5px;
369
+ line-height: 1.6;
370
+ color: var(--sd-text);
371
+ margin: 10px 0;
372
+ }
373
+ .hint,
374
+ :is(.table-scroll, .guidance-table) > table th + th,
375
+ :is(.table-scroll, .guidance-table) > table td + td {
376
+ border-left: 0;
377
+ }
378
+ code.type {
379
+ white-space: pre-wrap;
380
+ }
381
+ .req {
382
+ margin-left: 6px;
383
+ font-size: 10.5px;
384
+ letter-spacing: 0.05em;
385
+ text-transform: uppercase;
386
+ color: color-mix(in srgb, var(--sd-danger) 55%, var(--sd-text));
387
+ }
388
+
389
+ /* Authored guidance (Markdown) */
390
+ .guidance {
391
+ margin: 18px 0 6px;
392
+ }
393
+ .guidance h2 {
394
+ margin-top: 26px;
395
+ }
396
+ .guidance h3 {
397
+ margin: 18px 0 4px;
398
+ font-size: 14px;
399
+ }
400
+ :is(.table-scroll, .guidance-table) > table {
401
+ width: 100%;
402
+ border-collapse: collapse;
403
+ font-size: 13.5px;
404
+ margin: 16px 0;
405
+ line-height: 1.6;
406
+ }
407
+ :is(.table-scroll, .guidance-table) > table th {
408
+ text-align: left;
409
+ font-size: 11px;
410
+ letter-spacing: 0.07em;
411
+ text-transform: uppercase;
412
+ color: var(--sd-text-muted);
413
+ padding: 12px 16px;
414
+ background: var(--sd-surface);
415
+ border-bottom: 1px solid var(--sd-border);
416
+ }
417
+ :is(.table-scroll, .guidance-table) > table tbody th {
418
+ font-size: inherit;
419
+ letter-spacing: normal;
420
+ text-transform: none;
421
+ font-weight: 400;
422
+ color: var(--sd-text-muted);
423
+ vertical-align: top;
424
+ padding: 14px 16px;
425
+ border-bottom: 1px solid var(--sd-border-subtle);
426
+ }
427
+ :is(.table-scroll, .guidance-table) > table td {
428
+ padding: 14px 16px;
429
+ border-bottom: 1px solid var(--sd-border-subtle);
430
+ vertical-align: top;
431
+ color: var(--sd-text-muted);
432
+ }
433
+
434
+ .swatches {
435
+ display: grid;
436
+ grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
437
+ gap: 12px;
438
+ }
439
+ .sw {
440
+ border: 1px solid var(--sd-border);
441
+ border-radius: 10px;
442
+ overflow: hidden;
443
+ }
444
+ .sw .c {
445
+ height: 54px;
446
+ }
447
+ .sw .n {
448
+ padding: 8px 10px;
449
+ font-size: 12px;
450
+ color: var(--sd-text-muted);
451
+ }
452
+ .sw .n b {
453
+ display: block;
454
+ font-size: 12.5px;
455
+ color: var(--sd-text);
456
+ }
457
+
458
+ .scale-row {
459
+ display: flex;
460
+ align-items: baseline;
461
+ gap: 14px;
462
+ padding: 10px 0;
463
+ border-bottom: 1px solid var(--sd-border-subtle);
464
+ }
465
+ .scale-row .meta {
466
+ width: 200px;
467
+ flex: 0 0 auto;
468
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
469
+ font-size: 12px;
470
+ color: var(--sd-text-muted);
471
+ }
472
+
473
+ /* Foundations: spacing, shape, elevation, motion */
474
+ .scale-rows {
475
+ display: grid;
476
+ grid-template-columns: minmax(0, 1fr);
477
+ gap: 4px;
478
+ margin: 8px 0;
479
+ }
480
+ .space-row {
481
+ display: flex;
482
+ align-items: center;
483
+ gap: 14px;
484
+ padding: 6px 0;
485
+ border-bottom: 1px solid var(--sd-border-subtle);
486
+ }
487
+ .space-row .meta {
488
+ width: 210px;
489
+ flex: 0 0 auto;
490
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
491
+ font-size: 12px;
492
+ color: var(--sd-text-muted);
493
+ }
494
+ .bar {
495
+ height: 14px;
496
+ border-radius: 4px;
497
+ background: var(--sd-accent);
498
+ min-width: 2px;
499
+ }
500
+ .bar-outline {
501
+ height: 14px;
502
+ border-radius: 4px;
503
+ border: 1px dashed var(--sd-border);
504
+ min-width: 2px;
505
+ }
506
+ .radius-row,
507
+ .shadow-row {
508
+ display: flex;
509
+ flex-wrap: wrap;
510
+ gap: 18px;
511
+ margin: 10px 0;
512
+ }
513
+ .radius-cell,
514
+ .shadow-cell {
515
+ display: grid;
516
+ gap: 8px;
517
+ }
518
+ .radius-cell .meta,
519
+ .shadow-cell .meta {
520
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
521
+ font-size: 12px;
522
+ color: var(--sd-text-muted);
523
+ }
524
+ .radius-box {
525
+ width: 64px;
526
+ height: 64px;
527
+ background: var(--sd-accent-soft);
528
+ border: 1px solid var(--sd-border);
529
+ }
530
+ .shadow-box {
531
+ width: 124px;
532
+ height: 76px;
533
+ border-radius: var(--sd-radius);
534
+ background: var(--sd-surface-raised);
535
+ border: 1px solid var(--sd-border);
536
+ }
537
+ .motion-demo {
538
+ width: 64px;
539
+ height: 14px;
540
+ border-radius: 4px;
541
+ background: var(--sd-accent);
542
+ animation: sd-slide 1.2s ease-in-out infinite alternate;
543
+ }
544
+ @keyframes sd-slide {
545
+ from {
546
+ transform: translateX(0);
547
+ }
548
+ to {
549
+ transform: translateX(140px);
550
+ }
551
+ }
552
+ @media (prefers-reduced-motion: reduce) {
553
+ .motion-demo {
554
+ animation: none;
555
+ }
556
+ }
557
+ :where(.app) section > h3:where(:not(.story-lane *)) {
558
+ margin: 22px 0 4px;
559
+ }
560
+
561
+ /* Overview: area directory */
562
+ .group-grid {
563
+ display: grid;
564
+ grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
565
+ gap: 32px 40px;
566
+ margin: 24px 0;
567
+ }
568
+ .group-card {
569
+ margin: 0;
570
+ padding: 20px 0 0;
571
+ border-top: 1px solid var(--sd-border);
572
+ }
573
+ .group-card h3 {
574
+ display: flex;
575
+ align-items: baseline;
576
+ gap: 8px;
577
+ margin: 0 0 12px;
578
+ }
579
+ .group-card .count {
580
+ font-size: 11.5px;
581
+ font-weight: 600;
582
+ color: var(--sd-text-muted);
583
+ font-variant-numeric: tabular-nums;
584
+ }
585
+ .group-card ul {
586
+ margin: 0;
587
+ padding: 0;
588
+ list-style: none;
589
+ columns: 1;
590
+ }
591
+ .group-card li {
592
+ padding: 2px 0;
593
+ }
594
+ .group-card li a {
595
+ font-size: 13.5px;
596
+ /* Touch targets, not just text boxes. */
597
+ display: inline-flex;
598
+ align-items: center;
599
+ min-block-size: 24px;
600
+ color: var(--sd-text-muted);
601
+ text-decoration: none;
602
+ }
603
+ .group-card li a:hover {
604
+ color: var(--sd-accent-text);
605
+ text-decoration: underline;
606
+ text-underline-offset: 3px;
607
+ }
608
+ .group-card .hint {
609
+ margin: 8px 0 0;
610
+ }
611
+
612
+ /* Narrow viewports: one column, the sidebar becomes a menu under the header. */
613
+ @media (max-width: 1000px) {
614
+ .app {
615
+ grid-template-columns: minmax(0, 1fr);
616
+ }
617
+ .top {
618
+ flex-wrap: wrap;
619
+ gap: 8px 12px;
620
+ }
621
+ .nav-toggle {
622
+ display: inline-block;
623
+ }
624
+ .search {
625
+ order: 10;
626
+ flex: 1 1 100%;
627
+ }
628
+ .nav {
629
+ display: none;
630
+ position: fixed;
631
+ inset-inline: 0;
632
+ top: var(--sd-header-height, 55px);
633
+ z-index: 4;
634
+ box-sizing: border-box;
635
+ max-height: min(60vh, calc(100dvh - var(--sd-header-height, 55px)));
636
+ overflow-y: auto;
637
+ border-right: 0;
638
+ border-bottom: 1px solid var(--sd-border);
639
+ padding-bottom: 20px;
640
+ }
641
+ .nav.open {
642
+ display: block;
643
+ }
644
+ .main {
645
+ padding: 32px 20px 120px;
646
+ }
647
+ .grid2 {
648
+ grid-template-columns: minmax(0, 1fr);
649
+ }
650
+ .tiles {
651
+ grid-template-columns: minmax(0, 1fr);
652
+ gap: 20px;
653
+ margin: 24px 0 36px;
654
+ }
655
+ .tile {
656
+ display: grid;
657
+ grid-template-columns: 80px minmax(0, 1fr);
658
+ column-gap: 16px;
659
+ padding: 0;
660
+ margin: 0;
661
+ }
662
+ .tile .num { grid-row: span 2; font-size: 28px; }
663
+ .scale-row,
664
+ .space-row {
665
+ flex-wrap: wrap;
666
+ }
667
+ .scale-row .meta,
668
+ .space-row .meta {
669
+ width: auto;
670
+ flex: 0 1 auto;
671
+ overflow-wrap: anywhere;
672
+ }
673
+ .bar,
674
+ .bar-outline {
675
+ max-width: 100%;
676
+ }
677
+ }
678
+ @media (forced-colors: active) {
679
+ .nav a.on,
680
+ .search-results li[aria-selected='true'] {
681
+ outline: 1px solid;
682
+ outline-offset: -1px;
683
+ }
684
+ pre.code,
685
+ .sd-controls {
686
+ outline: 1px solid;
687
+ }
688
+ }
package/dist/toc.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import './toc.css';
2
+ /** The hash without its query: `#/components/button?story=Variants` → `#/components/button`. */
3
+ export declare function hashPath(hash: string): string;
4
+ /** The `?story=` deep-link target of a hash, if any. */
5
+ export declare function storyFromHash(hash: string): string | null;
6
+ export declare function storyLink(location: Location, story: string): string;
7
+ /** The "On this page" rail and the `?story=` deep-link landing. */
8
+ export declare function PageRail({ pageKey }: {
9
+ pageKey: string;
10
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,42 @@
1
+ declare module 'virtual:storybook-docs/site' {
2
+ type StorybookDocsConfig = import('./config.js').StorybookDocsConfig;
3
+ export const site: StorybookDocsConfig['site'];
4
+ export const theme: NonNullable<StorybookDocsConfig['theme']>;
5
+ export const pages: Required<NonNullable<StorybookDocsConfig['pages']>>;
6
+ export const hasTokens: boolean;
7
+ export const themeCss: string;
8
+ }
9
+
10
+ declare module 'virtual:storybook-docs/catalog' {
11
+ type CatalogEntry = import('./config.js').CatalogEntry;
12
+ export const catalog: CatalogEntry[];
13
+ export const storySource: string;
14
+ export const groups: string[];
15
+ export const stats: { components: number; stories: number; groups: number };
16
+ }
17
+
18
+ declare module 'virtual:storybook-docs/tokens' {
19
+ export const vars: Record<string, unknown>;
20
+ }
21
+
22
+ declare module 'virtual:storybook-docs/props' {
23
+ type ComponentPropsDoc = import('./prop-docs.js').ComponentPropsDoc;
24
+ export function loadProps(slug: string): Promise<{ components: ComponentPropsDoc[] }>;
25
+ }
26
+
27
+ declare module 'virtual:storybook-docs/guidance' {
28
+ export function loadGuidance(slug: string): Promise<{ markdown: string }>;
29
+ }
30
+
31
+ declare module 'virtual:storybook-docs/releases' {
32
+ export const releases: { version: string | null; changelog: string | null };
33
+ }
34
+
35
+ declare module 'virtual:storybook-docs/global-styles';
36
+
37
+ declare module 'virtual:storybook-docs/code' {
38
+ import type { ComponentType } from 'react';
39
+ export const provided: boolean;
40
+ /** The consumer's code renderer, or undefined when the config names none. */
41
+ export const Code: ComponentType<{ code: string; language?: string }> | undefined;
42
+ }