@vue-jsx-vapor/runtime 2.6.0 → 2.6.2

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.
@@ -7,7 +7,16 @@ const vue = require_chunk.__toESM(require("vue"));
7
7
  const createComponent = (type, ...args) => {
8
8
  return createProxyComponent(vue.createComponent, type, ...args);
9
9
  };
10
- const createComponentWithFallback = (type, ...args) => createProxyComponent(vue.createComponentWithFallback, type, ...args);
10
+ const createComponentWithFallback = (type, ...args) => {
11
+ const slots = args[1];
12
+ if (typeof type === "string" && slots && slots.default && typeof slots.default === "function") {
13
+ const defaultSlot = slots.default;
14
+ slots.default = () => {
15
+ return createProxyComponent(vue.createComponentWithFallback, defaultSlot, null, null);
16
+ };
17
+ }
18
+ return createProxyComponent(vue.createComponentWithFallback, type, ...args);
19
+ };
11
20
  const createProxyComponent = (createComponent$1, type, props, ...args) => {
12
21
  if (type === vue.Fragment) {
13
22
  type = (_, { slots }) => slots.default();
@@ -6,7 +6,16 @@ import { Fragment, createComponent, createComponentWithFallback } from "vue";
6
6
  const createComponent$1 = (type, ...args) => {
7
7
  return createProxyComponent(createComponent, type, ...args);
8
8
  };
9
- const createComponentWithFallback$1 = (type, ...args) => createProxyComponent(createComponentWithFallback, type, ...args);
9
+ const createComponentWithFallback$1 = (type, ...args) => {
10
+ const slots = args[1];
11
+ if (typeof type === "string" && slots && slots.default && typeof slots.default === "function") {
12
+ const defaultSlot = slots.default;
13
+ slots.default = () => {
14
+ return createProxyComponent(createComponentWithFallback, defaultSlot, null, null);
15
+ };
16
+ }
17
+ return createProxyComponent(createComponentWithFallback, type, ...args);
18
+ };
10
19
  const createProxyComponent = (createComponent$2, type, props, ...args) => {
11
20
  if (type === Fragment) {
12
21
  type = (_, { slots }) => slots.default();
@@ -1,6 +1,6 @@
1
1
  require('./block-Ce05UNsp.cjs');
2
2
  require('./helpers-z4TWV9SY.cjs');
3
- const require_component = require('./component-BHAqMOe7.cjs');
3
+ const require_component = require('./component-CYhpM6xy.cjs');
4
4
 
5
5
  exports.createComponent = require_component.createComponent;
6
6
  exports.createComponentWithFallback = require_component.createComponentWithFallback;
package/dist/component.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./block-CyA0ggJw.js";
2
2
  import "./helpers-C0DfvsA-.js";
3
- import { createComponent, createComponentWithFallback } from "./component-DAbq6g1p.js";
3
+ import { createComponent, createComponentWithFallback } from "./component-CpEIVhMJ.js";
4
4
 
5
5
  export { createComponent, createComponentWithFallback };
@@ -13,7 +13,7 @@ interface Constructor<P = any> {
13
13
  type HTMLElementEventHandler = { [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any };
14
14
  type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
15
15
  type RawProps = Record<string, any>;
16
- type ResolveProps<T> = T extends null | undefined ? T : () => T | T;
16
+ type ResolveProps<T> = T extends null | undefined ? T : (() => T) | T;
17
17
  declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: NodeChild): Block;
18
18
  declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: ResolveProps<RawProps & HTMLElementEventHandler> | null, children?: NodeChild | RawSlots): Block;
19
19
  declare function h(type: string, children?: NodeChild): Block;
@@ -13,7 +13,7 @@ interface Constructor<P = any> {
13
13
  type HTMLElementEventHandler = { [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any };
14
14
  type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
15
15
  type RawProps = Record<string, any>;
16
- type ResolveProps<T> = T extends null | undefined ? T : () => T | T;
16
+ type ResolveProps<T> = T extends null | undefined ? T : (() => T) | T;
17
17
  declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: NodeChild): Block;
18
18
  declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: ResolveProps<RawProps & HTMLElementEventHandler> | null, children?: NodeChild | RawSlots): Block;
19
19
  declare function h(type: string, children?: NodeChild): Block;
@@ -1,5 +1,5 @@
1
1
  import { isBlock } from "./block-CyA0ggJw.js";
2
- import { createComponentWithFallback } from "./component-DAbq6g1p.js";
2
+ import { createComponentWithFallback } from "./component-CpEIVhMJ.js";
3
3
 
4
4
  //#region src/h.ts
5
5
  function h(type, propsOrChildren, children) {
@@ -1,5 +1,5 @@
1
1
  const require_block = require('./block-Ce05UNsp.cjs');
2
- const require_component = require('./component-BHAqMOe7.cjs');
2
+ const require_component = require('./component-CYhpM6xy.cjs');
3
3
 
4
4
  //#region src/h.ts
5
5
  function h(type, propsOrChildren, children) {
package/dist/h.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  require('./block-Ce05UNsp.cjs');
2
2
  require('./helpers-z4TWV9SY.cjs');
3
- require('./component-BHAqMOe7.cjs');
4
- const require_h = require('./h-yXUW23HD.cjs');
3
+ require('./component-CYhpM6xy.cjs');
4
+ const require_h = require('./h-Dk0b-awG.cjs');
5
5
 
6
6
  exports.h = require_h.h;
package/dist/h.d.cts CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./block-C2Eqyw1w.cjs";
2
- import { h } from "./h-mLWlHa8R.cjs";
2
+ import { h } from "./h-CciLjiMS.cjs";
3
3
  export { h };
package/dist/h.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./block-pPxpKsmV.js";
2
- import { h } from "./h-DutSRaoO.js";
2
+ import { h } from "./h-D6bW_i_y.js";
3
3
  export { h };
package/dist/h.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./block-CyA0ggJw.js";
2
2
  import "./helpers-C0DfvsA-.js";
3
- import "./component-DAbq6g1p.js";
4
- import { h } from "./h-76H4kJgw.js";
3
+ import "./component-CpEIVhMJ.js";
4
+ import { h } from "./h-D8Dfh6Ov.js";
5
5
 
6
6
  export { h };
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
2
  const require_block = require('./block-Ce05UNsp.cjs');
3
3
  const require_helpers = require('./helpers-z4TWV9SY.cjs');
4
- const require_component = require('./component-BHAqMOe7.cjs');
5
- const require_h = require('./h-yXUW23HD.cjs');
4
+ const require_component = require('./component-CYhpM6xy.cjs');
5
+ const require_h = require('./h-Dk0b-awG.cjs');
6
6
  require('./jsx-CTAfwhvm.cjs');
7
7
  const require_node = require('./node-BLet7XpW.cjs');
8
8
  const vue = require_chunk.__toESM(require("vue"));
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NodeArrayChildren, NodeChild, isBlock, normalizeNode } from "./block-C2Eqyw1w.cjs";
2
2
  import { createComponent, createComponentWithFallback } from "./component-BkffHjyR.cjs";
3
- import { h } from "./h-mLWlHa8R.cjs";
3
+ import { h } from "./h-CciLjiMS.cjs";
4
4
  import { getCurrentInstance, useFullProps, useProps } from "./helpers-DeLHxsS2.cjs";
5
5
  import { AbstractView, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AriaAttributes, AudioHTMLAttributes, BaseEventHandler, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CSSProperties, 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, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, ModifierKey, MouseEvent, MouseEventHandler, NativeElements, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, ProgressHTMLAttributes, QuoteHTMLAttributes, ReservedProps, SVGAttributes, ScriptHTMLAttributes, SelectHTMLAttributes, SourceHTMLAttributes, StyleHTMLAttributes, StyleValue, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, UIEvent, UIEventHandler, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler } from "./jsx-EFPAy-wt.cjs";
6
6
  import { createNodes, setNodes } from "./node-w0ksMVPx.cjs";
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NodeArrayChildren, NodeChild, isBlock, normalizeNode } from "./block-pPxpKsmV.js";
2
2
  import { createComponent, createComponentWithFallback } from "./component-CG7Pcj6B.js";
3
- import { h } from "./h-DutSRaoO.js";
3
+ import { h } from "./h-D6bW_i_y.js";
4
4
  import { getCurrentInstance, useFullProps, useProps } from "./helpers-BvOzWbq1.js";
5
5
  import { AbstractView, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AriaAttributes, AudioHTMLAttributes, BaseEventHandler, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CSSProperties, 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, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, ModifierKey, MouseEvent, MouseEventHandler, NativeElements, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, ProgressHTMLAttributes, QuoteHTMLAttributes, ReservedProps, SVGAttributes, ScriptHTMLAttributes, SelectHTMLAttributes, SourceHTMLAttributes, StyleHTMLAttributes, StyleValue, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, UIEvent, UIEventHandler, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler } from "./jsx-CRoDhX85.js";
6
6
  import { createNodes, setNodes } from "./node-DLEa8Cxk.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isBlock, normalizeNode } from "./block-CyA0ggJw.js";
2
2
  import { getCurrentInstance, useFullProps, useProps } from "./helpers-C0DfvsA-.js";
3
- import { createComponent, createComponentWithFallback } from "./component-DAbq6g1p.js";
4
- import { h } from "./h-76H4kJgw.js";
3
+ import { createComponent, createComponentWithFallback } from "./component-CpEIVhMJ.js";
4
+ import { h } from "./h-D8Dfh6Ov.js";
5
5
  import "./jsx-D6bpAbiF.js";
6
6
  import { createNodes, setNodes } from "./node-Bd0fT44y.js";
7
7
  import { shallowRef as useRef } from "vue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-jsx-vapor/runtime",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Vue JSX Vapor Runtime",
5
5
  "type": "module",
6
6
  "keywords": [