@vizejs/vite-plugin 0.48.0 → 0.57.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/vite-plugin",
3
- "version": "0.48.0",
3
+ "version": "0.57.0",
4
4
  "description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
5
5
  "keywords": [
6
6
  "compiler",
@@ -33,16 +33,15 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "tinyglobby": "^0.2.0",
37
- "@vizejs/native": "0.48.0",
38
- "vize": "0.48.0"
36
+ "@vizejs/native": "0.57.0",
37
+ "tinyglobby": "0.2.16",
38
+ "vize": "0.57.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/node": "^22.0.0",
42
- "tsx": "^4.21.0",
43
- "typescript": "~5.6.0",
44
- "vite": "npm:@voidzero-dev/vite-plus-core@latest",
45
- "vite-plus": "latest"
41
+ "@types/node": "25.6.0",
42
+ "typescript": "6.0.3",
43
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.19",
44
+ "vite-plus": "0.1.19"
46
45
  },
47
46
  "peerDependencies": {
48
47
  "vite": "^8.0.0"
@@ -53,6 +52,6 @@
53
52
  "check": "vp check src vite.config.ts",
54
53
  "check:fix": "vp check --fix src vite.config.ts",
55
54
  "fmt": "vp fmt --write src vite.config.ts",
56
- "test": "node --import tsx src/test.ts"
55
+ "test": "node src/test.ts"
57
56
  }
58
57
  }
