vue-jsx-vapor 2.5.4-beta.1 → 2.6.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/dist/index.js CHANGED
@@ -1,148 +1 @@
1
- import * as Vue from "vue";
2
- import { EffectScope, Fragment, VaporFragment, createComponent as createComponent$1, createComponentWithFallback as createComponentWithFallback$1, createTextNode, insert, isFragment, isVaporComponent, proxyRefs, remove, renderEffect, shallowRef as useRef, toRefs, useAttrs } from "vue";
3
-
4
- //#region src/core/runtime.ts
5
- function isBlock(val) {
6
- return val instanceof Node || Array.isArray(val) || isVaporComponent(val) || isFragment(val);
7
- }
8
- function getCurrentInstance() {
9
- return Vue.currentInstance || Vue.getCurrentInstance();
10
- }
11
- const createProxyComponent = (createComponent$2, type, props, ...args) => {
12
- if (type === Fragment) {
13
- type = (_, { slots }) => slots.default();
14
- props = null;
15
- }
16
- if (Vue.currentInstance && Vue.currentInstance.appContext.vapor) typeof type === "function" && (type.__vapor = true);
17
- return createComponent$2(type, props, ...args);
18
- };
19
- const createComponent = (type, ...args) => {
20
- return createProxyComponent(createComponent$1, type, ...args);
21
- };
22
- const createComponentWithFallback = (type, ...args) => createProxyComponent(createComponentWithFallback$1, type, ...args);
23
- /**
24
- * Returns the props of the current component instance.
25
- *
26
- * @example
27
- * ```tsx
28
- * import { useProps } from 'vue-jsx-vapor'
29
- *
30
- * defineComponent(({ foo = '' })=>{
31
- * const props = useProps() // { foo: '' }
32
- * })
33
- * ```
34
- */
35
- function useProps() {
36
- const i = getCurrentInstance();
37
- return i.props;
38
- }
39
- /**
40
- * Returns the merged props and attrs of the current component.\
41
- * Equivalent to `useProps()` + `useAttrs()`.
42
- *
43
- * @example
44
- * ```tsx
45
- * import { useFullProps } from 'vue-jsx-vapor'
46
- *
47
- * defineComponent((props) => {
48
- * const fullProps = useFullProps() // = useAttrs() + useProps()
49
- * })
50
- */
51
- function useFullProps() {
52
- return proxyRefs({
53
- ...toRefs(useProps()),
54
- ...toRefs(useAttrs())
55
- });
56
- }
57
- function createFragment(nodes, anchor = document.createTextNode("")) {
58
- const frag = new VaporFragment(nodes);
59
- frag.anchor = anchor;
60
- return frag;
61
- }
62
- function normalizeNode$1(node, anchor) {
63
- if (node instanceof Node || isFragment(node)) {
64
- anchor && (anchor.textContent = "");
65
- return node;
66
- } else if (isVaporComponent(node)) {
67
- anchor && (anchor.textContent = "");
68
- return createFragment(node, anchor);
69
- } else if (Array.isArray(node)) {
70
- anchor && (anchor.textContent = "");
71
- return createFragment(node.map((i) => normalizeNode$1(i)), anchor);
72
- } else {
73
- const result = node == null || typeof node === "boolean" ? "" : String(node);
74
- if (anchor) {
75
- anchor.textContent = result;
76
- return anchor;
77
- } else return document.createTextNode(result);
78
- }
79
- }
80
- function resolveValue(current, value, _anchor) {
81
- const node = normalizeNode$1(value, _anchor);
82
- if (current) {
83
- if (isFragment(current)) {
84
- const { anchor } = current;
85
- if (anchor && anchor.parentNode) {
86
- remove(current.nodes, anchor.parentNode);
87
- insert(node, anchor.parentNode, anchor);
88
- !_anchor && anchor.parentNode.removeChild(anchor);
89
- }
90
- } else if (current instanceof Node) {
91
- if (isFragment(node) && current.parentNode) {
92
- insert(node, current.parentNode, current);
93
- current.parentNode.removeChild(current);
94
- } else if (node instanceof Node) {
95
- if (current.nodeType === 3 && node.nodeType === 3) {
96
- current.textContent = node.textContent;
97
- return current;
98
- } else if (current.parentNode) current.parentNode.replaceChild(node, current);
99
- }
100
- }
101
- }
102
- return node;
103
- }
104
- function resolveValues(values = [], _anchor) {
105
- const nodes = [];
106
- const frag = createFragment(nodes, _anchor);
107
- const scopes = [];
108
- for (const [index, value] of values.entries()) {
109
- const anchor = index === values.length - 1 ? _anchor : void 0;
110
- if (typeof value === "function") renderEffect(() => {
111
- if (scopes[index]) scopes[index].stop();
112
- scopes[index] = new EffectScope();
113
- nodes[index] = scopes[index].run(() => resolveValue(nodes[index], value(), anchor));
114
- });
115
- else nodes[index] = resolveValue(nodes[index], value, anchor);
116
- }
117
- return frag;
118
- }
119
- function setNodes(anchor, ...values) {
120
- const resolvedValues = resolveValues(values, anchor);
121
- anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor);
122
- }
123
- function createNodes(...values) {
124
- return resolveValues(values);
125
- }
126
-
127
- //#endregion
128
- //#region src/core/h.ts
129
- function normalizeNode(node) {
130
- if (node == null || typeof node === "boolean") return [];
131
- else if (Array.isArray(node) && node.length) return node.map(normalizeNode);
132
- else if (isBlock(node)) return node;
133
- else return createTextNode(String(node));
134
- }
135
- function h(type, propsOrChildren, children) {
136
- const l = arguments.length;
137
- if (l === 2) if (typeof propsOrChildren === "object" && !Array.isArray(propsOrChildren)) {
138
- if (isBlock(propsOrChildren)) return createComponentWithFallback(type, null, { default: () => normalizeNode(propsOrChildren) });
139
- return createComponentWithFallback(type, propsOrChildren ? { $: [() => propsOrChildren] } : null);
140
- } else return createComponentWithFallback(type, null, { default: () => normalizeNode(propsOrChildren) });
141
- else {
142
- if (l > 3) children = Array.prototype.slice.call(arguments, 2);
143
- return createComponentWithFallback(type, propsOrChildren ? { $: [() => propsOrChildren] } : null, children ? typeof children === "object" && !Array.isArray(children) ? children : { default: () => normalizeNode(children) } : void 0);
144
- }
145
- }
146
-
147
- //#endregion
148
- export { createComponent, createComponentWithFallback, createNodes, getCurrentInstance, h, isBlock, setNodes, useFullProps, useProps, useRef };
1
+ export * from "@vue-jsx-vapor/runtime"
package/dist/nuxt.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Options } from "./options-jKAq0dFf.cjs";
2
- import * as _nuxt_schema9 from "@nuxt/schema";
2
+ import * as _nuxt_schema2 from "@nuxt/schema";
3
3
 
