@inzombieland/nuxt-common 1.18.27 → 1.18.29

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.27",
3
+ "version": "1.18.29",
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.27";
5
+ const version = "1.18.29";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -24,6 +24,16 @@ declare const fetch: Fetch, getUser: () => Promise<import("src/runtime/packages/
24
24
  }) => Promise<import("src/runtime/packages/core/types").GetUserResponse | {
25
25
  key: string;
26
26
  }>;
27
+ signInByCodeSendCode: (body: {
28
+ username: string;
29
+ }) => Promise<{
30
+ key: string;
31
+ }>;
32
+ signInByCodeVerifyCode: (body: {
33
+ key: string;
34
+ code: string;
35
+ rememberMe?: boolean;
36
+ }) => Promise<import("src/runtime/packages/core/types").GetUserResponse>;
27
37
  logout: () => Promise<void>;
28
38
  fetchActiveSessions: () => Promise<{
29
39
  sessions: import("src/runtime/packages/core/types").ActiveSession[];
@@ -6,6 +6,16 @@ export declare const signIn: (body: {
6
6
  }) => Promise<import("src/runtime/packages/core/types").GetUserResponse | {
7
7
  key: string;
8
8
  }>;
9
+ export declare const signInByCodeSendCode: (body: {
10
+ username: string;
11
+ }) => Promise<{
12
+ key: string;
13
+ }>;
14
+ export declare const signInByCodeVerifyCode: (body: {
15
+ key: string;
16
+ code: string;
17
+ rememberMe?: boolean;
18
+ }) => Promise<import("src/runtime/packages/core/types").GetUserResponse>;
9
19
  export declare const logout: () => Promise<void>;
10
20
  export declare const changeName: (body: {
11
21
  firstName: string;
@@ -48,16 +58,6 @@ export declare const changePhone: (body: {
48
58
  }) => Promise<void>;
49
59
  export declare const changeAvatar: (body: FormData) => Promise<void>;
50
60
  export declare const deleteAvatar: () => Promise<void>;
51
- export declare const signInByCodeSendCode: (body: {
52
- username: string;
53
- }) => Promise<{
54
- key: string;
55
- }>;
56
- export declare const signInByCodeVerifyCode: (body: {
57
- key: string;
58
- code: string;
59
- rememberMe?: boolean;
60
- }) => Promise<import("src/runtime/packages/core/types").GetUserResponse>;
61
61
  export declare const signUp: (body: {
62
62
  email: string;
63
63
  password: string;
@@ -1,7 +1,9 @@
1
1
  import { useRequestHeaders } from "#imports";
2
- import { flush, setToken } from "../packages/core/api-client.mjs";
3
- import { fetch, getUser, userActions } from "./index.mjs";
2
+ import { flush } from "../packages/core/api-client.mjs";
3
+ import { fetch, userActions } from "./index.mjs";
4
4
  export const signIn = userActions.signIn;
5
+ export const signInByCodeSendCode = userActions.signInByCodeSendCode;
6
+ export const signInByCodeVerifyCode = userActions.signInByCodeVerifyCode;
5
7
  export const logout = userActions.logout;
6
8
  export const changeName = userActions.changeName;
7
9
  export const changeBirthday = userActions.changeBirthday;
@@ -13,28 +15,6 @@ export const confirmEmailChange = userActions.confirmEmailChange;
13
15
  export const changePhone = userActions.changePhone;
14
16
  export const changeAvatar = userActions.changeAvatar;
15
17
  export const deleteAvatar = userActions.deleteAvatar;
16
- export const signInByCodeSendCode = async (body) => {
17
- return await fetch("/account/0/signinbycode/sendcode", {
18
- body,
19
- method: "POST",
20
- baseURL: "/",
21
- headers: useRequestHeaders(["cookie"])
22
- });
23
- };
24
- export const signInByCodeVerifyCode = async (body) => {
25
- const response = await fetch("/account/0/signinbycode/verifycode", {
26
- body,
27
- method: "POST",
28
- baseURL: "/",
29
- headers: useRequestHeaders(["cookie"])
30
- });
31
- const { accessToken, ...rest } = response;
32
- if (!accessToken) {
33
- throw rest;
34
- }
35
- setToken(accessToken);
36
- return await getUser();
37
- };
38
18
  export const signUp = async (body) => {
39
19
  return await fetch("/account/0/signup", {
40
20
  body,
@@ -16,6 +16,16 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
16
16
  }) => Promise<import("./types").GetUserResponse | {
17
17
  key: string;
18
18
  }>;
19
+ signInByCodeSendCode: (body: {
20
+ username: string;
21
+ }) => Promise<{
22
+ key: string;
23
+ }>;
24
+ signInByCodeVerifyCode: (body: {
25
+ key: string;
26
+ code: string;
27
+ rememberMe?: boolean;
28
+ }) => Promise<import("./types").GetUserResponse>;
19
29
  logout: () => Promise<void>;
20
30
  fetchActiveSessions: () => Promise<{
21
31
  sessions: import("./types").ActiveSession[];
@@ -77,6 +87,16 @@ export declare const useUserActions: () => Ref<{
77
87
  }) => Promise<import("./types").GetUserResponse | {
78
88
  key: string;
79
89
  }>;
90
+ signInByCodeSendCode: (body: {
91
+ username: string;
92
+ }) => Promise<{
93
+ key: string;
94
+ }>;
95
+ signInByCodeVerifyCode: (body: {
96
+ key: string;
97
+ code: string;
98
+ rememberMe?: boolean;
99
+ }) => Promise<import("./types").GetUserResponse>;
80
100
  logout: () => Promise<void>;
81
101
  fetchActiveSessions: () => Promise<{
82
102
  sessions: import("./types").ActiveSession[];
@@ -136,6 +156,16 @@ export declare const useUserActions: () => Ref<{
136
156
  }) => Promise<import("./types").GetUserResponse | {
137
157
  key: string;
138
158
  }>;
159
+ signInByCodeSendCode: (body: {
160
+ username: string;
161
+ }) => Promise<{
162
+ key: string;
163
+ }>;
164
+ signInByCodeVerifyCode: (body: {
165
+ key: string;
166
+ code: string;
167
+ rememberMe?: boolean;
168
+ }) => Promise<import("./types").GetUserResponse>;
139
169
  logout: () => Promise<void>;
140
170
  fetchActiveSessions: () => Promise<{
141
171
  sessions: import("./types").ActiveSession[];
@@ -55,11 +55,11 @@ function initApplication() {
55
55
  i18n.setLocale(locale2?.value);
56
56
  }
57
57
  if (locale2?.value === "en") {
58
- VantLocale.use(locale2, enUS);
58
+ VantLocale.use("en-US", enUS);
59
59
  VarletLocale.add("en-US", VarletLocale.enUS);
60
60
  }
61
61
  if (locale2?.value === "ru") {
62
- VantLocale.use(locale2, ruRU);
62
+ VantLocale.use("ru-RU", ruRU);
63
63
  VarletLocale.add("en-US", VarletLocale.enUS);
64
64
  }
65
65
  const localeCookie = useCookies("locale", { maxAge: 60 * 60 * 24 * 365 });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/core",
3
- "version": "1.18.27",
3
+ "version": "1.18.29",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
@@ -8,6 +8,16 @@ export declare const createApiUserActions: (fetch: Fetch, config: FetchConfig, g
8
8
  }) => Promise<GetUserResponse | {
9
9
  key: string;
10
10
  }>;
11
+ signInByCodeSendCode: (body: {
12
+ username: string;
13
+ }) => Promise<{
14
+ key: string;
15
+ }>;
16
+ signInByCodeVerifyCode: (body: {
17
+ key: string;
18
+ code: string;
19
+ rememberMe?: boolean;
20
+ }) => Promise<GetUserResponse>;
11
21
  logout: () => Promise<void>;
12
22
  fetchActiveSessions: () => Promise<{
13
23
  sessions: ActiveSession[];
@@ -20,6 +20,26 @@ export const createApiUserActions = once(
20
20
  setToken(accessToken);
21
21
  return await getUser();
22
22
  },
23
+ signInByCodeSendCode: async (body) => {
24
+ return await fetch("/account/0/signinbycode/sendcode", {
25
+ body,
26
+ method: "POST",
27
+ ...config.useRequestHeaders?.(["cookie"]) ?? {}
28
+ });
29
+ },
30
+ signInByCodeVerifyCode: async (body) => {
31
+ const response = await fetch("/account/0/signinbycode/verifycode", {
32
+ body,
33
+ method: "POST",
34
+ ...config.useRequestHeaders?.(["cookie"]) ?? {}
35
+ });
36
+ const { accessToken, ...rest } = response;
37
+ if (!accessToken) {
38
+ throw rest;
39
+ }
40
+ setToken(accessToken);
41
+ return await getUser();
42
+ },
23
43
  logout: async () => {
24
44
  const user = useUser();
25
45
  try {
@@ -70,8 +70,6 @@ const closeLayer = (layerId: string) => {
70
70
  if (layoutElement) {
71
71
  layoutElement.classList.remove("layer-open")
72
72
  layoutElement.classList.add("layer-hide")
73
- document.documentElement.style.removeProperty("overflow")
74
- document.body.style.removeProperty("overflow")
75
73
  }
76
74
  }
77
75
 
@@ -90,6 +88,11 @@ const closeLayer = (layerId: string) => {
90
88
  if (activeLayers.value.length === 0 && typeof document !== "undefined") {
91
89
  document.title = pageTitle.value
92
90
  }
91
+
92
+ if (activeLayers.value.length === 0) {
93
+ document.documentElement.style.removeProperty("overflow")
94
+ document.body.style.removeProperty("overflow")
95
+ }
93
96
  }, 400)
94
97
  }
95
98
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/layer-manager",
3
- "version": "1.17.3",
3
+ "version": "1.17.4",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.18.27",
3
+ "version": "1.18.29",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "exports": {