@mevbg/nuxt-kit 0.1.14 → 0.1.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@mevbg/nuxt-kit",
3
3
  "configKey": "mevKit",
4
- "version": "0.1.14",
4
+ "version": "0.1.16",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.0"
@@ -1,44 +1,4 @@
1
1
  export declare function useClientInfo(): {
2
- data: {
3
- isBrowser: boolean;
4
- isMobile: boolean;
5
- isTablet: boolean;
6
- isSmartTV: boolean;
7
- isConsole: boolean;
8
- isWearable: boolean;
9
- isMobileSafari: boolean;
10
- isChromium: boolean;
11
- isMobileOnly: boolean;
12
- isAndroid: boolean;
13
- isWinPhone: boolean;
14
- isIOS: boolean;
15
- isChrome: boolean;
16
- isFirefox: boolean;
17
- isSafari: boolean;
18
- isOpera: boolean;
19
- isIE: boolean;
20
- isEdge: boolean;
21
- isYandex: boolean;
22
- isIOS13: boolean;
23
- isIPad13: boolean;
24
- isIPhone13: boolean;
25
- isIPod13: boolean;
26
- isElectron: boolean;
27
- isEdgeChromium: boolean;
28
- isLegacyEdge: boolean;
29
- isWindows: boolean;
30
- isMacOs: boolean;
31
- osVersion: string;
32
- osName: string;
33
- fullBrowserVersion: string;
34
- browserVersion: string;
35
- browserName: string;
36
- mobileVendor: string;
37
- mobileModel: string;
38
- engineName: string;
39
- engineVersion: string;
40
- getUA: string;
41
- deviceType: string;
42
- };
43
- classes: string[];
2
+ data: import("vue").Ref<Record<string, any>, Record<string, any>>;
3
+ classes: import("vue").Ref<string[], string[]>;
44
4
  };
@@ -1,8 +1,12 @@
1
1
  import * as clientInfo from "mobile-device-detect";