4
4
  //#region src/nuxt.d.ts
5
5
  interface ModuleOptions extends Options {}
6
- declare const _default: _nuxt_schema9.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
+ declare const _default: _nuxt_schema2.NuxtModule<ModuleOptions, ModuleOptions, false>;
7
7
  //#endregion
8
8
  export { ModuleOptions, _default as default };
package/dist/nuxt.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Options } from "./options-CBMw6D8V.js";
2
- import * as _nuxt_schema0 from "@nuxt/schema";
2
+ import * as _nuxt_schema13 from "@nuxt/schema";
3
3
 
4
4
  //#region src/nuxt.d.ts
5
5
  interface ModuleOptions extends Options {}
6
- declare const _default: _nuxt_schema0.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
+ declare const _default: _nuxt_schema13.NuxtModule<ModuleOptions, ModuleOptions, false>;
7
7
  //#endregion
8
8
  export { ModuleOptions, _default as default };
@@ -1,7 +1,7 @@
1
1
  import { Options } from "./options-jKAq0dFf.cjs";
2
- import * as rollup1 from "rollup";
2
+ import * as rollup10 from "rollup";
3
3
 
4
4
  //#region src/rolldown.d.ts
5
- declare const _default: (options?: Options | undefined) => rollup1.Plugin<any> | rollup1.Plugin<any>[];
5
+ declare const _default: (options?: Options | undefined) => rollup10.Plugin<any> | rollup10.Plugin<any>[];
6
6
  //#endregion
