sourcey 3.6.4 → 3.6.5

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.
@@ -46,7 +46,12 @@
46
46
  /* ── Scroll Offset (clears fixed navbar on anchor clicks) ──────────── */
47
47
 
48
48
  [data-traverse-target],
49
- h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
49
+ h1[id],
50
+ h2[id],
51
+ h3[id],
52
+ h4[id],
53
+ h5[id],
54
+ h6[id] {
50
55
  scroll-margin-top: var(--header-height, 7rem);
51
56
  }
52
57
 
@@ -93,8 +98,8 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
93
98
  #sourcey .table-wrap table {
94
99
  margin: 0;
95
100
  }
96
- #sourcey .prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)) {
97
- padding-top: .571429em;
101
+ #sourcey .prose :where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
102
+ padding-top: 0.571429em;
98
103
  }
99
104
 
100
105
  /* ── Prose Video (::video directive) ──────────────────────────────── */
@@ -232,7 +237,9 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
232
237
  cursor: pointer;
233
238
  border-radius: 0.75rem;
234
239
  text-decoration: none;
235
- transition: color 0.15s, background-color 0.15s;
240
+ transition:
241
+ color 0.15s,
242
+ background-color 0.15s;
236
243
  }
237
244
  #sourcey .nav-group-link:hover {
238
245
  color: rgb(var(--color-primary-ink));
@@ -272,7 +279,9 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
272
279
  border-radius: 0.75rem;
273
280
  width: 100%;
274
281
  color: rgb(var(--color-gray-700));
275
- transition: color 0.15s, background-color 0.15s;
282
+ transition:
283
+ color 0.15s,
284
+ background-color 0.15s;
276
285
  }
277
286
  .dark #sourcey .nav-link {
278
287
  color: rgb(var(--color-gray-400));
@@ -288,7 +297,9 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
288
297
  #sourcey .nav-link.active {
289
298
  color: rgb(var(--color-primary-ink));
290
299
  background: rgb(var(--color-primary) / 0.08);
291
- text-shadow: -0.2px 0 0 currentColor, 0.2px 0 0 currentColor;
300
+ text-shadow:
301
+ -0.2px 0 0 currentColor,
302
+ 0.2px 0 0 currentColor;
292
303
  }
293
304
  .dark #sourcey .nav-link.active {
294
305
  color: rgb(var(--color-primary-light));
@@ -300,7 +311,9 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
300
311
  #sourcey #toc .toc-item {
301
312
  border-left: 2px solid rgb(var(--color-gray-200));
302
313
  padding-left: 0.75rem;
303
- transition: color 0.15s, border-color 0.15s;
314
+ transition:
315
+ color 0.15s,
316
+ border-color 0.15s;
304
317
  }
305
318
  #sourcey #toc ul ul .toc-item {
306
319
  margin-left: 0.75rem;
@@ -321,8 +334,12 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
321
334
 
322
335
  /* ── Code Block Panels (language dropdown + response tabs) ─────────── */
323
336
 
324
- #sourcey .code-lang-panel { display: none; }
325
- #sourcey .code-lang-panel.active { display: block; }
337
+ #sourcey .code-lang-panel {
338
+ display: none;
339
+ }
340
+ #sourcey .code-lang-panel.active {
341
+ display: block;
342
+ }
326
343
 
327
344
  #sourcey .lang-icon {
328
345
  width: 0.875rem;
@@ -342,8 +359,12 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
342
359
  mask-position: center;
343
360
  }
344
361
 
345
- #sourcey .response-panel { display: none; }
346
- #sourcey .response-panel.active { display: block; }
362
+ #sourcey .response-panel {
363
+ display: none;
364
+ }
365
+ #sourcey .response-panel.active {
366
+ display: block;
367
+ }
347
368
 
348
369
  /* ── Response Tabs (status code tabs on code block) ───────────────── */
349
370
 
@@ -364,7 +385,7 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
364
385
 
365
386
  /* Active response tab underline */
366
387
  #sourcey .response-tab.active::after {
367
- content: '';
388
+ content: "";
368
389
  position: absolute;
