@mono-lit/utility 0.0.2 → 0.0.4

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/runtime.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { C as MonoSyncTransport, _ as MonoMergeableKey, c as MonoConfig, n as JWTCompleteTokenTypes, o as MonoAppType, t as DefaultJWTTokenTypes, w as MonoTemplate } from "./create-config-B8IhX4ht.js";
2
2
  import { a as MonoFetchCookieOptions, i as LocalStorageParams, n as CookieTokenParams, o as NormalFetchOptions$1, r as JWTPayload, s as NormalFetchResult$1, t as CookieParams } from "./types-B6FdB7LJ.js";
3
3
  import { a as monoToken, i as monoStorage, n as monoCookie, o as setMonoEventResolver, r as monoJwt, s as CookieApi, t as MonoRequestEvent } from "./universal-BR0O7Qwk.js";
4
- import { A as ValidateErrorItem, B as NormalFetchOptions, C as Format, D as SchemaType, E as SchemaObject, F as LoopTemplate, G as NotifProps, H as OdataFetchTypes, I as PathValue, J as MonoNotifButton, K as MonoNotifActionProps, L as FetchLoading, M as ValidateSchema, N as Col, O as ValidateError, P as GroupTemplate, R as FetchOData, S as FilterExpression, T as Schema, U as TanstackFetchOptions, V as NormalFetchResult, W as useHelper, X as createStaticDatasource, Y as UseOdataStaticOpts, _ as getPrefetchBridge, a as TryCatchDatasourceParams, b as CustomSummary, c as extractErrorMessage, d as promiseWrapper, f as tryCatchDatasource, g as MonoPrefetchRequest, h as MonoPrefetchBridge, i as OdataFetchUniqueTypes, j as ValidateErrorSingle, k as ValidateErrorComplex, l as loadChuckStore, m as useNormalFetch, n as FetchOverrides, o as createFetcher, p as useFetchOData, q as MonoNotifActionTypes, r as LoadChunkStoreArgs, s as createUniqueFetcher, t as _default, u as parseDxError, v as setPrefetchBridge, w as HeaderFilter, x as DataGrid, y as OdataMapTypes, z as FetchParam } from "./index-DYlzhHq7.js";
5
- import { InjectionKey, Plugin, Ref as Ref$1 } from "vue";
4
+ import { $ as createStaticDatasource, A as ValidateError, B as FetchLoading, C as Format, D as SchemaType, E as SchemaObject, F as ValidationSchemaLike, G as OdataFetchTypes, H as FetchParam, I as Col, J as NotifProps, K as TanstackFetchOptions, L as GroupTemplate, M as ValidateErrorItem, N as ValidateErrorSingle, O as StandardSchemaV1, P as ValidateSchema, Q as UseOdataStaticOpts, R as LoopTemplate, S as FilterExpression, T as Schema, U as NormalFetchOptions, V as FetchOData, W as NormalFetchResult, X as MonoNotifActionTypes, Y as MonoNotifActionProps, Z as MonoNotifButton, _ as getPrefetchBridge, a as TryCatchDatasourceParams, b as CustomSummary, c as extractErrorMessage, d as promiseWrapper, f as tryCatchDatasource, g as MonoPrefetchRequest, h as MonoPrefetchBridge, i as OdataFetchUniqueTypes, j as ValidateErrorComplex, k as StandardSchemaV1Result, l as loadChuckStore, m as useNormalFetch, n as FetchOverrides, o as createFetcher, p as useFetchOData, q as useHelper, r as LoadChunkStoreArgs, s as createUniqueFetcher, t as _default, u as parseDxError, v as setPrefetchBridge, w as HeaderFilter, x as DataGrid, y as OdataMapTypes, z as PathValue } from "./index-CLXtqgEx.js";
5
+ import { InjectionKey, Plugin, Ref } from "vue";
6
6
  import { RouteRecordRaw } from "vue-router";
7
7
  //#region src/token/client.d.ts
8
8
  /** Client cookie util — `document.cookie` backed (unchanged public shape). */
@@ -2397,8 +2397,8 @@ export declare function createMono(option: MonoConfig): Plugin;
2397
2397
  * the existing ref untouched, even if their `init` differs. Returning a ref from
2398
2398
  * `init` adopts that ref rather than nesting it.
2399
2399
  */
