@inklu/docs 0.2.0 → 0.2.2
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/CHANGELOG.md +12 -0
- package/dist/index.js +31 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -43
- package/dist/index.mjs.map +1 -1
- package/dist/shiki.js +2 -2
- package/dist/shiki.js.map +1 -1
- package/dist/shiki.mjs +2 -2
- package/dist/shiki.mjs.map +1 -1
- package/dist/styles.css +113 -72
- package/package.json +2 -1
- package/src/components/content/code-block.tsx +6 -4
- package/src/components/layout/docs-layout.tsx +26 -39
- package/src/components/layout/site-header.tsx +1 -1
- package/src/components/layout/site-provider.tsx +2 -0
- package/src/components/shared/command-block.tsx +3 -3
- package/src/shiki.ts +2 -2
- package/src/styles.css +4 -4
- package/src/typeset.css +66 -37
package/dist/shiki.js
CHANGED
|
@@ -25,8 +25,8 @@ __export(shiki_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(shiki_exports);
|
|
26
26
|
var import_shiki = require("shiki");
|
|
27
27
|
async function highlightSnippets(snippets, options) {
|
|
28
|
-
const light = options?.lightTheme || "
|
|
29
|
-
const dark = options?.darkTheme || "
|
|
28
|
+
const light = options?.lightTheme || "vitesse-light";
|
|
29
|
+
const dark = options?.darkTheme || "vitesse-dark";
|
|
30
30
|
const entries = await Promise.all(
|
|
31
31
|
Object.entries(snippets).map(
|
|
32
32
|
async ([key, s]) => [
|
package/dist/shiki.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shiki.ts"],"sourcesContent":["import { codeToHtml } from \"shiki\";\n\nexport type SnippetInput = Record<string, { code: string; lang: string }>;\n\nexport async function highlightSnippets<T extends SnippetInput>(\n snippets: T,\n options?: { lightTheme?: string; darkTheme?: string },\n): Promise<Record<keyof T, string>> {\n const light = options?.lightTheme || \"
|
|
1
|
+
{"version":3,"sources":["../src/shiki.ts"],"sourcesContent":["import { codeToHtml } from \"shiki\";\n\nexport type SnippetInput = Record<string, { code: string; lang: string }>;\n\nexport async function highlightSnippets<T extends SnippetInput>(\n snippets: T,\n options?: { lightTheme?: string; darkTheme?: string },\n): Promise<Record<keyof T, string>> {\n const light = options?.lightTheme || \"vitesse-light\";\n const dark = options?.darkTheme || \"vitesse-dark\";\n\n const entries = await Promise.all(\n Object.entries(snippets).map(\n async ([key, s]) =>\n [\n key,\n await codeToHtml(s.code, {\n lang: s.lang,\n themes: { light, dark },\n }),\n ] as const,\n ),\n );\n return Object.fromEntries(entries) as Record<keyof T, string>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAI3B,eAAsB,kBACpB,UACA,SACkC;AAClC,QAAM,QAAQ,SAAS,cAAc;AACrC,QAAM,OAAO,SAAS,aAAa;AAEnC,QAAM,UAAU,MAAM,QAAQ;AAAA,IAC5B,OAAO,QAAQ,QAAQ,EAAE;AAAA,MACvB,OAAO,CAAC,KAAK,CAAC,MACZ;AAAA,QACE;AAAA,QACA,UAAM,yBAAW,EAAE,MAAM;AAAA,UACvB,MAAM,EAAE;AAAA,UACR,QAAQ,EAAE,OAAO,KAAK;AAAA,QACxB,CAAC;AAAA,MACH;AAAA,IACJ;AAAA,EACF;AACA,SAAO,OAAO,YAAY,OAAO;AACnC;","names":[]}
|
package/dist/shiki.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/shiki.ts
|
|
2
2
|
import { codeToHtml } from "shiki";
|
|
3
3
|
async function highlightSnippets(snippets, options) {
|
|
4
|
-
const light = options?.lightTheme || "
|
|
5
|
-
const dark = options?.darkTheme || "
|
|
4
|
+
const light = options?.lightTheme || "vitesse-light";
|
|
5
|
+
const dark = options?.darkTheme || "vitesse-dark";
|
|
6
6
|
const entries = await Promise.all(
|
|
7
7
|
Object.entries(snippets).map(
|
|
8
8
|
async ([key, s]) => [
|
package/dist/shiki.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shiki.ts"],"sourcesContent":["import { codeToHtml } from \"shiki\";\n\nexport type SnippetInput = Record<string, { code: string; lang: string }>;\n\nexport async function highlightSnippets<T extends SnippetInput>(\n snippets: T,\n options?: { lightTheme?: string; darkTheme?: string },\n): Promise<Record<keyof T, string>> {\n const light = options?.lightTheme || \"
|
|
1
|
+
{"version":3,"sources":["../src/shiki.ts"],"sourcesContent":["import { codeToHtml } from \"shiki\";\n\nexport type SnippetInput = Record<string, { code: string; lang: string }>;\n\nexport async function highlightSnippets<T extends SnippetInput>(\n snippets: T,\n options?: { lightTheme?: string; darkTheme?: string },\n): Promise<Record<keyof T, string>> {\n const light = options?.lightTheme || \"vitesse-light\";\n const dark = options?.darkTheme || \"vitesse-dark\";\n\n const entries = await Promise.all(\n Object.entries(snippets).map(\n async ([key, s]) =>\n [\n key,\n await codeToHtml(s.code, {\n lang: s.lang,\n themes: { light, dark },\n }),\n ] as const,\n ),\n );\n return Object.fromEntries(entries) as Record<keyof T, string>;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAI3B,eAAsB,kBACpB,UACA,SACkC;AAClC,QAAM,QAAQ,SAAS,cAAc;AACrC,QAAM,OAAO,SAAS,aAAa;AAEnC,QAAM,UAAU,MAAM,QAAQ;AAAA,IAC5B,OAAO,QAAQ,QAAQ,EAAE;AAAA,MACvB,OAAO,CAAC,KAAK,CAAC,MACZ;AAAA,QACE;AAAA,QACA,MAAM,WAAW,EAAE,MAAM;AAAA,UACvB,MAAM,EAAE;AAAA,UACR,QAAQ,EAAE,OAAO,KAAK;AAAA,QACxB,CAAC;AAAA,MACH;AAAA,IACJ;AAAA,EACF;AACA,SAAO,OAAO,YAAY,OAAO;AACnC;","names":[]}
|
package/dist/styles.css
CHANGED
|
@@ -340,9 +340,6 @@
|
|
|
340
340
|
.mb-8 {
|
|
341
341
|
margin-bottom: calc(var(--spacing) * 8);
|
|
342
342
|
}
|
|
343
|
-
.-ml-2 {
|
|
344
|
-
margin-left: calc(var(--spacing) * -2);
|
|
345
|
-
}
|
|
346
343
|
.ml-auto {
|
|
347
344
|
margin-left: auto;
|
|
348
345
|
}
|
|
@@ -584,17 +581,11 @@
|
|
|
584
581
|
margin-block-start: calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));
|
|
585
582
|
margin-block-end: calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)));
|
|
586
583
|
}
|
|
587
|
-
.gap-x-
|
|
588
|
-
column-gap: var(--spacing);
|
|
589
|
-
}
|
|
590
|
-
.gap-x-6 {
|
|
591
|
-
column-gap: calc(var(--spacing) * 6);
|
|
592
|
-
}
|
|
593
|
-
.gap-y-1 {
|
|
594
|
-
row-gap: var(--spacing);
|
|
584
|
+
.gap-x-4 {
|
|
585
|
+
column-gap: calc(var(--spacing) * 4);
|
|
595
586
|
}
|
|
596
|
-
.gap-y-
|
|
597
|
-
row-gap: calc(var(--spacing) *
|
|
587
|
+
.gap-y-1\.5 {
|
|
588
|
+
row-gap: calc(var(--spacing) * 1.5);
|
|
598
589
|
}
|
|
599
590
|
.self-start {
|
|
600
591
|
align-self: flex-start;
|
|
@@ -749,9 +740,6 @@
|
|
|
749
740
|
.px-4 {
|
|
750
741
|
padding-inline: calc(var(--spacing) * 4);
|
|
751
742
|
}
|
|
752
|
-
.px-5 {
|
|
753
|
-
padding-inline: calc(var(--spacing) * 5);
|
|
754
|
-
}
|
|
755
743
|
.px-6 {
|
|
756
744
|
padding-inline: calc(var(--spacing) * 6);
|
|
757
745
|
}
|
|
@@ -788,12 +776,15 @@
|
|
|
788
776
|
.py-3 {
|
|
789
777
|
padding-block: calc(var(--spacing) * 3);
|
|
790
778
|
}
|
|
791
|
-
.py-
|
|
792
|
-
padding-block: calc(var(--spacing) *
|
|
779
|
+
.py-3\.5 {
|
|
780
|
+
padding-block: calc(var(--spacing) * 3.5);
|
|
793
781
|
}
|
|
794
782
|
.py-12 {
|
|
795
783
|
padding-block: calc(var(--spacing) * 12);
|
|
796
784
|
}
|
|
785
|
+
.pt-2\.5 {
|
|
786
|
+
padding-top: calc(var(--spacing) * 2.5);
|
|
787
|
+
}
|
|
797
788
|
.pt-3 {
|
|
798
789
|
padding-top: calc(var(--spacing) * 3);
|
|
799
790
|
}
|
|
@@ -843,6 +834,9 @@
|
|
|
843
834
|
.text-\[10px\] {
|
|
844
835
|
font-size: 10px;
|
|
845
836
|
}
|
|
837
|
+
.text-\[13px\] {
|
|
838
|
+
font-size: 13px;
|
|
839
|
+
}
|
|
846
840
|
.text-\[16px\] {
|
|
847
841
|
font-size: 16px;
|
|
848
842
|
}
|
|
@@ -900,6 +894,24 @@
|
|
|
900
894
|
.text-foreground {
|
|
901
895
|
color: var(--foreground);
|
|
902
896
|
}
|
|
897
|
+
.text-foreground\/35 {
|
|
898
|
+
color: var(--foreground);
|
|
899
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
900
|
+
color: color-mix(in oklab, var(--foreground) 35%, transparent);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
.text-foreground\/45 {
|
|
904
|
+
color: var(--foreground);
|
|
905
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
906
|
+
color: color-mix(in oklab, var(--foreground) 45%, transparent);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
.text-foreground\/50 {
|
|
910
|
+
color: var(--foreground);
|
|
911
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
912
|
+
color: color-mix(in oklab, var(--foreground) 50%, transparent);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
903
915
|
.text-muted-foreground {
|
|
904
916
|
color: var(--muted-foreground);
|
|
905
917
|
}
|
|
@@ -934,12 +946,6 @@
|
|
|
934
946
|
.opacity-0 {
|
|
935
947
|
opacity: 0%;
|
|
936
948
|
}
|
|
937
|
-
.opacity-50 {
|
|
938
|
-
opacity: 50%;
|
|
939
|
-
}
|
|
940
|
-
.opacity-60 {
|
|
941
|
-
opacity: 60%;
|
|
942
|
-
}
|
|
943
949
|
.opacity-100 {
|
|
944
950
|
opacity: 100%;
|
|
945
951
|
}
|
|
@@ -1139,15 +1145,20 @@
|
|
|
1139
1145
|
.hover\:text-foreground:hover {
|
|
1140
1146
|
color: var(--foreground);
|
|
1141
1147
|
}
|
|
1148
|
+
.hover\:text-foreground\/75:hover {
|
|
1149
|
+
color: var(--foreground);
|
|
1150
|
+
}
|
|
1151
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1152
|
+
.hover\:text-foreground\/75:hover {
|
|
1153
|
+
color: color-mix(in oklab, var(--foreground) 75%, transparent);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1142
1156
|
.hover\:underline:hover {
|
|
1143
1157
|
text-decoration-line: underline;
|
|
1144
1158
|
}
|
|
1145
1159
|
.hover\:opacity-80:hover {
|
|
1146
1160
|
opacity: 80%;
|
|
1147
1161
|
}
|
|
1148
|
-
.hover\:opacity-100:hover {
|
|
1149
|
-
opacity: 100%;
|
|
1150
|
-
}
|
|
1151
1162
|
}
|
|
1152
1163
|
.focus-visible\:translate-y-0:focus-visible {
|
|
1153
1164
|
--tw-translate-y: 0px;
|
|
@@ -1527,9 +1538,6 @@
|
|
|
1527
1538
|
.md\:flex-row {
|
|
1528
1539
|
flex-direction: row;
|
|
1529
1540
|
}
|
|
1530
|
-
.md\:gap-2 {
|
|
1531
|
-
gap: calc(var(--spacing) * 2);
|
|
1532
|
-
}
|
|
1533
1541
|
.md\:gap-5 {
|
|
1534
1542
|
gap: calc(var(--spacing) * 5);
|
|
1535
1543
|
}
|
|
@@ -1539,11 +1547,8 @@
|
|
|
1539
1547
|
.md\:gap-16 {
|
|
1540
1548
|
gap: calc(var(--spacing) * 16);
|
|
1541
1549
|
}
|
|
1542
|
-
.md\:gap-y-
|
|
1543
|
-
row-gap: var(--spacing);
|
|
1544
|
-
}
|
|
1545
|
-
.md\:gap-y-4 {
|
|
1546
|
-
row-gap: calc(var(--spacing) * 4);
|
|
1550
|
+
.md\:gap-y-2 {
|
|
1551
|
+
row-gap: calc(var(--spacing) * 2);
|
|
1547
1552
|
}
|
|
1548
1553
|
.md\:self-start {
|
|
1549
1554
|
align-self: flex-start;
|
|
@@ -1558,8 +1563,8 @@
|
|
|
1558
1563
|
.dark\:text-white:is(.dark *) {
|
|
1559
1564
|
color: var(--color-white);
|
|
1560
1565
|
}
|
|
1561
|
-
.\[\&_\.line\]\:min-h-
|
|
1562
|
-
min-height: calc(var(--spacing) *
|
|
1566
|
+
.\[\&_\.line\]\:min-h-5 .line {
|
|
1567
|
+
min-height: calc(var(--spacing) * 5);
|
|
1563
1568
|
}
|
|
1564
1569
|
.\[\&_code\]\:bg-transparent\! code {
|
|
1565
1570
|
background-color: transparent !important;
|
|
@@ -1567,6 +1572,9 @@
|
|
|
1567
1572
|
.\[\&_code\]\:p-0 code {
|
|
1568
1573
|
padding: 0px;
|
|
1569
1574
|
}
|
|
1575
|
+
.\[\&_code\]\:text-\[13px\] code {
|
|
1576
|
+
font-size: 13px;
|
|
1577
|
+
}
|
|
1570
1578
|
.\[\&_img\]\:size-full img {
|
|
1571
1579
|
width: 100%;
|
|
1572
1580
|
height: 100%;
|
|
@@ -1583,18 +1591,21 @@
|
|
|
1583
1591
|
.\[\&_pre\]\:bg-transparent\! pre {
|
|
1584
1592
|
background-color: transparent !important;
|
|
1585
1593
|
}
|
|
1586
|
-
.\[\&_pre\]\:px-
|
|
1587
|
-
padding-inline: calc(var(--spacing) *
|
|
1594
|
+
.\[\&_pre\]\:px-4 pre {
|
|
1595
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
1588
1596
|
}
|
|
1589
|
-
.\[\&_pre\]\:py-
|
|
1590
|
-
padding-block: calc(var(--spacing) *
|
|
1597
|
+
.\[\&_pre\]\:py-3\.5 pre {
|
|
1598
|
+
padding-block: calc(var(--spacing) * 3.5);
|
|
1591
1599
|
}
|
|
1592
1600
|
.\[\&_pre\]\:font-mono pre {
|
|
1593
1601
|
font-family: var(--font-geist-mono);
|
|
1594
1602
|
}
|
|
1595
|
-
.\[\&_pre\]\:
|
|
1596
|
-
|
|
1597
|
-
|
|
1603
|
+
.\[\&_pre\]\:text-\[13px\] pre {
|
|
1604
|
+
font-size: 13px;
|
|
1605
|
+
}
|
|
1606
|
+
.\[\&_pre\]\:leading-5 pre {
|
|
1607
|
+
--tw-leading: calc(var(--spacing) * 5);
|
|
1608
|
+
line-height: calc(var(--spacing) * 5);
|
|
1598
1609
|
}
|
|
1599
1610
|
.\[\&_pre\:\:-webkit-scrollbar\]\:h-2 pre::-webkit-scrollbar {
|
|
1600
1611
|
height: calc(var(--spacing) * 2);
|
|
@@ -1722,7 +1733,21 @@
|
|
|
1722
1733
|
--typeset-flow: 1.5em;
|
|
1723
1734
|
--typeset-body: currentColor;
|
|
1724
1735
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1725
|
-
--typeset-body: color-mix(in oklab, currentColor
|
|
1736
|
+
--typeset-body: color-mix(in oklab, currentColor 78%, transparent);
|
|
1737
|
+
}
|
|
1738
|
+
--typeset-muted: var(
|
|
1739
|
+
--color-muted-foreground,
|
|
1740
|
+
currentColor
|
|
1741
|
+
);
|
|
1742
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1743
|
+
--typeset-muted: var(
|
|
1744
|
+
--color-muted-foreground,
|
|
1745
|
+
color-mix(in oklab, currentColor 58%, transparent)
|
|
1746
|
+
);
|
|
1747
|
+
}
|
|
1748
|
+
--typeset-faint: currentColor;
|
|
1749
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1750
|
+
--typeset-faint: color-mix(in oklab, currentColor 42%, transparent);
|
|
1726
1751
|
}
|
|
1727
1752
|
}
|
|
1728
1753
|
.typeset-docs {
|
|
@@ -1735,6 +1760,24 @@
|
|
|
1735
1760
|
}
|
|
1736
1761
|
.dark .typeset {
|
|
1737
1762
|
--typeset-leading: 1.85;
|
|
1763
|
+
--typeset-body: currentColor;
|
|
1764
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1765
|
+
--typeset-body: color-mix(in oklab, currentColor 80%, transparent);
|
|
1766
|
+
}
|
|
1767
|
+
--typeset-muted: var(
|
|
1768
|
+
--color-muted-foreground,
|
|
1769
|
+
currentColor
|
|
1770
|
+
);
|
|
1771
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1772
|
+
--typeset-muted: var(
|
|
1773
|
+
--color-muted-foreground,
|
|
1774
|
+
color-mix(in oklab, currentColor 55%, transparent)
|
|
1775
|
+
);
|
|
1776
|
+
}
|
|
1777
|
+
--typeset-faint: currentColor;
|
|
1778
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1779
|
+
--typeset-faint: color-mix(in oklab, currentColor 40%, transparent);
|
|
1780
|
+
}
|
|
1738
1781
|
}
|
|
1739
1782
|
.dark .typeset-docs {
|
|
1740
1783
|
--typeset-leading: 1.6;
|
|
@@ -1749,16 +1792,6 @@
|
|
|
1749
1792
|
@media (min-width: 48rem), print {
|
|
1750
1793
|
font-size: var(--typeset-size);
|
|
1751
1794
|
}
|
|
1752
|
-
--typeset-muted: var(
|
|
1753
|
-
--color-muted-foreground,
|
|
1754
|
-
currentColor
|
|
1755
|
-
);
|
|
1756
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1757
|
-
--typeset-muted: var(
|
|
1758
|
-
--color-muted-foreground,
|
|
1759
|
-
color-mix(in oklab, currentColor 60%, transparent)
|
|
1760
|
-
);
|
|
1761
|
-
}
|
|
1762
1795
|
--typeset-rule: var(
|
|
1763
1796
|
--color-border,
|
|
1764
1797
|
currentColor
|
|
@@ -1782,17 +1815,18 @@
|
|
|
1782
1815
|
margin-block-end: 0;
|
|
1783
1816
|
}
|
|
1784
1817
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(h1) {
|
|
1785
|
-
font-size: 1.
|
|
1786
|
-
line-height: 1.
|
|
1818
|
+
font-size: 1.25em;
|
|
1819
|
+
line-height: 1.35;
|
|
1820
|
+
letter-spacing: -0.01em;
|
|
1787
1821
|
margin-block-start: var(--typeset-flow);
|
|
1788
1822
|
}
|
|
1789
1823
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(h2) {
|
|
1790
|
-
font-size: 1.
|
|
1824
|
+
font-size: 1.125em;
|
|
1791
1825
|
line-height: 1.4;
|
|
1792
1826
|
margin-block-start: calc(var(--typeset-flow) * 1.4);
|
|
1793
1827
|
}
|
|
1794
1828
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(h3) {
|
|
1795
|
-
font-size: 1.
|
|
1829
|
+
font-size: 1.0625em;
|
|
1796
1830
|
line-height: 1.45;
|
|
1797
1831
|
margin-block-start: var(--typeset-flow);
|
|
1798
1832
|
}
|
|
@@ -1802,17 +1836,17 @@
|
|
|
1802
1836
|
margin-block-start: var(--typeset-flow);
|
|
1803
1837
|
}
|
|
1804
1838
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(h5) {
|
|
1805
|
-
font-size: 0.
|
|
1839
|
+
font-size: 0.9375em;
|
|
1806
1840
|
line-height: 1.5;
|
|
1807
1841
|
font-weight: 500;
|
|
1808
1842
|
color: var(--typeset-muted);
|
|
1809
|
-
margin-block-start: calc(var(--typeset-flow) / 0.
|
|
1843
|
+
margin-block-start: calc(var(--typeset-flow) / 0.9375);
|
|
1810
1844
|
}
|
|
1811
1845
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(h6) {
|
|
1812
1846
|
font-size: 0.8125em;
|
|
1813
1847
|
line-height: 1.5;
|
|
1814
1848
|
font-weight: 500;
|
|
1815
|
-
letter-spacing: 0.
|
|
1849
|
+
letter-spacing: 0.06em;
|
|
1816
1850
|
text-transform: uppercase;
|
|
1817
1851
|
color: var(--typeset-muted);
|
|
1818
1852
|
margin-block-start: calc(var(--typeset-flow) / 0.8125);
|
|
@@ -1848,6 +1882,7 @@
|
|
|
1848
1882
|
}
|
|
1849
1883
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(strong, b) {
|
|
1850
1884
|
font-weight: 600;
|
|
1885
|
+
color: var(--color-foreground, currentColor);
|
|
1851
1886
|
}
|
|
1852
1887
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(:is(h1, h2, h3, h4) :is(strong, b)) {
|
|
1853
1888
|
font-weight: 600;
|
|
@@ -1865,7 +1900,7 @@
|
|
|
1865
1900
|
cursor: help;
|
|
1866
1901
|
}
|
|
1867
1902
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(del, s) {
|
|
1868
|
-
color: var(--typeset-
|
|
1903
|
+
color: var(--typeset-faint);
|
|
1869
1904
|
text-decoration-line: line-through;
|
|
1870
1905
|
}
|
|
1871
1906
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(sup, sub) {
|
|
@@ -1922,10 +1957,10 @@
|
|
|
1922
1957
|
margin-block-start: 0.5em;
|
|
1923
1958
|
}
|
|
1924
1959
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(ul > li)::marker {
|
|
1925
|
-
color: var(--typeset-
|
|
1960
|
+
color: var(--typeset-faint);
|
|
1926
1961
|
}
|
|
1927
1962
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(ol > li)::marker {
|
|
1928
|
-
color: var(--typeset-
|
|
1963
|
+
color: var(--typeset-faint);
|
|
1929
1964
|
}
|
|
1930
1965
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(ul.contains-task-list) {
|
|
1931
1966
|
list-style-type: none;
|
|
@@ -1945,12 +1980,13 @@
|
|
|
1945
1980
|
font-weight: 500;
|
|
1946
1981
|
}
|
|
1947
1982
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(summary)::marker {
|
|
1948
|
-
color: var(--typeset-
|
|
1983
|
+
color: var(--typeset-faint);
|
|
1949
1984
|
}
|
|
1950
1985
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(kbd) {
|
|
1951
1986
|
font-family: inherit;
|
|
1952
1987
|
font-size: 0.85em;
|
|
1953
1988
|
font-weight: 500;
|
|
1989
|
+
color: var(--typeset-body);
|
|
1954
1990
|
border: 1px solid var(--typeset-rule);
|
|
1955
1991
|
border-block-end-width: 2px;
|
|
1956
1992
|
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
@@ -1978,6 +2014,7 @@
|
|
|
1978
2014
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1979
2015
|
background-color: var( --color-muted, color-mix(in oklab, currentColor 8%, transparent) );
|
|
1980
2016
|
}
|
|
2017
|
+
color: var(--typeset-body);
|
|
1981
2018
|
font-family: var(--typeset-font-mono);
|
|
1982
2019
|
font-size: 0.85em;
|
|
1983
2020
|
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
@@ -2001,12 +2038,14 @@
|
|
|
2001
2038
|
}
|
|
2002
2039
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(pre code) {
|
|
2003
2040
|
background-color: transparent;
|
|
2041
|
+
color: inherit;
|
|
2004
2042
|
font-family: inherit;
|
|
2005
2043
|
font-size: inherit;
|
|
2006
2044
|
padding: 0;
|
|
2007
2045
|
border-radius: 0;
|
|
2008
2046
|
}
|
|
2009
2047
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(blockquote) {
|
|
2048
|
+
color: var(--typeset-muted);
|
|
2010
2049
|
border-inline-start: 2px solid var(--typeset-rule);
|
|
2011
2050
|
padding-inline-start: 1em;
|
|
2012
2051
|
margin-block-start: var(--typeset-flow);
|
|
@@ -2027,7 +2066,7 @@
|
|
|
2027
2066
|
border-block-start: 1px solid var(--typeset-rule);
|
|
2028
2067
|
padding-block-start: var(--typeset-flow);
|
|
2029
2068
|
font-size: 0.875em;
|
|
2030
|
-
color: var(--typeset-
|
|
2069
|
+
color: var(--typeset-faint);
|
|
2031
2070
|
}
|
|
2032
2071
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(math[display="block"]) {
|
|
2033
2072
|
margin-block-start: var(--typeset-flow);
|
|
@@ -2052,7 +2091,7 @@
|
|
|
2052
2091
|
margin-inline: 0;
|
|
2053
2092
|
}
|
|
2054
2093
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(figcaption, caption) {
|
|
2055
|
-
color: var(--typeset-
|
|
2094
|
+
color: var(--typeset-faint);
|
|
2056
2095
|
font-size: 0.875em;
|
|
2057
2096
|
text-align: center;
|
|
2058
2097
|
margin-block-start: calc(0.75em / 0.875);
|
|
@@ -2084,6 +2123,7 @@
|
|
|
2084
2123
|
}
|
|
2085
2124
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(thead th) {
|
|
2086
2125
|
font-weight: 500;
|
|
2126
|
+
color: var(--typeset-muted);
|
|
2087
2127
|
text-align: start;
|
|
2088
2128
|
white-space: nowrap;
|
|
2089
2129
|
padding: 0.65em 1em;
|
|
@@ -2099,6 +2139,7 @@
|
|
|
2099
2139
|
}
|
|
2100
2140
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(tbody th, tfoot th) {
|
|
2101
2141
|
font-weight: 500;
|
|
2142
|
+
color: var(--color-foreground, currentColor);
|
|
2102
2143
|
}
|
|
2103
2144
|
.typeset *:not( :where( .not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] * ) ):where(th:first-child, td:first-child) {
|
|
2104
2145
|
padding-inline-start: 0;
|
|
@@ -2206,10 +2247,10 @@
|
|
|
2206
2247
|
color: var(--foreground);
|
|
2207
2248
|
}
|
|
2208
2249
|
.dark .shiki, .dark .shiki span {
|
|
2209
|
-
color: var(--shiki-dark);
|
|
2210
|
-
font-style: var(--shiki-dark-font-style);
|
|
2211
|
-
font-weight: var(--shiki-dark-font-weight);
|
|
2212
|
-
text-decoration: var(--shiki-dark-text-decoration);
|
|
2250
|
+
color: var(--shiki-dark) !important;
|
|
2251
|
+
font-style: var(--shiki-dark-font-style) !important;
|
|
2252
|
+
font-weight: var(--shiki-dark-font-weight) !important;
|
|
2253
|
+
text-decoration: var(--shiki-dark-text-decoration) !important;
|
|
2213
2254
|
}
|
|
2214
2255
|
}
|
|
2215
2256
|
@property --tw-translate-x {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inklu/docs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@base-ui/react": "^1.6.0",
|
|
26
26
|
"@lisse/react": "^0.5.2",
|
|
27
27
|
"@radix-ui/react-icons": "^1.3.2",
|
|
28
|
+
"@vercel/analytics": "^2.0.1",
|
|
28
29
|
"class-variance-authority": "^0.7.1",
|
|
29
30
|
"clsx": "^2.1.1",
|
|
30
31
|
"motion": "^12.42.2",
|
|
@@ -85,16 +85,18 @@ export function CodeBlock({ html, code, className }: CodeBlockProps) {
|
|
|
85
85
|
"[&_pre]:m-0",
|
|
86
86
|
"[&_pre]:overflow-x-auto",
|
|
87
87
|
"[&_pre]:bg-transparent!",
|
|
88
|
-
"[&_pre]:px-
|
|
89
|
-
"[&_pre]:py-
|
|
88
|
+
"[&_pre]:px-4",
|
|
89
|
+
"[&_pre]:py-3.5",
|
|
90
90
|
"[&_pre]:font-mono",
|
|
91
|
-
"[&_pre]:
|
|
91
|
+
"[&_pre]:text-[13px]",
|
|
92
|
+
"[&_pre]:leading-5",
|
|
92
93
|
|
|
93
94
|
"[&_code]:bg-transparent!",
|
|
94
95
|
"[&_code]:p-0",
|
|
95
96
|
"[&_code]:font-inherit",
|
|
97
|
+
"[&_code]:text-[13px]",
|
|
96
98
|
|
|
97
|
-
"[&_.line]:min-h-
|
|
99
|
+
"[&_.line]:min-h-5",
|
|
98
100
|
|
|
99
101
|
"[&_pre::-webkit-scrollbar]:h-2",
|
|
100
102
|
"[&_pre::-webkit-scrollbar-track]:bg-transparent",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { ArrowLeftIcon } from "@radix-ui/react-icons";
|
|
4
|
-
import {
|
|
4
|
+
import { useMotionValueEvent, useScroll } from "motion/react";
|
|
5
5
|
import Link from "next/link";
|
|
6
6
|
import { usePathname } from "next/navigation";
|
|
7
7
|
import * as React from "react";
|
|
@@ -121,52 +121,39 @@ export function DocsLayout({
|
|
|
121
121
|
<div className="flex items-center justify-between">
|
|
122
122
|
<Link
|
|
123
123
|
href={indexUrl}
|
|
124
|
-
className="text-sm text-
|
|
124
|
+
className="text-sm text-foreground/50 hover:text-foreground flex items-center gap-1.5 transition-colors duration-200 select-none"
|
|
125
125
|
>
|
|
126
126
|
<ArrowLeftIcon className="size-3.5" />
|
|
127
127
|
{indexLabel}
|
|
128
128
|
</Link>
|
|
129
129
|
|
|
130
|
-
<div className="text-xs font-mono text-
|
|
130
|
+
<div className="text-xs font-mono text-foreground/35 flex items-center gap-0.5 tabular-nums">
|
|
131
131
|
<SlidingNumber value={progress} />%
|
|
132
132
|
</div>
|
|
133
133
|
</div>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
duration: 0.3,
|
|
158
|
-
bounce: 0,
|
|
159
|
-
}}
|
|
160
|
-
/>
|
|
161
|
-
)}
|
|
162
|
-
<span className="relative z-10">{link.title}</span>
|
|
163
|
-
</Link>
|
|
164
|
-
);
|
|
165
|
-
})}
|
|
166
|
-
</nav>
|
|
167
|
-
</div>
|
|
168
|
-
))}
|
|
169
|
-
</div>
|
|
134
|
+
|
|
135
|
+
<nav className="flex flex-row flex-wrap gap-x-4 gap-y-1.5 md:flex-col md:gap-y-2">
|
|
136
|
+
{links
|
|
137
|
+
.flatMap((group) => group.items)
|
|
138
|
+
.map((link) => {
|
|
139
|
+
const active = isLinkActive(link.url, link.isAnchor);
|
|
140
|
+
return (
|
|
141
|
+
<Link
|
|
142
|
+
key={link.title}
|
|
143
|
+
href={link.url}
|
|
144
|
+
onClick={(e) => handleAnchorClick(e, link.url)}
|
|
145
|
+
aria-current={active ? "location" : undefined}
|
|
146
|
+
className={`text-sm transition-colors duration-200 ${
|
|
147
|
+
active
|
|
148
|
+
? "text-foreground font-medium"
|
|
149
|
+
: "text-foreground/45 hover:text-foreground/75"
|
|
150
|
+
}`}
|
|
151
|
+
>
|
|
152
|
+
{link.title}
|
|
153
|
+
</Link>
|
|
154
|
+
);
|
|
155
|
+
})}
|
|
156
|
+
</nav>
|
|
170
157
|
</aside>
|
|
171
158
|
|
|
172
159
|
{/* Main Content */}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { Analytics } from "@vercel/analytics/react";
|
|
3
4
|
import type * as React from "react";
|
|
4
5
|
import { DirectionProvider } from "../ui/direction";
|
|
5
6
|
import { AnchoredToastProvider, ToastProvider } from "../ui/toast";
|
|
@@ -18,6 +19,7 @@ export function SiteProvider({ children }: { children: React.ReactNode }) {
|
|
|
18
19
|
<AnchoredToastProvider>{children}</AnchoredToastProvider>
|
|
19
20
|
</ToastProvider>
|
|
20
21
|
</DirectionProvider>
|
|
22
|
+
<Analytics />
|
|
21
23
|
</ThemeProvider>
|
|
22
24
|
);
|
|
23
25
|
}
|
|
@@ -123,7 +123,7 @@ export function CommandBlock({
|
|
|
123
123
|
return (
|
|
124
124
|
<div className="not-typeset mt-6 rounded-2xl border-0 bg-code overflow-hidden">
|
|
125
125
|
{items.length > 1 && (
|
|
126
|
-
<div className="flex items-center gap-0.5 px-3 pb-1.5 pt-
|
|
126
|
+
<div className="flex items-center gap-0.5 px-3 pb-1.5 pt-2.5 justify-between">
|
|
127
127
|
<div className="flex items-center gap-0.5 ">
|
|
128
128
|
{items.map((it, i) => {
|
|
129
129
|
const isActive = i === active;
|
|
@@ -133,7 +133,7 @@ export function CommandBlock({
|
|
|
133
133
|
type="button"
|
|
134
134
|
onClick={() => setActive(i)}
|
|
135
135
|
className={cn(
|
|
136
|
-
"relative cursor-pointer rounded-md px-1.5 py-0.5 font-mono outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",
|
|
136
|
+
"relative cursor-pointer rounded-md px-1.5 py-0.5 font-mono text-xs outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",
|
|
137
137
|
isActive
|
|
138
138
|
? "text-foreground"
|
|
139
139
|
: "text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
@@ -168,7 +168,7 @@ export function CommandBlock({
|
|
|
168
168
|
|
|
169
169
|
<div className="flex items-center">
|
|
170
170
|
<div className="flex-1 overflow-x-auto">
|
|
171
|
-
<pre className="flex items-center overflow-x-auto px-
|
|
171
|
+
<pre className="flex items-center overflow-x-auto px-4 py-3.5 font-mono text-[13px] leading-5 text-foreground">
|
|
172
172
|
<code>
|
|
173
173
|
<TextMorph>{cur.command}</TextMorph>
|
|
174
174
|
</code>
|
package/src/shiki.ts
CHANGED
|
@@ -6,8 +6,8 @@ export async function highlightSnippets<T extends SnippetInput>(
|
|
|
6
6
|
snippets: T,
|
|
7
7
|
options?: { lightTheme?: string; darkTheme?: string },
|
|
8
8
|
): Promise<Record<keyof T, string>> {
|
|
9
|
-
const light = options?.lightTheme || "
|
|
10
|
-
const dark = options?.darkTheme || "
|
|
9
|
+
const light = options?.lightTheme || "vitesse-light";
|
|
10
|
+
const dark = options?.darkTheme || "vitesse-dark";
|
|
11
11
|
|
|
12
12
|
const entries = await Promise.all(
|
|
13
13
|
Object.entries(snippets).map(
|
package/src/styles.css
CHANGED
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
/* Shiki dual-theme support need !important to overwrite conficts */
|
|
105
105
|
.dark .shiki,
|
|
106
106
|
.dark .shiki span {
|
|
107
|
-
color: var(--shiki-dark);
|
|
108
|
-
font-style: var(--shiki-dark-font-style);
|
|
109
|
-
font-weight: var(--shiki-dark-font-weight);
|
|
110
|
-
text-decoration: var(--shiki-dark-text-decoration);
|
|
107
|
+
color: var(--shiki-dark) !important;
|
|
108
|
+
font-style: var(--shiki-dark-font-style) !important;
|
|
109
|
+
font-weight: var(--shiki-dark-font-weight) !important;
|
|
110
|
+
text-decoration: var(--shiki-dark-text-decoration) !important;
|
|
111
111
|
}
|
|
112
112
|
}
|