@inzombieland/nuxt-common 1.18.5 → 1.18.7

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.5",
3
+ "version": "1.18.7",
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.5";
5
+ const version = "1.18.7";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -47,7 +47,6 @@ const module = defineNuxtModule({
47
47
  });
48
48
  addImportsDir(resolve(runtimeDir, "composables"));
49
49
  addPlugin(resolve(runtimeDir, "plugin"));
50
- addPlugin(resolve(runtimeDir, "ui/varlet"));
51
50
  addPlugin(resolve(runtimeDir, "plugins/device"));
52
51
  addPlugin(resolve(runtimeDir, "plugins/otp-input"));
53
52
  addPlugin(resolve(runtimeDir, "plugins/sanitize-html"));
@@ -0,0 +1,4 @@
1
+ import type { createApp } from "vue";
2
+ type App = ReturnType<typeof createApp>;
3
+ export declare function defineVuePlugins(app: App): void;
4
+ export {};
@@ -0,0 +1,4 @@
1
+ import { defineVarletPlugin } from "./plugins/index.mjs";
2
+ export function defineVuePlugins(app) {
3
+ defineVarletPlugin(app);
4
+ }
@@ -1,5 +1,6 @@
1
1
  import { type Ref } from "vue";
2
2
  import type { Fetch, FetchConfig } from "./types";
3
+ export { defineVuePlugins } from "./define-vue-plugins";
3
4
  export { default as AppProvider } from "./AppProvider.vue";
4
5
  export * from "./composables";
5
6
  export * from "./types";
@@ -9,6 +9,7 @@ import { createApiGetVisitorIdentifier } from "./get-visitor.mjs";
9
9
  import { createInitApplication } from "./init-application.mjs";
10
10
  import { createApiRefreshToken } from "./refresh-token.mjs";
11
11
  import { createApiUserActions } from "./user-actions.mjs";
12
+ export { defineVuePlugins } from "./define-vue-plugins.mjs";
12
13
  export { default as AppProvider } from "./AppProvider.vue";
13
14
  export * from "./composables/index.mjs";
14
15
  export * from "./types.mjs";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/core",
3
- "version": "1.18.5",
3
+ "version": "1.18.7",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
@@ -0,0 +1 @@
1
+ export * from "./varlet-ui";
@@ -0,0 +1 @@
1
+ export * from "./varlet-ui.mjs";
@@ -1,7 +1,9 @@
1
+ import type { createApp } from "vue";
1
2
  import "@varlet/ui/es/button/style/index";
2
3
  import "@varlet/ui/es/chip/style/index";
3
4
  import "@varlet/ui/es/icon/style/index";
4
5
  import "@varlet/ui/es/link/style/index";
5
6
  import "@varlet/ui/es/styles/elevation.css";
6
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
7
- export default _default;
7
+ type App = ReturnType<typeof createApp>;
8
+ export declare function defineVarletPlugin(app: App): void;
9
+ export {};
@@ -1,13 +1,12 @@
1
1
  import { Button, Chip, Icon, Link } from "@varlet/ui";
2
- import { defineNuxtPlugin } from "#app";
3
2
  import "@varlet/ui/es/button/style/index";
4
3
  import "@varlet/ui/es/chip/style/index";
5
4
  import "@varlet/ui/es/icon/style/index";
6
5
  import "@varlet/ui/es/link/style/index";
7
6
  import "@varlet/ui/es/styles/elevation.css";
8
- export default defineNuxtPlugin((nuxtApp) => {
9
- nuxtApp.vueApp.use(Button);
10
- nuxtApp.vueApp.use(Chip);
11
- nuxtApp.vueApp.use(Icon);
12
- nuxtApp.vueApp.use(Link);
13
- });
7
+ export function defineVarletPlugin(app) {
8
+ app.use(Button);
9
+ app.use(Chip);
10
+ app.use(Icon);
11
+ app.use(Link);
12
+ }
@@ -3,12 +3,13 @@ import { useNuxtApp, useRequestHeaders, useRuntimeConfig, useState } from "#impo
3
3
  import { watch } from "vue";
4
4
  import { fetch, getUser } from "./api/index.mjs";
5
5
  import { authMiddleware, guestMiddleware, localeMiddleware } from "./middleware/index.mjs";
6
- import { useThemeMode } from "./packages/core/index.mjs";
6
+ import { defineVuePlugins, useThemeMode } from "./packages/core/index.mjs";
7
7
  import { flush, setToken, setUser } from "./packages/core/api-client.mjs";
8
8
  const useAuth = () => {
9
9
  return useState("auth", () => null);
10
10
  };
11
11
  export default defineNuxtPlugin(async (nuxtApp) => {
12
+ defineVuePlugins(nuxtApp.vueApp);
12
13
  const auth = useAuth();
13
14
  const runtimeConfig = useRuntimeConfig();
14
15
  const { $mobileApp } = useNuxtApp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.18.5",
3
+ "version": "1.18.7",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,16 +0,0 @@
1
- import { once } from "../packages/core/helpers";
2
- export declare const useHelpers: () => {
3
- dateHelper: {
4
- stringToDate: typeof import("src/runtime/packages/core/helpers/date-helper").stringToDate;
5
- dateFormat: typeof import("src/runtime/packages/core/helpers/date-helper").dateFormat;
6
- };
7
- once: typeof once;
8
- phoneHelper: {
9
- getPlainPhoneNumber: typeof import("src/runtime/packages/core/helpers/phone-helper").getPlainPhoneNumber;
10
- convertToPhone: typeof import("src/runtime/packages/core/helpers/phone-helper").convertToPhone;
11
- maskPhone: typeof import("src/runtime/packages/core/helpers/phone-helper").maskPhone;
12
- };
13
- stringHelper: {
14
- maskEmail: typeof import("src/runtime/packages/core/helpers/string-helper").maskEmail;
15
- };
16
- };
@@ -1,4 +0,0 @@
1
- import { dateHelper, once, phoneHelper, stringHelper } from "../packages/core/helpers/index.mjs";
2
- export const useHelpers = () => {
3
- return { dateHelper, once, phoneHelper, stringHelper };
4
- };