2
+ import { ref } from "vue";
2
3
  export function useClientInfo() {
3
- const { default: defaultInfo, deviceDetect, ...data } = clientInfo;
4
- const classes = Object.keys(data).filter(
5
- (key) => typeof data[key] === "boolean" && data[key]
4
+ const data = ref({});
5
+ const classes = ref([]);
6
+ const { default: defaultInfo, deviceDetect, ...clientData } = clientInfo;
7
+ data.value = clientData;
8
+ classes.value = Object.keys(clientData).filter(
9
+ (key) => typeof clientData[key] === "boolean" && clientData[key]
6
10
  );
7
11
  return { data, classes };
8
12
  }
@@ -1,4 +1,3 @@
1
- import { isMobileOnly } from "mobile-device-detect";
2
1
  export const transitions = [
3
2
  "bounce",
4
3
  "slide",
@@ -17,7 +16,7 @@ export const types = ["info", "success", "warning", "error"];
17
16
  export const toastifyDefaultType = "info";
18
17
  export const toastifyDefaultConfig = {
19
18
  // dangerouslyHTMLString: true,
20
- position: isMobileOnly ? "top-center" : "top-right",
19
+ position: "top-center",
21
20
  transition: "bounce",
22
21
  autoClose: 5e3,
23
22
  hideProgressBar: false,
@@ -178,8 +178,8 @@ declare const _default: import("#app").Plugin<{
178
178
  useHandler?: ((app: import("vue").App<Element>) => void) | undefined;
179
179
  }): import("vue3-toastify").Id;
180
180
  loading(content: import("vue3-toastify").Content, options?: {
181
- data?: {} | undefined;
182
181
  type?: import("vue3-toastify").ToastType | undefined;
182
+ data?: {} | undefined;
183
183
  icon?: import("vue3-toastify").IconType | undefined;
184
184
  progress?: number | undefined;
185
185
  transition?: (import("vue3-toastify").ToastTransition | import("vue3-toastify").CSSTransitionProps) | undefined;
@@ -214,8 +214,8 @@ declare const _default: import("#app").Plugin<{
214
214
  useHandler?: ((app: import("vue").App<Element>) => void) | undefined;
215
215
  }): import("vue3-toastify").Id;
216
216
  dark(content: import("vue3-toastify").Content, options?: {
217
- data?: {} | undefined;
218
217
  type?: import("vue3-toastify").ToastType | undefined;
218
+ data?: {} | undefined;
219
219
  icon?: import("vue3-toastify").IconType | undefined;
220
220
  progress?: number | undefined;
221
221
  transition?: (import("vue3-toastify").ToastTransition | import("vue3-toastify").CSSTransitionProps) | undefined;
@@ -255,8 +255,8 @@ declare const _default: import("#app").Plugin<{
255
255
  update(toastId: import("vue3-toastify").Id, options?: import("vue3-toastify").UpdateOptions): void;
256
256
  done(id: import("vue3-toastify").Id): void;
257
257
  promise: <T = unknown>(promise: Promise<T> | (() => Promise<T>), { pending, error, success }: import("vue3-toastify").ToastPromiseParams<T>, options?: {
258
- data?: {} | undefined;
259
258
  type?: import("vue3-toastify").ToastType | undefined;
259
+ data?: {} | undefined;
260
260
  icon?: import("vue3-toastify").IconType | undefined;
261
261
  progress?: number | undefined;
262
262
  transition?: (import("vue3-toastify").ToastTransition | import("vue3-toastify").CSSTransitionProps) | undefined;
@@ -498,8 +498,8 @@ declare const _default: import("#app").Plugin<{
498
498
  useHandler?: ((app: import("vue").App<Element>) => void) | undefined;
499
499
  }): import("vue3-toastify").Id;
500
500
  loading(content: import("vue3-toastify").Content, options?: {
501
- data?: {} | undefined;
502
501
  type?: import("vue3-toastify").ToastType | undefined;
502
+ data?: {} | undefined;
503
503
  icon?: import("vue3-toastify").IconType | undefined;
504
504
  progress?: number | undefined;
505
505
  transition?: (import("vue3-toastify").ToastTransition | import("vue3-toastify").CSSTransitionProps) | undefined;
@@ -534,8 +534,8 @@ declare const _default: import("#app").Plugin<{
534
534
  useHandler?: ((app: import("vue").App<Element>) => void) | undefined;
535
535
  }): import("vue3-toastify").Id;
536
536
  dark(content: import("vue3-toastify").Content, options?: {
537
- data?: {} | undefined;
538
537
  type?: import("vue3-toastify").ToastType | undefined;
538
+ data?: {} | undefined;
539
539
  icon?: import("vue3-toastify").IconType | undefined;
540
540
  progress?: number | undefined;
541
541
  transition?: (import("vue3-toastify").ToastTransition | import("vue3-toastify").CSSTransitionProps) | undefined;
@@ -575,8 +575,8 @@ declare const _default: import("#app").Plugin<{
575
575
  update(toastId: import("vue3-toastify").Id, options?: import("vue3-toastify").UpdateOptions): void;
576
576
  done(id: import("vue3-toastify").Id): void;
577
577
  promise: <T = unknown>(promise: Promise<T> | (() => Promise<T>), { pending, error, success }: import("vue3-toastify").ToastPromiseParams<T>, options?: {
578
- data?: {} | undefined;
579
578
  type?: import("vue3-toastify").ToastType | undefined;
579
+ data?: {} | undefined;
580
580
  icon?: import("vue3-toastify").IconType | undefined;
581
581
  progress?: number | undefined;
582
582
  transition?: (import("vue3-toastify").ToastTransition | import("vue3-toastify").CSSTransitionProps) | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mevbg/nuxt-kit",
3
3
  "title": "Mev’s Nuxt Kit",
4
- "version": "0.1.14",
4
+ "version": "0.1.16",
5
5
  "description": "Mev’s personal Nuxt kit module.",
6
6
  "keywords": [
7
7
  "nuxt kit",