@inzombieland/nuxt-common 1.19.18 → 1.19.20

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.
Files changed (107) hide show
  1. package/dist/module.d.mts +2 -2
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +3 -3
  4. package/dist/runtime/SidebarProvider.d.vue.ts +14 -0
  5. package/dist/runtime/SidebarProvider.vue +91 -102
  6. package/dist/runtime/SidebarProvider.vue.d.ts +14 -0
  7. package/dist/runtime/api/index.d.ts +7 -7
  8. package/dist/runtime/api/{index.mjs → index.js} +1 -1
  9. package/dist/runtime/api/user-actions.d.ts +1 -1
  10. package/dist/runtime/api/user-actions.js +2 -0
  11. package/dist/runtime/composables/index.d.ts +1 -1
  12. package/dist/runtime/composables/index.js +1 -0
  13. package/dist/runtime/composables/use-api-fetch.d.ts +1 -1
  14. package/dist/runtime/composables/{use-api-fetch.mjs → use-api-fetch.js} +1 -1
  15. package/dist/runtime/composables/use-layer-manager.d.ts +1 -1
  16. package/dist/runtime/composables/{use-layer-manager.mjs → use-layer-manager.js} +1 -1
  17. package/dist/runtime/composables/use-user-actions.d.ts +4 -4
  18. package/dist/runtime/composables/{use-user-actions.mjs → use-user-actions.js} +1 -1
  19. package/dist/runtime/middleware/{auth.mjs → auth.js} +1 -1
  20. package/dist/runtime/middleware/{guest.mjs → guest.js} +1 -1
  21. package/dist/runtime/middleware/index.d.ts +3 -3
  22. package/dist/runtime/middleware/index.js +4 -0
  23. package/dist/runtime/middleware/{locale.global.mjs → locale.global.js} +1 -1
  24. package/dist/runtime/packages/core/AppProvider.d.vue.ts +14 -0
  25. package/dist/runtime/packages/core/AppProvider.vue +13 -16
  26. package/dist/runtime/packages/core/AppProvider.vue.d.ts +14 -0
  27. package/dist/runtime/packages/core/api-client.d.ts +1 -1
  28. package/dist/runtime/packages/core/{api-client.mjs → api-client.js} +3 -3
  29. package/dist/runtime/packages/core/comet-client.d.ts +1 -1
  30. package/dist/runtime/packages/core/{comet-client.mjs → comet-client.js} +4 -4
  31. package/dist/runtime/packages/core/composables/index.d.ts +10 -10
  32. package/dist/runtime/packages/core/composables/index.js +10 -0
  33. package/dist/runtime/packages/core/composables/use-active-sessions.d.ts +1 -1
  34. package/dist/runtime/packages/core/composables/{use-active-sessions.mjs → use-active-sessions.js} +1 -1
  35. package/dist/runtime/packages/core/composables/use-app-locale.d.ts +1 -1
  36. package/dist/runtime/packages/core/composables/{use-subscribe.mjs → use-subscribe.js} +1 -1
  37. package/dist/runtime/packages/core/composables/use-theme-mode.d.ts +1 -1
  38. package/dist/runtime/packages/core/composables/use-user.d.ts +1 -1
  39. package/dist/runtime/packages/core/composables/use-visitor.d.ts +1 -1
  40. package/dist/runtime/packages/core/{define-vue-plugins.mjs → define-vue-plugins.js} +1 -1
  41. package/dist/runtime/packages/core/get-user.d.ts +1 -1
  42. package/dist/runtime/packages/core/{get-user.mjs → get-user.js} +3 -3
  43. package/dist/runtime/packages/core/get-visitor.d.ts +1 -1
  44. package/dist/runtime/packages/core/{get-visitor.mjs → get-visitor.js} +3 -10
  45. package/dist/runtime/packages/core/helpers/composables.d.ts +4 -4
  46. package/dist/runtime/packages/core/helpers/composables.js +4 -0
  47. package/dist/runtime/packages/core/helpers/{device-helper.mjs → device-helper.js} +1 -1
  48. package/dist/runtime/packages/core/helpers/index.d.ts +5 -5
  49. package/dist/runtime/packages/core/helpers/{index.mjs → index.js} +5 -5
  50. package/dist/runtime/packages/core/index.d.ts +18 -18
  51. package/dist/runtime/packages/core/{index.mjs → index.js} +11 -11
  52. package/dist/runtime/packages/core/{init-application.mjs → init-application.js} +3 -3
  53. package/dist/runtime/packages/core/package.json +1 -1
  54. package/dist/runtime/packages/core/plugins/index.d.ts +2 -2
  55. package/dist/runtime/packages/core/plugins/index.js +2 -0
  56. package/dist/runtime/packages/core/plugins/{sanitize-url.mjs → sanitize-url.js} +1 -1
  57. package/dist/runtime/packages/core/refresh-token.d.ts +1 -1
  58. package/dist/runtime/packages/core/{refresh-token.mjs → refresh-token.js} +2 -2
  59. package/dist/runtime/packages/core/user-actions.d.ts +1 -1
  60. package/dist/runtime/packages/core/{user-actions.mjs → user-actions.js} +3 -3
  61. package/dist/runtime/packages/layer-manager/LayerComponent.d.vue.ts +6 -0
  62. package/dist/runtime/packages/layer-manager/LayerComponent.vue +23 -28
  63. package/dist/runtime/packages/layer-manager/LayerComponent.vue.d.ts +6 -0
  64. package/dist/runtime/packages/layer-manager/LayersProvider.d.vue.ts +10 -0
  65. package/dist/runtime/packages/layer-manager/LayersProvider.vue +142 -164
  66. package/dist/runtime/packages/layer-manager/LayersProvider.vue.d.ts +10 -0
  67. package/dist/runtime/packages/layer-manager/index.d.ts +1 -1
  68. package/dist/runtime/packages/layer-manager/use-layer-actions.d.ts +1 -1
  69. package/dist/runtime/{plugin.mjs → plugin.js} +4 -4
  70. package/dist/runtime/plugins/{device.mjs → device.js} +1 -1
  71. package/dist/types.d.mts +2 -7
  72. package/package.json +24 -17
  73. package/dist/module.cjs +0 -5
  74. package/dist/module.d.ts +0 -8
  75. package/dist/runtime/api/user-actions.mjs +0 -2
  76. package/dist/runtime/composables/index.mjs +0 -1
  77. package/dist/runtime/middleware/index.mjs +0 -4
  78. package/dist/runtime/packages/core/composables/index.mjs +0 -10
  79. package/dist/runtime/packages/core/helpers/composables.mjs +0 -4
  80. package/dist/runtime/packages/core/plugins/index.mjs +0 -2
  81. package/dist/types.d.ts +0 -8
  82. /package/dist/runtime/api/account/{account.get.mjs → account.get.js} +0 -0
  83. /package/dist/runtime/api/account/{authcheck.get.mjs → authcheck.get.js} +0 -0
  84. /package/dist/runtime/api/account/{default-handler.mjs → default-handler.js} +0 -0
  85. /package/dist/runtime/api/account/{middleware.mjs → middleware.js} +0 -0
  86. /package/dist/runtime/api/account/{token.get.mjs → token.get.js} +0 -0
  87. /package/dist/runtime/composables/{use-toggle-sidebar.mjs → use-toggle-sidebar.js} +0 -0
  88. /package/dist/runtime/packages/core/{bus.mjs → bus.js} +0 -0
  89. /package/dist/runtime/packages/core/composables/{use-api-actions.mjs → use-api-actions.js} +0 -0
  90. /package/dist/runtime/packages/core/composables/{use-app-locale.mjs → use-app-locale.js} +0 -0
  91. /package/dist/runtime/packages/core/composables/{use-cookies.mjs → use-cookies.js} +0 -0
  92. /package/dist/runtime/packages/core/composables/{use-theme-mode.mjs → use-theme-mode.js} +0 -0
  93. /package/dist/runtime/packages/core/composables/{use-user.mjs → use-user.js} +0 -0
  94. /package/dist/runtime/packages/core/composables/{use-validators.mjs → use-validators.js} +0 -0
  95. /package/dist/runtime/packages/core/composables/{use-visitor.mjs → use-visitor.js} +0 -0
  96. /package/dist/runtime/packages/core/helpers/{api-helper.mjs → api-helper.js} +0 -0
  97. /package/dist/runtime/packages/core/helpers/{current-device.mjs → current-device.js} +0 -0
  98. /package/dist/runtime/packages/core/helpers/{phone-helper.mjs → phone-helper.js} +0 -0
  99. /package/dist/runtime/packages/core/helpers/{string-helper.mjs → string-helper.js} +0 -0
  100. /package/dist/runtime/packages/core/plugins/{sanitize-html.mjs → sanitize-html.js} +0 -0
  101. /package/dist/runtime/packages/core/thirdparty/sanitize-url/{index.mjs → index.js} +0 -0
  102. /package/dist/runtime/packages/core/{types.mjs → types.js} +0 -0
  103. /package/dist/runtime/packages/layer-manager/{index.mjs → index.js} +0 -0
  104. /package/dist/runtime/packages/layer-manager/{types.mjs → types.js} +0 -0
  105. /package/dist/runtime/packages/layer-manager/{use-layer-actions.mjs → use-layer-actions.js} +0 -0
  106. /package/dist/runtime/server/middleware/{basic-auth.mjs → basic-auth.js} +0 -0
  107. /package/dist/runtime/thirdparty/helpers/{index.mjs → index.js} +0 -0