package/dist/index.d.mts DELETED
@@ -1,548 +0,0 @@
1
- import { defineConfig, loadConfig } from "vize";
2
- import { Plugin } from "vite";
3
-
4
- //#region ../vize/src/types/compiler.d.ts
5
- /**
6
- * Compiler configuration
7
- */
8
- interface CompilerConfig {
9
- /**
10
- * Compilation mode
11
- * @default 'module'
12
- */
13
- mode?: "module" | "function";
14
- /**
15
- * Enable Vapor mode compilation
16
- * @default false
17
- */
18
- vapor?: boolean;
19
- /**
20
- * Enable SSR mode
21
- * @default false
22
- */
23
- ssr?: boolean;
24
- /**
25
- * Enable source map generation
26
- * @default true in development, false in production
27
- */
28
- sourceMap?: boolean;
29
- /**
30
- * Prefix template identifiers with _ctx
31
- * @default false
32
- */
33
- prefixIdentifiers?: boolean;
34
- /**
35
- * Hoist static nodes
36
- * @default true
37
- */
38
- hoistStatic?: boolean;
39
- /**
40
- * Cache v-on handlers
41
- * @default true
42
- */
43
- cacheHandlers?: boolean;
44
- /**
45
- * Enable TypeScript parsing in <script> blocks
46
- * @default true
47
- */
48
- isTs?: boolean;
49
- /**
50
- * Script file extension for generated output
51
- * @default 'ts'
52
- */
53
- scriptExt?: "ts" | "js";
54
- /**
55
- * Module name for runtime imports
56
- * @default 'vue'
57
- */
58
- runtimeModuleName?: string;
59
- /**
60
- * Global variable name for runtime (IIFE builds)
61
- * @default 'Vue'
62
- */
63
- runtimeGlobalName?: string;
64
- }
65
- /**
66
- * Vite plugin configuration
67
- */
68
- interface VitePluginConfig {
69
- /**
70
- * Files to include in compilation
71
- * @default /\.vue$/
72
- */
73
- include?: string | RegExp | (string | RegExp)[];
74
- /**
75
- * Files to exclude from compilation
76
- * @default /node_modules/
77
- */
78
- exclude?: string | RegExp | (string | RegExp)[];
79
- /**
80
- * Glob patterns to scan for .vue files during pre-compilation
81
- * @default ['**\/*.vue']
82
- */
83
- scanPatterns?: string[];
84
- /**
85
- * Glob patterns to ignore during pre-compilation
86
- * @default ['node_modules/**', 'dist/**', '.git/**']
87
- */
88
- ignorePatterns?: string[];
89
- }
90
- //#endregion
91
- //#region ../vize/src/types/tools.d.ts
92
- /**
93
- * Linter configuration
94
- */
95
- interface LinterConfig {
96
- /**
97
- * Enable linting
98
- */
99
- enabled?: boolean;
100
- /**
101
- * Built-in lint preset
102
- * @default 'happy-path'
103
- */
104
- preset?: LintPreset;
105
- /**
106
- * Rules to enable/disable
107
- */
108
- rules?: Record<string, RuleSeverity>;
109
- /**
110
- * Category-level severity overrides
111
- */
112
- categories?: Partial<Record<RuleCategory, RuleSeverity>>;
113
- }
114
- /**
115
- * Type checker configuration
116
- */
117
- interface TypeCheckerConfig {
118
- /**
119
- * Enable type checking
120
- * @default false
121
- */
122
- enabled?: boolean;
123
- /**
124
- * Enable strict mode
125
- * @default false
126
- */
127
- strict?: boolean;
128
- /**
129
- * Check component props
130
- * @default true
131
- */
132
- checkProps?: boolean;
133
- /**
134
- * Check component emits
135
- * @default true
136
- */
137
- checkEmits?: boolean;
138
- /**
139
- * Check template bindings
140
- * @default true
141
- */
142
- checkTemplateBindings?: boolean;
143
- /**
144
- * Path to tsconfig.json
145
- * @default auto-detected
146
- */
147
- tsconfig?: string;
148
- /**
149
- * Path to the Corsa binary
150
- */
151
- corsaPath?: string;
152
- }
153
- /**
154
- * Formatter configuration
155
- */
156
- interface FormatterConfig {
157
- /**
158
- * Max line width
159
- * @default 80
160
- */
161
- printWidth?: number;
162
- /**
163
- * Indentation width
164
- * @default 2
165
- */
166
- tabWidth?: number;
167
- /**
168
- * Use tabs for indentation
169
- * @default false
170
- */
171
- useTabs?: boolean;
172
- /**
173
- * Print semicolons
174
- * @default true
175
- */
176
- semi?: boolean;
177
- /**
178
- * Use single quotes
179
- * @default false
180
- */
181
- singleQuote?: boolean;
182
- /**
183
- * Trailing commas
184
- * @default 'all'
185
- */
186
- trailingComma?: "all" | "none" | "es5";
187
- }
188
- /**
189
- * LSP configuration
190
- */
191
- interface LspConfig {
192
- /**
193
- * Enable LSP
194
- * @default true
195
- */
196
- enabled?: boolean;
197
- /**
198
- * Enable diagnostics
199
- * @default true
200
- */
201
- diagnostics?: boolean;
202
- /**
203
- * Enable completions
204
- * @default true
205
- */
206
- completion?: boolean;
207
- /**
208
- * Enable hover information
209
- * @default true
210
- */
211
- hover?: boolean;
212
- /**
213
- * Enable go-to-definition
214
- * @default true
215
- */
216
- definition?: boolean;
217
- /**
218
- * Enable formatting via LSP
219
- * @default true
220
- */
221
- formatting?: boolean;
222
- /**
223
- * Enable code actions
224
- * @default true
225
- */
226
- codeActions?: boolean;
227
- /**
228
- * Use Corsa for type checking in LSP
229
- * @default false
230
- */
231
- corsa?: boolean;
232
- }
233
- //#endregion
234
- //#region ../vize/src/types/musea.d.ts
235
- /**
236
- * VRT (Visual Regression Testing) configuration for Musea
237
- */
238
- interface MuseaVrtConfig {
239
- /**
240
- * Threshold for pixel comparison (0-1)
241
- * @default 0.1
242
- */
243
- threshold?: number;
244
- /**
245
- * Output directory for screenshots
246
- * @default '__musea_snapshots__'
247
- */
248
- outDir?: string;
249
- /**
250
- * Viewport sizes
251
- */
252
- viewports?: Array<{
253
- width: number;
254
- height: number;
255
- name?: string;
256
- }>;
257
- }
258
- /**
259
- * A11y configuration for Musea
260
- */
261
- interface MuseaA11yConfig {
262
- /**
263
- * Enable a11y checking
264
- * @default false
265
- */
266
- enabled?: boolean;
267
- /**
268
- * Axe-core rules to enable/disable
269
- */
270
- rules?: Record<string, boolean>;
271
- }
272
- /**
273
- * Autogen configuration for Musea
274
- */
275
- interface MuseaAutogenConfig {
276
- /**
277
- * Enable auto-generation of variants
278
- * @default false
279
- */
280
- enabled?: boolean;
281
- /**
282
- * Max variants to generate per component
283
- * @default 10
284
- */
285
- maxVariants?: number;
286
- }
287
- /**
288
- * Musea component gallery configuration
289
- */
290
- interface MuseaConfig {
291
- /**
292
- * Glob patterns for art files
293
- * @default ['**\/*.art.vue']
294
- */
295
- include?: string[];
296
- /**
297
- * Glob patterns to exclude
298
- * @default ['node_modules/**', 'dist/**']
299
- */
300
- exclude?: string[];
301
- /**
302
- * Base path for gallery
303
- * @default '/__musea__'
304
- */
305
- basePath?: string;
306
- /**
307
- * Enable Storybook compatibility
308
- * @default false
309
- */
310
- storybookCompat?: boolean;
311
- /**
312
- * Enable inline art detection in .vue files
313
- * @default false
314
- */
315
- inlineArt?: boolean;
316
- /**
317
- * VRT configuration
318
- */
319
- vrt?: MuseaVrtConfig;
320
- /**
321
- * A11y configuration
322
- */
323
- a11y?: MuseaA11yConfig;
324
- /**
325
- * Autogen configuration
326
- */
327
- autogen?: MuseaAutogenConfig;
328
- }
329
- //#endregion
330
- //#region ../vize/src/types/loader.d.ts
331
- /**
332
- * Global type declaration
333
- */
334
- interface GlobalTypeDeclaration {
335
- /**
336
- * TypeScript type string
337
- */
338
- type: string;
339
- /**
340
- * Default value
341
- */
342
- defaultValue?: string;
343
- }
344
- /**
345
- * Global types configuration
346
- */
347
- type GlobalTypesConfig = Record<string, GlobalTypeDeclaration | string>;
348
- /**
349
- * Options for loading vize.config file
350
- */
351
- interface LoadConfigOptions {
352
- /**
353
- * Config file search mode
354
- * - 'root': Search only in the specified root directory
355
- * - 'auto': Search from cwd upward until finding a config file
356
- * - 'none': Don't load config file
357
- * @default 'root'
358
- */
359
- mode?: "root" | "auto" | "none";
360
- /**
361
- * Custom config file path (overrides automatic search)
362
- */
363
- configFile?: string;
364
- /**
365
- * Config environment for dynamic config resolution
366
- */
367
- env?: ConfigEnv;
368
- }
369
- //#endregion
370
- //#region ../vize/src/types/core.d.ts
371
- interface ConfigEnv {
372
- mode: string;
373
- command: "serve" | "build" | "check" | "lint" | "fmt";
374
- isSsrBuild?: boolean;
375
- }
376
- type RuleSeverity = "off" | "warn" | "error";
377
- type RuleCategory = "correctness" | "suspicious" | "style" | "perf" | "a11y" | "security";
378
- type LintPreset = "happy-path" | "opinionated" | "essential" | "nuxt";
379
- /**
380
- * Vize configuration options
381
- */
382
- interface VizeConfig {
383
- /**
384
- * JSON Schema reference for editor autocompletion.
385
- */
386
- $schema?: string;
387
- /**
388
- * Vue compiler options
389
- */
390
- compiler?: CompilerConfig;
391
- /**
392
- * Vite plugin options
393
- */
394
- vite?: VitePluginConfig;
395
- /**
396
- * Linter options
397
- */
398
- linter?: LinterConfig;
399
- /**
400
- * Type checker options
401
- */
402
- typeChecker?: TypeCheckerConfig;
403
- /**
404
- * Formatter options
405
- */
406
- formatter?: FormatterConfig;
407
- /**
408
- * LSP options
409
- */
410
- lsp?: LspConfig;
411
- /**
412
- * Musea component gallery options
413
- */
414
- musea?: MuseaConfig;
415
- /**
416
- * Global type declarations
417
- */
418
- globalTypes?: GlobalTypesConfig;
419
- }
420
- //#endregion
421
- //#region src/types.d.ts
422
- interface VizeOptions {
423
- /**
424
- * Override the public base used for dev-time asset URLs such as /@fs paths.
425
- * Useful for frameworks like Nuxt that serve Vite from a subpath (e.g. /_nuxt/).
426
- */
427
- devUrlBase?: string;
428
- /**
429
- * Files to include in compilation
430
- * @default /\.vue$/
431
- */
432
- include?: string | RegExp | (string | RegExp)[];
433
- /**
434
- * Files to exclude from compilation
435
- * @default /node_modules/
436
- */
437
- exclude?: string | RegExp | (string | RegExp)[];
438
- /**
439
- * Force production mode
440
- * @default auto-detected from Vite config
441
- */
442
- isProduction?: boolean;
443
- /**
444
- * Enable SSR mode
445
- * @default false
446
- */
447
- ssr?: boolean;
448
- /**
449
- * Enable source map generation
450
- * @default true in development, false in production
451
- */
452
- sourceMap?: boolean;
453
- /**
454
- * Enable Vapor mode compilation
455
- * @default false
456
- */
457
- vapor?: boolean;
458
- /**
459
- * Root directory to scan for .vue files
460
- * @default Vite's root
461
- */
462
- root?: string;
463
- /**
464
- * Glob patterns to scan for .vue files during pre-compilation
465
- * @default ['**\/*.vue']
466
- */
467
- scanPatterns?: string[];
468
- /**
469
- * Glob patterns to ignore during pre-compilation
470
- * @default ['node_modules/**', 'dist/**', '.git/**']
471
- */
472
- ignorePatterns?: string[];
473
- /**
474
- * Config file search mode
475
- * - 'root': Search only in the project root directory
476
- * - 'auto': Search from cwd upward until finding a config file
477
- * - false: Disable config file loading
478
- * @default 'root'
479
- */
480
- configMode?: "root" | "auto" | false;
481
- /**
482
- * Custom config file path (overrides automatic search)
483
- */
484
- configFile?: string;
485
- /**
486
- * Handle .vue files in node_modules (on-demand compilation).
487
- * When true, vize will compile .vue files from node_modules that other plugins
488
- * (like vite-plugin-vue-inspector) may import directly.
489
- * Set to false if another Vue plugin (e.g. Nuxt) handles node_modules .vue files.
490
- * @default true
491
- */
492
- handleNodeModulesVue?: boolean;
493
- /**
494
- * Enable debug logging
495
- * @default false
496
- */
497
- debug?: boolean;
498
- }
499
- interface StyleBlockInfo {
500
- /** Raw style content (uncompiled for preprocessor langs) */
501
- content: string;
502
- /** Language of the style block (e.g., "css", "scss", "less", "sass", "stylus") */
503
- lang: string | null;
504
- /** Whether the style block has the scoped attribute */
505
- scoped: boolean;
506
- /** CSS Modules: true for unnamed `module`, or the binding name for `module="name"` */
507
- module: boolean | string;
508
- /** Index of this style block in the SFC */
509
- index: number;
510
- }
511
- interface CompiledModule {
512
- code: string;
513
- css?: string;
514
- scopeId: string;
515
- hasScoped: boolean;
516
- templateHash?: string;
517
- styleHash?: string;
518
- scriptHash?: string;
519
- /** Per-block style metadata extracted from the source SFC */
520
- styles?: StyleBlockInfo[];
521
- }
522
- //#endregion
523
- //#region src/virtual.d.ts
524
- interface DynamicImportAliasRule {
525
- fromPrefix: string;
526
- toPrefix: string;
527
- }
528
- //#endregion
529
- //#region src/transform.d.ts
530
- declare function rewriteStaticAssetUrls(code: string, aliasRules: DynamicImportAliasRule[]): string;
531
- //#endregion
532
- //#region src/plugin/index.d.ts
533
- declare function vize(options?: VizeOptions): Plugin[];
534
- //#endregion
535
- //#region src/config.d.ts
536
- /**
537
- * Shared config store for inter-plugin communication.
538
- * Key = project root, Value = resolved VizeConfig.
539
- * Used by musea() and other plugins to access the unified config.
540
- */
541
- declare const vizeConfigStore: Map<string, VizeConfig>;
542
- //#endregion
543
- //#region src/index.d.ts
544
- declare const __internal: {
545
- rewriteStaticAssetUrls: typeof rewriteStaticAssetUrls;
546
- };
547
- //#endregion
548
- export { type CompiledModule, type LoadConfigOptions, type VizeConfig, type VizeOptions, __internal, rewriteStaticAssetUrls as __internal_rewriteStaticAssetUrls, vize as default, vize, defineConfig, loadConfig, vizeConfigStore };