@inzombieland/nuxt-common 1.19.19 → 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 (106) 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} +2 -2
  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/plugins/index.d.ts +2 -2
  54. package/dist/runtime/packages/core/plugins/index.js +2 -0
  55. package/dist/runtime/packages/core/plugins/{sanitize-url.mjs → sanitize-url.js} +1 -1
  56. package/dist/runtime/packages/core/refresh-token.d.ts +1 -1
  57. package/dist/runtime/packages/core/{refresh-token.mjs → refresh-token.js} +2 -2
  58. package/dist/runtime/packages/core/user-actions.d.ts +1 -1
  59. package/dist/runtime/packages/core/{user-actions.mjs → user-actions.js} +3 -3
  60. package/dist/runtime/packages/layer-manager/LayerComponent.d.vue.ts +6 -0
  61. package/dist/runtime/packages/layer-manager/LayerComponent.vue +23 -28
  62. package/dist/runtime/packages/layer-manager/LayerComponent.vue.d.ts +6 -0
  63. package/dist/runtime/packages/layer-manager/LayersProvider.d.vue.ts +10 -0
  64. package/dist/runtime/packages/layer-manager/LayersProvider.vue +142 -164
  65. package/dist/runtime/packages/layer-manager/LayersProvider.vue.d.ts +10 -0
  66. package/dist/runtime/packages/layer-manager/index.d.ts +1 -1
  67. package/dist/runtime/packages/layer-manager/use-layer-actions.d.ts +1 -1
  68. package/dist/runtime/{plugin.mjs → plugin.js} +4 -4
  69. package/dist/runtime/plugins/{device.mjs → device.js} +1 -1
  70. package/dist/types.d.mts +2 -7
  71. package/package.json +24 -17
  72. package/dist/module.cjs +0 -5
  73. package/dist/module.d.ts +0 -8
  74. package/dist/runtime/api/user-actions.mjs +0 -2
  75. package/dist/runtime/composables/index.mjs +0 -1
  76. package/dist/runtime/middleware/index.mjs +0 -4
  77. package/dist/runtime/packages/core/composables/index.mjs +0 -10
  78. package/dist/runtime/packages/core/helpers/composables.mjs +0 -4
  79. package/dist/runtime/packages/core/plugins/index.mjs +0 -2
  80. package/dist/types.d.ts +0 -8
  81. /package/dist/runtime/api/account/{account.get.mjs → account.get.js} +0 -0
  82. /package/dist/runtime/api/account/{authcheck.get.mjs → authcheck.get.js} +0 -0
  83. /package/dist/runtime/api/account/{default-handler.mjs → default-handler.js} +0 -0
  84. /package/dist/runtime/api/account/{middleware.mjs → middleware.js} +0 -0
  85. /package/dist/runtime/api/account/{token.get.mjs → token.get.js} +0 -0
  86. /package/dist/runtime/composables/{use-toggle-sidebar.mjs → use-toggle-sidebar.js} +0 -0
  87. /package/dist/runtime/packages/core/{bus.mjs → bus.js} +0 -0
  88. /package/dist/runtime/packages/core/composables/{use-api-actions.mjs → use-api-actions.js} +0 -0
  89. /package/dist/runtime/packages/core/composables/{use-app-locale.mjs → use-app-locale.js} +0 -0
  90. /package/dist/runtime/packages/core/composables/{use-cookies.mjs → use-cookies.js} +0 -0
  91. /package/dist/runtime/packages/core/composables/{use-theme-mode.mjs → use-theme-mode.js} +0 -0
  92. /package/dist/runtime/packages/core/composables/{use-user.mjs → use-user.js} +0 -0
  93. /package/dist/runtime/packages/core/composables/{use-validators.mjs → use-validators.js} +0 -0
  94. /package/dist/runtime/packages/core/composables/{use-visitor.mjs → use-visitor.js} +0 -0
  95. /package/dist/runtime/packages/core/helpers/{api-helper.mjs → api-helper.js} +0 -0
  96. /package/dist/runtime/packages/core/helpers/{current-device.mjs → current-device.js} +0 -0
  97. /package/dist/runtime/packages/core/helpers/{phone-helper.mjs → phone-helper.js} +0 -0
  98. /package/dist/runtime/packages/core/helpers/{string-helper.mjs → string-helper.js} +0 -0
  99. /package/dist/runtime/packages/core/plugins/{sanitize-html.mjs → sanitize-html.js} +0 -0
  100. /package/dist/runtime/packages/core/thirdparty/sanitize-url/{index.mjs → index.js} +0 -0
  101. /package/dist/runtime/packages/core/{types.mjs → types.js} +0 -0
  102. /package/dist/runtime/packages/layer-manager/{index.mjs → index.js} +0 -0
  103. /package/dist/runtime/packages/layer-manager/{types.mjs → types.js} +0 -0
  104. /package/dist/runtime/packages/layer-manager/{use-layer-actions.mjs → use-layer-actions.js} +0 -0
  105. /package/dist/runtime/server/middleware/{basic-auth.mjs → basic-auth.js} +0 -0
  106. /package/dist/runtime/thirdparty/helpers/{index.mjs → index.js} +0 -0