369
390
  right: 0;
370
391
  bottom: -0.375rem;
@@ -524,11 +545,15 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
524
545
  color: rgb(var(--color-gray-400));
525
546
  }
526
547
 
527
- #sourcey .json-property-enum-item { color: rgb(var(--color-gray-700)); }
528
- .dark #sourcey .json-property-enum-item { color: rgb(var(--color-gray-300)); }
548
+ #sourcey .json-property-enum-item {
549
+ color: rgb(var(--color-gray-700));
550
+ }
551
+ .dark #sourcey .json-property-enum-item {
552
+ color: rgb(var(--color-gray-300));
553
+ }
529
554
 
530
555
  #sourcey .json-property-default-value::before {
531
- content: '= ';
556
+ content: "= ";
532
557
  color: rgb(var(--color-gray-400));
533
558
  }
534
559
 
@@ -597,7 +622,6 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
597
622
  color: rgb(var(--color-gray-400));
598
623
  }
599
624
 
600
-
601
625
  /* ── Steps (numbered step list with vertical connector) ────────────── */
602
626
 
603
627
  #sourcey .steps {
@@ -614,7 +638,7 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
614
638
  }
615
639
 
616
640
  #sourcey .steps .step-item::before {
617
- content: '';
641
+ content: "";
618
642
  position: absolute;
619
643
  left: 13px;
620
644
  top: 2.75rem;
@@ -685,9 +709,15 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
685
709
  margin-bottom: 2rem;
686
710
  }
687
711
  @media (min-width: 640px) {
688
- #sourcey .card-group[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
689
- #sourcey .card-group[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
690
- #sourcey .card-group[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
712
+ #sourcey .card-group[data-cols="2"] {
713
+ grid-template-columns: repeat(2, 1fr);
714
+ }
715
+ #sourcey .card-group[data-cols="3"] {
716
+ grid-template-columns: repeat(3, 1fr);
717
+ }
718
+ #sourcey .card-group[data-cols="4"] {
719
+ grid-template-columns: repeat(4, 1fr);
720
+ }
691
721
  }
692
722
 
693
723
  #sourcey .card-item {
@@ -787,7 +817,9 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
787
817
  color: rgb(var(--color-gray-900));
788
818
  list-style: none;
789
819
  }
790
- #sourcey .accordion-trigger::-webkit-details-marker { display: none; }
820
+ #sourcey .accordion-trigger::-webkit-details-marker {
821
+ display: none;
822
+ }
791
823
  .dark #sourcey .accordion-trigger {
792
824
  color: rgb(var(--color-gray-200));
793
825
  }
@@ -800,7 +832,7 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
800
832
  }
801
833
 
802
834
  #sourcey .accordion-trigger::before {
803
- content: '';
835
+ content: "";
804
836
  display: inline-block;
805
837
  width: 0.75rem;
806
838
  height: 0.75rem;
@@ -875,16 +907,32 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
875
907
  }
876
908
 
877
909
  /* Note — blue */
878
- #sourcey .callout-note { border-left-color: #3b82f6; }
879
- .dark #sourcey .callout-note { border-left-color: #60a5fa; }
880
- #sourcey .callout-note .callout-title { color: #3b82f6; }
881
- .dark #sourcey .callout-note .callout-title { color: #60a5fa; }
910
+ #sourcey .callout-note {
911
+ border-left-color: #3b82f6;
912
+ }
913
+ .dark #sourcey .callout-note {
914
+ border-left-color: #60a5fa;
915
+ }
916
+ #sourcey .callout-note .callout-title {
917
+ color: #3b82f6;
918
+ }
919
+ .dark #sourcey .callout-note .callout-title {
920
+ color: #60a5fa;
921
+ }
882
922
 
883
923
  /* Warning — amber */
