@vue-jsx-vapor/runtime 3.2.7 → 3.2.8
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 +1 -1
- package/dist/raw.js +1 -1
- package/dist/vdom.cjs +2 -2
- package/dist/vdom.js +3 -3
- package/package.json +1 -1
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 Comment,\n createBlock,\n createElementBlock,\n createElementVNode,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text
|
|
15
|
+
var vdom_default = "import {\n cloneVNode,\n Comment,\n createBlock,\n createElementBlock,\n createElementVNode,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text\n} from \"vue\";\nconst cacheMap = /* @__PURE__ */ new WeakMap();\nexport function createVNodeCache(key) {\n const i = getCurrentInstance();\n if (i) {\n if (!cacheMap.has(i)) cacheMap.set(i, {});\n const caches = cacheMap.get(i);\n return caches[key] || (caches[key] = []);\n } else {\n return [];\n }\n}\nexport function normalizeVNode(value, flag = 1) {\n let create = createVNode;\n let isBlock = false;\n if (typeof value === \"function\") {\n isBlock = true;\n openBlock();\n create = createBlock;\n value = value();\n }\n return isVNode(value) ? isBlock ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? isBlock ? createElementBlock(\n Fragment,\n null,\n value.map((n) => normalizeVNode(() => n)),\n -2\n ) : createElementVNode(Fragment, null, value.slice()) : value == null || typeof value === \"boolean\" ? create(Comment) : create(Text, null, String(value), flag);\n}\nfunction cloneIfMounted(child) {\n return child.el === null && child.patchFlag !== -1 || // @ts-ignore\n child.memo ? child : cloneVNode(child);\n}\nconst normalizeSlotValue = (value) => Array.isArray(value) ? value.map((n) => normalizeVNode(n)) : [normalizeVNode(value)];\nexport const normalizeSlot = (rawSlot) => {\n if (rawSlot._n) {\n return rawSlot;\n }\n const normalized = (...args) => {\n return normalizeSlotValue(rawSlot(...args));\n };\n normalized._c = false;\n return normalized;\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 Comment,\n createBlock,\n createElementBlock,\n createElementVNode,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text
|
|
14
|
+
var vdom_default = "import {\n cloneVNode,\n Comment,\n createBlock,\n createElementBlock,\n createElementVNode,\n createVNode,\n Fragment,\n getCurrentInstance,\n isVNode,\n openBlock,\n Text\n} from \"vue\";\nconst cacheMap = /* @__PURE__ */ new WeakMap();\nexport function createVNodeCache(key) {\n const i = getCurrentInstance();\n if (i) {\n if (!cacheMap.has(i)) cacheMap.set(i, {});\n const caches = cacheMap.get(i);\n return caches[key] || (caches[key] = []);\n } else {\n return [];\n }\n}\nexport function normalizeVNode(value, flag = 1) {\n let create = createVNode;\n let isBlock = false;\n if (typeof value === \"function\") {\n isBlock = true;\n openBlock();\n create = createBlock;\n value = value();\n }\n return isVNode(value) ? isBlock ? createBlock(cloneIfMounted(value)) : cloneIfMounted(value) : Array.isArray(value) ? isBlock ? createElementBlock(\n Fragment,\n null,\n value.map((n) => normalizeVNode(() => n)),\n -2\n ) : createElementVNode(Fragment, null, value.slice()) : value == null || typeof value === \"boolean\" ? create(Comment) : create(Text, null, String(value), flag);\n}\nfunction cloneIfMounted(child) {\n return child.el === null && child.patchFlag !== -1 || // @ts-ignore\n child.memo ? child : cloneVNode(child);\n}\nconst normalizeSlotValue = (value) => Array.isArray(value) ? value.map((n) => normalizeVNode(n)) : [normalizeVNode(value)];\nexport const normalizeSlot = (rawSlot) => {\n if (rawSlot._n) {\n return rawSlot;\n }\n const normalized = (...args) => {\n return normalizeSlotValue(rawSlot(...args));\n };\n normalized._c = false;\n return normalized;\n};\n";
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/raw.ts
|
package/dist/vdom.cjs
CHANGED
|
@@ -28,9 +28,9 @@ function cloneIfMounted(child) {
|
|
|
28
28
|
const normalizeSlotValue = (value) => Array.isArray(value) ? value.map((n) => normalizeVNode(n)) : [normalizeVNode(value)];
|
|
29
29
|
const normalizeSlot = (rawSlot) => {
|
|
30
30
|
if (rawSlot._n) return rawSlot;
|
|
31
|
-
const normalized = (
|
|
31
|
+
const normalized = (...args) => {
|
|
32
32
|
return normalizeSlotValue(rawSlot(...args));
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
34
|
normalized._c = false;
|
|
35
35
|
return normalized;
|
|
36
36
|
};
|
package/dist/vdom.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Comment, Fragment, Text, cloneVNode, createBlock, createElementBlock, createElementVNode, createVNode, getCurrentInstance, isVNode, openBlock
|
|
1
|
+
import { Comment, Fragment, Text, cloneVNode, createBlock, createElementBlock, createElementVNode, createVNode, getCurrentInstance, isVNode, openBlock } from "vue";
|
|
2
2
|
|
|
3
3
|
//#region src/vdom.ts
|
|
4
4
|
const cacheMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -27,9 +27,9 @@ function cloneIfMounted(child) {
|
|
|
27
27
|
const normalizeSlotValue = (value) => Array.isArray(value) ? value.map((n) => normalizeVNode(n)) : [normalizeVNode(value)];
|
|
28
28
|
const normalizeSlot = (rawSlot) => {
|
|
29
29
|
if (rawSlot._n) return rawSlot;
|
|
30
|
-
const normalized =
|
|
30
|
+
const normalized = (...args) => {
|
|
31
31
|
return normalizeSlotValue(rawSlot(...args));
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
normalized._c = false;
|
|
34
34
|
return normalized;
|
|
35
35
|
};
|