blume 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1213 -473
- package/dist/cli/index.js.map +33 -29
- package/dist/types/core/bridge.d.ts +24 -0
- package/dist/types/core/config.d.ts +35 -0
- package/dist/types/core/data.d.ts +129 -0
- package/dist/types/core/define-components.d.ts +27 -0
- package/dist/types/core/define-meta.d.ts +16 -0
- package/dist/types/core/deployment-env.d.ts +9 -0
- package/dist/types/core/diagnostics.d.ts +17 -0
- package/dist/types/core/i18n-ui.d.ts +500 -0
- package/dist/types/core/load-module.d.ts +7 -0
- package/dist/types/core/package-root.d.ts +17 -0
- package/dist/types/core/project.d.ts +9 -0
- package/dist/types/core/schema.d.ts +3461 -0
- package/dist/types/core/sources/types.d.ts +107 -0
- package/dist/types/core/types.d.ts +245 -0
- package/dist/types/core/ui-packs/ar.d.ts +3 -0
- package/dist/types/core/ui-packs/bg.d.ts +3 -0
- package/dist/types/core/ui-packs/bn.d.ts +3 -0
- package/dist/types/core/ui-packs/ca.d.ts +3 -0
- package/dist/types/core/ui-packs/cs.d.ts +3 -0
- package/dist/types/core/ui-packs/da.d.ts +3 -0
- package/dist/types/core/ui-packs/de.d.ts +3 -0
- package/dist/types/core/ui-packs/el.d.ts +3 -0
- package/dist/types/core/ui-packs/es.d.ts +3 -0
- package/dist/types/core/ui-packs/fa.d.ts +3 -0
- package/dist/types/core/ui-packs/fi.d.ts +3 -0
- package/dist/types/core/ui-packs/fr.d.ts +3 -0
- package/dist/types/core/ui-packs/he.d.ts +3 -0
- package/dist/types/core/ui-packs/hi.d.ts +3 -0
- package/dist/types/core/ui-packs/hr.d.ts +3 -0
- package/dist/types/core/ui-packs/hu.d.ts +3 -0
- package/dist/types/core/ui-packs/id.d.ts +3 -0
- package/dist/types/core/ui-packs/index.d.ts +13 -0
- package/dist/types/core/ui-packs/it.d.ts +3 -0
- package/dist/types/core/ui-packs/ja.d.ts +3 -0
- package/dist/types/core/ui-packs/ko.d.ts +3 -0
- package/dist/types/core/ui-packs/nl.d.ts +3 -0
- package/dist/types/core/ui-packs/no.d.ts +3 -0
- package/dist/types/core/ui-packs/pl.d.ts +3 -0
- package/dist/types/core/ui-packs/pt-br.d.ts +3 -0
- package/dist/types/core/ui-packs/pt.d.ts +3 -0
- package/dist/types/core/ui-packs/ro.d.ts +3 -0
- package/dist/types/core/ui-packs/ru.d.ts +3 -0
- package/dist/types/core/ui-packs/sk.d.ts +3 -0
- package/dist/types/core/ui-packs/sr.d.ts +3 -0
- package/dist/types/core/ui-packs/sv.d.ts +3 -0
- package/dist/types/core/ui-packs/th.d.ts +3 -0
- package/dist/types/core/ui-packs/tr.d.ts +3 -0
- package/dist/types/core/ui-packs/uk.d.ts +3 -0
- package/dist/types/core/ui-packs/vi.d.ts +3 -0
- package/dist/types/core/ui-packs/zh-tw.d.ts +3 -0
- package/dist/types/core/ui-packs/zh.d.ts +3 -0
- package/dist/types/core/version.d.ts +8 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/migrate/mintlify/config.d.ts +2 -0
- package/dist/types/migrate/mintlify/i18n.d.ts +7 -0
- package/dist/types/theme/fonts.d.ts +163 -0
- package/docs/advanced/custom-pages.mdx +91 -10
- package/docs/configuration/index.mdx +19 -0
- package/docs/content/components.mdx +103 -1
- package/package.json +13 -3
- package/src/ai/llms.ts +1 -2
- package/src/astro/examples.ts +106 -0
- package/src/astro/generate.ts +300 -75
- package/src/astro/index.ts +1 -1
- package/src/astro/islands.ts +1 -1
- package/src/astro/pages.ts +59 -0
- package/src/astro/templates.ts +180 -22
- package/src/cli/commands/validate.ts +1 -0
- package/src/components/content/CodeBlock.astro +28 -0
- package/src/components/content/Component.astro +65 -0
- package/src/components/content/Diff.astro +44 -0
- package/src/components/content/Tab.astro +8 -2
- package/src/components/content/diff.ts +95 -0
- package/src/components/layout/Favicon.astro +11 -4
- package/src/components/layout/PageLayout.astro +173 -0
- package/src/components/layout/ReferenceLayout.astro +6 -1
- package/src/components/layout/RootLayout.astro +9 -5
- package/src/components/layout/head-scripts.ts +19 -0
- package/src/core/data.ts +128 -0
- package/src/core/frontmatter.ts +43 -0
- package/src/core/links.ts +26 -10
- package/src/core/schema.ts +8 -0
- package/src/core/sources/filesystem.ts +1 -1
- package/src/core/sources/mdx-remote.ts +1 -2
- package/src/core/sources/mintlify.ts +1 -1
- package/src/core/sources/normalize.ts +19 -3
- package/src/core/sources/notion.ts +1 -1
- package/src/core/sources/sanity.ts +1 -1
- package/src/core/tsconfig-aliases.ts +201 -0
- package/src/index.ts +12 -0
- package/src/markdown/index.ts +69 -0
- package/src/migrate/fumadocs/config.ts +53 -4
- package/src/migrate/fumadocs/content.ts +1 -1
- package/src/migrate/fumadocs/groups.ts +230 -0
- package/src/migrate/fumadocs/index.ts +104 -19
- package/src/migrate/fumadocs/meta.ts +140 -10
- package/src/migrate/mintlify/snippets.ts +2 -1
- package/src/migrate/mintlify/transform.ts +1 -2
- package/src/migrate/nextra/index.ts +1 -1
- package/src/migrate/shared.ts +98 -1
- package/src/migrate/starlight/index.ts +1 -1
- package/src/registry/eject.ts +57 -10
- package/src/search/documents.ts +1 -2
- package/src/theme/entry.ts +29 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { UI_PACKS } from "./ui-packs/index.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Translatable UI chrome strings.
|
|
5
|
+
*
|
|
6
|
+
* The schema is the single source of truth: each field's `.default()` is the
|
|
7
|
+
* English baseline, so `EN_UI = uiStringsSchema.parse({})`. Shipped packs and
|
|
8
|
+
* user overrides merge on top (see {@link resolveUIStrings}). Grouped by surface
|
|
9
|
+
* to keep the runtime payload and component props readable.
|
|
10
|
+
*/
|
|
11
|
+
declare const uiStringsObject: z.ZodObject<{
|
|
12
|
+
actions: z.ZodDefault<z.ZodObject<{
|
|
13
|
+
addToCursor: z.ZodDefault<z.ZodString>;
|
|
14
|
+
addToVscode: z.ZodDefault<z.ZodString>;
|
|
15
|
+
askAI: z.ZodDefault<z.ZodString>;
|
|
16
|
+
connectMcp: z.ZodDefault<z.ZodString>;
|
|
17
|
+
copied: z.ZodDefault<z.ZodString>;
|
|
18
|
+
copyClaudeCode: z.ZodDefault<z.ZodString>;
|
|
19
|
+
copyMarkdown: z.ZodDefault<z.ZodString>;
|
|
20
|
+
copyServerUrl: z.ZodDefault<z.ZodString>;
|
|
21
|
+
edit: z.ZodDefault<z.ZodString>;
|
|
22
|
+
openInChat: z.ZodDefault<z.ZodString>;
|
|
23
|
+
scrollToTop: z.ZodDefault<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
addToCursor: string;
|
|
26
|
+
addToVscode: string;
|
|
27
|
+
askAI: string;
|
|
28
|
+
connectMcp: string;
|
|
29
|
+
copied: string;
|
|
30
|
+
copyClaudeCode: string;
|
|
31
|
+
copyMarkdown: string;
|
|
32
|
+
copyServerUrl: string;
|
|
33
|
+
edit: string;
|
|
34
|
+
openInChat: string;
|
|
35
|
+
scrollToTop: string;
|
|
36
|
+
}, {
|
|
37
|
+
addToCursor?: string | undefined;
|
|
38
|
+
addToVscode?: string | undefined;
|
|
39
|
+
askAI?: string | undefined;
|
|
40
|
+
connectMcp?: string | undefined;
|
|
41
|
+
copied?: string | undefined;
|
|
42
|
+
copyClaudeCode?: string | undefined;
|
|
43
|
+
copyMarkdown?: string | undefined;
|
|
44
|
+
copyServerUrl?: string | undefined;
|
|
45
|
+
edit?: string | undefined;
|
|
46
|
+
openInChat?: string | undefined;
|
|
47
|
+
scrollToTop?: string | undefined;
|
|
48
|
+
}>>;
|
|
49
|
+
ask: z.ZodDefault<z.ZodObject<{
|
|
50
|
+
empty: z.ZodDefault<z.ZodString>;
|
|
51
|
+
error: z.ZodDefault<z.ZodString>;
|
|
52
|
+
label: z.ZodDefault<z.ZodString>;
|
|
53
|
+
placeholder: z.ZodDefault<z.ZodString>;
|
|
54
|
+
send: z.ZodDefault<z.ZodString>;
|
|
55
|
+
title: z.ZodDefault<z.ZodString>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
empty: string;
|
|
58
|
+
error: string;
|
|
59
|
+
label: string;
|
|
60
|
+
placeholder: string;
|
|
61
|
+
send: string;
|
|
62
|
+
title: string;
|
|
63
|
+
}, {
|
|
64
|
+
empty?: string | undefined;
|
|
65
|
+
error?: string | undefined;
|
|
66
|
+
label?: string | undefined;
|
|
67
|
+
placeholder?: string | undefined;
|
|
68
|
+
send?: string | undefined;
|
|
69
|
+
title?: string | undefined;
|
|
70
|
+
}>>;
|
|
71
|
+
feedback: z.ZodDefault<z.ZodObject<{
|
|
72
|
+
no: z.ZodDefault<z.ZodString>;
|
|
73
|
+
question: z.ZodDefault<z.ZodString>;
|
|
74
|
+
thanks: z.ZodDefault<z.ZodString>;
|
|
75
|
+
yes: z.ZodDefault<z.ZodString>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
no: string;
|
|
78
|
+
question: string;
|
|
79
|
+
thanks: string;
|
|
80
|
+
yes: string;
|
|
81
|
+
}, {
|
|
82
|
+
no?: string | undefined;
|
|
83
|
+
question?: string | undefined;
|
|
84
|
+
thanks?: string | undefined;
|
|
85
|
+
yes?: string | undefined;
|
|
86
|
+
}>>;
|
|
87
|
+
languageSwitcher: z.ZodDefault<z.ZodObject<{
|
|
88
|
+
label: z.ZodDefault<z.ZodString>;
|
|
89
|
+
untranslated: z.ZodDefault<z.ZodString>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
label: string;
|
|
92
|
+
untranslated: string;
|
|
93
|
+
}, {
|
|
94
|
+
label?: string | undefined;
|
|
95
|
+
untranslated?: string | undefined;
|
|
96
|
+
}>>;
|
|
97
|
+
page: z.ZodDefault<z.ZodObject<{
|
|
98
|
+
lastUpdated: z.ZodDefault<z.ZodString>;
|
|
99
|
+
next: z.ZodDefault<z.ZodString>;
|
|
100
|
+
previous: z.ZodDefault<z.ZodString>;
|
|
101
|
+
skipToContent: z.ZodDefault<z.ZodString>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
lastUpdated: string;
|
|
104
|
+
next: string;
|
|
105
|
+
previous: string;
|
|
106
|
+
skipToContent: string;
|
|
107
|
+
}, {
|
|
108
|
+
lastUpdated?: string | undefined;
|
|
109
|
+
next?: string | undefined;
|
|
110
|
+
previous?: string | undefined;
|
|
111
|
+
skipToContent?: string | undefined;
|
|
112
|
+
}>>;
|
|
113
|
+
search: z.ZodDefault<z.ZodObject<{
|
|
114
|
+
allLanguages: z.ZodDefault<z.ZodString>;
|
|
115
|
+
button: z.ZodDefault<z.ZodString>;
|
|
116
|
+
devOnly: z.ZodDefault<z.ZodString>;
|
|
117
|
+
label: z.ZodDefault<z.ZodString>;
|
|
118
|
+
noResults: z.ZodDefault<z.ZodString>;
|
|
119
|
+
placeholder: z.ZodDefault<z.ZodString>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
label: string;
|
|
122
|
+
placeholder: string;
|
|
123
|
+
button: string;
|
|
124
|
+
devOnly: string;
|
|
125
|
+
noResults: string;
|
|
126
|
+
allLanguages: string;
|
|
127
|
+
}, {
|
|
128
|
+
label?: string | undefined;
|
|
129
|
+
placeholder?: string | undefined;
|
|
130
|
+
button?: string | undefined;
|
|
131
|
+
devOnly?: string | undefined;
|
|
132
|
+
noResults?: string | undefined;
|
|
133
|
+
allLanguages?: string | undefined;
|
|
134
|
+
}>>;
|
|
135
|
+
toc: z.ZodDefault<z.ZodObject<{
|
|
136
|
+
title: z.ZodDefault<z.ZodString>;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
title: string;
|
|
139
|
+
}, {
|
|
140
|
+
title?: string | undefined;
|
|
141
|
+
}>>;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
actions: {
|
|
144
|
+
addToCursor: string;
|
|
145
|
+
addToVscode: string;
|
|
146
|
+
askAI: string;
|
|
147
|
+
connectMcp: string;
|
|
148
|
+
copied: string;
|
|
149
|
+
copyClaudeCode: string;
|
|
150
|
+
copyMarkdown: string;
|
|
151
|
+
copyServerUrl: string;
|
|
152
|
+
edit: string;
|
|
153
|
+
openInChat: string;
|
|
154
|
+
scrollToTop: string;
|
|
155
|
+
};
|
|
156
|
+
ask: {
|
|
157
|
+
empty: string;
|
|
158
|
+
error: string;
|
|
159
|
+
label: string;
|
|
160
|
+
placeholder: string;
|
|
161
|
+
send: string;
|
|
162
|
+
title: string;
|
|
163
|
+
};
|
|
164
|
+
feedback: {
|
|
165
|
+
no: string;
|
|
166
|
+
question: string;
|
|
167
|
+
thanks: string;
|
|
168
|
+
yes: string;
|
|
169
|
+
};
|
|
170
|
+
languageSwitcher: {
|
|
171
|
+
label: string;
|
|
172
|
+
untranslated: string;
|
|
173
|
+
};
|
|
174
|
+
page: {
|
|
175
|
+
lastUpdated: string;
|
|
176
|
+
next: string;
|
|
177
|
+
previous: string;
|
|
178
|
+
skipToContent: string;
|
|
179
|
+
};
|
|
180
|
+
search: {
|
|
181
|
+
label: string;
|
|
182
|
+
placeholder: string;
|
|
183
|
+
button: string;
|
|
184
|
+
devOnly: string;
|
|
185
|
+
noResults: string;
|
|
186
|
+
allLanguages: string;
|
|
187
|
+
};
|
|
188
|
+
toc: {
|
|
189
|
+
title: string;
|
|
190
|
+
};
|
|
191
|
+
}, {
|
|
192
|
+
actions?: {
|
|
193
|
+
addToCursor?: string | undefined;
|
|
194
|
+
addToVscode?: string | undefined;
|
|
195
|
+
askAI?: string | undefined;
|
|
196
|
+
connectMcp?: string | undefined;
|
|
197
|
+
copied?: string | undefined;
|
|
198
|
+
copyClaudeCode?: string | undefined;
|
|
199
|
+
copyMarkdown?: string | undefined;
|
|
200
|
+
copyServerUrl?: string | undefined;
|
|
201
|
+
edit?: string | undefined;
|
|
202
|
+
openInChat?: string | undefined;
|
|
203
|
+
scrollToTop?: string | undefined;
|
|
204
|
+
} | undefined;
|
|
205
|
+
ask?: {
|
|
206
|
+
empty?: string | undefined;
|
|
207
|
+
error?: string | undefined;
|
|
208
|
+
label?: string | undefined;
|
|
209
|
+
placeholder?: string | undefined;
|
|
210
|
+
send?: string | undefined;
|
|
211
|
+
title?: string | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
feedback?: {
|
|
214
|
+
no?: string | undefined;
|
|
215
|
+
question?: string | undefined;
|
|
216
|
+
thanks?: string | undefined;
|
|
217
|
+
yes?: string | undefined;
|
|
218
|
+
} | undefined;
|
|
219
|
+
languageSwitcher?: {
|
|
220
|
+
label?: string | undefined;
|
|
221
|
+
untranslated?: string | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
page?: {
|
|
224
|
+
lastUpdated?: string | undefined;
|
|
225
|
+
next?: string | undefined;
|
|
226
|
+
previous?: string | undefined;
|
|
227
|
+
skipToContent?: string | undefined;
|
|
228
|
+
} | undefined;
|
|
229
|
+
search?: {
|
|
230
|
+
label?: string | undefined;
|
|
231
|
+
placeholder?: string | undefined;
|
|
232
|
+
button?: string | undefined;
|
|
233
|
+
devOnly?: string | undefined;
|
|
234
|
+
noResults?: string | undefined;
|
|
235
|
+
allLanguages?: string | undefined;
|
|
236
|
+
} | undefined;
|
|
237
|
+
toc?: {
|
|
238
|
+
title?: string | undefined;
|
|
239
|
+
} | undefined;
|
|
240
|
+
}>;
|
|
241
|
+
export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
|
|
242
|
+
actions: z.ZodDefault<z.ZodObject<{
|
|
243
|
+
addToCursor: z.ZodDefault<z.ZodString>;
|
|
244
|
+
addToVscode: z.ZodDefault<z.ZodString>;
|
|
245
|
+
askAI: z.ZodDefault<z.ZodString>;
|
|
246
|
+
connectMcp: z.ZodDefault<z.ZodString>;
|
|
247
|
+
copied: z.ZodDefault<z.ZodString>;
|
|
248
|
+
copyClaudeCode: z.ZodDefault<z.ZodString>;
|
|
249
|
+
copyMarkdown: z.ZodDefault<z.ZodString>;
|
|
250
|
+
copyServerUrl: z.ZodDefault<z.ZodString>;
|
|
251
|
+
edit: z.ZodDefault<z.ZodString>;
|
|
252
|
+
openInChat: z.ZodDefault<z.ZodString>;
|
|
253
|
+
scrollToTop: z.ZodDefault<z.ZodString>;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
addToCursor: string;
|
|
256
|
+
addToVscode: string;
|
|
257
|
+
askAI: string;
|
|
258
|
+
connectMcp: string;
|
|
259
|
+
copied: string;
|
|
260
|
+
copyClaudeCode: string;
|
|
261
|
+
copyMarkdown: string;
|
|
262
|
+
copyServerUrl: string;
|
|
263
|
+
edit: string;
|
|
264
|
+
openInChat: string;
|
|
265
|
+
scrollToTop: string;
|
|
266
|
+
}, {
|
|
267
|
+
addToCursor?: string | undefined;
|
|
268
|
+
addToVscode?: string | undefined;
|
|
269
|
+
askAI?: string | undefined;
|
|
270
|
+
connectMcp?: string | undefined;
|
|
271
|
+
copied?: string | undefined;
|
|
272
|
+
copyClaudeCode?: string | undefined;
|
|
273
|
+
copyMarkdown?: string | undefined;
|
|
274
|
+
copyServerUrl?: string | undefined;
|
|
275
|
+
edit?: string | undefined;
|
|
276
|
+
openInChat?: string | undefined;
|
|
277
|
+
scrollToTop?: string | undefined;
|
|
278
|
+
}>>;
|
|
279
|
+
ask: z.ZodDefault<z.ZodObject<{
|
|
280
|
+
empty: z.ZodDefault<z.ZodString>;
|
|
281
|
+
error: z.ZodDefault<z.ZodString>;
|
|
282
|
+
label: z.ZodDefault<z.ZodString>;
|
|
283
|
+
placeholder: z.ZodDefault<z.ZodString>;
|
|
284
|
+
send: z.ZodDefault<z.ZodString>;
|
|
285
|
+
title: z.ZodDefault<z.ZodString>;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
empty: string;
|
|
288
|
+
error: string;
|
|
289
|
+
label: string;
|
|
290
|
+
placeholder: string;
|
|
291
|
+
send: string;
|
|
292
|
+
title: string;
|
|
293
|
+
}, {
|
|
294
|
+
empty?: string | undefined;
|
|
295
|
+
error?: string | undefined;
|
|
296
|
+
label?: string | undefined;
|
|
297
|
+
placeholder?: string | undefined;
|
|
298
|
+
send?: string | undefined;
|
|
299
|
+
title?: string | undefined;
|
|
300
|
+
}>>;
|
|
301
|
+
feedback: z.ZodDefault<z.ZodObject<{
|
|
302
|
+
no: z.ZodDefault<z.ZodString>;
|
|
303
|
+
question: z.ZodDefault<z.ZodString>;
|
|
304
|
+
thanks: z.ZodDefault<z.ZodString>;
|
|
305
|
+
yes: z.ZodDefault<z.ZodString>;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
no: string;
|
|
308
|
+
question: string;
|
|
309
|
+
thanks: string;
|
|
310
|
+
yes: string;
|
|
311
|
+
}, {
|
|
312
|
+
no?: string | undefined;
|
|
313
|
+
question?: string | undefined;
|
|
314
|
+
thanks?: string | undefined;
|
|
315
|
+
yes?: string | undefined;
|
|
316
|
+
}>>;
|
|
317
|
+
languageSwitcher: z.ZodDefault<z.ZodObject<{
|
|
318
|
+
label: z.ZodDefault<z.ZodString>;
|
|
319
|
+
untranslated: z.ZodDefault<z.ZodString>;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
label: string;
|
|
322
|
+
untranslated: string;
|
|
323
|
+
}, {
|
|
324
|
+
label?: string | undefined;
|
|
325
|
+
untranslated?: string | undefined;
|
|
326
|
+
}>>;
|
|
327
|
+
page: z.ZodDefault<z.ZodObject<{
|
|
328
|
+
lastUpdated: z.ZodDefault<z.ZodString>;
|
|
329
|
+
next: z.ZodDefault<z.ZodString>;
|
|
330
|
+
previous: z.ZodDefault<z.ZodString>;
|
|
331
|
+
skipToContent: z.ZodDefault<z.ZodString>;
|
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
|
333
|
+
lastUpdated: string;
|
|
334
|
+
next: string;
|
|
335
|
+
previous: string;
|
|
336
|
+
skipToContent: string;
|
|
337
|
+
}, {
|
|
338
|
+
lastUpdated?: string | undefined;
|
|
339
|
+
next?: string | undefined;
|
|
340
|
+
previous?: string | undefined;
|
|
341
|
+
skipToContent?: string | undefined;
|
|
342
|
+
}>>;
|
|
343
|
+
search: z.ZodDefault<z.ZodObject<{
|
|
344
|
+
allLanguages: z.ZodDefault<z.ZodString>;
|
|
345
|
+
button: z.ZodDefault<z.ZodString>;
|
|
346
|
+
devOnly: z.ZodDefault<z.ZodString>;
|
|
347
|
+
label: z.ZodDefault<z.ZodString>;
|
|
348
|
+
noResults: z.ZodDefault<z.ZodString>;
|
|
349
|
+
placeholder: z.ZodDefault<z.ZodString>;
|
|
350
|
+
}, "strip", z.ZodTypeAny, {
|
|
351
|
+
label: string;
|
|
352
|
+
placeholder: string;
|
|
353
|
+
button: string;
|
|
354
|
+
devOnly: string;
|
|
355
|
+
noResults: string;
|
|
356
|
+
allLanguages: string;
|
|
357
|
+
}, {
|
|
358
|
+
label?: string | undefined;
|
|
359
|
+
placeholder?: string | undefined;
|
|
360
|
+
button?: string | undefined;
|
|
361
|
+
devOnly?: string | undefined;
|
|
362
|
+
noResults?: string | undefined;
|
|
363
|
+
allLanguages?: string | undefined;
|
|
364
|
+
}>>;
|
|
365
|
+
toc: z.ZodDefault<z.ZodObject<{
|
|
366
|
+
title: z.ZodDefault<z.ZodString>;
|
|
367
|
+
}, "strip", z.ZodTypeAny, {
|
|
368
|
+
title: string;
|
|
369
|
+
}, {
|
|
370
|
+
title?: string | undefined;
|
|
371
|
+
}>>;
|
|
372
|
+
}, "strip", z.ZodTypeAny, {
|
|
373
|
+
actions: {
|
|
374
|
+
addToCursor: string;
|
|
375
|
+
addToVscode: string;
|
|
376
|
+
askAI: string;
|
|
377
|
+
connectMcp: string;
|
|
378
|
+
copied: string;
|
|
379
|
+
copyClaudeCode: string;
|
|
380
|
+
copyMarkdown: string;
|
|
381
|
+
copyServerUrl: string;
|
|
382
|
+
edit: string;
|
|
383
|
+
openInChat: string;
|
|
384
|
+
scrollToTop: string;
|
|
385
|
+
};
|
|
386
|
+
ask: {
|
|
387
|
+
empty: string;
|
|
388
|
+
error: string;
|
|
389
|
+
label: string;
|
|
390
|
+
placeholder: string;
|
|
391
|
+
send: string;
|
|
392
|
+
title: string;
|
|
393
|
+
};
|
|
394
|
+
feedback: {
|
|
395
|
+
no: string;
|
|
396
|
+
question: string;
|
|
397
|
+
thanks: string;
|
|
398
|
+
yes: string;
|
|
399
|
+
};
|
|
400
|
+
languageSwitcher: {
|
|
401
|
+
label: string;
|
|
402
|
+
untranslated: string;
|
|
403
|
+
};
|
|
404
|
+
page: {
|
|
405
|
+
lastUpdated: string;
|
|
406
|
+
next: string;
|
|
407
|
+
previous: string;
|
|
408
|
+
skipToContent: string;
|
|
409
|
+
};
|
|
410
|
+
search: {
|
|
411
|
+
label: string;
|
|
412
|
+
placeholder: string;
|
|
413
|
+
button: string;
|
|
414
|
+
devOnly: string;
|
|
415
|
+
noResults: string;
|
|
416
|
+
allLanguages: string;
|
|
417
|
+
};
|
|
418
|
+
toc: {
|
|
419
|
+
title: string;
|
|
420
|
+
};
|
|
421
|
+
}, {
|
|
422
|
+
actions?: {
|
|
423
|
+
addToCursor?: string | undefined;
|
|
424
|
+
addToVscode?: string | undefined;
|
|
425
|
+
askAI?: string | undefined;
|
|
426
|
+
connectMcp?: string | undefined;
|
|
427
|
+
copied?: string | undefined;
|
|
428
|
+
copyClaudeCode?: string | undefined;
|
|
429
|
+
copyMarkdown?: string | undefined;
|
|
430
|
+
copyServerUrl?: string | undefined;
|
|
431
|
+
edit?: string | undefined;
|
|
432
|
+
openInChat?: string | undefined;
|
|
433
|
+
scrollToTop?: string | undefined;
|
|
434
|
+
} | undefined;
|
|
435
|
+
ask?: {
|
|
436
|
+
empty?: string | undefined;
|
|
437
|
+
error?: string | undefined;
|
|
438
|
+
label?: string | undefined;
|
|
439
|
+
placeholder?: string | undefined;
|
|
440
|
+
send?: string | undefined;
|
|
441
|
+
title?: string | undefined;
|
|
442
|
+
} | undefined;
|
|
443
|
+
feedback?: {
|
|
444
|
+
no?: string | undefined;
|
|
445
|
+
question?: string | undefined;
|
|
446
|
+
thanks?: string | undefined;
|
|
447
|
+
yes?: string | undefined;
|
|
448
|
+
} | undefined;
|
|
449
|
+
languageSwitcher?: {
|
|
450
|
+
label?: string | undefined;
|
|
451
|
+
untranslated?: string | undefined;
|
|
452
|
+
} | undefined;
|
|
453
|
+
page?: {
|
|
454
|
+
lastUpdated?: string | undefined;
|
|
455
|
+
next?: string | undefined;
|
|
456
|
+
previous?: string | undefined;
|
|
457
|
+
skipToContent?: string | undefined;
|
|
458
|
+
} | undefined;
|
|
459
|
+
search?: {
|
|
460
|
+
label?: string | undefined;
|
|
461
|
+
placeholder?: string | undefined;
|
|
462
|
+
button?: string | undefined;
|
|
463
|
+
devOnly?: string | undefined;
|
|
464
|
+
noResults?: string | undefined;
|
|
465
|
+
allLanguages?: string | undefined;
|
|
466
|
+
} | undefined;
|
|
467
|
+
toc?: {
|
|
468
|
+
title?: string | undefined;
|
|
469
|
+
} | undefined;
|
|
470
|
+
}>>;
|
|
471
|
+
/** A fully-resolved dictionary; every key present. */
|
|
472
|
+
export type UIStrings = z.infer<typeof uiStringsObject>;
|
|
473
|
+
/** The English baseline, derived from the schema defaults. */
|
|
474
|
+
export declare const EN_UI: UIStrings;
|
|
475
|
+
/**
|
|
476
|
+
* A partial override: `{ group: { key: "translation" } }`. Validated loosely
|
|
477
|
+
* (object of objects of strings) so packs and user config can supply only the
|
|
478
|
+
* keys they translate. Unknown groups/keys merge harmlessly.
|
|
479
|
+
*/
|
|
480
|
+
export declare const uiStringsOverrideSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
481
|
+
export type UIStringsOverride = z.infer<typeof uiStringsOverrideSchema>;
|
|
482
|
+
/** Per-locale UI overrides supplied in `i18n.ui`. */
|
|
483
|
+
export declare const uiLocaleOverridesSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
484
|
+
/**
|
|
485
|
+
* Built-in translation packs, one module per locale under {@link ./ui-packs}.
|
|
486
|
+
* English is the schema baseline (no pack); every other locale ships a starter
|
|
487
|
+
* pack so adopters get translated chrome out of the box. Re-exported here so the
|
|
488
|
+
* resolver and existing imports keep a single entry point.
|
|
489
|
+
*/
|
|
490
|
+
export { UI_PACKS };
|
|
491
|
+
/**
|
|
492
|
+
* Resolve the active dictionary for a locale. Layers, in order:
|
|
493
|
+
* English baseline ← default-locale pack ← default-locale override ←
|
|
494
|
+
* locale pack ← locale override. So a missing key falls back to the default
|
|
495
|
+
* locale's translation, then to English.
|
|
496
|
+
*/
|
|
497
|
+
export declare const resolveUIStrings: (locale: string, options: {
|
|
498
|
+
defaultLocale: string;
|
|
499
|
+
overrides?: Record<string, UIStringsOverride>;
|
|
500
|
+
}) => UIStrings;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a loader for user-authored ESM/TS modules (`blume.config.ts`,
|
|
3
|
+
* `meta.ts`). One jiti instance is reused across every file the returned loader
|
|
4
|
+
* is called with. `moduleCache: false` ensures edits are picked up on each load,
|
|
5
|
+
* which is what makes dev-server regeneration reflect config/meta changes.
|
|
6
|
+
*/
|
|
7
|
+
export declare const createModuleLoader: () => ((file: string) => Promise<unknown>);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walk up from `start` until a directory containing a `package.json` is found.
|
|
3
|
+
*
|
|
4
|
+
* Exported for testing; call sites should use {@link packageRoot}.
|
|
5
|
+
*/
|
|
6
|
+
export declare const findPackageRoot: (start: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* Absolute path to the installed Blume package root (the directory holding its
|
|
9
|
+
* `package.json`), found by walking up from this module.
|
|
10
|
+
*
|
|
11
|
+
* Anchoring here — rather than at a fixed offset from `import.meta` — keeps the
|
|
12
|
+
* package's own `src/`, assets, and `node_modules` locatable whether the code
|
|
13
|
+
* runs from source under Bun (`src/...`) or from the published, bundled CLI
|
|
14
|
+
* (`dist/cli/index.js`). The two layouts sit at different depths, so a relative
|
|
15
|
+
* `../..` resolves to different places; locating `package.json` does not.
|
|
16
|
+
*/
|
|
17
|
+
export declare const packageRoot: () => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ResolvedConfig } from "./schema.ts";
|
|
2
|
+
import type { ProjectContext } from "./types.ts";
|
|
3
|
+
/** Locate the Blume config file for a project root, if any. */
|
|
4
|
+
export declare const findConfigFile: (root: string) => string | null;
|
|
5
|
+
/**
|
|
6
|
+
* Resolve every path Blume needs from a project root and its resolved config.
|
|
7
|
+
* Paths are absolute and normalized.
|
|
8
|
+
*/
|
|
9
|
+
export declare const resolveProjectContext: (root: string, config: ResolvedConfig) => ProjectContext;
|