884
- #sourcey .callout-warning { border-left-color: #f59e0b; }
885
- .dark #sourcey .callout-warning { border-left-color: #fbbf24; }
886
- #sourcey .callout-warning .callout-title { color: #f59e0b; }
887
- .dark #sourcey .callout-warning .callout-title { color: #fbbf24; }
924
+ #sourcey .callout-warning {
925
+ border-left-color: #f59e0b;
926
+ }
927
+ .dark #sourcey .callout-warning {
928
+ border-left-color: #fbbf24;
929
+ }
930
+ #sourcey .callout-warning .callout-title {
931
+ color: #f59e0b;
932
+ }
933
+ .dark #sourcey .callout-warning .callout-title {
934
+ color: #fbbf24;
935
+ }
888
936
 
889
937
  /* ── Changelog ───────────────────────────────────────────────────── */
890
938
 
@@ -963,13 +1011,21 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
963
1011
  border-color: rgb(var(--color-primary) / 0.18);
964
1012
  border-left: 3px solid rgb(var(--color-primary));
965
1013
  padding-left: calc(1.25rem - 2px);
966
- background: linear-gradient(180deg, rgb(var(--color-primary) / 0.04), rgb(var(--color-primary) / 0.015));
1014
+ background: linear-gradient(
1015
+ 180deg,
1016
+ rgb(var(--color-primary) / 0.04),
1017
+ rgb(var(--color-primary) / 0.015)
1018
+ );
967
1019
  }
968
1020
 
969
1021
  .dark #sourcey .sourcey-changelog-version-unreleased {
970
1022
  border-color: rgb(var(--color-primary-light) / 0.22);
971
1023
  border-left-color: rgb(var(--color-primary-light));
972
- background: linear-gradient(180deg, rgb(var(--color-primary-light) / 0.06), rgb(var(--color-primary-light) / 0.02));
1024
+ background: linear-gradient(
1025
+ 180deg,
1026
+ rgb(var(--color-primary-light) / 0.06),
1027
+ rgb(var(--color-primary-light) / 0.02)
1028
+ );
973
1029
  }
974
1030
 
975
1031
  #sourcey .sourcey-changelog-version-header {
@@ -1179,16 +1235,32 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1179
1235
  }
1180
1236
 
1181
1237
  /* Tip — green */
1182
- #sourcey .callout-tip { border-left-color: #22c55e; }
1183
- .dark #sourcey .callout-tip { border-left-color: #4ade80; }
1184
- #sourcey .callout-tip .callout-title { color: #22c55e; }
1185
- .dark #sourcey .callout-tip .callout-title { color: #4ade80; }
1238
+ #sourcey .callout-tip {
1239
+ border-left-color: #22c55e;
1240
+ }
1241
+ .dark #sourcey .callout-tip {
1242
+ border-left-color: #4ade80;
1243
+ }
1244
+ #sourcey .callout-tip .callout-title {
1245
+ color: #22c55e;
1246
+ }
1247
+ .dark #sourcey .callout-tip .callout-title {
1248
+ color: #4ade80;
1249
+ }
1186
1250
 
1187
1251
  /* Info — violet */
1188
- #sourcey .callout-info { border-left-color: #8b5cf6; }
1189
- .dark #sourcey .callout-info { border-left-color: #a78bfa; }
1190
- #sourcey .callout-info .callout-title { color: #8b5cf6; }
1191
- .dark #sourcey .callout-info .callout-title { color: #a78bfa; }
1252
+ #sourcey .callout-info {
1253
+ border-left-color: #8b5cf6;
1254
+ }
1255
+ .dark #sourcey .callout-info {
1256
+ border-left-color: #a78bfa;
1257
+ }
1258
+ #sourcey .callout-info .callout-title {
1259
+ color: #8b5cf6;
1260
+ }
1261
+ .dark #sourcey .callout-info .callout-title {
1262
+ color: #a78bfa;
1263
+ }
1192
1264
 
1193
1265
  /* ── Directive Tabs (:::tabs, :::code-group) ───────────────────────── */
1194
1266
 
@@ -1240,7 +1312,7 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1240
1312
  }
1241
1313
 
1242
1314
  #sourcey .directive-tab.active::after {
1243
- content: '';
1315
+ content: "";
1244
1316
  position: absolute;
1245
1317
  right: 0.5rem;
1246
1318
  bottom: -1px;