@@ -1,176 +1,154 @@
1
- <script setup lang="ts">
2
- import { computed, onMounted, ref, watch } from "vue"
3
- import { useRoute, useRouter } from "vue-router"
4
- import LayerComponent from "./LayerComponent.vue"
5
- import { useLayerActions } from "./use-layer-actions"
6
- import type { ActiveLayer } from "./types"
7
-
8
- const router = useRouter()
9
- const route = useRoute()
10
- const layerActions = useLayerActions()
11
- const reactiveHistory = computed(() => ({ path: route.path, query: route.query }))
12
- const history = ref({ path: route.path, query: route.query })
13
- const activeLayers = ref<ActiveLayer[]>([])
14
- const pageTitle = ref("")
15
- const layersLimit = 5
16
-
17
- function getLayerHash(s: string): string {
18
- const hash = s.split("").reduce((a, b) => {
19
- a = (a << 5) - a + b.charCodeAt(0)
20
- return a & a
21
- }, 0)
22
- return Math.abs(hash).toString()
23
- }
24
-
25
- const createLayer = (name: string, params?: { [p: string]: any }): ActiveLayer => {
26
- return {
27
- name,
28
- layerId: getLayerHash(name),
29
- component: name.charAt(0).toUpperCase() + name.slice(1),
30
- params: Object.assign({}, history.value.query, params),
31
- closeLayer: typeof window !== "undefined" ? () => {} : undefined,
32
- }
33
- }
34
-
35
- const resolveLayer = (
36
- layerName: string,
37
- options: { isCloseOtherLayers: boolean } = { isCloseOtherLayers: false },
38
- params?: { [p: string]: any }
39
- ) => {
40
- const activeLayer = activeLayers.value.find(({ name }) => name === layerName)
41
- if (activeLayer) {
42
- // слой с таким именем уже есть
43
- const layer = activeLayers.value.splice(activeLayers.value.indexOf(activeLayer), 1)[0]
44
- if (layer) {
45
- if (params) {
46
- layer.params = params
47
- }
48
- activeLayers.value.push(layer)
49
- }
50
- } else {
51
- if (options.isCloseOtherLayers) {
52
- activeLayers.value = []
53
- }
54
- if (activeLayers.value.length >= layersLimit) {
55
- activeLayers.value.shift()
56
- }
57
- activeLayers.value.push(createLayer(layerName, params))
58
- }
1
+ <script setup>
2
+ import { computed, onMounted, ref, watch } from "vue";
3
+ import { useRoute, useRouter } from "vue-router";
4
+ import LayerComponent from "./LayerComponent.vue";
5
+ import { useLayerActions } from "./use-layer-actions";
6
+ const router = useRouter();
7
+ const route = useRoute();
8
+ const layerActions = useLayerActions();
9
+ const reactiveHistory = computed(() => ({ path: route.path, query: route.query }));
10
+ const history = ref({ path: route.path, query: route.query });
11
+ const activeLayers = ref([]);
12
+ const pageTitle = ref("");
13
+ const layersLimit = 5;
14
+ function getLayerHash(s) {
15
+ const hash = s.split("").reduce((a, b) => {
16
+ a = (a << 5) - a + b.charCodeAt(0);
17
+ return a & a;
18
+ }, 0);
19
+ return Math.abs(hash).toString();
59
20
  }
60
-
61
- const closeLayer = (layerId: string) => {
62
- if (typeof document !== "undefined") {
63
- // eslint-disable-next-line unicorn/prefer-query-selector
64
- const layerElement = document.getElementById(layerId)
65
- if (layerElement) {
66
- layerElement.classList.remove("open")
67
- layerElement.classList.add("hide")
68
- }
69
- const layoutElement = document.querySelector("#layout")
70
- if (layoutElement) {
71
- layoutElement.classList.remove("layer-open")
72
- layoutElement.classList.add("layer-hide")
73
- }
74
- }
75
-
76
- setTimeout(() => {
77
- if (!activeLayers.value.some(s => s.layerId === layerId)) {
78
- return
79
- }
80
-
81
- activeLayers.value = activeLayers.value.filter(s => s.layerId !== layerId)
82
-
83
- const layer = activeLayers.value.at(-1)
84
- const queryLayer = layer ? { layer: layer.name, ...layer.params } : {}
85
- const query = { ...(history.value.query?.layer ? queryLayer : {}) }
86
-
87
- router.push({ path: history.value.path, query })
88
- if (activeLayers.value.length === 0 && typeof document !== "undefined") {
89
- document.title = pageTitle.value
90
- }
91
-
92
- if (activeLayers.value.length === 0) {
93
- document.documentElement.style.removeProperty("overflow")
94
- document.body.style.removeProperty("overflow")
95
- }
96
- }, 400)
97
- }
98
-
21
+ const createLayer = (name, params) => {
22
+ return {
23
+ name,
24
+ layerId: getLayerHash(name),
25
+ component: name.charAt(0).toUpperCase() + name.slice(1),
26
+ params: Object.assign({}, history.value.query, params),
27
+ closeLayer: typeof window !== "undefined" ? () => {
28
+ } : void 0
29
+ };
30
+ };
31
+ const resolveLayer = (layerName, options = { isCloseOtherLayers: false }, params) => {
32
+ const activeLayer = activeLayers.value.find(({ name }) => name === layerName);
33
+ if (activeLayer) {
34
+ const layer = activeLayers.value.splice(activeLayers.value.indexOf(activeLayer), 1)[0];
35
+ if (layer) {
36
+ if (params) {
37
+ layer.params = params;
38
+ }
39
+ activeLayers.value.push(layer);
40
+ }
41
+ } else {
42
+ if (options.isCloseOtherLayers) {
43
+ activeLayers.value = [];
44
+ }
45
+ if (activeLayers.value.length >= layersLimit) {
46
+ activeLayers.value.shift();
47
+ }
48
+ activeLayers.value.push(createLayer(layerName, params));
49
+ }
50
+ };
51
+ const closeLayer = (layerId) => {
52
+ if (typeof document !== "undefined") {
53
+ const layerElement = document.getElementById(layerId);
54
+ if (layerElement) {
55
+ layerElement.classList.remove("open");
56
+ layerElement.classList.add("hide");
57
+ }
58
+ const layoutElement = document.querySelector("#layout");
59
+ if (layoutElement) {
60
+ layoutElement.classList.remove("layer-open");
61
+ layoutElement.classList.add("layer-hide");
62
+ }
63
+ }
64
+ setTimeout(() => {
65
+ if (!activeLayers.value.some((s) => s.layerId === layerId)) {
66
+ return;
67
+ }
68
+ activeLayers.value = activeLayers.value.filter((s) => s.layerId !== layerId);
69
+ const layer = activeLayers.value.at(-1);
70
+ const queryLayer = layer ? { layer: layer.name, ...layer.params } : {};
71
+ const query = { ...history.value.query?.layer ? queryLayer : {} };
72
+ router.push({ path: history.value.path, query });
73
+ if (activeLayers.value.length === 0 && typeof document !== "undefined") {
74
+ document.title = pageTitle.value;
75
+ }
76
+ if (activeLayers.value.length === 0) {
77
+ document.documentElement.style.removeProperty("overflow");
78
+ document.body.style.removeProperty("overflow");
79
+ }
80
+ }, 400);
81
+ };
99
82
  const closeAllLayers = () => {
100
- activeLayers.value = []
101
- router.push(history.value.path)
102
- document.title = pageTitle.value
103
- }
104
-
83
+ activeLayers.value = [];
84
+ router.push(history.value.path);
85
+ document.title = pageTitle.value;
86
+ };
105
87
  watch(reactiveHistory, (value, prevValue) => {
106
- history.value = value
107
- if (value.path !== prevValue.path) {
108
- if (value.query.layer) {
109
- resolveLayer(value.query.layer.toString(), { isCloseOtherLayers: true })
110
- } else if (activeLayers.value.length > 0) {
111
- activeLayers.value = []
112
- document.title = pageTitle.value
113
- }
114
- } else if (value.query.layer) {
115
- if (value.query.layer !== prevValue.query.layer) {
116
- resolveLayer(value.query.layer.toString())
117
- } else {
118
- const activeLayer = activeLayers.value.find(({ name }) => name === value.query.layer)
119
- if (activeLayer) {
120
- activeLayer.params = value.query
121
- }
122
- }
123
- } else if (activeLayers.value.length > 0) {
124
- activeLayers.value = []
125
- document.title = pageTitle.value
126
- }
127
- })
128
-
88
+ history.value = value;
89
+ if (value.path !== prevValue.path) {
90
+ if (value.query.layer) {
91
+ resolveLayer(value.query.layer.toString(), { isCloseOtherLayers: true });
92
+ } else if (activeLayers.value.length > 0) {
93
+ activeLayers.value = [];
94
+ document.title = pageTitle.value;
95
+ }
96
+ } else if (value.query.layer) {
97
+ if (value.query.layer !== prevValue.query.layer) {
98
+ resolveLayer(value.query.layer.toString());
99
+ } else {
100
+ const activeLayer = activeLayers.value.find(({ name }) => name === value.query.layer);
101
+ if (activeLayer) {
102
+ activeLayer.params = value.query;
103
+ }
104
+ }
105
+ } else if (activeLayers.value.length > 0) {
106
+ activeLayers.value = [];
107
+ document.title = pageTitle.value;
108
+ }
109
+ });
129
110
  onMounted(() => {
130
- pageTitle.value = document.title
131
-
132
- layerActions.value = {
133
- initialized: true,
134
- open: (layerName: string, params?: { [p: string]: any }) => {
135
- if (params?.mode === "router") {
136
- const { mode, ...restParams } = params
137
- router.push({ path: history.value.path, query: { layer: layerName, ...(restParams ?? {}) } })
138
- } else {
139
- resolveLayer(layerName, undefined, params)
140
- }
141
- },
142
- getLayer: (layerName: string) => {
143
- return activeLayers.value.find(({ name }) => name === layerName)
144
- },
145
- closeAllLayers: () => {
146
- closeAllLayers()
147
- },
148
- }
149
-
150
- window.addEventListener("keyup", event => {
151
- if (event.key === "Escape") {
152
- const lastLayer = activeLayers.value.at(-1)
153
- if (lastLayer) {
154
- closeLayer(lastLayer.layerId)
155
- }
156
- }
157
- })
158
- })
159
-
111
+ pageTitle.value = document.title;
112
+ layerActions.value = {
113
+ initialized: true,
114
+ open: (layerName, params) => {
115
+ if (params?.mode === "router") {
116
+ const { mode, ...restParams } = params;
117
+ router.push({ path: history.value.path, query: { layer: layerName, ...restParams ?? {} } });
118
+ } else {
119
+ resolveLayer(layerName, void 0, params);
120
+ }
121
+ },
122
+ getLayer: (layerName) => {
123
+ return activeLayers.value.find(({ name }) => name === layerName);
124
+ },
125
+ closeAllLayers: () => {
126
+ closeAllLayers();
127
+ }
128
+ };
129
+ window.addEventListener("keyup", (event) => {
130
+ if (event.key === "Escape") {
131
+ const lastLayer = activeLayers.value.at(-1);
132
+ if (lastLayer) {
133
+ closeLayer(lastLayer.layerId);
134
+ }
135
+ }
136
+ });
137
+ });
160
138
  if (!layerActions.value?.initialized && history.value.query?.layer) {
161
- resolveLayer(history.value.query.layer.toString())
139
+ resolveLayer(history.value.query.layer.toString());
162
140
  }
