@web-widget/vue 0.12.1 → 0.12.3
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/vite.cjs +9 -5
- package/dist/vite.js +9 -5
- package/dist/vue.client.js +4 -3
- package/dist/vue.server.js +4 -3
- package/package.json +1 -1
package/dist/vite.cjs
CHANGED
|
@@ -41,10 +41,7 @@ __export(vite_exports, {
|
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(vite_exports);
|
|
43
43
|
var import_vite = require("@web-widget/vite");
|
|
44
|
-
var VUE_INTERNAL_REQUEST =
|
|
45
|
-
function toArray(value) {
|
|
46
|
-
return Array.isArray(value) ? value : value ? [value] : [];
|
|
47
|
-
}
|
|
44
|
+
var VUE_INTERNAL_REQUEST = /.*\.vue\?vue\b.*$/;
|
|
48
45
|
function vueWebWidgetPlugin({
|
|
49
46
|
provide = "@web-widget/vue",
|
|
50
47
|
export: exportWidget = {},
|
|
@@ -61,7 +58,14 @@ function vueWebWidgetPlugin({
|
|
|
61
58
|
include: /(?:\.|@)widget\..*$/,
|
|
62
59
|
includeImporter: /.*\.vue(?:\?.*)?$/
|
|
63
60
|
}, importWidget), {
|
|
64
|
-
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST]
|
|
61
|
+
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST],
|
|
62
|
+
excludeImporter: [
|
|
63
|
+
...toArray(importWidget.excludeImporter),
|
|
64
|
+
VUE_INTERNAL_REQUEST
|
|
65
|
+
]
|
|
65
66
|
})
|
|
66
67
|
});
|
|
67
68
|
}
|
|
69
|
+
function toArray(value) {
|
|
70
|
+
return Array.isArray(value) ? value : value ? [value] : [];
|
|
71
|
+
}
|
package/dist/vite.js
CHANGED
|
@@ -20,10 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
|
|
21
21
|
// src/vite.ts
|
|
22
22
|
import { webWidgetPlugin } from "@web-widget/vite";
|
|
23
|
-
var VUE_INTERNAL_REQUEST =
|
|
24
|
-
function toArray(value) {
|
|
25
|
-
return Array.isArray(value) ? value : value ? [value] : [];
|
|
26
|
-
}
|
|
23
|
+
var VUE_INTERNAL_REQUEST = /.*\.vue\?vue\b.*$/;
|
|
27
24
|
function vueWebWidgetPlugin({
|
|
28
25
|
provide = "@web-widget/vue",
|
|
29
26
|
export: exportWidget = {},
|
|
@@ -40,10 +37,17 @@ function vueWebWidgetPlugin({
|
|
|
40
37
|
include: /(?:\.|@)widget\..*$/,
|
|
41
38
|
includeImporter: /.*\.vue(?:\?.*)?$/
|
|
42
39
|
}, importWidget), {
|
|
43
|
-
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST]
|
|
40
|
+
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST],
|
|
41
|
+
excludeImporter: [
|
|
42
|
+
...toArray(importWidget.excludeImporter),
|
|
43
|
+
VUE_INTERNAL_REQUEST
|
|
44
|
+
]
|
|
44
45
|
})
|
|
45
46
|
});
|
|
46
47
|
}
|
|
48
|
+
function toArray(value) {
|
|
49
|
+
return Array.isArray(value) ? value : value ? [value] : [];
|
|
50
|
+
}
|
|
47
51
|
export {
|
|
48
52
|
vueWebWidgetPlugin as default
|
|
49
53
|
};
|
package/dist/vue.client.js
CHANGED
|
@@ -103,10 +103,11 @@ var WebWidget = /* @__PURE__ */ defineComponent({
|
|
|
103
103
|
const attrs = widget.attributes;
|
|
104
104
|
const innerHTML = await widget.renderInnerHTMLToString();
|
|
105
105
|
if (IS_BROWSER) {
|
|
106
|
+
await customElements.whenDefined(tag);
|
|
106
107
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
const data = attrs.data;
|
|
109
|
+
delete attrs.data;
|
|
110
|
+
return () => h(tag, __spreadProps(__spreadValues(__spreadValues({}, attrs), IS_BROWSER ? { "^data": data } : { data }), {
|
|
110
111
|
innerHTML
|
|
111
112
|
}));
|
|
112
113
|
}
|
package/dist/vue.server.js
CHANGED
|
@@ -104,10 +104,11 @@ var WebWidget = /* @__PURE__ */ defineComponent({
|
|
|
104
104
|
const attrs = widget.attributes;
|
|
105
105
|
const innerHTML = await widget.renderInnerHTMLToString();
|
|
106
106
|
if (IS_BROWSER) {
|
|
107
|
+
await customElements.whenDefined(tag);
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
const data = attrs.data;
|
|
110
|
+
delete attrs.data;
|
|
111
|
+
return () => h(tag, __spreadProps(__spreadValues(__spreadValues({}, attrs), IS_BROWSER ? { "^data": data } : { data }), {
|
|
111
112
|
innerHTML
|
|
112
113
|
}));
|
|
113
114
|
}
|