@@ -1353,10 +1425,16 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1353
1425
  .drawer-dropdown-trigger[aria-expanded="true"] {
1354
1426
  border-bottom-left-radius: 0;
1355
1427
  border-bottom-right-radius: 0;
1356
- box-shadow: inset 1px 0 0 rgb(var(--color-gray-200)), inset -1px 0 0 rgb(var(--color-gray-200)), inset 0 1px 0 rgb(var(--color-gray-200));
1428
+ box-shadow:
1429
+ inset 1px 0 0 rgb(var(--color-gray-200)),
1430
+ inset -1px 0 0 rgb(var(--color-gray-200)),
1431
+ inset 0 1px 0 rgb(var(--color-gray-200));
1357
1432
  }
1358
1433
  .dark .drawer-dropdown-trigger[aria-expanded="true"] {
1359
- box-shadow: inset 1px 0 0 rgb(var(--color-gray-600)), inset -1px 0 0 rgb(var(--color-gray-600)), inset 0 1px 0 rgb(var(--color-gray-600));
1434
+ box-shadow:
1435
+ inset 1px 0 0 rgb(var(--color-gray-600)),
1436
+ inset -1px 0 0 rgb(var(--color-gray-600)),
1437
+ inset 0 1px 0 rgb(var(--color-gray-600));
1360
1438
  }
1361
1439
 
1362
1440
  .drawer-dropdown-chevron {
@@ -1380,11 +1458,19 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1380
1458
  border-radius: 0 0 var(--radius, 0.5rem) var(--radius, 0.5rem);
1381
1459
  background: rgb(var(--color-background-light));
1382
1460
  border: none;
1383
- box-shadow: inset 1px 0 0 rgb(var(--color-gray-200)), inset -1px 0 0 rgb(var(--color-gray-200)), inset 0 -1px 0 rgb(var(--color-gray-200)), 0 6px 16px rgb(0 0 0 / 0.08);
1461
+ box-shadow:
1462
+ inset 1px 0 0 rgb(var(--color-gray-200)),
1463
+ inset -1px 0 0 rgb(var(--color-gray-200)),
1464
+ inset 0 -1px 0 rgb(var(--color-gray-200)),
1465
+ 0 6px 16px rgb(0 0 0 / 0.08);
1384
1466
  }
1385
1467
  .dark .drawer-dropdown-list {
1386
1468
  background: rgb(var(--color-background-dark));
1387
- box-shadow: inset 1px 0 0 rgb(var(--color-gray-600)), inset -1px 0 0 rgb(var(--color-gray-600)), inset 0 -1px 0 rgb(var(--color-gray-600)), 0 6px 16px rgb(0 0 0 / 0.3);
1469
+ box-shadow:
1470
+ inset 1px 0 0 rgb(var(--color-gray-600)),
1471
+ inset -1px 0 0 rgb(var(--color-gray-600)),
1472
+ inset 0 -1px 0 rgb(var(--color-gray-600)),
1473
+ 0 6px 16px rgb(0 0 0 / 0.3);
1388
1474
  }
1389
1475
 
1390
1476
  .drawer-dropdown-item {
@@ -1430,12 +1516,20 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1430
1516
  }
1431
1517
 
1432
1518
  @keyframes drawer-slide-in {
1433
- from { transform: translateX(-100%); }
1434
- to { transform: translateX(0); }
1519
+ from {
1520
+ transform: translateX(-100%);
1521
+ }
1522
+ to {
1523
+ transform: translateX(0);
1524
+ }
1435
1525
  }
1436
1526
  @keyframes drawer-fade-in {
1437
- from { opacity: 0; }
1438
- to { opacity: 1; }
1527
+ from {
1528
+ opacity: 0;
1529
+ }
1530
+ to {
1531
+ opacity: 1;
1532
+ }
1439
1533
  }
1440
1534
 
1441
1535
  /* ── Code group cards (API right-hand panels) ─────────────────────── */
@@ -1471,9 +1565,141 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1471
1565
  border-bottom-right-radius: var(--radius);
1472
1566
  }
1473
1567
 