163
141
  </script>
164
142
 
165
- <script lang="ts">
143
+ <script>
166
144
  export const useLayerManager = () => {
167
- const layerActions = useLayerActions()
168
- return {
169
- open: (layerName: string, params?: { [p: string]: any }) => layerActions.value?.open?.(layerName, params),
170
- getLayer: (layerName: string) => layerActions.value?.getLayer?.(layerName),
171
- closeAllLayers: () => layerActions.value?.closeAllLayers?.(),
172
- }
173
- }
145
+ const layerActions = useLayerActions();
146
+ return {
147
+ open: (layerName, params) => layerActions.value?.open?.(layerName, params),
148
+ getLayer: (layerName) => layerActions.value?.getLayer?.(layerName),
149
+ closeAllLayers: () => layerActions.value?.closeAllLayers?.()
150
+ };
151
+ };
174
152
  </script>
175
153
 
176
154
  <template>
@@ -0,0 +1,10 @@
1
+ import type { ActiveLayer } from "./types.js";
2
+ export declare const useLayerManager: () => {
3
+ open: (layerName: string, params?: {
4
+ [p: string]: any;
5
+ }) => void | undefined;
6
+ getLayer: (layerName: string) => ActiveLayer | undefined;
7
+ closeAllLayers: () => void | undefined;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ export default _default;
@@ -1,2 +1,2 @@
1
- import LayerManager, { useLayerManager } from "./LayersProvider.vue";
1
+ import LayerManager, { useLayerManager } from "./LayersProvider.vue.js";
2
2
  export { LayerManager, useLayerManager };
@@ -1,4 +1,4 @@
1
- import type { ActiveLayer } from "./types";
1
+ import type { ActiveLayer } from "./types.js";
2
2
  export declare const useLayerActions: () => import("vue").Ref<{
3
3
  initialized: boolean;
4
4
  open?: ((layerName: string, params?: {
@@ -1,10 +1,10 @@
1
1
  import { addRouteMiddleware, defineNuxtPlugin } from "#app";
2
2
  import { useNuxtApp, useRequestHeaders, useRuntimeConfig, useState } from "#imports";
3
3
  import { watch } from "vue";
4
- import { fetch, getUser } from "./api/index.mjs";
5
- import { authMiddleware, guestMiddleware, localeMiddleware } from "./middleware/index.mjs";
6
- import { defineVuePlugins, useThemeMode } from "./packages/core/index.mjs";
7
- import { flush, setToken, setUser } from "./packages/core/api-client.mjs";
4
+ import { fetch, getUser } from "./api/index.js";
5
+ import { authMiddleware, guestMiddleware, localeMiddleware } from "./middleware/index.js";
6
+ import { defineVuePlugins, useThemeMode } from "./packages/core/index.js";
7
+ import { flush, setToken, setUser } from "./packages/core/api-client.js";
8
8
  const useAuth = () => {
9
9
  return useState("auth", () => null);
10
10
  };
@@ -1,6 +1,6 @@
1
1
  import { defineNuxtPlugin } from "#app";
2
2
  import { useNuxtApp } from "#imports";
3
- import { deviceHelper } from "../packages/core/helpers/index.mjs";
3
+ import { deviceHelper } from "../packages/core/helpers/index.js";
4
4
  export default defineNuxtPlugin(() => {
5
5
  const device = deviceHelper();
6
6
  return {
package/dist/types.d.mts CHANGED
@@ -1,8 +1,3 @@
1
+ export { default } from './module.mjs'
1
2
 
2
- import type { } from './module.js'
3
-
4
-
5
-
6
-
7
-
8
- export type { default } from './module.js'
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,18 +1,24 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.19.19",
3
+ "version": "1.19.20",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
- "import": "./dist/module.mjs",
9
- "require": "./dist/module.cjs"
8
+ "types": "./dist/types.d.mts",
9
+ "import": "./dist/module.mjs"
10
10
  },
11
11
  "./assets/": "./assets/",
12
- "./helpers": "./dist/runtime/thirdparty/helpers/index.mjs"
12
+ "./helpers": "./dist/runtime/thirdparty/helpers/index.js"
13
+ },
14
+ "main": "./dist/module.mjs",
15
+ "typesVersions": {
16
+ "*": {
17
+ ".": [
18
+ "./dist/types.d.mts"
19
+ ]
20
+ }
13
21
  },
14
- "main": "./dist/module.cjs",
15
- "types": "./dist/types.d.ts",
16
22
  "files": [
17
23
  "dist",
18
24
  "assets"
@@ -24,10 +30,10 @@
24
30
  },
25
31
  "scripts": {
26
32
  "build": "nuxt-module-build build",
27
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
28
- "dev": "nuxi dev playground --dotenv .env.dev",
29
- "dev:build:dev": "nuxi build playground --dotenv .env.dev",
30
- "dev:build:prod": "nuxi build playground --dotenv .env.prod",
33
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
34
+ "dev": "nuxt dev playground --dotenv .env.dev",
35
+ "dev:build:dev": "nuxt build playground --dotenv .env.dev",
36
+ "dev:build:prod": "nuxt build playground --dotenv .env.prod",
31
37
  "rollup": "rollup -c",
32
38
  "lint": "eslint --config=eslint.config.js ./src",
33
39
  "lint:fix": "eslint --config=eslint.config.js --fix ./src",
@@ -43,15 +49,16 @@
43
49
  "devDependencies": {
44
50
  "@braintree/sanitize-url": "^7.1.1",
45
51
  "@fingerprintjs/fingerprintjs": "^4.6.2",
52
+ "@inzombieland/nuxt-common": "^1.19.19",
46
53
  "@nuxt/devtools": "latest",
47
54
  "@nuxt/icon": "^1.15.0",
48
- "@nuxt/kit": "^3.19.2",
49
- "@nuxt/module-builder": "0.6.0",
50
- "@nuxt/schema": "^3.19.2",
55
+ "@nuxt/kit": "^4.3.0",
56
+ "@nuxt/module-builder": "^1.0.2",
57
+ "@nuxt/schema": "^4.3.0",
51
58
  "@nuxtjs/i18n": "^10.1.0",
52
59
  "@nuxtjs/tailwindcss": "^6.14.0",
53
- "@pinia/colada": "^0.17.6",
54
- "@pinia/colada-nuxt": "^0.2.3",
60
+ "@pinia/colada": "^0.21.2",
61
+ "@pinia/colada-nuxt": "^0.3.1",
55
62
  "@pinia/nuxt": "^0.11.2",
56
63
  "@primeuix/themes": "^1.2.3",
57
64
  "@primevue/nuxt-module": "^4.3.9",
@@ -67,11 +74,11 @@
67
74
  "@vite-pwa/nuxt": "^1.0.4",
68
75
  "@vueuse/nuxt": "^13.9.0",
69
76
  "autoprefixer": "^10.4.20",
70
- "changelogen": "^0.5.7",
77
+ "changelogen": "^0.6.2",
71
78
  "config": "^3.3.12",
72
79
  "eslint": "^9.36.0",
73
80
  "lerna": "^8.2.2",
74
- "nuxt": "^3.19.2",
81
+ "nuxt": "^4.3.0",
75
82
  "ofetch": "^1.4.1",
76
83
  "pinia": "^3.0.3",
77
84
  "postcss": "^8.5.6",
package/dist/module.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
-
3
- interface ModuleOptions {
4
- }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
-
7
- export { _default as default };
8
- export type { ModuleOptions };
@@ -1,2 +0,0 @@
1
- import { userActions } from "./index.mjs";
2
- export default userActions;
@@ -1 +0,0 @@
1
- export * from "../packages/core/composables/index.mjs";
@@ -1,4 +0,0 @@
1
- import authMiddleware from "./auth.mjs";
2
- import guestMiddleware from "./guest.mjs";
3
- import localeMiddleware from "./locale.global.mjs";
4
- export { authMiddleware, guestMiddleware, localeMiddleware };
@@ -1,10 +0,0 @@
1
- export * from "../helpers/composables.mjs";
2
- export * from "./use-active-sessions.mjs";
3
- export { useApiActions } from "./use-api-actions.mjs";
4
- export { useAppLocale } from "./use-app-locale.mjs";
5
- export { useCookies } from "./use-cookies.mjs";
6
- export { useSubscribe } from "./use-subscribe.mjs";
7
- export { useThemeMode } from "./use-theme-mode.mjs";
8
- export { useUser } from "./use-user.mjs";
9
- export { useValidators } from "./use-validators.mjs";
10
- export { useVisitor } from "./use-visitor.mjs";
@@ -1,4 +0,0 @@
1
- export { useApiHelper } from "./api-helper.mjs";
2
- export { useDevice } from "./device-helper.mjs";
3
- export { usePhoneHelper } from "./phone-helper.mjs";
4
- export { useStringHelper } from "./string-helper.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./sanitize-html.mjs";
2
- export * from "./sanitize-url.mjs";
package/dist/types.d.ts DELETED
@@ -1,8 +0,0 @@
1
-
2
- import type { } from './module'
3
-
4
-
5
-
6
-
7
-
8
- export type { default } from './module'
File without changes