@brett_lamy/docstream 1.0.0 → 1.1.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.
package/src/styles.css CHANGED
@@ -15,6 +15,15 @@
15
15
  correctly in older Chromium forks; hosts can override any token. */
16
16
  --gb-code-bg: rgba(128, 128, 128, 0.13);
17
17
  --gb-code-fg: var(--foreground, #18181b);
18
+ --gb-radius: 12px;
19
+ /* Demo viewer + pill controls. Translucent so they sit on light and dark hosts alike. */
20
+ --gb-stage: rgba(128, 128, 128, 0.09);
21
+ --gb-stage-dot: rgba(128, 128, 128, 0.28);
22
+ --gb-pill: var(--gb-panel);
23
+ --gb-pill-track: rgba(128, 128, 128, 0.12);
24
+ --gb-pill-shadow: 0 1px 2px rgba(15, 15, 35, 0.14), 0 0 0 0.5px rgba(15, 15, 35, 0.1);
25
+ --gb-hover: rgba(128, 128, 128, 0.12);
26
+ --gb-menu-shadow: 0 14px 34px -10px rgba(15, 15, 35, 0.28), 0 2px 6px rgba(15, 15, 35, 0.08);
18
27
 
19
28
  /* Semantic hint palette — solid color plus precomputed tints. Matches the
20
29
  editor palette in @brett_lamy/docstream-editor/styles.css. */
@@ -135,7 +144,7 @@
135
144
  margin-block: 0.75em;
136
145
  }
137
146
 
138
- :is([data-docstream], .docs-article) [data-docstream-blocks] > :is(.docs-cards, .docs-code, .docs-math, .docs-hint, .docs-tabs, .docs-expandable, .docs-stepper, .docs-mermaid-preview, .oas, .docs-embed, .docstream-viz, figure, blockquote, ul, ol, hr) {
147
+ :is([data-docstream], .docs-article) [data-docstream-blocks] > :is(.docs-cards, .docs-code, .docs-math, .docs-hint, .docs-tabs, .docs-demo, .docs-expandable, .docs-stepper, .docs-mermaid-preview, .oas, .docs-embed, .docstream-viz, figure, blockquote, ul, ol, hr) {
139
148
  margin-block: 0.75em;
140
149
  }
141
150
 
@@ -1309,6 +1318,913 @@
1309
1318
  border-radius: 4px;
1310
1319
  }
1311
1320
 
