@vue-jsx/runtime 3.3.0-beta.0 → 3.3.0-beta.1
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/h.d.ts +7 -7
- package/dist/h.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/props.d.ts +2 -2
- package/dist/props.js +2 -2
- package/package.json +1 -1
package/dist/h.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ type RawProps = Record<string, any> & ReservedProps$1;
|
|
|
12
12
|
type RawSlot = (...args: any[]) => NodeChild<() => NodeChild>;
|
|
13
13
|
type RawChildren = NodeChild<() => NodeChild> | RawSlot;
|
|
14
14
|
type RawSlots = Record<string, RawSlot>;
|
|
15
|
-
declare function
|
|
16
|
-
declare function
|
|
17
|
-
declare function
|
|
18
|
-
declare function
|
|
19
|
-
declare function
|
|
20
|
-
declare function
|
|
15
|
+
declare function vaporH<K extends string>(type: K, props?: (RawProps & (K extends keyof HTMLElementTagNameMap ? HTMLElementEventHandler : {})) | null, children?: K extends keyof HTMLElementTagNameMap ? RawChildren : RawChildren | RawSlots): Block;
|
|
16
|
+
declare function vaporH(type: typeof Fragment, props?: ReservedProps$1 | null, children?: RawChildren): Block;
|
|
17
|
+
declare function vaporH(type: typeof VaporTeleport, props: RawProps & TeleportProps, children: RawChildren | RawSlots): Block;
|
|
18
|
+
declare function vaporH(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): Block;
|
|
19
|
+
declare function vaporH<P, E extends EmitsOptions = {}, S extends Record<string, any> = RawSlots>(type: FunctionalVaporComponent<P, E, S>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | S): Block;
|
|
20
|
+
declare function vaporH(type: Component | VaporComponent, props?: RawProps, children?: RawChildren | RawSlots): Block;
|
|
21
21
|
//#endregion
|
|
22
|
-
export {
|
|
22
|
+
export { vaporH };
|
package/dist/h.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createComponent, createProxyComponent, normalizeNode } from "./vapor.js
|
|
|
2
2
|
import * as Vue from "vue";
|
|
3
3
|
//#region src/h.ts
|
|
4
4
|
/* @__NO_SIDE_EFFECTS__ */
|
|
5
|
-
function
|
|
5
|
+
function vaporH(type, props, children) {
|
|
6
6
|
const { props: resolvedProps, key, ref } = resolveProps(props);
|
|
7
7
|
const render = () => {
|
|
8
8
|
const comp = createComponent(type, resolvedProps, children ? typeof children === "object" && !Array.isArray(children) ? new Proxy(children, { get: (target, key, receiver) => createProxyComponent(Reflect.get(target, key, receiver), normalizeNode) }) : { default: typeof children === "function" ? createProxyComponent(children, normalizeNode) : () => normalizeNode(children) } : void 0);
|
|
@@ -30,4 +30,4 @@ function resolveProps(props) {
|
|
|
30
30
|
return resolvedProps;
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
|
-
export {
|
|
33
|
+
export { vaporH };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DirectiveArgs, EmitFnToProps, ExposedToProps, ExtractExposed, IfAny, IsKeyValues, NodeArrayChildren, NodeChild, NodeRef, Prettify, RenderResult, SetupContextToProps, SlotsToProps } from "./types.js";
|
|
2
|
-
import {
|
|
2
|
+
import { vaporH } from "./h.js";
|
|
3
3
|
import { getCurrentInstance, useFullProps, useProps } from "./props.js";
|
|
4
4
|
import { ssrRegisterHelper } from "./ssr.js";
|
|
5
5
|
import { DefineVaporComponent, DefineVaporSetupFnComponent, VaporFor, createComponent, createNodes, createProxyComponent, defineVaporComponent, defineVaporSSRComponent, isBlock, normalizeNode, normalizeVaporSlots, setNodes } from "./vapor.js";
|
|
6
6
|
import { DefineComponent, DefineSetupFnComponent, For, createVNodeCache, defineComponent, normalizeClass, normalizeSlot, normalizeSlots, normalizeVNode } from "./vdom.js";
|
|
7
7
|
import { AbstractView, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AudioHTMLAttributes, BaseEventHandler, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CanvasHTMLAttributes, ChangeEvent, ChangeEventHandler, ClipboardEvent, ClipboardEventHandler, ColHTMLAttributes, ColgroupHTMLAttributes, CompositionEvent, CompositionEventHandler, DataHTMLAttributes, DelHTMLAttributes, DetailsHTMLAttributes, DialogHTMLAttributes, DragEvent, DragEventHandler, EmbedHTMLAttributes, EventHandler, EventHandlers, Events, FieldsetHTMLAttributes, FocusEvent, FocusEventHandler, FormEvent, FormEventHandler, FormHTMLAttributes, HTMLAttributes, HtmlHTMLAttributes, IframeHTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, InputTypeHTMLAttribute, InsHTMLAttributes, IntrinsicElementAttributes, JSX, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, ModifierKey, MouseEvent, MouseEventHandler, NativeElements, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, ProgressHTMLAttributes, QuoteHTMLAttributes, SVGAttributes, ScriptHTMLAttributes, SelectHTMLAttributes, SourceHTMLAttributes, StyleHTMLAttributes, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, UIEvent, UIEventHandler, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler } from "./jsx.js";
|
|
8
8
|
import { shallowRef as useRef } from "vue";
|
|
9
|
-
export { AbstractView, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AudioHTMLAttributes, BaseEventHandler, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CanvasHTMLAttributes, ChangeEvent, ChangeEventHandler, ClipboardEvent, ClipboardEventHandler, ColHTMLAttributes, ColgroupHTMLAttributes, CompositionEvent, CompositionEventHandler, DataHTMLAttributes, DefineComponent, DefineSetupFnComponent, DefineVaporComponent, DefineVaporSetupFnComponent, DelHTMLAttributes, DetailsHTMLAttributes, DialogHTMLAttributes, DirectiveArgs, DragEvent, DragEventHandler, EmbedHTMLAttributes, EmitFnToProps, EventHandler, EventHandlers, Events, ExposedToProps, ExtractExposed, FieldsetHTMLAttributes, FocusEvent, FocusEventHandler, For, FormEvent, FormEventHandler, FormHTMLAttributes, HTMLAttributes, HtmlHTMLAttributes, IfAny, IframeHTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, InputTypeHTMLAttribute, InsHTMLAttributes, IntrinsicElementAttributes, IsKeyValues, JSX, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, ModifierKey, MouseEvent, MouseEventHandler, NativeElements, NodeArrayChildren, NodeChild, NodeRef, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, Prettify, ProgressHTMLAttributes, QuoteHTMLAttributes, RenderResult, SVGAttributes, ScriptHTMLAttributes, SelectHTMLAttributes, SetupContextToProps, SlotsToProps, SourceHTMLAttributes, StyleHTMLAttributes, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, UIEvent, UIEventHandler, VaporFor, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler, createComponent, createNodes, createProxyComponent, createVNodeCache, defineComponent, defineVaporComponent, defineVaporSSRComponent, getCurrentInstance,
|
|
9
|
+
export { AbstractView, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AudioHTMLAttributes, BaseEventHandler, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CanvasHTMLAttributes, ChangeEvent, ChangeEventHandler, ClipboardEvent, ClipboardEventHandler, ColHTMLAttributes, ColgroupHTMLAttributes, CompositionEvent, CompositionEventHandler, DataHTMLAttributes, DefineComponent, DefineSetupFnComponent, DefineVaporComponent, DefineVaporSetupFnComponent, DelHTMLAttributes, DetailsHTMLAttributes, DialogHTMLAttributes, DirectiveArgs, DragEvent, DragEventHandler, EmbedHTMLAttributes, EmitFnToProps, EventHandler, EventHandlers, Events, ExposedToProps, ExtractExposed, FieldsetHTMLAttributes, FocusEvent, FocusEventHandler, For, FormEvent, FormEventHandler, FormHTMLAttributes, HTMLAttributes, HtmlHTMLAttributes, IfAny, IframeHTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, InputTypeHTMLAttribute, InsHTMLAttributes, IntrinsicElementAttributes, IsKeyValues, JSX, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, ModifierKey, MouseEvent, MouseEventHandler, NativeElements, NodeArrayChildren, NodeChild, NodeRef, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, Prettify, ProgressHTMLAttributes, QuoteHTMLAttributes, RenderResult, SVGAttributes, ScriptHTMLAttributes, SelectHTMLAttributes, SetupContextToProps, SlotsToProps, SourceHTMLAttributes, StyleHTMLAttributes, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, UIEvent, UIEventHandler, VaporFor, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler, createComponent, createNodes, createProxyComponent, createVNodeCache, defineComponent, defineVaporComponent, defineVaporSSRComponent, getCurrentInstance, isBlock, normalizeClass, normalizeNode, normalizeSlot, normalizeSlots, normalizeVNode, normalizeVaporSlots, setNodes, ssrRegisterHelper, useFullProps, useProps, useRef, vaporH };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VaporFor, createComponent, createNodes, createProxyComponent, defineVaporComponent, defineVaporSSRComponent, isBlock, normalizeNode, normalizeVaporSlots, setNodes } from "./vapor.js";
|
|
2
|
-
import {
|
|
2
|
+
import { vaporH } from "./h.js";
|
|
3
3
|
import { getCurrentInstance, useFullProps, useProps } from "./props.js";
|
|
4
4
|
import { ssrRegisterHelper } from "./ssr.js";
|
|
5
5
|
import { For, createVNodeCache, defineComponent, normalizeClass, normalizeSlot, normalizeSlots, normalizeVNode } from "./vdom.js";
|
|
6
6
|
import { shallowRef as useRef } from "vue";
|
|
7
|
-
export { For, VaporFor, createComponent, createNodes, createProxyComponent, createVNodeCache, defineComponent, defineVaporComponent, defineVaporSSRComponent, getCurrentInstance,
|
|
7
|
+
export { For, VaporFor, createComponent, createNodes, createProxyComponent, createVNodeCache, defineComponent, defineVaporComponent, defineVaporSSRComponent, getCurrentInstance, isBlock, normalizeClass, normalizeNode, normalizeSlot, normalizeSlots, normalizeVNode, normalizeVaporSlots, setNodes, ssrRegisterHelper, useFullProps, useProps, useRef, vaporH };
|
package/dist/props.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare function getCurrentInstance(): _$vue.GenericComponentInstance | null;
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* import { useProps } from 'vue-jsx
|
|
10
|
+
* import { useProps } from 'vue-jsx'
|
|
11
11
|
*
|
|
12
12
|
* defineComponent(({ foo = '' })=>{
|
|
13
13
|
* const props = useProps() // { foo: '' }
|
|
@@ -23,7 +23,7 @@ declare function useProps(): {
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```tsx
|
|
26
|
-
* import { useFullProps } from 'vue-jsx
|
|
26
|
+
* import { useFullProps } from 'vue-jsx'
|
|
27
27
|
*
|
|
28
28
|
* defineComponent((props) => {
|
|
29
29
|
* const fullProps = useFullProps() // = useAttrs() + useProps()
|
package/dist/props.js
CHANGED
|
@@ -10,7 +10,7 @@ function getCurrentInstance() {
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
13
|
-
* import { useProps } from 'vue-jsx
|
|
13
|
+
* import { useProps } from 'vue-jsx'
|
|
14
14
|
*
|
|
15
15
|
* defineComponent(({ foo = '' })=>{
|
|
16
16
|
* const props = useProps() // { foo: '' }
|
|
@@ -27,7 +27,7 @@ function useProps() {
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* ```tsx
|
|
30
|
-
* import { useFullProps } from 'vue-jsx
|
|
30
|
+
* import { useFullProps } from 'vue-jsx'
|
|
31
31
|
*
|
|
32
32
|
* defineComponent((props) => {
|
|
33
33
|
* const fullProps = useFullProps() // = useAttrs() + useProps()
|