@vizejs/native 0.571.0 → 0.573.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 (2) hide show
  1. package/index.d.ts +64 -1
  2. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -100,6 +100,7 @@ export interface BatchCompileOptionsNapi {
100
100
  experimentalServerScript?: boolean;
101
101
  runtimeModuleName?: string;
102
102
  runtimeGlobalName?: string;
103
+ /** Runtime dialect selector; omitted or "3" uses Vue 3. Legacy code generation is unavailable. */
103
104
  vueVersion?: string;
104
105
  styleTrim?: boolean;
105
106
  templateCacheHandlers?: boolean;
@@ -1081,7 +1082,7 @@ export interface SfcAnalyzeOptions {
1081
1082
  export declare function parseSfc(
1082
1083
  source: string,
1083
1084
  options?: SfcParseOptionsNapi | undefined | null,
1084
- ): any;
1085
+ ): SfcParseResultNapi;
1085
1086
 
1086
1087
  /** Parse template to AST only */
1087
1088
  export declare function parseTemplate(
@@ -1333,6 +1334,7 @@ export interface SfcCompileOptionsNapi {
1333
1334
  experimentalServerScript?: boolean;
1334
1335
  runtimeModuleName?: string;
1335
1336
  runtimeGlobalName?: string;
1337
+ /** Runtime dialect selector; omitted or "3" uses Vue 3. Legacy code generation is unavailable. */
1336
1338
  vueVersion?: string;
1337
1339
  styleTrim?: boolean;
1338
1340
  templateCacheHandlers?: boolean;
@@ -1378,6 +1380,67 @@ export interface SfcElementOrderOptionsNapi {
1378
1380
 
1379
1381
  export interface SfcParseOptionsNapi {
1380
1382
  filename?: string;
1383
+ /** Include effective parser attributes in authored name order. */
1384
+ includeAttrs?: boolean;
1385
+ }
1386
+
1387
+ export interface SfcParseResultNapi {
1388
+ filename: string;
1389
+ source: string;
1390
+ template: SfcParsedTemplateNapi | null;
1391
+ script: SfcParsedScriptNapi | null;
1392
+ scriptSetup: SfcParsedScriptNapi | null;
1393
+ styles: Array<SfcParsedStyleNapi>;
1394
+ customBlocks: Array<SfcParsedCustomBlockNapi>;
1395
+ }
1396
+
1397
+ /** An effective parsed attribute. Boolean and empty values remain empty strings. */
1398
+ export interface SfcParsedAttributeNapi {
1399
+ name: string;
1400
+ value: string;
1401
+ }
1402
+
1403
+ export interface SfcParsedCustomBlockNapi {
1404
+ type: string;
1405
+ content: string;
1406
+ loc: SfcParsedLocationNapi;
1407
+ attrs?: Array<SfcParsedAttributeNapi>;
1408
+ }
1409
+
1410
+ /** All offsets and columns use UTF-8 bytes in the original source. */
1411
+ export interface SfcParsedLocationNapi {
1412
+ start: number;
1413
+ end: number;
1414
+ tagStart: number;
1415
+ tagEnd: number;
1416
+ startLine: number;
1417
+ startColumn: number;
1418
+ endLine: number;
1419
+ endColumn: number;
1420
+ }
1421
+
1422
+ export interface SfcParsedScriptNapi {
1423
+ content: string;
1424
+ loc: SfcParsedLocationNapi;
1425
+ lang: string | null;
1426
+ setup: boolean;
1427
+ attrs?: Array<SfcParsedAttributeNapi>;
1428
+ }
1429
+
1430
+ export interface SfcParsedStyleNapi {
1431
+ content: string;
1432
+ loc: SfcParsedLocationNapi;
1433
+ lang: string | null;
1434
+ scoped: boolean;
1435
+ module: string | null;
1436
+ attrs?: Array<SfcParsedAttributeNapi>;
1437
+ }
1438
+
1439
+ export interface SfcParsedTemplateNapi {
1440
+ content: string;
1441
+ loc: SfcParsedLocationNapi;
1442
+ lang: string | null;
1443
+ attrs?: Array<SfcParsedAttributeNapi>;
1381
1444
  }
1382
1445
 
1383
1446
  export interface SfcSrcInfoNapi {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/native",
3
- "version": "0.571.0",
3
+ "version": "0.573.0",
4
4
  "description": "High-performance Vue.js compiler - Native bindings",
5
5
  "keywords": [
6
6
  "compiler",
@@ -36,14 +36,14 @@
36
36
  "@napi-rs/cli": "3.6.2"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@vizejs/native-darwin-arm64": "0.571.0",
40
- "@vizejs/native-darwin-x64": "0.571.0",
41
- "@vizejs/native-linux-arm64-gnu": "0.571.0",
42
- "@vizejs/native-linux-arm64-musl": "0.571.0",
43
- "@vizejs/native-linux-x64-gnu": "0.571.0",
44
- "@vizejs/native-linux-x64-musl": "0.571.0",
45
- "@vizejs/native-win32-arm64-msvc": "0.571.0",
46
- "@vizejs/native-win32-x64-msvc": "0.571.0"
39
+ "@vizejs/native-darwin-arm64": "0.573.0",
40
+ "@vizejs/native-darwin-x64": "0.573.0",
41
+ "@vizejs/native-linux-arm64-gnu": "0.573.0",
42
+ "@vizejs/native-linux-arm64-musl": "0.573.0",
43
+ "@vizejs/native-linux-x64-gnu": "0.573.0",
44
+ "@vizejs/native-linux-x64-musl": "0.573.0",
45
+ "@vizejs/native-win32-arm64-msvc": "0.573.0",
46
+ "@vizejs/native-win32-x64-msvc": "0.573.0"
47
47
  },
48
48
  "napi": {
49
49
  "binaryName": "vize-vitrine",