boltdocs 2.6.1 → 2.7.0
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/bin/boltdocs.js +0 -1
- package/dist/cache-CQKlT4fI.mjs +6 -0
- package/dist/cache-DorPMFgW.cjs +6 -0
- package/dist/cards-BLoSiRuL.d.ts +30 -0
- package/dist/cards-CQn9mXZS.d.cts +30 -0
- package/dist/chunk-Ds5LZdWN.cjs +6 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +173 -1328
- package/dist/client/index.d.ts +172 -1327
- package/dist/client/index.js +1 -1
- package/dist/{package-c99Cs7mD.cjs → client/mdx.cjs} +1 -1
- package/dist/client/mdx.d.cts +128 -0
- package/dist/client/mdx.d.ts +129 -0
- package/dist/client/mdx.js +6 -0
- package/dist/client/primitives.cjs +6 -0
- package/dist/client/primitives.d.cts +818 -0
- package/dist/client/primitives.d.ts +818 -0
- package/dist/client/primitives.js +6 -0
- package/dist/client/theme/neutral.css +74 -361
- package/dist/client/theme/reset.css +189 -0
- package/dist/docs-layout-BlDhcQRv.cjs +6 -0
- package/dist/docs-layout-BvAOWEJw.js +6 -0
- package/dist/doctor-BQiQhCTl.cjs +6 -0
- package/dist/doctor-COpf35L2.cjs +20 -0
- package/dist/doctor-Dh1XP7Pz.mjs +20 -0
- package/dist/generator-DGW6pkCC.cjs +22 -0
- package/dist/generator-Dv3wEmhZ.mjs +22 -0
- package/dist/icons-dev-CrQLjoQp.js +6 -0
- package/dist/icons-dev-rzdz6Lf3.cjs +6 -0
- package/dist/image-BkIfa9oo.js +6 -0
- package/dist/image-DIGjCPe6.cjs +6 -0
- package/dist/mdx-K0WYBAJ3.js +7 -0
- package/dist/mdx-hpErbRUe.cjs +7 -0
- package/dist/meta-loader-0gJ4PtBC.cjs +6 -0
- package/dist/meta-loader-9IpAHWDS.mjs +6 -0
- package/dist/node/cli-entry.cjs +1 -2
- package/dist/node/cli-entry.mjs +1 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +66 -13
- package/dist/node/index.d.mts +66 -14
- package/dist/node/index.mjs +1 -1
- package/dist/node/routes/worker.cjs +6 -0
- package/dist/node/routes/worker.d.cts +2 -0
- package/dist/node/routes/worker.d.mts +2 -0
- package/dist/node/routes/worker.mjs +6 -0
- package/dist/node-C2nWXElP.mjs +112 -0
- package/dist/node-CinkUtxV.cjs +112 -0
- package/dist/package-BMYLDBBP.cjs +6 -0
- package/dist/{package-DukYeKmD.mjs → package-HegMOTL_.mjs} +1 -1
- package/dist/parser-Bh11BsdA.cjs +6 -0
- package/dist/parser-D8eQvE7N.mjs +6 -0
- package/dist/parser-DYRzXWmA.cjs +6 -0
- package/dist/routes-CHf76Ye4.cjs +6 -0
- package/dist/routes-CMUZGI6T.mjs +6 -0
- package/dist/routes-Co1mRM58.cjs +6 -0
- package/dist/search-dialog-BACuzoVX.cjs +6 -0
- package/dist/search-dialog-BKagVT17.js +6 -0
- package/dist/search-dialog-C8w12eUx.js +6 -0
- package/dist/search-dialog-CGyrozZE.cjs +6 -0
- package/dist/search-dialog-D26rUnJ_.cjs +6 -0
- package/dist/sidebar-DKvg6KOc.d.cts +491 -0
- package/dist/sidebar-Dr1TiRIy.d.ts +491 -0
- package/dist/utils-BxNAXhZZ.mjs +7 -0
- package/dist/utils-Clzu7jvb.cjs +7 -0
- package/dist/worker-pool-Bd8Y9KDv.mjs +6 -0
- package/dist/worker-pool-BwU8ckrg.cjs +6 -0
- package/package.json +27 -8
- package/src/client/app/doc-page.tsx +9 -5
- package/src/client/app/docs-layout.tsx +17 -3
- package/src/client/app/head.tsx +122 -0
- package/src/client/app/helmet-compat.tsx +36 -0
- package/src/client/app/mdx-component.tsx +5 -52
- package/src/client/app/mdx-components-context.tsx +32 -8
- package/src/client/app/routes-context.tsx +2 -2
- package/src/client/app/scroll-handler.tsx +1 -1
- package/src/client/app/theme-context.tsx +5 -5
- package/src/client/app/ui-context.tsx +42 -0
- package/src/client/components/docs-layout-default.tsx +85 -0
- package/src/client/components/icons-dev.tsx +38 -15
- package/src/client/components/mdx/callout.tsx +97 -0
- package/src/client/components/mdx/card.tsx +73 -98
- package/src/client/components/mdx/cards.tsx +27 -0
- package/src/client/components/mdx/code-block.tsx +37 -17
- package/src/client/components/mdx/field.tsx +24 -56
- package/src/client/components/mdx/image.tsx +36 -15
- package/src/client/components/mdx/index.ts +19 -53
- package/src/client/components/mdx/table.tsx +46 -148
- package/src/client/components/mdx/typographics.tsx +120 -0
- package/src/client/components/mdx/{hooks/use-code-block.ts → use-code-block.ts} +5 -7
- package/src/client/components/primitives/breadcrumbs.tsx +5 -24
- package/src/client/components/primitives/button.tsx +3 -142
- package/src/client/components/primitives/code-block.tsx +104 -97
- package/src/client/components/{docs-layout.tsx → primitives/docs-layout.tsx} +15 -24
- package/src/client/components/primitives/error-boundary.tsx +107 -0
- package/src/client/components/primitives/heading.tsx +128 -0
- package/src/client/components/primitives/helpers/observer.ts +62 -32
- package/src/client/components/primitives/image.tsx +26 -0
- package/src/client/components/primitives/link.tsx +50 -52
- package/src/client/components/primitives/menu.tsx +25 -49
- package/src/client/components/primitives/navbar.tsx +234 -59
- package/src/client/components/primitives/on-this-page.tsx +169 -40
- package/src/client/components/primitives/page-nav.tsx +11 -39
- package/src/client/components/primitives/popover.tsx +12 -30
- package/src/client/components/primitives/search-dialog.tsx +77 -71
- package/src/client/components/primitives/sidebar.tsx +312 -119
- package/src/client/components/primitives/skeleton.tsx +1 -1
- package/src/client/components/primitives/tabs.tsx +5 -16
- package/src/client/components/primitives/tooltip.tsx +1 -1
- package/src/client/components/ui-base/banner.tsx +66 -0
- package/src/client/components/ui-base/breadcrumbs.tsx +26 -20
- package/src/client/components/ui-base/copy-markdown.tsx +43 -35
- package/src/client/components/ui-base/error-boundary.tsx +9 -46
- package/src/client/components/ui-base/github-stars.tsx +5 -3
- package/src/client/components/ui-base/index.ts +3 -3
- package/src/client/components/ui-base/last-updated.tsx +27 -0
- package/src/client/components/ui-base/navbar.tsx +183 -89
- package/src/client/components/ui-base/not-found.tsx +11 -9
- package/src/client/components/ui-base/on-this-page.tsx +8 -104
- package/src/client/components/ui-base/page-nav.tsx +23 -9
- package/src/client/components/ui-base/search-dialog.tsx +111 -36
- package/src/client/components/ui-base/search-highlight.tsx +10 -0
- package/src/client/components/ui-base/sidebar.tsx +77 -154
- package/src/client/components/ui-base/tabs.tsx +20 -7
- package/src/client/components/ui-base/theme-toggle.tsx +88 -10
- package/src/client/components/ui-base/version-i18n.tsx +80 -0
- package/src/client/hooks/index.ts +2 -1
- package/src/client/hooks/use-analytics.ts +272 -0
- package/src/client/hooks/use-i18n.ts +120 -53
- package/src/client/hooks/use-localized-to.ts +70 -30
- package/src/client/hooks/use-navbar.ts +69 -39
- package/src/client/hooks/use-page-nav.ts +28 -25
- package/src/client/hooks/use-routes.ts +64 -81
- package/src/client/hooks/use-search-highlight.ts +185 -0
- package/src/client/hooks/use-search.ts +12 -3
- package/src/client/hooks/use-sidebar.ts +183 -77
- package/src/client/hooks/use-tabs.ts +3 -4
- package/src/client/hooks/use-version.ts +46 -18
- package/src/client/index.ts +13 -86
- package/src/client/mdx.ts +2 -0
- package/src/client/primitives.ts +19 -0
- package/src/client/ssg/boltdocs-shell.tsx +78 -57
- package/src/client/ssg/create-routes.tsx +290 -50
- package/src/client/ssg/mdx-page.tsx +2 -1
- package/src/client/store/boltdocs-context.tsx +83 -12
- package/src/client/theme/neutral.css +74 -361
- package/src/client/theme/reset.css +189 -0
- package/src/client/types.ts +10 -2
- package/src/client/utils/path.ts +9 -0
- package/src/client/utils/react-to-text.ts +24 -24
- package/src/client/virtual.d.ts +1 -1
- package/src/shared/types.ts +97 -21
- package/dist/node-CWN8U_p8.mjs +0 -88
- package/dist/node-D5iosYXv.cjs +0 -88
- package/dist/search-dialog-3lvKsbVG.js +0 -6
- package/dist/search-dialog-DMK5OpgH.cjs +0 -6
- package/dist/use-search-C9bxCqfF.js +0 -6
- package/dist/use-search-DcfZSunO.cjs +0 -6
- package/src/client/components/mdx/admonition.tsx +0 -91
- package/src/client/components/mdx/badge.tsx +0 -41
- package/src/client/components/mdx/button.tsx +0 -35
- package/src/client/components/mdx/component-preview.tsx +0 -37
- package/src/client/components/mdx/component-props.tsx +0 -83
- package/src/client/components/mdx/file-tree.tsx +0 -325
- package/src/client/components/mdx/hooks/use-component-preview.ts +0 -16
- package/src/client/components/mdx/hooks/useTable.ts +0 -74
- package/src/client/components/mdx/hooks/useTabs.ts +0 -68
- package/src/client/components/mdx/link.tsx +0 -38
- package/src/client/components/mdx/list.tsx +0 -192
- package/src/client/components/mdx/tabs.tsx +0 -135
- package/src/client/components/mdx/video.tsx +0 -68
- package/src/client/components/primitives/index.ts +0 -19
- package/src/client/components/primitives/navigation-menu.tsx +0 -114
- package/src/client/components/ui-base/head.tsx +0 -76
- package/src/client/components/ui-base/loading.tsx +0 -57
- package/src/client/components/ui-base/powered-by.tsx +0 -25
- package/src/client/hooks/use-onthispage.ts +0 -23
- package/src/client/utils/use-on-change.ts +0 -15
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import { createContext, use, useMemo, useState } from 'react'
|
|
1
|
+
import { createContext, use, useMemo, useState, useEffect } from 'react'
|
|
2
|
+
|
|
3
|
+
const PREFERENCES_KEY = 'boltdocs-user-preferences'
|
|
4
|
+
|
|
5
|
+
interface PersistedState {
|
|
6
|
+
locale?: string
|
|
7
|
+
version?: string
|
|
8
|
+
}
|
|
2
9
|
|
|
3
10
|
export interface BoltdocsState {
|
|
4
11
|
currentLocale: string
|
|
@@ -18,22 +25,86 @@ const BoltdocsContext =
|
|
|
18
25
|
BoltdocsState | undefined
|
|
19
26
|
>(undefined))
|
|
20
27
|
|
|
21
|
-
export function BoltdocsProvider({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
export function BoltdocsProvider({
|
|
29
|
+
children,
|
|
30
|
+
initialLocale = '',
|
|
31
|
+
initialVersion = '',
|
|
32
|
+
}: {
|
|
33
|
+
children: React.ReactNode
|
|
34
|
+
initialLocale?: string
|
|
35
|
+
initialVersion?: string
|
|
36
|
+
}) {
|
|
37
|
+
// Helper to read from storage safely
|
|
38
|
+
const getSavedPrefs = (): PersistedState => {
|
|
39
|
+
if (typeof window === 'undefined') return {}
|
|
40
|
+
try {
|
|
41
|
+
const raw = localStorage.getItem(PREFERENCES_KEY)
|
|
42
|
+
return raw ? JSON.parse(raw) : {}
|
|
43
|
+
} catch {
|
|
44
|
+
return {}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 1. Lazy state initializers prioritize passed URL state, falling back to LocalStorage preference immediately
|
|
49
|
+
const [locale, setLocaleState] = useState(() => {
|
|
50
|
+
if (initialLocale) return initialLocale
|
|
51
|
+
const prefs = getSavedPrefs()
|
|
52
|
+
return prefs.locale || ''
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const [version, setVersionState] = useState(() => {
|
|
56
|
+
if (initialVersion) return initialVersion
|
|
57
|
+
const prefs = getSavedPrefs()
|
|
58
|
+
return prefs.version || ''
|
|
59
|
+
})
|
|
25
60
|
|
|
26
|
-
const
|
|
27
|
-
|
|
61
|
+
const [hasHydrated, setHasHydrated] = useState(() => {
|
|
62
|
+
return typeof window !== 'undefined'
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
// Ensure the hydrator runs once client is definitely booted
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
setHasHydrated(true)
|
|
68
|
+
}, [])
|
|
69
|
+
|
|
70
|
+
const value = useMemo(() => {
|
|
71
|
+
const updateLocale = (l: string) => {
|
|
72
|
+
const newL = l || ''
|
|
73
|
+
setLocaleState(newL)
|
|
74
|
+
if (typeof window !== 'undefined') {
|
|
75
|
+
try {
|
|
76
|
+
const prefs = getSavedPrefs()
|
|
77
|
+
localStorage.setItem(
|
|
78
|
+
PREFERENCES_KEY,
|
|
79
|
+
JSON.stringify({ ...prefs, locale: newL }),
|
|
80
|
+
)
|
|
81
|
+
} catch (e) {}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const updateVersion = (v: string) => {
|
|
86
|
+
const newV = v || ''
|
|
87
|
+
setVersionState(newV)
|
|
88
|
+
if (typeof window !== 'undefined') {
|
|
89
|
+
try {
|
|
90
|
+
const prefs = getSavedPrefs()
|
|
91
|
+
localStorage.setItem(
|
|
92
|
+
PREFERENCES_KEY,
|
|
93
|
+
JSON.stringify({ ...prefs, version: newV }),
|
|
94
|
+
)
|
|
95
|
+
} catch (e) {}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
28
100
|
currentLocale: locale,
|
|
29
101
|
currentVersion: version,
|
|
30
|
-
setLocale,
|
|
31
|
-
setVersion,
|
|
102
|
+
setLocale: updateLocale,
|
|
103
|
+
setVersion: updateVersion,
|
|
32
104
|
hasHydrated,
|
|
33
105
|
setHasHydrated,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
)
|
|
106
|
+
}
|
|
107
|
+
}, [locale, version, hasHydrated])
|
|
37
108
|
|
|
38
109
|
// Sync with global registry for dual-package fallback
|
|
39
110
|
if (typeof globalThis !== 'undefined') {
|
|
@@ -7,29 +7,38 @@
|
|
|
7
7
|
|
|
8
8
|
--breakpoint-3xl: 120rem;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
--color-primary-
|
|
12
|
-
--color-primary-
|
|
13
|
-
--color-primary-
|
|
14
|
-
--color-primary-
|
|
15
|
-
--color-primary-
|
|
16
|
-
--color-primary-
|
|
17
|
-
|
|
18
|
-
--color-primary-
|
|
19
|
-
--color-primary-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
--color-neutral-
|
|
25
|
-
|
|
26
|
-
--color-neutral-
|
|
27
|
-
|
|
28
|
-
--color-neutral-
|
|
29
|
-
|
|
30
|
-
--color-neutral-
|
|
31
|
-
|
|
32
|
-
--color-neutral-
|
|
10
|
+
/* Premium Terracotta brand Palette (#eb5828) */
|
|
11
|
+
--color-primary-50: #fef4f0;
|
|
12
|
+
--color-primary-100: #fde4da;
|
|
13
|
+
--color-primary-200: #fbc8b6;
|
|
14
|
+
--color-primary-300: #faa184;
|
|
15
|
+
--color-primary-400: #f6724a;
|
|
16
|
+
--color-primary-500: #eb5828;
|
|
17
|
+
/* Core brand Terracotta Orange */
|
|
18
|
+
--color-primary-600: #d34013;
|
|
19
|
+
--color-primary-700: #ab300c;
|
|
20
|
+
--color-primary-800: #842308;
|
|
21
|
+
--color-primary-900: #5a1503;
|
|
22
|
+
|
|
23
|
+
/* Intellectual warm Neutral Palette (#faf9f5 / #141413) */
|
|
24
|
+
--color-neutral-50: #faf9f5;
|
|
25
|
+
/* Elegant Light Background */
|
|
26
|
+
--color-neutral-100: #f5f4ee;
|
|
27
|
+
/* Soft backgrounds and cards */
|
|
28
|
+
--color-neutral-200: #eae8de;
|
|
29
|
+
/* Subtle border */
|
|
30
|
+
--color-neutral-300: #d9d6c7;
|
|
31
|
+
/* Strong border */
|
|
32
|
+
--color-neutral-400: #b5b19c;
|
|
33
|
+
--color-neutral-500: #8a8670;
|
|
34
|
+
/* Muted warm gray text */
|
|
35
|
+
--color-neutral-600: #706c57;
|
|
36
|
+
--color-neutral-700: #4a483a;
|
|
37
|
+
/* Paragraph text */
|
|
38
|
+
--color-neutral-800: #25241d;
|
|
39
|
+
--color-neutral-900: #141413;
|
|
40
|
+
/* Elegant Soft Black text / Dark mode main background */
|
|
41
|
+
--color-neutral-950: #080807;
|
|
33
42
|
|
|
34
43
|
/* Semantic Status Colors */
|
|
35
44
|
--color-danger-500: oklch(0.63 0.24 27);
|
|
@@ -37,35 +46,40 @@
|
|
|
37
46
|
--color-warning-500: oklch(0.78 0.17 75);
|
|
38
47
|
--color-info-500: oklch(0.62 0.19 260);
|
|
39
48
|
|
|
40
|
-
/*
|
|
49
|
+
/* Modern Organic Rounded Radii (Warmer and More Rounded) */
|
|
41
50
|
--radius-sm: 0.375rem;
|
|
42
51
|
--radius-md: 0.5rem;
|
|
43
|
-
--radius-lg:
|
|
44
|
-
|
|
52
|
+
--radius-lg: 1rem;
|
|
53
|
+
/* 16px */
|
|
54
|
+
--radius-xl: 1.25rem;
|
|
55
|
+
/* 20px */
|
|
45
56
|
--radius-2xl: 1.5rem;
|
|
57
|
+
/* 24px */
|
|
46
58
|
--radius-full: 99999rem;
|
|
47
59
|
|
|
48
60
|
--ease-fluid: cubic-bezier(0.3, 0, 0, 1);
|
|
49
61
|
--ease-snappy: cubic-bezier(0.2, 0, 0, 1);
|
|
50
62
|
|
|
51
|
-
/* Semantic Colors - Default (Light) */
|
|
52
|
-
--color-
|
|
53
|
-
--color-
|
|
54
|
-
|
|
55
|
-
--color-
|
|
56
|
-
--color-
|
|
57
|
-
--color-
|
|
58
|
-
--color-
|
|
59
|
-
--color-
|
|
63
|
+
/* Semantic Colors - Default (Light Parchment) */
|
|
64
|
+
--color-main: var(--color-neutral-50);
|
|
65
|
+
--color-surface: #ffffff;
|
|
66
|
+
/* Pure soft white for cards */
|
|
67
|
+
--color-soft: var(--color-neutral-100);
|
|
68
|
+
--color-body: var(--color-neutral-900);
|
|
69
|
+
--color-paragraph: var(--color-neutral-700);
|
|
70
|
+
--color-muted: var(--color-neutral-500);
|
|
71
|
+
--color-dim: var(--color-neutral-400);
|
|
72
|
+
--color-subtle: var(--color-neutral-200);
|
|
73
|
+
--color-strong: var(--color-neutral-300);
|
|
60
74
|
--color-code-bg: var(--color-neutral-100);
|
|
61
|
-
--color-code-text:
|
|
75
|
+
--color-code-text: #eb5828;
|
|
62
76
|
|
|
63
77
|
/* Semantic Colors - Dark Override (handled via standard CSS overrides below the @theme block) */
|
|
64
78
|
|
|
65
79
|
/* Spacing and Dimensions */
|
|
66
80
|
--spacing-navbar: 3.5rem;
|
|
67
81
|
--spacing-sidebar: 16rem;
|
|
68
|
-
--spacing-toc:
|
|
82
|
+
--spacing-toc: 16rem;
|
|
69
83
|
--spacing-content-max: 54rem;
|
|
70
84
|
|
|
71
85
|
@keyframes pulse {
|
|
@@ -73,6 +87,7 @@
|
|
|
73
87
|
100% {
|
|
74
88
|
opacity: 1;
|
|
75
89
|
}
|
|
90
|
+
|
|
76
91
|
50% {
|
|
77
92
|
opacity: 0.5;
|
|
78
93
|
}
|
|
@@ -81,11 +96,10 @@
|
|
|
81
96
|
@keyframes fade-in {
|
|
82
97
|
from {
|
|
83
98
|
opacity: 0;
|
|
84
|
-
transform: translateY(10px);
|
|
85
99
|
}
|
|
100
|
+
|
|
86
101
|
to {
|
|
87
102
|
opacity: 1;
|
|
88
|
-
transform: translateY(0);
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
105
|
}
|
|
@@ -99,330 +113,29 @@
|
|
|
99
113
|
}
|
|
100
114
|
|
|
101
115
|
.animate-fade-in {
|
|
102
|
-
animation: fade-in 0.
|
|
116
|
+
animation: fade-in 0.1s ease-out forwards;
|
|
103
117
|
}
|
|
104
118
|
|
|
105
119
|
:root[data-theme="dark"],
|
|
106
120
|
:root.dark {
|
|
107
|
-
--color-
|
|
108
|
-
|
|
109
|
-
--color-
|
|
110
|
-
|
|
111
|
-
--color-
|
|
112
|
-
|
|
113
|
-
--color-
|
|
114
|
-
|
|
115
|
-
--color-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
html,
|
|
128
|
-
body {
|
|
129
|
-
margin: 0;
|
|
130
|
-
padding: 0;
|
|
131
|
-
min-height: 100%;
|
|
132
|
-
overflow-x: hidden;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
body {
|
|
136
|
-
@apply bg-bg-main text-text-main antialiased;
|
|
137
|
-
font-family: var(--font-sans);
|
|
138
|
-
line-height: 1.7;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
a {
|
|
142
|
-
text-decoration: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* Scroll-margin-top for anchor scrolling */
|
|
146
|
-
h1,
|
|
147
|
-
h2,
|
|
148
|
-
h3,
|
|
149
|
-
h4,
|
|
150
|
-
h5,
|
|
151
|
-
h6 {
|
|
152
|
-
scroll-margin-top: 6rem;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* Scrollbar */
|
|
156
|
-
::-webkit-scrollbar {
|
|
157
|
-
width: 6px;
|
|
158
|
-
height: 6px;
|
|
159
|
-
}
|
|
160
|
-
::-webkit-scrollbar-track {
|
|
161
|
-
background: transparent;
|
|
162
|
-
}
|
|
163
|
-
::-webkit-scrollbar-thumb {
|
|
164
|
-
@apply bg-neutral-300 dark:bg-neutral-700 rounded-full;
|
|
165
|
-
}
|
|
166
|
-
::-webkit-scrollbar-thumb:hover {
|
|
167
|
-
@apply bg-neutral-400 dark:bg-neutral-600;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* ═══ Content Area ═══ */
|
|
171
|
-
.boltdocs-content {
|
|
172
|
-
scrollbar-width: none;
|
|
173
|
-
scroll-behavior: smooth;
|
|
174
|
-
}
|
|
175
|
-
.boltdocs-content::-webkit-scrollbar {
|
|
176
|
-
display: none;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/* ═══ Markdown Typography ═══ */
|
|
180
|
-
.boltdocs-page {
|
|
181
|
-
position: relative;
|
|
182
|
-
padding-top: 1rem;
|
|
183
|
-
padding-bottom: 8rem;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.boltdocs-page h1 {
|
|
187
|
-
font-size: 2.5rem;
|
|
188
|
-
margin: 0 0 1rem;
|
|
189
|
-
font-weight: 800;
|
|
190
|
-
letter-spacing: -0.04em;
|
|
191
|
-
color: var(--color-text-main);
|
|
192
|
-
line-height: 1.2;
|
|
193
|
-
}
|
|
194
|
-
.boltdocs-page h1 + p {
|
|
195
|
-
color: var(--color-text-muted);
|
|
196
|
-
font-size: 1.125rem;
|
|
197
|
-
margin-bottom: 2.5rem;
|
|
198
|
-
line-height: 1.6;
|
|
199
|
-
}
|
|
200
|
-
.boltdocs-page h2 {
|
|
201
|
-
font-size: 1.75rem;
|
|
202
|
-
margin-top: 3.5rem;
|
|
203
|
-
margin-bottom: 1.25rem;
|
|
204
|
-
font-weight: 700;
|
|
205
|
-
color: var(--color-text-main);
|
|
206
|
-
padding-bottom: 0.5rem;
|
|
207
|
-
border-bottom: 1px solid var(--color-border-subtle);
|
|
208
|
-
scroll-margin-top: 6rem;
|
|
209
|
-
letter-spacing: -0.02em;
|
|
210
|
-
}
|
|
211
|
-
.boltdocs-page h3 {
|
|
212
|
-
font-size: 1.25rem;
|
|
213
|
-
margin-top: 2.5rem;
|
|
214
|
-
margin-bottom: 1rem;
|
|
215
|
-
font-weight: 600;
|
|
216
|
-
color: var(--color-text-main);
|
|
217
|
-
scroll-margin-top: 6rem;
|
|
218
|
-
letter-spacing: -0.01em;
|
|
219
|
-
}
|
|
220
|
-
.boltdocs-page p {
|
|
221
|
-
margin-top: 0;
|
|
222
|
-
margin-bottom: 1.25rem;
|
|
223
|
-
color: var(--color-text-muted);
|
|
224
|
-
line-height: 1.8;
|
|
225
|
-
}
|
|
226
|
-
.boltdocs-page a {
|
|
227
|
-
color: var(--color-primary-500);
|
|
228
|
-
text-decoration: none;
|
|
229
|
-
transition: color 0.2s;
|
|
230
|
-
font-weight: 500;
|
|
231
|
-
}
|
|
232
|
-
.boltdocs-page a:hover {
|
|
233
|
-
color: var(--color-primary-400);
|
|
234
|
-
text-decoration: underline;
|
|
235
|
-
}
|
|
236
|
-
.boltdocs-page ul,
|
|
237
|
-
.boltdocs-page ol {
|
|
238
|
-
margin-top: 0;
|
|
239
|
-
margin-bottom: 1.5rem;
|
|
240
|
-
padding-left: 1.5rem;
|
|
241
|
-
color: var(--color-text-muted);
|
|
242
|
-
}
|
|
243
|
-
.boltdocs-page li {
|
|
244
|
-
margin-bottom: 0.5rem;
|
|
245
|
-
line-height: 1.8;
|
|
246
|
-
}
|
|
247
|
-
.boltdocs-page strong {
|
|
248
|
-
color: var(--color-text-main);
|
|
249
|
-
font-weight: 700;
|
|
250
|
-
}
|
|
251
|
-
.boltdocs-page blockquote {
|
|
252
|
-
margin: 2rem 0;
|
|
253
|
-
padding: 1rem 1.5rem;
|
|
254
|
-
border-left: 4px solid var(--color-primary-500);
|
|
255
|
-
background-color: var(--color-primary-500);
|
|
256
|
-
background-color: color-mix(
|
|
257
|
-
in oklch,
|
|
258
|
-
var(--color-primary-500),
|
|
259
|
-
transparent 93%
|
|
260
|
-
);
|
|
261
|
-
border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
|
|
262
|
-
color: var(--color-text-muted);
|
|
263
|
-
font-style: italic;
|
|
264
|
-
}
|
|
265
|
-
.boltdocs-page blockquote p {
|
|
266
|
-
margin: 0;
|
|
267
|
-
}
|
|
268
|
-
.boltdocs-page hr {
|
|
269
|
-
border: none;
|
|
270
|
-
border-top: 1px solid var(--color-border-subtle);
|
|
271
|
-
margin: 3rem 0;
|
|
272
|
-
}
|
|
273
|
-
.boltdocs-page img {
|
|
274
|
-
max-width: 100%;
|
|
275
|
-
height: auto;
|
|
276
|
-
border-radius: var(--radius-lg);
|
|
277
|
-
margin: 2rem 0;
|
|
278
|
-
display: block;
|
|
279
|
-
}
|
|
280
|
-
.boltdocs-page table {
|
|
281
|
-
width: 100%;
|
|
282
|
-
border-collapse: collapse;
|
|
283
|
-
margin: 2rem 0;
|
|
284
|
-
font-size: 0.875rem;
|
|
285
|
-
}
|
|
286
|
-
.boltdocs-page th {
|
|
287
|
-
text-align: left;
|
|
288
|
-
padding: 0.75rem 1rem;
|
|
289
|
-
border-bottom: 2px solid var(--color-border-subtle);
|
|
290
|
-
color: var(--color-text-main);
|
|
291
|
-
font-weight: 700;
|
|
292
|
-
}
|
|
293
|
-
.boltdocs-page td {
|
|
294
|
-
padding: 0.75rem 1rem;
|
|
295
|
-
border-bottom: 1px solid var(--color-border-subtle);
|
|
296
|
-
color: var(--color-text-muted);
|
|
297
|
-
}
|
|
298
|
-
.boltdocs-page tr:hover td {
|
|
299
|
-
background-color: var(--color-bg-surface);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
@media (max-width: 768px) {
|
|
303
|
-
.boltdocs-page h1 {
|
|
304
|
-
font-size: 1.75rem;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/* ═══ Header Anchors ═══ */
|
|
309
|
-
.header-anchor {
|
|
310
|
-
margin-left: 0.5rem;
|
|
311
|
-
color: var(--color-text-dim);
|
|
312
|
-
opacity: 0;
|
|
313
|
-
transition: opacity 0.2s;
|
|
314
|
-
text-decoration: none;
|
|
315
|
-
font-weight: 400;
|
|
316
|
-
}
|
|
317
|
-
.boltdocs-page h2:hover .header-anchor,
|
|
318
|
-
.boltdocs-page h3:hover .header-anchor {
|
|
319
|
-
opacity: 1;
|
|
320
|
-
}
|
|
321
|
-
.header-anchor:hover {
|
|
322
|
-
color: var(--color-primary-500);
|
|
323
|
-
}
|
|
324
|
-
.boltdocs-heading {
|
|
325
|
-
display: flex;
|
|
326
|
-
align-items: center;
|
|
327
|
-
}
|
|
328
|
-
.boltdocs-heading .header-anchor {
|
|
329
|
-
display: inline-flex;
|
|
330
|
-
align-items: center;
|
|
331
|
-
margin-left: 0.5rem;
|
|
332
|
-
color: var(--color-text-dim);
|
|
333
|
-
opacity: 0;
|
|
334
|
-
transition: opacity 0.2s;
|
|
335
|
-
text-decoration: none;
|
|
336
|
-
}
|
|
337
|
-
.boltdocs-heading:hover .header-anchor {
|
|
338
|
-
opacity: 1;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/* ═══ Shiki Styles ═══ */
|
|
342
|
-
|
|
343
|
-
/* Shiki Light/Dark Mode */
|
|
344
|
-
:root .shiki,
|
|
345
|
-
:root .shiki span {
|
|
346
|
-
font-family: var(--font-mono);
|
|
347
|
-
font-size: 12px !important;
|
|
348
|
-
background-color: transparent !important;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
:root.dark .shiki,
|
|
352
|
-
:root.dark .shiki span {
|
|
353
|
-
color: var(--shiki-dark) !important;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/* Base Shiki Pre & Span Styles */
|
|
357
|
-
pre.shiki {
|
|
358
|
-
@apply py-2 text-[12px] leading-[1.6];
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
pre.shiki span.line {
|
|
362
|
-
@apply relative block px-4 py-0;
|
|
363
|
-
min-height: 1.6em;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/* Shiki Word Wrap */
|
|
367
|
-
pre.shiki-word-wrap {
|
|
368
|
-
@apply whitespace-pre-wrap break-words;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
pre.shiki-word-wrap span.line {
|
|
372
|
-
@apply block w-full;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/* Shiki Line Numbers */
|
|
376
|
-
pre.shiki-line-numbers code {
|
|
377
|
-
counter-reset: step;
|
|
378
|
-
counter-increment: step 0;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
pre.shiki-line-numbers .line {
|
|
382
|
-
@apply pl-12!;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/* Hide the last line if it is completely empty to avoid extra numbers */
|
|
386
|
-
pre.shiki-line-numbers .line:last-child:empty,
|
|
387
|
-
pre.shiki-line-numbers .line:last-child:has(> :empty) {
|
|
388
|
-
display: none;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
pre.shiki-line-numbers .line::before {
|
|
392
|
-
counter-increment: step;
|
|
393
|
-
content: counter(step);
|
|
394
|
-
@apply absolute left-0 top-0 inline-flex w-10 justify-end pr-3;
|
|
395
|
-
@apply text-[11px] text-text-muted opacity-30 select-none;
|
|
396
|
-
line-height: inherit; /* Sync with line text */
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/* Shiki Highlight */
|
|
400
|
-
pre span.shiki-line-highlight {
|
|
401
|
-
@apply relative z-0 inline-block w-full;
|
|
402
|
-
&::after {
|
|
403
|
-
content: "";
|
|
404
|
-
@apply absolute top-0 left-0 -z-10 h-full w-full border-l-2 border-primary-500 bg-primary-500/10! opacity-100;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/* Shiki Notation Diff */
|
|
409
|
-
pre.has-diff span.line.diff {
|
|
410
|
-
@apply relative inline-block w-full;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
pre.has-diff span.line.diff.add {
|
|
414
|
-
@apply bg-emerald-500/10! dark:bg-emerald-500/10!;
|
|
415
|
-
&::before {
|
|
416
|
-
content: "+";
|
|
417
|
-
@apply absolute left-2 text-emerald-500 font-bold;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
pre.has-diff span.line.diff.remove {
|
|
422
|
-
@apply bg-danger-500/10! opacity-70;
|
|
423
|
-
&::before {
|
|
424
|
-
content: "-";
|
|
425
|
-
@apply absolute left-2 text-danger-500 font-bold;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
121
|
+
--color-main: #141413;
|
|
122
|
+
/* Deep warm charcoal background */
|
|
123
|
+
--color-surface: #1e1e1d;
|
|
124
|
+
/* Slightly lighter warm charcoal for cards */
|
|
125
|
+
--color-soft: #252524;
|
|
126
|
+
/* Warm dark gray for containers */
|
|
127
|
+
--color-body: #f3f3f2;
|
|
128
|
+
/* Soft warm white body text */
|
|
129
|
+
--color-paragraph: #d5d5d3;
|
|
130
|
+
/* Warm light gray text */
|
|
131
|
+
--color-muted: #9a9a97;
|
|
132
|
+
/* Warm muted text */
|
|
133
|
+
--color-dim: #767673;
|
|
134
|
+
--color-subtle: #2c2c2a;
|
|
135
|
+
/* Subtle dark border */
|
|
136
|
+
--color-strong: #3c3c39;
|
|
137
|
+
/* Strong dark border */
|
|
138
|
+
--color-code-bg: #1c1c1b;
|
|
139
|
+
--color-code-text: #eb5828;
|
|
140
|
+
/* Outstanding terracotta orange inline code */
|
|
428
141
|
}
|