radiant-docs 0.1.57 → 0.1.59
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/package.json +1 -1
- package/template/package-lock.json +99 -9
- package/template/package.json +11 -2
- package/template/src/components/Header.astro +3 -3
- package/template/src/components/MdxPage.astro +3 -1
- package/template/src/components/OpenApiPage.astro +6 -2
- package/template/src/components/Sidebar.astro +1 -1
- package/template/src/components/chat/AssistantEmbedPanel.tsx +1 -1
- package/template/src/components/chat/AssistantEmbedPanelPage.astro +15 -2
- package/template/src/components/endpoint/PlaygroundButton.astro +1 -1
- package/template/src/components/endpoint/PlaygroundForm.astro +1 -1
- package/template/src/components/endpoint/ResponseFields.astro +3 -3
- package/template/src/components/ui/Field.astro +4 -4
- package/template/src/components/user/Callout.astro +2 -2
- package/template/src/components/user/Card.astro +2 -2
- package/template/src/components/user/Image.astro +17 -2
- package/template/src/components/user/Step.astro +3 -1
- package/template/src/layouts/Layout.astro +15 -34
- package/template/src/lib/font-css.ts +376 -0
- package/template/src/pages/-/fonts/[...font].ts +50 -0
- package/template/src/pages/404.astro +2 -2
- package/template/src/styles/global.css +26 -4
- package/template/src/assets/fonts/geist-mono/cyrillic.woff2 +0 -0
- package/template/src/assets/fonts/geist-mono/latin-ext.woff2 +0 -0
- package/template/src/assets/fonts/geist-mono/latin.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/canadian-aboriginal.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/cherokee.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/latin-ext.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/latin.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/math.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/nushu.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/symbols.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/syriac.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/tifinagh.woff2 +0 -0
- package/template/src/assets/fonts/google-sans-flex/vietnamese.woff2 +0 -0
- package/template/src/styles/geist-mono.css +0 -33
- package/template/src/styles/google-sans-flex.css +0 -143
package/package.json
CHANGED
|
@@ -16,7 +16,16 @@
|
|
|
16
16
|
"@astrojs/preact": "^4.1.3",
|
|
17
17
|
"@astrojs/sitemap": "^3.7.2",
|
|
18
18
|
"@aws-sdk/client-s3": "^3.964.0",
|
|
19
|
-
"@fontsource/
|
|
19
|
+
"@fontsource-variable/geist": "^5.2.9",
|
|
20
|
+
"@fontsource-variable/geist-mono": "^5.2.8",
|
|
21
|
+
"@fontsource-variable/google-sans": "^5.2.1",
|
|
22
|
+
"@fontsource-variable/google-sans-code": "^5.2.4",
|
|
23
|
+
"@fontsource-variable/inter": "^5.2.8",
|
|
24
|
+
"@fontsource-variable/inter-tight": "^5.2.7",
|
|
25
|
+
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
|
26
|
+
"@fontsource-variable/public-sans": "^5.2.7",
|
|
27
|
+
"@fontsource-variable/source-sans-3": "^5.2.9",
|
|
28
|
+
"@fontsource-variable/source-serif-4": "^5.2.9",
|
|
20
29
|
"@iconify-json/fluent": "^1.2.47",
|
|
21
30
|
"@iconify-json/lucide": "^1.2.79",
|
|
22
31
|
"@iconify-json/simple-icons": "^1.2.69",
|
|
@@ -43,7 +52,7 @@
|
|
|
43
52
|
"preact": "^10.29.0",
|
|
44
53
|
"prism-themes": "^1.9.0",
|
|
45
54
|
"prismjs": "^1.30.0",
|
|
46
|
-
"radiant-docs-validator": "^0.1.
|
|
55
|
+
"radiant-docs-validator": "^0.1.19",
|
|
47
56
|
"rehype-autolink-headings": "^7.1.0",
|
|
48
57
|
"rehype-slug": "^6.0.0",
|
|
49
58
|
"remark-gfm": "^4.0.1",
|
|
@@ -1979,10 +1988,91 @@
|
|
|
1979
1988
|
"node": ">=18"
|
|
1980
1989
|
}
|
|
1981
1990
|
},
|
|
1982
|
-
"node_modules/@fontsource/
|
|
1983
|
-
"version": "5.2.
|
|
1984
|
-
"resolved": "https://registry.npmjs.org/@fontsource/
|
|
1985
|
-
"integrity": "sha512-
|
|
1991
|
+
"node_modules/@fontsource-variable/geist": {
|
|
1992
|
+
"version": "5.2.9",
|
|
1993
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/geist/-/geist-5.2.9.tgz",
|
|
1994
|
+
"integrity": "sha512-TP+QSBG3wxKGPE33CbMy/L0Nu3qvJ6Fy81Yc4LnQ95xH+i+cfEp8fyU8/kfV14YwszxIFPhnoMTbjL71waVpyQ==",
|
|
1995
|
+
"license": "OFL-1.1",
|
|
1996
|
+
"funding": {
|
|
1997
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
"node_modules/@fontsource-variable/geist-mono": {
|
|
2001
|
+
"version": "5.2.8",
|
|
2002
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/geist-mono/-/geist-mono-5.2.8.tgz",
|
|
2003
|
+
"integrity": "sha512-KI5bj+hkkRiHttYHmccotUZ80ZuZyai+RwI1d7UId0clkx/jXxlo8qYK8j54WzmpBjtMoEMPyllV7faDcj+6RA==",
|
|
2004
|
+
"license": "OFL-1.1",
|
|
2005
|
+
"funding": {
|
|
2006
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2007
|
+
}
|
|
2008
|
+
},
|
|
2009
|
+
"node_modules/@fontsource-variable/google-sans": {
|
|
2010
|
+
"version": "5.2.1",
|
|
2011
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/google-sans/-/google-sans-5.2.1.tgz",
|
|
2012
|
+
"integrity": "sha512-dMyMlJVRJgQvvYlJLcrg2oiVzlKAuIMrbDxIMchEiMBGmpOA6VnVblj3cPfJyA0/fNPQS6krZaiJyJjHJZmkzw==",
|
|
2013
|
+
"license": "OFL-1.1",
|
|
2014
|
+
"funding": {
|
|
2015
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
"node_modules/@fontsource-variable/google-sans-code": {
|
|
2019
|
+
"version": "5.2.4",
|
|
2020
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/google-sans-code/-/google-sans-code-5.2.4.tgz",
|
|
2021
|
+
"integrity": "sha512-70i7eS9B7VYT1sJcpU+bYnCrKwWOh8+RCTZNLgzE3crUaDwAqx0hRhd2Hr0ZyStJq88f+CF8/r+YUK0A3gMsPA==",
|
|
2022
|
+
"license": "OFL-1.1",
|
|
2023
|
+
"funding": {
|
|
2024
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2025
|
+
}
|
|
2026
|
+
},
|
|
2027
|
+
"node_modules/@fontsource-variable/inter": {
|
|
2028
|
+
"version": "5.2.8",
|
|
2029
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.2.8.tgz",
|
|
2030
|
+
"integrity": "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==",
|
|
2031
|
+
"license": "OFL-1.1",
|
|
2032
|
+
"funding": {
|
|
2033
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2034
|
+
}
|
|
2035
|
+
},
|
|
2036
|
+
"node_modules/@fontsource-variable/inter-tight": {
|
|
2037
|
+
"version": "5.2.7",
|
|
2038
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/inter-tight/-/inter-tight-5.2.7.tgz",
|
|
2039
|
+
"integrity": "sha512-uU0qW9vlzVQQv8GVrhn8SlNl2A44C0CE9IC6N9P0D9mwhmJcg8UF/fxvmdRayDPlMAnYqxlXtYENDIeZyVvxkg==",
|
|
2040
|
+
"license": "OFL-1.1",
|
|
2041
|
+
"funding": {
|
|
2042
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
"node_modules/@fontsource-variable/jetbrains-mono": {
|
|
2046
|
+
"version": "5.2.8",
|
|
2047
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/jetbrains-mono/-/jetbrains-mono-5.2.8.tgz",
|
|
2048
|
+
"integrity": "sha512-WBA9elru6Jdp5df2mES55wuOO0WIrn3kpXnI4+W2ek5u3ZgLS9XS4gmIlcQhiZOWEKl95meYdvK7xI+ETLCq/Q==",
|
|
2049
|
+
"license": "OFL-1.1",
|
|
2050
|
+
"funding": {
|
|
2051
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2052
|
+
}
|
|
2053
|
+
},
|
|
2054
|
+
"node_modules/@fontsource-variable/public-sans": {
|
|
2055
|
+
"version": "5.2.7",
|
|
2056
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/public-sans/-/public-sans-5.2.7.tgz",
|
|
2057
|
+
"integrity": "sha512-4mvade2J3slKkvwRkS+p8T3szet/0vhWoSnuUJTVU81Uo2pRpSZY/Y8bSLRqpSwzIPxjVmRJ53oq6JKP/l/PSg==",
|
|
2058
|
+
"license": "OFL-1.1",
|
|
2059
|
+
"funding": {
|
|
2060
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2061
|
+
}
|
|
2062
|
+
},
|
|
2063
|
+
"node_modules/@fontsource-variable/source-sans-3": {
|
|
2064
|
+
"version": "5.2.9",
|
|
2065
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/source-sans-3/-/source-sans-3-5.2.9.tgz",
|
|
2066
|
+
"integrity": "sha512-K9fkQbb0BNnRmmaU+Gpr6U4IaYKpNzA8t07J6aam2i+6v84RT72MVpar8OBr3yYAEznj4riKivPQ2nAF2fPKsw==",
|
|
2067
|
+
"license": "OFL-1.1",
|
|
2068
|
+
"funding": {
|
|
2069
|
+
"url": "https://github.com/sponsors/ayuhito"
|
|
2070
|
+
}
|
|
2071
|
+
},
|
|
2072
|
+
"node_modules/@fontsource-variable/source-serif-4": {
|
|
2073
|
+
"version": "5.2.9",
|
|
2074
|
+
"resolved": "https://registry.npmjs.org/@fontsource-variable/source-serif-4/-/source-serif-4-5.2.9.tgz",
|
|
2075
|
+
"integrity": "sha512-PPcxjLFk/fS0WHg79pDM2YNvz61kC+oYZ5cWZZyCS0DHpJncmuYOuiZAsvj4tDxlWPBEvxxcRLQQNmSaRbPkqw==",
|
|
1986
2076
|
"license": "OFL-1.1",
|
|
1987
2077
|
"funding": {
|
|
1988
2078
|
"url": "https://github.com/sponsors/ayuhito"
|
|
@@ -11633,9 +11723,9 @@
|
|
|
11633
11723
|
"license": "MIT"
|
|
11634
11724
|
},
|
|
11635
11725
|
"node_modules/radiant-docs-validator": {
|
|
11636
|
-
"version": "0.1.
|
|
11637
|
-
"resolved": "https://registry.npmjs.org/radiant-docs-validator/-/radiant-docs-validator-0.1.
|
|
11638
|
-
"integrity": "sha512-
|
|
11726
|
+
"version": "0.1.19",
|
|
11727
|
+
"resolved": "https://registry.npmjs.org/radiant-docs-validator/-/radiant-docs-validator-0.1.19.tgz",
|
|
11728
|
+
"integrity": "sha512-AWCm/LDmFhekwUcXcvGwUlbqdL2tcSQtHGDo0ZkGdGApQOhZ9/KDsr+0OXjZ2+HFDgQx/cd3FB/re78wE5DjYA==",
|
|
11639
11729
|
"license": "MIT",
|
|
11640
11730
|
"dependencies": {
|
|
11641
11731
|
"@iconify-json/fluent": "^1.2.47",
|
package/template/package.json
CHANGED
|
@@ -20,7 +20,16 @@
|
|
|
20
20
|
"@astrojs/preact": "^4.1.3",
|
|
21
21
|
"@astrojs/sitemap": "^3.7.2",
|
|
22
22
|
"@aws-sdk/client-s3": "^3.964.0",
|
|
23
|
-
"@fontsource/
|
|
23
|
+
"@fontsource-variable/geist": "^5.2.9",
|
|
24
|
+
"@fontsource-variable/geist-mono": "^5.2.8",
|
|
25
|
+
"@fontsource-variable/google-sans": "^5.2.1",
|
|
26
|
+
"@fontsource-variable/google-sans-code": "^5.2.4",
|
|
27
|
+
"@fontsource-variable/inter": "^5.2.8",
|
|
28
|
+
"@fontsource-variable/inter-tight": "^5.2.7",
|
|
29
|
+
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
|
30
|
+
"@fontsource-variable/public-sans": "^5.2.7",
|
|
31
|
+
"@fontsource-variable/source-sans-3": "^5.2.9",
|
|
32
|
+
"@fontsource-variable/source-serif-4": "^5.2.9",
|
|
24
33
|
"@iconify-json/fluent": "^1.2.47",
|
|
25
34
|
"@iconify-json/lucide": "^1.2.79",
|
|
26
35
|
"@iconify-json/simple-icons": "^1.2.69",
|
|
@@ -47,7 +56,7 @@
|
|
|
47
56
|
"preact": "^10.29.0",
|
|
48
57
|
"prism-themes": "^1.9.0",
|
|
49
58
|
"prismjs": "^1.30.0",
|
|
50
|
-
"radiant-docs-validator": "^0.1.
|
|
59
|
+
"radiant-docs-validator": "^0.1.19",
|
|
51
60
|
"rehype-autolink-headings": "^7.1.0",
|
|
52
61
|
"rehype-slug": "^6.0.0",
|
|
53
62
|
"remark-gfm": "^4.0.1",
|
|
@@ -176,7 +176,7 @@ const navbarPrimaryHref = config.navbar?.primary
|
|
|
176
176
|
<button
|
|
177
177
|
type="button"
|
|
178
178
|
aria-label="Open assistant"
|
|
179
|
-
class="assistant-header-trigger hidden md:inline-flex items-center gap-2 h-8 rounded-lg [corner-shape:superellipse(1.2)] px-3 text-[13px] font-
|
|
179
|
+
class="assistant-header-trigger hidden md:inline-flex items-center gap-2 h-8 rounded-lg [corner-shape:superellipse(1.2)] px-3 text-[13px] font-normal dark:font-medium transition-opacity duration-200 hover:opacity-95 cursor-pointer"
|
|
180
180
|
style={assistantHeaderButtonStyle}
|
|
181
181
|
onclick="window.__assistantToggleRequested = true; window.dispatchEvent(new CustomEvent('ask-ai:toggle'));"
|
|
182
182
|
>
|
|
@@ -208,7 +208,7 @@ const navbarPrimaryHref = config.navbar?.primary
|
|
|
208
208
|
{navbarLinks.map((l, i, a) => (
|
|
209
209
|
<a
|
|
210
210
|
class:list={[
|
|
211
|
-
"items-center gap-1 text-[13px] font-
|
|
211
|
+
"items-center gap-1 text-[13px] font-medium dark:font-normal text-neutral-600/85 hover:text-neutral-600 dark:text-neutral-200/90 dark:hover:text-neutral-200 duration-200 px-1.5 py-[5px] whitespace-nowrap",
|
|
212
212
|
showAssistantNavbarButton && a.length === 3 && i === 2
|
|
213
213
|
? "hidden 2xl:flex"
|
|
214
214
|
: "flex",
|
|
@@ -250,7 +250,7 @@ const navbarPrimaryHref = config.navbar?.primary
|
|
|
250
250
|
{config.navbar.primary && (
|
|
251
251
|
<a
|
|
252
252
|
class:list={[
|
|
253
|
-
"navbar-primary-trigger
|
|
253
|
+
"navbar-primary-trigger h-8 flex items-center gap-2 px-3 text-[13px] font-normal dark:font-medium rounded-lg [corner-shape:superellipse(1.2)] duration-200 transition-all whitespace-nowrap hover:opacity-95",
|
|
254
254
|
]}
|
|
255
255
|
style={navbarPrimaryButtonStyle}
|
|
256
256
|
href={navbarPrimaryHref}
|
|
@@ -68,7 +68,9 @@ const tocHeadings = headings.filter(
|
|
|
68
68
|
<div class="flex w-full min-w-0 justify-between gap-x-10">
|
|
69
69
|
<div class="mx-auto max-w-3xl w-full">
|
|
70
70
|
<header class="mb-6">
|
|
71
|
-
<h1 class="text-4xl font-semibold tracking-tight">
|
|
71
|
+
<h1 class="rd-document-heading text-4xl font-semibold tracking-tight">
|
|
72
|
+
{title}
|
|
73
|
+
</h1>
|
|
72
74
|
</header>
|
|
73
75
|
<article class="prose-rules">
|
|
74
76
|
<Content components={components} />
|
|
@@ -857,7 +857,9 @@ const formattedBodyDescription = bodyDescription
|
|
|
857
857
|
<Layout pageTitle={title}>
|
|
858
858
|
<article>
|
|
859
859
|
<header class="mb-6">
|
|
860
|
-
<h1 class="text-4xl font-semibold tracking-tight">
|
|
860
|
+
<h1 class="rd-document-heading text-4xl font-semibold tracking-tight">
|
|
861
|
+
{title}
|
|
862
|
+
</h1>
|
|
861
863
|
</header>
|
|
862
864
|
<div class="flex flex-row-reverse justify-between gap-6 w-full">
|
|
863
865
|
<aside class="flex-1 min-w-0 hidden xl:block">
|
|
@@ -955,7 +957,9 @@ const formattedBodyDescription = bodyDescription
|
|
|
955
957
|
|
|
956
958
|
return (
|
|
957
959
|
<section class="mt-10">
|
|
958
|
-
<h4 class="text-xl font-semibold">
|
|
960
|
+
<h4 class="rd-document-heading text-xl font-semibold">
|
|
961
|
+
{headers[key]}
|
|
962
|
+
</h4>
|
|
959
963
|
{key === "body" && formattedBodyDescription && (
|
|
960
964
|
<div
|
|
961
965
|
class="mt-2 prose-rules prose-sm! text-neutral-500 **:text-neutral-500 dark:text-neutral-400 dark:**:text-neutral-400"
|
|
@@ -24,7 +24,7 @@ const config: DocsConfig = await getConfig();
|
|
|
24
24
|
askAiEnabled ? "justify-start" : "justify-end",
|
|
25
25
|
]}
|
|
26
26
|
>
|
|
27
|
-
<span class="text-neutral-400 text-xs font-
|
|
27
|
+
<span class="text-neutral-400 text-xs font-normal">Theme</span>
|
|
28
28
|
<ThemeSwitcher />
|
|
29
29
|
</div>
|
|
30
30
|
</aside>
|
|
@@ -2054,7 +2054,7 @@ export default function AssistantEmbedPanel({
|
|
|
2054
2054
|
}
|
|
2055
2055
|
/>
|
|
2056
2056
|
<p
|
|
2057
|
-
className="assistant-empty-state-item mt-3 text-3xl font-
|
|
2057
|
+
className="assistant-empty-state-item mt-3 text-3xl font-medium leading-9 text-neutral-900 dark:text-neutral-50"
|
|
2058
2058
|
style={
|
|
2059
2059
|
{
|
|
2060
2060
|
"--assistant-empty-state-delay": "300ms",
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
import "../../styles/global.css";
|
|
3
|
-
import "../../styles/google-sans-flex.css";
|
|
4
|
-
import "../../styles/geist-mono.css";
|
|
5
3
|
import AssistantEmbedPanel from "./AssistantEmbedPanel";
|
|
6
4
|
import { getAssistantPanelRuntimeConfig } from "../../lib/assistant-panel-config";
|
|
5
|
+
import { getDocsFontCss, getDocsFontPreloads } from "../../lib/font-css";
|
|
7
6
|
import { getDocsThemeCss } from "../../lib/theme-css";
|
|
8
7
|
import { getConfig } from "../../lib/validation";
|
|
9
8
|
|
|
10
9
|
const config = await getConfig();
|
|
11
10
|
const themeCss = getDocsThemeCss(config.theme);
|
|
11
|
+
const fontCss = getDocsFontCss(config.theme);
|
|
12
|
+
const fontPreloads = getDocsFontPreloads(config.theme);
|
|
12
13
|
const assistantConfig = getAssistantPanelRuntimeConfig(config);
|
|
13
14
|
---
|
|
14
15
|
|
|
@@ -19,6 +20,18 @@ const assistantConfig = getAssistantPanelRuntimeConfig(config);
|
|
|
19
20
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
20
21
|
<meta name="robots" content="noindex" />
|
|
21
22
|
<style is:inline is:global set:html={themeCss}></style>
|
|
23
|
+
<style is:inline is:global set:html={fontCss}></style>
|
|
24
|
+
{
|
|
25
|
+
fontPreloads.map((font) => (
|
|
26
|
+
<link
|
|
27
|
+
rel="preload"
|
|
28
|
+
href={font.href}
|
|
29
|
+
as="font"
|
|
30
|
+
type={font.type}
|
|
31
|
+
crossorigin
|
|
32
|
+
/>
|
|
33
|
+
))
|
|
34
|
+
}
|
|
22
35
|
<script is:inline>
|
|
23
36
|
(() => {
|
|
24
37
|
const applyTheme = (theme) => {
|
|
@@ -38,7 +38,7 @@ import { Icon } from "astro-icon/components";
|
|
|
38
38
|
>
|
|
39
39
|
<button
|
|
40
40
|
x-on:click="open = true"
|
|
41
|
-
class="
|
|
41
|
+
class="flex h-8 items-center gap-2 rounded-lg [corner-shape:superellipse(1.2)] bg-linear-to-b from-neutral-900/85 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 px-3 text-[13px] font-normal text-white dark:font-medium dark:text-neutral-950 shadow-sm transition-all duration-200 whitespace-nowrap cursor-pointer"
|
|
42
42
|
>
|
|
43
43
|
<Icon class="-ml-px size-3.5" name="lucide:square-mouse-pointer" />
|
|
44
44
|
Try it
|
|
@@ -541,7 +541,7 @@ const sectionVariantFieldNames = Object.fromEntries(
|
|
|
541
541
|
<button
|
|
542
542
|
@click="sendRequest($event)"
|
|
543
543
|
:disabled="loading"
|
|
544
|
-
class="
|
|
544
|
+
class="relative flex h-8 items-center gap-2 rounded-lg [corner-shape:superellipse(1.2)] bg-linear-to-b from-neutral-900/85 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 px-3 text-[13px] font-normal text-white dark:font-medium dark:text-neutral-950 shadow-sm transition-all duration-200 whitespace-nowrap cursor-pointer disabled:opacity-70 disabled:cursor-not-allowed"
|
|
545
545
|
>
|
|
546
546
|
<span class="flex items-center gap-2">
|
|
547
547
|
<Icon
|
|
@@ -744,7 +744,7 @@ Object.entries(responses)
|
|
|
744
744
|
---
|
|
745
745
|
|
|
746
746
|
<div>
|
|
747
|
-
<h4 class="text-xl font-semibold mt-10">Responses</h4>
|
|
747
|
+
<h4 class="rd-document-heading text-xl font-semibold mt-10">Responses</h4>
|
|
748
748
|
{
|
|
749
749
|
responseFields.map((response) => (
|
|
750
750
|
<div class="mt-6">
|
|
@@ -756,9 +756,9 @@ Object.entries(responses)
|
|
|
756
756
|
getStatusCodeDotClass(response.statusCode),
|
|
757
757
|
]}
|
|
758
758
|
/>
|
|
759
|
-
<
|
|
759
|
+
<span class="text-lg font-medium leading-none">
|
|
760
760
|
{response.statusCode}
|
|
761
|
-
</
|
|
761
|
+
</span>
|
|
762
762
|
</div>
|
|
763
763
|
{response.description && (
|
|
764
764
|
<span class="mt-1 text-sm text-neutral-500 dark:text-neutral-400">
|
|
@@ -77,23 +77,23 @@ if (hasMinLength && hasMaxLength) {
|
|
|
77
77
|
|
|
78
78
|
<div class="space-y-3">
|
|
79
79
|
<div class="flex flex-wrap items-center gap-x-2 gap-y-px">
|
|
80
|
-
<
|
|
80
|
+
<span class="font-medium leading-4">
|
|
81
81
|
{name}
|
|
82
|
-
</
|
|
82
|
+
</span>
|
|
83
83
|
<code
|
|
84
84
|
class="text-[10px] font-medium text-neutral-500 border border-neutral-200/80 bg-neutral-50 px-1 rounded-sm dark:text-neutral-300 dark:border-neutral-700/70 dark:bg-neutral-900/70"
|
|
85
85
|
>{type}</code
|
|
86
86
|
>
|
|
87
87
|
{
|
|
88
88
|
required && (
|
|
89
|
-
<div class="text-red-700/70 bg-red-50 border border-red-700/10 rounded-full px-1.5 text-[10px] font-mono leading-none py-0.5 pb-0.5
|
|
89
|
+
<div class="text-red-700/70 bg-red-50 border border-red-700/10 rounded-full px-1.5 text-[10px] font-mono font-medium leading-none py-0.5 pb-0.5 h-fit dark:text-red-300 dark:bg-red-950/40 dark:border-red-900/40">
|
|
90
90
|
required
|
|
91
91
|
</div>
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
94
|
{
|
|
95
95
|
optional && (
|
|
96
|
-
<div class="text-blue-700/70 bg-blue-50 border border-blue-700/10 rounded-full px-1.5 font-mono text-[10px] leading-none py-0.5 pb-0.5
|
|
96
|
+
<div class="text-blue-700/70 bg-blue-50 border border-blue-700/10 rounded-full px-1.5 font-mono text-[10px] font-medium leading-none py-0.5 pb-0.5 h-fit dark:text-blue-300 dark:bg-blue-950/40 dark:border-blue-900/40">
|
|
97
97
|
optional
|
|
98
98
|
</div>
|
|
99
99
|
)
|
|
@@ -100,13 +100,13 @@ const hasTitle = typeof resolvedTitle === "string" && resolvedTitle.length > 0;
|
|
|
100
100
|
class="shrink-0 border border-white"
|
|
101
101
|
/>
|
|
102
102
|
) : null}
|
|
103
|
-
<
|
|
103
|
+
<div
|
|
104
104
|
class:list={[
|
|
105
105
|
"font-semibold text-sm text-neutral-900 dark:text-neutral-100",
|
|
106
106
|
]}
|
|
107
107
|
>
|
|
108
108
|
{resolvedTitle}
|
|
109
|
-
</
|
|
109
|
+
</div>
|
|
110
110
|
</div>
|
|
111
111
|
<div class="prose-rules prose-sm! max-w-none! *:max-w-none! text-neutral-700 dark:text-neutral-300">
|
|
112
112
|
<slot />
|
|
@@ -239,7 +239,7 @@ const CardGradient = hasCover
|
|
|
239
239
|
)
|
|
240
240
|
}
|
|
241
241
|
<div class="ml-1 self-center min-w-0 flex-1">
|
|
242
|
-
<
|
|
242
|
+
<div
|
|
243
243
|
class="not-prose m-0 flex min-w-0 items-center text-base font-semibold text-neutral-900 dark:text-neutral-100"
|
|
244
244
|
>
|
|
245
245
|
{
|
|
@@ -267,7 +267,7 @@ const CardGradient = hasCover
|
|
|
267
267
|
</>
|
|
268
268
|
)
|
|
269
269
|
}
|
|
270
|
-
</
|
|
270
|
+
</div>
|
|
271
271
|
{
|
|
272
272
|
descriptionHtml && (
|
|
273
273
|
<div
|
|
@@ -6,13 +6,22 @@ interface Props {
|
|
|
6
6
|
alt?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
width?: number | string;
|
|
9
|
+
align?: "left" | "center" | "right";
|
|
9
10
|
zoom?: boolean;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
const imageProps = Astro.props as Record<string, unknown>;
|
|
13
|
-
const {
|
|
14
|
+
const {
|
|
15
|
+
src,
|
|
16
|
+
alt,
|
|
17
|
+
title,
|
|
18
|
+
width,
|
|
19
|
+
align = "center",
|
|
20
|
+
zoom = true,
|
|
21
|
+
} = imageProps as Props;
|
|
14
22
|
const zoomEnabled = zoom !== false;
|
|
15
23
|
const rawWidth = width;
|
|
24
|
+
const imageAlign = align === "left" || align === "right" ? align : "center";
|
|
16
25
|
|
|
17
26
|
function normalizeImageSource(value: Props["src"]): {
|
|
18
27
|
light: string;
|
|
@@ -103,6 +112,12 @@ const hasCustomImageWidth = isConstrainedWidthValue(rawWidth);
|
|
|
103
112
|
const contentWidthStyle = hasCustomImageWidth
|
|
104
113
|
? `width: ${toCssWidthValue(rawWidth) ?? "auto"};`
|
|
105
114
|
: undefined;
|
|
115
|
+
const constrainedWidthAlignmentClass =
|
|
116
|
+
imageAlign === "left"
|
|
117
|
+
? "w-fit max-w-full ml-0 mr-auto"
|
|
118
|
+
: imageAlign === "right"
|
|
119
|
+
? "w-fit max-w-full ml-auto mr-0"
|
|
120
|
+
: "w-fit max-w-full mx-auto";
|
|
106
121
|
|
|
107
122
|
const slotCaptionHtml = Astro.slots.has("default")
|
|
108
123
|
? (await Astro.slots.render("default")).trim()
|
|
@@ -113,7 +128,7 @@ const hasCaption = slotCaptionHtml.length > 0;
|
|
|
113
128
|
<figure
|
|
114
129
|
class:list={[
|
|
115
130
|
"rd-prose-block p-1.5 pb-1 xs:pb-1.5 group border-[0.5px] border-neutral-900/8 dark:border-white/6 bg-(--rd-code-surface) rounded-2xl shadow-[0_.5px_1px_rgba(0,0,0,0.15),0_5px_12px_-8px_rgba(0,0,0,0.08)] dark:shadow-[0_-.5px_1px_rgba(255,255,255,0.15),0_5px_12px_-8px_rgba(0,0,0,0.2)]",
|
|
116
|
-
hasCustomImageWidth ?
|
|
131
|
+
hasCustomImageWidth ? constrainedWidthAlignmentClass : "w-full",
|
|
117
132
|
]}
|
|
118
133
|
x-data="{
|
|
119
134
|
open: false,
|
|
@@ -21,7 +21,9 @@ const { title } = Astro.props;
|
|
|
21
21
|
"step-number before:leading-none before:size-7 before:bg-neutral-900/6 dark:before:bg-neutral-50/6 before:rounded-full before:text-neutral-700 dark:before:text-neutral-100 before:flex before:items-center before:justify-center before:text-[13px] before:font-medium before:absolute before:left-0 before:top-0",
|
|
22
22
|
]}
|
|
23
23
|
>
|
|
24
|
-
<h3
|
|
24
|
+
<h3
|
|
25
|
+
class="rd-document-heading text-lg font-semibold text-neutral-900 dark:text-neutral-100"
|
|
26
|
+
>
|
|
25
27
|
{title}
|
|
26
28
|
</h3>
|
|
27
29
|
</div>
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
import "../styles/global.css";
|
|
3
|
-
import "../styles/google-sans-flex.css";
|
|
4
|
-
import "../styles/geist-mono.css";
|
|
5
|
-
import googleSansLatinWoff2 from "../assets/fonts/google-sans-flex/latin.woff2?url";
|
|
6
|
-
import googleSansLatinExtWoff2 from "../assets/fonts/google-sans-flex/latin-ext.woff2?url";
|
|
7
|
-
import geistMonoLatinWoff2 from "../assets/fonts/geist-mono/latin.woff2?url";
|
|
8
|
-
import geistMonoLatinExtWoff2 from "../assets/fonts/geist-mono/latin-ext.woff2?url";
|
|
9
3
|
import Sidebar from "../components/Sidebar.astro";
|
|
10
4
|
import { getConfig } from "../lib/validation";
|
|
11
5
|
import Header from "../components/Header.astro";
|
|
@@ -14,6 +8,7 @@ import AssistantDocsWidget from "../components/chat/AssistantDocsWidget.astro";
|
|
|
14
8
|
import { ClientRouter } from "astro:transitions";
|
|
15
9
|
import { prependBasePath, stripBasePath } from "../lib/base-path";
|
|
16
10
|
import { getFaviconConfig } from "../lib/favicon";
|
|
11
|
+
import { getDocsFontCss, getDocsFontPreloads } from "../lib/font-css";
|
|
17
12
|
import { resolveStaticAssetUrl } from "../lib/static-asset-url";
|
|
18
13
|
import { getDocsThemeCss } from "../lib/theme-css";
|
|
19
14
|
|
|
@@ -41,6 +36,8 @@ const { pageTitle, pageDescription } = Astro.props as Props;
|
|
|
41
36
|
const config = await getConfig();
|
|
42
37
|
const favicon = getFaviconConfig();
|
|
43
38
|
const neutralPaletteCss = getDocsThemeCss(config.theme);
|
|
39
|
+
const fontCss = getDocsFontCss(config.theme);
|
|
40
|
+
const fontPreloads = getDocsFontPreloads(config.theme);
|
|
44
41
|
const resolvedPageTitle = pageTitle?.trim();
|
|
45
42
|
const resolvedPageDescription =
|
|
46
43
|
typeof pageDescription === "string" && pageDescription.trim().length > 0
|
|
@@ -77,6 +74,7 @@ const askAiEnabled = isDev || orgTier >= 3;
|
|
|
77
74
|
<html lang="en">
|
|
78
75
|
<head>
|
|
79
76
|
<style is:inline is:global set:html={neutralPaletteCss}></style>
|
|
77
|
+
<style is:inline is:global set:html={fontCss}></style>
|
|
80
78
|
<ClientRouter />
|
|
81
79
|
<script is:inline>
|
|
82
80
|
const applyTheme = () => {
|
|
@@ -196,34 +194,17 @@ const askAiEnabled = isDev || orgTier >= 3;
|
|
|
196
194
|
}
|
|
197
195
|
})();
|
|
198
196
|
</script>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
type="font/woff2"
|
|
211
|
-
crossorigin
|
|
212
|
-
/>
|
|
213
|
-
<link
|
|
214
|
-
rel="preload"
|
|
215
|
-
href={geistMonoLatinWoff2}
|
|
216
|
-
as="font"
|
|
217
|
-
type="font/woff2"
|
|
218
|
-
crossorigin
|
|
219
|
-
/>
|
|
220
|
-
<link
|
|
221
|
-
rel="preload"
|
|
222
|
-
href={geistMonoLatinExtWoff2}
|
|
223
|
-
as="font"
|
|
224
|
-
type="font/woff2"
|
|
225
|
-
crossorigin
|
|
226
|
-
/>
|
|
197
|
+
{
|
|
198
|
+
fontPreloads.map((font) => (
|
|
199
|
+
<link
|
|
200
|
+
rel="preload"
|
|
201
|
+
href={font.href}
|
|
202
|
+
as="font"
|
|
203
|
+
type={font.type}
|
|
204
|
+
crossorigin
|
|
205
|
+
/>
|
|
206
|
+
))
|
|
207
|
+
}
|
|
227
208
|
<meta charset="UTF-8" />
|
|
228
209
|
<meta name="viewport" content="width=device-width" />
|
|
229
210
|
<link
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { resolveStaticAssetUrl } from "./static-asset-url";
|
|
6
|
+
import {
|
|
7
|
+
DEFAULT_CODE_FONT_PRESET,
|
|
8
|
+
DEFAULT_TEXT_FONT_PRESET,
|
|
9
|
+
FONT_PRESET_OPTIONS,
|
|
10
|
+
type DocsConfig,
|
|
11
|
+
type FontPresetOption,
|
|
12
|
+
} from "./validation";
|
|
13
|
+
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
|
|
16
|
+
const FONT_ROUTE_PREFIX = "/-/fonts";
|
|
17
|
+
const FONT_CONTENT_TYPE = "font/woff2";
|
|
18
|
+
const FONT_DISPLAY = "block";
|
|
19
|
+
|
|
20
|
+
type FontPresetId = FontPresetOption;
|
|
21
|
+
|
|
22
|
+
type FontSourceFile = {
|
|
23
|
+
fileName: string;
|
|
24
|
+
preload?: boolean;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type FontsourceConfig = {
|
|
28
|
+
packageName: string;
|
|
29
|
+
routeDir: string;
|
|
30
|
+
cssFiles: string[];
|
|
31
|
+
files: FontSourceFile[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type FontPreset = {
|
|
35
|
+
stack: string;
|
|
36
|
+
fontsource?: FontsourceConfig;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type FontPreload = {
|
|
40
|
+
href: string;
|
|
41
|
+
type: "font/woff2";
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type DocsFontFile = {
|
|
45
|
+
routePath: string;
|
|
46
|
+
sourcePath: string;
|
|
47
|
+
contentType: typeof FONT_CONTENT_TYPE;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const fontCssCache = new Map<FontPresetId, string>();
|
|
51
|
+
const fontRoutePathCache = new Map<string, string>();
|
|
52
|
+
|
|
53
|
+
const LATIN_UNICODE_FILES = ["latin-ext", "latin"] as const;
|
|
54
|
+
const FONT_STYLES = ["normal", "italic"] as const;
|
|
55
|
+
|
|
56
|
+
function getFontsourceFiles(fontId: string): FontSourceFile[] {
|
|
57
|
+
return FONT_STYLES.flatMap((style) =>
|
|
58
|
+
LATIN_UNICODE_FILES.map((subset) => ({
|
|
59
|
+
fileName: `${fontId}-${subset}-wght-${style}.woff2`,
|
|
60
|
+
preload: subset === "latin" && style === "normal",
|
|
61
|
+
})),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const FONT_PRESETS: Record<FontPresetId, FontPreset> = {
|
|
66
|
+
"google-sans": {
|
|
67
|
+
stack: '"Google Sans Variable", ui-sans-serif, system-ui, sans-serif',
|
|
68
|
+
fontsource: {
|
|
69
|
+
packageName: "@fontsource-variable/google-sans",
|
|
70
|
+
routeDir: "google-sans",
|
|
71
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
72
|
+
files: getFontsourceFiles("google-sans"),
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
inter: {
|
|
76
|
+
stack: '"Inter Variable", ui-sans-serif, system-ui, sans-serif',
|
|
77
|
+
fontsource: {
|
|
78
|
+
packageName: "@fontsource-variable/inter",
|
|
79
|
+
routeDir: "inter",
|
|
80
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
81
|
+
files: getFontsourceFiles("inter"),
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
"inter-tight": {
|
|
85
|
+
stack: '"Inter Tight Variable", ui-sans-serif, system-ui, sans-serif',
|
|
86
|
+
fontsource: {
|
|
87
|
+
packageName: "@fontsource-variable/inter-tight",
|
|
88
|
+
routeDir: "inter-tight",
|
|
89
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
90
|
+
files: getFontsourceFiles("inter-tight"),
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
geist: {
|
|
94
|
+
stack: '"Geist Variable", ui-sans-serif, system-ui, sans-serif',
|
|
95
|
+
fontsource: {
|
|
96
|
+
packageName: "@fontsource-variable/geist",
|
|
97
|
+
routeDir: "geist",
|
|
98
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
99
|
+
files: getFontsourceFiles("geist"),
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
"source-sans-3": {
|
|
103
|
+
stack: '"Source Sans 3 Variable", ui-sans-serif, system-ui, sans-serif',
|
|
104
|
+
fontsource: {
|
|
105
|
+
packageName: "@fontsource-variable/source-sans-3",
|
|
106
|
+
routeDir: "source-sans-3",
|
|
107
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
108
|
+
files: getFontsourceFiles("source-sans-3"),
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
"source-serif-4": {
|
|
112
|
+
stack:
|
|
113
|
+
'"Source Serif 4 Variable", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
|
|
114
|
+
fontsource: {
|
|
115
|
+
packageName: "@fontsource-variable/source-serif-4",
|
|
116
|
+
routeDir: "source-serif-4",
|
|
117
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
118
|
+
files: getFontsourceFiles("source-serif-4"),
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
"public-sans": {
|
|
122
|
+
stack: '"Public Sans Variable", ui-sans-serif, system-ui, sans-serif',
|
|
123
|
+
fontsource: {
|
|
124
|
+
packageName: "@fontsource-variable/public-sans",
|
|
125
|
+
routeDir: "public-sans",
|
|
126
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
127
|
+
files: getFontsourceFiles("public-sans"),
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
"geist-mono": {
|
|
131
|
+
stack:
|
|
132
|
+
'"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
133
|
+
fontsource: {
|
|
134
|
+
packageName: "@fontsource-variable/geist-mono",
|
|
135
|
+
routeDir: "geist-mono",
|
|
136
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
137
|
+
files: getFontsourceFiles("geist-mono"),
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
"jetbrains-mono": {
|
|
141
|
+
stack:
|
|
142
|
+
'"JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
143
|
+
fontsource: {
|
|
144
|
+
packageName: "@fontsource-variable/jetbrains-mono",
|
|
145
|
+
routeDir: "jetbrains-mono",
|
|
146
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
147
|
+
files: getFontsourceFiles("jetbrains-mono"),
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
"google-sans-code": {
|
|
151
|
+
stack:
|
|
152
|
+
'"Google Sans Code Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
153
|
+
fontsource: {
|
|
154
|
+
packageName: "@fontsource-variable/google-sans-code",
|
|
155
|
+
routeDir: "google-sans-code",
|
|
156
|
+
cssFiles: ["wght.css", "wght-italic.css"],
|
|
157
|
+
files: getFontsourceFiles("google-sans-code"),
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
"system-sans": {
|
|
161
|
+
stack: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
162
|
+
},
|
|
163
|
+
"system-serif": {
|
|
164
|
+
stack: 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
|
|
165
|
+
},
|
|
166
|
+
"system-mono": {
|
|
167
|
+
stack:
|
|
168
|
+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
type FontThemeConfig = {
|
|
173
|
+
text?: unknown;
|
|
174
|
+
heading?: unknown;
|
|
175
|
+
code?: unknown;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const FONT_PRESET_ID_SET = new Set<FontPresetId>(FONT_PRESET_OPTIONS);
|
|
179
|
+
|
|
180
|
+
function getConfiguredFonts(theme: DocsConfig["theme"]): FontThemeConfig {
|
|
181
|
+
return theme?.fonts ?? {};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function normalizeFontPresetId(value: unknown): FontPresetId | null {
|
|
185
|
+
if (typeof value !== "string") return null;
|
|
186
|
+
|
|
187
|
+
const normalized = value.trim().toLowerCase();
|
|
188
|
+
return FONT_PRESET_ID_SET.has(normalized as FontPresetId)
|
|
189
|
+
? (normalized as FontPresetId)
|
|
190
|
+
: null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function resolveFontPresetIds(theme: DocsConfig["theme"]): {
|
|
194
|
+
text: FontPresetId;
|
|
195
|
+
heading: FontPresetId;
|
|
196
|
+
code: FontPresetId;
|
|
197
|
+
} {
|
|
198
|
+
const fonts = getConfiguredFonts(theme);
|
|
199
|
+
const text = normalizeFontPresetId(fonts.text) ?? DEFAULT_TEXT_FONT_PRESET;
|
|
200
|
+
return {
|
|
201
|
+
text,
|
|
202
|
+
heading: normalizeFontPresetId(fonts.heading) ?? text,
|
|
203
|
+
code: normalizeFontPresetId(fonts.code) ?? DEFAULT_CODE_FONT_PRESET,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function getFontsourceCssPath(
|
|
208
|
+
fontsource: FontsourceConfig,
|
|
209
|
+
cssFile: string,
|
|
210
|
+
): string {
|
|
211
|
+
return require.resolve(`${fontsource.packageName}/${cssFile}`);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function getFontsourceFilePath(
|
|
215
|
+
fontsource: FontsourceConfig,
|
|
216
|
+
fileName: string,
|
|
217
|
+
): string {
|
|
218
|
+
return require.resolve(`${fontsource.packageName}/files/${fileName}`);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function getFontsourceCssUrlPattern(): RegExp {
|
|
222
|
+
return /url\((["']?)\.\/files\/([^"')]+)\1\)/g;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function getFontFaceBlockPattern(): RegExp {
|
|
226
|
+
return /(?:\/\*[\s\S]*?\*\/\s*)?@font-face\s*\{[\s\S]*?\}\s*/g;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function applyFontDisplay(block: string): string {
|
|
230
|
+
return block.replace(/font-display:\s*[^;]+;/, `font-display: ${FONT_DISPLAY};`);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function getFontRoutePath(
|
|
234
|
+
fontsource: FontsourceConfig,
|
|
235
|
+
fileName: string,
|
|
236
|
+
): string {
|
|
237
|
+
const cacheKey = `${fontsource.packageName}/${fileName}`;
|
|
238
|
+
const cachedRoutePath = fontRoutePathCache.get(cacheKey);
|
|
239
|
+
if (cachedRoutePath) return cachedRoutePath;
|
|
240
|
+
|
|
241
|
+
const sourcePath = getFontsourceFilePath(fontsource, fileName);
|
|
242
|
+
const hash = crypto
|
|
243
|
+
.createHash("sha256")
|
|
244
|
+
.update(fs.readFileSync(sourcePath))
|
|
245
|
+
.digest("hex")
|
|
246
|
+
.slice(0, 12);
|
|
247
|
+
const extension = path.extname(fileName);
|
|
248
|
+
const basename = path.basename(fileName, extension);
|
|
249
|
+
const routePath = `${fontsource.routeDir}/${basename}.${hash}${extension}`;
|
|
250
|
+
|
|
251
|
+
fontRoutePathCache.set(cacheKey, routePath);
|
|
252
|
+
return routePath;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function getFontPublicUrl(
|
|
256
|
+
fontsource: FontsourceConfig,
|
|
257
|
+
fileName: string,
|
|
258
|
+
): string {
|
|
259
|
+
return resolveStaticAssetUrl(
|
|
260
|
+
`${FONT_ROUTE_PREFIX}/${getFontRoutePath(fontsource, fileName)}`,
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function getFontsourceCss(presetId: FontPresetId): string {
|
|
265
|
+
const cachedCss = fontCssCache.get(presetId);
|
|
266
|
+
if (cachedCss !== undefined) return cachedCss;
|
|
267
|
+
|
|
268
|
+
const fontsource = FONT_PRESETS[presetId].fontsource;
|
|
269
|
+
if (!fontsource) return "";
|
|
270
|
+
|
|
271
|
+
const includedFiles = new Set(
|
|
272
|
+
fontsource.files.map((fontFile) => fontFile.fileName),
|
|
273
|
+
);
|
|
274
|
+
const matchedFiles = new Set<string>();
|
|
275
|
+
const resolvedCss = fontsource.cssFiles
|
|
276
|
+
.flatMap((cssFile) => {
|
|
277
|
+
const css = fs.readFileSync(getFontsourceCssPath(fontsource, cssFile), {
|
|
278
|
+
encoding: "utf8",
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
return Array.from(css.matchAll(getFontFaceBlockPattern()), ([block]) => {
|
|
282
|
+
const urlMatch = getFontsourceCssUrlPattern().exec(block);
|
|
283
|
+
const fileName = urlMatch?.[2];
|
|
284
|
+
if (!fileName || !includedFiles.has(fileName)) return "";
|
|
285
|
+
|
|
286
|
+
matchedFiles.add(fileName);
|
|
287
|
+
return applyFontDisplay(block).replace(
|
|
288
|
+
getFontsourceCssUrlPattern(),
|
|
289
|
+
(_match, _quote, matchedFileName) =>
|
|
290
|
+
`url("${getFontPublicUrl(fontsource, matchedFileName)}")`,
|
|
291
|
+
);
|
|
292
|
+
});
|
|
293
|
+
})
|
|
294
|
+
.filter(Boolean)
|
|
295
|
+
.join("\n");
|
|
296
|
+
|
|
297
|
+
const missingFiles = Array.from(includedFiles).filter(
|
|
298
|
+
(fileName) => !matchedFiles.has(fileName),
|
|
299
|
+
);
|
|
300
|
+
if (missingFiles.length > 0) {
|
|
301
|
+
throw new Error(
|
|
302
|
+
`Font preset "${presetId}" is missing @font-face blocks for: ${missingFiles.join(
|
|
303
|
+
", ",
|
|
304
|
+
)}.`,
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
fontCssCache.set(presetId, resolvedCss);
|
|
309
|
+
return resolvedCss;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function getSelectedFontPresetIds(theme: DocsConfig["theme"]): FontPresetId[] {
|
|
313
|
+
const fontPresetIds = resolveFontPresetIds(theme);
|
|
314
|
+
return [...new Set(Object.values(fontPresetIds))];
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export function getDocsFontCss(theme: DocsConfig["theme"]): string {
|
|
318
|
+
const fontPresetIds = resolveFontPresetIds(theme);
|
|
319
|
+
const fontFaceCss = getSelectedFontPresetIds(theme).map((presetId) =>
|
|
320
|
+
getFontsourceCss(presetId),
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
return [
|
|
324
|
+
...fontFaceCss.filter(Boolean),
|
|
325
|
+
":root {",
|
|
326
|
+
` --rd-font-text: ${FONT_PRESETS[fontPresetIds.text].stack};`,
|
|
327
|
+
` --rd-font-heading: ${FONT_PRESETS[fontPresetIds.heading].stack};`,
|
|
328
|
+
` --rd-font-code: ${FONT_PRESETS[fontPresetIds.code].stack};`,
|
|
329
|
+
"}",
|
|
330
|
+
].join("\n");
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export function getDocsFontPreloads(
|
|
334
|
+
theme: DocsConfig["theme"],
|
|
335
|
+
): FontPreload[] {
|
|
336
|
+
const preloadUrls = new Set<string>();
|
|
337
|
+
|
|
338
|
+
for (const presetId of getSelectedFontPresetIds(theme)) {
|
|
339
|
+
const fontsource = FONT_PRESETS[presetId].fontsource;
|
|
340
|
+
if (!fontsource) continue;
|
|
341
|
+
|
|
342
|
+
for (const fontFile of fontsource.files) {
|
|
343
|
+
if (!fontFile.preload) continue;
|
|
344
|
+
preloadUrls.add(getFontPublicUrl(fontsource, fontFile.fileName));
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return Array.from(preloadUrls, (href) => ({
|
|
349
|
+
href,
|
|
350
|
+
type: "font/woff2" as const,
|
|
351
|
+
}));
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export function getSelectedDocsFontFiles(
|
|
355
|
+
theme: DocsConfig["theme"],
|
|
356
|
+
): DocsFontFile[] {
|
|
357
|
+
const fontFiles = new Map<string, DocsFontFile>();
|
|
358
|
+
|
|
359
|
+
for (const presetId of getSelectedFontPresetIds(theme)) {
|
|
360
|
+
const fontsource = FONT_PRESETS[presetId].fontsource;
|
|
361
|
+
if (!fontsource) continue;
|
|
362
|
+
|
|
363
|
+
for (const fontFile of fontsource.files) {
|
|
364
|
+
const routePath = getFontRoutePath(fontsource, fontFile.fileName);
|
|
365
|
+
fontFiles.set(routePath, {
|
|
366
|
+
routePath,
|
|
367
|
+
sourcePath: getFontsourceFilePath(fontsource, fontFile.fileName),
|
|
368
|
+
contentType: FONT_CONTENT_TYPE,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return Array.from(fontFiles.values()).sort((a, b) =>
|
|
374
|
+
a.routePath.localeCompare(b.routePath),
|
|
375
|
+
);
|
|
376
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import type { APIRoute } from "astro";
|
|
3
|
+
import {
|
|
4
|
+
type DocsFontFile,
|
|
5
|
+
getSelectedDocsFontFiles,
|
|
6
|
+
} from "../../../lib/font-css";
|
|
7
|
+
import { getConfig } from "../../../lib/validation";
|
|
8
|
+
|
|
9
|
+
async function getSelectedFontFileMap(): Promise<Map<string, DocsFontFile>> {
|
|
10
|
+
const config = await getConfig();
|
|
11
|
+
return new Map(
|
|
12
|
+
getSelectedDocsFontFiles(config.theme).map((fontFile) => [
|
|
13
|
+
fontFile.routePath,
|
|
14
|
+
fontFile,
|
|
15
|
+
]),
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function getStaticPaths() {
|
|
20
|
+
const selectedFontFiles = await getSelectedFontFileMap();
|
|
21
|
+
|
|
22
|
+
return Array.from(selectedFontFiles.values(), (fontFile) => ({
|
|
23
|
+
params: {
|
|
24
|
+
font: fontFile.routePath,
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
fontFile,
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const GET: APIRoute = async ({ params, props }) => {
|
|
33
|
+
const selectedFontFiles = await getSelectedFontFileMap();
|
|
34
|
+
const fontFile =
|
|
35
|
+
(props.fontFile as DocsFontFile | undefined) ??
|
|
36
|
+
selectedFontFiles.get(params.font ?? "");
|
|
37
|
+
|
|
38
|
+
if (!fontFile || !selectedFontFiles.has(fontFile.routePath)) {
|
|
39
|
+
return new Response("Font not found.", { status: 404 });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const fontBytes = await fs.readFile(fontFile.sourcePath);
|
|
43
|
+
|
|
44
|
+
return new Response(fontBytes, {
|
|
45
|
+
headers: {
|
|
46
|
+
"Cache-Control": "public, max-age=31536000, immutable",
|
|
47
|
+
"Content-Type": fontFile.contentType,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
};
|
|
@@ -17,7 +17,7 @@ import Layout from "../layouts/Layout.astro";
|
|
|
17
17
|
404
|
|
18
18
|
</p>
|
|
19
19
|
<h1
|
|
20
|
-
class="text-3xl font-semibold tracking-tight text-neutral-900 dark:text-neutral-50"
|
|
20
|
+
class="rd-document-heading text-3xl font-semibold tracking-tight text-neutral-900 dark:text-neutral-50"
|
|
21
21
|
>
|
|
22
22
|
Page not found
|
|
23
23
|
</h1>
|
|
@@ -35,7 +35,7 @@ import Layout from "../layouts/Layout.astro";
|
|
|
35
35
|
</button>
|
|
36
36
|
<a
|
|
37
37
|
href={withBasePath("/")}
|
|
38
|
-
class="inline-flex items-center justify-center gap-2 rounded-lg [corner-shape:superellipse(1.2)] border border-border bg-linear-to-b from-neutral-900/85 to-neutral-900 px-4 py-2 text-sm font-
|
|
38
|
+
class="inline-flex items-center justify-center gap-2 rounded-lg [corner-shape:superellipse(1.2)] border border-border bg-linear-to-b from-neutral-900/85 to-neutral-900 px-4 py-2 text-sm font-normal text-white shadow-sm transition hover:opacity-95 dark:from-neutral-100 dark:to-neutral-200 dark:font-medium dark:text-neutral-950"
|
|
39
39
|
>
|
|
40
40
|
<Icon name="lucide:house" class="size-4" />
|
|
41
41
|
Take me home
|
|
@@ -23,10 +23,27 @@
|
|
|
23
23
|
--color-accent-foreground: var(--accent-foreground);
|
|
24
24
|
--color-destructive: var(--destructive);
|
|
25
25
|
|
|
26
|
-
--font-sans:
|
|
26
|
+
--font-sans: var(
|
|
27
|
+
--rd-font-text,
|
|
28
|
+
"Google Sans Variable",
|
|
29
|
+
ui-sans-serif,
|
|
30
|
+
system-ui,
|
|
31
|
+
sans-serif
|
|
32
|
+
);
|
|
33
|
+
--font-heading: var(--rd-font-heading, var(--font-sans));
|
|
27
34
|
--font-mono:
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
var(
|
|
36
|
+
--rd-font-code,
|
|
37
|
+
"Geist Mono Variable",
|
|
38
|
+
ui-monospace,
|
|
39
|
+
SFMono-Regular,
|
|
40
|
+
Menlo,
|
|
41
|
+
Monaco,
|
|
42
|
+
Consolas,
|
|
43
|
+
"Liberation Mono",
|
|
44
|
+
"Courier New",
|
|
45
|
+
monospace
|
|
46
|
+
);
|
|
30
47
|
|
|
31
48
|
--radius-sm: calc(var(--radius) - 4px);
|
|
32
49
|
--radius-md: calc(var(--radius) - 2px);
|
|
@@ -116,7 +133,7 @@
|
|
|
116
133
|
}
|
|
117
134
|
|
|
118
135
|
body {
|
|
119
|
-
@apply bg-background text-foreground;
|
|
136
|
+
@apply bg-background font-sans text-foreground;
|
|
120
137
|
}
|
|
121
138
|
}
|
|
122
139
|
|
|
@@ -169,6 +186,11 @@
|
|
|
169
186
|
--tw-prose-invert-td-borders: var(--color-neutral-700);
|
|
170
187
|
}
|
|
171
188
|
|
|
189
|
+
.rd-document-heading,
|
|
190
|
+
.prose-rules > :is(h1, h2, h3, h4, h5, h6) {
|
|
191
|
+
font-family: var(--font-heading);
|
|
192
|
+
}
|
|
193
|
+
|
|
172
194
|
.dark .prose-rules {
|
|
173
195
|
--tw-prose-body: var(--tw-prose-invert-body);
|
|
174
196
|
--tw-prose-headings: var(--tw-prose-invert-headings);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* geist-mono-cyrillic */
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: "Geist Mono";
|
|
4
|
-
font-style: normal;
|
|
5
|
-
font-weight: 100 900;
|
|
6
|
-
font-display: swap;
|
|
7
|
-
src: url("../assets/fonts/geist-mono/cyrillic.woff2") format("woff2");
|
|
8
|
-
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* geist-mono-latin-ext */
|
|
12
|
-
@font-face {
|
|
13
|
-
font-family: "Geist Mono";
|
|
14
|
-
font-style: normal;
|
|
15
|
-
font-weight: 100 900;
|
|
16
|
-
font-display: swap;
|
|
17
|
-
src: url("../assets/fonts/geist-mono/latin-ext.woff2") format("woff2");
|
|
18
|
-
unicode-range:
|
|
19
|
-
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
|
|
20
|
-
U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* geist-mono-latin */
|
|
24
|
-
@font-face {
|
|
25
|
-
font-family: "Geist Mono";
|
|
26
|
-
font-style: normal;
|
|
27
|
-
font-weight: 100 900;
|
|
28
|
-
font-display: swap;
|
|
29
|
-
src: url("../assets/fonts/geist-mono/latin.woff2") format("woff2");
|
|
30
|
-
unicode-range:
|
|
31
|
-
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
32
|
-
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
33
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/* google-sans-flex-canadian-aboriginal */
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: "Google Sans Flex";
|
|
4
|
-
font-style: normal;
|
|
5
|
-
font-weight: 1 1000;
|
|
6
|
-
font-stretch: 100%;
|
|
7
|
-
font-display: swap;
|
|
8
|
-
src: url("../assets/fonts/google-sans-flex/canadian-aboriginal.woff2") format("woff2");
|
|
9
|
-
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/* google-sans-flex-cherokee */
|
|
13
|
-
@font-face {
|
|
14
|
-
font-family: "Google Sans Flex";
|
|
15
|
-
font-style: normal;
|
|
16
|
-
font-weight: 1 1000;
|
|
17
|
-
font-stretch: 100%;
|
|
18
|
-
font-display: swap;
|
|
19
|
-
src: url("../assets/fonts/google-sans-flex/cherokee.woff2") format("woff2");
|
|
20
|
-
unicode-range: U+0300-0302, U+0304, U+030B-030C, U+0323-0324, U+0330-0331, U+13A0-13FF, U+AB70-ABBF;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* google-sans-flex-math */
|
|
24
|
-
@font-face {
|
|
25
|
-
font-family: "Google Sans Flex";
|
|
26
|
-
font-style: normal;
|
|
27
|
-
font-weight: 1 1000;
|
|
28
|
-
font-stretch: 100%;
|
|
29
|
-
font-display: swap;
|
|
30
|
-
src: url("../assets/fonts/google-sans-flex/math.woff2") format("woff2");
|
|
31
|
-
unicode-range:
|
|
32
|
-
U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330,
|
|
33
|
-
U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1,
|
|
34
|
-
U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047,
|
|
35
|
-
U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF,
|
|
36
|
-
U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5,
|
|
37
|
-
U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321,
|
|
38
|
-
U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7,
|
|
39
|
-
U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11,
|
|
40
|
-
U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* google-sans-flex-nushu */
|
|
44
|
-
@font-face {
|
|
45
|
-
font-family: "Google Sans Flex";
|
|
46
|
-
font-style: normal;
|
|
47
|
-
font-weight: 1 1000;
|
|
48
|
-
font-stretch: 100%;
|
|
49
|
-
font-display: swap;
|
|
50
|
-
src: url("../assets/fonts/google-sans-flex/nushu.woff2") format("woff2");
|
|
51
|
-
unicode-range: U+2003, U+3000, U+3002, U+4E00, U+FE12, U+16FE1, U+1B170-1B2FB;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* google-sans-flex-symbols */
|
|
55
|
-
@font-face {
|
|
56
|
-
font-family: "Google Sans Flex";
|
|
57
|
-
font-style: normal;
|
|
58
|
-
font-weight: 1 1000;
|
|
59
|
-
font-stretch: 100%;
|
|
60
|
-
font-display: swap;
|
|
61
|
-
src: url("../assets/fonts/google-sans-flex/symbols.woff2") format("woff2");
|
|
62
|
-
unicode-range:
|
|
63
|
-
U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192,
|
|
64
|
-
U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A,
|
|
65
|
-
U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF,
|
|
66
|
-
U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E,
|
|
67
|
-
U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315,
|
|
68
|
-
U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8,
|
|
69
|
-
U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3,
|
|
70
|
-
U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449,
|
|
71
|
-
U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF,
|
|
72
|
-
U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB,
|
|
73
|
-
U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610,
|
|
74
|
-
U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC,
|
|
75
|
-
U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF,
|
|
76
|
-
U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB,
|
|
77
|
-
U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F,
|
|
78
|
-
U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* google-sans-flex-syriac */
|
|
82
|
-
@font-face {
|
|
83
|
-
font-family: "Google Sans Flex";
|
|
84
|
-
font-style: normal;
|
|
85
|
-
font-weight: 1 1000;
|
|
86
|
-
font-stretch: 100%;
|
|
87
|
-
font-display: swap;
|
|
88
|
-
src: url("../assets/fonts/google-sans-flex/syriac.woff2") format("woff2");
|
|
89
|
-
unicode-range:
|
|
90
|
-
U+0303-0304, U+0307-0308, U+030A, U+0320, U+0323-0325, U+032D-032E, U+0330-0331, U+060C, U+061B-061C,
|
|
91
|
-
U+061F, U+0621, U+0640, U+064B-0655, U+0660-066C, U+0670, U+0700-074F, U+0860-086A, U+1DF8, U+1DFA,
|
|
92
|
-
U+200C-200F, U+25CC, U+2670-2671;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* google-sans-flex-tifinagh */
|
|
96
|
-
@font-face {
|
|
97
|
-
font-family: "Google Sans Flex";
|
|
98
|
-
font-style: normal;
|
|
99
|
-
font-weight: 1 1000;
|
|
100
|
-
font-stretch: 100%;
|
|
101
|
-
font-display: swap;
|
|
102
|
-
src: url("../assets/fonts/google-sans-flex/tifinagh.woff2") format("woff2");
|
|
103
|
-
unicode-range: U+02C7, U+0301-0302, U+0304, U+0306-0307, U+0309, U+0323, U+0331, U+200C-200D, U+202E, U+25CC, U+2D30-2D7F;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* google-sans-flex-vietnamese */
|
|
107
|
-
@font-face {
|
|
108
|
-
font-family: "Google Sans Flex";
|
|
109
|
-
font-style: normal;
|
|
110
|
-
font-weight: 1 1000;
|
|
111
|
-
font-stretch: 100%;
|
|
112
|
-
font-display: swap;
|
|
113
|
-
src: url("../assets/fonts/google-sans-flex/vietnamese.woff2") format("woff2");
|
|
114
|
-
unicode-range:
|
|
115
|
-
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304,
|
|
116
|
-
U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* google-sans-flex-latin-ext */
|
|
120
|
-
@font-face {
|
|
121
|
-
font-family: "Google Sans Flex";
|
|
122
|
-
font-style: normal;
|
|
123
|
-
font-weight: 1 1000;
|
|
124
|
-
font-stretch: 100%;
|
|
125
|
-
font-display: swap;
|
|
126
|
-
src: url("../assets/fonts/google-sans-flex/latin-ext.woff2") format("woff2");
|
|
127
|
-
unicode-range:
|
|
128
|
-
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
|
|
129
|
-
U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/* google-sans-flex-latin */
|
|
133
|
-
@font-face {
|
|
134
|
-
font-family: "Google Sans Flex";
|
|
135
|
-
font-style: normal;
|
|
136
|
-
font-weight: 1 1000;
|
|
137
|
-
font-stretch: 100%;
|
|
138
|
-
font-display: swap;
|
|
139
|
-
src: url("../assets/fonts/google-sans-flex/latin.woff2") format("woff2");
|
|
140
|
-
unicode-range:
|
|
141
|
-
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
142
|
-
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
143
|
-
}
|