1321
+ /* ---- Copy buttons ---- */
1322
+
1323
+ .docs-copy {
1324
+ display: inline-grid;
1325
+ place-items: center;
1326
+ flex-shrink: 0;
1327
+ width: 28px;
1328
+ height: 28px;
1329
+ padding: 0;
1330
+ border: 0;
1331
+ border-radius: 7px;
1332
+ background: none;
1333
+ color: var(--gb-muted-foreground);
1334
+ cursor: pointer;
1335
+ transition: background 150ms ease, color 150ms ease;
1336
+ }
1337
+
1338
+ .docs-copy:hover {
1339
+ background: var(--gb-hover);
1340
+ color: var(--gb-panel-foreground);
1341
+ }
1342
+
1343
+ .docs-copy:focus-visible {
1344
+ outline: 2px solid var(--gb-primary);
1345
+ outline-offset: 1px;
1346
+ }
1347
+
1348
+ .docs-copy-icon-done {
1349
+ color: var(--gb-success);
1350
+ }
1351
+
1352
+ .docs-code {
1353
+ position: relative;
1354
+ }
1355
+
1356
+ .docs-code-header {
1357
+ align-items: center;
1358
+ gap: 8px;
1359
+ padding-right: 6px;
1360
+ }
1361
+
1362
+ .docs-code-header > span:first-child {
1363
+ flex: 1;
1364
+ min-width: 0;
1365
+ }
1366
+
1367
+ .docs-code-header .docs-copy {
1368
+ width: 24px;
1369
+ height: 24px;
1370
+ margin: -3px 0;
1371
+ }
1372
+
1373
+ .docs-code-copy-float {
1374
+ position: absolute;
1375
+ top: 7px;
1376
+ right: 7px;
1377
+ z-index: 1;
1378
+ background: var(--gb-panel);
1379
+ opacity: 0;
1380
+ }
1381
+
1382
+ .docs-code:hover .docs-code-copy-float,
1383
+ .docs-code-copy-float:focus-visible,
1384
+ .docs-code-copy-float[data-copied] {
1385
+ opacity: 1;
1386
+ }
1387
+
1388
+ .docs-react-demo-code-copy {
1389
+ position: absolute;
1390
+ top: 8px;
1391
+ right: 8px;
1392
+ z-index: 1;
1393
+ background: var(--docs-react-demo-panel, var(--gb-panel));
1394
+ box-shadow: 0 0 0 1px var(--gb-border);
1395
+ }
1396
+
1397
+ .docs-react-demo-code-body:not([data-toggle]) {
1398
+ padding-bottom: 1.15rem;
1399
+ }
1400
+
1401
+ .docs-react-demo-code-body:not([data-toggle])::after {
1402
+ display: none;
1403
+ }
1404
+
1405
+ /* ---- Pill tabs / segmented controls ---- */
1406
+
1407
+ .docs-pills {
1408
+ display: inline-flex;
1409
+ flex-shrink: 0;
1410
+ gap: 2px;
1411
+ padding: 2px;
1412
+ border-radius: 9px;
1413
+ background: var(--gb-pill-track);
1414
+ }
1415
+
1416
+ .docs-pill {
1417
+ position: relative;
1418
+ z-index: 0;
1419
+ border: 0;
1420
+ border-radius: 7px;
1421
+ padding: 6px 11px;
1422
+ background: none;
1423
+ color: var(--gb-muted-foreground);
1424
+ font: inherit;
1425
+ font-size: 12.5px;
1426
+ font-weight: 600;
1427
+ line-height: 1;
1428
+ white-space: nowrap;
1429
+ cursor: pointer;
1430
+ -webkit-tap-highlight-color: transparent;
1431
+ transition: color 150ms ease;
1432
+ }
1433
+
1434
+ .docs-pill[aria-selected="true"],
1435
+ .docs-pill[aria-checked="true"],
1436
+ .docs-pill:hover {
1437
+ color: var(--gb-panel-foreground);
1438
+ }
1439
+
1440
+ .docs-pill:focus-visible {
1441
+ outline: 2px solid var(--gb-primary);
1442
+ outline-offset: 1px;
1443
+ }
1444
+
1445
+ .docs-pill-indicator {
1446
+ position: absolute;
1447
+ inset: 0;
1448
+ z-index: -1;
1449
+ border-radius: 7px;
1450
+ background: var(--gb-pill);
1451
+ box-shadow: var(--gb-pill-shadow);
1452
+ }
1453
+
1454
+ .docs-pill-label {
1455
+ position: relative;
1456
+ }
1457
+
1458
+ /* ---- Code-only tabs (install commands): the tabs become the code block's header ---- */
1459
+
1460
+ .docs-tabs-code {
1461
+ border-radius: 12px;
1462
+ background: var(--gb-panel);
1463
+ }
1464
+
1465
+ .docs-tabs-code-head {
1466
+ display: flex;
1467
+ align-items: center;
1468
+ gap: 8px;
1469
+ min-height: 38px;
1470
+ padding: 5px 6px 5px 10px;
1471
+ border-bottom: 1px solid var(--gb-border);
1472
+ background: var(--gb-muted);
1473
+ }
1474
+
1475
+ .docs-tabs-code-head .docs-tabs-header {
1476
+ margin: 0;
1477
+ padding: 0;
1478
+ max-width: none;
1479
+ border: 0;
1480
+ border-radius: 0;
1481
+ background: none;
1482
+ }
1483
+
1484
+ .docs-tabs-code-head .docs-tabs-header button {
1485
+ padding: 5px 9px;
1486
+ border-radius: 7px;
1487
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
1488
+ font-size: 12px;
1489
+ font-weight: 500;
1490
+ }
1491
+
1492
+ .docs-tabs-code-head .docs-tabs-header .docs-tab-active {
1493
+ font-weight: 600;
1494
+ }
1495
+
1496
+ .docs-tabs-code-head .docs-tab-indicator {
1497
+ border: 0;
1498
+ background: var(--gb-pill);
1499
+ box-shadow: var(--gb-pill-shadow);
1500
+ }
1501
+
1502
+ .docs-tabs-code-term {
1503
+ display: grid;
1504
+ place-items: center;
1505
+ flex-shrink: 0;
1506
+ width: 20px;
1507
+ height: 20px;
1508
+ border-radius: 5px;
1509
+ background: var(--gb-panel-foreground);
1510
+ color: var(--gb-panel);
1511
+ opacity: 0.85;
1512
+ }
1513
+
1514
+ .docs-tabs-code-title {
1515
+ flex: 1;
1516
+ min-width: 0;
1517
+ overflow: hidden;
1518
+ color: var(--gb-muted-foreground);
1519
+ font-size: 12px;
1520
+ text-align: right;
1521
+ text-overflow: ellipsis;
1522
+ white-space: nowrap;
1523
+ }
1524
+
1525
+ .docs-tabs-code-body pre {
1526
+ margin: 0;
1527
+ padding: 13px 16px;
1528
+ overflow-x: auto;
1529
+ background: var(--gb-code-bg);
1530
+ color: var(--gb-code-fg);
1531
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
1532
+ font-size: 13px;
1533
+ line-height: 1.6;
1534
+ }
1535
+
1536
+ .docs-tabs-code-body pre code {
1537
+ padding: 0;
1538
+ background: none;
1539
+ font-size: inherit;
1540
+ }
1541
+
1542
+ /* ---- Page actions ("Copy page ▾") ---- */
1543
+
1544
+ .docs-page-actions-bar {
1545
+ display: flex;
1546
+ justify-content: flex-end;
1547
+ margin-bottom: -4px;
1548
+ }
1549
+
1550
+ .docs-page-actions-bar + [data-docstream-blocks] > :first-child:is(h1, h2) {
1551
+ margin-top: 0.2em;
1552
+ }
1553
+
1554
+ .docs-page-actions {
1555
+ position: relative;
1556
+ display: inline-flex;
1557
+ flex-shrink: 0;
1558
+ font-size: 12.5px;
1559
+ }
1560
+
1561
+ .docs-page-actions > button {
1562
+ display: inline-flex;
1563
+ align-items: center;
1564
+ gap: 6px;
1565
+ height: 28px;
1566
+ border: 1px solid var(--gb-border);
1567
+ background: var(--gb-panel);
1568
+ color: var(--gb-panel-foreground);
1569
+ font: inherit;
1570
+ font-weight: 600;
1571
+ line-height: 1;
1572
+ cursor: pointer;
1573
+ transition: background 150ms ease;
1574
+ }
1575
+
1576
+ .docs-page-actions > button:hover {
1577
+ background: var(--gb-muted);
1578
+ }
1579
+
1580
+ .docs-page-actions > button:focus-visible {
1581
+ position: relative;
1582
+ z-index: 1;
1583
+ outline: 2px solid var(--gb-primary);
1584
+ outline-offset: 1px;
1585
+ }
1586
+
1587
+ .docs-page-actions-main {
1588
+ padding: 0 10px 0 9px;
1589
+ border-radius: 8px 0 0 8px;
1590
+ }
1591
+
1592
+ .docs-page-actions-main > span:last-child {
1593
+ min-width: 60px;
1594
+ text-align: left;
1595
+ }
1596
+
1597
+ .docs-page-actions > .docs-page-actions-more {
1598
+ margin-left: -1px;
1599
+ padding: 0 7px;
1600
+ border-radius: 0 8px 8px 0;
1601
+ color: var(--gb-muted-foreground);
1602
+ }
1603
+
1604
+ .docs-page-actions-more svg {
1605
+ transition: transform 200ms ease;
1606
+ }
1607
+
1608
+ .docs-page-actions-more .docs-page-actions-caret-open {
1609
+ transform: rotate(180deg);
1610
+ }
1611
+
1612
+ .docs-page-actions-menu {
1613
+ position: absolute;
1614
+ top: calc(100% + 6px);
1615
+ right: 0;
1616
+ z-index: 50;
1617
+ width: 256px;
1618
+ padding: 5px;
1619
+ border: 1px solid var(--gb-border);
1620
+ border-radius: 12px;
1621
+ background: var(--gb-panel);
1622
+ box-shadow: var(--gb-menu-shadow);
1623
+ }
1624
+
1625
+ .docs-page-actions-item {
1626
+ display: flex;
1627
+ align-items: flex-start;
1628
+ gap: 10px;
1629
+ box-sizing: border-box;
1630
+ width: 100%;
1631
+ padding: 8px 9px;
1632
+ border: 0;
1633
+ border-radius: 8px;
1634
+ background: none;
1635
+ color: var(--gb-panel-foreground) !important;
1636
+ font: inherit;
1637
+ text-align: left;
1638
+ text-decoration: none !important;
1639
+ cursor: pointer;
1640
+ }
1641
+
1642
+ .docs-page-actions-item:hover,
1643
+ .docs-page-actions-item:focus-visible {
1644
+ outline: none;
1645
+ background: var(--gb-hover);
1646
+ }
1647
+
1648
+ .docs-page-actions-icon {
1649
+ display: grid;
1650
+ place-items: center;
1651
+ flex-shrink: 0;
1652
+ width: 26px;
1653
+ height: 26px;
1654
+ border: 1px solid var(--gb-border);
1655
+ border-radius: 7px;
1656
+ color: var(--gb-muted-foreground);
1657
+ }
1658
+
1659
+ .docs-page-actions-text {
1660
+ display: flex;
1661
+ flex-direction: column;
1662
+ gap: 2px;
1663
+ min-width: 0;
1664
+ }
1665
+
1666
+ .docs-page-actions-label {
1667
+ display: inline-flex;
1668
+ align-items: center;
1669
+ gap: 5px;
1670
+ font-size: 13px;
1671
+ font-weight: 600;
1672
+ line-height: 1.3;
1673
+ }
1674
+
1675
+ .docs-page-actions-label svg {
1676
+ color: var(--gb-muted-foreground);
1677
+ }
1678
+
1679
+ .docs-page-actions-hint {
1680
+ color: var(--gb-muted-foreground);
1681
+ font-size: 11.5px;
1682
+ line-height: 1.35;
1683
+ }
1684
+
1685
+ /* ---- Demo viewer ---- */
1686
+
1687
+ .docs-demo {
1688
+ container-type: inline-size;
1689
+ --docs-demo-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
1690
+ }
1691
+
1692
+ :is([data-docstream], .docs-article) [data-docstream-blocks] > .docs-demo {
1693
+ margin-block: 1.5em;
1694
+ }
1695
+
1696
+ .docs-demo-title {
1697
+ color: var(--gb-panel-foreground);
1698
+ font-size: 15px;
1699
+ font-weight: 650;
1700
+ letter-spacing: -0.1px;
1701
+ line-height: 1.3;
1702
+ }
1703
+
1704
+ .docs-demo-desc {
1705
+ margin: 3px 0 0;
1706
+ color: var(--gb-muted-foreground);
1707
+ font-size: 13.5px;
1708
+ font-weight: 400;
1709
+ line-height: 1.5;
1710
+ }
1711
+
1712
+ .docs-demo-desc code {
1713
+ font-size: 0.9em;
1714
+ }
1715
+
1716
+ .docs-demo-spacer {
1717
+ flex: 1;
1718
+ }
1719
+
1720
+ .docs-demo-icon-btn {
1721
+ display: inline-grid;
1722
+ place-items: center;
1723
+ flex-shrink: 0;
1724
+ box-sizing: border-box;
1725
+ width: 30px;
1726
+ height: 30px;
1727
+ padding: 0;
1728
+ border: 1px solid var(--gb-border);
1729
+ border-radius: 8px;
1730
+ background: var(--gb-panel);
1731
+ color: var(--gb-muted-foreground) !important;
1732
+ cursor: pointer;
1733
+ text-decoration: none !important;
1734
+ transition: background 150ms ease, color 150ms ease;
1735
+ }
1736
+
1737
+ .docs-demo-icon-btn:hover {
1738
+ background: var(--gb-hover);
1739
+ color: var(--gb-panel-foreground) !important;
1740
+ }
1741
+
1742
+ .docs-demo-icon-btn:focus-visible,
1743
+ .docs-demo-vp:focus-visible,
1744
+ .docs-demo-file:focus-visible,
1745
+ .docs-demo-handle:focus-visible,
1746
+ .docs-demo-source-body:focus-visible {
1747
+ outline: 2px solid var(--gb-primary);
1748
+ outline-offset: 1px;
1749
+ }
1750
+
1751
+ .docs-demo-head {
1752
+ display: flex;
1753
+ flex-wrap: wrap;
1754
+ align-items: flex-end;
1755
+ justify-content: space-between;
1756
+ gap: 10px 20px;
1757
+ margin-bottom: 10px;
1758
+ }
1759
+
1760
+ .docs-demo-head .docs-demo-heading {
1761
+ flex: 1 1 220px;
1762
+ min-width: 0;
1763
+ }
1764
+
1765
+ .docs-demo-tools {
1766
+ display: flex;
1767
+ flex-wrap: wrap;
1768
+ align-items: center;
1769
+ gap: 6px;
1770
+ }
1771
+
1772
+ .docs-demo-viewports {
1773
+ display: inline-flex;
1774
+ align-items: center;
1775
+ gap: 1px;
1776
+ padding: 1px;
1777
+ border: 1px solid var(--gb-border);
1778
+ border-radius: 9px;
1779
+ }
1780
+
1781
+ .docs-demo-vp {
1782
+ display: grid;
1783
+ place-items: center;
1784
+ width: 28px;
1785
+ height: 26px;
1786
+ padding: 0;
1787
+ border: 0;
1788
+ border-radius: 7px;
1789
+ background: none;
1790
+ color: var(--gb-muted-foreground);
1791
+ cursor: pointer;
1792
+ transition: background 150ms ease, color 150ms ease;
1793
+ }
1794
+
1795
+ .docs-demo-vp:hover,
1796
+ .docs-demo-vp[aria-pressed="true"] {
1797
+ background: var(--gb-hover);
1798
+ color: var(--gb-panel-foreground);
1799
+ }
1800
+
1801
+ .docs-demo-body {
1802
+ overflow: hidden;
1803
+ border: 1px solid var(--gb-border);
1804
+ border-radius: 14px;
1805
+ background-color: var(--gb-panel);
1806
+ }
1807
+
1808
+ .docs-demo-stage {
1809
+ position: relative;
1810
+ display: flex;
1811
+ background-color: var(--gb-stage);
1812
+ background-image: radial-gradient(var(--gb-stage-dot) 1px, transparent 1.2px);
1813
+ background-size: 14px 14px;
1814
+ }
1815
+
1816
+ /* Frames are size containers, so a demo's own @container queries respond to the preview width. */
1817
+ .docs-demo-frame,
1818
+ .docs-demo-single-preview,
1819
+ .docs-demo-dialog-stage,
1820
+ .docs-demo-fullscreen {
1821
+ container-type: inline-size;
1822
+ }
1823
+
1824
+ .docs-demo-frame {
1825
+ position: relative;
1826
+ max-width: 100%;
1827
+ height: 100%;
1828
+ overflow: auto;
1829
+ background: var(--background, var(--gb-panel));
1830
+ }
1831
+
1832
+ .docs-demo-frame[data-sized] {
1833
+ box-shadow: 1px 0 0 var(--gb-border);
1834
+ }
1835
+
1836
+ .docs-demo-handle {
1837
+ position: relative;
1838
+ z-index: 2;
1839
+ flex-shrink: 0;
1840
+ width: 16px;
1841
+ margin-left: -16px;
1842
+ cursor: ew-resize;
1843
+ touch-action: none;
1844
+ }
1845
+
1846
+ .docs-demo-frame[data-sized] + .docs-demo-handle {
1847
+ margin-left: 0;
1848
+ }
1849
+
1850
+ .docs-demo-handle::after {
1851
+ position: absolute;
1852
+ top: 50%;
1853
+ left: 5px;
1854
+ width: 5px;
1855
+ height: 40px;
1856
+ margin-top: -20px;
1857
+ border-radius: 3px;
1858
+ background: var(--gb-stage-dot);
1859
+ content: "";
1860
+ transition: background 150ms ease, height 200ms ease, margin 200ms ease;
1861
+ }
1862
+
1863
+ .docs-demo-handle:hover::after,
1864
+ .docs-demo-handle:focus-visible::after,
1865
+ .docs-demo-handle[data-dragging]::after {
1866
+ height: 56px;
1867
+ margin-top: -28px;
1868
+ background: var(--gb-primary);
1869
+ }
1870
+
1871
+ .docs-demo-stage[data-dragging] {
1872
+ cursor: ew-resize;
1873
+ user-select: none;
1874
+ }
1875
+
1876
+ .docs-demo-stage[data-dragging] .docs-demo-frame {
1877
+ pointer-events: none;
1878
+ }
1879
+
1880
+ .docs-demo-readout {
1881
+ position: absolute;
1882
+ right: 10px;
1883
+ bottom: 8px;
1884
+ z-index: 3;
1885
+ padding: 3px 7px;
1886
+ border-radius: 6px;
1887
+ background: var(--gb-panel);
1888
+ box-shadow: 0 0 0 1px var(--gb-border);
1889
+ color: var(--gb-muted-foreground);
1890
+ font: 500 11px/1 var(--docs-demo-mono);
1891
+ opacity: 0;
1892
+ pointer-events: none;
1893
+ transition: opacity 150ms ease;
1894
+ }
1895
+
1896
+ .docs-demo-stage:hover .docs-demo-readout,
1897
+ .docs-demo-stage[data-dragging] .docs-demo-readout,
1898
+ .docs-demo-stage:has(.docs-demo-handle:focus-visible) .docs-demo-readout,
1899
+ .docs-demo-stage:has(.docs-demo-frame[data-sized]) .docs-demo-readout {
1900
+ opacity: 1;
1901
+ }
1902
+
1903
+ .docs-demo-canvas {
1904
+ display: grid;
1905
+ place-items: center;
1906
+ box-sizing: border-box;
1907
+ min-height: 100%;
1908
+ padding: 28px 24px;
1909
+ color: var(--foreground, var(--gb-panel-foreground));
1910
+ }
1911
+
1912
+ .docs-demo-canvas > * {
1913
+ max-width: 100%;
1914
+ }
1915
+
1916
+ .docs-demo-canvas-bleed {
1917
+ display: block;
1918
+ place-items: normal;
1919
+ height: 100%;
1920
+ padding: 0;
1921
+ }
1922
+
1923
+ .docs-demo-canvas-bleed > * {
1924
+ max-width: none;
1925
+ }
1926
+
1927
+ .docs-demo-loading {
1928
+ display: grid;
1929
+ place-items: center;
1930
+ height: 100%;
1931
+ min-height: 120px;
1932
+ color: var(--gb-muted-foreground);
1933
+ }
1934
+
1935
+ .docs-demo-spinner {
1936
+ width: 18px;
1937
+ height: 18px;
1938
+ border: 2px solid var(--gb-border);
1939
+ border-top-color: var(--gb-muted-foreground);
1940
+ border-radius: 50%;
1941
+ animation: docs-demo-spin 700ms linear infinite;
1942
+ }
1943
+
1944
+ @keyframes docs-demo-spin {
1945
+ to {
1946
+ transform: rotate(360deg);
1947
+ }
1948
+ }
1949
+
1950
+ .docs-demo-error {
1951
+ margin: 0;
1952
+ padding: 14px;
1953
+ color: var(--gb-danger);
1954
+ font: 12px/1.5 var(--docs-demo-mono);
1955
+ white-space: pre-wrap;
1956
+ }
1957
+
1958
+ /* Code view: file tree + source */
1959
+
1960
+ .docs-demo-code {
1961
+ display: flex;
1962
+ background: var(--gb-panel);
1963
+ }
1964
+
1965
+ .docs-demo-files {
1966
+ flex-shrink: 0;
1967
+ box-sizing: border-box;
1968
+ width: 188px;
1969
+ padding: 8px;
1970
+ overflow-y: auto;
1971
+ border-right: 1px solid var(--gb-border);
1972
+ background: var(--gb-muted);
1973
+ }
1974
+
1975
+ .docs-demo-files-h {
1976
+ padding: 6px 8px 8px;
1977
+ color: var(--gb-muted-foreground);
1978
+ font-size: 10.5px;
1979
+ font-weight: 700;
1980
+ letter-spacing: 0.7px;
1981
+ text-transform: uppercase;
1982
+ }
1983
+
1984
+ .docs-demo-dir,
1985
+ .docs-demo-file {
1986
+ display: flex;
1987
+ align-items: center;
1988
+ gap: 7px;
1989
+ box-sizing: border-box;
1990
+ width: 100%;
1991
+ padding: 6px 8px 6px calc(8px + var(--depth, 0) * 14px);
1992
+ font: 12.5px/1.3 var(--docs-demo-mono);
1993
+ text-align: left;
1994
+ }
1995
+
1996
+ .docs-demo-dir {
1997
+ color: var(--gb-muted-foreground);
1998
+ }
1999
+
2000
+ .docs-demo-file {
2001
+ border: 0;
2002
+ border-radius: 7px;
2003
+ background: none;
2004
+ color: var(--gb-panel-foreground);
2005
+ cursor: pointer;
2006
+ }
2007
+
2008
+ .docs-demo-file > span {
2009
+ overflow: hidden;
2010
+ text-overflow: ellipsis;
2011
+ white-space: nowrap;
2012
+ }
2013
+
2014
+ .docs-demo-file svg,
2015
+ .docs-demo-dir svg {
2016
+ flex-shrink: 0;
2017
+ color: var(--gb-muted-foreground);
2018
+ }
2019
+
2020
+ .docs-demo-file:hover {
2021
+ background: var(--gb-hover);
2022
+ }
2023
+
2024
+ .docs-demo-file[aria-selected="true"] {
2025
+ background: var(--gb-panel);
2026
+ box-shadow: var(--gb-pill-shadow);
2027
+ color: var(--gb-primary);
2028
+ font-weight: 600;
2029
+ }
2030
+
2031
+ .docs-demo-file[aria-selected="true"] svg {
2032
+ color: var(--gb-primary);
2033
+ }
2034
+
2035
+ .docs-demo-source {
2036
+ display: flex;
2037
+ flex: 1;
2038
+ flex-direction: column;
2039
+ min-width: 0;
2040
+ }
2041
+
2042
+ .docs-demo-source-h {
2043
+ display: flex;
2044
+ align-items: center;
2045
+ justify-content: space-between;
2046
+ gap: 8px;
2047
+ padding: 5px 6px 5px 14px;
2048
+ border-bottom: 1px solid var(--gb-border);
2049
+ color: var(--gb-muted-foreground);
2050
+ font: 12px/1 var(--docs-demo-mono);
2051
+ }
2052
+
2053
+ .docs-demo-source-path {
2054
+ overflow: hidden;
2055
+ text-overflow: ellipsis;
2056
+ white-space: nowrap;
2057
+ }
2058
+
2059
+ .docs-demo-source-body {
2060
+ flex: 1;
2061
+ min-height: 0;
2062
+ overflow: auto;
2063
+ background: var(--gb-code-bg);
2064
+ }
2065
+
2066
+ .docs-demo-source-body pre {
2067
+ margin: 0;
2068
+ padding: 13px 16px;
2069
+ color: var(--gb-code-fg);
2070
+ font: 12.5px/1.65 var(--docs-demo-mono);
2071
+ tab-size: 2;
2072
+ }
2073
+
2074
+ .docs-demo-source-body pre code {
2075
+ display: block;
2076
+ min-width: max-content;
2077
+ padding: 0;
2078
+ background: none;
2079
+ font-size: inherit;
2080
+ }
2081
+
2082
+ @container (max-width: 560px) {
2083
+ .docs-demo-code {
2084
+ flex-direction: column;
2085
+ }
2086
+
2087
+ .docs-demo-files {
2088
+ display: flex;
2089
+ gap: 2px;
2090
+ width: auto;
2091
+ padding: 6px;
2092
+ overflow-x: auto;
2093
+ overflow-y: hidden;
2094
+ border-right: 0;
2095
+ border-bottom: 1px solid var(--gb-border);
2096
+ }
2097
+
2098
+ .docs-demo-files-h,
2099
+ .docs-demo-dir {
2100
+ display: none;
2101
+ }
2102
+
2103
+ .docs-demo-file {
2104
+ width: auto;
2105
+ padding-left: 8px;
2106
+ }
2107
+
2108
+ .docs-demo-viewports {
2109
+ display: none;
2110
+ }
2111
+ }
2112
+
2113
+ /* Single-file layout: the ReactDemo card */
2114
+
2115
+ .docs-demo-single .docs-react-demo-header {
2116
+ flex-wrap: wrap;
2117
+ gap: 8px;
2118
+ padding: 8px 8px 8px 14px;
2119
+ }
2120
+
2121
+ .docs-demo-single .docs-demo-heading {
2122
+ display: flex;
2123
+ flex: 1 1 200px;
2124
+ flex-direction: column;
2125
+ min-width: 0;
2126
+ }
2127
+
2128
+ .docs-demo-single .docs-demo-heading + .docs-demo-spacer {
2129
+ display: none;
2130
+ }
2131
+
2132
+ .docs-demo-single .docs-demo-title {
2133
+ font-size: 13.5px;
2134
+ }
2135
+
2136
+ .docs-demo-single .docs-demo-desc {
2137
+ margin: 1px 0 0;
2138
+ font-size: 12.5px;
2139
+ }
2140
+
2141
+ .docs-demo-single .docs-demo-icon-btn {
2142
+ width: 28px;
2143
+ height: 28px;
2144
+ border-color: transparent;
2145
+ background: none;
2146
+ }
2147
+
2148
+ .docs-demo-single .docs-demo-icon-btn:hover {
2149
+ background: var(--gb-hover);
2150
+ }
2151
+
2152
+ .docs-demo-single-preview {
2153
+ min-height: 120px;
2154
+ background: var(--background, var(--gb-panel));
2155
+ }
2156
+
2157
+ /* Fullscreen overlay + deep link */
2158
+
2159
+ .docs-demo-dialog {
2160
+ box-sizing: border-box;
2161
+ width: 100vw;
2162
+ max-width: none;
2163
+ height: 100dvh;
2164
+ max-height: none;
2165
+ margin: 0;
2166
+ padding: 0;
2167
+ border: 0;
2168
+ background: var(--background, var(--gb-panel));
2169
+ color: var(--foreground, var(--gb-panel-foreground));
2170
+ }
2171
+
2172
+ .docs-demo-dialog:not([open]) {
2173
+ display: none;
2174
+ }
2175
+
2176
+ .docs-demo-dialog::backdrop {
2177
+ background: rgba(0, 0, 0, 0.45);
2178
+ }
2179
+
2180
+ .docs-demo-dialog-inner {
2181
+ display: flex;
2182
+ flex-direction: column;
2183
+ height: 100%;
2184
+ }
2185
+
2186
+ .docs-demo-dialog-bar {
2187
+ display: flex;
2188
+ align-items: center;
2189
+ gap: 10px;
2190
+ padding: 8px 10px 8px 16px;
2191
+ border-bottom: 1px solid var(--gb-border);
2192
+ background: var(--gb-panel);
2193
+ }
2194
+
2195
+ .docs-demo-dialog-src {
2196
+ color: var(--gb-muted-foreground);
2197
+ font: 12px/1 var(--docs-demo-mono);
2198
+ }
2199
+
2200
+ .docs-demo-dialog-stage {
2201
+ flex: 1;
2202
+ min-height: 0;
2203
+ overflow: auto;
2204
+ }
2205
+
2206
+ .docs-demo-fullscreen {
2207
+ width: 100vw;
2208
+ height: 100dvh;
2209
+ overflow: auto;
2210
+ }
2211
+
2212
+ .docs-demo-dialog-stage > .docs-demo-canvas,
2213
+ .docs-demo-fullscreen > .docs-demo-canvas {
2214
+ min-height: 100%;
2215
+ }
2216
+
2217
+ @media (prefers-reduced-motion: reduce) {
2218
+ .docs-demo-spinner {
2219
+ animation-duration: 1.6s;
2220
+ }
2221
+
2222
+ .docs-demo-handle::after,
2223
+ .docs-page-actions-more svg {
2224
+ transition: none;
2225
+ }
2226
+ }
2227
+
1312
2228
  /* Keep every rendered table variant flush, after the shared block spacing rules. */
1313
2229
  :is([data-docstream], .docs-article) [data-docstream-blocks] > :is(.docs-table, table, .docs-cards) {
1314
2230
  margin-block-start: 0;