vize 0.548.0 → 0.550.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.
@@ -0,0 +1,24 @@
1
+ /** Shared type helpers imported by Vize Content Mapper virtual modules. */
2
+ type VizeIsAny<T> = 0 extends 1 & T ? true : false;
3
+
4
+ export type VizeComponentAttrCamel<S extends string> = S extends `${infer Head}-${infer Tail}`
5
+ ? `${Head}${Capitalize<VizeComponentAttrCamel<Tail>>}`
6
+ : S;
7
+
8
+ // @ts-ignore TS2694/TS2307: older or temporarily unavailable Vue types degrade to unchecked attrs.
9
+ type VizeNativeElements = import("vue").NativeElements;
10
+
11
+ type VizeNativeElementNames = Extract<keyof VizeNativeElements, string>;
12
+
13
+ type VizeComponentNativeAttrNames = {
14
+ [K in VizeNativeElementNames]: Extract<keyof VizeNativeElements[K], string>;
15
+ }[VizeNativeElementNames];
16
+
17
+ export type VizeComponentGlobalHtmlAttrs =
18
+ VizeIsAny<VizeNativeElements> extends true
19
+ ? {}
20
+ : {
21
+ [K in VizeComponentNativeAttrNames as K | VizeComponentAttrCamel<K>]?: unknown;
22
+ } & {
23
+ [K in `data-${string}` | `data${Capitalize<string>}`]?: unknown;
24
+ };
@@ -0,0 +1,24 @@
1
+ /** Shared type helpers imported by Vize Content Mapper virtual modules. */
2
+ type VizeIsAny<T> = 0 extends 1 & T ? true : false;
3
+
4
+ export type VizeComponentAttrCamel<S extends string> = S extends `${infer Head}-${infer Tail}`
5
+ ? `${Head}${Capitalize<VizeComponentAttrCamel<Tail>>}`
6
+ : S;
7
+
8
+ // @ts-ignore TS2694/TS2307: older or temporarily unavailable Vue types degrade to unchecked attrs.
9
+ type VizeNativeElements = import("vue").NativeElements;
10
+
11
+ type VizeNativeElementNames = Extract<keyof VizeNativeElements, string>;
12
+
13
+ type VizeComponentNativeAttrNames = {
14
+ [K in VizeNativeElementNames]: Extract<keyof VizeNativeElements[K], string>;
15
+ }[VizeNativeElementNames];
16
+
17
+ export type VizeComponentGlobalHtmlAttrs =
18
+ VizeIsAny<VizeNativeElements> extends true
19
+ ? {}
20
+ : {
21
+ [K in VizeComponentNativeAttrNames as K | VizeComponentAttrCamel<K>]?: unknown;
22
+ } & {
23
+ [K in `data-${string}` | `data${Capitalize<string>}`]?: unknown;
24
+ };
@@ -0,0 +1,24 @@
1
+ /** Shared type helpers imported by Vize Content Mapper virtual modules. */
2
+ type VizeIsAny<T> = 0 extends 1 & T ? true : false;
3
+
4
+ export type VizeComponentAttrCamel<S extends string> = S extends `${infer Head}-${infer Tail}`
5
+ ? `${Head}${Capitalize<VizeComponentAttrCamel<Tail>>}`
6
+ : S;
7
+
8
+ // @ts-ignore TS2694/TS2307: older or temporarily unavailable Vue types degrade to unchecked attrs.
9
+ type VizeNativeElements = import("vue").NativeElements;
10
+
11
+ type VizeNativeElementNames = Extract<keyof VizeNativeElements, string>;
12
+
13
+ type VizeComponentNativeAttrNames = {
14
+ [K in VizeNativeElementNames]: Extract<keyof VizeNativeElements[K], string>;
15
+ }[VizeNativeElementNames];
16
+
17
+ export type VizeComponentGlobalHtmlAttrs =
18
+ VizeIsAny<VizeNativeElements> extends true
19
+ ? {}
20
+ : {
21
+ [K in VizeComponentNativeAttrNames as K | VizeComponentAttrCamel<K>]?: unknown;
22
+ } & {
23
+ [K in `data-${string}` | `data${Capitalize<string>}`]?: unknown;
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vize",
3
- "version": "0.548.0",
3
+ "version": "0.550.0",
4
4
  "description": "Vize - High-performance Vue.js toolchain in Rust",
5
5
  "keywords": [
6
6
  "cli",
@@ -27,6 +27,9 @@
27
27
  },
28
28
  "files": [
29
29
  "bin",
30
+ "content-mapper-helpers.d.cts",
31
+ "content-mapper-helpers.d.mts",
32
+ "content-mapper-helpers.d.ts",
30
33
  "dist",
31
34
  "src",
32
35
  "schemas",
@@ -46,6 +49,15 @@
46
49
  "default": "./dist/config.mjs",
47
50
  "types": "./dist/config.d.mts"
48
51
  },
52
+ "./content-mapper-helpers": {
53
+ "import": {
54
+ "types": "./content-mapper-helpers.d.mts"
55
+ },
56
+ "require": {
57
+ "types": "./content-mapper-helpers.d.cts"
58
+ },
59
+ "types": "./content-mapper-helpers.d.ts"
60
+ },
49
61
  "./schemas/vize.config.schema.json": "./schemas/vize.config.schema.json",
50
62
  "./pkl/vize.pkl": "./pkl/vize.pkl"
51
63
  },
@@ -53,7 +65,7 @@
53
65
  "access": "public"
54
66
  },
55
67
  "dependencies": {
56
- "@vizejs/native": "0.548.0",
68
+ "@vizejs/native": "0.550.0",
57
69
  "oxc-transform": "0.144.0"
58
70
  },
59
71
  "devDependencies": {