@inzombieland/nuxt-common 1.18.49 → 1.18.50
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/module.json +1 -1
- package/dist/module.mjs +1 -2
- package/dist/runtime/packages/core/define-vue-plugins.mjs +2 -1
- package/dist/runtime/packages/core/package.json +2 -1
- package/dist/runtime/packages/core/plugins/index.d.ts +1 -0
- package/dist/runtime/packages/core/plugins/index.mjs +1 -0
- package/dist/runtime/packages/core/plugins/sanitize-html.d.ts +2 -0
- package/dist/runtime/{plugins → packages/core/plugins}/sanitize-html.mjs +3 -4
- package/package.json +1 -1
- package/dist/runtime/plugins/sanitize-html.d.ts +0 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
2
2
|
import { defineNuxtModule, createResolver, addServerHandler, addImportsDir, addPlugin, addComponent } from '@nuxt/kit';
|
|
3
3
|
|
|
4
4
|
const name = "@inzombieland/nuxt-common";
|
|
5
|
-
const version = "1.18.
|
|
5
|
+
const version = "1.18.50";
|
|
6
6
|
|
|
7
7
|
const module = defineNuxtModule({
|
|
8
8
|
meta: {
|
|
@@ -48,7 +48,6 @@ const module = defineNuxtModule({
|
|
|
48
48
|
addImportsDir(resolve(runtimeDir, "composables"));
|
|
49
49
|
addPlugin(resolve(runtimeDir, "plugin"));
|
|
50
50
|
addPlugin(resolve(runtimeDir, "plugins/device"));
|
|
51
|
-
addPlugin(resolve(runtimeDir, "plugins/sanitize-html"));
|
|
52
51
|
addComponent({
|
|
53
52
|
name: "NuxtAppProvider",
|
|
54
53
|
filePath: resolve(runtimeDir, "packages/core/AppProvider.vue")
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineOtpInputPlugin, defineSanitizeUrlPlugin, defineVarletPlugin } from "./plugins/index.mjs";
|
|
1
|
+
import { defineOtpInputPlugin, defineSanitizeHtmlPlugin, defineSanitizeUrlPlugin, defineVarletPlugin } from "./plugins/index.mjs";
|
|
2
2
|
export function defineVuePlugins(app) {
|
|
3
3
|
defineOtpInputPlugin(app);
|
|
4
|
+
defineSanitizeHtmlPlugin(app);
|
|
4
5
|
defineSanitizeUrlPlugin(app);
|
|
5
6
|
defineVarletPlugin(app);
|
|
6
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inzombieland/core",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.50",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "./index.mjs",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"ofetch": "^1.4.1",
|
|
20
20
|
"ohash": "^2.0.11",
|
|
21
21
|
"rxjs": "^7.8.2",
|
|
22
|
+
"ultrahtml": "^1.6.0",
|
|
22
23
|
"vant": "^4.9.19",
|
|
23
24
|
"vue3-otp-input": "^0.5.21",
|
|
24
25
|
"zod": "^3.24.2"
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from "#app";
|
|
2
1
|
import { transform } from "ultrahtml";
|
|
3
2
|
import sanitize from "ultrahtml/transformers/sanitize";
|
|
4
|
-
export
|
|
5
|
-
|
|
3
|
+
export function defineSanitizeHtmlPlugin(app) {
|
|
4
|
+
app.directive("sanitize-html", async (el, binding) => {
|
|
6
5
|
if (binding.value !== binding.oldValue) {
|
|
7
6
|
el.innerHTML = await transform(binding.value, [
|
|
8
7
|
sanitize({
|
|
@@ -87,4 +86,4 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
87
86
|
]);
|
|
88
87
|
}
|
|
89
88
|
});
|
|
90
|
-
}
|
|
89
|
+
}
|
package/package.json
CHANGED