@vizejs/vite-plugin 0.13.0 → 0.15.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +74 -63
  2. package/dist/index.js +782 -740
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1,52 +1,9 @@
1
1
  import { Plugin } from "vite";
2
2
 
3
- //#region ../vize/src/types.d.ts
4
- type MaybePromise<T> = T | Promise<T>;
5
- interface ConfigEnv {
6
- mode: string;
7
- command: "serve" | "build" | "check" | "lint" | "fmt";
8
- isSsrBuild?: boolean;
9
- }
10
- type UserConfigExport = VizeConfig | ((env: ConfigEnv) => MaybePromise<VizeConfig>);
11
- type RuleSeverity = "off" | "warn" | "error";
12
- type RuleCategory = "correctness" | "suspicious" | "style" | "perf" | "a11y" | "security";
3
+ //#region ../vize/src/types/compiler.d.ts
13
4
  /**
14
- * Vize configuration options
15
- */
16
- interface VizeConfig {
17
- /**
18
- * Vue compiler options
19
- */
20
- compiler?: CompilerConfig;
21
- /**
22
- * Vite plugin options
23
- */
24
- vite?: VitePluginConfig;
25
- /**
26
- * Linter options
27
- */
28
- linter?: LinterConfig;
29
- /**
30
- * Type checker options
31
- */
32
- typeChecker?: TypeCheckerConfig;
33
- /**
34
- * Formatter options
35
- */
36
- formatter?: FormatterConfig;
37
- /**
38
- * LSP options
39
- */
40
- lsp?: LspConfig;
41
- /**
42
- * Musea component gallery options
43
- */
44
- musea?: MuseaConfig;
45
- /**
46
- * Global type declarations
47
- */
48
- globalTypes?: GlobalTypesConfig;
49
- }
5
+ * Compiler configuration
6
+ */
50
7
  /**
51
8
  * Compiler configuration
52
9
  */
@@ -131,7 +88,8 @@ interface VitePluginConfig {
131
88
  * @default ['node_modules/**', 'dist/**', '.git/**']
132
89
  */
133
90
  ignorePatterns?: string[];
134
- }
91
+ } //#endregion
92
+ //#region ../vize/src/types/tools.d.ts
135
93
  /**
136
94
  * Linter configuration
137
95
  */
@@ -267,7 +225,8 @@ interface LspConfig {
267
225
  * @default false
268
226
  */
269
227
  tsgo?: boolean;
270
- }
228
+ } //#endregion
229
+ //#region ../vize/src/types/musea.d.ts
271
230
  /**
272
231
  * VRT (Visual Regression Testing) configuration for Musea
273
232
  */
@@ -361,7 +320,8 @@ interface MuseaConfig {
361
320
  * Autogen configuration
362
321
  */
363
322
  autogen?: MuseaAutogenConfig;
364
- }
323
+ } //#endregion
324
+ //#region ../vize/src/types/loader.d.ts
365
325
  /**
366
326
  * Global type declaration
367
327
  */
@@ -399,7 +359,58 @@ interface LoadConfigOptions {
399
359
  * Config environment for dynamic config resolution
400
360
  */
401
361
  env?: ConfigEnv;
402
- } //#endregion
362
+ }
363
+
364
+ //#endregion
365
+ //#region ../vize/src/types/core.d.ts
366
+ type MaybePromise<T> = T | Promise<T>;
367
+ interface ConfigEnv {
368
+ mode: string;
369
+ command: "serve" | "build" | "check" | "lint" | "fmt";
370
+ isSsrBuild?: boolean;
371
+ }
372
+ type UserConfigExport = VizeConfig | ((env: ConfigEnv) => MaybePromise<VizeConfig>);
373
+ type RuleSeverity = "off" | "warn" | "error";
374
+ type RuleCategory = "correctness" | "suspicious" | "style" | "perf" | "a11y" | "security";
375
+ /**
376
+ * Vize configuration options
377
+ */
378
+ interface VizeConfig {
379
+ /**
380
+ * Vue compiler options
381
+ */
382
+ compiler?: CompilerConfig;
383
+ /**
384
+ * Vite plugin options
385
+ */
386
+ vite?: VitePluginConfig;
387
+ /**
388
+ * Linter options
389
+ */
390
+ linter?: LinterConfig;
391
+ /**
392
+ * Type checker options
393
+ */
394
+ typeChecker?: TypeCheckerConfig;
395
+ /**
396
+ * Formatter options
397
+ */
398
+ formatter?: FormatterConfig;
399
+ /**
400
+ * LSP options
401
+ */
402
+ lsp?: LspConfig;
403
+ /**
404
+ * Musea component gallery options
405
+ */
406
+ musea?: MuseaConfig;
407
+ /**
408
+ * Global type declarations
409
+ */
410
+ globalTypes?: GlobalTypesConfig;
411
+ }
412
+
413
+ //#endregion
403
414
  //#region src/types.d.ts
404
415
  interface VizeOptions {
405
416
  /**
@@ -498,7 +509,19 @@ interface CompiledModule {
498
509
  }
499
510
 
500
511
  //#endregion
501
- //#region src/plugin.d.ts
512
+ //#region src/virtual.d.ts
513
+ interface DynamicImportAliasRule {
514
+ fromPrefix: string;
515
+ toPrefix: string;
516
+ }
517
+
518
+ //#endregion
519
+ //#region src/transform.d.ts
520
+ /** Check if a module ID is a vize-compiled virtual module */
521
+ declare function rewriteStaticAssetUrls(code: string, aliasRules: DynamicImportAliasRule[]): string;
522
+
523
+ //#endregion
524
+ //#region src/plugin/index.d.ts
502
525
  declare function vize(options?: VizeOptions): Plugin[];
503
526
 
504
527
  //#endregion
@@ -519,18 +542,6 @@ declare function loadConfig(root: string, options?: LoadConfigOptions): Promise<
519
542
  */
520
543
  declare const vizeConfigStore: Map<string, VizeConfig>;
521
544
 
522
- //#endregion
523
- //#region src/virtual.d.ts
524
- interface DynamicImportAliasRule {
525
- fromPrefix: string;
526
- toPrefix: string;
527
- }
528
-
529
- //#endregion
530
- //#region src/transform.d.ts
531
- /** Check if a module ID is a vize-compiled virtual module */
532
- declare function rewriteStaticAssetUrls(code: string, aliasRules: DynamicImportAliasRule[]): string;
533
-
534
545
  //#endregion
535
546
  //#region src/index.d.ts
536
547
  declare const __internal: {