@vue-jsx-vapor/runtime 3.2.0 → 3.2.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/raw.cjs CHANGED
@@ -12,7 +12,7 @@ var vapor_default = "import {\n EffectScope,\n Fragment,\n getCurrentInstance
12
12
 
13
13
  //#endregion
14
14
  //#region src/vdom.ts?raw
15
- var vdom_default = "import {\n cloneVNode,\n createBlock,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text\n} from \"vue\";\nconst cacheMap = /* @__PURE__ */ new WeakMap();\nexport function createVNodeCache(index) {\n const i = getCurrentInstance();\n if (i) {\n !cacheMap.has(i) && cacheMap.set(i, []);\n const caches = cacheMap.get(i);\n return caches[index] || (caches[index] = []);\n } else {\n return [];\n }\n}\nexport function normalizeVNode(value = \" \", flag = 1) {\n let create = createVNode;\n const isFunction = typeof value === \"function\";\n if (isFunction) {\n openBlock();\n create = createBlock;\n value = value();\n }\n return isVNode(value) ? isFunction ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? create(\n Fragment,\n null,\n value.map((n) => normalizeVNode(n))\n ) : create(\n Text,\n null,\n value == null || typeof value === \"boolean\" ? \"\" : String(value),\n flag\n );\n}\nfunction cloneIfMounted(child) {\n return child.el === null && child.patchFlag !== -1 || // @ts-ignore\n child.memo ? child : cloneVNode(child);\n}\n";
15
+ var vdom_default = "import {\n cloneVNode,\n createBlock,\n createElementBlock,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text\n} from \"vue\";\nconst cacheMap = /* @__PURE__ */ new WeakMap();\nexport function createVNodeCache(index) {\n const i = getCurrentInstance();\n if (i) {\n if (!cacheMap.has(i)) cacheMap.set(i, []);\n const caches = cacheMap.get(i);\n return caches[index] || (caches[index] = []);\n } else {\n return [];\n }\n}\nexport function normalizeVNode(value = \" \", flag = 1) {\n let create = createVNode;\n const isFunction = typeof value === \"function\";\n if (isFunction) {\n openBlock();\n create = createBlock;\n value = value();\n }\n return isVNode(value) ? isFunction ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? createElementBlock(\n Fragment,\n null,\n value.map(\n (n) => normalizeVNode(typeof n === \"function\" ? n.toString() : () => n)\n )\n ) : create(\n Text,\n null,\n value == null || typeof value === \"boolean\" ? \"\" : String(value),\n flag\n );\n}\nfunction cloneIfMounted(child) {\n return child.el === null && child.patchFlag !== -1 || // @ts-ignore\n child.memo ? child : cloneVNode(child);\n}\n";
16
16
 
17
17
  //#endregion
18
18
  //#region src/raw.ts
package/dist/raw.js CHANGED
@@ -11,7 +11,7 @@ var vapor_default = "import {\n EffectScope,\n Fragment,\n getCurrentInstance
11
11
 
12
12
  //#endregion
13
13
  //#region src/vdom.ts?raw
14
- var vdom_default = "import {\n cloneVNode,\n createBlock,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text\n} from \"vue\";\nconst cacheMap = /* @__PURE__ */ new WeakMap();\nexport function createVNodeCache(index) {\n const i = getCurrentInstance();\n if (i) {\n !cacheMap.has(i) && cacheMap.set(i, []);\n const caches = cacheMap.get(i);\n return caches[index] || (caches[index] = []);\n } else {\n return [];\n }\n}\nexport function normalizeVNode(value = \" \", flag = 1) {\n let create = createVNode;\n const isFunction = typeof value === \"function\";\n if (isFunction) {\n openBlock();\n create = createBlock;\n value = value();\n }\n return isVNode(value) ? isFunction ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? create(\n Fragment,\n null,\n value.map((n) => normalizeVNode(n))\n ) : create(\n Text,\n null,\n value == null || typeof value === \"boolean\" ? \"\" : String(value),\n flag\n );\n}\nfunction cloneIfMounted(child) {\n return child.el === null && child.patchFlag !== -1 || // @ts-ignore\n child.memo ? child : cloneVNode(child);\n}\n";
14
+ var vdom_default = "import {\n cloneVNode,\n createBlock,\n createElementBlock,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text\n} from \"vue\";\nconst cacheMap = /* @__PURE__ */ new WeakMap();\nexport function createVNodeCache(index) {\n const i = getCurrentInstance();\n if (i) {\n if (!cacheMap.has(i)) cacheMap.set(i, []);\n const caches = cacheMap.get(i);\n return caches[index] || (caches[index] = []);\n } else {\n return [];\n }\n}\nexport function normalizeVNode(value = \" \", flag = 1) {\n let create = createVNode;\n const isFunction = typeof value === \"function\";\n if (isFunction) {\n openBlock();\n create = createBlock;\n value = value();\n }\n return isVNode(value) ? isFunction ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? createElementBlock(\n Fragment,\n null,\n value.map(\n (n) => normalizeVNode(typeof n === \"function\" ? n.toString() : () => n)\n )\n ) : create(\n Text,\n null,\n value == null || typeof value === \"boolean\" ? \"\" : String(value),\n flag\n );\n}\nfunction cloneIfMounted(child) {\n return child.el === null && child.patchFlag !== -1 || // @ts-ignore\n child.memo ? child : cloneVNode(child);\n}\n";
15
15
 
