@vite-hub/docs 0.7.0 → 0.9.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/README.md +1 -1
- package/dist/{assistant-shared-JcfjK-qg.js → assistant-shared-BmCHVfEd.js} +0 -1
- package/dist/assistant-worker.js +1 -1
- package/dist/assistant.js +1 -1
- package/dist/{content-Chgcvz1q.js → content-Df5eeqTg.js} +1 -3
- package/dist/{draft-rOGhtXch.js → draft-CYScbH80.js} +1 -2
- package/dist/index.js +1 -1
- package/dist/{manifest-CQMreQZ5.js → manifest-BgBIScEV.js} +1 -17
- package/dist/{markdown-BzZkYb24.js → markdown-DgQg53dB.js} +0 -28
- package/dist/navigation.js +0 -2
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.js +5 -44
- package/dist/object-ycNFay7F.js +6 -0
- package/dist/primitive-rail.js +0 -4
- package/dist/runtime/app/assistant/DocsAssistant.vue +0 -3
- package/dist/runtime/app/assistant/DocsAssistantOff.vue +0 -2
- package/dist/runtime/app/assistant/DocsAssistantPanel.vue +0 -12
- package/dist/runtime/app/components/DocsAppShell.vue +0 -7
- package/dist/runtime/app/components/DocsArticle.vue +0 -8
- package/dist/runtime/app/components/DocsAsideFooter.vue +0 -5
- package/dist/runtime/app/components/DocsAsideLeftBody.vue +0 -18
- package/dist/runtime/app/components/DocsBrandMark.vue +0 -6
- package/dist/runtime/app/components/DocsCodePanel.vue +0 -19
- package/dist/runtime/app/components/DocsMarkdown.vue +0 -9
- package/dist/runtime/app/components/DocsPage.vue +0 -10
- package/dist/runtime/app/components/DocsPageCredits.vue +0 -1
- package/dist/runtime/app/components/DocsSidebars.vue +0 -8
- package/dist/runtime/app/components/OgImage/DocsPage.takumi.vue +0 -2
- package/dist/runtime/app/components/content/AgentOnly.vue +0 -1
- package/dist/runtime/app/components/content/CodeTree.vue +0 -6
- package/dist/runtime/app/components/content/ComarkHtml.vue +0 -9
- package/dist/runtime/app/components/content/Correct.vue +0 -1
- package/dist/runtime/app/components/content/Example.vue +0 -11
- package/dist/runtime/app/components/content/Examples.vue +0 -4
- package/dist/runtime/app/components/content/Incorrect.vue +0 -1
- package/dist/runtime/app/components/content/McpClient.vue +0 -5
- package/dist/runtime/app/components/content/McpInstall.vue +0 -4
- package/dist/runtime/app/components/content/PageList.vue +0 -11
- package/dist/runtime/app/components/content/ProductFeatureItem.vue +0 -3
- package/dist/runtime/app/components/content/ProductFeatures.vue +0 -3
- package/dist/runtime/app/composables/docs-assistant-problem.ts +0 -8
- package/dist/runtime/app/composables/docs-theme.ts +0 -6
- package/dist/runtime/app/composables/headerActions.ts +0 -1
- package/dist/runtime/app/composables/icons.ts +0 -1
- package/dist/runtime/app/composables/seo.ts +0 -11
- package/dist/runtime/app/composables/tutorial.ts +0 -8
- package/dist/runtime/app/composables/useDocsAssistant.ts +0 -2
- package/dist/runtime/app/error.vue +0 -4
- package/dist/runtime/app/layouts/docs.vue +0 -6
- package/dist/runtime/app/middleware/docs-layout.ts +0 -9
- package/dist/runtime/app/plugins/comark-css.ts +0 -5
- package/dist/runtime/app/plugins/icon-stroke.ts +0 -3
- package/dist/runtime/app/plugins/theme-color.ts +0 -5
- package/dist/runtime/app/utils/docs-theme.ts +0 -9
- package/dist/runtime/app/utils/file-tree.ts +0 -4
- package/dist/runtime/server/llms.js +1 -1
- package/dist/runtime/server/markdown.js +2 -7
- package/dist/runtime/server/mcp.js +1 -1
- package/dist/runtime/server/page.js +2 -2
- package/dist/runtime/server/raw.js +1 -1
- package/dist/runtime/server/search.js +2 -3
- package/dist/runtime/server/sitemap.js +1 -1
- package/dist/runtime/theme/design.css +1 -1
- package/dist/runtime/theme/vitehub.css +386 -0
- package/dist/{schema-CmSiwC4t.js → schema-fumnVoRZ.js} +1 -3
- package/dist/server.js +2 -2
- package/dist/snapshot-worker.mjs +0 -5
- package/dist/theme-DowEsyAx.js +516 -0
- package/dist/{theme-CgJRnVdT.d.ts → theme-aPbJMLsc.d.ts} +0 -6
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/package.json +12 -12
- package/dist/theme-DRktv19v.js +0 -235
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The ViteHub design system for Nuxt UI: the tokens and the global rules of the docs. The module imports it after
|
|
3
|
+
* Tailwind and Nuxt UI and passes `vitehubTheme` (src/vitehub-theme.ts) as the `ui` app config. The Tailwind classes of
|
|
4
|
+
* that app config reach Tailwind through `docs/design.json`, and the focus rules that it shares with the parts come
|
|
5
|
+
* from `@vite-hub/ui/styles.css`.
|
|
6
|
+
*
|
|
7
|
+
* The rules here are unlayered, so they win over the utility classes of Nuxt UI. DESIGN.md in docs/ says when to use
|
|
8
|
+
* which token and component.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
@theme {
|
|
12
|
+
/* @nuxt/fonts serves Geist on the docs. */
|
|
13
|
+
--font-sans: "Geist Variable", "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
14
|
+
--font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* The shadcn/ui neutral palette. Hierarchy comes from four text tones, not from size: highlighted for names, default
|
|
19
|
+
* for body text, muted for descriptions, and dimmed for meta. Every tone keeps at least 4.5:1 (WCAG AA) on the page and
|
|
20
|
+
* on the neutral surfaces.
|
|
21
|
+
*
|
|
22
|
+
* The colors that shadcn/ui has a name for are set under that name, and the Nuxt UI and ViteHub tokens read them. An app
|
|
23
|
+
* changes one by setting the shadcn/ui name after this file: on `:root` for light, and on `:root.dark` for dark. The
|
|
24
|
+
* steps that shadcn/ui has no name for, such as `--ui-text` and `--ui-bg-muted`, keep their values on the Nuxt UI token.
|
|
25
|
+
* The dark blocks repeat the Nuxt UI tokens, so each token keeps the specificity of its color mode selector.
|
|
26
|
+
*/
|
|
27
|
+
:root {
|
|
28
|
+
/* Tokens for the scoped kit family. Nuxt UI keeps its own --ui-* aliases. */
|
|
29
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
30
|
+
--input: oklch(0.87 0 0);
|
|
31
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
32
|
+
--overlay: oklch(0 0 0 / 25%);
|
|
33
|
+
--popover-foreground: oklch(0.205 0 0);
|
|
34
|
+
--shadow-popover: 0 0 0 1px var(--border), 0 4px 8px -4px rgb(0 0 0 / 4%), 0 16px 24px -8px rgb(0 0 0 / 6%);
|
|
35
|
+
--shadow-dialog: 0 0 0 1px var(--border), 0 8px 16px -4px rgb(0 0 0 / 4%), 0 24px 32px -8px rgb(0 0 0 / 6%);
|
|
36
|
+
color-scheme: light;
|
|
37
|
+
--background: oklch(1 0 0);
|
|
38
|
+
--foreground: oklch(0.205 0 0);
|
|
39
|
+
--muted: oklch(0.97 0 0);
|
|
40
|
+
--muted-foreground: oklch(0.5 0 0);
|
|
41
|
+
--border: oklch(0.922 0 0);
|
|
42
|
+
/* Primary actions are black on light and white on dark, as in the Vercel dashboard. */
|
|
43
|
+
--primary: oklch(0.205 0 0);
|
|
44
|
+
/* Menus, popovers, and tooltips: a translucent surface over the page, with the Geist layered shadow. */
|
|
45
|
+
--popover: rgb(255 255 255 / 92%);
|
|
46
|
+
/*
|
|
47
|
+
* Blue marks focus, and the areas drawn for comments (`--vh-comment-mark` in styles.css), so it stands apart from the
|
|
48
|
+
* black and white buttons. Sky 600 keeps 3:1 on white. An area in the text color would vanish on a white image in a
|
|
49
|
+
* dark page.
|
|
50
|
+
*/
|
|
51
|
+
--ring: oklch(0.588 0.158 241.966);
|
|
52
|
+
/*
|
|
53
|
+
* Nuxt UI multiplies this base: rounded-sm is 1x, rounded-md 1.5x, rounded-lg 2x, rounded-xl 3x. At 0.25rem, buttons,
|
|
54
|
+
* inputs, and tabs get 6px, cards and code panels 8px, and menus and dialogs 12px (Geist). It is the base step, as in
|
|
55
|
+
* the tokens of @vite-hub/kit, not the card radius of shadcn/ui.
|
|
56
|
+
*/
|
|
57
|
+
--radius: 0.25rem;
|
|
58
|
+
--ui-bg: var(--background);
|
|
59
|
+
--ui-bg-muted: oklch(0.985 0 0);
|
|
60
|
+
--ui-bg-elevated: var(--muted);
|
|
61
|
+
--ui-bg-accented: oklch(0.94 0 0);
|
|
62
|
+
--ui-bg-inverted: var(--foreground);
|
|
63
|
+
--ui-border: var(--border);
|
|
64
|
+
--ui-border-muted: oklch(0.96 0 0);
|
|
65
|
+
--ui-border-accented: oklch(0.87 0 0);
|
|
66
|
+
--ui-border-inverted: var(--foreground);
|
|
67
|
+
--ui-text: oklch(0.371 0 0);
|
|
68
|
+
--ui-text-toned: oklch(0.439 0 0);
|
|
69
|
+
--ui-text-muted: var(--muted-foreground);
|
|
70
|
+
--ui-text-dimmed: oklch(0.52 0 0);
|
|
71
|
+
--ui-text-highlighted: var(--foreground);
|
|
72
|
+
--ui-text-inverted: var(--background);
|
|
73
|
+
--ui-radius: var(--radius);
|
|
74
|
+
--ui-primary: var(--primary);
|
|
75
|
+
--vh-focus: var(--ring);
|
|
76
|
+
/*
|
|
77
|
+
* Status colors as text. Nuxt UI draws text and dots with the same 500 shade, which reaches only 2.1:1 (amber) to
|
|
78
|
+
* 3.8:1 (red) on white. These shades keep 4.5:1 on the page and on a 10% tint of the same color.
|
|
79
|
+
*/
|
|
80
|
+
--vh-text-error: var(--ui-color-error-700);
|
|
81
|
+
--vh-text-info: var(--ui-color-info-700);
|
|
82
|
+
--vh-text-success: var(--ui-color-success-700);
|
|
83
|
+
--vh-text-warning: var(--ui-color-warning-800);
|
|
84
|
+
--ui-error: var(--ui-color-error-600, var(--destructive));
|
|
85
|
+
--vh-floating: var(--popover);
|
|
86
|
+
--vh-shadow-floating: 0 0 0 1px var(--ui-border), 0 4px 8px -4px rgb(0 0 0 / 4%), 0 16px 24px -8px rgb(0 0 0 / 6%);
|
|
87
|
+
--vh-shadow-dialog: 0 0 0 1px var(--ui-border), 0 8px 16px -4px rgb(0 0 0 / 4%), 0 24px 32px -8px rgb(0 0 0 / 6%);
|
|
88
|
+
--vh-scrollbar: oklch(0.87 0 0);
|
|
89
|
+
--vh-scrollbar-hover: oklch(0.708 0 0);
|
|
90
|
+
/* Marks over an image or a video, such as a focal point or a play button, stay white on a dark scrim in both modes. */
|
|
91
|
+
/* Selected text: a neutral tint, because blue marks focus only. */
|
|
92
|
+
--vh-selection: color-mix(in oklab, var(--ui-text-highlighted) 14%, transparent);
|
|
93
|
+
--vh-on-media: oklch(1 0 0);
|
|
94
|
+
--vh-media-scrim: rgb(0 0 0 / 50%);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Dark is its own palette, not an inversion: the page is near black, and surfaces are white at low alpha. */
|
|
98
|
+
:root.dark {
|
|
99
|
+
/* Tokens for the scoped kit family. Nuxt UI keeps its own --ui-* aliases. */
|
|
100
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
101
|
+
--input: oklch(1 0 0 / 16%);
|
|
102
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
103
|
+
--overlay: oklch(0 0 0 / 60%);
|
|
104
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
105
|
+
--shadow-popover: 0 0 0 1px var(--border), 0 4px 8px -4px rgb(0 0 0 / 24%), 0 16px 24px -8px rgb(0 0 0 / 32%);
|
|
106
|
+
--shadow-dialog: 0 0 0 1px var(--border), 0 8px 16px -4px rgb(0 0 0 / 24%), 0 24px 32px -8px rgb(0 0 0 / 32%);
|
|
107
|
+
color-scheme: dark;
|
|
108
|
+
--background: oklch(0.145 0 0);
|
|
109
|
+
--foreground: oklch(0.985 0 0);
|
|
110
|
+
--muted: rgb(255 255 255 / 5%);
|
|
111
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
112
|
+
--border: rgb(255 255 255 / 10%);
|
|
113
|
+
--primary: oklch(0.985 0 0);
|
|
114
|
+
/* Dark floating surfaces sit one step above the page instead of matching it. */
|
|
115
|
+
--popover: rgb(23 23 23 / 92%);
|
|
116
|
+
/* Sky 400 keeps 3:1 on the dark page. */
|
|
117
|
+
--ring: oklch(0.746 0.16 232.661);
|
|
118
|
+
--ui-bg: var(--background);
|
|
119
|
+
--ui-bg-muted: oklch(0.178 0 0);
|
|
120
|
+
--ui-bg-elevated: var(--muted);
|
|
121
|
+
--ui-bg-accented: rgb(255 255 255 / 8%);
|
|
122
|
+
--ui-bg-inverted: var(--foreground);
|
|
123
|
+
--ui-border: var(--border);
|
|
124
|
+
--ui-border-muted: rgb(255 255 255 / 5%);
|
|
125
|
+
--ui-border-accented: rgb(255 255 255 / 16%);
|
|
126
|
+
--ui-border-inverted: var(--foreground);
|
|
127
|
+
--ui-text: oklch(0.87 0 0);
|
|
128
|
+
--ui-text-toned: oklch(0.8 0 0);
|
|
129
|
+
--ui-text-muted: var(--muted-foreground);
|
|
130
|
+
--ui-text-dimmed: oklch(0.62 0 0);
|
|
131
|
+
--ui-text-highlighted: var(--foreground);
|
|
132
|
+
--ui-text-inverted: var(--background);
|
|
133
|
+
--ui-primary: var(--primary);
|
|
134
|
+
--vh-focus: var(--ring);
|
|
135
|
+
--ui-error: var(--ui-color-error-400, var(--destructive));
|
|
136
|
+
--vh-text-error: var(--ui-color-error-400);
|
|
137
|
+
--vh-text-info: var(--ui-color-info-400);
|
|
138
|
+
--vh-text-success: var(--ui-color-success-400);
|
|
139
|
+
--vh-text-warning: var(--ui-color-warning-400);
|
|
140
|
+
--vh-floating: var(--popover);
|
|
141
|
+
--vh-shadow-floating: 0 0 0 1px var(--ui-border), 0 4px 8px -4px rgb(0 0 0 / 24%), 0 16px 24px -8px rgb(0 0 0 / 32%);
|
|
142
|
+
--vh-shadow-dialog: 0 0 0 1px var(--ui-border), 0 8px 16px -4px rgb(0 0 0 / 24%), 0 24px 32px -8px rgb(0 0 0 / 32%);
|
|
143
|
+
--vh-scrollbar: rgb(255 255 255 / 12%);
|
|
144
|
+
--vh-scrollbar-hover: rgb(255 255 255 / 22%);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Before the app sets a color mode class, the page follows the system. */
|
|
148
|
+
@media (prefers-color-scheme: dark) {
|
|
149
|
+
:root:not(.light):not(.dark) {
|
|
150
|
+
/* Tokens for the scoped kit family. Nuxt UI keeps its own --ui-* aliases. */
|
|
151
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
152
|
+
--input: oklch(1 0 0 / 16%);
|
|
153
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
154
|
+
--overlay: oklch(0 0 0 / 60%);
|
|
155
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
156
|
+
--shadow-popover: 0 0 0 1px var(--border), 0 4px 8px -4px rgb(0 0 0 / 24%), 0 16px 24px -8px rgb(0 0 0 / 32%);
|
|
157
|
+
--shadow-dialog: 0 0 0 1px var(--border), 0 8px 16px -4px rgb(0 0 0 / 24%), 0 24px 32px -8px rgb(0 0 0 / 32%);
|
|
158
|
+
color-scheme: dark;
|
|
159
|
+
--background: oklch(0.145 0 0);
|
|
160
|
+
--foreground: oklch(0.985 0 0);
|
|
161
|
+
--muted: rgb(255 255 255 / 5%);
|
|
162
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
163
|
+
--border: rgb(255 255 255 / 10%);
|
|
164
|
+
--primary: oklch(0.985 0 0);
|
|
165
|
+
/* Dark floating surfaces sit one step above the page instead of matching it. */
|
|
166
|
+
--popover: rgb(23 23 23 / 92%);
|
|
167
|
+
/* Sky 400 keeps 3:1 on the dark page. */
|
|
168
|
+
--ring: oklch(0.746 0.16 232.661);
|
|
169
|
+
--ui-bg: var(--background);
|
|
170
|
+
--ui-bg-muted: oklch(0.178 0 0);
|
|
171
|
+
--ui-bg-elevated: var(--muted);
|
|
172
|
+
--ui-bg-accented: rgb(255 255 255 / 8%);
|
|
173
|
+
--ui-bg-inverted: var(--foreground);
|
|
174
|
+
--ui-border: var(--border);
|
|
175
|
+
--ui-border-muted: rgb(255 255 255 / 5%);
|
|
176
|
+
--ui-border-accented: rgb(255 255 255 / 16%);
|
|
177
|
+
--ui-border-inverted: var(--foreground);
|
|
178
|
+
--ui-text: oklch(0.87 0 0);
|
|
179
|
+
--ui-text-toned: oklch(0.8 0 0);
|
|
180
|
+
--ui-text-muted: var(--muted-foreground);
|
|
181
|
+
--ui-text-dimmed: oklch(0.62 0 0);
|
|
182
|
+
--ui-text-highlighted: var(--foreground);
|
|
183
|
+
--ui-text-inverted: var(--background);
|
|
184
|
+
--ui-primary: var(--primary);
|
|
185
|
+
--vh-focus: var(--ring);
|
|
186
|
+
--ui-error: var(--ui-color-error-400, var(--destructive));
|
|
187
|
+
--vh-text-error: var(--ui-color-error-400);
|
|
188
|
+
--vh-text-info: var(--ui-color-info-400);
|
|
189
|
+
--vh-text-success: var(--ui-color-success-400);
|
|
190
|
+
--vh-text-warning: var(--ui-color-warning-400);
|
|
191
|
+
--vh-floating: var(--popover);
|
|
192
|
+
--vh-shadow-floating: 0 0 0 1px var(--ui-border), 0 4px 8px -4px rgb(0 0 0 / 24%), 0 16px 24px -8px rgb(0 0 0 / 32%);
|
|
193
|
+
--vh-shadow-dialog: 0 0 0 1px var(--ui-border), 0 8px 16px -4px rgb(0 0 0 / 24%), 0 24px 32px -8px rgb(0 0 0 / 32%);
|
|
194
|
+
--vh-scrollbar: rgb(255 255 255 / 12%);
|
|
195
|
+
--vh-scrollbar-hover: rgb(255 255 255 / 22%);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
html {
|
|
200
|
+
background: var(--ui-bg);
|
|
201
|
+
color: var(--ui-text);
|
|
202
|
+
font-family: var(--font-sans);
|
|
203
|
+
-webkit-font-smoothing: antialiased;
|
|
204
|
+
-moz-osx-font-smoothing: grayscale;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Status text uses the darker shades above. Dots, bars, and fills keep the brighter Nuxt UI shade. */
|
|
208
|
+
.text-error {
|
|
209
|
+
color: var(--vh-text-error);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.text-info {
|
|
213
|
+
color: var(--vh-text-info);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.text-success {
|
|
217
|
+
color: var(--vh-text-success);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.text-warning {
|
|
221
|
+
color: var(--vh-text-warning);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
::selection {
|
|
225
|
+
background: var(--vh-selection);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
button,
|
|
229
|
+
a {
|
|
230
|
+
-webkit-tap-highlight-color: transparent;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/*
|
|
234
|
+
* Focus. One rule draws the ring of every control, so no component sets its own. Nuxt UI 4 draws a 3px outline at 25%
|
|
235
|
+
* alpha and also darkens the border of a framed control, which reads as two rings. Here, the element that has focus gets
|
|
236
|
+
* one 2px blue ring.
|
|
237
|
+
*
|
|
238
|
+
* Every element keeps the focus color as its outline color, also without focus. Then `transition-colors` has no color
|
|
239
|
+
* change to animate, and the ring appears at once. The rule sits in the `base` layer, so an outline that a component
|
|
240
|
+
* draws on purpose, such as a 1px image outline, keeps its own color.
|
|
241
|
+
*/
|
|
242
|
+
@layer base {
|
|
243
|
+
*,
|
|
244
|
+
::before,
|
|
245
|
+
::after {
|
|
246
|
+
outline-color: var(--vh-focus);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:focus-visible {
|
|
251
|
+
outline: 2px solid var(--vh-focus);
|
|
252
|
+
outline-offset: 2px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/*
|
|
256
|
+
* Items in a list that clips its overflow, such as menu items, options, tabs, tab panels, and table rows, keep the ring inside. A row
|
|
257
|
+
* that is a link in a framed list opts in with `data-focus-inset`.
|
|
258
|
+
*/
|
|
259
|
+
:where([role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="tab"], [role="treeitem"], [role="row"], [role="gridcell"], [role="tabpanel"], tr, [data-focus-inset]):focus-visible {
|
|
260
|
+
outline-offset: -2px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/*
|
|
264
|
+
* Code moves focus to a region, a heading, or a dialog so that the next Tab starts there, such as the skip link target or
|
|
265
|
+
* a page after navigation, or an overlay moves focus to its menu or dialog when it opens. The user did not choose that
|
|
266
|
+
* element, so it gets no ring. Menu items also have `tabindex="-1"`, but they have a role, so they keep it.
|
|
267
|
+
*/
|
|
268
|
+
:where(main, section, article, div:not([role]), h1, h2, h3, h4, [role="dialog"], [role="alertdialog"], [role="menu"], [role="region"], [role="tabpanel"])[tabindex="-1"]:focus-visible {
|
|
269
|
+
outline: none;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/*
|
|
273
|
+
* A text field shows focus on its own frame. Nuxt UI draws the frame as a ring, so the ring turns blue, and 2px wide on a
|
|
274
|
+
* framed field (`focus-visible:ring-2` in the theme), instead of getting a second ring outside it. A field with an error
|
|
275
|
+
* keeps its red frame. A field without a frame, such as the command palette input, shows focus with its caret.
|
|
276
|
+
*/
|
|
277
|
+
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), textarea, select, [role="combobox"]):focus-visible {
|
|
278
|
+
outline: none;
|
|
279
|
+
--tw-ring-color: var(--vh-focus);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* A rich text editor, such as the document editor, is a writing surface: the caret shows focus. */
|
|
283
|
+
:where([contenteditable]:not([contenteditable="false"])):focus-visible {
|
|
284
|
+
outline: none;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/*
|
|
288
|
+
* A field whose frame is a wrapper, such as the prompt input of @vite-hub/ui, marks the wrapper with data-focus-frame. A
|
|
289
|
+
* plain field that draws its own border, such as the size fields of DeviceFrame, marks itself.
|
|
290
|
+
*/
|
|
291
|
+
:where([data-focus-frame]):is(:focus-visible, :has(:is(input, textarea):focus-visible)) {
|
|
292
|
+
border-color: var(--vh-focus);
|
|
293
|
+
box-shadow: 0 0 0 1px var(--vh-focus);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
:where([data-focus-frame]):has(:is(input, textarea)[aria-invalid="true"]:focus-visible) {
|
|
297
|
+
border-color: var(--ui-error);
|
|
298
|
+
box-shadow: 0 0 0 1px var(--ui-error);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
:where(input, textarea, select, [role="combobox"])[aria-invalid="true"]:focus-visible {
|
|
302
|
+
--tw-ring-color: var(--ui-error);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/*
|
|
306
|
+
* A field drawn from ui-sdk parts in a Nuxt UI app, such as a Console form control, draws its frame as a 1px inset ring
|
|
307
|
+
* and marks the framed element with data-focus-ring-frame. On focus the ring turns blue and 2px wide, as
|
|
308
|
+
* `focus-visible:ring-2` does on a Nuxt UI field. A field with an error sets `data-focus-ring-frame="error"` and keeps
|
|
309
|
+
* its red frame.
|
|
310
|
+
*/
|
|
311
|
+
:where([data-focus-ring-frame]):focus-visible {
|
|
312
|
+
outline: none;
|
|
313
|
+
box-shadow: inset 0 0 0 2px var(--vh-focus);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
:where([data-focus-ring-frame="error"], [data-focus-ring-frame][aria-invalid="true"]):focus-visible {
|
|
317
|
+
box-shadow: inset 0 0 0 2px var(--ui-error);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* A framed button darkens its frame on focus. The blue ring is enough, so the frame keeps its color. */
|
|
321
|
+
:where(button, a)[class*="focus-visible:ring-inverted"]:focus-visible {
|
|
322
|
+
--tw-ring-color: var(--ui-border-accented);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/*
|
|
326
|
+
* Nuxt UI also rings the `::before` of a focused navigation link, the code inside a link, and the card around a focused
|
|
327
|
+
* checkbox or radio. The ring of the focused element is enough, so those second rings go.
|
|
328
|
+
*/
|
|
329
|
+
:where([class*="focus-visible:before:outline"]):focus-visible::before,
|
|
330
|
+
:where(a:focus-visible > code),
|
|
331
|
+
:where([class*="has-focus-visible:outline"]):has(:focus-visible) {
|
|
332
|
+
outline: none;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/*
|
|
336
|
+
* A page card links through an empty `a` laid over the card. The card draws the ring, so the ring has the card's shape,
|
|
337
|
+
* and its frame keeps its color.
|
|
338
|
+
*/
|
|
339
|
+
:where([class*="has-[>a:focus-visible]:outline"]):has(> a:focus-visible) {
|
|
340
|
+
outline: 2px solid var(--vh-focus);
|
|
341
|
+
outline-offset: 2px;
|
|
342
|
+
--tw-ring-color: var(--ui-border);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
:where([class*="has-[>a:focus-visible]:outline"]) > a:focus-visible {
|
|
346
|
+
outline: none;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
:where([class*="has-focus-visible:ring"]):has(:focus-visible) {
|
|
350
|
+
--tw-ring-color: var(--ui-border-accented);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/* The tag input is a text field whose frame is its root, so its frame turns blue like the frame of an input. */
|
|
354
|
+
:where([class*="has-focus-visible:ring-2"]):has(input:focus-visible) {
|
|
355
|
+
--tw-ring-color: var(--vh-focus);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:where([class*="has-focus-visible:ring-2"]):has(input[aria-invalid="true"]:focus-visible) {
|
|
359
|
+
--tw-ring-color: var(--ui-error);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/*
|
|
363
|
+
* Parts that the rules above cannot reach. The file tree of @pierre/trees renders in shadow DOM and reads these
|
|
364
|
+
* variables, which inherit into it from the page: the selected row is a neutral fill like every selected item, and the
|
|
365
|
+
* focused row gets the blue ring inside. Comark adds a shadow to its heading anchors.
|
|
366
|
+
*/
|
|
367
|
+
:root {
|
|
368
|
+
--trees-accent-override: var(--ui-text-highlighted);
|
|
369
|
+
--trees-bg-muted-override: var(--ui-bg-elevated);
|
|
370
|
+
--trees-bg-override: var(--ui-bg);
|
|
371
|
+
--trees-border-color-override: var(--ui-border);
|
|
372
|
+
--trees-border-radius-override: calc(var(--ui-radius) * 1.5);
|
|
373
|
+
--trees-fg-override: var(--ui-text-toned);
|
|
374
|
+
--trees-font-family-override: var(--font-sans);
|
|
375
|
+
--trees-input-bg-override: var(--ui-bg);
|
|
376
|
+
--trees-focus-ring-color-override: var(--vh-focus);
|
|
377
|
+
--trees-focus-ring-offset-override: -2px;
|
|
378
|
+
--trees-focus-ring-width-override: 2px;
|
|
379
|
+
--trees-selected-bg-override: var(--ui-bg-elevated);
|
|
380
|
+
--trees-selected-fg-override: var(--ui-text-highlighted);
|
|
381
|
+
--trees-selected-focused-border-color-override: var(--vh-focus);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
:where(.cl-anchor):focus-visible {
|
|
385
|
+
box-shadow: none;
|
|
386
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as isRecord } from "./object-ycNFay7F.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
// src/schema.ts
|
|
3
4
|
/**
|
|
@@ -183,7 +184,4 @@ function docsFrontmatter(input) {
|
|
|
183
184
|
if (input.navigation === false) expanded.navigation = false;
|
|
184
185
|
return expanded;
|
|
185
186
|
}
|
|
186
|
-
function isRecord(value) {
|
|
187
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
188
|
-
}
|
|
189
187
|
export { docsSectionSchema as a, docsPageSchema as i, docsLayouts as n, expandDottedKeys as o, docsPageFields as r, docsFrontmatter as t };
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as checkDocsLinks, n as createDocsContent, r as createDocsManifest } from "./manifest-
|
|
2
|
-
import { a as docsSearchSections, i as docsMarkdown, t as createDocsParser } from "./markdown-
|
|
1
|
+
import { l as checkDocsLinks, n as createDocsContent, r as createDocsManifest } from "./manifest-BgBIScEV.js";
|
|
2
|
+
import { a as docsSearchSections, i as docsMarkdown, t as createDocsParser } from "./markdown-DgQg53dB.js";
|
|
3
3
|
import { t as toRawMarkdown } from "./raw-Dh38kL9g.js";
|
|
4
4
|
import { i as docsPageResponse } from "./page-DWsretqk.js";
|
|
5
5
|
export { checkDocsLinks, createDocsContent, createDocsManifest, createDocsParser, docsMarkdown, docsPageResponse, docsSearchSections, toRawMarkdown };
|
package/dist/snapshot-worker.mjs
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
// Runs in its own Node process, so the snapshot (hundreds of MiB in memory) does not share the heap of the docs build.
|
|
2
|
-
// node snapshot-worker.mjs <app dir> <out dir> <file prefix> <lockfile>
|
|
3
|
-
// Prints the written file names as JSON, with the SHA-256 of the joined parts and the sizes.
|
|
4
1
|
import { createHash } from "node:crypto"
|
|
5
2
|
import { mkdir, readFile, writeFile } from "node:fs/promises"
|
|
6
3
|
import { dirname, resolve } from "node:path"
|
|
7
4
|
import { createNodeModulesSnapshot, packSnapshot } from "@vite-hub/web-container/snapshot"
|
|
8
5
|
|
|
9
6
|
const [dir, outDir, prefix, lockPath] = process.argv.slice(2)
|
|
10
|
-
// The lockfile pins every version, so two builds of one commit give the same bytes.
|
|
11
7
|
const lockfile = await readFile(lockPath, "utf8").catch((error) => {
|
|
12
8
|
if (error.code === "ENOENT") return undefined
|
|
13
9
|
throw error
|
|
@@ -18,7 +14,6 @@ try {
|
|
|
18
14
|
}
|
|
19
15
|
catch (error) {
|
|
20
16
|
if (lockfile === undefined || error?.code !== "WEB_CONTAINER_SNAPSHOT_LOCKFILE_MISMATCH") throw error
|
|
21
|
-
// The dependencies changed since the lockfile was written. Update it, keeping the versions that still fit.
|
|
22
17
|
console.warn(`[docs] ${lockPath} does not match the dependencies (${error.message.split("\n")[0]}). Updating it; commit the change.`)
|
|
23
18
|
result = await createNodeModulesSnapshot({ dir, lockfile, frozenLockfile: false })
|
|
24
19
|
}
|