7
7
  export { _default as default };
@@ -1,7 +1,7 @@
1
1
  import { Options } from "./options-CBMw6D8V.js";
2
- import * as rollup10 from "rollup";
2
+ import * as rollup1 from "rollup";
3
3
 
4
4
  //#region src/rolldown.d.ts
5
- declare const _default: (options?: Options | undefined) => rollup10.Plugin<any> | rollup10.Plugin<any>[];
5
+ declare const _default: (options?: Options | undefined) => rollup1.Plugin<any> | rollup1.Plugin<any>[];
6
6
  //#endregion
7
7
  export { _default as default };
package/dist/rollup.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Options } from "./options-jKAq0dFf.cjs";
2
- import * as rollup6 from "rollup";
2
+ import * as rollup7 from "rollup";
3
3
 
4
4
  //#region src/rollup.d.ts
5
- declare const _default: (options?: Options | undefined) => rollup6.Plugin<any>[];
5
+ declare const _default: (options?: Options | undefined) => rollup7.Plugin<any>[];
6
6
  //#endregion
7
7
  export { _default as default };
package/dist/rollup.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Options } from "./options-CBMw6D8V.js";
2
- import * as rollup7 from "rollup";
2
+ import * as rollup8 from "rollup";
3
3
 
4
4
  //#region src/rollup.d.ts
5
- declare const _default: (options?: Options | undefined) => rollup7.Plugin<any>[];
5
+ declare const _default: (options?: Options | undefined) => rollup8.Plugin<any>[];
6
6
  //#endregion
7
7
  export { _default as default };
@@ -1,9 +1,9 @@
1
1
  import { Options } from "./options-jKAq0dFf.cjs";
2
- import * as unplugin8 from "unplugin";
2
+ import * as unplugin5 from "unplugin";
3
3
  import { UnpluginFactory } from "unplugin";
4
4
 
5
5
  //#region src/unplugin.d.ts
6
6
  declare const unpluginFactory: UnpluginFactory<Options | undefined, true>;
7
- declare const unplugin: unplugin8.UnpluginInstance<Options | undefined, true>;
7
+ declare const unplugin: unplugin5.UnpluginInstance<Options | undefined, true>;
8
8
  //#endregion
9
9
  export { Options, unplugin as default, unplugin, unpluginFactory };
@@ -1,9 +1,9 @@
1
1
  import { Options } from "./options-CBMw6D8V.js";
2
- import * as unplugin3 from "unplugin";
2
+ import * as unplugin12 from "unplugin";
3
3
  import { UnpluginFactory } from "unplugin";
4
4
 
5
5
  //#region src/unplugin.d.ts
6
6
  declare const unpluginFactory: UnpluginFactory<Options | undefined, true>;
7
- declare const unplugin: unplugin3.UnpluginInstance<Options | undefined, true>;
7
+ declare const unplugin: unplugin12.UnpluginInstance<Options | undefined, true>;
8
8
  //#endregion
9
9
  export { Options, unplugin as default, unplugin, unpluginFactory };
package/dist/vite.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Options } from "./options-jKAq0dFf.cjs";
2
- import * as vite11 from "vite";
2
+ import * as vite4 from "vite";
3
3
 
4
4
  //#region src/vite.d.ts
5
- declare const _default: (options?: Options | undefined) => vite11.Plugin<any>[];
5
+ declare const _default: (options?: Options | undefined) => vite4.Plugin<any>[];
6
6
  //#endregion
