@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 +1 -1
- package/dist/module.mjs +1 -2
- package/dist/runtime/packages/core/define-vue-plugins.d.ts +4 -0
- package/dist/runtime/packages/core/define-vue-plugins.mjs +4 -0
- package/dist/runtime/packages/core/index.d.ts +1 -0
- package/dist/runtime/packages/core/index.mjs +1 -0
- package/dist/runtime/packages/core/package.json +1 -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/{ui/varlet.d.ts → packages/core/plugins/varlet-ui.d.ts} +4 -2
- package/dist/runtime/{ui/varlet.mjs → packages/core/plugins/varlet-ui.mjs} +6 -7
- package/dist/runtime/plugin.mjs +2 -1
- package/package.json +1 -1
- package/dist/runtime/composables/use-helpers.d.ts +0 -16
- package/dist/runtime/composables/use-helpers.mjs +0 -4
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.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"));
|
|
@@ -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";
|
|
@@ -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
|
-
|
|
7
|
-
export
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
7
|
+
export function defineVarletPlugin(app) {
|
|
8
|
+
app.use(Button);
|
|
9
|
+
app.use(Chip);
|
|
10
|
+
app.use(Icon);
|
|
11
|
+
app.use(Link);
|
|
12
|
+
}
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -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,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
|
-
};
|