@clarify-labs/cli 0.10.3 → 0.11.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/output/cli.cjs +1 -1
- package/output/cli.js +1 -1
- package/output/core/config/config-schema.d.ts +191 -92
- package/output/core/config/config.d.ts +2 -1
- package/output/core/config/options.d.ts +0 -8
- package/output/core/config/user-config.d.ts +4 -3
- package/output/core/project/project-info.d.ts +3 -3
- package/output/core/runtime/ssg.d.ts +1 -1
- package/output/core/runtime/virtual-modules.d.ts +1 -1
- package/output/{engine-BDdPszs2.cjs → engine-BfkoyVNo.cjs} +193 -146
- package/output/engine-BfkoyVNo.cjs.map +1 -0
- package/output/{engine-CyFtr8Pz.js → engine-DfF5RJjC.js} +193 -146
- package/output/engine-DfF5RJjC.js.map +1 -0
- package/output/index.cjs +1 -1
- package/output/index.js +1 -1
- package/output/parsers/routes/routes.d.ts +7 -7
- package/output/parsers/routes/routes.test-utils.d.ts +2 -2
- package/output/plugins/source-links/source-links.d.ts +3 -3
- package/output/types.d.ts +63 -33
- package/package.json +3 -3
- package/output/engine-BDdPszs2.cjs.map +0 -1
- package/output/engine-CyFtr8Pz.js.map +0 -1
package/output/cli.cjs
CHANGED
package/output/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as cliPackageVersion, i as createClarifyTempDir, n as createClarifyEngine, o as cliPackageVersionWithCaret, r as createClarifyRuntimeAliases, s as createViteAdapter } from "./engine-
|
|
2
|
+
import { a as cliPackageVersion, i as createClarifyTempDir, n as createClarifyEngine, o as cliPackageVersionWithCaret, r as createClarifyRuntimeAliases, s as createViteAdapter } from "./engine-DfF5RJjC.js";
|
|
3
3
|
import { dirname, extname, isAbsolute, join, normalize, relative, resolve } from "node:path";
|
|
4
4
|
import { lstat, readFile, stat, writeFile } from "node:fs/promises";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -3,31 +3,31 @@ import { ClarifyVariableValue } from '../../types.js';
|
|
|
3
3
|
export declare const clarifyLogoConfigSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
4
4
|
light: z.ZodOptional<z.ZodString>;
|
|
5
5
|
dark: z.ZodOptional<z.ZodString>;
|
|
6
|
-
}, z.core.$
|
|
6
|
+
}, z.core.$strict>]>;
|
|
7
7
|
export declare const clarifyFaviconConfigSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
8
8
|
light: z.ZodOptional<z.ZodString>;
|
|
9
9
|
dark: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, z.core.$
|
|
10
|
+
}, z.core.$strict>]>;
|
|
11
11
|
export declare const clarifyLocalizedTextSchema: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
12
12
|
export declare const clarifyLocaleConfigSchema: z.ZodObject<{
|
|
13
13
|
code: z.ZodString;
|
|
14
14
|
label: z.ZodString;
|
|
15
15
|
dir: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ltr">, z.ZodLiteral<"rtl">]>>;
|
|
16
|
-
}, z.core.$
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export declare const clarifyLocalesConfigSchema: z.ZodObject<{
|
|
18
|
+
default: z.ZodOptional<z.ZodString>;
|
|
19
19
|
missing: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"fallback">, z.ZodLiteral<"404">, z.ZodLiteral<"hide">]>>;
|
|
20
20
|
locales: z.ZodArray<z.ZodObject<{
|
|
21
21
|
code: z.ZodString;
|
|
22
22
|
label: z.ZodString;
|
|
23
23
|
dir: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ltr">, z.ZodLiteral<"rtl">]>>;
|
|
24
|
-
}, z.core.$
|
|
25
|
-
}, z.core.$
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
26
|
export declare const clarifyNavbarLinkSchema: z.ZodObject<{
|
|
27
27
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
28
28
|
href: z.ZodString;
|
|
29
29
|
external: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
-
}, z.core.$
|
|
30
|
+
}, z.core.$strict>;
|
|
31
31
|
export declare const clarifyBannerConfigOptionsSchema: z.ZodObject<{
|
|
32
32
|
content: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
33
33
|
dismissible: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -35,24 +35,24 @@ export declare const clarifyBannerConfigOptionsSchema: z.ZodObject<{
|
|
|
35
35
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
36
36
|
href: z.ZodString;
|
|
37
37
|
external: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
}, z.core.$
|
|
38
|
+
}, z.core.$strict>>;
|
|
39
39
|
}, z.core.$strict>;
|
|
40
40
|
export declare const clarifyFooterConfigSchema: z.ZodObject<{
|
|
41
41
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
42
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
43
43
|
href: z.ZodString;
|
|
44
44
|
external: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
-
}, z.core.$
|
|
45
|
+
}, z.core.$strict>>>;
|
|
46
46
|
socials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
47
47
|
copyright: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
48
48
|
}, z.core.$strict>;
|
|
49
49
|
export declare const clarifyVariableValueSchema: z.ZodType<ClarifyVariableValue>;
|
|
50
50
|
export declare const clarifyVariablesConfigSchema: z.ZodRecord<z.ZodString, z.ZodType<ClarifyVariableValue, unknown, z.core.$ZodTypeInternals<ClarifyVariableValue, unknown>>>;
|
|
51
|
-
export declare const
|
|
52
|
-
|
|
51
|
+
export declare const clarifyRepositoryConfigSchema: z.ZodObject<{
|
|
52
|
+
url: z.ZodOptional<z.ZodString>;
|
|
53
53
|
branch: z.ZodOptional<z.ZodString>;
|
|
54
54
|
directory: z.ZodOptional<z.ZodString>;
|
|
55
|
-
}, z.core.$
|
|
55
|
+
}, z.core.$strict>;
|
|
56
56
|
export declare const clarifyPagesItemSchema: z.ZodType<import('../../types.js').ClarifyPagesItem, import('../../types.js').ClarifyPagesItem>;
|
|
57
57
|
export declare const clarifyPagesGroupSchema: z.ZodType<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup>;
|
|
58
58
|
export declare const clarifyPagesConfigSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodType<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup, z.core.$ZodTypeInternals<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup>>>, z.ZodLiteral<"FileTree">]>;
|
|
@@ -60,12 +60,12 @@ export declare const clarifyTabItemSchema: z.ZodObject<{
|
|
|
60
60
|
tab: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
61
61
|
icon: z.ZodOptional<z.ZodString>;
|
|
62
62
|
pages: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodType<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup, z.core.$ZodTypeInternals<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup>>>, z.ZodLiteral<"FileTree">]>>;
|
|
63
|
-
}, z.core.$
|
|
63
|
+
}, z.core.$strict>;
|
|
64
64
|
export declare const clarifyTabsConfigSchema: z.ZodArray<z.ZodObject<{
|
|
65
65
|
tab: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
66
66
|
icon: z.ZodOptional<z.ZodString>;
|
|
67
67
|
pages: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodType<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup, z.core.$ZodTypeInternals<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup>>>, z.ZodLiteral<"FileTree">]>>;
|
|
68
|
-
}, z.core.$
|
|
68
|
+
}, z.core.$strict>>;
|
|
69
69
|
export declare const clarifyThemePresetSchema: z.ZodEnum<{
|
|
70
70
|
default: "default";
|
|
71
71
|
base: "base";
|
|
@@ -73,96 +73,96 @@ export declare const clarifyThemePresetSchema: z.ZodEnum<{
|
|
|
73
73
|
export declare const clarifyThemeModeColorValueSchema: z.ZodObject<{
|
|
74
74
|
light: z.ZodOptional<z.ZodString>;
|
|
75
75
|
dark: z.ZodOptional<z.ZodString>;
|
|
76
|
-
}, z.core.$
|
|
76
|
+
}, z.core.$strict>;
|
|
77
77
|
export declare const clarifyThemeColorValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
78
78
|
light: z.ZodOptional<z.ZodString>;
|
|
79
79
|
dark: z.ZodOptional<z.ZodString>;
|
|
80
|
-
}, z.core.$
|
|
80
|
+
}, z.core.$strict>]>;
|
|
81
81
|
export declare const clarifyThemeColorTokensConfigSchema: z.ZodObject<{
|
|
82
82
|
primary: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
83
83
|
light: z.ZodOptional<z.ZodString>;
|
|
84
84
|
dark: z.ZodOptional<z.ZodString>;
|
|
85
|
-
}, z.core.$
|
|
85
|
+
}, z.core.$strict>]>>;
|
|
86
86
|
accent: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
87
87
|
light: z.ZodOptional<z.ZodString>;
|
|
88
88
|
dark: z.ZodOptional<z.ZodString>;
|
|
89
|
-
}, z.core.$
|
|
89
|
+
}, z.core.$strict>]>>;
|
|
90
90
|
background: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
91
91
|
light: z.ZodOptional<z.ZodString>;
|
|
92
92
|
dark: z.ZodOptional<z.ZodString>;
|
|
93
|
-
}, z.core.$
|
|
93
|
+
}, z.core.$strict>]>>;
|
|
94
94
|
foreground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
95
95
|
light: z.ZodOptional<z.ZodString>;
|
|
96
96
|
dark: z.ZodOptional<z.ZodString>;
|
|
97
|
-
}, z.core.$
|
|
97
|
+
}, z.core.$strict>]>>;
|
|
98
98
|
surface: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
99
99
|
light: z.ZodOptional<z.ZodString>;
|
|
100
100
|
dark: z.ZodOptional<z.ZodString>;
|
|
101
|
-
}, z.core.$
|
|
101
|
+
}, z.core.$strict>]>>;
|
|
102
102
|
muted: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
103
103
|
light: z.ZodOptional<z.ZodString>;
|
|
104
104
|
dark: z.ZodOptional<z.ZodString>;
|
|
105
|
-
}, z.core.$
|
|
105
|
+
}, z.core.$strict>]>>;
|
|
106
106
|
border: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
107
107
|
light: z.ZodOptional<z.ZodString>;
|
|
108
108
|
dark: z.ZodOptional<z.ZodString>;
|
|
109
|
-
}, z.core.$
|
|
109
|
+
}, z.core.$strict>]>>;
|
|
110
110
|
codeBackground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
111
111
|
light: z.ZodOptional<z.ZodString>;
|
|
112
112
|
dark: z.ZodOptional<z.ZodString>;
|
|
113
|
-
}, z.core.$
|
|
114
|
-
}, z.core.$
|
|
113
|
+
}, z.core.$strict>]>>;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
115
|
export declare const clarifyThemeRadiusTokensConfigSchema: z.ZodObject<{
|
|
116
116
|
sm: z.ZodOptional<z.ZodString>;
|
|
117
117
|
md: z.ZodOptional<z.ZodString>;
|
|
118
118
|
lg: z.ZodOptional<z.ZodString>;
|
|
119
119
|
xl: z.ZodOptional<z.ZodString>;
|
|
120
|
-
}, z.core.$
|
|
120
|
+
}, z.core.$strict>;
|
|
121
121
|
export declare const clarifyThemeTokensConfigSchema: z.ZodObject<{
|
|
122
122
|
colors: z.ZodOptional<z.ZodObject<{
|
|
123
123
|
primary: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
124
124
|
light: z.ZodOptional<z.ZodString>;
|
|
125
125
|
dark: z.ZodOptional<z.ZodString>;
|
|
126
|
-
}, z.core.$
|
|
126
|
+
}, z.core.$strict>]>>;
|
|
127
127
|
accent: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
128
128
|
light: z.ZodOptional<z.ZodString>;
|
|
129
129
|
dark: z.ZodOptional<z.ZodString>;
|
|
130
|
-
}, z.core.$
|
|
130
|
+
}, z.core.$strict>]>>;
|
|
131
131
|
background: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
132
132
|
light: z.ZodOptional<z.ZodString>;
|
|
133
133
|
dark: z.ZodOptional<z.ZodString>;
|
|
134
|
-
}, z.core.$
|
|
134
|
+
}, z.core.$strict>]>>;
|
|
135
135
|
foreground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
136
136
|
light: z.ZodOptional<z.ZodString>;
|
|
137
137
|
dark: z.ZodOptional<z.ZodString>;
|
|
138
|
-
}, z.core.$
|
|
138
|
+
}, z.core.$strict>]>>;
|
|
139
139
|
surface: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
140
140
|
light: z.ZodOptional<z.ZodString>;
|
|
141
141
|
dark: z.ZodOptional<z.ZodString>;
|
|
142
|
-
}, z.core.$
|
|
142
|
+
}, z.core.$strict>]>>;
|
|
143
143
|
muted: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
144
144
|
light: z.ZodOptional<z.ZodString>;
|
|
145
145
|
dark: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, z.core.$
|
|
146
|
+
}, z.core.$strict>]>>;
|
|
147
147
|
border: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
148
148
|
light: z.ZodOptional<z.ZodString>;
|
|
149
149
|
dark: z.ZodOptional<z.ZodString>;
|
|
150
|
-
}, z.core.$
|
|
150
|
+
}, z.core.$strict>]>>;
|
|
151
151
|
codeBackground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
152
152
|
light: z.ZodOptional<z.ZodString>;
|
|
153
153
|
dark: z.ZodOptional<z.ZodString>;
|
|
154
|
-
}, z.core.$
|
|
155
|
-
}, z.core.$
|
|
154
|
+
}, z.core.$strict>]>>;
|
|
155
|
+
}, z.core.$strict>>;
|
|
156
156
|
radius: z.ZodOptional<z.ZodObject<{
|
|
157
157
|
sm: z.ZodOptional<z.ZodString>;
|
|
158
158
|
md: z.ZodOptional<z.ZodString>;
|
|
159
159
|
lg: z.ZodOptional<z.ZodString>;
|
|
160
160
|
xl: z.ZodOptional<z.ZodString>;
|
|
161
|
-
}, z.core.$
|
|
162
|
-
}, z.core.$
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
163
|
export declare const clarifyThemeLayoutConfigSchema: z.ZodObject<{
|
|
164
164
|
maxWidth: z.ZodOptional<z.ZodString>;
|
|
165
|
-
}, z.core.$
|
|
165
|
+
}, z.core.$strict>;
|
|
166
166
|
export declare const clarifyThemeConfigSchema: z.ZodObject<{
|
|
167
167
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
168
168
|
default: "default";
|
|
@@ -173,66 +173,115 @@ export declare const clarifyThemeConfigSchema: z.ZodObject<{
|
|
|
173
173
|
primary: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
174
174
|
light: z.ZodOptional<z.ZodString>;
|
|
175
175
|
dark: z.ZodOptional<z.ZodString>;
|
|
176
|
-
}, z.core.$
|
|
176
|
+
}, z.core.$strict>]>>;
|
|
177
177
|
accent: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
178
178
|
light: z.ZodOptional<z.ZodString>;
|
|
179
179
|
dark: z.ZodOptional<z.ZodString>;
|
|
180
|
-
}, z.core.$
|
|
180
|
+
}, z.core.$strict>]>>;
|
|
181
181
|
background: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
182
182
|
light: z.ZodOptional<z.ZodString>;
|
|
183
183
|
dark: z.ZodOptional<z.ZodString>;
|
|
184
|
-
}, z.core.$
|
|
184
|
+
}, z.core.$strict>]>>;
|
|
185
185
|
foreground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
186
186
|
light: z.ZodOptional<z.ZodString>;
|
|
187
187
|
dark: z.ZodOptional<z.ZodString>;
|
|
188
|
-
}, z.core.$
|
|
188
|
+
}, z.core.$strict>]>>;
|
|
189
189
|
surface: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
190
190
|
light: z.ZodOptional<z.ZodString>;
|
|
191
191
|
dark: z.ZodOptional<z.ZodString>;
|
|
192
|
-
}, z.core.$
|
|
192
|
+
}, z.core.$strict>]>>;
|
|
193
193
|
muted: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
194
194
|
light: z.ZodOptional<z.ZodString>;
|
|
195
195
|
dark: z.ZodOptional<z.ZodString>;
|
|
196
|
-
}, z.core.$
|
|
196
|
+
}, z.core.$strict>]>>;
|
|
197
197
|
border: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
198
198
|
light: z.ZodOptional<z.ZodString>;
|
|
199
199
|
dark: z.ZodOptional<z.ZodString>;
|
|
200
|
-
}, z.core.$
|
|
200
|
+
}, z.core.$strict>]>>;
|
|
201
201
|
codeBackground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
202
202
|
light: z.ZodOptional<z.ZodString>;
|
|
203
203
|
dark: z.ZodOptional<z.ZodString>;
|
|
204
|
-
}, z.core.$
|
|
205
|
-
}, z.core.$
|
|
204
|
+
}, z.core.$strict>]>>;
|
|
205
|
+
}, z.core.$strict>>;
|
|
206
206
|
radius: z.ZodOptional<z.ZodObject<{
|
|
207
207
|
sm: z.ZodOptional<z.ZodString>;
|
|
208
208
|
md: z.ZodOptional<z.ZodString>;
|
|
209
209
|
lg: z.ZodOptional<z.ZodString>;
|
|
210
210
|
xl: z.ZodOptional<z.ZodString>;
|
|
211
|
-
}, z.core.$
|
|
212
|
-
}, z.core.$
|
|
211
|
+
}, z.core.$strict>>;
|
|
212
|
+
}, z.core.$strict>>;
|
|
213
213
|
layout: z.ZodOptional<z.ZodObject<{
|
|
214
214
|
maxWidth: z.ZodOptional<z.ZodString>;
|
|
215
|
-
}, z.core.$
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
export declare const clarifyFeaturesConfigSchema: z.ZodObject<{
|
|
218
|
+
search: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
219
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
220
|
+
provider: z.ZodDefault<z.ZodLiteral<"pagefind">>;
|
|
221
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
222
|
+
enabled: boolean;
|
|
223
|
+
} | {
|
|
224
|
+
enabled: boolean;
|
|
225
|
+
provider: "pagefind";
|
|
226
|
+
}, boolean | {
|
|
227
|
+
enabled: boolean;
|
|
228
|
+
provider: "pagefind";
|
|
229
|
+
}>>;
|
|
230
|
+
repository: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
231
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
232
|
+
url: z.ZodOptional<z.ZodString>;
|
|
233
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
234
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
236
|
+
enabled: boolean;
|
|
237
|
+
} | {
|
|
238
|
+
enabled: boolean;
|
|
239
|
+
url?: string | undefined;
|
|
240
|
+
branch?: string | undefined;
|
|
241
|
+
directory?: string | undefined;
|
|
242
|
+
}, boolean | {
|
|
243
|
+
enabled: boolean;
|
|
244
|
+
url?: string | undefined;
|
|
245
|
+
branch?: string | undefined;
|
|
246
|
+
directory?: string | undefined;
|
|
247
|
+
}>>;
|
|
248
|
+
themeEditor: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
249
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
250
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
251
|
+
enabled: boolean;
|
|
252
|
+
} | {
|
|
253
|
+
enabled: boolean;
|
|
254
|
+
}, boolean | {
|
|
255
|
+
enabled: boolean;
|
|
256
|
+
}>>;
|
|
257
|
+
openapi: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
258
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
259
|
+
playground: z.ZodDefault<z.ZodBoolean>;
|
|
260
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
261
|
+
enabled: boolean;
|
|
262
|
+
} | {
|
|
263
|
+
enabled: boolean;
|
|
264
|
+
playground: boolean;
|
|
265
|
+
}, boolean | {
|
|
266
|
+
enabled: boolean;
|
|
267
|
+
playground: boolean;
|
|
268
|
+
}>>;
|
|
269
|
+
}, z.core.$strict>;
|
|
218
270
|
export declare const clarifyProjectConfigSchema: z.ZodObject<{
|
|
219
271
|
title: z.ZodOptional<z.ZodString>;
|
|
220
272
|
description: z.ZodOptional<z.ZodString>;
|
|
221
273
|
siteUrl: z.ZodOptional<z.ZodString>;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
225
|
-
directory: z.ZodOptional<z.ZodString>;
|
|
226
|
-
}, z.core.$strip>>;
|
|
274
|
+
routePrefix: z.ZodDefault<z.ZodString>;
|
|
275
|
+
assetPrefix: z.ZodOptional<z.ZodString>;
|
|
227
276
|
logo: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
228
277
|
light: z.ZodOptional<z.ZodString>;
|
|
229
278
|
dark: z.ZodOptional<z.ZodString>;
|
|
230
|
-
}, z.core.$
|
|
279
|
+
}, z.core.$strict>]>>;
|
|
231
280
|
homeUrl: z.ZodOptional<z.ZodString>;
|
|
232
281
|
favicon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
233
282
|
light: z.ZodOptional<z.ZodString>;
|
|
234
283
|
dark: z.ZodOptional<z.ZodString>;
|
|
235
|
-
}, z.core.$
|
|
284
|
+
}, z.core.$strict>]>>;
|
|
236
285
|
theme: z.ZodOptional<z.ZodObject<{
|
|
237
286
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
238
287
|
default: "default";
|
|
@@ -243,57 +292,59 @@ export declare const clarifyProjectConfigSchema: z.ZodObject<{
|
|
|
243
292
|
primary: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
244
293
|
light: z.ZodOptional<z.ZodString>;
|
|
245
294
|
dark: z.ZodOptional<z.ZodString>;
|
|
246
|
-
}, z.core.$
|
|
295
|
+
}, z.core.$strict>]>>;
|
|
247
296
|
accent: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
248
297
|
light: z.ZodOptional<z.ZodString>;
|
|
249
298
|
dark: z.ZodOptional<z.ZodString>;
|
|
250
|
-
}, z.core.$
|
|
299
|
+
}, z.core.$strict>]>>;
|
|
251
300
|
background: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
252
301
|
light: z.ZodOptional<z.ZodString>;
|
|
253
302
|
dark: z.ZodOptional<z.ZodString>;
|
|
254
|
-
}, z.core.$
|
|
303
|
+
}, z.core.$strict>]>>;
|
|
255
304
|
foreground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
256
305
|
light: z.ZodOptional<z.ZodString>;
|
|
257
306
|
dark: z.ZodOptional<z.ZodString>;
|
|
258
|
-
}, z.core.$
|
|
307
|
+
}, z.core.$strict>]>>;
|
|
259
308
|
surface: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
260
309
|
light: z.ZodOptional<z.ZodString>;
|
|
261
310
|
dark: z.ZodOptional<z.ZodString>;
|
|
262
|
-
}, z.core.$
|
|
311
|
+
}, z.core.$strict>]>>;
|
|
263
312
|
muted: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
264
313
|
light: z.ZodOptional<z.ZodString>;
|
|
265
314
|
dark: z.ZodOptional<z.ZodString>;
|
|
266
|
-
}, z.core.$
|
|
315
|
+
}, z.core.$strict>]>>;
|
|
267
316
|
border: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
268
317
|
light: z.ZodOptional<z.ZodString>;
|
|
269
318
|
dark: z.ZodOptional<z.ZodString>;
|
|
270
|
-
}, z.core.$
|
|
319
|
+
}, z.core.$strict>]>>;
|
|
271
320
|
codeBackground: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
272
321
|
light: z.ZodOptional<z.ZodString>;
|
|
273
322
|
dark: z.ZodOptional<z.ZodString>;
|
|
274
|
-
}, z.core.$
|
|
275
|
-
}, z.core.$
|
|
323
|
+
}, z.core.$strict>]>>;
|
|
324
|
+
}, z.core.$strict>>;
|
|
276
325
|
radius: z.ZodOptional<z.ZodObject<{
|
|
277
326
|
sm: z.ZodOptional<z.ZodString>;
|
|
278
327
|
md: z.ZodOptional<z.ZodString>;
|
|
279
328
|
lg: z.ZodOptional<z.ZodString>;
|
|
280
329
|
xl: z.ZodOptional<z.ZodString>;
|
|
281
|
-
}, z.core.$
|
|
282
|
-
}, z.core.$
|
|
330
|
+
}, z.core.$strict>>;
|
|
331
|
+
}, z.core.$strict>>;
|
|
283
332
|
layout: z.ZodOptional<z.ZodObject<{
|
|
284
333
|
maxWidth: z.ZodOptional<z.ZodString>;
|
|
285
|
-
}, z.core.$
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
routePrefix: z.ZodOptional<z.ZodString>;
|
|
289
|
-
assetPrefix: z.ZodOptional<z.ZodString>;
|
|
290
|
-
navbar: z.ZodOptional<z.ZodObject<{
|
|
334
|
+
}, z.core.$strict>>;
|
|
335
|
+
}, z.core.$strict>>;
|
|
336
|
+
navigation: z.ZodOptional<z.ZodObject<{
|
|
291
337
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
292
338
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
293
339
|
href: z.ZodString;
|
|
294
340
|
external: z.ZodOptional<z.ZodBoolean>;
|
|
295
|
-
}, z.core.$
|
|
296
|
-
|
|
341
|
+
}, z.core.$strict>>>;
|
|
342
|
+
tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
343
|
+
tab: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
344
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
345
|
+
pages: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodType<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup, z.core.$ZodTypeInternals<import('../../types.js').ClarifyPagesGroup, import('../../types.js').ClarifyPagesGroup>>>, z.ZodLiteral<"FileTree">]>>;
|
|
346
|
+
}, z.core.$strict>>>;
|
|
347
|
+
}, z.core.$strict>>;
|
|
297
348
|
banner: z.ZodOptional<z.ZodObject<{
|
|
298
349
|
content: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
299
350
|
dismissible: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -301,31 +352,79 @@ export declare const clarifyProjectConfigSchema: z.ZodObject<{
|
|
|
301
352
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
302
353
|
href: z.ZodString;
|
|
303
354
|
external: z.ZodOptional<z.ZodBoolean>;
|
|
304
|
-
}, z.core.$
|
|
355
|
+
}, z.core.$strict>>;
|
|
305
356
|
}, z.core.$strict>>;
|
|
306
357
|
footer: z.ZodOptional<z.ZodObject<{
|
|
307
358
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
308
359
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
309
360
|
href: z.ZodString;
|
|
310
361
|
external: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
-
}, z.core.$
|
|
362
|
+
}, z.core.$strict>>>;
|
|
312
363
|
socials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
313
364
|
copyright: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
314
365
|
}, z.core.$strict>>;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
366
|
+
locales: z.ZodOptional<z.ZodObject<{
|
|
367
|
+
default: z.ZodOptional<z.ZodString>;
|
|
318
368
|
missing: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"fallback">, z.ZodLiteral<"404">, z.ZodLiteral<"hide">]>>;
|
|
319
369
|
locales: z.ZodArray<z.ZodObject<{
|
|
320
370
|
code: z.ZodString;
|
|
321
371
|
label: z.ZodString;
|
|
322
372
|
dir: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ltr">, z.ZodLiteral<"rtl">]>>;
|
|
323
|
-
}, z.core.$
|
|
324
|
-
}, z.core.$
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}, z.core.$
|
|
373
|
+
}, z.core.$strict>>;
|
|
374
|
+
}, z.core.$strict>>;
|
|
375
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<ClarifyVariableValue, unknown, z.core.$ZodTypeInternals<ClarifyVariableValue, unknown>>>>;
|
|
376
|
+
features: z.ZodOptional<z.ZodObject<{
|
|
377
|
+
search: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
378
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
379
|
+
provider: z.ZodDefault<z.ZodLiteral<"pagefind">>;
|
|
380
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
381
|
+
enabled: boolean;
|
|
382
|
+
} | {
|
|
383
|
+
enabled: boolean;
|
|
384
|
+
provider: "pagefind";
|
|
385
|
+
}, boolean | {
|
|
386
|
+
enabled: boolean;
|
|
387
|
+
provider: "pagefind";
|
|
388
|
+
}>>;
|
|
389
|
+
repository: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
390
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
391
|
+
url: z.ZodOptional<z.ZodString>;
|
|
392
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
393
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
394
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
395
|
+
enabled: boolean;
|
|
396
|
+
} | {
|
|
397
|
+
enabled: boolean;
|
|
398
|
+
url?: string | undefined;
|
|
399
|
+
branch?: string | undefined;
|
|
400
|
+
directory?: string | undefined;
|
|
401
|
+
}, boolean | {
|
|
402
|
+
enabled: boolean;
|
|
403
|
+
url?: string | undefined;
|
|
404
|
+
branch?: string | undefined;
|
|
405
|
+
directory?: string | undefined;
|
|
406
|
+
}>>;
|
|
407
|
+
themeEditor: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
408
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
409
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
410
|
+
enabled: boolean;
|
|
411
|
+
} | {
|
|
412
|
+
enabled: boolean;
|
|
413
|
+
}, boolean | {
|
|
414
|
+
enabled: boolean;
|
|
415
|
+
}>>;
|
|
416
|
+
openapi: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodDefault<z.ZodObject<{
|
|
417
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
418
|
+
playground: z.ZodDefault<z.ZodBoolean>;
|
|
419
|
+
}, z.core.$strict>>]>>, z.ZodTransform<{
|
|
420
|
+
enabled: boolean;
|
|
421
|
+
} | {
|
|
422
|
+
enabled: boolean;
|
|
423
|
+
playground: boolean;
|
|
424
|
+
}, boolean | {
|
|
425
|
+
enabled: boolean;
|
|
426
|
+
playground: boolean;
|
|
427
|
+
}>>;
|
|
428
|
+
}, z.core.$strict>>;
|
|
429
|
+
}, z.core.$strict>;
|
|
331
430
|
export type ClarifyProjectConfigInput = z.input<typeof clarifyProjectConfigSchema>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { ClarifyProjectConfig, ResolvedProjectConfig } from '../../types.js';
|
|
1
|
+
import { ClarifyFeaturesConfig, ClarifyProjectConfig, ResolvedClarifyFeaturesConfig, ResolvedProjectConfig } from '../../types.js';
|
|
2
2
|
export declare function validateProjectConfig(value: unknown): ClarifyProjectConfig;
|
|
3
|
+
export declare function resolveFeaturesConfig(features?: ClarifyFeaturesConfig): ResolvedClarifyFeaturesConfig;
|
|
3
4
|
export declare function resolveProjectConfig(config?: ClarifyProjectConfig): ResolvedProjectConfig;
|
|
@@ -6,11 +6,6 @@ export type ClarifyBuildOptions = ClarifyProjectConfig & {
|
|
|
6
6
|
rootDirectory?: string;
|
|
7
7
|
/** Output directory for the built docs site. When omitted, Vite's build.outDir is used. */
|
|
8
8
|
outputDirectory?: string;
|
|
9
|
-
/** Static generation behavior. */
|
|
10
|
-
ssg?: {
|
|
11
|
-
/** Fail the build when SSG fails. Default: true. */
|
|
12
|
-
failOnError?: boolean;
|
|
13
|
-
};
|
|
14
9
|
/** Clarify plugin extensions for translation, search, and other build-time features. */
|
|
15
10
|
plugins?: ClarifyPlugin[];
|
|
16
11
|
};
|
|
@@ -18,8 +13,5 @@ export type ResolvedBuildOptions = {
|
|
|
18
13
|
projectRoot: string;
|
|
19
14
|
rootDirectory: string;
|
|
20
15
|
outputDirectory?: string;
|
|
21
|
-
ssg: {
|
|
22
|
-
failOnError: boolean;
|
|
23
|
-
};
|
|
24
16
|
};
|
|
25
17
|
export declare function resolveBuildOptions(options?: ClarifyBuildOptions): ResolvedBuildOptions;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ConfigEnv } from 'vite';
|
|
2
|
-
import { ClarifyProjectConfig } from '../../types.js';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { ClarifyProjectConfig, ClarifyPlugin } from '../../types.js';
|
|
3
|
+
export type ClarifyConfig = ClarifyProjectConfig & {
|
|
4
|
+
plugins?: ClarifyPlugin[];
|
|
5
|
+
};
|
|
5
6
|
export declare function defineConfig(config: ClarifyConfig): ClarifyConfig;
|
|
6
7
|
/**
|
|
7
8
|
* Config filenames Clarify CLI looks for at the project root, in resolution
|
|
@@ -11,7 +11,7 @@ import { ClarifyProjectContext } from '../../types.js';
|
|
|
11
11
|
* - `contentRoot`: the resolved content root directory name (relative to
|
|
12
12
|
* the project root, e.g. `"source"`).
|
|
13
13
|
* - `projectRoot`: the absolute project root path.
|
|
14
|
-
* - `
|
|
14
|
+
* - `locales`: locale information when localization is configured.
|
|
15
15
|
*/
|
|
16
16
|
export declare const CLARIFY_DEV_PROJECT_INFO_ENDPOINT = "/dev/project-info";
|
|
17
17
|
/**
|
|
@@ -26,8 +26,8 @@ export type ProjectInfoResponse = {
|
|
|
26
26
|
contentFileExtensions: readonly string[];
|
|
27
27
|
contentRoot: string;
|
|
28
28
|
projectRoot: string;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
locales?: {
|
|
30
|
+
default: string;
|
|
31
31
|
locales: string[];
|
|
32
32
|
};
|
|
33
33
|
};
|
|
@@ -7,4 +7,4 @@ export declare function routeOutputFiles(outputDirectory: string, route: Content
|
|
|
7
7
|
export declare const SSR_ENTRY_CODE = "import { renderToHTML } from '@clarify-labs/renderer/server';\nimport { routes, navigation } from 'virtual:clarify/routes/server';\nimport { config } from 'virtual:clarify/config';\nimport { openApiSpecs } from 'virtual:clarify/openapi/server';\nimport { runtimeSlots } from 'virtual:clarify/slots';\n\nexport async function render(url) {\n // Pre-resolve every slot component factory so renderToString can use\n // them synchronously (renderToString has no Suspense support).\n const entries = Object.values(runtimeSlots).flat()\n await Promise.all(entries.map(async (entry) => {\n const mod = await entry.loadComponent()\n entry._resolved = mod.default\n }))\n return renderToHTML({ config, routes, navigation, openApiSpecs, runtimeSlots, url, themeEditor: config.theme.editor });\n}";
|
|
8
8
|
export declare function createTempEntryFile(content: string): string;
|
|
9
9
|
export declare function buildSSRBundle(root: string, ssrEntry: string, ssrOutDir: string, plugins: Plugin[]): Promise<void>;
|
|
10
|
-
export declare function renderSSGRoutes(routes: ContentRoute[], contextOrConfig: ClarifyProjectContext | ResolvedProjectConfig, outputDirectory: string, ssrBundlePath: string
|
|
10
|
+
export declare function renderSSGRoutes(routes: ContentRoute[], contextOrConfig: ClarifyProjectContext | ResolvedProjectConfig, outputDirectory: string, ssrBundlePath: string): Promise<void>;
|
|
@@ -31,7 +31,7 @@ export declare function stripVirtualPrefix(id: string): string;
|
|
|
31
31
|
* if the ID is not a Clarify virtual module.
|
|
32
32
|
*/
|
|
33
33
|
export declare function resolveVirtualModuleId(id: string, modules: VirtualModules, routes: readonly ContentRoute[]): string | null;
|
|
34
|
-
export declare function generateConfigModule(projectConfig: ResolvedProjectConfig,
|
|
34
|
+
export declare function generateConfigModule(projectConfig: ResolvedProjectConfig, version?: string): string;
|
|
35
35
|
export declare function generateRoutesModule(routes: ContentRoute[], navigation: NavigationTree, mode?: 'client' | 'server'): string;
|
|
36
36
|
export declare function createClientEntryModule(options?: CreateClientEntryModuleOptions): string;
|
|
37
37
|
/**
|