@inzombieland/core 1.18.4 → 1.18.7

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.
@@ -1,3 +1,4 @@
1
+ export * from "../helpers/composables";
1
2
  export { useActiveSessions } from "./use-active-sessions";
2
3
  export { useApiActions } from "./use-api-actions";
3
4
  export { useAppLocale } from "./use-app-locale";
@@ -1,3 +1,4 @@
1
+ export * from "../helpers/composables.mjs";
1
2
  export { useActiveSessions } from "./use-active-sessions.mjs";
2
3
  export { useApiActions } from "./use-api-actions.mjs";
3
4
  export { useAppLocale } from "./use-app-locale.mjs";
@@ -0,0 +1,4 @@
1
+ import type { createApp } from "vue";
2
+ type App = ReturnType<typeof createApp>;
3
+ export declare function defineVuePlugins(app: App): void;
4
+ export {};
@@ -0,0 +1,4 @@
1
+ import { defineVarletPlugin } from "./plugins/index.mjs";
2
+ export function defineVuePlugins(app) {
3
+ defineVarletPlugin(app);
4
+ }
@@ -4,3 +4,7 @@ export declare const apiHelper: {
4
4
  convertToClient: typeof convertToClient;
5
5
  convertToServer: typeof convertToServer;
6
6
  };
7
+ export declare const useApiHelper: () => {
8
+ convertToClient: typeof convertToClient;
9
+ convertToServer: typeof convertToServer;
10
+ };
@@ -97,3 +97,6 @@ function parseData(data) {
97
97
  }
98
98
  }
99
99
  export const apiHelper = { convertToClient, convertToServer };
100
+ export const useApiHelper = () => {
101
+ return apiHelper;
102
+ };
@@ -0,0 +1,5 @@
1
+ export { useApiHelper } from "./api-helper";
2
+ export { useDateHelper } from "./date-helper";
3
+ export { useDevice } from "./device-helper";
4
+ export { usePhoneHelper } from "./phone-helper";
5
+ export { useStringHelper } from "./string-helper";
@@ -0,0 +1,5 @@
1
+ export { useApiHelper } from "./api-helper.mjs";
2
+ export { useDateHelper } from "./date-helper.mjs";
3
+ export { useDevice } from "./device-helper.mjs";
4
+ export { usePhoneHelper } from "./phone-helper.mjs";
5
+ export { useStringHelper } from "./string-helper.mjs";
@@ -13,3 +13,7 @@ export declare const dateHelper: {
13
13
  stringToDate: typeof stringToDate;
14
14
  dateFormat: typeof dateFormat;
15
15
  };
16
+ export declare const useDateHelper: () => {
17
+ stringToDate: typeof stringToDate;
18
+ dateFormat: typeof dateFormat;
19
+ };
@@ -228,3 +228,6 @@ export function dateFormat(date = /* @__PURE__ */ new Date(), format = "default"
228
228
  return parsedDate.trim();
229
229
  }
230
230
  export const dateHelper = { stringToDate, dateFormat };
231
+ export const useDateHelper = () => {
232
+ return dateHelper;
233
+ };
@@ -41,3 +41,4 @@ export type DeviceType = "mobile" | "tablet" | "desktop" | "unknown";
41
41
  export type DeviceOrientation = "landscape" | "portrait" | "unknown";
42
42
  export type DeviceOs = "ios" | "macos" | "iphone" | "ipad" | "ipod" | "android" | "blackberry" | "windows" | "fxos" | "meego" | "television" | "unknown";
43
43
  export declare const deviceHelper: () => Device;
44
+ export declare const useDevice: () => Device;
@@ -13,3 +13,6 @@ export const deviceHelper = () => {
13
13
  androidTabletApp: () => isMobileApp && device.androidTablet()
14
14
  };
15
15
  };
16
+ export const useDevice = () => {
17
+ return deviceHelper();
18
+ };
@@ -1,7 +1,8 @@
1
1
  export { apiHelper } from "./api-helper";
2
2
  export { dateHelper } from "./date-helper";
3
+ export { deviceHelper, type Device } from "./device-helper";
3
4
  export { phoneHelper } from "./phone-helper";
4
5
  export { stringHelper } from "./string-helper";
5
- export { deviceHelper, type Device } from "./device-helper";
6
+ export * from "./composables";
6
7
  export declare function once<T extends (...args: any[]) => any>(fn: T): T;