1568
+ #sourcey .code-lang-menu {
1569
+ max-height: min(18rem, calc(100vh - var(--header-height, 0px) - 2rem));
1570
+ overflow-y: auto;
1571
+ overscroll-behavior: contain;
1572
+ }
1573
+
1574
+ /* ── Print/PDF output ─────────────────────────────────────────────── */
1575
+
1576
+ @media print {
1577
+ @page {
1578
+ margin: 0.7in;
1579
+ }
1580
+
1581
+ html,
1582
+ body,
1583
+ #sourcey,
1584
+ #sourcey #page,
1585
+ #sourcey #docs {
1586
+ background: #fff !important;
1587
+ color: #111827 !important;
1588
+ }
1589
+
1590
+ #sourcey #page::before,
1591
+ #sourcey #navbar,
1592
+ #sourcey #toc,
1593
+ #sourcey #search-dialog,
1594
+ #sourcey .mobile-nav-dialog,
1595
+ #sourcey .copy-btn,
1596
+ #sourcey .prose-code-copy,
1597
+ #sourcey .code-lang-dropdown {
1598
+ display: none !important;
1599
+ }
1600
+
1601
+ #sourcey .max-w-\[92rem\],
1602
+ #sourcey .max-w-3xl {
1603
+ max-width: none !important;
1604
+ margin: 0 !important;
1605
+ padding: 0 !important;
1606
+ }
1607
+
1608
+ #sourcey #docs {
1609
+ padding-top: 0 !important;
1610
+ }
1611
+
1612
+ #sourcey #docs > .flex,
1613
+ #sourcey #docs [class*="lg:flex-row"],
1614
+ #sourcey #docs [class*="xl:flex-row"] {
1615
+ display: block !important;
1616
+ }
1617
+
1618
+ #sourcey #content-area {
1619
+ width: 100% !important;
1620
+ max-width: none !important;
1621
+ margin: 0 !important;
1622
+ padding: 0 !important;
1623
+ }
1624
+
1625
+ #sourcey #sidebar {
1626
+ display: block !important;
1627
+ position: static !important;
1628
+ inset: auto !important;
1629
+ width: auto !important;
1630
+ margin: 0 0 1.5rem !important;
1631
+ padding: 0 0 1rem !important;
1632
+ border-bottom: 1px solid #e5e7eb;
1633
+ }
1634
+
1635
+ #sourcey #sidebar > div {
1636
+ position: static !important;
1637
+ inset: auto !important;
1638
+ overflow: visible !important;
1639
+ padding: 0 !important;
1640
+ }
1641
+
1642
+ #sourcey #sidebar .sticky {
1643
+ display: none !important;
1644
+ }
1645
+
1646
+ #sourcey #sidebar #nav::before {
1647
+ content: "Table of Contents";
1648
+ display: block;
1649
+ margin: 0 0 0.75rem;
1650
+ font-size: 0.875rem;
1651
+ font-weight: 700;
1652
+ color: #111827;
1653
+ }
1654
+
1655
+ #sourcey #sidebar .nav-group-label,
1656
+ #sourcey #sidebar .nav-link {
1657
+ color: #111827 !important;
1658
+ background: transparent !important;
1659
+ }
1660
+
1661
+ #sourcey #sidebar .nav-link {
1662
+ padding: 0.125rem 0 !important;
1663
+ }
1664
+
1665
+ #sourcey #docs article aside {
1666
+ display: none !important;
1667
+ }
1668
+
1669
+ #sourcey #docs [class*="lg:hidden"],
1670
+ #sourcey #docs [class*="xl:hidden"] {
1671
+ display: block !important;
1672
+ }
1673
+
1674
+ #sourcey .code-group,
1675
+ #sourcey .prose-code-block,
1676
+ #sourcey .param-item,
1677
+ #sourcey .schema-expandable,
1678
+ #sourcey .sourcey-changelog-version {
1679
+ break-inside: avoid;
1680
+ }
1681
+
1682
+ #sourcey .code-group,
1683
+ #sourcey .prose-code-block,
1684
+ #sourcey .prose-code-content,
1685
+ #sourcey .code-card-body,
1686
+ #sourcey .code-card-body > div,
1687
+ #sourcey .code-card-body .font-mono {
1688
+ background: #fff !important;
1689
+ color: #111827 !important;
1690
+ }
1691
+
1692
+ #sourcey a {
1693
+ color: #111827 !important;
1694
+ text-decoration: underline;
1695
+ }
1696
+ }
1697
+
1474
1698
  /* ── Selection ─────────────────────────────────────────────────────── */
