@varlet/shared 3.20.7 → 3.20.8
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/lib/index.cjs +2 -2
- package/lib/index.d.cts +13 -13
- package/lib/index.d.ts +5 -6
- package/package.json +3 -3
package/lib/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let node_crypto = require("node:crypto");
|
|
3
|
-
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.
|
|
3
|
+
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.72.0_vite-plus@1.1.0_@types+node@22.19.17_@vitest+coverage-istanbul@5.0_av5tye26zac23ejqbw3p6coe4y/node_modules/rattail/dist/callOrReturn-Kvk3rYZJ.mjs
|
|
4
4
|
function isArray(val) {
|
|
5
5
|
return Array.isArray(val);
|
|
6
6
|
}
|
|
@@ -251,7 +251,7 @@ function init(converter, defaultAttributes) {
|
|
|
251
251
|
}
|
|
252
252
|
var api = init(defaultConverter, { path: "/" });
|
|
253
253
|
//#endregion
|
|
254
|
-
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.
|
|
254
|
+
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.72.0_vite-plus@1.1.0_@types+node@22.19.17_@vitest+coverage-istanbul@5.0_av5tye26zac23ejqbw3p6coe4y/node_modules/rattail/dist/index.mjs
|
|
255
255
|
function at(arr, index) {
|
|
256
256
|
if (!arr.length) return;
|
|
257
257
|
if (index < 0) index += arr.length;
|
package/lib/index.d.cts
CHANGED
|
@@ -23,13 +23,13 @@ declare function v6(options?: Version6Options, buf?: undefined, offset?: number)
|
|
|
23
23
|
declare function v6<TBuf extends Uint8Array = Uint8Array>(options: Version6Options | undefined, buf: TBuf, offset?: number): TBuf;
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region ../../node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/index.d.ts
|
|
26
|
-
declare type EventType = string | symbol;
|
|
27
|
-
declare type Handler<T = unknown> = (event: T) => void;
|
|
28
|
-
declare type WildcardHandler<T = Record<string, unknown>> = (type: keyof T, event: T[keyof T]) => void;
|
|
29
|
-
declare type EventHandlerList<T = unknown> = Array<Handler<T>>;
|
|
30
|
-
declare type WildCardEventHandlerList<T = Record<string, unknown>> = Array<WildcardHandler<T>>;
|
|
31
|
-
declare type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>>;
|
|
32
|
-
interface Emitter<Events extends Record<EventType, unknown>> {
|
|
26
|
+
export declare type EventType = string | symbol;
|
|
27
|
+
export declare type Handler<T = unknown> = (event: T) => void;
|
|
28
|
+
export declare type WildcardHandler<T = Record<string, unknown>> = (type: keyof T, event: T[keyof T]) => void;
|
|
29
|
+
export declare type EventHandlerList<T = unknown> = Array<Handler<T>>;
|
|
30
|
+
export declare type WildCardEventHandlerList<T = Record<string, unknown>> = Array<WildcardHandler<T>>;
|
|
31
|
+
export declare type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>>;
|
|
32
|
+
export interface Emitter<Events extends Record<EventType, unknown>> {
|
|
33
33
|
all: EventHandlerMap<Events>;
|
|
34
34
|
on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
|
|
35
35
|
on(type: '*', handler: WildcardHandler<Events>): void;
|
|
@@ -45,7 +45,7 @@ interface Emitter<Events extends Record<EventType, unknown>> {
|
|
|
45
45
|
*/
|
|
46
46
|
declare function mitt<Events extends Record<EventType, unknown>>(all?: EventHandlerMap<Events>): Emitter<Events>;
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.
|
|
48
|
+
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.72.0_vite-plus@1.1.0_@types+node@22.19.17_@vitest+coverage-istanbul@5.0_av5tye26zac23ejqbw3p6coe4y/node_modules/rattail/dist/index.d.mts
|
|
49
49
|
//#region src/array/at.d.ts
|
|
50
50
|
declare function at<T>(arr: T[], index: number): T | undefined;
|
|
51
51
|
//#endregion
|
|
@@ -611,9 +611,9 @@ declare function floor(val: number, precision?: number): number;
|
|
|
611
611
|
declare function ceil(val: number, precision?: number): number;
|
|
612
612
|
//#endregion
|
|
613
613
|
//#region src/index.d.ts
|
|
614
|
-
declare function assert(condition: boolean, source: string, message: string): asserts condition;
|
|
615
|
-
declare function warn(source: string, message: string): void;
|
|
616
|
-
declare function error(source: string, message: string): void;
|
|
617
|
-
declare const isURL: (val: string | undefined | null) => boolean;
|
|
614
|
+
export declare function assert(condition: boolean, source: string, message: string): asserts condition;
|
|
615
|
+
export declare function warn(source: string, message: string): void;
|
|
616
|
+
export declare function error(source: string, message: string): void;
|
|
617
|
+
export declare const isURL: (val: string | undefined | null) => boolean;
|
|
618
618
|
//#endregion
|
|
619
|
-
export { BEM, ClassName, Classes, CookieAttributes, CookieStorage, CreateCacheManagerOptions, DurationContext,
|
|
619
|
+
export { BEM, ClassName, Classes, CookieAttributes, CookieStorage, CreateCacheManagerOptions, DurationContext, EnumOf, EnumOfConfigValue, EnumOfExtractOptionShape, EnumOfExtractValues, EnumOfKeyForValue, EnumOfNormalizeToOption, EnumOfOptionForValue, EnumOfResolvedField, EnumOfResolvedOption, EnumOfResult, EnumOfResultMethods, EnumOfStringOrGetter, EnumOfValue, EnumOfValueObject, MaskStringOptions, Motion, MotionOptions, MotionState, NOOP, NavigationTarget, PromiseWithResolvers, Storage, at, baseRound, buildNavigationUrl, call, callOrReturn, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createCacheManager, createCookieStorage, createNamespaceFn, createStorage, debounce, delay, deriveKey, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, enumOf, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasDuplicates, hasDuplicatesBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maskString, maxBy, mean, meanBy, merge, mergeWith, minBy, mitt, motion, navigation, normalizeToArray, objectEntries, objectKeys, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, rekey, removeArrayBlank, removeArrayEmpty, removeItem, removeItemBy, removeItemsBy, requestAnimationFrame, round, sample, sessionStorage, set, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryAsyncCall, tryCall, tryParseJSON, uniq, uniqBy, upperFirst, v4 as uuid, v6 as uuidV6, xor, xorWith };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export * from "rattail";
|
|
2
2
|
//#region src/index.d.ts
|
|
3
|
-
declare function assert(condition: boolean, source: string, message: string): asserts condition;
|
|
4
|
-
declare function warn(source: string, message: string): void;
|
|
5
|
-
declare function error(source: string, message: string): void;
|
|
6
|
-
declare const isURL: (val: string | undefined | null) => boolean;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { assert, error, isURL, warn };
|
|
3
|
+
export declare function assert(condition: boolean, source: string, message: string): asserts condition;
|
|
4
|
+
export declare function warn(source: string, message: string): void;
|
|
5
|
+
export declare function error(source: string, message: string): void;
|
|
6
|
+
export declare const isURL: (val: string | undefined | null) => boolean;
|
|
7
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/shared",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.8",
|
|
4
4
|
"description": "shared utils of varlet",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"rattail": "^2.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^22.18.0",
|
|
39
39
|
"typescript": "5.6.3",
|
|
40
|
-
"vite-plus": "
|
|
40
|
+
"vite-plus": "1.1.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "vp pack",
|