7
8
  export declare function createSingletonAsync<T, Args extends unknown[]>(fn: (...args: Args) => Promise<T>): (...args: Args) => Promise<T>;
package/helpers/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  export { apiHelper } from "./api-helper.mjs";
2
2
  export { dateHelper } from "./date-helper.mjs";
3
+ export { deviceHelper } from "./device-helper.mjs";
3
4
  export { phoneHelper } from "./phone-helper.mjs";
4
5
  export { stringHelper } from "./string-helper.mjs";
5
- export { deviceHelper } from "./device-helper.mjs";
6
+ export * from "./composables.mjs";
6
7
  export function once(fn) {
7
8
  let executed = false;
8
9
  let result;
@@ -11,3 +11,8 @@ export declare const phoneHelper: {
11
11
  convertToPhone: typeof convertToPhone;
12
12
  maskPhone: typeof maskPhone;
13
13
  };
14
+ export declare const usePhoneHelper: () => {
15
+ getPlainPhoneNumber: typeof getPlainPhoneNumber;
16
+ convertToPhone: typeof convertToPhone;
17
+ maskPhone: typeof maskPhone;
18
+ };
@@ -56,3 +56,6 @@ export function maskPhone(phone = "") {
56
56
  return `+${phone.slice(0, 1)} *****${phone.slice(-4)}`;
57
57
  }
58
58
  export const phoneHelper = { getPlainPhoneNumber, convertToPhone, maskPhone };
59
+ export const usePhoneHelper = () => {
60
+ return phoneHelper;
61
+ };
@@ -2,3 +2,6 @@ export declare function maskEmail(email?: string): string;
2
2
  export declare const stringHelper: {
3
3
  maskEmail: typeof maskEmail;
4
4
  };
5
+ export declare const useStringHelper: () => {
6
+ maskEmail: typeof maskEmail;
7
+ };
@@ -6,3 +6,6 @@ export function maskEmail(email = "") {
6
6
  export const stringHelper = {
7
7
  maskEmail
8
8
  };
9
+ export const useStringHelper = () => {
10
+ return stringHelper;
11
+ };
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type Ref } from "vue";
2
2
  import type { Fetch, FetchConfig } from "./types";
3
+ export { defineVuePlugins } from "./define-vue-plugins";
3
4
  export { default as AppProvider } from "./AppProvider.vue";
4
5
  export * from "./composables";
5
6
  export * from "./types";
package/index.mjs CHANGED
@@ -9,6 +9,7 @@ import { createApiGetVisitorIdentifier } from "./get-visitor.mjs";
9
9
  import { createInitApplication } from "./init-application.mjs";
10
10
  import { createApiRefreshToken } from "./refresh-token.mjs";
11
11
  import { createApiUserActions } from "./user-actions.mjs";
12
+ export { defineVuePlugins } from "./define-vue-plugins.mjs";
12
13
  export { default as AppProvider } from "./AppProvider.vue";
13
14
  export * from "./composables/index.mjs";
14
15
  export * from "./types.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/core",
3
- "version": "1.18.4",
3
+ "version": "1.18.7",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
@@ -0,0 +1 @@
1
+ export * from "./varlet-ui";
@@ -0,0 +1 @@
1
+ export * from "./varlet-ui.mjs";
@@ -0,0 +1,9 @@
1
+ import type { createApp } from "vue";
2
+ import "@varlet/ui/es/button/style/index";
3
+ import "@varlet/ui/es/chip/style/index";
4
+ import "@varlet/ui/es/icon/style/index";
5
+ import "@varlet/ui/es/link/style/index";
6
+ import "@varlet/ui/es/styles/elevation.css";
7
+ type App = ReturnType<typeof createApp>;
8
+ export declare function defineVarletPlugin(app: App): void;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Button, Chip, Icon, Link } from "@varlet/ui";
2
+ import "@varlet/ui/es/button/style/index";
3
+ import "@varlet/ui/es/chip/style/index";
4
+ import "@varlet/ui/es/icon/style/index";
5
+ import "@varlet/ui/es/link/style/index";
6
+ import "@varlet/ui/es/styles/elevation.css";
7
+ export function defineVarletPlugin(app) {
8
+ app.use(Button);
9
+ app.use(Chip);
10
+ app.use(Icon);
11
+ app.use(Link);
12
+ }