package/dist/module.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
1
+ import * as nuxt_schema from 'nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
4
  }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+ declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
6
 
7
7
  export { _default as default };
8
8
  export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.19.18",
3
+ "version": "1.19.20",
4
4
  "configKey": "nuxt-common",
5
5
  "builder": {
6
- "@nuxt/module-builder": "0.6.0",
7
- "unbuild": "2.0.0"
6
+ "@nuxt/module-builder": "1.0.2",
7
+ "unbuild": "unknown"
8
8
  }
9
9
  }
package/dist/module.mjs CHANGED
@@ -2,9 +2,9 @@ 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.18";
5
+ const version = "1.19.20";
6
6
 
7
- const module = defineNuxtModule({
7
+ const module$1 = defineNuxtModule({
8
8
  meta: {
9
9
  name,
10
10
  version,
@@ -59,4 +59,4 @@ const module = defineNuxtModule({
59
59
  }
60
60
  });
61
61
 
62
- export { module as default };
62
+ export { module$1 as default };
@@ -0,0 +1,14 @@
1
+ declare var __VLS_1: {}, __VLS_3: {};
2
+ type __VLS_Slots = {} & {
3
+ sidebar?: (props: typeof __VLS_1) => any;
4
+ } & {
5
+ content?: (props: typeof __VLS_3) => any;
6
+ };
7
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -1,110 +1,99 @@
1
- <script setup lang="ts">
2
- import { useSwipe, type UseSwipeDirection } from "@vueuse/core"
3
- import { onMounted, ref, watch } from "vue"
4
- import { useDevice } from "./composables"
5
- import { useToggleSidebar } from "./composables/use-toggle-sidebar"
6
-
7
- const sidebarRef = ref<HTMLElement | null>(null)
8
- const contentRef = ref<HTMLElement | null>(null)
9
- const sidebarBackdropRef = ref<HTMLElement | null>(null)
10
-
11
- const sidebar = ref("hidden")
12
- const toggleSidebar = useToggleSidebar()
13
- const $device = useDevice()
1
+ <script setup>
2
+ import { useSwipe } from "@vueuse/core";
3
+ import { onMounted, ref, watch } from "vue";
4
+ import { useDevice } from "./composables";
5
+ import { useToggleSidebar } from "./composables/use-toggle-sidebar";
6
+ const sidebarRef = ref(null);
7
+ const contentRef = ref(null);
8
+ const sidebarBackdropRef = ref(null);
9
+ const sidebar = ref("hidden");
10
+ const toggleSidebar = useToggleSidebar();
11
+ const $device = useDevice();
14
12
  const sidebarClass = ref({
15
- sidebar: true,
16
- "sidebar-open": sidebar.value === "open",
17
- "sidebar-hidden": sidebar.value === "hidden",
18
- })
13
+ sidebar: true,
14
+ "sidebar-open": sidebar.value === "open",
15
+ "sidebar-hidden": sidebar.value === "hidden"
16
+ });
19
17
  const contentClass = ref({
20
- content: true,
21
- "sidebar-open": sidebar.value === "open",
22
- "sidebar-hidden": sidebar.value === "hidden",
23
- })
18
+ content: true,
19
+ "sidebar-open": sidebar.value === "open",
20
+ "sidebar-hidden": sidebar.value === "hidden"
21
+ });
24
22
  const sidebarBackdropClass = ref({
25
- sidebarBackdrop: true,
26
- "sidebar-open": sidebar.value === "open",
27
- "sidebar-hidden": sidebar.value === "hidden",
28
- })
29
-
30
- watch(sidebar, value => {
31
- sidebarClass.value["sidebar-open"] = value === "open"
32
- sidebarClass.value["sidebar-hidden"] = value === "hidden"
33
- contentClass.value["sidebar-open"] = value === "open"
34
- contentClass.value["sidebar-hidden"] = value === "hidden"
35
- sidebarBackdropClass.value["sidebar-open"] = value === "open"
36
- sidebarBackdropClass.value["sidebar-hidden"] = value === "hidden"
37
- })
38
-
23
+ sidebarBackdrop: true,
24
+ "sidebar-open": sidebar.value === "open",
25
+ "sidebar-hidden": sidebar.value === "hidden"
26
+ });
27
+ watch(sidebar, (value) => {
28
+ sidebarClass.value["sidebar-open"] = value === "open";
29
+ sidebarClass.value["sidebar-hidden"] = value === "hidden";
30
+ contentClass.value["sidebar-open"] = value === "open";
31
+ contentClass.value["sidebar-hidden"] = value === "hidden";
32
+ sidebarBackdropClass.value["sidebar-open"] = value === "open";
33
+ sidebarBackdropClass.value["sidebar-hidden"] = value === "hidden";
34
+ });
39
35
  onMounted(() => {
40
- toggleSidebar.value = () => {
41
- if (localStorage.sidebar === "hidden" || sidebarRef.value?.clientWidth === 0) {
42
- localStorage.sidebar = "open"
43
- sidebar.value = "open"
44
- } else {
45
- localStorage.sidebar = "hidden"
46
- sidebar.value = "hidden"
47
- }
48
- return sidebar.value
49
- }
50
-
51
- useSwipe(sidebarRef, {
52
- onSwipeEnd(e: TouchEvent, direction: UseSwipeDirection) {
53
- if (direction === "left") {
54
- localStorage.sidebar = "hidden"
55
- sidebar.value = "hidden"
56
- }
57
- },
58
- })
59
-
60
- sidebarBackdropRef.value?.addEventListener(
61
- "click",
62
- () => {
63
- sidebar.value = "hidden"
64
- },
65
- false
66
- )
67
-
68
- if ($device.desktop()) {
69
- let timer: ReturnType<typeof setTimeout> | undefined
70
-
71
- sidebarRef.value?.addEventListener(
72
- "mouseover",
73
- () => {
74
- if (localStorage.sidebar === "hidden") {
75
- clearTimeout(timer)
76
- timer = setTimeout(function () {
77
- sidebar.value = "open"
78
- }, 200)
79
- }
80
- },
81
- false
82
- )
83
-
84
- sidebarRef.value?.addEventListener(
85
- "mouseleave",
86
- () => {
87
- if (localStorage.sidebar === "hidden") {
88
- clearTimeout(timer)
89
- timer = setTimeout(function () {
90
- sidebar.value = "hidden"
91
- }, 100)
92
- }
93
- },
94
- false
95
- )
96
- }
97
-
98
- if (sidebarRef.value) {
99
- sidebarRef.value.style.transition = "width 0.25s ease"
100
- }
101
- if (contentRef.value) {
102
- contentRef.value.style.transition = "left 0.25s ease"
103
- }
104
- })
105
-
36
+ toggleSidebar.value = () => {
37
+ if (localStorage.sidebar === "hidden" || sidebarRef.value?.clientWidth === 0) {
38
+ localStorage.sidebar = "open";
39
+ sidebar.value = "open";
40
+ } else {
41
+ localStorage.sidebar = "hidden";
42
+ sidebar.value = "hidden";
43
+ }
44
+ return sidebar.value;
45
+ };
46
+ useSwipe(sidebarRef, {
47
+ onSwipeEnd(e, direction) {
48
+ if (direction === "left") {
49
+ localStorage.sidebar = "hidden";
50
+ sidebar.value = "hidden";
51
+ }
52
+ }
53
+ });
54
+ sidebarBackdropRef.value?.addEventListener(
55
+ "click",
56
+ () => {
57
+ sidebar.value = "hidden";
58
+ },
59
+ false
60
+ );
61
+ if ($device.desktop()) {
62
+ let timer;
63
+ sidebarRef.value?.addEventListener(
64
+ "mouseover",
65
+ () => {
66
+ if (localStorage.sidebar === "hidden") {
67
+ clearTimeout(timer);
68
+ timer = setTimeout(function() {
69
+ sidebar.value = "open";
70
+ }, 200);
71
+ }
72
+ },
73
+ false
74
+ );
75
+ sidebarRef.value?.addEventListener(
76
+ "mouseleave",
77
+ () => {
78
+ if (localStorage.sidebar === "hidden") {
79
+ clearTimeout(timer);
80
+ timer = setTimeout(function() {
81
+ sidebar.value = "hidden";
82
+ }, 100);
83
+ }
84
+ },
85
+ false
86
+ );
87
+ }
88
+ if (sidebarRef.value) {
89
+ sidebarRef.value.style.transition = "width 0.25s ease";
90
+ }
91
+ if (contentRef.value) {
92
+ contentRef.value.style.transition = "left 0.25s ease";
93
+ }
94
+ });
106
95
  if (typeof window !== "undefined" && $device.desktop()) {
107
- sidebar.value = localStorage.sidebar === "hidden" ? "hidden" : "open"
96
+ sidebar.value = localStorage.sidebar === "hidden" ? "hidden" : "open";
108
97
  }