16
16
  //#endregion
17
17
  //#region src/raw.ts
package/dist/vdom.cjs CHANGED
@@ -6,7 +6,7 @@ const cacheMap = /* @__PURE__ */ new WeakMap();
6
6
  function createVNodeCache(index) {
7
7
  const i = (0, vue.getCurrentInstance)();
8
8
  if (i) {
9
- !cacheMap.has(i) && cacheMap.set(i, []);
9
+ if (!cacheMap.has(i)) cacheMap.set(i, []);
10
10
  const caches = cacheMap.get(i);
11
11
  return caches[index] || (caches[index] = []);
12
12
  } else return [];
@@ -19,7 +19,7 @@ function normalizeVNode(value = " ", flag = 1) {
19
19
  create = vue.createBlock;
20
20
  value = value();
21
21
  }
22
- return (0, vue.isVNode)(value) ? isFunction ? (0, vue.createBlock)(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? create(vue.Fragment, null, value.map((n) => normalizeVNode(n))) : create(vue.Text, null, value == null || typeof value === "boolean" ? "" : String(value), flag);
22
+ return (0, vue.isVNode)(value) ? isFunction ? (0, vue.createBlock)(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? (0, vue.createElementBlock)(vue.Fragment, null, value.map((n) => normalizeVNode(typeof n === "function" ? n.toString() : () => n))) : create(vue.Text, null, value == null || typeof value === "boolean" ? "" : String(value), flag);
23
23
  }
24
24
  function cloneIfMounted(child) {
25
25
  return child.el === null && child.patchFlag !== -1 || child.memo ? child : (0, vue.cloneVNode)(child);
package/dist/vdom.js CHANGED
@@ -1,11 +1,11 @@
1
- import { Fragment, Text, cloneVNode, createBlock, createVNode, getCurrentInstance, isVNode, openBlock } from "vue";
1
+ import { Fragment, Text, cloneVNode, createBlock, createElementBlock, createVNode, getCurrentInstance, isVNode, openBlock } from "vue";
2
2
 
3
3
  //#region src/vdom.ts
4
4
  const cacheMap = /* @__PURE__ */ new WeakMap();
5
5
  function createVNodeCache(index) {
6
6
  const i = getCurrentInstance();
7
7
  if (i) {
8
- !cacheMap.has(i) && cacheMap.set(i, []);
8
+ if (!cacheMap.has(i)) cacheMap.set(i, []);
9
9
  const caches = cacheMap.get(i);
10
10
  return caches[index] || (caches[index] = []);
11
11
  } else return [];
@@ -18,7 +18,7 @@ function normalizeVNode(value = " ", flag = 1) {
18
18
  create = createBlock;
19
19
  value = value();
20
20
  }
21
- return isVNode(value) ? isFunction ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? create(Fragment, null, value.map((n) => normalizeVNode(n))) : create(Text, null, value == null || typeof value === "boolean" ? "" : String(value), flag);
21
+ return isVNode(value) ? isFunction ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? createElementBlock(Fragment, null, value.map((n) => normalizeVNode(typeof n === "function" ? n.toString() : () => n))) : create(Text, null, value == null || typeof value === "boolean" ? "" : String(value), flag);
22
22
  }
23
23
  function cloneIfMounted(child) {
24
24
  return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-jsx-vapor/runtime",
3
3
  "type": "module",
4
- "version": "3.2.0",
4
+ "version": "3.2.1",
5
5
  "description": "Vue JSX Vapor Runtime",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/vuejs/vue-jsx-vapor#readme",