@vue-jsx-vapor/runtime 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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/dist/block-C2Eqyw1w.d.cts +10 -0
  3. package/dist/block-Ce05UNsp.cjs +27 -0
  4. package/dist/block-CyA0ggJw.js +15 -0
  5. package/dist/block-pPxpKsmV.d.ts +10 -0
  6. package/dist/block.cjs +4 -0
  7. package/dist/block.d.cts +2 -0
  8. package/dist/block.d.ts +2 -0
  9. package/dist/block.js +3 -0
  10. package/dist/chunk-CUT6urMc.cjs +30 -0
  11. package/dist/component-BHAqMOe7.cjs +44 -0
  12. package/dist/component-BkffHjyR.d.cts +9 -0
  13. package/dist/component-CG7Pcj6B.d.ts +9 -0
  14. package/dist/component-DAbq6g1p.js +32 -0
  15. package/dist/component.cjs +6 -0
  16. package/dist/component.d.cts +2 -0
  17. package/dist/component.d.ts +2 -0
  18. package/dist/component.js +5 -0
  19. package/dist/h-76H4kJgw.js +28 -0
  20. package/dist/h-DutSRaoO.d.ts +36 -0
  21. package/dist/h-mLWlHa8R.d.cts +36 -0
  22. package/dist/h-yXUW23HD.cjs +33 -0
  23. package/dist/h.cjs +6 -0
  24. package/dist/h.d.cts +3 -0
  25. package/dist/h.d.ts +3 -0
  26. package/dist/h.js +6 -0
  27. package/dist/helpers-BvOzWbq1.d.ts +37 -0
  28. package/dist/helpers-C0DfvsA-.js +44 -0
  29. package/dist/helpers-DeLHxsS2.d.cts +37 -0
  30. package/dist/helpers-z4TWV9SY.cjs +61 -0
  31. package/dist/helpers.cjs +5 -0
  32. package/dist/helpers.d.cts +2 -0
  33. package/dist/helpers.d.ts +2 -0
  34. package/dist/helpers.js +3 -0
  35. package/dist/index.cjs +25 -0
  36. package/dist/index.d.cts +8 -0
  37. package/dist/index.d.ts +8 -0
  38. package/dist/index.js +9 -0
  39. package/dist/jsx-CRoDhX85.d.ts +1326 -0
  40. package/dist/jsx-CTAfwhvm.cjs +0 -0
  41. package/dist/jsx-D6bpAbiF.js +0 -0
  42. package/dist/jsx-EFPAy-wt.d.cts +1326 -0
  43. package/dist/jsx.cjs +1 -0
  44. package/dist/jsx.d.cts +2 -0
  45. package/dist/jsx.d.ts +2 -0
  46. package/dist/jsx.js +1 -0
  47. package/dist/node-BLet7XpW.cjs +87 -0
  48. package/dist/node-Bd0fT44y.js +75 -0
  49. package/dist/node-DLEa8Cxk.d.ts +7 -0
  50. package/dist/node-w0ksMVPx.d.cts +7 -0
  51. package/dist/node.cjs +4 -0
  52. package/dist/node.d.cts +2 -0
  53. package/dist/node.d.ts +2 -0
  54. package/dist/node.js +3 -0
  55. package/package.json +48 -0
