@vizejs/native 0.101.0 → 0.104.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/index.d.ts CHANGED
@@ -1,827 +1,12 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
- /** Art descriptor for NAPI */
4
- export interface ArtDescriptorNapi {
5
- filename: string;
6
- metadata: ArtMetadataNapi;
7
- variants: Array<ArtVariantNapi>;
8
- hasScriptSetup: boolean;
9
- hasScript: boolean;
10
- styleCount: number;
11
- }
12
3
 
13
- /** Art metadata for NAPI */
14
- export interface ArtMetadataNapi {
15
- title: string;
16
- description?: string;
17
- component?: string;
18
- category?: string;
19
- tags: Array<string>;
20
- status: string;
21
- order?: number;
22
- }
23
-
24
- /** Art parse options for NAPI */
25
- export interface ArtParseOptionsNapi {
26
- filename?: string;
27
- }
28
-
29
- /** Transform Art to Storybook CSF 3.0 */
30
- export declare function artToCsf(
31
- source: string,
32
- options?: ArtParseOptionsNapi | undefined | null,
33
- ): CsfOutputNapi;
34
-
35
- /** Art variant for NAPI */
36
- export interface ArtVariantNapi {
37
- name: string;
38
- template: string;
39
- isDefault: boolean;
40
- skipVrt: boolean;
41
- }
42
-
43
- export interface AutogenConfigNapi {
44
- maxVariants?: number;
45
- includeDefault?: boolean;
46
- includeBooleanToggles?: boolean;
47
- includeEnumVariants?: boolean;
48
- includeBoundaryValues?: boolean;
49
- includeEmptyStrings?: boolean;
50
- }
51
-
52
- export interface AutogenOutputNapi {
53
- variants: Array<GeneratedVariantNapi>;
54
- artFileContent: string;
55
- componentName: string;
56
- }
57
-
58
- /** Batch compile options for NAPI */
59
- export interface BatchCompileOptionsNapi {
60
- ssr?: boolean;
61
- vapor?: boolean;
62
- customRenderer?: boolean;
63
- /** Preserve TypeScript in output when true */
64
- isTs?: boolean;
65
- threads?: number;
66
- }
67
-
68
- /** Batch compile result for NAPI */
69
- export interface BatchCompileResultNapi {
70
- /** Number of files compiled successfully */
71
- success: number;
72
- /** Number of files that failed */
73
- failed: number;
74
- /** Total input bytes */
75
- inputBytes: number;
76
- /** Total output bytes */
77
- outputBytes: number;
78
- /** Compilation time in milliseconds */
79
- timeMs: number;
80
- }
81
-
82
- /** Batch compile result with per-file results */
83
- export interface BatchCompileResultWithFilesNapi {
84
- /** Per-file compilation results */
85
- results: Array<BatchFileResultNapi>;
86
- /** Number of files compiled successfully */
87
- successCount: number;
88
- /** Number of files that failed */
89
- failedCount: number;
90
- /** Compilation time in milliseconds */
91
- timeMs: number;
92
- }
93
-
94
- /** Input file for batch compilation with results */
95
- export interface BatchFileInputNapi {
96
- /** File path */
97
- path: string;
98
- /** Source code */
99
- source: string;
100
- }
101
-
102
- export interface StyleBlockNapi {
103
- content: string;
104
- lang?: string;
105
- scoped: boolean;
106
- module: boolean;
107
- moduleName?: string;
108
- index: number;
109
- }
110
-
111
- /** Per-file result from batch compilation */
112
- export interface BatchFileResultNapi {
113
- /** File path */
114
- path: string;
115
- /** Generated JavaScript code */
116
- code: string;
117
- /** Generated CSS (if any) */
118
- css?: string;
119
- /** Scope ID for scoped styles */
120
- scopeId: string;
121
- /** Whether the file has scoped styles */
122
- hasScoped: boolean;
123
- /** Compilation errors */
124
- errors: Array<string>;
125
- /** Compilation warnings */
126
- warnings: Array<string>;
127
- /** Hash of template content (for HMR) */
128
- templateHash?: string;
129
- /** Hash of style content (for HMR) */
130
- styleHash?: string;
131
- /** Hash of script content (for HMR) */
132
- scriptHash?: string;
133
- /** Per-block style metadata */
134
- styles: Array<StyleBlockNapi>;
135
- /** Compile-time macro artifacts */
136
- macroArtifacts: Array<MacroArtifactNapi>;
137
- }
138
-
139
- /** Batch type check result for NAPI */
140
- export interface BatchTypeCheckResultNapi {
141
- filesChecked: number;
142
- filesWithErrors: number;
143
- totalErrors: number;
144
- totalWarnings: number;
145
- timeMs: number;
146
- }
147
-
148
- /** Catalog entry for NAPI */
149
- export interface CatalogEntryNapi {
150
- title: string;
151
- description?: string;
152
- category?: string;
153
- tags: Array<string>;
154
- status: string;
155
- variantCount: number;
156
- docPath: string;
157
- sourcePath: string;
158
- }
159
-
160
- /** Catalog output for NAPI */
161
- export interface CatalogOutputNapi {
162
- markdown: string;
163
- filename: string;
164
- componentCount: number;
165
- categories: Array<string>;
166
- tags: Array<string>;
167
- }
168
-
169
- export interface DefineReplacementNapi {
170
- key: string;
171
- value: string;
172
- }
173
-
174
- export interface CssAliasRuleNapi {
175
- find: string;
176
- replacement: string;
177
- isRegex: boolean;
178
- flags?: string;
179
- }
180
-
181
- export interface DynamicImportAliasRuleNapi {
182
- fromPrefix: string;
183
- toPrefix: string;
184
- }
185
-
186
- export interface ViteIdPartsNapi {
187
- request: string;
188
- querySuffix: string;
189
- }
190
-
191
- /**
192
- * Classify a Vite plugin module request using the native Vize request model.
193
- * This keeps pure query parsing and virtual module categorization in Rust while
194
- * JavaScript keeps Vite hook orchestration and filesystem interactions.
195
- */
196
- export declare function classifyVitePluginRequest(id: string): VitePluginRequestNapi;
197
-
198
- export declare function scopeViteCssForPipeline(css: string, scopeId: string): string;
199
-
200
- export declare function resolveViteCssImports(
201
- css: string,
202
- importer: string,
203
- aliasRules: Array<CssAliasRuleNapi>,
204
- isDev?: boolean | undefined | null,
205
- devUrlBase?: string | undefined | null,
206
- ): string;
207
-
208
- export declare function splitViteIdQuery(id: string): ViteIdPartsNapi;
209
-
210
- export declare function isViteBareSpecifier(id: string): boolean;
211
-
212
- export declare function normalizeViteRequireBase(
213
- importer?: string | undefined | null,
214
- ): string | null;
215
-
216
- export declare function resolveViteAliasRequest(
217
- id: string,
218
- aliasRules: Array<CssAliasRuleNapi>,
219
- ): string | null;
220
-
221
- export declare function normalizeViteResolvedVuePath(id: string): string | null;
222
-
223
- export declare function resolveViteVuePath(
224
- root: string,
225
- id: string,
226
- importer?: string | undefined | null,
227
- ): string;
228
-
229
- export declare function createViteBareImportBases(
230
- root: string,
231
- importer?: string | undefined | null,
232
- ): Array<string>;
233
-
234
- export declare function createViteBareImportCandidates(
235
- id: string,
236
- aliasRules: Array<CssAliasRuleNapi>,
237
- resolvedId?: string | undefined | null,
238
- ): Array<string>;
239
-
240
- export declare function resolveViteRelativeImport(id: string, importer: string): string | null;
241
-
242
- export declare function createViteVirtualId(
243
- realPath: string,
244
- ssr?: boolean | undefined | null,
245
- ): string;
246
-
247
- export declare function fromViteVirtualId(virtualId: string): string;
248
-
249
- export declare function normalizeViteVirtualVueModuleId(id: string): string;
250
-
251
- export declare function normalizeViteFsIdForBuild(id: string): string;
252
-
253
- export declare function toViteBrowserImportPrefix(replacement: string): string;
254
-
255
- export declare function rewriteViteStaticAssetUrls(
256
- code: string,
257
- aliasRules: Array<DynamicImportAliasRuleNapi>,
258
- ): string;
259
-
260
- export declare function rewriteViteDynamicTemplateImports(
261
- code: string,
262
- aliasRules: Array<DynamicImportAliasRuleNapi>,
263
- ): string;
264
-
265
- export declare function isBuiltinViteDefine(key: string): boolean;
266
-
267
- export declare function shouldApplyViteDefineInVirtualModule(key: string): boolean;
268
-
269
- export declare function applyViteDefineReplacements(
270
- code: string,
271
- defines: Array<DefineReplacementNapi>,
272
- ): string;
273
-
274
- /** Compile Vue template to VDom render function */
275
- export declare function compile(
276
- template: string,
277
- options?: CompilerOptions | undefined | null,
278
- ): CompileResult;
279
-
280
- /**
281
- * Compile a CSS string with scoped CSS, v-bind() extraction, and optional minification.
282
- * Unlike `compileSfc`, the `scopeId` is used as-is without stripping the "data-v-" prefix.
283
- * Callers must pass the full attribute name (e.g., "data-v-abc123").
284
- */
285
- export declare function compileCss(
286
- source: string,
287
- options?: CssCompileOptionsNapi | undefined | null,
288
- ): CssCompileResultNapi;
289
-
290
- /** Compile result */
291
- export interface CompileResult {
292
- /** Generated code */
293
- code: string;
294
- /** Preamble code (imports) */
295
- preamble: string;
296
- /** AST (serialized as JSON) */
297
- ast: any;
298
- /** Source map */
299
- map?: any;
300
- /** Used helpers */
301
- helpers: Array<string>;
302
- /** Template strings for Vapor mode static parts */
303
- templates?: Array<string>;
304
- }
305
-
306
- /** Compiler options for bindings */
307
- export interface CompilerOptions {
308
- /** Output mode: "module" or "function" */
309
- mode?: string;
310
- /** Whether to prefix identifiers */
311
- prefixIdentifiers?: boolean;
312
- /** Whether to hoist static nodes */
313
- hoistStatic?: boolean;
314
- /** Whether to cache event handlers */
315
- cacheHandlers?: boolean;
316
- /** Scope ID for scoped CSS */
317
- scopeId?: string;
318
- /** Whether in SSR mode */
319
- ssr?: boolean;
320
- /** Whether to generate source map */
321
- sourceMap?: boolean;
322
- /** Filename for source map */
323
- filename?: string;
324
- /** Output mode: "vdom" or "vapor" */
325
- outputMode?: string;
326
- /** Whether the template contains TypeScript */
327
- isTs?: boolean;
328
- /** Whether the template targets a custom renderer instead of the DOM. */
329
- customRenderer?: boolean;
330
- /**
331
- * Script extension handling: "preserve" (keep TypeScript) or "downcompile" (transpile to JS)
332
- * Defaults to "downcompile"
333
- */
334
- scriptExt?: string;
335
- }
336
-
337
- /** Compile SFC (.vue file) to JavaScript - main use case */
338
- export declare function compileSfc(
339
- source: string,
340
- options?: SfcCompileOptionsNapi | undefined | null,
341
- ): SfcCompileResultNapi;
342
-
343
- /** Batch compile SFC files matching a glob pattern (native multithreading) */
344
- export declare function compileSfcBatch(
345
- pattern: string,
346
- options?: BatchCompileOptionsNapi | undefined | null,
347
- ): BatchCompileResultNapi;
348
-
349
- /** Batch compile SFC files with per-file results (in-memory, native multithreading) */
350
- export declare function compileSfcBatchWithResults(
351
- files: Array<BatchFileInputNapi>,
352
- options?: BatchCompileOptionsNapi | undefined | null,
353
- ): BatchCompileResultWithFilesNapi;
354
-
355
- /** Compile Vue template to Vapor mode */
356
- export declare function compileVapor(
357
- template: string,
358
- options?: CompilerOptions | undefined | null,
359
- ): CompileResult;
360
-
361
- /** CSF output for NAPI */
362
- export interface CsfOutputNapi {
363
- code: string;
364
- filename: string;
365
- }
366
-
367
- /** CSS compile options for NAPI */
368
- export interface CssCompileOptionsNapi {
369
- /** Filename for error reporting */
370
- filename?: string;
371
- /** Whether to apply scoped CSS transformation */
372
- scoped?: boolean;
373
- /** Scope ID for scoped CSS (e.g., "data-v-abc123"). Must be the full attribute name. */
374
- scopeId?: string;
375
- /** Whether to generate source maps */
376
- sourceMap?: boolean;
377
- /** Whether to minify the output */
378
- minify?: boolean;
379
- /** Whether to enable CSS Modules transforms */
380
- cssModules?: boolean;
381
- /** Whether to enable custom media query resolution */
382
- customMedia?: boolean;
383
- /** Browser targets for autoprefixing */
384
- targets?: CssTargetsNapi;
385
- }
386
-
387
- /** CSS compile result for NAPI */
388
- export interface CssCompileResultNapi {
389
- /** Compiled CSS code */
390
- code: string;
391
- /** Source map (if requested) */
392
- map?: string;
393
- /** CSS variables found (from v-bind()) */
394
- cssVars: Array<string>;
395
- /** Errors during compilation */
396
- errors: Array<string>;
397
- /** Warnings during compilation */
398
- warnings: Array<string>;
399
- }
400
-
401
- /** Browser targets for CSS autoprefixing */
402
- export interface CssTargetsNapi {
403
- chrome?: number;
404
- firefox?: number;
405
- safari?: number;
406
- edge?: number;
407
- ios?: number;
408
- android?: number;
409
- }
410
-
411
- /** Declaration generation options for NAPI */
412
- export interface DeclarationOptionsNapi {
413
- filename?: string;
414
- }
415
-
416
- /** Declaration generation result for NAPI */
417
- export interface DeclarationResultNapi {
418
- code: string;
419
- }
420
-
421
- /** Doc options for NAPI */
422
- export interface DocOptionsNapi {
423
- includeSource?: boolean;
424
- includeTemplates?: boolean;
425
- includeMetadata?: boolean;
426
- includeToc?: boolean;
427
- tocThreshold?: number;
428
- basePath?: string;
429
- title?: string;
430
- }
431
-
432
- /** Doc output for NAPI */
433
- export interface DocOutputNapi {
434
- markdown: string;
435
- filename: string;
436
- title: string;
437
- category?: string;
438
- variantCount: number;
439
- }
440
-
441
- /** Format options for NAPI. */
442
- export interface FormatOptionsNapi {
443
- printWidth?: number;
444
- tabWidth?: number;
445
- useTabs?: boolean;
446
- semi?: boolean;
447
- singleQuote?: boolean;
448
- sortAttributes?: boolean;
449
- singleAttributePerLine?: boolean;
450
- maxAttributesPerLine?: number;
451
- normalizeDirectiveShorthands?: boolean;
452
- }
453
-
454
- /** Format result for NAPI. */
455
- export interface FormatResultNapi {
456
- code: string;
457
- changed: boolean;
458
- }
459
-
460
- /** Format a Vue SFC source string. */
461
- export declare function formatSfc(
462
- source: string,
463
- options?: FormatOptionsNapi | undefined | null,
464
- ): FormatResultNapi;
465
-
466
- /** Generate catalog from multiple Art sources (high-performance batch) */
467
- export declare function generateArtCatalog(
468
- sources: Array<string>,
469
- docOptions?: DocOptionsNapi | undefined | null,
470
- ): CatalogOutputNapi;
471
-
472
- /** Generate component documentation from Art source */
473
- export declare function generateArtDoc(
474
- source: string,
475
- artOptions?: ArtParseOptionsNapi | undefined | null,
476
- docOptions?: DocOptionsNapi | undefined | null,
477
- ): DocOutputNapi;
478
-
479
- /** Batch generate docs with parallel processing */
480
- export declare function generateArtDocsBatch(
481
- sources: Array<string>,
482
- docOptions?: DocOptionsNapi | undefined | null,
483
- ): Array<DocOutputNapi>;
484
-
485
- /** Generate props palette from Art source */
486
- export declare function generateArtPalette(
487
- source: string,
488
- artOptions?: ArtParseOptionsNapi | undefined | null,
489
- paletteOptions?: PaletteOptionsNapi | undefined | null,
490
- ): PaletteOutputNapi;
491
-
492
- /** Generate a Vue SFC `.d.ts` declaration from Croquis analysis. */
493
- export declare function generateDeclaration(
494
- source: string,
495
- options?: DeclarationOptionsNapi | undefined | null,
496
- ): DeclarationResultNapi;
497
-
498
- export interface GeneratedVariantNapi {
499
- name: string;
500
- isDefault: boolean;
501
- props: any;
502
- description?: string;
503
- }
504
-
505
- /** Generate .art.vue variants from component prop definitions */
506
- export declare function generateVariants(
507
- componentPath: string,
508
- props: Array<PropDefinitionNapi>,
509
- config?: AutogenConfigNapi | undefined | null,
510
- ): AutogenOutputNapi;
511
-
512
- /** Get Patina's currently registered rule metadata. */
513
- export declare function getPatinaRules(): any;
514
-
515
- /** Get type checking capabilities info */
516
- export declare function getTypeCheckCapabilities(): TypeCheckCapabilitiesNapi;
517
-
518
- /** Lint Vue SFC files matching patterns (native multithreading, .gitignore-aware) */
519
- export declare function lint(
520
- patterns: Array<string>,
521
- options?: LintOptionsNapi | undefined | null,
522
- ): LintResultNapi;
523
-
524
- /** Lint options for NAPI */
525
- export interface LintOptionsNapi {
526
- /** Output format: "text" or "json" */
527
- format?: string;
528
- /** Maximum number of warnings before failing */
529
- maxWarnings?: number;
530
- /** Quiet mode - only show summary */
531
- quiet?: boolean;
532
- /** Automatically fix problems (not yet implemented) */
533
- fix?: boolean;
534
- /** Help display level: "full", "short", "none" */
535
- helpLevel?: string;
536
- /** Lint preset: "general-recommended", "essential", "incremental", "opinionated", or "nuxt" */
537
- preset?: string;
538
- }
539
-
540
- /** Lint a single Vue SFC with Patina and return structured diagnostics. */
541
- export declare function lintPatinaSfc(
542
- source: string,
543
- options?: PatinaLintOptionsNapi | undefined | null,
544
- ): any;
545
-
546
- /** Lint result for NAPI */
547
- export interface LintResultNapi {
548
- /** Formatted output string */
549
- output: string;
550
- /** Total number of errors */
551
- errorCount: number;
552
- /** Total number of warnings */
553
- warningCount: number;
554
- /** Number of files linted */
555
- fileCount: number;
556
- /** Time in milliseconds */
557
- timeMs: number;
558
- }
559
-
560
- export interface MacroArtifactNapi {
561
- kind: string;
562
- name: string;
563
- source: string;
564
- content: string;
565
- moduleCode?: string;
566
- start: number;
567
- end: number;
568
- }
569
-
570
- /** Palette options for NAPI */
571
- export interface PaletteOptionsNapi {
572
- inferOptions?: boolean;
573
- minSelectValues?: number;
574
- maxSelectValues?: number;
575
- groupByType?: boolean;
576
- }
577
-
578
- /** Palette output for NAPI */
579
- export interface PaletteOutputNapi {
580
- title: string;
581
- controls: Array<PropControlNapi>;
582
- groups: Array<string>;
583
- json: string;
584
- typescript: string;
585
- }
586
-
587
- /** Parse Art file (*.art.vue) */
588
- export declare function parseArt(
589
- source: string,
590
- options?: ArtParseOptionsNapi | undefined | null,
591
- ): ArtDescriptorNapi;
592
-
593
- /** Parse SFC (.vue file) - returns lightweight result for speed */
594
- export declare function parseSfc(
595
- source: string,
596
- options?: SfcParseOptionsNapi | undefined | null,
597
- ): any;
598
-
599
- /** Parse template to AST only */
600
- export declare function parseTemplate(
601
- template: string,
602
- options?: CompilerOptions | undefined | null,
603
- ): any;
604
-
605
- /** Single-file Patina lint options for NAPI */
606
- export interface PatinaLintOptionsNapi {
607
- /** Filename used for diagnostics */
608
- filename?: string;
609
- /** Locale code: "en", "ja", or "zh" */
610
- locale?: string;
611
- /** Help display level: "full", "short", or "none" */
612
- helpLevel?: string;
613
- /** Lint preset: "general-recommended", "essential", "incremental", "opinionated", or "nuxt" */
614
- preset?: string;
615
- /** Optional list of Patina rule names to enable */
616
- enabledRules?: Array<string>;
617
- }
618
-
619
- /** Prop control for NAPI */
620
- export interface PropControlNapi {
621
- name: string;
622
- control: string;
623
- defaultValue?: any;
624
- description?: string;
625
- required: boolean;
626
- options: Array<SelectOptionNapi>;
627
- range?: RangeConfigNapi;
628
- group?: string;
629
- }
630
-
631
- export interface PropDefinitionNapi {
632
- name: string;
633
- propType: string;
634
- required: boolean;
635
- defaultValue?: any;
636
- }
637
-
638
- /** Run the Rust Vize CLI with argv-style arguments. */
639
- export declare function runCli(args: Array<string>): void;
640
-
641
- /** Range config for NAPI */
642
- export interface RangeConfigNapi {
643
- min: number;
644
- max: number;
645
- step?: number;
646
- }
647
-
648
- /** Related location for diagnostic (NAPI) */
649
- export interface RelatedLocationNapi {
650
- message: string;
651
- start: number;
652
- end: number;
653
- filename?: string;
654
- }
655
-
656
- /** Select option for NAPI */
657
- export interface SelectOptionNapi {
658
- label: string;
659
- value: any;
660
- }
661
-
662
- /** SFC compile options for NAPI */
663
- export interface SfcCompileOptionsNapi {
664
- filename?: string;
665
- sourceMap?: boolean;
666
- ssr?: boolean;
667
- vapor?: boolean;
668
- customRenderer?: boolean;
669
- /** Preserve TypeScript in output when true */
670
- isTs?: boolean;
671
- /** Scope ID for scoped CSS (e.g., "data-v-abc123") */
672
- scopeId?: string;
673
- }
674
-
675
- /** SFC compile result for NAPI */
676
- export interface SfcCompileResultNapi {
677
- /** Generated JavaScript code */
678
- code: string;
679
- /** Generated CSS (if any) */
680
- css?: string;
681
- /** Compilation errors */
682
- errors: Array<string>;
683
- /** Compilation warnings */
684
- warnings: Array<string>;
685
- /** Hash of template content (for HMR) */
686
- templateHash?: string;
687
- /** Hash of style content (for HMR) */
688
- styleHash?: string;
689
- /** Hash of script content (for HMR) */
690
- scriptHash?: string;
691
- /** Whether the file has scoped styles */
692
- hasScoped: boolean;
693
- /** Per-block style metadata */
694
- styles: Array<StyleBlockNapi>;
695
- /** Compile-time macro artifacts */
696
- macroArtifacts: Array<MacroArtifactNapi>;
697
- }
698
-
699
- /** SFC parse options for NAPI */
700
- export interface SfcParseOptionsNapi {
701
- filename?: string;
702
- }
703
-
704
- /**
705
- * Perform type checking on a Vue SFC
706
- *
707
- * This performs AST-based type analysis without requiring a TypeScript compiler.
708
- * For full type checking, use the CLI with Corsa integration.
709
- */
710
- export declare function typeCheck(
711
- source: string,
712
- options?: TypeCheckOptionsNapi | undefined | null,
713
- ): TypeCheckResultNapi;
714
-
715
- /** Batch type check SFC files matching a glob pattern (native multithreading) */
716
- export declare function typeCheckBatch(
717
- pattern: string,
718
- options?: TypeCheckOptionsNapi | undefined | null,
719
- ): BatchTypeCheckResultNapi;
720
-
721
- /** Type check capabilities result */
722
- export interface TypeCheckCapabilitiesNapi {
723
- mode: string;
724
- description: string;
725
- checks: Array<TypeCheckCapabilityNapi>;
726
- notes: Array<string>;
727
- }
728
-
729
- /** Type check capabilities info */
730
- export interface TypeCheckCapabilityNapi {
731
- name: string;
732
- description: string;
733
- severity: string;
734
- }
735
-
736
- /** Type check options for NAPI */
737
- export interface TypeCheckOptionsNapi {
738
- filename?: string;
739
- strict?: boolean;
740
- includeVirtualTs?: boolean;
741
- checkProps?: boolean;
742
- checkEmits?: boolean;
743
- checkTemplateBindings?: boolean;
744
- checkReactivity?: boolean;
745
- checkSetupContext?: boolean;
746
- checkInvalidExports?: boolean;
747
- checkFallthroughAttrs?: boolean;
748
- }
749
-
750
- /** Type check result for NAPI */
751
- export interface TypeCheckResultNapi {
752
- diagnostics: Array<TypeDiagnosticNapi>;
753
- virtualTs?: string;
754
- errorCount: number;
755
- warningCount: number;
756
- analysisTimeMs?: number;
757
- }
758
-
759
- export interface VitePluginRequestNapi {
760
- /** Path segment before the query string. */
761
- path: string;
762
- /** Query suffix including the leading `?`, or an empty string. */
763
- querySuffix: string;
764
- /** Path normalized for macro virtual modules (`.vue.ts` -> `.vue`). */
765
- normalizedVuePath: string;
766
- /** For `\0...` virtual macro IDs, the real path without the virtual prefix. */
767
- strippedVirtualPath?: string;
768
- /** Whether this ID is a Vize-compiled virtual Vue module. */
769
- isVizeVirtual: boolean;
770
- /** Whether this ID is a Vize SSR virtual Vue module. */
771
- isVizeSsrVirtual: boolean;
772
- /** Real `.vue` path extracted from a Vize virtual Vue module ID. */
773
- vizeVirtualPath?: string;
774
- /** Build-safe ID with Vite's `/@fs` prefix removed when present. */
775
- normalizedFsId?: string;
776
- /** Whether the query contains `macro=true`. */
777
- hasMacroQuery: boolean;
778
- /** Whether the query contains `definePage`. */
779
- hasDefinePageQuery: boolean;
780
- /** Whether this is a `\0` virtual ID carrying a macro query. */
781
- isMacroVirtualId: boolean;
782
- /** Whether the request points at a Vue SFC after macro normalization. */
783
- isVueSfcPath: boolean;
784
- /** Whether the request is a Vite Vue style virtual query. */
785
- isVueStyleQuery: boolean;
786
- /** Style block language, defaulting to `css` for style virtual queries. */
787
- styleLang?: string;
788
- /** Style block index for style virtual queries. */
789
- styleIndex?: number;
790
- /** Scoped attribute value for style virtual queries. */
791
- styleScoped?: string;
792
- /** Whether the style query carries a CSS modules marker. */
793
- hasStyleModule: boolean;
794
- /** Extension suffix Vite should see for the style pipeline. */
795
- styleVirtualSuffix?: string;
796
- /** Vue boundary file kind: `client`, `server`, or undefined. */
797
- boundaryKind?: string;
798
- }
799
-
800
- export interface HmrHashesNapi {
801
- scriptHash?: string;
802
- templateHash?: string;
803
- styleHash?: string;
804
- }
805
-
806
- export declare function hasViteHmrChanges(
807
- prev: HmrHashesNapi | undefined | null,
808
- next: HmrHashesNapi,
809
- ): boolean;
810
-
811
- export declare function detectViteHmrUpdateType(
812
- prev: HmrHashesNapi | undefined | null,
813
- next: HmrHashesNapi,
814
- ): string;
815
-
816
- export declare function generateViteHmrCode(scopeId: string, updateType: string): string;
817
-
818
- /** Type diagnostic for NAPI */
819
- export interface TypeDiagnosticNapi {
820
- severity: string;
821
- message: string;
822
- start: number;
823
- end: number;
824
- code?: string;
825
- help?: string;
826
- related: Array<RelatedLocationNapi>;
827
- }
4
+ export * from "./types/art";
5
+ export * from "./types/cli";
6
+ export * from "./types/compiler";
7
+ export * from "./types/css";
8
+ export * from "./types/lint";
9
+ export * from "./types/sfc";
10
+ export * from "./types/tokens";
11
+ export * from "./types/typecheck";
12
+ export * from "./types/vite";