@inzombieland/nuxt-common 1.18.48 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.18.48",
3
+ "version": "1.18.50",
4
4
  "configKey": "nuxt-common",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.6.0",
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.48";
5
+ const version = "1.18.50";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -48,8 +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
- addPlugin(resolve(runtimeDir, "plugins/sanitize-url"));
53
51
  addComponent({
54
52
  name: "NuxtAppProvider",
55
53
  filePath: resolve(runtimeDir, "packages/core/AppProvider.vue")
@@ -1,4 +1,2 @@
1
- import type { createApp } from "vue";
2
- type App = ReturnType<typeof createApp>;
1
+ import type { App } from "vue";
3
2
  export declare function defineVuePlugins(app: App): void;
4
- export {};
@@ -1,5 +1,7 @@
1
- import { defineOtpInputPlugin, 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);
5
+ defineSanitizeUrlPlugin(app);
4
6
  defineVarletPlugin(app);
5
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/core",
3
- "version": "1.18.48",
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,2 +1,4 @@
1
1
  export * from "./otp-input";
2
+ export * from "./sanitize-html";
3
+ export * from "./sanitize-url";
2
4
  export * from "./varlet-ui";
@@ -1,2 +1,4 @@
1
1
  export * from "./otp-input.mjs";
2
+ export * from "./sanitize-html.mjs";
3
+ export * from "./sanitize-url.mjs";
2
4
  export * from "./varlet-ui.mjs";
@@ -0,0 +1,2 @@
1
+ import type { App } from "vue";
2
+ export declare function defineSanitizeHtmlPlugin(app: App): void;
@@ -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 default defineNuxtPlugin((nuxtApp) => {
5
- nuxtApp.vueApp.directive("sanitize-html", async (el, binding) => {
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
+ }
@@ -0,0 +1,2 @@
1
+ import type { App } from "vue";
2
+ export declare function defineSanitizeUrlPlugin(app: App): void;
@@ -1,9 +1,8 @@
1
- import { defineNuxtPlugin } from "#app";
2
1
  import { sanitizeUrl } from "../thirdparty/sanitize-url/index.mjs";
3
- export default defineNuxtPlugin((nuxtApp) => {
4
- nuxtApp.vueApp.directive("sanitize-url", (el, binding) => {
2
+ export function defineSanitizeUrlPlugin(app) {
3
+ app.directive("sanitize-url", (el, binding) => {
5
4
  if (binding.value !== binding.oldValue) {
6
5
  el.href = sanitizeUrl(binding.value);
7
6
  }
8
7
  });
9
- });
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.18.48",
3
+ "version": "1.18.50",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,2 +0,0 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
- export default _default;