109
98
  </script>
110
99
 
@@ -0,0 +1,14 @@
1
+ declare var __VLS_1: {}, __VLS_3: {};
2
+ type __VLS_Slots = {} & {
3
+ sidebar?: (props: typeof __VLS_1) => any;
4
+ } & {
5
+ content?: (props: typeof __VLS_3) => any;
6
+ };
7
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -1,4 +1,4 @@
1
- import { type Fetch } from "../packages/core";
1
+ import { type Fetch } from "../packages/core/index.js";
2
2
  export declare const config: {
3
3
  apiBaseURL: any;
4
4
  cometServerURL: any;
@@ -8,7 +8,7 @@ export declare const config: {
8
8
  isDesktopApp: any;
9
9
  appName: any;
10
10
  getHostname: () => string;
11
- getDevice: () => Promise<string>;
11
+ getDevice: () => Promise<any>;
12
12
  useRequestHeaders: (include?: string[]) => {
13
13
  baseURL: string;
14
14
  headers: {
@@ -16,15 +16,15 @@ export declare const config: {
16
16
  };
17
17
  };
18
18
  };
19
- declare const fetch: Fetch, getUser: () => Promise<import("src/runtime/packages/core/types").GetUserResponse>, useApiFetch: () => Fetch, userActions: {
20
- signIn: (body: Record<string, any>) => Promise<import("src/runtime/packages/core/types").GetUserResponse | {
19
+ declare const fetch: Fetch, getUser: () => Promise<import("../packages/core/index.js").GetUserResponse>, useApiFetch: () => Fetch, userActions: {
20
+ signIn: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse | {
21
21
  key: string;
22
22
  }>;
23
23
  signInByCodeSendCode: (body: Record<string, any>) => Promise<{
24
24
  key: string;
25
25
  }>;
26
- signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("src/runtime/packages/core/types").GetUserResponse>;
27
- getToken: (body: Record<string, any>) => Promise<import("src/runtime/packages/core/types").GetUserResponse>;
26
+ signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse>;
27
+ getToken: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse>;
28
28
  signUp: (body: Record<string, any>) => Promise<{
29
29
  key: string;
30
30
  }>;
@@ -99,7 +99,7 @@ declare const fetch: Fetch, getUser: () => Promise<import("src/runtime/packages/
99
99
  changeAvatar: (body: FormData) => Promise<void>;
100
100
  deleteAvatar: () => Promise<void>;
101
101
  fetchActiveSessions: () => Promise<{
102
- sessions: import("src/runtime/packages/core/types").ActiveSession[];
102
+ sessions: import("../packages/core/index.js").ActiveSession[];
103
103
  }>;
104
104
  logoutActiveSession: (body: {
105
105
  sessionId: string;
@@ -1,5 +1,5 @@
1
1
  import { useNuxtApp, useRequestHeaders, useRequestURL } from "#imports";
2
- import { initApiFetch } from "../packages/core/index.mjs";
2
+ import { initApiFetch } from "../packages/core/index.js";
3
3
  export const config = {
4
4
  apiBaseURL: import.meta.env.VITE_API_BASE_URL,
5
5
  cometServerURL: import.meta.env.VITE_COMET_SERVER_URL,
@@ -1,2 +1,2 @@
1
- import { userActions } from "./index";
1
+ import { userActions } from "./index.js";
2
2
  export default userActions;
@@ -0,0 +1,2 @@
1
+ import { userActions } from "./index.js";
2
+ export default userActions;
@@ -1 +1 @@
1
- export * from "../packages/core/composables";
1
+ export * from "../packages/core/composables/index.js";
@@ -0,0 +1 @@
1
+ export * from "../packages/core/composables/index.js";
@@ -1,3 +1,3 @@
1
- import { useApiFetch } from "../api";
1
+ import { useApiFetch } from "../api/index.js";
2
2
  export { useApiFetch };
3
3
  export default useApiFetch;
@@ -1,3 +1,3 @@
1
- import { useApiFetch } from "../api/index.mjs";
1
+ import { useApiFetch } from "../api/index.js";
2
2
  export { useApiFetch };
3
3
  export default useApiFetch;
@@ -1,3 +1,3 @@
1
- import { useLayerManager } from "../packages/layer-manager";
1
+ import { useLayerManager } from "../packages/layer-manager/index.js";
2
2
  export { useLayerManager };
3
3
  export default useLayerManager;
@@ -1,3 +1,3 @@
1
- import { useLayerManager } from "../packages/layer-manager/index.mjs";
1
+ import { useLayerManager } from "../packages/layer-manager/index.js";
2
2
  export { useLayerManager };
3
3
  export default useLayerManager;
@@ -1,12 +1,12 @@
1
1
  export declare const useUserActions: () => {
2
- signIn: (body: Record<string, any>) => Promise<import("src/runtime/packages/core").GetUserResponse | {
2
+ signIn: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse | {
3
3
  key: string;
4
4
  }>;
5
5
  signInByCodeSendCode: (body: Record<string, any>) => Promise<{
6
6
  key: string;
7
7
  }>;
8
- signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("src/runtime/packages/core").GetUserResponse>;
9
- getToken: (body: Record<string, any>) => Promise<import("src/runtime/packages/core").GetUserResponse>;
8
+ signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse>;
9
+ getToken: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse>;
10
10
  signUp: (body: Record<string, any>) => Promise<{
11
11
  key: string;
12
12
  }>;
@@ -81,7 +81,7 @@ export declare const useUserActions: () => {
81
81
  changeAvatar: (body: FormData) => Promise<void>;
82
82
  deleteAvatar: () => Promise<void>;
83
83
  fetchActiveSessions: () => Promise<{
84
- sessions: import("src/runtime/packages/core").ActiveSession[];
84
+ sessions: import("../packages/core/index.js").ActiveSession[];
85
85
  }>;
86
86
  logoutActiveSession: (body: {
87
87
  sessionId: string;
@@ -1,4 +1,4 @@
1
- import userActions from "../api/user-actions.mjs";
1
+ import userActions from "../api/user-actions.js";
2
2
  export const useUserActions = () => {
3
3
  return userActions;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { defineNuxtRouteMiddleware, navigateTo } from "#app";
2
2
  import { useLocalePath } from "#i18n";
3
- import { useUser } from "../packages/core/index.mjs";
3
+ import { useUser } from "../packages/core/index.js";
4
4
  export default defineNuxtRouteMiddleware(() => {
5
5
  const user = useUser();
6
6
  if (!user.value) {
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtRouteMiddleware, navigateTo } from "#app";
2
2
  import { useLocalePath } from "#i18n";
3
3
  import { useRuntimeConfig } from "#imports";
4
- import { useUser } from "../packages/core/index.mjs";
4
+ import { useUser } from "../packages/core/index.js";
5
5
  export default defineNuxtRouteMiddleware(() => {
6
6
  const user = useUser();
7
7
  if (user.value) {
@@ -1,4 +1,4 @@
1
- import authMiddleware from "./auth";
2
- import guestMiddleware from "./guest";
3
- import localeMiddleware from "./locale.global";
1
+ import authMiddleware from "./auth.js";
2
+ import guestMiddleware from "./guest.js";
3
+ import localeMiddleware from "./locale.global.js";
4
4
  export { authMiddleware, guestMiddleware, localeMiddleware };
@@ -0,0 +1,4 @@
1
+ import authMiddleware from "./auth.js";
2
+ import guestMiddleware from "./guest.js";
3
+ import localeMiddleware from "./locale.global.js";
4
+ export { authMiddleware, guestMiddleware, localeMiddleware };
@@ -1,6 +1,6 @@
1
1
  import { defineNuxtRouteMiddleware, navigateTo } from "#app";
2
2
  import { useCookie, useRuntimeConfig } from "#imports";
3
- import { useUser } from "../packages/core/index.mjs";
3
+ import { useUser } from "../packages/core/index.js";
4
4
  export default defineNuxtRouteMiddleware((to) => {
5
5
  if (import.meta.server) return;
6
6
  const user = useUser();
@@ -0,0 +1,14 @@
1
+ export declare const useBus: () => {
2
+ publish<T>(eventName: string, data: T): void;
3
+ subscribe<T>(eventName: string, func: (data: T) => void): import("rxjs").Subscription;
4
+ unsubscribeAll(): void;
5
+ };
6
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
7
+ default?: (props: {}) => any;
8
+ }>;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -1,24 +1,21 @@
1
- <script setup lang="ts">
2
- import { onBeforeMount, onMounted, ref } from "vue"
3
- import bus from "./bus"
4
- import { useUser } from "./index"
5
-
6
- const user = useUser()
7
- const appLoading = ref(Boolean(user.value))
8
-
1
+ <script setup>
2
+ import { onBeforeMount, onMounted, ref } from "vue";
3
+ import bus from "./bus";
4
+ import { useUser } from "./index";
5
+ const user = useUser();
6
+ const appLoading = ref(Boolean(user.value));
9
7
  onBeforeMount(() => {
10
- bus.publish("app:beforeMount", true)
11
- })
12
-
8
+ bus.publish("app:beforeMount", true);
9
+ });
13
10
  onMounted(() => {
14
- appLoading.value = false
15
- })
11
+ appLoading.value = false;
12
+ });
16
13
  </script>
17
14
 
18
- <script lang="ts">
15
+ <script>
19
16
  export const useBus = () => {
20
- return bus
21
- }
17
+ return bus;
18
+ };
22
19
  </script>
23
20
 
24
21
  <template>
@@ -0,0 +1,14 @@
1
+ export declare const useBus: () => {
2
+ publish<T>(eventName: string, data: T): void;
3
+ subscribe<T>(eventName: string, func: (data: T) => void): import("rxjs").Subscription;
4
+ unsubscribeAll(): void;
5
+ };
6
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
7
+ default?: (props: {}) => any;
8
+ }>;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -1,4 +1,4 @@
1
- import type { Fetch, FetchConfig, FetchExtraOptions as FetchOptions, User } from "./types";
1
+ import type { Fetch, FetchConfig, FetchExtraOptions as FetchOptions, User } from "./types.js";
2
2
  export declare const setUser: (newUser?: User | null) => void;
3
3
  export declare const updateUser: (newUser: Partial<User>) => void;
4
4
  export declare const getToken: () => string | null | undefined;
@@ -1,6 +1,6 @@
1
- import { useApiActions, useUser, useVisitor } from "./composables/index.mjs";
2
- import { apiHelper, once } from "./helpers/index.mjs";
3
- import { useBus } from "./index.mjs";
1
+ import { useApiActions, useUser, useVisitor } from "./composables/index.js";
2
+ import { apiHelper, once } from "./helpers/index.js";
3
+ import { useBus } from "./index.js";
4
4
  let token = null;
5
5
  let secretKey;
6
6
  export const setUser = (newUser) => {
@@ -1,4 +1,4 @@
1
- import type { User } from "./types";
1
+ import type { User } from "./types.js";
2
2
  declare global {
3
3
  interface Window {
4
4
  wsPublish: (eventName: string, data: unknown) => void;
@@ -1,8 +1,8 @@
1
1
  import { Centrifuge } from "centrifuge";
2
- import { getToken } from "./api-client.mjs";
3
- import { useApiActions } from "./composables/index.mjs";
4
- import { apiHelper } from "./helpers/index.mjs";
5
- import { useBus } from "./index.mjs";
2
+ import { getToken } from "./api-client.js";
3
+ import { useApiActions } from "./composables/index.js";
4
+ import { apiHelper } from "./helpers/index.js";
5
+ import { useBus } from "./index.js";
6
6
  if (typeof window !== "undefined" && import.meta.env.VITE_MODE !== "production") {
7
7
  window.wsPublish = (eventName, data) => {
8
8
  const bus = useBus();
@@ -1,10 +1,10 @@
1
- export * from "../helpers/composables";
2
- export * from "./use-active-sessions";
3
- export { useApiActions } from "./use-api-actions";
4
- export { useAppLocale } from "./use-app-locale";
5
- export { useCookies } from "./use-cookies";
6
- export { useSubscribe } from "./use-subscribe";
7
- export { useThemeMode } from "./use-theme-mode";
8
- export { useUser } from "./use-user";
9
- export { useValidators } from "./use-validators";
10
- export { useVisitor } from "./use-visitor";
1
+ export * from "../helpers/composables.js";
2
+ export * from "./use-active-sessions.js";
3
+ export { useApiActions } from "./use-api-actions.js";
4
+ export { useAppLocale } from "./use-app-locale.js";
5
+ export { useCookies } from "./use-cookies.js";
6
+ export { useSubscribe } from "./use-subscribe.js";
7
+ export { useThemeMode } from "./use-theme-mode.js";
8
+ export { useUser } from "./use-user.js";
9
+ export { useValidators } from "./use-validators.js";
10
+ export { useVisitor } from "./use-visitor.js";
@@ -0,0 +1,10 @@
1
+ export * from "../helpers/composables.js";
2
+ export * from "./use-active-sessions.js";
3
+ export { useApiActions } from "./use-api-actions.js";
4
+ export { useAppLocale } from "./use-app-locale.js";
5
+ export { useCookies } from "./use-cookies.js";
6
+ export { useSubscribe } from "./use-subscribe.js";
7
+ export { useThemeMode } from "./use-theme-mode.js";
8
+ export { useUser } from "./use-user.js";
9
+ export { useValidators } from "./use-validators.js";
10
+ export { useVisitor } from "./use-visitor.js";
@@ -1,4 +1,4 @@
1
- import type { ActiveSession } from "../types";
1
+ import type { ActiveSession } from "../types.js";
2
2
  export declare function useActiveSessions(): import("vue").Ref<{
3
3
  id: string;
4
4
  visitorId: string;
@@ -1,5 +1,5 @@
1
1
  import { ref } from "vue";
2
- import { useBus, useUserActions } from "../index.mjs";
2
+ import { useBus, useUserActions } from "../index.js";
3
3
  const activeSessions = ref([]);
4
4
  export function useActiveSessions() {
5
5
  const userActions = useUserActions();
@@ -1 +1 @@
1
- export declare const useAppLocale: () => import("@vueuse/shared").RemovableRef<any>;
1
+ export declare const useAppLocale: () => any;
@@ -1,5 +1,5 @@
1
1
  import { onMounted, onUnmounted } from "vue";
2
- import { useBus } from "../index.mjs";
2
+ import { useBus } from "../index.js";
3
3
  export const useSubscribe = (eventName, func, options = { once: false, unsubscribeOnUnmount: true }) => {
4
4
  const bus = useBus();
5
5
  let subscription;
@@ -1 +1 @@
1
- export declare const useThemeMode: () => import("@vueuse/shared").RemovableRef<any>;
1
+ export declare const useThemeMode: () => any;