@inzombieland/nuxt-common 1.19.14 → 1.19.16

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.19.14",
3
+ "version": "1.19.16",
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.19.14";
5
+ const version = "1.19.16";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -1,13 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { defineProps, onBeforeMount, onMounted, ref } from "vue"
2
+ import { onBeforeMount, onMounted, ref } from "vue"
3
3
  import bus from "./bus"
4
- import VantConfigProvider from "./vant"
5
- import { useThemeMode, useUser } from "./index"
6
- import type { ConfigProviderTheme } from "vant"
4
+ import { useUser } from "./index"
7
5
 
8
- defineProps({ vantEnabled: { type: Boolean, default: true } })
9
-
10
- const theme = useThemeMode()
11
6
  const user = useUser()
12
7
  const appLoading = ref(Boolean(user.value))
13
8
 
@@ -32,13 +27,6 @@ export const useBus = () => {
32
27
  :class="{ app: appLoading }"
33
28
  >
34
29
  <slot />
35
-
36
- <span v-if="vantEnabled">
37
- <VantConfigProvider
38
- v-if="theme?.value"
39
- :theme="theme?.value as ConfigProviderTheme"
40
- />
41
- </span>
42
30
  </div>
43
31
  </template>
44
32
 
@@ -62,7 +62,7 @@ const successHandler = async (response, options = {}) => {
62
62
  }
63
63
  function resolveData(resData) {
64
64
  const data = apiHelper.convertToClient(resData);
65
- if (import.meta.env.MODE !== "production" && checkResponse && !checkResponse(data)?.success) {
65
+ if (import.meta.env.VITE_MODE !== "production" && checkResponse && !checkResponse(data)?.success) {
66
66
  console.error(checkResponse(data).error);
67
67
  }
68
68
  return data;
@@ -3,7 +3,7 @@ import { getToken } from "./api-client.mjs";
3
3
  import { useApiActions } from "./composables/index.mjs";
4
4
  import { apiHelper } from "./helpers/index.mjs";
5
5
  import { useBus } from "./index.mjs";
6
- if (typeof window !== "undefined" && import.meta.env.MODE !== "production") {
6
+ if (typeof window !== "undefined" && import.meta.env.VITE_MODE !== "production") {
7
7
  window.wsPublish = (eventName, data) => {
8
8
  const bus = useBus();
9
9
  setTimeout(() => bus.publish(`WS.${eventName}`, data), 0);
@@ -26,7 +26,7 @@ export function newCometClient(user, cometServerURL) {
26
26
  ];
27
27
  const centrifuge = new Centrifuge(transports, {
28
28
  token: getToken() ?? "",
29
- debug: import.meta.env.MODE !== "production",
29
+ debug: import.meta.env.VITE_MODE !== "production",
30
30
  getToken: async () => {
31
31
  const apiActions = useApiActions();
32
32
  return await apiActions.value?.refreshToken?.() ?? "";
@@ -49,7 +49,7 @@ export function newCometClient(user, cometServerURL) {
49
49
  message.data.forEach((event) => {
50
50
  const eventName = event.NotificationName;
51
51
  const data = event.Data;
52
- if (import.meta.env.MODE !== "production") {
52
+ if (import.meta.env.VITE_MODE !== "production") {
53
53
  console.log("IO event handled:", eventName, data);
54
54
  if (!eventName) {
55
55
  console.log(`[${/* @__PURE__ */ new Date()}] Comet: no name event`);
@@ -24,7 +24,7 @@ export function useCookies(name, _opts) {
24
24
  const shouldSetInitialClientCookie = hasExpired || cookies[name] === void 0 || cookies[name] === null;
25
25
  const cookieValue = klona(hasExpired ? void 0 : cookies[name] ?? opts.default?.());
26
26
  const cookie = delay && !hasExpired ? cookieRef(cookieValue, delay, opts.watch && opts.watch !== "shallow") : ref(cookieValue);
27
- if (import.meta.env.MODE !== "production" && hasExpired) {
27
+ if (import.meta.env.VITE_MODE !== "production" && hasExpired) {
28
28
  console.warn(`not setting cookie \`${name}\` as it has already expired.`);
29
29
  }
30
30
  let channel = null;
@@ -43,7 +43,7 @@ export function initApiFetch($fetch, config) {
43
43
  });
44
44
  const subscription = bus.subscribe("app:beforeMount", () => {
45
45
  subscription.unsubscribe();
46
- console.log("Service started in mode", import.meta.env.MODE);
46
+ console.log("Service started in mode", import.meta.env.VITE_MODE);
47
47
  getVisitorIdentifier();
48
48
  initApplication();
49
49
  });
@@ -1,6 +1,3 @@
1
- import { setNotifyDefaultOptions, Locale as VantLocale } from "vant";
2
- import enUS from "vant/es/locale/lang/en-US";
3
- import ruRU from "vant/es/locale/lang/ru-RU";
4
1
  import { watch } from "vue";
5
2
  import { useI18n } from "vue-i18n";
6
3
  import { useRouter } from "vue-router";
@@ -51,18 +48,11 @@ function initApplication() {
51
48
  if ("setLocale" in i18n && typeof i18n.setLocale === "function") {
52
49
  i18n.setLocale(locale2?.value);
53
50
  }
54
- if (locale2?.value === "en") {
55
- VantLocale.use("en-US", enUS);
56
- }
57
- if (locale2?.value === "ru") {
58
- VantLocale.use("ru-RU", ruRU);
59
- }
60
51
  const localeCookie = useCookies("locale", { maxAge: 60 * 60 * 24 * 365 });
61
52
  localeCookie.value = locale2?.value;
62
53
  },
63
54
  { immediate: true }
64
55
  );
65
- setNotifyDefaultOptions({ position: "bottom" });
66
56
  useSubscribe("WS.SessionsUpdated", async (session) => {
67
57
  const user2 = useUser();
68
58
  if (!user2.value) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/core",
3
- "version": "1.19.14",
3
+ "version": "1.19.16",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
@@ -19,7 +19,6 @@
19
19
  "ohash": "^2.0.11",
20
20
  "rxjs": "^7.8.2",
21
21
  "ultrahtml": "^1.6.0",
22
- "vant": "^4.9.19",
23
22
  "vue3-otp-input": "^0.5.21",
24
23
  "zod": "^4.2.1"
25
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.19.14",
3
+ "version": "1.19.16",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,2 +0,0 @@
1
- import ConfigProvider from "vant/es/config-provider";
2
- export default ConfigProvider;
@@ -1,2 +0,0 @@
1
- import ConfigProvider from "vant/es/config-provider";
2
- export default ConfigProvider;