1475
1699
 
1476
- #sourcey ::selection { background: rgb(var(--color-primary) / 0.12); }
1700
+ #sourcey ::selection {
1701
+ background: rgb(var(--color-primary) / 0.12);
1702
+ }
1477
1703
 
1478
1704
  /* ── Search Dialog ────────────────────────────────────────────────── */
1479
1705
 
@@ -1534,7 +1760,9 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1534
1760
  color: rgb(var(--color-gray-100));
1535
1761
  }
1536
1762
 
1537
- #sourcey #search-input::placeholder { color: rgb(var(--color-gray-400)); }
1763
+ #sourcey #search-input::placeholder {
1764
+ color: rgb(var(--color-gray-400));
1765
+ }
1538
1766
 
1539
1767
  #sourcey #search-results {
1540
1768
  max-height: 50vh;
@@ -1643,14 +1871,30 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1643
1871
  flex-shrink: 0;
1644
1872
  }
1645
1873
 
1646
- #sourcey .search-result-method.method-get { background: var(--method-get); }
1647
- #sourcey .search-result-method.method-post { background: var(--method-post); }
1648
- #sourcey .search-result-method.method-put { background: var(--method-put); }
1649
- #sourcey .search-result-method.method-delete { background: var(--method-delete); }
1650
- #sourcey .search-result-method.method-patch { background: var(--method-patch); }
1651
- #sourcey .search-result-method.method-tool { background: var(--method-tool); }
1652
- #sourcey .search-result-method.method-resource { background: var(--method-resource); }
1653
- #sourcey .search-result-method.method-prompt { background: var(--method-prompt); }
1874
+ #sourcey .search-result-method.method-get {
1875
+ background: var(--method-get);
1876
+ }
1877
+ #sourcey .search-result-method.method-post {
1878
+ background: var(--method-post);
1879
+ }
1880
+ #sourcey .search-result-method.method-put {
1881
+ background: var(--method-put);
1882
+ }
1883
+ #sourcey .search-result-method.method-delete {
1884
+ background: var(--method-delete);
1885
+ }
1886
+ #sourcey .search-result-method.method-patch {
1887
+ background: var(--method-patch);
1888
+ }
1889
+ #sourcey .search-result-method.method-tool {
1890
+ background: var(--method-tool);
1891
+ }
1892
+ #sourcey .search-result-method.method-resource {
1893
+ background: var(--method-resource);
1894
+ }
1895
+ #sourcey .search-result-method.method-prompt {
1896
+ background: var(--method-prompt);
1897
+ }
1654
1898
 
1655
1899
  #sourcey .search-result-path {
1656
1900
  font-family: var(--font-mono);
@@ -1942,7 +2186,8 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
1942
2186
 
1943
2187
  #sourcey .code-header,
1944
2188
  #sourcey .rust-signature {
1945
- font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
2189
+ font-family:
2190
+ ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
1946
2191
  font-size: 0.9375rem;
1947
2192
  color: rgb(var(--color-gray-900));
1948
2193
  white-space: pre-wrap;