package/dist/jsx.cjs ADDED
@@ -0,0 +1 @@
1
+ require('./jsx-CTAfwhvm.cjs');
package/dist/jsx.d.cts ADDED
@@ -0,0 +1,2 @@
1
+ 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";
2
+ export { 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 };
package/dist/jsx.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ 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";
2
+ export { 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 };
package/dist/jsx.js ADDED
@@ -0,0 +1 @@
1
+ import "./jsx-D6bpAbiF.js";
@@ -0,0 +1,87 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const vue = require_chunk.__toESM(require("vue"));
3
+
4
+ //#region src/node.ts
5
+ function createFragment(nodes, anchor = document.createTextNode("")) {
6
+ const frag = new vue.VaporFragment(nodes);
7
+ frag.anchor = anchor;
8
+ return frag;
9
+ }
10
+ function normalizeNode(node, anchor) {
11
+ if (node instanceof Node || (0, vue.isFragment)(node)) {
12
+ anchor && (anchor.textContent = "");
13
+ return node;
14
+ } else if ((0, vue.isVaporComponent)(node)) {
15
+ anchor && (anchor.textContent = "");
16
+ return createFragment(node, anchor);
17
+ } else if (Array.isArray(node)) {
18
+ anchor && (anchor.textContent = "");
19
+ return createFragment(node.map((i) => normalizeNode(i)), anchor);
20
+ } else {
21
+ const result = node == null || typeof node === "boolean" ? "" : String(node);
22
+ if (anchor) {
23
+ anchor.textContent = result;
24
+ return anchor;
25
+ } else return document.createTextNode(result);
26
+ }
27
+ }
28
+ function resolveValue(current, value, _anchor) {
29
+ const node = normalizeNode(value, _anchor);
30
+ if (current) {
31
+ if ((0, vue.isFragment)(current)) {
32
+ const { anchor } = current;
33
+ if (anchor && anchor.parentNode) {
34
+ (0, vue.remove)(current.nodes, anchor.parentNode);
35
+ (0, vue.insert)(node, anchor.parentNode, anchor);
36
+ !_anchor && anchor.parentNode.removeChild(anchor);
37
+ }
38
+ } else if (current instanceof Node) {
39
+ if ((0, vue.isFragment)(node) && current.parentNode) {
40
+ (0, vue.insert)(node, current.parentNode, current);
41
+ current.parentNode.removeChild(current);
42
+ } else if (node instanceof Node) {
43
+ if (current.nodeType === 3 && node.nodeType === 3) {
44
+ current.textContent = node.textContent;
45
+ return current;
46
+ } else if (current.parentNode) current.parentNode.replaceChild(node, current);
47
+ }
48
+ }
49
+ }
50
+ return node;
51
+ }
52
+ function resolveValues(values = [], _anchor) {
53
+ const nodes = [];
54
+ const frag = createFragment(nodes, _anchor);
55
+ const scopes = [];
56
+ for (const [index, value] of values.entries()) {
57
+ const anchor = index === values.length - 1 ? _anchor : void 0;
58
+ if (typeof value === "function") (0, vue.renderEffect)(() => {
59
+ if (scopes[index]) scopes[index].stop();
60
+ scopes[index] = new vue.EffectScope();
61
+ nodes[index] = scopes[index].run(() => resolveValue(nodes[index], value(), anchor));
62
+ });
63
+ else nodes[index] = resolveValue(nodes[index], value, anchor);
64
+ }
65
+ return frag;
66
+ }
67
+ function setNodes(anchor, ...values) {
68
+ const resolvedValues = resolveValues(values, anchor);
69
+ anchor.parentNode && (0, vue.insert)(resolvedValues, anchor.parentNode, anchor);
70
+ }
71
+ function createNodes(...values) {
72
+ return resolveValues(values);
73
+ }
74
+
75
+ //#endregion
76
+ Object.defineProperty(exports, 'createNodes', {
77
+ enumerable: true,
78
+ get: function () {
79
+ return createNodes;
80
+ }
81
+ });
82
+ Object.defineProperty(exports, 'setNodes', {
83
+ enumerable: true,
84
+ get: function () {
85
+ return setNodes;
86
+ }
87
+ });
@@ -0,0 +1,75 @@
1
+ import { EffectScope, VaporFragment, insert, isFragment, isVaporComponent, remove, renderEffect } from "vue";
2
+
3
+ //#region src/node.ts
4
+ function createFragment(nodes, anchor = document.createTextNode("")) {
5
+ const frag = new VaporFragment(nodes);
6
+ frag.anchor = anchor;
7
+ return frag;
8
+ }
9
+ function normalizeNode(node, anchor) {
10
+ if (node instanceof Node || isFragment(node)) {
11
+ anchor && (anchor.textContent = "");
12
+ return node;
13
+ } else if (isVaporComponent(node)) {
14
+ anchor && (anchor.textContent = "");
15
+ return createFragment(node, anchor);
16
+ } else if (Array.isArray(node)) {
17
+ anchor && (anchor.textContent = "");
18
+ return createFragment(node.map((i) => normalizeNode(i)), anchor);
19
+ } else {
20
+ const result = node == null || typeof node === "boolean" ? "" : String(node);
21
+ if (anchor) {
22
+ anchor.textContent = result;
23
+ return anchor;
24
+ } else return document.createTextNode(result);
25
+ }
26
+ }
27
+ function resolveValue(current, value, _anchor) {
28
+ const node = normalizeNode(value, _anchor);
29
+ if (current) {
30
+ if (isFragment(current)) {
31
+ const { anchor } = current;
32
+ if (anchor && anchor.parentNode) {
33
+ remove(current.nodes, anchor.parentNode);
34
+ insert(node, anchor.parentNode, anchor);
35
+ !_anchor && anchor.parentNode.removeChild(anchor);
36
+ }
37
+ } else if (current instanceof Node) {
38
+ if (isFragment(node) && current.parentNode) {
39
+ insert(node, current.parentNode, current);
40
+ current.parentNode.removeChild(current);
41
+ } else if (node instanceof Node) {
42
+ if (current.nodeType === 3 && node.nodeType === 3) {
43
+ current.textContent = node.textContent;
44
+ return current;
45
+ } else if (current.parentNode) current.parentNode.replaceChild(node, current);
46
+ }
47
+ }
48
+ }
49
+ return node;
50
+ }
51
+ function resolveValues(values = [], _anchor) {
52
+ const nodes = [];
53
+ const frag = createFragment(nodes, _anchor);
54
+ const scopes = [];
55
+ for (const [index, value] of values.entries()) {
56
+ const anchor = index === values.length - 1 ? _anchor : void 0;
57
+ if (typeof value === "function") renderEffect(() => {
58
+ if (scopes[index]) scopes[index].stop();
59
+ scopes[index] = new EffectScope();
60
+ nodes[index] = scopes[index].run(() => resolveValue(nodes[index], value(), anchor));
61
+ });
62
+ else nodes[index] = resolveValue(nodes[index], value, anchor);
63
+ }
64
+ return frag;
65
+ }
66
+ function setNodes(anchor, ...values) {
67
+ const resolvedValues = resolveValues(values, anchor);
68
+ anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor);
69
+ }
70
+ function createNodes(...values) {
71
+ return resolveValues(values);
72
+ }
73
+
74
+ //#endregion
75
+ export { createNodes, setNodes };
@@ -0,0 +1,7 @@
1
+ import { VaporFragment } from "vue";
2
+
3
+ //#region src/node.d.ts
4
+ declare function setNodes(anchor: Node, ...values: any[]): void;
5
+ declare function createNodes(...values: any[]): VaporFragment;
6
+ //#endregion
7
+ export { createNodes, setNodes };
@@ -0,0 +1,7 @@
1
+ import { VaporFragment } from "vue";
2
+
3
+ //#region src/node.d.ts
4
+ declare function setNodes(anchor: Node, ...values: any[]): void;
5
+ declare function createNodes(...values: any[]): VaporFragment;
6
+ //#endregion
7
+ export { createNodes, setNodes };
package/dist/node.cjs ADDED
@@ -0,0 +1,4 @@
1
+ const require_node = require('./node-BLet7XpW.cjs');
2
+
3
+ exports.createNodes = require_node.createNodes;
4
+ exports.setNodes = require_node.setNodes;
@@ -0,0 +1,2 @@
1
+ import { createNodes, setNodes } from "./node-w0ksMVPx.cjs";
2
+ export { createNodes, setNodes };
package/dist/node.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { createNodes, setNodes } from "./node-DLEa8Cxk.js";
2
+ export { createNodes, setNodes };
package/dist/node.js ADDED
@@ -0,0 +1,3 @@
1
+ import { createNodes, setNodes } from "./node-Bd0fT44y.js";
2
+
3
+ export { createNodes, setNodes };
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@vue-jsx-vapor/runtime",
3
+ "version": "2.6.0",
4
+ "description": "Vue JSX Vapor Runtime",
5
+ "type": "module",
6
+ "keywords": [
7
+ "vue",
8
+ "jsx",
9
+ "vapor",
10
+ "runtime"
11
+ ],
12
+ "license": "MIT",
13
+ "homepage": "https://github.com/vuejs/vue-jsx-vapor#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/vuejs/vue-jsx-vapor/issues"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/vuejs/vue-jsx-vapor.git"
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "main": "dist/index.cjs",
25
+ "module": "dist/index.js",
26
+ "types": "dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "jsx-vapor-dev": "./src/index.ts",
31
+ "require": "./dist/index.cjs",
32
+ "import": "./dist/index.js"
33
+ },
34
+ "./*": "./*"
35
+ },
36
+ "peerDependencies": {
37
+ "vue": "^3.6.0-alpha.2"
38
+ },
39
+ "devDependencies": {
40
+ "csstype": "^3.1.3"
41
+ },
42
+ "scripts": {
43
+ "build": "tsdown",
44
+ "dev": "DEV=true tsdown",
45
+ "release": "bumpp && npm publish",
46
+ "test": "vitest"
47
+ }
48
+ }