@pawover/kit 0.0.0-beta.40 → 0.0.0-beta.41
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/hooks-alova.d.ts +4 -4
- package/dist/hooks-react.js +1 -1
- package/dist/index.d.ts +38 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/patches-fetchEventSource.js +1 -1
- package/dist/{utils-DbMbll5L.js → utils-_dtCs-qa.js} +17 -17
- package/dist/utils-_dtCs-qa.js.map +1 -0
- package/metadata.json +2 -7
- package/package.json +1 -1
- package/dist/utils-DbMbll5L.js.map +0 -1
package/dist/hooks-alova.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alova_client0 from "alova/client";
|
|
2
2
|
import { AlovaFrontMiddlewareContext, AlovaMethodHandler, CompleteHandler, ErrorHandler, PaginationHookConfig, RequestHookConfig, SuccessHandler, WatcherHookConfig } from "alova/client";
|
|
3
3
|
import { AlovaGenerics, Method } from "alova";
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ interface HookOptions$2<AG extends AlovaGenerics, L extends any[], Args extends
|
|
|
9
9
|
onError?: ErrorHandler<AG, Args> | undefined;
|
|
10
10
|
onComplete?: CompleteHandler<AG, Args> | undefined;
|
|
11
11
|
}
|
|
12
|
-
declare function useAlovaPagination<AG extends AlovaGenerics, L extends any[], Args extends any[]>(methodHandler: (page: number, pageSize: number, ...args: Args) => Method<AG>, hookOptions?: HookOptions$2<AG, L, Args> | undefined):
|
|
12
|
+
declare function useAlovaPagination<AG extends AlovaGenerics, L extends any[], Args extends any[]>(methodHandler: (page: number, pageSize: number, ...args: Args) => Method<AG>, hookOptions?: HookOptions$2<AG, L, Args> | undefined): alova_client0.UsePaginationExposure<AG, L, Args>;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/hooks/alova/useAlovaRequest.d.ts
|
|
15
15
|
interface HookOptions$1<AG extends AlovaGenerics, Args extends any[]> extends RequestHookConfig<AG, Args> {
|
|
@@ -18,7 +18,7 @@ interface HookOptions$1<AG extends AlovaGenerics, Args extends any[]> extends Re
|
|
|
18
18
|
onError?: ErrorHandler<AG, Args> | undefined;
|
|
19
19
|
onComplete?: CompleteHandler<AG, Args> | undefined;
|
|
20
20
|
}
|
|
21
|
-
declare function useAlovaRequest<AG extends AlovaGenerics, Args extends any[] = any[]>(methodHandler: Method<AG> | AlovaMethodHandler<AG, Args>, hookOptions?: HookOptions$1<AG, Args> | undefined):
|
|
21
|
+
declare function useAlovaRequest<AG extends AlovaGenerics, Args extends any[] = any[]>(methodHandler: Method<AG> | AlovaMethodHandler<AG, Args>, hookOptions?: HookOptions$1<AG, Args> | undefined): alova_client0.UseHookExposure<AG, Args, unknown>;
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/hooks/alova/useAlovaWatcher.d.ts
|
|
24
24
|
interface HookOptions<AG extends AlovaGenerics, Args extends any[]> extends WatcherHookConfig<AG, Args> {
|
|
@@ -26,7 +26,7 @@ interface HookOptions<AG extends AlovaGenerics, Args extends any[]> extends Watc
|
|
|
26
26
|
onError?: ErrorHandler<AG, Args> | undefined;
|
|
27
27
|
onComplete?: CompleteHandler<AG, Args> | undefined;
|
|
28
28
|
}
|
|
29
|
-
declare function useAlovaWatcher<AG extends AlovaGenerics, Args extends any[] = any[]>(methodHandler: Method<AG> | AlovaMethodHandler<AG, Args>, watchingStates: AG["StatesExport"]["Watched"][], hookOptions?: HookOptions<AG, Args>):
|
|
29
|
+
declare function useAlovaWatcher<AG extends AlovaGenerics, Args extends any[] = any[]>(methodHandler: Method<AG> | AlovaMethodHandler<AG, Args>, watchingStates: AG["StatesExport"]["Watched"][], hookOptions?: HookOptions<AG, Args>): alova_client0.UseHookExposure<AG, Args, unknown>;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { useAlovaPagination, useAlovaRequest, useAlovaWatcher };
|
|
32
32
|
//# sourceMappingURL=hooks-alova.d.ts.map
|
package/dist/hooks-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ft as isEqual, H as isBrowser, Vt as isFunction, W as arrayZipToObject, _t as isPromiseLike, mt as isString, w as objectAssign, x as objectKeys } from "./utils-_dtCs-qa.js";
|
|
2
2
|
import { i as BREAK_POINT_TOKEN_ENUM } from "./enums-BL6w5-mS.js";
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2631,13 +2631,6 @@ declare function objectValues<O extends PlainObject>(plainObject: O): O[keyof O]
|
|
|
2631
2631
|
declare function objectValues<O extends AnyObject>(anyObject: O): O[keyof O][];
|
|
2632
2632
|
//#endregion
|
|
2633
2633
|
//#region src/utils/string/stringInitialCase.d.ts
|
|
2634
|
-
/**
|
|
2635
|
-
* 字符串首字母大小写
|
|
2636
|
-
* - 包含非西欧字母字符时,不处理
|
|
2637
|
-
* - 纯字母且全大写时,不处理
|
|
2638
|
-
* - 纯字母且非全大写时,首字母小写,其余保留
|
|
2639
|
-
* - 纯字母且非全大写时,首字母大写,其余保留
|
|
2640
|
-
*
|
|
2641
2634
|
/**
|
|
2642
2635
|
* 字符串首字母大小写
|
|
2643
2636
|
* - 包含非西欧字母字符时,不处理
|
|
@@ -2657,10 +2650,6 @@ declare function objectValues<O extends AnyObject>(anyObject: O): O[keyof O][];
|
|
|
2657
2650
|
declare function stringInitialCase(input: string, caseType?: "lower" | "upper" | undefined): string;
|
|
2658
2651
|
//#endregion
|
|
2659
2652
|
//#region src/utils/string/stringReplace.d.ts
|
|
2660
|
-
/**
|
|
2661
|
-
* 字符串替换
|
|
2662
|
-
* - 替换第一个匹配项
|
|
2663
|
-
*
|
|
2664
2653
|
/**
|
|
2665
2654
|
* 字符串替换
|
|
2666
2655
|
* - 替换第一个匹配项
|
|
@@ -2693,9 +2682,6 @@ declare function stringReplace<I$1 extends string, S extends string, R$1 extends
|
|
|
2693
2682
|
declare function stringTemplate(input: string, template: PlainObject, regex?: RegExp): string;
|
|
2694
2683
|
//#endregion
|
|
2695
2684
|
//#region src/utils/string/stringToJson.d.ts
|
|
2696
|
-
/**
|
|
2697
|
-
* 处理 JSON 字符串
|
|
2698
|
-
*
|
|
2699
2685
|
/**
|
|
2700
2686
|
* 处理 JSON 字符串
|
|
2701
2687
|
*
|
|
@@ -2710,6 +2696,24 @@ declare function stringTemplate(input: string, template: PlainObject, regex?: Re
|
|
|
2710
2696
|
*/
|
|
2711
2697
|
declare function stringToJson<D extends AnyObject = AnyObject>(input: string | null | undefined, safeValue: D): D;
|
|
2712
2698
|
//#endregion
|
|
2699
|
+
//#region src/utils/string/stringToLowerCase.d.ts
|
|
2700
|
+
/**
|
|
2701
|
+
* 将字符串转换为小写
|
|
2702
|
+
* - 将字符串字面量类型转换为其小写形式
|
|
2703
|
+
* - 当输入无效时,返回空字符串
|
|
2704
|
+
*
|
|
2705
|
+
* @param input 待处理字符串
|
|
2706
|
+
* @returns 转换后的小写字符串类型,如果输入无效则返回空字符串类型 ""
|
|
2707
|
+
* @example
|
|
2708
|
+
* ```ts
|
|
2709
|
+
* stringToLowerCase("HELLO"); // 类型为 "hello"
|
|
2710
|
+
* stringToLowerCase(someUnknownString); // 类型为 string
|
|
2711
|
+
* stringToLowerCase(null); // 类型为 ""
|
|
2712
|
+
* ```
|
|
2713
|
+
*/
|
|
2714
|
+
declare function stringToLowerCase<const T extends string>(input: T): Lowercase<T>;
|
|
2715
|
+
declare function stringToLowerCase(input: unknown): "";
|
|
2716
|
+
//#endregion
|
|
2713
2717
|
//#region src/utils/string/stringToNumber.d.ts
|
|
2714
2718
|
/**
|
|
2715
2719
|
* 从字符串中提取数字字符串
|
|
@@ -2754,6 +2758,24 @@ declare function stringToNumber(input: string): string;
|
|
|
2754
2758
|
*/
|
|
2755
2759
|
declare function stringToPosix(input: string | null | undefined, removeLeadingSlash?: boolean): string;
|
|
2756
2760
|
//#endregion
|
|
2761
|
+
//#region src/utils/string/stringToUpperCase.d.ts
|
|
2762
|
+
/**
|
|
2763
|
+
* 将字符串转换为大写
|
|
2764
|
+
* - 将字符串字面量类型转换为其大写形式
|
|
2765
|
+
* - 当输入无效时,返回空字符串
|
|
2766
|
+
*
|
|
2767
|
+
* @param input 待处理字符串
|
|
2768
|
+
* @returns 转换后的大写字符串,如果输入无效则返回空字符串
|
|
2769
|
+
* @example
|
|
2770
|
+
* ```ts
|
|
2771
|
+
* stringToUpperCase("hello"); // 类型为 "HELLO"
|
|
2772
|
+
* stringToUpperCase(someUnknownString); // 类型为 string
|
|
2773
|
+
* stringToUpperCase(null); // 类型为 ""
|
|
2774
|
+
* ```
|
|
2775
|
+
*/
|
|
2776
|
+
declare function stringToUpperCase<const T extends string>(input: T): Uppercase<T>;
|
|
2777
|
+
declare function stringToUpperCase(input: unknown): "";
|
|
2778
|
+
//#endregion
|
|
2757
2779
|
//#region src/utils/string/stringToValues.d.ts
|
|
2758
2780
|
/**
|
|
2759
2781
|
* 字符串分割为数组
|
|
@@ -3298,7 +3320,7 @@ declare function isWeakSet(value: unknown): value is WeakSet<AnyObject>;
|
|
|
3298
3320
|
* 检查 value 是否为 string 类型
|
|
3299
3321
|
*
|
|
3300
3322
|
* @param value 待检查值
|
|
3301
|
-
* @param checkEmpty
|
|
3323
|
+
* @param checkEmpty 是否检查空字符串
|
|
3302
3324
|
* @returns 是否为字符串
|
|
3303
3325
|
* @example
|
|
3304
3326
|
* ```ts
|
|
@@ -3349,5 +3371,5 @@ declare function isWebSocket(value: unknown): value is WebSocket;
|
|
|
3349
3371
|
*/
|
|
3350
3372
|
declare function isWindow(value: unknown): value is Window;
|
|
3351
3373
|
//#endregion
|
|
3352
|
-
export { arrayCast, arrayCompete, arrayCounting, arrayDifference, arrayFirst, arrayFork, arrayIntersection, arrayLast, arrayMerge, arrayPick, arrayReplace, arrayReplaceMove, arraySplit, arrayUnzip, arrayZip, arrayZipToObject, clone, cloneDeep, cloneDeepWith, enumEntries, enumKeys, enumValues, getTimeZone, isAbortSignal, isArray, isAsyncFunction, isAsyncGeneratorFunction, isBigInt, isBlob, isBoolean, isBrowser, isClass, isDate, isEnumeration, isEqual, isError, isFalsy, isFalsyLike, isFile, isFunction, isGeneratorFunction, isIOSMobile, isIframe, isInIframe, isInfinity, isInfinityLike, isInteger, isIterable, isMap, isMobile, isNaN, isNegativeInteger, isNull, isNumber, isObject, isPositiveInteger, isPromise, isPromiseLike, isReadableStream, isRegExp, isSet, isString, isSymbol, isTablet, isTypedArray, isURLSearchParams, isUndefined, isWeakMap, isWeakSet, isWebSocket, isWebWorker, isWindow, mathToBignumber, mathToDecimal, mathToEvaluate, numberWithin, objectAssign, objectCrush, objectEntries, objectInvert, objectKeys, objectMapEntries, objectOmit, objectPick, objectValues, rowsToTree, stringInitialCase, stringReplace, stringTemplate, stringToJson, stringToNumber, stringToPosix, stringToValues, stringTrim, stringTruncate, to, treeFilter, treeFind, treeForEach, treeMap, treeToRows };
|
|
3374
|
+
export { arrayCast, arrayCompete, arrayCounting, arrayDifference, arrayFirst, arrayFork, arrayIntersection, arrayLast, arrayMerge, arrayPick, arrayReplace, arrayReplaceMove, arraySplit, arrayUnzip, arrayZip, arrayZipToObject, clone, cloneDeep, cloneDeepWith, enumEntries, enumKeys, enumValues, getTimeZone, isAbortSignal, isArray, isAsyncFunction, isAsyncGeneratorFunction, isBigInt, isBlob, isBoolean, isBrowser, isClass, isDate, isEnumeration, isEqual, isError, isFalsy, isFalsyLike, isFile, isFunction, isGeneratorFunction, isIOSMobile, isIframe, isInIframe, isInfinity, isInfinityLike, isInteger, isIterable, isMap, isMobile, isNaN, isNegativeInteger, isNull, isNumber, isObject, isPositiveInteger, isPromise, isPromiseLike, isReadableStream, isRegExp, isSet, isString, isSymbol, isTablet, isTypedArray, isURLSearchParams, isUndefined, isWeakMap, isWeakSet, isWebSocket, isWebWorker, isWindow, mathToBignumber, mathToDecimal, mathToEvaluate, numberWithin, objectAssign, objectCrush, objectEntries, objectInvert, objectKeys, objectMapEntries, objectOmit, objectPick, objectValues, rowsToTree, stringInitialCase, stringReplace, stringTemplate, stringToJson, stringToLowerCase, stringToNumber, stringToPosix, stringToUpperCase, stringToValues, stringTrim, stringTruncate, to, treeFilter, treeFind, treeForEach, treeMap, treeToRows };
|
|
3353
3375
|
//# sourceMappingURL=index.d.ts.map
|