vize 0.89.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 +11 -10
- 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
|
@@ -1,110 +1,98 @@
|
|
|
1
|
-
//#region src/types/
|
|
1
|
+
//#region src/types/generated.d.ts
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
type LintPreset = "happy-path" | "opinionated" | "essential" | "incremental" | "nuxt";
|
|
8
|
+
type RuleSeverity = "off" | "warn" | "error";
|
|
9
|
+
type RuleCategory = "correctness" | "suspicious" | "style" | "perf" | "a11y" | "security";
|
|
10
|
+
/**
|
|
11
|
+
* Configuration file for vize - High-performance Vue.js toolchain
|
|
12
|
+
*/
|
|
13
|
+
interface VizeConfig {
|
|
14
|
+
compiler?: CompilerConfig;
|
|
15
|
+
vite?: VitePluginConfig;
|
|
16
|
+
linter?: LinterConfig;
|
|
17
|
+
typeChecker?: TypeCheckerConfig;
|
|
18
|
+
formatter?: FormatterConfig;
|
|
19
|
+
languageServer?: LanguageServerConfig;
|
|
20
|
+
lsp?: LanguageServerConfig;
|
|
21
|
+
musea?: MuseaConfig;
|
|
22
|
+
globalTypes?: GlobalTypesConfig;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Vue compiler options
|
|
4
26
|
*/
|
|
5
27
|
interface CompilerConfig {
|
|
6
28
|
/**
|
|
7
29
|
* Compilation mode
|
|
8
|
-
* @default 'module'
|
|
9
30
|
*/
|
|
10
31
|
mode?: "module" | "function";
|
|
11
32
|
/**
|
|
12
33
|
* Enable Vapor mode compilation
|
|
13
|
-
* @default false
|
|
14
34
|
*/
|
|
15
35
|
vapor?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Treat lowercase non-HTML tags as custom renderer elements instead of Vue components.
|
|
18
|
-
* Useful for TresJS and other custom renderers.
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
customRenderer?: boolean;
|
|
22
36
|
/**
|
|
23
37
|
* Enable SSR mode
|
|
24
|
-
* @default false
|
|
25
38
|
*/
|
|
26
39
|
ssr?: boolean;
|
|
27
40
|
/**
|
|
28
41
|
* Enable source map generation
|
|
29
|
-
* @default true in development, false in production
|
|
30
42
|
*/
|
|
31
43
|
sourceMap?: boolean;
|
|
32
44
|
/**
|
|
33
45
|
* Prefix template identifiers with _ctx
|
|
34
|
-
* @default false
|
|
35
46
|
*/
|
|
36
47
|
prefixIdentifiers?: boolean;
|
|
37
48
|
/**
|
|
38
49
|
* Hoist static nodes
|
|
39
|
-
* @default true
|
|
40
50
|
*/
|
|
41
51
|
hoistStatic?: boolean;
|
|
42
52
|
/**
|
|
43
53
|
* Cache v-on handlers
|
|
44
|
-
* @default true
|
|
45
54
|
*/
|
|
46
55
|
cacheHandlers?: boolean;
|
|
47
56
|
/**
|
|
48
57
|
* Enable TypeScript parsing in <script> blocks
|
|
49
|
-
* @default true
|
|
50
58
|
*/
|
|
51
59
|
isTs?: boolean;
|
|
52
60
|
/**
|
|
53
61
|
* Script file extension for generated output
|
|
54
|
-
* @default 'ts'
|
|
55
62
|
*/
|
|
56
63
|
scriptExt?: "ts" | "js";
|
|
57
64
|
/**
|
|
58
65
|
* Module name for runtime imports
|
|
59
|
-
* @default 'vue'
|
|
60
66
|
*/
|
|
61
67
|
runtimeModuleName?: string;
|
|
62
68
|
/**
|
|
63
69
|
* Global variable name for runtime (IIFE builds)
|
|
64
|
-
* @default 'Vue'
|
|
65
70
|
*/
|
|
66
71
|
runtimeGlobalName?: string;
|
|
67
72
|
}
|
|
68
73
|
/**
|
|
69
|
-
* Vite plugin
|
|
74
|
+
* Vite plugin options
|
|
70
75
|
*/
|
|
71
76
|
interface VitePluginConfig {
|
|
72
77
|
/**
|
|
73
|
-
* Files to include in compilation
|
|
74
|
-
* @default /\.vue$/
|
|
78
|
+
* Files to include in compilation (glob patterns or strings)
|
|
75
79
|
*/
|
|
76
80
|
include?: string | RegExp | (string | RegExp)[];
|
|
77
81
|
/**
|
|
78
|
-
* Files to exclude from compilation
|
|
79
|
-
* @default /node_modules/
|
|
82
|
+
* Files to exclude from compilation (glob patterns or strings)
|
|
80
83
|
*/
|
|
81
84
|
exclude?: string | RegExp | (string | RegExp)[];
|
|
82
85
|
/**
|
|
83
86
|
* Glob patterns to scan for .vue files during pre-compilation
|
|
84
|
-
* @default ['**\/*.vue']
|
|
85
87
|
*/
|
|
86
88
|
scanPatterns?: string[];
|
|
87
|
-
/**
|
|
88
|
-
* Maximum number of Vue files to compile in a single native batch during
|
|
89
|
-
* pre-compilation. Lower values reduce peak V8 heap usage in large apps.
|
|
90
|
-
* @default 128
|
|
91
|
-
*/
|
|
92
|
-
precompileBatchSize?: number;
|
|
93
89
|
/**
|
|
94
90
|
* Glob patterns to ignore during pre-compilation
|
|
95
|
-
* @default ['node_modules/**', 'dist/**', '.git/**', '.nuxt/**', '.output/**', '.nitro/**', 'coverage/**']
|
|
96
91
|
*/
|
|
97
92
|
ignorePatterns?: string[];
|
|
98
93
|
}
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/types/rules.d.ts
|
|
101
|
-
declare const LINT_RULE_NAMES: readonly ["a11y/alt-text", "a11y/anchor-has-content", "a11y/anchor-is-valid", "a11y/aria-props", "a11y/aria-role", "a11y/aria-unsupported-elements", "a11y/click-events-have-key-events", "a11y/form-control-has-label", "a11y/heading-has-content", "a11y/heading-levels", "a11y/iframe-has-title", "a11y/img-alt", "a11y/interactive-supports-focus", "a11y/label-has-for", "a11y/landmark-roles", "a11y/media-has-caption", "a11y/mouse-events-have-key-events", "a11y/no-access-key", "a11y/no-aria-hidden-on-focusable", "a11y/no-autofocus", "a11y/no-distracting-elements", "a11y/no-i-for-icon", "a11y/no-redundant-roles", "a11y/no-refer-to-non-existent-id", "a11y/no-role-presentation-on-focusable", "a11y/no-static-element-interactions", "a11y/placeholder-label-option", "a11y/role-has-required-aria-props", "a11y/tabindex-no-positive", "a11y/use-list", "html/deprecated-attr", "html/deprecated-element", "html/id-duplication", "html/no-consecutive-br", "html/no-duplicate-dt", "html/no-empty-palpable-content", "html/require-datetime", "script/no-get-current-instance", "script/no-next-tick", "script/no-options-api", "ssr/no-browser-globals-in-ssr", "ssr/no-hydration-mismatch", "type/no-floating-promises", "type/no-reactivity-loss", "type/no-unsafe-template-binding", "type/require-typed-emits", "type/require-typed-props", "vapor/no-inline-template", "vapor/no-vue-lifecycle-events", "vapor/prefer-static-class", "vapor/require-vapor-attribute", "vue/attribute-hyphenation", "vue/attribute-order", "vue/component-definition-name-casing", "vue/component-name-in-template-casing", "vue/html-quotes", "vue/html-self-closing", "vue/multi-word-component-names", "vue/mustache-interpolation-spacing", "vue/no-boolean-attr-value", "vue/no-child-content", "vue/no-dupe-v-else-if", "vue/no-duplicate-attributes", "vue/no-inline-style", "vue/no-lone-template", "vue/no-multi-spaces", "vue/no-mutating-props", "vue/no-preprocessor-lang", "vue/no-reserved-component-names", "vue/no-script-non-standard-lang", "vue/no-src-attribute", "vue/no-template-key", "vue/no-template-lang", "vue/no-template-shadow", "vue/no-textarea-mustache", "vue/no-unsafe-url", "vue/no-unused-components", "vue/no-unused-properties", "vue/no-unused-vars", "vue/no-use-v-if-with-v-for", "vue/no-useless-template-attributes", "vue/no-v-html", "vue/no-v-text-v-html-on-component", "vue/permitted-contents", "vue/prefer-props-shorthand", "vue/prop-name-casing", "vue/require-component-is", "vue/require-component-registration", "vue/require-scoped-style", "vue/require-v-for-key", "vue/scoped-event-names", "vue/sfc-element-order", "vue/single-style-block", "vue/use-unique-element-ids", "vue/use-v-on-exact", "vue/v-bind-style", "vue/v-on-style", "vue/v-slot-style", "vue/valid-attribute-name", "vue/valid-v-bind", "vue/valid-v-else", "vue/valid-v-for", "vue/valid-v-if", "vue/valid-v-memo", "vue/valid-v-model", "vue/valid-v-on", "vue/valid-v-show", "vue/valid-v-slot", "vue/warn-custom-block", "vue/warn-custom-directive"];
|
|
102
|
-
type LintRuleName = (typeof LINT_RULE_NAMES)[number];
|
|
103
|
-
type LintRulesConfig = Partial<Record<LintRuleName, RuleSeverity>>;
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/types/tools.d.ts
|
|
106
94
|
/**
|
|
107
|
-
* Linter
|
|
95
|
+
* Linter options
|
|
108
96
|
*/
|
|
109
97
|
interface LinterConfig {
|
|
110
98
|
/**
|
|
@@ -113,304 +101,358 @@ interface LinterConfig {
|
|
|
113
101
|
enabled?: boolean;
|
|
114
102
|
/**
|
|
115
103
|
* Built-in lint preset
|
|
116
|
-
* @default 'happy-path'
|
|
117
104
|
*/
|
|
118
|
-
preset?:
|
|
105
|
+
preset?: "happy-path" | "opinionated" | "essential" | "incremental" | "nuxt";
|
|
119
106
|
/**
|
|
120
107
|
* Rules to enable/disable
|
|
121
108
|
*/
|
|
122
|
-
rules?:
|
|
109
|
+
rules?: {
|
|
110
|
+
[k: string]: "off" | "warn" | "error";
|
|
111
|
+
};
|
|
123
112
|
/**
|
|
124
113
|
* Category-level severity overrides
|
|
125
114
|
*/
|
|
126
|
-
categories?:
|
|
115
|
+
categories?: {
|
|
116
|
+
correctness?: "off" | "warn" | "error";
|
|
117
|
+
suspicious?: "off" | "warn" | "error";
|
|
118
|
+
style?: "off" | "warn" | "error";
|
|
119
|
+
perf?: "off" | "warn" | "error";
|
|
120
|
+
a11y?: "off" | "warn" | "error";
|
|
121
|
+
security?: "off" | "warn" | "error";
|
|
122
|
+
};
|
|
127
123
|
}
|
|
128
124
|
/**
|
|
129
|
-
* Type checker
|
|
125
|
+
* Type checker options
|
|
130
126
|
*/
|
|
131
127
|
interface TypeCheckerConfig {
|
|
132
128
|
/**
|
|
133
129
|
* Enable type checking
|
|
134
|
-
* @default false
|
|
135
130
|
*/
|
|
136
131
|
enabled?: boolean;
|
|
137
132
|
/**
|
|
138
133
|
* Enable strict mode
|
|
139
|
-
* @default false
|
|
140
134
|
*/
|
|
141
135
|
strict?: boolean;
|
|
142
136
|
/**
|
|
143
137
|
* Check component props
|
|
144
|
-
* @default true
|
|
145
138
|
*/
|
|
146
139
|
checkProps?: boolean;
|
|
147
140
|
/**
|
|
148
141
|
* Check component emits
|
|
149
|
-
* @default true
|
|
150
142
|
*/
|
|
151
143
|
checkEmits?: boolean;
|
|
152
144
|
/**
|
|
153
145
|
* Check template bindings
|
|
154
|
-
* @default true
|
|
155
146
|
*/
|
|
156
147
|
checkTemplateBindings?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Check reactivity loss patterns
|
|
150
|
+
*/
|
|
151
|
+
checkReactivity?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Check setup context violations
|
|
154
|
+
*/
|
|
155
|
+
checkSetupContext?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Check invalid exports in <script setup>
|
|
158
|
+
*/
|
|
159
|
+
checkInvalidExports?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Check fallthrough attrs on multi-root templates
|
|
162
|
+
*/
|
|
163
|
+
checkFallthroughAttrs?: boolean;
|
|
157
164
|
/**
|
|
158
165
|
* Path to tsconfig.json
|
|
159
|
-
* @default auto-detected
|
|
160
166
|
*/
|
|
161
167
|
tsconfig?: string;
|
|
162
168
|
/**
|
|
163
|
-
* Path to
|
|
169
|
+
* Path to tsgo binary
|
|
164
170
|
*/
|
|
165
|
-
|
|
171
|
+
tsgoPath?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Path to a .d.ts file that declares template globals
|
|
174
|
+
*/
|
|
175
|
+
globalsFile?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Number of parallel Corsa servers to use
|
|
178
|
+
*/
|
|
179
|
+
servers?: number;
|
|
166
180
|
}
|
|
167
181
|
/**
|
|
168
|
-
* Formatter
|
|
182
|
+
* Formatter options
|
|
169
183
|
*/
|
|
170
184
|
interface FormatterConfig {
|
|
171
185
|
/**
|
|
172
186
|
* Max line width
|
|
173
|
-
* @default 80
|
|
174
187
|
*/
|
|
175
188
|
printWidth?: number;
|
|
176
189
|
/**
|
|
177
190
|
* Indentation width
|
|
178
|
-
* @default 2
|
|
179
191
|
*/
|
|
180
192
|
tabWidth?: number;
|
|
181
193
|
/**
|
|
182
194
|
* Use tabs for indentation
|
|
183
|
-
* @default false
|
|
184
195
|
*/
|
|
185
196
|
useTabs?: boolean;
|
|
186
197
|
/**
|
|
187
198
|
* Print semicolons
|
|
188
|
-
* @default true
|
|
189
199
|
*/
|
|
190
200
|
semi?: boolean;
|
|
191
201
|
/**
|
|
192
202
|
* Use single quotes
|
|
193
|
-
* @default false
|
|
194
203
|
*/
|
|
195
204
|
singleQuote?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Use single quotes in JSX
|
|
207
|
+
*/
|
|
208
|
+
jsxSingleQuote?: boolean;
|
|
196
209
|
/**
|
|
197
210
|
* Trailing commas
|
|
198
|
-
* @default 'all'
|
|
199
211
|
*/
|
|
200
212
|
trailingComma?: "all" | "none" | "es5";
|
|
213
|
+
/**
|
|
214
|
+
* Print spaces between brackets in object literals
|
|
215
|
+
*/
|
|
216
|
+
bracketSpacing?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Keep > on the last line of multiline tags
|
|
219
|
+
*/
|
|
220
|
+
bracketSameLine?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Arrow parens mode
|
|
223
|
+
*/
|
|
224
|
+
arrowParens?: "always" | "avoid";
|
|
225
|
+
/**
|
|
226
|
+
* End-of-line mode
|
|
227
|
+
*/
|
|
228
|
+
endOfLine?: "lf" | "crlf" | "cr" | "auto";
|
|
229
|
+
/**
|
|
230
|
+
* Object property quoting mode
|
|
231
|
+
*/
|
|
232
|
+
quoteProps?: "as-needed" | "consistent" | "preserve";
|
|
233
|
+
/**
|
|
234
|
+
* Force one attribute per line
|
|
235
|
+
*/
|
|
236
|
+
singleAttributePerLine?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Indent script and style blocks
|
|
239
|
+
*/
|
|
240
|
+
vueIndentScriptAndStyle?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Sort attributes
|
|
243
|
+
*/
|
|
244
|
+
sortAttributes?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Attribute ordering strategy
|
|
247
|
+
*/
|
|
248
|
+
attributeSortOrder?: "alphabetical" | "as-written";
|
|
249
|
+
/**
|
|
250
|
+
* Merge bind and non-bind attrs for sorting
|
|
251
|
+
*/
|
|
252
|
+
mergeBindAndNonBindAttrs?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Maximum attributes per line before wrapping
|
|
255
|
+
*/
|
|
256
|
+
maxAttributesPerLine?: number;
|
|
257
|
+
/**
|
|
258
|
+
* Custom attribute groups
|
|
259
|
+
*/
|
|
260
|
+
attributeGroups?: string[][];
|
|
261
|
+
/**
|
|
262
|
+
* Normalize directive shorthands
|
|
263
|
+
*/
|
|
264
|
+
normalizeDirectiveShorthands?: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Sort SFC blocks in canonical order
|
|
267
|
+
*/
|
|
268
|
+
sortBlocks?: boolean;
|
|
201
269
|
}
|
|
202
270
|
/**
|
|
203
|
-
*
|
|
271
|
+
* Language server options
|
|
204
272
|
*/
|
|
205
|
-
interface
|
|
273
|
+
interface LanguageServerConfig {
|
|
206
274
|
/**
|
|
207
|
-
* Enable
|
|
208
|
-
* @default false
|
|
275
|
+
* Enable the language server
|
|
209
276
|
*/
|
|
210
277
|
enabled?: boolean;
|
|
211
278
|
/**
|
|
212
|
-
* Enable
|
|
213
|
-
* Prefer this over `diagnostics` for new configs.
|
|
214
|
-
* @default false
|
|
279
|
+
* Enable lint diagnostics
|
|
215
280
|
*/
|
|
216
281
|
lint?: boolean;
|
|
217
282
|
/**
|
|
218
|
-
*
|
|
219
|
-
* @deprecated Use `lint` instead.
|
|
220
|
-
* @default false
|
|
283
|
+
* Deprecated alias for lint
|
|
221
284
|
*/
|
|
222
285
|
diagnostics?: boolean;
|
|
223
286
|
/**
|
|
224
|
-
* Enable type checking diagnostics
|
|
225
|
-
* @default false
|
|
287
|
+
* Enable project type checking diagnostics
|
|
226
288
|
*/
|
|
227
289
|
typecheck?: boolean;
|
|
228
290
|
/**
|
|
229
|
-
* Enable
|
|
230
|
-
* symbols, rename, code lens, semantic tokens, links, folding, inlay hints,
|
|
231
|
-
* and file rename handling. Formatting stays separately opt-in.
|
|
232
|
-
* @default false
|
|
291
|
+
* Enable editor-oriented IDE features
|
|
233
292
|
*/
|
|
234
293
|
editor?: boolean;
|
|
235
294
|
/**
|
|
236
|
-
* Enable completions
|
|
237
|
-
* @default false
|
|
295
|
+
* Enable completions
|
|
238
296
|
*/
|
|
239
297
|
completion?: boolean;
|
|
240
298
|
/**
|
|
241
299
|
* Enable hover information
|
|
242
|
-
* @default false
|
|
243
300
|
*/
|
|
244
301
|
hover?: boolean;
|
|
245
302
|
/**
|
|
246
303
|
* Enable go-to-definition
|
|
247
|
-
* @default false
|
|
248
304
|
*/
|
|
249
305
|
definition?: boolean;
|
|
250
306
|
/**
|
|
251
|
-
* Enable
|
|
252
|
-
* @default false
|
|
307
|
+
* Enable reference search
|
|
253
308
|
*/
|
|
254
309
|
references?: boolean;
|
|
255
310
|
/**
|
|
256
311
|
* Enable document symbols
|
|
257
|
-
* @default false
|
|
258
312
|
*/
|
|
259
313
|
documentSymbols?: boolean;
|
|
260
314
|
/**
|
|
261
315
|
* Enable workspace symbols
|
|
262
|
-
* @default false
|
|
263
316
|
*/
|
|
264
317
|
workspaceSymbols?: boolean;
|
|
265
318
|
/**
|
|
266
|
-
* Enable formatting via
|
|
267
|
-
* @default false
|
|
319
|
+
* Enable formatting via the language server
|
|
268
320
|
*/
|
|
269
321
|
formatting?: boolean;
|
|
270
322
|
/**
|
|
271
323
|
* Enable code actions
|
|
272
|
-
* @default false
|
|
273
324
|
*/
|
|
274
325
|
codeActions?: boolean;
|
|
275
326
|
/**
|
|
276
|
-
* Enable rename
|
|
277
|
-
* @default false
|
|
327
|
+
* Enable rename support
|
|
278
328
|
*/
|
|
279
329
|
rename?: boolean;
|
|
280
330
|
/**
|
|
281
|
-
* Enable code
|
|
282
|
-
* @default false
|
|
331
|
+
* Enable code lenses
|
|
283
332
|
*/
|
|
284
333
|
codeLens?: boolean;
|
|
285
334
|
/**
|
|
286
335
|
* Enable semantic tokens
|
|
287
|
-
* @default false
|
|
288
336
|
*/
|
|
289
337
|
semanticTokens?: boolean;
|
|
290
338
|
/**
|
|
291
339
|
* Enable document links
|
|
292
|
-
* @default false
|
|
293
340
|
*/
|
|
294
341
|
documentLinks?: boolean;
|
|
295
342
|
/**
|
|
296
343
|
* Enable folding ranges
|
|
297
|
-
* @default false
|
|
298
344
|
*/
|
|
299
345
|
foldingRanges?: boolean;
|
|
300
346
|
/**
|
|
301
347
|
* Enable inlay hints
|
|
302
|
-
* @default false
|
|
303
348
|
*/
|
|
304
349
|
inlayHints?: boolean;
|
|
305
350
|
/**
|
|
306
351
|
* Enable file rename edits
|
|
307
|
-
* @default false
|
|
308
352
|
*/
|
|
309
353
|
fileRename?: boolean;
|
|
310
354
|
/**
|
|
311
|
-
*
|
|
312
|
-
* @default false
|
|
355
|
+
* Enable Corsa-backed IDE features
|
|
313
356
|
*/
|
|
314
357
|
corsa?: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Deprecated alias for corsa
|
|
360
|
+
*/
|
|
361
|
+
tsgo?: boolean;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Musea component gallery options
|
|
365
|
+
*/
|
|
366
|
+
interface MuseaConfig {
|
|
367
|
+
/**
|
|
368
|
+
* Glob patterns for art files
|
|
369
|
+
*/
|
|
370
|
+
include?: string[];
|
|
371
|
+
/**
|
|
372
|
+
* Glob patterns to exclude
|
|
373
|
+
*/
|
|
374
|
+
exclude?: string[];
|
|
375
|
+
/**
|
|
376
|
+
* Base path for gallery
|
|
377
|
+
*/
|
|
378
|
+
basePath?: string;
|
|
379
|
+
/**
|
|
380
|
+
* Enable Storybook compatibility
|
|
381
|
+
*/
|
|
382
|
+
storybookCompat?: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Enable inline art detection in .vue files
|
|
385
|
+
*/
|
|
386
|
+
inlineArt?: boolean;
|
|
387
|
+
vrt?: MuseaVrtConfig;
|
|
388
|
+
a11y?: MuseaA11yConfig;
|
|
389
|
+
autogen?: MuseaAutogenConfig;
|
|
315
390
|
}
|
|
316
|
-
//#endregion
|
|
317
|
-
//#region src/types/musea.d.ts
|
|
318
391
|
/**
|
|
319
|
-
* VRT (Visual Regression Testing) configuration
|
|
392
|
+
* VRT (Visual Regression Testing) configuration
|
|
320
393
|
*/
|
|
321
394
|
interface MuseaVrtConfig {
|
|
322
395
|
/**
|
|
323
396
|
* Threshold for pixel comparison (0-1)
|
|
324
|
-
* @default 0.1
|
|
325
397
|
*/
|
|
326
398
|
threshold?: number;
|
|
327
399
|
/**
|
|
328
400
|
* Output directory for screenshots
|
|
329
|
-
* @default '__musea_snapshots__'
|
|
330
401
|
*/
|
|
331
402
|
outDir?: string;
|
|
332
403
|
/**
|
|
333
404
|
* Viewport sizes
|
|
334
405
|
*/
|
|
335
|
-
viewports?:
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
406
|
+
viewports?: MuseaViewport[];
|
|
407
|
+
}
|
|
408
|
+
interface MuseaViewport {
|
|
409
|
+
/**
|
|
410
|
+
* Viewport width
|
|
411
|
+
*/
|
|
412
|
+
width: number;
|
|
413
|
+
/**
|
|
414
|
+
* Viewport height
|
|
415
|
+
*/
|
|
416
|
+
height: number;
|
|
417
|
+
/**
|
|
418
|
+
* Viewport name
|
|
419
|
+
*/
|
|
420
|
+
name?: string;
|
|
340
421
|
}
|
|
341
422
|
/**
|
|
342
|
-
* A11y configuration
|
|
423
|
+
* A11y configuration
|
|
343
424
|
*/
|
|
344
425
|
interface MuseaA11yConfig {
|
|
345
426
|
/**
|
|
346
427
|
* Enable a11y checking
|
|
347
|
-
* @default false
|
|
348
428
|
*/
|
|
349
429
|
enabled?: boolean;
|
|
350
430
|
/**
|
|
351
431
|
* Axe-core rules to enable/disable
|
|
352
432
|
*/
|
|
353
|
-
rules?:
|
|
433
|
+
rules?: {
|
|
434
|
+
[k: string]: boolean;
|
|
435
|
+
};
|
|
354
436
|
}
|
|
355
437
|
/**
|
|
356
|
-
* Autogen configuration
|
|
438
|
+
* Autogen configuration
|
|
357
439
|
*/
|
|
358
440
|
interface MuseaAutogenConfig {
|
|
359
441
|
/**
|
|
360
442
|
* Enable auto-generation of variants
|
|
361
|
-
* @default false
|
|
362
443
|
*/
|
|
363
444
|
enabled?: boolean;
|
|
364
445
|
/**
|
|
365
446
|
* Max variants to generate per component
|
|
366
|
-
* @default 10
|
|
367
447
|
*/
|
|
368
448
|
maxVariants?: number;
|
|
369
449
|
}
|
|
370
450
|
/**
|
|
371
|
-
*
|
|
451
|
+
* Global type declarations
|
|
372
452
|
*/
|
|
373
|
-
interface
|
|
374
|
-
|
|
375
|
-
* Glob patterns for art files
|
|
376
|
-
* @default ['**\/*.art.vue']
|
|
377
|
-
*/
|
|
378
|
-
include?: string[];
|
|
379
|
-
/**
|
|
380
|
-
* Glob patterns to exclude
|
|
381
|
-
* @default ['node_modules/**', 'dist/**']
|
|
382
|
-
*/
|
|
383
|
-
exclude?: string[];
|
|
384
|
-
/**
|
|
385
|
-
* Base path for gallery
|
|
386
|
-
* @default '/__musea__'
|
|
387
|
-
*/
|
|
388
|
-
basePath?: string;
|
|
389
|
-
/**
|
|
390
|
-
* Enable Storybook compatibility
|
|
391
|
-
* @default false
|
|
392
|
-
*/
|
|
393
|
-
storybookCompat?: boolean;
|
|
394
|
-
/**
|
|
395
|
-
* Enable inline art detection in .vue files
|
|
396
|
-
* @default false
|
|
397
|
-
*/
|
|
398
|
-
inlineArt?: boolean;
|
|
399
|
-
/**
|
|
400
|
-
* VRT configuration
|
|
401
|
-
*/
|
|
402
|
-
vrt?: MuseaVrtConfig;
|
|
403
|
-
/**
|
|
404
|
-
* A11y configuration
|
|
405
|
-
*/
|
|
406
|
-
a11y?: MuseaA11yConfig;
|
|
407
|
-
/**
|
|
408
|
-
* Autogen configuration
|
|
409
|
-
*/
|
|
410
|
-
autogen?: MuseaAutogenConfig;
|
|
453
|
+
interface GlobalTypesConfig {
|
|
454
|
+
[k: string]: string | GlobalTypeDeclaration;
|
|
411
455
|
}
|
|
412
|
-
//#endregion
|
|
413
|
-
//#region src/types/loader.d.ts
|
|
414
456
|
/**
|
|
415
457
|
* Global type declaration
|
|
416
458
|
*/
|
|
@@ -424,13 +466,27 @@ interface GlobalTypeDeclaration {
|
|
|
424
466
|
*/
|
|
425
467
|
defaultValue?: string;
|
|
426
468
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
type
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
469
|
+
//#endregion
|
|
470
|
+
//#region src/types/rules.d.ts
|
|
471
|
+
declare const LINT_RULE_NAMES: readonly ["a11y/alt-text", "a11y/anchor-has-content", "a11y/anchor-is-valid", "a11y/aria-props", "a11y/aria-role", "a11y/aria-unsupported-elements", "a11y/click-events-have-key-events", "a11y/form-control-has-label", "a11y/heading-has-content", "a11y/heading-levels", "a11y/iframe-has-title", "a11y/img-alt", "a11y/interactive-supports-focus", "a11y/label-has-for", "a11y/landmark-roles", "a11y/media-has-caption", "a11y/mouse-events-have-key-events", "a11y/no-access-key", "a11y/no-aria-hidden-on-focusable", "a11y/no-autofocus", "a11y/no-distracting-elements", "a11y/no-i-for-icon", "a11y/no-redundant-roles", "a11y/no-refer-to-non-existent-id", "a11y/no-role-presentation-on-focusable", "a11y/no-static-element-interactions", "a11y/placeholder-label-option", "a11y/role-has-required-aria-props", "a11y/tabindex-no-positive", "a11y/use-list", "html/deprecated-attr", "html/deprecated-element", "html/id-duplication", "html/no-consecutive-br", "html/no-duplicate-dt", "html/no-empty-palpable-content", "html/require-datetime", "script/no-get-current-instance", "script/no-next-tick", "script/no-options-api", "ssr/no-browser-globals-in-ssr", "ssr/no-hydration-mismatch", "type/no-floating-promises", "type/no-reactivity-loss", "type/no-unsafe-template-binding", "type/require-typed-emits", "type/require-typed-props", "vapor/no-inline-template", "vapor/no-vue-lifecycle-events", "vapor/prefer-static-class", "vapor/require-vapor-attribute", "vue/attribute-hyphenation", "vue/attribute-order", "vue/component-definition-name-casing", "vue/component-name-in-template-casing", "vue/html-quotes", "vue/html-self-closing", "vue/multi-word-component-names", "vue/mustache-interpolation-spacing", "vue/no-boolean-attr-value", "vue/no-child-content", "vue/no-dupe-v-else-if", "vue/no-duplicate-attributes", "vue/no-inline-style", "vue/no-lone-template", "vue/no-multi-spaces", "vue/no-mutating-props", "vue/no-preprocessor-lang", "vue/no-reserved-component-names", "vue/no-script-non-standard-lang", "vue/no-src-attribute", "vue/no-template-key", "vue/no-template-lang", "vue/no-template-shadow", "vue/no-textarea-mustache", "vue/no-unsafe-url", "vue/no-unused-components", "vue/no-unused-properties", "vue/no-unused-vars", "vue/no-use-v-if-with-v-for", "vue/no-useless-template-attributes", "vue/no-v-html", "vue/no-v-text-v-html-on-component", "vue/permitted-contents", "vue/prefer-props-shorthand", "vue/prop-name-casing", "vue/require-component-is", "vue/require-component-registration", "vue/require-scoped-style", "vue/require-v-for-key", "vue/scoped-event-names", "vue/sfc-element-order", "vue/single-style-block", "vue/use-unique-element-ids", "vue/use-v-on-exact", "vue/v-bind-style", "vue/v-on-style", "vue/v-slot-style", "vue/valid-attribute-name", "vue/valid-v-bind", "vue/valid-v-else", "vue/valid-v-for", "vue/valid-v-if", "vue/valid-v-memo", "vue/valid-v-model", "vue/valid-v-on", "vue/valid-v-show", "vue/valid-v-slot", "vue/warn-custom-block", "vue/warn-custom-directive"];
|
|
472
|
+
type LintRuleName = (typeof LINT_RULE_NAMES)[number];
|
|
473
|
+
type LintRulesConfig = Partial<Record<LintRuleName, RuleSeverity>>;
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region src/types/runtime.d.ts
|
|
476
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
477
|
+
interface ConfigEnv {
|
|
478
|
+
mode: string;
|
|
479
|
+
command: "serve" | "build" | "check" | "lint" | "fmt";
|
|
480
|
+
isSsrBuild?: boolean;
|
|
481
|
+
}
|
|
482
|
+
type UserConfig = VizeConfig & {
|
|
483
|
+
/**
|
|
484
|
+
* Legacy alias for `languageServer`.
|
|
485
|
+
* Prefer `languageServer`.
|
|
486
|
+
*/
|
|
487
|
+
lsp?: LanguageServerConfig;
|
|
488
|
+
};
|
|
489
|
+
type UserConfigExport = UserConfig | ((env: ConfigEnv) => MaybePromise<UserConfig>);
|
|
434
490
|
interface LoadConfigOptions {
|
|
435
491
|
/**
|
|
436
492
|
* Config file search mode
|
|
@@ -450,61 +506,14 @@ interface LoadConfigOptions {
|
|
|
450
506
|
env?: ConfigEnv;
|
|
451
507
|
}
|
|
452
508
|
//#endregion
|
|
453
|
-
//#region src/types/
|
|
454
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
455
|
-
interface ConfigEnv {
|
|
456
|
-
mode: string;
|
|
457
|
-
command: "serve" | "build" | "check" | "lint" | "fmt";
|
|
458
|
-
isSsrBuild?: boolean;
|
|
459
|
-
}
|
|
460
|
-
type UserConfigExport = VizeConfig | ((env: ConfigEnv) => MaybePromise<VizeConfig>);
|
|
461
|
-
type RuleSeverity = "off" | "warn" | "error";
|
|
462
|
-
type RuleCategory = "correctness" | "suspicious" | "style" | "perf" | "a11y" | "security";
|
|
463
|
-
type LintPreset = "happy-path" | "opinionated" | "essential" | "nuxt";
|
|
509
|
+
//#region src/types/index.d.ts
|
|
464
510
|
/**
|
|
465
|
-
*
|
|
511
|
+
* @deprecated Use `LanguageServerConfig`.
|
|
466
512
|
*/
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* JSON Schema reference for editor autocompletion.
|
|
470
|
-
*/
|
|
471
|
-
$schema?: string;
|
|
472
|
-
/**
|
|
473
|
-
* Vue compiler options
|
|
474
|
-
*/
|
|
475
|
-
compiler?: CompilerConfig;
|
|
476
|
-
/**
|
|
477
|
-
* Vite plugin options
|
|
478
|
-
*/
|
|
479
|
-
vite?: VitePluginConfig;
|
|
480
|
-
/**
|
|
481
|
-
* Linter options
|
|
482
|
-
*/
|
|
483
|
-
linter?: LinterConfig;
|
|
484
|
-
/**
|
|
485
|
-
* Type checker options
|
|
486
|
-
*/
|
|
487
|
-
typeChecker?: TypeCheckerConfig;
|
|
488
|
-
/**
|
|
489
|
-
* Formatter options
|
|
490
|
-
*/
|
|
491
|
-
formatter?: FormatterConfig;
|
|
492
|
-
/**
|
|
493
|
-
* LSP options
|
|
494
|
-
*/
|
|
495
|
-
lsp?: LspConfig;
|
|
496
|
-
/**
|
|
497
|
-
* Musea component gallery options
|
|
498
|
-
*/
|
|
499
|
-
musea?: MuseaConfig;
|
|
500
|
-
/**
|
|
501
|
-
* Global type declarations
|
|
502
|
-
*/
|
|
503
|
-
globalTypes?: GlobalTypesConfig;
|
|
504
|
-
}
|
|
513
|
+
type LspConfig = LanguageServerConfig;
|
|
505
514
|
//#endregion
|
|
506
515
|
//#region src/config.d.ts
|
|
507
|
-
declare const CONFIG_FILE_NAMES: readonly ["vize.config.
|
|
516
|
+
declare const CONFIG_FILE_NAMES: readonly ["vize.config.pkl", "vize.config.ts", "vize.config.js", "vize.config.mjs", "vize.config.json"];
|
|
508
517
|
declare const VIZE_CONFIG_JSON_SCHEMA_PATH: any;
|
|
509
518
|
declare const VIZE_CONFIG_PKL_SCHEMA_PATH: any;
|
|
510
519
|
/**
|
|
@@ -521,5 +530,5 @@ declare function loadConfig(root: string, options?: LoadConfigOptions): Promise<
|
|
|
521
530
|
*/
|
|
522
531
|
declare function normalizeGlobalTypes(config: GlobalTypesConfig): Record<string, GlobalTypeDeclaration>;
|
|
523
532
|
//#endregion
|
|
524
|
-
export {
|
|
525
|
-
//# sourceMappingURL=config-
|
|
533
|
+
export { MuseaConfig as C, TypeCheckerConfig as D, RuleSeverity as E, VitePluginConfig as O, MuseaAutogenConfig as S, RuleCategory as T, GlobalTypesConfig as _, loadConfig as a, LinterConfig as b, ConfigEnv as c, UserConfigExport as d, LintRuleName as f, GlobalTypeDeclaration as g, FormatterConfig as h, defineConfig as i, VizeConfig as k, LoadConfigOptions as l, CompilerConfig as m, VIZE_CONFIG_JSON_SCHEMA_PATH as n, normalizeGlobalTypes as o, LintRulesConfig as p, VIZE_CONFIG_PKL_SCHEMA_PATH as r, LspConfig as s, CONFIG_FILE_NAMES as t, MaybePromise as u, LanguageServerConfig as v, MuseaVrtConfig as w, MuseaA11yConfig as x, LintPreset as y };
|
|
534
|
+
//# sourceMappingURL=config-XMCb6V8W.d.mts.map
|