@vizejs/native 0.572.0 → 0.574.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 +72 -2
  2. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -98,8 +98,11 @@ export interface BatchCompileOptionsNapi {
98
98
  experimentalSelfComponent?: boolean;
99
99
  experimentalStrictSlotChildren?: boolean;
100
100
  experimentalServerScript?: boolean;
101
+ /** Module for generated Vue helpers; preserves authored imports and the SSR renderer. */
101
102
  runtimeModuleName?: string;
103
+ /** Runtime global expression for standalone (`mode: "function"`) output. */
102
104
  runtimeGlobalName?: string;
105
+ /** Runtime dialect selector; omitted or "3" uses Vue 3. Legacy code generation is unavailable. */
103
106
  vueVersion?: string;
104
107
  styleTrim?: boolean;
105
108
  templateCacheHandlers?: boolean;
@@ -317,7 +320,10 @@ export interface CompilerOptions {
317
320
  experimentalStrictSlotChildren?: boolean;
318
321
  /** Enable experimental server-script related RFC surface. */
319
322
  experimentalServerScript?: boolean;
320
- /** Module name for runtime imports. */
323
+ /**
324
+ * Module for compiler-generated Vue helpers. Authored module imports and the
325
+ * SSR renderer module retain their own sources. Defaults to "vue".
326
+ */
321
327
  runtimeModuleName?: string;
322
328
  /** Global variable name for standalone/function mode. */
323
329
  runtimeGlobalName?: string;
@@ -1081,7 +1087,7 @@ export interface SfcAnalyzeOptions {
1081
1087
  export declare function parseSfc(
1082
1088
  source: string,
1083
1089
  options?: SfcParseOptionsNapi | undefined | null,
1084
- ): any;
1090
+ ): SfcParseResultNapi;
1085
1091
 
1086
1092
  /** Parse template to AST only */
1087
1093
  export declare function parseTemplate(
@@ -1331,8 +1337,11 @@ export interface SfcCompileOptionsNapi {
1331
1337
  experimentalSelfComponent?: boolean;
1332
1338
  experimentalStrictSlotChildren?: boolean;
1333
1339
  experimentalServerScript?: boolean;
1340
+ /** Module for generated Vue helpers; preserves authored imports and the SSR renderer. */
1334
1341
  runtimeModuleName?: string;
1342
+ /** Runtime global expression for standalone (`mode: "function"`) output. */
1335
1343
  runtimeGlobalName?: string;
1344
+ /** Runtime dialect selector; omitted or "3" uses Vue 3. Legacy code generation is unavailable. */
1336
1345
  vueVersion?: string;
1337
1346
  styleTrim?: boolean;
1338
1347
  templateCacheHandlers?: boolean;
@@ -1378,6 +1387,67 @@ export interface SfcElementOrderOptionsNapi {
1378
1387
 
1379
1388
  export interface SfcParseOptionsNapi {
1380
1389
  filename?: string;
1390
+ /** Include effective parser attributes in authored name order. */
1391
+ includeAttrs?: boolean;
1392
+ }
1393
+
1394
+ export interface SfcParseResultNapi {
1395
+ filename: string;
1396
+ source: string;
1397
+ template: SfcParsedTemplateNapi | null;
1398
+ script: SfcParsedScriptNapi | null;
1399
+ scriptSetup: SfcParsedScriptNapi | null;
1400
+ styles: Array<SfcParsedStyleNapi>;
1401
+ customBlocks: Array<SfcParsedCustomBlockNapi>;
1402
+ }
1403
+
1404
+ /** An effective parsed attribute. Boolean and empty values remain empty strings. */
1405
+ export interface SfcParsedAttributeNapi {
1406
+ name: string;
1407
+ value: string;
1408
+ }
1409
+
1410
+ export interface SfcParsedCustomBlockNapi {
1411
+ type: string;
1412
+ content: string;
1413
+ loc: SfcParsedLocationNapi;
1414
+ attrs?: Array<SfcParsedAttributeNapi>;
1415
+ }
1416
+
1417
+ /** All offsets and columns use UTF-8 bytes in the original source. */
1418
+ export interface SfcParsedLocationNapi {
1419
+ start: number;
1420
+ end: number;
1421
+ tagStart: number;
1422
+ tagEnd: number;
1423
+ startLine: number;
1424
+ startColumn: number;
1425
+ endLine: number;
1426
+ endColumn: number;
1427
+ }
1428
+
1429
+ export interface SfcParsedScriptNapi {
1430
+ content: string;
1431
+ loc: SfcParsedLocationNapi;
1432
+ lang: string | null;
1433
+ setup: boolean;
1434
+ attrs?: Array<SfcParsedAttributeNapi>;
1435
+ }
1436
+
1437
+ export interface SfcParsedStyleNapi {
1438
+ content: string;
1439
+ loc: SfcParsedLocationNapi;
1440
+ lang: string | null;
1441
+ scoped: boolean;
1442
+ module: string | null;
1443
+ attrs?: Array<SfcParsedAttributeNapi>;
1444
+ }
1445
+
1446
+ export interface SfcParsedTemplateNapi {
1447
+ content: string;
1448
+ loc: SfcParsedLocationNapi;
1449
+ lang: string | null;
1450
+ attrs?: Array<SfcParsedAttributeNapi>;
1381
1451
  }
1382
1452
 
1383
1453
  export interface SfcSrcInfoNapi {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/native",
3
- "version": "0.572.0",
3
+ "version": "0.574.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.572.0",
40
- "@vizejs/native-darwin-x64": "0.572.0",
41
- "@vizejs/native-linux-arm64-gnu": "0.572.0",
42
- "@vizejs/native-linux-arm64-musl": "0.572.0",
43
- "@vizejs/native-linux-x64-gnu": "0.572.0",
44
- "@vizejs/native-linux-x64-musl": "0.572.0",
45
- "@vizejs/native-win32-arm64-msvc": "0.572.0",
46
- "@vizejs/native-win32-x64-msvc": "0.572.0"
39
+ "@vizejs/native-darwin-arm64": "0.574.0",
40
+ "@vizejs/native-darwin-x64": "0.574.0",
41
+ "@vizejs/native-linux-arm64-gnu": "0.574.0",
42
+ "@vizejs/native-linux-arm64-musl": "0.574.0",
43
+ "@vizejs/native-linux-x64-gnu": "0.574.0",
44
+ "@vizejs/native-linux-x64-musl": "0.574.0",
45
+ "@vizejs/native-win32-arm64-msvc": "0.574.0",
46
+ "@vizejs/native-win32-x64-msvc": "0.574.0"
47
47
  },
48
48
  "napi": {
49
49
  "binaryName": "vize-vitrine",