2400
- export declare function useState<T = any>(init?: (() => T | Ref$1<T>) | T): Ref$1<T>;
2401
- export declare function useState<T = any>(key: string, init?: (() => T | Ref$1<T>) | T): Ref$1<T>;
2400
+ export declare function useState<T = any>(init?: (() => T | Ref<T>) | T): Ref<T>;
2401
+ export declare function useState<T = any>(key: string, init?: (() => T | Ref<T>) | T): Ref<T>;
2402
2402
  /** Explicit alias — for hosts that don't want the bare Nuxt name in scope. */
2403
2403
  export declare const monoUseState: typeof useState;
2404
2404
  /**
@@ -2440,22 +2440,22 @@ export declare let defineLayout: ({ menu, routes }: {
2440
2440
  }) => RouteRecordRaw[];
2441
2441
  //#endregion
2442
2442
  //#region src/composables/host-provider.d.ts
2443
- type HostKey<T> = string | symbol | InjectionKey<Ref$1<T>>;
2443
+ type HostKey<T> = string | symbol | InjectionKey<Ref<T>>;
2444
2444
  type InjectHostOptions<T> = {
2445
2445
  key: HostKey<T>;
2446
2446
  defaultValue: T;
2447
2447
  };
2448
2448
  type HostProviderOptions<T> = {
2449
2449
  key: HostKey<T>;
2450
- syncRef: Ref$1<T>;
2450
+ syncRef: Ref<T>;
2451
2451
  immediate?: boolean;
2452
2452
  deep?: boolean;
2453
2453
  resetOnUnmount?: boolean;
2454
2454
  resetValue?: T;
2455
2455
  deleteOnUnmount?: boolean;
2456
2456
  };
2457
- export declare function monoInject<T>(options: InjectHostOptions<T>): Ref$1<T>;
2458
- export declare function monoProvide<T>(options: HostProviderOptions<T>): Ref$1<T>;
2457
+ export declare function monoInject<T>(options: InjectHostOptions<T>): Ref<T>;
2458
+ export declare function monoProvide<T>(options: HostProviderOptions<T>): Ref<T>;
2459
2459
  //#endregion
2460
2460
  //#region src/composables/use-mono-utility.d.ts
2461
2461
  /**
@@ -2498,11 +2498,11 @@ export declare const useMonoUtility: () => {
2498
2498
  };
2499
2499
  }) => void;
2500
2500
  filterOrIn: (field: string, values: any[], combine?: boolean) => any;
2501
- validateAllSchema: <T extends object = any>({ schema, input, error }: ValidateSchema<T>, callback?: () => void) => Promise<boolean>;
2502
- validateSchema: <T = any>({ schema, field, input, error }: ValidateSchema<T>, callback?: Function) => Promise<boolean>;
2503
- validateAllSchemaCheck: (error: ValidateError<any>) => boolean;
2501
+ validateAllSchema: <T extends object = any>({ schema, input, error }: ValidateSchema<T>, callback?: () => unknown) => Promise<boolean>;
2502
+ validateSchema: <T = any>({ schema, field, input, error }: ValidateSchema<T>, callback?: () => unknown) => Promise<boolean>;
2503
+ validateAllSchemaCheck: (error: ValidateError<any> | any) => boolean;
2504
2504
  clearSchemaValidation: ({ error }: {
2505
- error: Ref<any>;
2505
+ error: any;
2506
2506
  }) => void;
2507
2507
  notif: (options: NotifProps) => Promise<import("notivue").NotificationClearMethods | undefined>;
2508
2508
  dxFilterToString: ({ filter, encode }: {
@@ -2515,4 +2515,4 @@ export declare const useMonoUtility: () => {
2515
2515
  declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2516
2516
  declare const _default$1: typeof __VLS_export;
2517
2517
  //#endregion
2518
- export { type Col, type Col as MonoDataGridCol, type CustomSummary, type DataGrid, type DataGrid as MonoDataGridTypes, type FetchLoading, type FetchOData, type FetchParam, type FilterExpression, type Format, type GroupTemplate, type HeaderFilter, type LoopTemplate, type createStaticDatasource as MonoCreateStaticDatasource, type FetchOverrides as MonoFetchOverrides, type NormalFetchOptions as MonoNormalFetchTypes, type NormalFetchOptions, _default as MonoNotifAction, type MonoNotifActionProps as MonoNotifActionPropsTypes, type MonoNotifActionTypes, type MonoNotifButton as MonoNotifButtonTypes, type NotifProps as MonoNotifPropsTypes, type NotifProps, _default$1 as MonoNotivue, type OdataFetchTypes as MonoOdataFetchTypes, type OdataFetchTypes, type OdataFetchUniqueTypes as MonoOdataFetchUniqueTypes, type OdataMapTypes as MonoOdataMapTypes, type OdataMapTypes, type MonoPrefetchBridge, type MonoPrefetchRequest, type MonoRequestEvent, type SchemaObject as MonoSchemaObject, type SchemaObject, type LoadChunkStoreArgs as MonoStoreChunkTypes, type TanstackFetchOptions as MonoTanstackFetchTypes, type TanstackFetchOptions, type TryCatchDatasourceParams as MonoTryCatchDatasourceTypes, type UseOdataStaticOpts as MonoUseOdataStaticTypes, type ValidateErrorComplex as MonoValidateError, type ValidateErrorComplex, type ValidateErrorSingle as MonoValidateErrorSingle, type ValidateErrorSingle, type NormalFetchResult, type PathValue, type Schema, type SchemaType, type ValidateError, type ValidateErrorItem, type ValidateSchema, type createFetcher, type createUniqueFetcher, type extractErrorMessage, type useNormalFetch as fetchNormal, type useFetchOData as fetchOData, type getPrefetchBridge, type loadChuckStore, monoConfig, monoCookie, monoEnv, monoJwt, monoStorage, monoToken, type parseDxError, type promiseWrapper, setMonoEventResolver, type setPrefetchBridge, type tryCatchDatasource, useMonoUtility as useMonoUtils, useHelper as useUtils };
2518
+ export { type Col, type Col as MonoDataGridCol, type CustomSummary, type DataGrid, type DataGrid as MonoDataGridTypes, type FetchLoading, type FetchOData, type FetchParam, type FilterExpression, type Format, type GroupTemplate, type HeaderFilter, type LoopTemplate, type createStaticDatasource as MonoCreateStaticDatasource, type FetchOverrides as MonoFetchOverrides, type NormalFetchOptions as MonoNormalFetchTypes, type NormalFetchOptions, _default as MonoNotifAction, type MonoNotifActionProps as MonoNotifActionPropsTypes, type MonoNotifActionTypes, type MonoNotifButton as MonoNotifButtonTypes, type NotifProps as MonoNotifPropsTypes, type NotifProps, _default$1 as MonoNotivue, type OdataFetchTypes as MonoOdataFetchTypes, type OdataFetchTypes, type OdataFetchUniqueTypes as MonoOdataFetchUniqueTypes, type OdataMapTypes as MonoOdataMapTypes, type OdataMapTypes, type MonoPrefetchBridge, type MonoPrefetchRequest, type MonoRequestEvent, type SchemaObject as MonoSchemaObject, type SchemaObject, type StandardSchemaV1 as MonoStandardSchema, type StandardSchemaV1, type LoadChunkStoreArgs as MonoStoreChunkTypes, type TanstackFetchOptions as MonoTanstackFetchTypes, type TanstackFetchOptions, type TryCatchDatasourceParams as MonoTryCatchDatasourceTypes, type UseOdataStaticOpts as MonoUseOdataStaticTypes, type ValidateErrorComplex as MonoValidateError, type ValidateErrorComplex, type ValidateErrorSingle as MonoValidateErrorSingle, type ValidateErrorSingle, type ValidationSchemaLike as MonoValidationSchema, type ValidationSchemaLike, type NormalFetchResult, type PathValue, type Schema, type SchemaType, type StandardSchemaV1Result, type ValidateError, type ValidateErrorItem, type ValidateSchema, type createFetcher, type createUniqueFetcher, type extractErrorMessage, type useNormalFetch as fetchNormal, type useFetchOData as fetchOData, type getPrefetchBridge, type loadChuckStore, monoConfig, monoCookie, monoEnv, monoJwt, monoStorage, monoToken, type parseDxError, type promiseWrapper, setMonoEventResolver, type setPrefetchBridge, type tryCatchDatasource, useMonoUtility as useMonoUtils, useHelper as useUtils };
package/dist/runtime.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as createMono, D as monoState, E as monoEnv, O as monoStatePatch, S as useState, T as monoConfig, _ as monoProvide, b as monoUseState, g as monoInject, k as monoStateReset, m as useHelper, n as useMonoUtility, r as Notif_default, t as MonoNotivue_default, v as defineLayout, w as initMono, x as nuxtStateKeys, y as clearNuxtState } from "./runtime-vs7U9Ed4.js";
1
+ import { C as createMono, D as monoState, E as monoEnv, O as monoStatePatch, S as useState, T as monoConfig, _ as monoProvide, b as monoUseState, g as monoInject, k as monoStateReset, m as useHelper, n as useMonoUtility, r as Notif_default, t as MonoNotivue_default, v as defineLayout, w as initMono, x as nuxtStateKeys, y as clearNuxtState } from "./runtime-TXXmV6Q6.js";
2
2
  import { a as setMonoEventResolver, c as useMyToken, d as useMyJwt, i as monoToken, l as useMyFetch, n as monoJwt, o as useMyStorage, r as monoStorage, s as useMyCookie, t as monoCookie } from "./universal-DIVEzCvN.js";
3
3
 
4
4
  export { Notif_default as MonoNotifAction, MonoNotivue_default as MonoNotivue, clearNuxtState, createMono, defineLayout, initMono, monoConfig, monoCookie, monoEnv, monoInject, monoJwt, monoProvide, monoState, monoStatePatch, monoStateReset, monoStorage, monoToken, monoUseState, nuxtStateKeys, setMonoEventResolver, useMonoUtility, useMonoUtility as useMonoUtils, useMyCookie, useMyFetch, useMyJwt, useMyStorage, useMyToken, useState, useHelper as useUtils };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-lit/utility",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Mono config, fetching, auth/token, Nuxt/Vite integration and shared helpers for the @mono-lit ecosystem.",
5
5
  "keywords": [
6
6
  "vue",
@@ -81,7 +81,6 @@
81
81
  "registry": "https://registry.npmjs.org/"
82
82
  },
83
83
  "peerDependencies": {
84
- "@nuxt/kit": "^4.6.1",
85
84
  "@odata2ts/http-client-fetch": "^0.9.0",
86
85
  "@unhead/vue": "3.1.3",
87
86
  "dotenv": "^17.4.2",
@@ -89,31 +88,33 @@
89
88
  "h3": "^1.15.1",
90
89
  "jwt-decode": "^4.0.0",
91
90
  "notivue": "^2.4.5",
91
+ "valibot": "^1.0.0",
92
92
  "vue": "3.5.44",
93
93
  "vue-router": "5.4.0",
94
94
  "yup": "^1.7.1",
95
95
  "@mono-lit/devextreme": "^0.0.2"
96
96
  },
97
97
  "devDependencies": {
98
- "@nuxt/kit": "4.6.1",
99
- "@nuxt/schema": "4.6.1",
100
98
  "@odata2ts/http-client-fetch": "0.9.0",
99
+ "@odata2ts/odata-query-objects": "0.28.1",
101
100
  "@tsdown/css": "0.23.1",
102
101
  "@vueuse/core": "14.3.0",
103
- "@odata2ts/odata-query-objects": "0.28.1",
104
102
  "fake-indexeddb": "^6.2.5",
105
103
  "h3": "^1.15.1",
106
104
  "jwt-decode": "4.0.0",
107
105
  "taze": "^19.14.1",
108
- "yup": "1.7.1",
109
106
  "tsdown": "0.23.1",
110
107
  "typescript": "6.0.3",
111
108
  "unplugin-vue": "7.2.0",
109
+ "valibot": "1.5.0",
112
110
  "vite": "8.3.4",
113
111
  "vue-tsc": "~3.2.0",
114
- "@mono-lit/helper": "0.0.3"
112
+ "yup": "1.7.1",
113
+ "@mono-lit/helper": "0.0.5"
115
114
  },
116
115
  "dependencies": {
116
+ "@nuxt/kit": "^4.6.2",
117
+ "@nuxt/schema": "^4.6.2",
117
118
  "c12": "4.0.0-beta.5",
118
119
  "citty": "0.1.6",
119
120
  "devextreme": "25.1.6",
@@ -122,9 +123,6 @@
122
123
  "unstorage": "1.17.5"
123
124
  },
124
125
  "peerDependenciesMeta": {
125
- "@nuxt/kit": {
126
- "optional": true
127
- },
128
126
  "@odata2ts/http-client-fetch": {
129
127
  "optional": true
130
128
  },
@@ -136,6 +134,9 @@
136
134
  },
137
135
  "yup": {
138
136
  "optional": true
137
+ },
138
+ "valibot": {
139
+ "optional": true
139
140
  }
140
141
  },
141
142
  "scripts": {