vize 0.90.0 → 0.91.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/dist/{config-CTXni-Py.d.mts → config-XMCb6V8W.d.mts} +224 -215
- package/dist/config-XMCb6V8W.d.mts.map +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +80 -50
- package/dist/config.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/package.json +10 -9
- package/pkl/CompilerConfig.pkl +37 -0
- package/pkl/FormatterConfig.pkl +67 -0
- package/pkl/GlobalTypesConfig.pkl +15 -0
- package/pkl/LanguageServerConfig.pkl +70 -0
- package/pkl/LinterConfig.pkl +17 -0
- package/pkl/LspConfig.pkl +6 -0
- package/pkl/MuseaConfig.pkl +38 -0
- package/pkl/PklProject +16 -0
- package/pkl/PklProject.deps.json +19 -0
- package/pkl/TypeCheckerConfig.pkl +43 -0
- package/pkl/VitePluginConfig.pkl +20 -0
- package/pkl/VizeConfig.pkl +55 -0
- package/pkl/jsonschema/generate.pkl +622 -0
- package/pkl/vize.pkl +12 -1
- package/schemas/vize.config.schema.json +375 -126
- package/src/config.ts +120 -51
- package/src/index.ts +1 -0
- package/src/types/generated.ts +472 -0
- package/src/types/index.ts +19 -10
- package/src/types/rules.ts +1 -1
- package/src/types/{loader.ts → runtime.ts} +15 -20
- package/dist/config-CTXni-Py.d.mts.map +0 -1
- package/src/types/compiler.ts +0 -121
- package/src/types/core.ts +0 -83
- package/src/types/musea.ts +0 -108
- package/src/types/tools.ts +0 -266
package/src/types/core.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { CompilerConfig } from "./compiler.js";
|
|
2
|
-
import type { VitePluginConfig } from "./compiler.js";
|
|
3
|
-
import type { LinterConfig, TypeCheckerConfig, FormatterConfig, LspConfig } from "./tools.js";
|
|
4
|
-
import type { MuseaConfig } from "./musea.js";
|
|
5
|
-
import type { GlobalTypesConfig } from "./loader.js";
|
|
6
|
-
|
|
7
|
-
// ============================================================================
|
|
8
|
-
// Dynamic config support
|
|
9
|
-
// ============================================================================
|
|
10
|
-
|
|
11
|
-
export type MaybePromise<T> = T | Promise<T>;
|
|
12
|
-
|
|
13
|
-
export interface ConfigEnv {
|
|
14
|
-
mode: string;
|
|
15
|
-
command: "serve" | "build" | "check" | "lint" | "fmt";
|
|
16
|
-
isSsrBuild?: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type UserConfigExport = VizeConfig | ((env: ConfigEnv) => MaybePromise<VizeConfig>);
|
|
20
|
-
|
|
21
|
-
// ============================================================================
|
|
22
|
-
// Rule severity
|
|
23
|
-
// ============================================================================
|
|
24
|
-
|
|
25
|
-
export type RuleSeverity = "off" | "warn" | "error";
|
|
26
|
-
|
|
27
|
-
export type RuleCategory = "correctness" | "suspicious" | "style" | "perf" | "a11y" | "security";
|
|
28
|
-
|
|
29
|
-
export type LintPreset = "happy-path" | "opinionated" | "essential" | "nuxt";
|
|
30
|
-
|
|
31
|
-
// ============================================================================
|
|
32
|
-
// VizeConfig
|
|
33
|
-
// ============================================================================
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Vize configuration options
|
|
37
|
-
*/
|
|
38
|
-
export interface VizeConfig {
|
|
39
|
-
/**
|
|
40
|
-
* JSON Schema reference for editor autocompletion.
|
|
41
|
-
*/
|
|
42
|
-
$schema?: string;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Vue compiler options
|
|
46
|
-
*/
|
|
47
|
-
compiler?: CompilerConfig;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Vite plugin options
|
|
51
|
-
*/
|
|
52
|
-
vite?: VitePluginConfig;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Linter options
|
|
56
|
-
*/
|
|
57
|
-
linter?: LinterConfig;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Type checker options
|
|
61
|
-
*/
|
|
62
|
-
typeChecker?: TypeCheckerConfig;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Formatter options
|
|
66
|
-
*/
|
|
67
|
-
formatter?: FormatterConfig;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* LSP options
|
|
71
|
-
*/
|
|
72
|
-
lsp?: LspConfig;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Musea component gallery options
|
|
76
|
-
*/
|
|
77
|
-
musea?: MuseaConfig;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Global type declarations
|
|
81
|
-
*/
|
|
82
|
-
globalTypes?: GlobalTypesConfig;
|
|
83
|
-
}
|
package/src/types/musea.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// MuseaConfig
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* VRT (Visual Regression Testing) configuration for Musea
|
|
7
|
-
*/
|
|
8
|
-
export interface MuseaVrtConfig {
|
|
9
|
-
/**
|
|
10
|
-
* Threshold for pixel comparison (0-1)
|
|
11
|
-
* @default 0.1
|
|
12
|
-
*/
|
|
13
|
-
threshold?: number;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Output directory for screenshots
|
|
17
|
-
* @default '__musea_snapshots__'
|
|
18
|
-
*/
|
|
19
|
-
outDir?: string;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Viewport sizes
|
|
23
|
-
*/
|
|
24
|
-
viewports?: Array<{ width: number; height: number; name?: string }>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* A11y configuration for Musea
|
|
29
|
-
*/
|
|
30
|
-
export interface MuseaA11yConfig {
|
|
31
|
-
/**
|
|
32
|
-
* Enable a11y checking
|
|
33
|
-
* @default false
|
|
34
|
-
*/
|
|
35
|
-
enabled?: boolean;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Axe-core rules to enable/disable
|
|
39
|
-
*/
|
|
40
|
-
rules?: Record<string, boolean>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Autogen configuration for Musea
|
|
45
|
-
*/
|
|
46
|
-
export interface MuseaAutogenConfig {
|
|
47
|
-
/**
|
|
48
|
-
* Enable auto-generation of variants
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
enabled?: boolean;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Max variants to generate per component
|
|
55
|
-
* @default 10
|
|
56
|
-
*/
|
|
57
|
-
maxVariants?: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Musea component gallery configuration
|
|
62
|
-
*/
|
|
63
|
-
export interface MuseaConfig {
|
|
64
|
-
/**
|
|
65
|
-
* Glob patterns for art files
|
|
66
|
-
* @default ['**\/*.art.vue']
|
|
67
|
-
*/
|
|
68
|
-
include?: string[];
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Glob patterns to exclude
|
|
72
|
-
* @default ['node_modules/**', 'dist/**']
|
|
73
|
-
*/
|
|
74
|
-
exclude?: string[];
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Base path for gallery
|
|
78
|
-
* @default '/__musea__'
|
|
79
|
-
*/
|
|
80
|
-
basePath?: string;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Enable Storybook compatibility
|
|
84
|
-
* @default false
|
|
85
|
-
*/
|
|
86
|
-
storybookCompat?: boolean;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Enable inline art detection in .vue files
|
|
90
|
-
* @default false
|
|
91
|
-
*/
|
|
92
|
-
inlineArt?: boolean;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* VRT configuration
|
|
96
|
-
*/
|
|
97
|
-
vrt?: MuseaVrtConfig;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* A11y configuration
|
|
101
|
-
*/
|
|
102
|
-
a11y?: MuseaA11yConfig;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Autogen configuration
|
|
106
|
-
*/
|
|
107
|
-
autogen?: MuseaAutogenConfig;
|
|
108
|
-
}
|
package/src/types/tools.ts
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import type { LintPreset, RuleSeverity, RuleCategory } from "./core.js";
|
|
2
|
-
import type { LintRulesConfig } from "./rules.js";
|
|
3
|
-
|
|
4
|
-
// ============================================================================
|
|
5
|
-
// LinterConfig
|
|
6
|
-
// ============================================================================
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Linter configuration
|
|
10
|
-
*/
|
|
11
|
-
export interface LinterConfig {
|
|
12
|
-
/**
|
|
13
|
-
* Enable linting
|
|
14
|
-
*/
|
|
15
|
-
enabled?: boolean;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Built-in lint preset
|
|
19
|
-
* @default 'happy-path'
|
|
20
|
-
*/
|
|
21
|
-
preset?: LintPreset;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Rules to enable/disable
|
|
25
|
-
*/
|
|
26
|
-
rules?: LintRulesConfig;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Category-level severity overrides
|
|
30
|
-
*/
|
|
31
|
-
categories?: Partial<Record<RuleCategory, RuleSeverity>>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// ============================================================================
|
|
35
|
-
// TypeCheckerConfig
|
|
36
|
-
// ============================================================================
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Type checker configuration
|
|
40
|
-
*/
|
|
41
|
-
export interface TypeCheckerConfig {
|
|
42
|
-
/**
|
|
43
|
-
* Enable type checking
|
|
44
|
-
* @default false
|
|
45
|
-
*/
|
|
46
|
-
enabled?: boolean;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Enable strict mode
|
|
50
|
-
* @default false
|
|
51
|
-
*/
|
|
52
|
-
strict?: boolean;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Check component props
|
|
56
|
-
* @default true
|
|
57
|
-
*/
|
|
58
|
-
checkProps?: boolean;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Check component emits
|
|
62
|
-
* @default true
|
|
63
|
-
*/
|
|
64
|
-
checkEmits?: boolean;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Check template bindings
|
|
68
|
-
* @default true
|
|
69
|
-
*/
|
|
70
|
-
checkTemplateBindings?: boolean;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Path to tsconfig.json
|
|
74
|
-
* @default auto-detected
|
|
75
|
-
*/
|
|
76
|
-
tsconfig?: string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Path to the Corsa binary
|
|
80
|
-
*/
|
|
81
|
-
corsaPath?: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// ============================================================================
|
|
85
|
-
// FormatterConfig
|
|
86
|
-
// ============================================================================
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Formatter configuration
|
|
90
|
-
*/
|
|
91
|
-
export interface FormatterConfig {
|
|
92
|
-
/**
|
|
93
|
-
* Max line width
|
|
94
|
-
* @default 80
|
|
95
|
-
*/
|
|
96
|
-
printWidth?: number;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Indentation width
|
|
100
|
-
* @default 2
|
|
101
|
-
*/
|
|
102
|
-
tabWidth?: number;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Use tabs for indentation
|
|
106
|
-
* @default false
|
|
107
|
-
*/
|
|
108
|
-
useTabs?: boolean;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Print semicolons
|
|
112
|
-
* @default true
|
|
113
|
-
*/
|
|
114
|
-
semi?: boolean;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Use single quotes
|
|
118
|
-
* @default false
|
|
119
|
-
*/
|
|
120
|
-
singleQuote?: boolean;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Trailing commas
|
|
124
|
-
* @default 'all'
|
|
125
|
-
*/
|
|
126
|
-
trailingComma?: "all" | "none" | "es5";
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// ============================================================================
|
|
130
|
-
// LspConfig
|
|
131
|
-
// ============================================================================
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* LSP configuration
|
|
135
|
-
*/
|
|
136
|
-
export interface LspConfig {
|
|
137
|
-
/**
|
|
138
|
-
* Enable LSP
|
|
139
|
-
* @default false
|
|
140
|
-
*/
|
|
141
|
-
enabled?: boolean;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Enable linter diagnostics.
|
|
145
|
-
* Prefer this over `diagnostics` for new configs.
|
|
146
|
-
* @default false
|
|
147
|
-
*/
|
|
148
|
-
lint?: boolean;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Enable linter diagnostics.
|
|
152
|
-
* @deprecated Use `lint` instead.
|
|
153
|
-
* @default false
|
|
154
|
-
*/
|
|
155
|
-
diagnostics?: boolean;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Enable type checking diagnostics and type-aware LSP features.
|
|
159
|
-
* @default false
|
|
160
|
-
*/
|
|
161
|
-
typecheck?: boolean;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Enable the editor assistance bundle: completion, hover, navigation,
|
|
165
|
-
* symbols, rename, code lens, semantic tokens, links, folding, inlay hints,
|
|
166
|
-
* and file rename handling. Formatting stays separately opt-in.
|
|
167
|
-
* @default false
|
|
168
|
-
*/
|
|
169
|
-
editor?: boolean;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Enable completions.
|
|
173
|
-
* @default false
|
|
174
|
-
*/
|
|
175
|
-
completion?: boolean;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Enable hover information
|
|
179
|
-
* @default false
|
|
180
|
-
*/
|
|
181
|
-
hover?: boolean;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Enable go-to-definition
|
|
185
|
-
* @default false
|
|
186
|
-
*/
|
|
187
|
-
definition?: boolean;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Enable find references
|
|
191
|
-
* @default false
|
|
192
|
-
*/
|
|
193
|
-
references?: boolean;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Enable document symbols
|
|
197
|
-
* @default false
|
|
198
|
-
*/
|
|
199
|
-
documentSymbols?: boolean;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Enable workspace symbols
|
|
203
|
-
* @default false
|
|
204
|
-
*/
|
|
205
|
-
workspaceSymbols?: boolean;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Enable formatting via LSP
|
|
209
|
-
* @default false
|
|
210
|
-
*/
|
|
211
|
-
formatting?: boolean;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Enable code actions
|
|
215
|
-
* @default false
|
|
216
|
-
*/
|
|
217
|
-
codeActions?: boolean;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Enable rename
|
|
221
|
-
* @default false
|
|
222
|
-
*/
|
|
223
|
-
rename?: boolean;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Enable code lens
|
|
227
|
-
* @default false
|
|
228
|
-
*/
|
|
229
|
-
codeLens?: boolean;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Enable semantic tokens
|
|
233
|
-
* @default false
|
|
234
|
-
*/
|
|
235
|
-
semanticTokens?: boolean;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Enable document links
|
|
239
|
-
* @default false
|
|
240
|
-
*/
|
|
241
|
-
documentLinks?: boolean;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Enable folding ranges
|
|
245
|
-
* @default false
|
|
246
|
-
*/
|
|
247
|
-
foldingRanges?: boolean;
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Enable inlay hints
|
|
251
|
-
* @default false
|
|
252
|
-
*/
|
|
253
|
-
inlayHints?: boolean;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Enable file rename edits
|
|
257
|
-
* @default false
|
|
258
|
-
*/
|
|
259
|
-
fileRename?: boolean;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Use Corsa for type checking in LSP
|
|
263
|
-
* @default false
|
|
264
|
-
*/
|
|
265
|
-
corsa?: boolean;
|
|
266
|
-
}
|