7
7
  export { _default as default };
package/dist/vite.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Options } from "./options-CBMw6D8V.js";
2
- import * as vite5 from "vite";
2
+ import * as vite4 from "vite";
3
3
 
4
4
  //#region src/vite.d.ts
5
- declare const _default: (options?: Options | undefined) => vite5.Plugin<any>[];
5
+ declare const _default: (options?: Options | undefined) => vite4.Plugin<any>[];
6
6
  //#endregion
7
7
  export { _default as default };
package/dist/volar.cjs CHANGED
@@ -6,7 +6,7 @@ const __vue_macros_volar_jsx_ref = require_chunk.__toESM(require("@vue-macros/vo
6
6
  const ts_macro = require_chunk.__toESM(require("ts-macro"));
7
7
 
8
8
  //#region src/volar.ts
9
- const plugin = (0, ts_macro.createPlugin)((ctx, options = ctx.vueCompilerOptions["vue-jsx-vapor"]) => {
9
+ const plugin = (0, ts_macro.createPlugin)((ctx, options = ctx.vueCompilerOptions?.["vue-jsx-vapor"]) => {
10
10
  return [
11
11
  (0, __vue_macros_volar_jsx_directive.default)()(ctx),
12
12
  options?.ref === false ? [] : (0, __vue_macros_volar_jsx_ref.default)(options?.ref === true ? void 0 : options?.ref)(ctx),
package/dist/volar.js CHANGED
@@ -4,7 +4,7 @@ import jsxRef from "@vue-macros/volar/jsx-ref";
4
4
  import { createPlugin } from "ts-macro";
5
5
 
6
6
  //#region src/volar.ts
7
- const plugin = createPlugin((ctx, options = ctx.vueCompilerOptions["vue-jsx-vapor"]) => {
7
+ const plugin = createPlugin((ctx, options = ctx.vueCompilerOptions?.["vue-jsx-vapor"]) => {
8
8
  return [
9
9
  jsxDirective()(ctx),
10
10
  options?.ref === false ? [] : jsxRef(options?.ref === true ? void 0 : options?.ref)(ctx),
package/dist/webpack.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Options } from "./options-CBMw6D8V.js";
2
- import * as webpack13 from "webpack";
2
+ import * as webpack10 from "webpack";
3
3
 
4
4
  //#region src/webpack.d.ts
5
- declare const _default: (options?: Options | undefined) => webpack13.WebpackPluginInstance;
5
+ declare const _default: (options?: Options | undefined) => webpack10.WebpackPluginInstance;
6
6
  //#endregion
7
7
  export { _default as default };
@@ -1,40 +1,52 @@
1
1
  //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
2
+ var __create = Object.create
3
+ var __defProp = Object.defineProperty
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor
5
+ var __getOwnPropNames = Object.getOwnPropertyNames
6
+ var __getProtoOf = Object.getPrototypeOf
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty
8
8
  var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
-
9
+ if ((from && typeof from === 'object') || typeof from === 'function')
10
+ for (
11
+ // eslint-disable-next-line vars-on-top
12
+ var keys = __getOwnPropNames(from), i = 0, n = keys.length, key;
13
+ i < n;
14
+ i++
15
+ ) {
16
+ key = keys[i]
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, {
19
+ get: ((k) => from[k]).bind(null, key),
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
21
+ })
22
+ }
23
+ return to
24
+ }
25
+ var __toESM = (mod, isNodeMode, target) => (
26
+ (target = mod != null ? __create(__getProtoOf(mod)) : {}),
27
+ __copyProps(
28
+ isNodeMode || !mod || !mod.__esModule
29
+ ? __defProp(target, 'default', {
30
+ value: mod,
31
+ enumerable: true,
32
+ })
33
+ : target,
34
+ mod,
35
+ )
36
+ )
23
37
  //#endregion
24
- const vue = __toESM(require("vue"));
25
- const vue_jsx_vapor = __toESM(require("vue-jsx-vapor"));
38
+ const vue = __toESM(require('vue'))
39
+ const vue_jsx_vapor = __toESM(require('vue-jsx-vapor'))
26
40
 
27
- //#region src/jsx-runtime.ts
28
41
  function jsx(type, props, key) {
29
- const { children, ["v-slots"]: vSlots } = props;
30
- delete props.children;
31
- delete props["v-slots"];
32
- if (arguments.length > 2) props.key = key;
33
- return (0, vue_jsx_vapor.h)(type, props, vSlots || children);
42
+ const { children, ['v-slots']: vSlots } = props
43
+ delete props.children
44
+ delete props['v-slots']
45
+ if (arguments.length > 2) props.key = key
46
+ return (0, vue_jsx_vapor.h)(type, props, vSlots || children)
34
47
  }
35
48
 
36
- //#endregion
37
- exports.Fragment = vue.Fragment;
38
- exports.jsx = jsx;
39
- exports.jsxDEV = jsx;
40
- exports.jsxs = jsx;
49
+ exports.Fragment = vue.Fragment
50
+ exports.jsx = jsx
51
+ exports.jsxDEV = jsx
52
+ exports.jsxs = jsx
@@ -1,25 +1,23 @@
1
- import { Block, Fragment } from "vue";
2
- import { NativeElements, ReservedProps, h } from "vue-jsx-vapor";
1
+ import { Fragment, type Block } from 'vue'
2
+ import type { h, NativeElements, ReservedProps } from 'vue-jsx-vapor'
3
3
 
4
- //#region src/jsx-runtime.d.ts
5
- declare function jsx(type: any, props: any, key: any): ReturnType<typeof h>;
4
+ declare function jsx(type: any, props: any, key: any): ReturnType<typeof h>
6
5
  declare global {
7
6
  namespace JSX {
8
- type Element = Block;
7
+ type Element = Block
9
8
  interface ElementClass {
10
- $props: {};
9
+ $props: {}
11
10
  }
12
11
  interface ElementAttributesProperty {
13
- $props: {};
12
+ $props: {}
14
13
  }
15
14
  interface IntrinsicElements extends NativeElements {
16
- [name: string]: any;
15
+ [name: string]: any
17
16
  }
18
17
  interface IntrinsicAttributes extends ReservedProps {
19
- class?: unknown;
20
- style?: unknown;
18
+ class?: unknown
19
+ style?: unknown
21
20
  }
22
21
  }
23
22
  }
24
- //#endregion
25
- export { Fragment, jsx, jsx as jsxDEV, jsx as jsxs };
23
+ export { Fragment, jsx, jsx as jsxDEV, jsx as jsxs }
@@ -1,14 +1,12 @@
1
- import { Fragment } from "vue";
2
- import { h } from "vue-jsx-vapor";
1
+ import { Fragment } from 'vue'
2
+ import { h } from 'vue-jsx-vapor'
3
3
 
4
- //#region src/jsx-runtime.ts
5
4
  function jsx(type, props, key) {
6
- const { children, ["v-slots"]: vSlots } = props;
7
- delete props.children;
8
- delete props["v-slots"];
9
- if (arguments.length > 2) props.key = key;
10
- return h(type, props, vSlots || children);
5
+ const { children, ['v-slots']: vSlots } = props
6
+ delete props.children
7
+ delete props['v-slots']
8
+ if (arguments.length > 2) props.key = key
9
+ return h(type, props, vSlots || children)
11
10
  }
12
11
 
13
- //#endregion
14
- export { Fragment, jsx, jsx as jsxDEV, jsx as jsxs };
12
+ export { Fragment, jsx, jsx as jsxDEV, jsx as jsxs }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-jsx-vapor",
3
- "version": "2.5.4-beta.1",
3
+ "version": "2.6.0",
4
4
  "description": "Convert Vue JSX to Vapor",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -104,13 +104,11 @@
104
104
  },
105
105
  "./jsx-runtime": {
106
106
  "types": "./jsx-runtime/index.d.ts",
107
- "jsx-vapor-dev": "./src/jsx-runtime.ts",
108
107
  "require": "./jsx-runtime/index.cjs",
109
108
  "default": "./jsx-runtime/index.js"
110
109
  },
111
110
  "./jsx-dev-runtime": {
112
111
  "types": "./jsx-runtime/index.d.ts",
113
- "jsx-vapor-dev": "./src/jsx-runtime.ts",
114
112
  "require": "./jsx-runtime/index.cjs",
115
113
  "default": "./jsx-runtime/index.js"
116
114
  },
@@ -139,7 +137,7 @@
139
137
  "esbuild": "*",
140
138
  "rollup": "^3",
141
139
  "vite": ">=3",
142
- "vue": "^3.6.0",
140
+ "vue": "^3.6.0-alpha.2",
143
141
  "webpack": "^4 || ^5"
144
142
  },
145
143
  "peerDependenciesMeta": {
@@ -165,25 +163,24 @@
165
163
  "dependencies": {
166
164
  "@babel/core": "^7.28.0",
167
165
  "@babel/plugin-transform-typescript": "^7.28.0",
168
- "@vue-macros/jsx-directive": "^3.0.0-beta.17",
169
- "@vue-macros/volar": "^3.0.0-beta.17",
166
+ "@vue-macros/jsx-directive": "^3.0.0-beta.19",
167
+ "@vue-macros/volar": "^3.0.0-beta.19",
170
168
  "@vue/babel-plugin-jsx": "^1.4.0",
171
169
  "hash-sum": "^2.0.0",
172
170
  "pathe": "^2.0.3",
173
- "ts-macro": "^0.2.7",
171
+ "ts-macro": "^0.3.1",
174
172
  "unplugin": "^2.3.5",
175
173
  "unplugin-utils": "^0.2.4",
176
- "@vue-jsx-vapor/babel": "2.5.4-beta.1",
177
- "@vue-jsx-vapor/compiler": "2.5.4-beta.1",
178
- "@vue-jsx-vapor/macros": "2.5.4-beta.1"
174
+ "@vue-jsx-vapor/compiler": "2.6.0",
175
+ "@vue-jsx-vapor/macros": "2.6.0",
176
+ "@vue-jsx-vapor/babel": "2.6.0",
177
+ "@vue-jsx-vapor/runtime": "2.6.0"
179
178
  },
180
179
  "devDependencies": {
181
- "@nuxt/kit": "^3.17.6",
182
- "@nuxt/schema": "^3.17.6",
180
+ "@nuxt/kit": "^3.18.0",
181
+ "@nuxt/schema": "^3.18.0",
183
182
  "@types/babel__core": "^7.20.5",
184
- "@types/hash-sum": "^1.0.2",
185
- "csstype": "^3.1.3",
186
- "vue": "3.6.0-alpha.2"
183
+ "@types/hash-sum": "^1.0.2"
187
184
  },
188
185
  "scripts": {
189
186
  "build": "tsdown",
@@ -1,25 +0,0 @@
1
- import { Block, Fragment } from "vue";
2
- import { NativeElements, ReservedProps, h } from "vue-jsx-vapor";
3
-
4
- //#region src/jsx-runtime.d.ts
5
- declare function jsx(type: any, props: any, key: any): ReturnType<typeof h>;
6
- declare global {
7
- namespace JSX {
8
- type Element = Block;
9
- interface ElementClass {
10
- $props: {};
11
- }
12
- interface ElementAttributesProperty {
13
- $props: {};
14
- }
15
- interface IntrinsicElements extends NativeElements {
16
- [name: string]: any;
17
- }
18
- interface IntrinsicAttributes extends ReservedProps {
19
- class?: unknown;
20
- style?: unknown;
21
- }
22
- }
23
- }
24
- //#endregion
25
- export { Fragment, jsx, jsx as jsxDEV, jsx as jsxs };