@@ -0,0 +1,4 @@
1
+ import type { NormalizedSpec } from "../core/types.js";
2
+ export declare function findPlaceholderServerUrls(spec: Pick<NormalizedSpec, "servers">): string[];
3
+ export declare function isPlaceholderServerUrl(serverUrl: string): boolean;
4
+ //# sourceMappingURL=server-warnings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-warnings.d.ts","sourceRoot":"","sources":["../../src/utils/server-warnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAWvD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,MAAM,EAAE,CAQzF;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAajE"}
@@ -0,0 +1,41 @@
1
+ const PLACEHOLDER_HOSTS = new Set([
2
+ "localhost",
3
+ "0.0.0.0",
4
+ "::1",
5
+ "example.com",
6
+ "example.org",
7
+ "example.net",
8
+ ]);
9
+ export function findPlaceholderServerUrls(spec) {
10
+ const urls = new Set();
11
+ for (const server of spec.servers) {
12
+ if (isPlaceholderServerUrl(server.url))
13
+ urls.add(server.url);
14
+ }
15
+ return [...urls];
16
+ }
17
+ export function isPlaceholderServerUrl(serverUrl) {
18
+ const hostname = extractHostname(serverUrl);
19
+ if (!hostname)
20
+ return false;
21
+ const normalized = hostname.toLowerCase().replace(/^\[|\]$/g, "");
22
+ if (PLACEHOLDER_HOSTS.has(normalized))
23
+ return true;
24
+ if (/^127(?:\.\d{1,3}){3}$/.test(normalized))
25
+ return true;
26
+ return (normalized.endsWith(".example.com") ||
27
+ normalized.endsWith(".example.org") ||
28
+ normalized.endsWith(".example.net"));
29
+ }
30
+ function extractHostname(serverUrl) {
31
+ const trimmed = serverUrl.trim();
32
+ if (!trimmed || trimmed.startsWith("/") || trimmed.startsWith("{"))
33
+ return null;
34
+ const candidate = /^[a-z][a-z\d+.-]*:\/\//i.test(trimmed) ? trimmed : `http://${trimmed}`;
35
+ try {
36
+ return new URL(candidate).hostname || null;
37
+ }
38
+ catch {
39
+ return null;
40
+ }
41
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAKlD,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;IACvB,iEAAiE;IACjE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChD,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,2FAA2F;IAC3F,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CA6HnE"}
1
+ {"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAMlD,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;IACvB,iEAAiE;IACjE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChD,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,2FAA2F;IAC3F,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CA6HnE"}
@@ -1,5 +1,6 @@
1
1
  import { resolve, extname } from "node:path";
2
2
  import { normalizeBaseUrl } from "./site-url.js";
3
+ import { contentTypeForPath, outputPathFromRequestPath } from "./renderer/static-files.js";
3
4
  /**
4
5
  * Vite plugin for Sourcey.
5
6
  * - Injects SSR middleware that renders pages on the fly
@@ -116,56 +117,3 @@ export function sourceyPlugin(options) {
116
117
  },
117
118
  };
118
119
  }
119
- function outputPathFromRequestPath(pathname, baseUrl) {
120
- let path = pathname;
121
- if (baseUrl && path.startsWith(baseUrl)) {
122
- path = path.slice(baseUrl.length);
123
- }
124
- try {
125
- path = decodeURIComponent(path);
126
- }
127
- catch {
128
- // Keep the raw path; a malformed escape cannot match generated output.
129
- }
130
- return path.replace(/^\/+/, "");
131
- }
132
- function contentTypeForPath(path) {
133
- switch (extname(path).toLowerCase()) {
134
- case ".css":
135
- return "text/css; charset=utf-8";
136
- case ".js":
137
- case ".mjs":
138
- return "text/javascript; charset=utf-8";
139
- case ".json":
140
- return "application/json; charset=utf-8";
141
- case ".svg":
142
- return "image/svg+xml";
143
- case ".png":
144
- return "image/png";
145
- case ".jpg":
146
- case ".jpeg":
147
- return "image/jpeg";
148
- case ".gif":
149
- return "image/gif";
150
- case ".webp":
151
- return "image/webp";
152
- case ".avif":
153
- return "image/avif";
154
- case ".ico":
155
- return "image/x-icon";
156
- case ".txt":
157
- return "text/plain; charset=utf-8";
158
- case ".pdf":
159
- return "application/pdf";
160
- case ".woff":
161
- return "font/woff";
162
- case ".woff2":
163
- return "font/woff2";
164
- case ".mp4":
165
- return "video/mp4";
166
- case ".webm":
167
- return "video/webm";
168
- default:
169
- return "application/octet-stream";
170
- }
171
- }