@histoire/vendors 1.0.0-alpha.1 → 1.0.0-alpha.2
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/client/b-floating-vue.js +1 -1
- package/dist/client/b-iconify.js +142 -255
- package/dist/client/b-pinia.js +3 -3
- package/dist/client/b-scroll.js +1 -1
- package/dist/client/b-vue-use.js +1200 -764
- package/dist/client/b-vue.js +1 -1
- package/dist/client/node_modules/@babel/parser/package.json +2 -2
- package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +127 -164
- package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +16 -6
- package/dist/client/node_modules/@babel/types/lib/index.d.ts +1168 -1157
- package/dist/client/node_modules/@babel/types/package.json +12 -12
- package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +59 -6
- package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +9 -2
- package/dist/client/node_modules/@iconify/vue/package.json +14 -14
- package/dist/client/node_modules/@vueuse/core/index.d.ts +486 -236
- package/dist/client/node_modules/@vueuse/core/package.json +18 -6
- package/dist/client/node_modules/@vueuse/metadata/package.json +11 -4
- package/dist/client/node_modules/@vueuse/shared/index.d.ts +50 -16
- package/dist/client/node_modules/@vueuse/shared/package.json +15 -3
- package/dist/client/node_modules/pinia/dist/pinia.d.ts +1 -1
- package/dist/client/node_modules/pinia/package.json +1 -1
- package/dist/client/node_modules/postcss/lib/at-rule.d.ts +9 -9
- package/dist/client/node_modules/postcss/lib/comment.d.ts +7 -7
- package/dist/client/node_modules/postcss/lib/container.d.ts +45 -48
- package/dist/client/node_modules/postcss/lib/declaration.d.ts +9 -9
- package/dist/client/node_modules/postcss/lib/input.d.ts +15 -17
- package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +40 -40
- package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +5 -5
- package/dist/client/node_modules/postcss/lib/node.d.ts +8 -8
- package/dist/client/node_modules/postcss/lib/result.d.ts +10 -10
- package/dist/client/node_modules/postcss/lib/rule.d.ts +8 -8
- package/dist/client/node_modules/postcss/package.json +1 -1
- package/dist/client/vue.runtime.esm-bundler.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueuse/core",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "12.7.0",
|
|
4
5
|
"description": "Collection of essential Vue Composition Utilities",
|
|
5
6
|
"author": "Anthony Fu <https://github.com/antfu>",
|
|
6
7
|
"license": "MIT",
|
|
@@ -35,11 +36,22 @@
|
|
|
35
36
|
"module": "./index.mjs",
|
|
36
37
|
"unpkg": "./index.iife.min.js",
|
|
37
38
|
"jsdelivr": "./index.iife.min.js",
|
|
38
|
-
"types": "./index.d.
|
|
39
|
+
"types": "./index.d.ts",
|
|
40
|
+
"files": [
|
|
41
|
+
"*.cjs",
|
|
42
|
+
"*.d.cts",
|
|
43
|
+
"*.d.mts",
|
|
44
|
+
"*.d.ts",
|
|
45
|
+
"*.js",
|
|
46
|
+
"*.mjs"
|
|
47
|
+
],
|
|
39
48
|
"dependencies": {
|
|
40
49
|
"@types/web-bluetooth": "^0.0.20",
|
|
41
|
-
"
|
|
42
|
-
"@vueuse/
|
|
43
|
-
"
|
|
50
|
+
"vue": "^3.5.13",
|
|
51
|
+
"@vueuse/metadata": "12.7.0",
|
|
52
|
+
"@vueuse/shared": "12.7.0"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "rollup --config=rollup.config.ts --configPlugin=rollup-plugin-esbuild"
|
|
44
56
|
}
|
|
45
|
-
}
|
|
57
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueuse/metadata",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "12.
|
|
4
|
+
"version": "12.7.0",
|
|
5
5
|
"description": "Metadata for VueUse functions",
|
|
6
6
|
"author": "Anthony Fu <https://github.com/antfu>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -31,9 +31,16 @@
|
|
|
31
31
|
"module": "./index.mjs",
|
|
32
32
|
"types": "./index.d.ts",
|
|
33
33
|
"files": [
|
|
34
|
-
"
|
|
34
|
+
"*.cjs",
|
|
35
|
+
"*.d.cts",
|
|
36
|
+
"*.d.mts",
|
|
37
|
+
"*.d.ts",
|
|
38
|
+
"*.js",
|
|
39
|
+
"*.mjs",
|
|
40
|
+
"index.json"
|
|
35
41
|
],
|
|
36
42
|
"scripts": {
|
|
37
|
-
"update": "
|
|
43
|
+
"update": "tsx scripts/update.ts",
|
|
44
|
+
"build": "rollup --config=rollup.config.ts --configPlugin=rollup-plugin-esbuild"
|
|
38
45
|
}
|
|
39
|
-
}
|
|
46
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { WatchOptionsBase, Ref,
|
|
2
|
+
import { WatchOptionsBase, Ref, WatchSource, ComputedGetter, ComputedRef, WritableComputedOptions, WritableComputedRef, WatchOptions, MaybeRef, MaybeRefOrGetter, InjectionKey, ShallowUnwrapRef as ShallowUnwrapRef$1, inject, provide, UnwrapNestedRefs, UnwrapRef, ToRef, ToRefs, toValue as toValue$1, WatchCallback, WatchStopHandle } from 'vue';
|
|
3
3
|
export { MaybeRef, MaybeRefOrGetter } from 'vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -142,16 +142,17 @@ type IsAny<T> = IfAny<T, true, false>;
|
|
|
142
142
|
|
|
143
143
|
type Callback<T> = IsAny<T> extends true ? (...param: any) => void : ([
|
|
144
144
|
T
|
|
145
|
-
] extends [void] ? (...param: unknown[]) => void : (...param: [T, ...unknown[]]) => void);
|
|
145
|
+
] extends [void] ? (...param: unknown[]) => void : [T] extends [any[]] ? (...param: T) => void : (...param: [T, ...unknown[]]) => void);
|
|
146
146
|
type EventHookOn<T = any> = (fn: Callback<T>) => {
|
|
147
147
|
off: () => void;
|
|
148
148
|
};
|
|
149
149
|
type EventHookOff<T = any> = (fn: Callback<T>) => void;
|
|
150
|
-
type EventHookTrigger<T = any> = (...param:
|
|
150
|
+
type EventHookTrigger<T = any> = (...param: Parameters<Callback<T>>) => Promise<unknown[]>;
|
|
151
151
|
interface EventHook<T = any> {
|
|
152
152
|
on: EventHookOn<T>;
|
|
153
153
|
off: EventHookOff<T>;
|
|
154
154
|
trigger: EventHookTrigger<T>;
|
|
155
|
+
clear: () => void;
|
|
155
156
|
}
|
|
156
157
|
/**
|
|
157
158
|
* Utility for creating event hooks
|
|
@@ -225,13 +226,21 @@ interface ThrottleFilterOptions {
|
|
|
225
226
|
*/
|
|
226
227
|
declare function throttleFilter(ms: MaybeRefOrGetter<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): EventFilter;
|
|
227
228
|
declare function throttleFilter(options: ThrottleFilterOptions): EventFilter;
|
|
229
|
+
interface PausableFilterOptions {
|
|
230
|
+
/**
|
|
231
|
+
* The initial state
|
|
232
|
+
*
|
|
233
|
+
* @default 'active'
|
|
234
|
+
*/
|
|
235
|
+
initialState?: 'active' | 'paused';
|
|
236
|
+
}
|
|
228
237
|
/**
|
|
229
238
|
* EventFilter that gives extra controls to pause and resume the filter
|
|
230
239
|
*
|
|
231
240
|
* @param extendFilter Extra filter to apply when the PausableFilter is active, default to none
|
|
232
|
-
*
|
|
241
|
+
* @param options Options to configure the filter
|
|
233
242
|
*/
|
|
234
|
-
declare function pausableFilter(extendFilter?: EventFilter): Pausable & {
|
|
243
|
+
declare function pausableFilter(extendFilter?: EventFilter, options?: PausableFilterOptions): Pausable & {
|
|
235
244
|
eventFilter: EventFilter;
|
|
236
245
|
};
|
|
237
246
|
|
|
@@ -286,6 +295,10 @@ declare function containsProp(obj: object, ...props: string[]): boolean;
|
|
|
286
295
|
declare function increaseWithUnit(target: number, delta: number): number;
|
|
287
296
|
declare function increaseWithUnit(target: string, delta: number): string;
|
|
288
297
|
declare function increaseWithUnit(target: string | number, delta: number): string | number;
|
|
298
|
+
/**
|
|
299
|
+
* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
|
|
300
|
+
*/
|
|
301
|
+
declare function pxValue(px: string): number;
|
|
289
302
|
/**
|
|
290
303
|
* Create a new subset object by giving keys
|
|
291
304
|
*/
|
|
@@ -296,6 +309,7 @@ declare function objectPick<O extends object, T extends keyof O>(obj: O, keys: T
|
|
|
296
309
|
declare function objectOmit<O extends object, T extends keyof O>(obj: O, keys: T[], omitUndefined?: boolean): Omit<O, T>;
|
|
297
310
|
declare function objectEntries<T extends object>(obj: T): Array<[keyof T, T[keyof T]]>;
|
|
298
311
|
declare function getLifeCycleTarget(target?: any): any;
|
|
312
|
+
declare function toArray<T>(value: T): T extends readonly any[] ? T : [T];
|
|
299
313
|
|
|
300
314
|
/**
|
|
301
315
|
* Keep states in the global scope to be reusable across Vue instances.
|
|
@@ -427,7 +441,7 @@ declare function reactifyObject<T extends object, S extends boolean = true>(obj:
|
|
|
427
441
|
/**
|
|
428
442
|
* Computed reactive object.
|
|
429
443
|
*/
|
|
430
|
-
declare function reactiveComputed<T extends object>(fn:
|
|
444
|
+
declare function reactiveComputed<T extends object>(fn: ComputedGetter<T>): UnwrapNestedRefs<T>;
|
|
431
445
|
|
|
432
446
|
type ReactiveOmitPredicate<T> = (value: T[keyof T], key: keyof T) => boolean;
|
|
433
447
|
declare function reactiveOmit<T extends object, K extends keyof T>(obj: T, ...keys: (K | K[])[]): Omit<T, K>;
|
|
@@ -639,12 +653,14 @@ declare function toRefs<T extends object>(objectRef: MaybeRef<T>, options?: ToRe
|
|
|
639
653
|
|
|
640
654
|
/**
|
|
641
655
|
* Get the value of value/ref/getter.
|
|
656
|
+
*
|
|
657
|
+
* @deprecated use `toValue` from `vue` instead
|
|
642
658
|
*/
|
|
643
|
-
declare
|
|
659
|
+
declare const toValue: typeof toValue$1;
|
|
644
660
|
/**
|
|
645
661
|
* @deprecated use `toValue` instead
|
|
646
662
|
*/
|
|
647
|
-
declare const resolveUnref: typeof toValue;
|
|
663
|
+
declare const resolveUnref: typeof toValue$1;
|
|
648
664
|
|
|
649
665
|
/**
|
|
650
666
|
* Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function
|
|
@@ -748,8 +764,17 @@ interface UntilArrayInstance<T> extends UntilBaseInstance<T> {
|
|
|
748
764
|
declare function until<T extends unknown[]>(r: WatchSource<T> | MaybeRefOrGetter<T>): UntilArrayInstance<T>;
|
|
749
765
|
declare function until<T>(r: WatchSource<T> | MaybeRefOrGetter<T>): UntilValueInstance<T>;
|
|
750
766
|
|
|
751
|
-
|
|
752
|
-
|
|
767
|
+
interface UseArrayDifferenceOptions {
|
|
768
|
+
/**
|
|
769
|
+
* Returns asymmetric difference
|
|
770
|
+
*
|
|
771
|
+
* @see https://en.wikipedia.org/wiki/Symmetric_difference
|
|
772
|
+
* @default false
|
|
773
|
+
*/
|
|
774
|
+
symmetric?: boolean;
|
|
775
|
+
}
|
|
776
|
+
declare function useArrayDifference<T>(list: MaybeRefOrGetter<T[]>, values: MaybeRefOrGetter<T[]>, key?: keyof T, options?: UseArrayDifferenceOptions): ComputedRef<T[]>;
|
|
777
|
+
declare function useArrayDifference<T>(list: MaybeRefOrGetter<T[]>, values: MaybeRefOrGetter<T[]>, compareFn?: (value: T, othVal: T) => boolean, options?: UseArrayDifferenceOptions): ComputedRef<T[]>;
|
|
753
778
|
|
|
754
779
|
/**
|
|
755
780
|
* Reactive `Array.every`
|
|
@@ -1034,11 +1059,17 @@ declare function useThrottleFn<T extends FunctionArgs>(fn: T, ms?: MaybeRefOrGet
|
|
|
1034
1059
|
|
|
1035
1060
|
interface UseTimeoutFnOptions {
|
|
1036
1061
|
/**
|
|
1037
|
-
* Start the timer
|
|
1062
|
+
* Start the timer immediately
|
|
1038
1063
|
*
|
|
1039
1064
|
* @default true
|
|
1040
1065
|
*/
|
|
1041
1066
|
immediate?: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* Execute the callback immediately after calling `start`
|
|
1069
|
+
*
|
|
1070
|
+
* @default false
|
|
1071
|
+
*/
|
|
1072
|
+
immediateCallback?: boolean;
|
|
1042
1073
|
}
|
|
1043
1074
|
/**
|
|
1044
1075
|
* Wrapper for `setTimeout` with controls.
|
|
@@ -1077,9 +1108,11 @@ interface UseToNumberOptions {
|
|
|
1077
1108
|
/**
|
|
1078
1109
|
* Method to use to convert the value to a number.
|
|
1079
1110
|
*
|
|
1111
|
+
* Or a custom function for the conversion.
|
|
1112
|
+
*
|
|
1080
1113
|
* @default 'parseFloat'
|
|
1081
1114
|
*/
|
|
1082
|
-
method?: 'parseFloat' | 'parseInt';
|
|
1115
|
+
method?: 'parseFloat' | 'parseInt' | ((value: string | number) => number);
|
|
1083
1116
|
/**
|
|
1084
1117
|
* The base in mathematical numeral systems passed to `parseInt`.
|
|
1085
1118
|
* Only works with `method: 'parseInt'`
|
|
@@ -1166,9 +1199,10 @@ declare function watchOnce<T, Immediate extends Readonly<boolean> = false>(sourc
|
|
|
1166
1199
|
interface WatchPausableReturn extends Pausable {
|
|
1167
1200
|
stop: WatchStopHandle;
|
|
1168
1201
|
}
|
|
1169
|
-
|
|
1170
|
-
declare function watchPausable<T
|
|
1171
|
-
declare function watchPausable<T
|
|
1202
|
+
type WatchPausableOptions<Immediate> = WatchWithFilterOptions<Immediate> & PausableFilterOptions;
|
|
1203
|
+
declare function watchPausable<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1204
|
+
declare function watchPausable<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1205
|
+
declare function watchPausable<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1172
1206
|
|
|
1173
1207
|
interface WatchThrottledOptions<Immediate> extends WatchOptions<Immediate> {
|
|
1174
1208
|
throttle?: MaybeRefOrGetter<number>;
|
|
@@ -1206,4 +1240,4 @@ interface WheneverOptions extends WatchOptions {
|
|
|
1206
1240
|
*/
|
|
1207
1241
|
declare function whenever<T>(source: WatchSource<T | false | null | undefined>, cb: WatchCallback<T>, options?: WheneverOptions): vue.WatchHandle;
|
|
1208
1242
|
|
|
1209
|
-
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type Awaited, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type CreateInjectionStateOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IfAny, type IgnoredUpdater, type IsAny, type MapOldSources, type MapSources, type MultiWatchSources, type Mutable, type Pausable, type Promisify, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ThrottleFilterOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type WheneverOptions, type WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
|
1243
|
+
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type Awaited, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type CreateInjectionStateOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IfAny, type IgnoredUpdater, type IsAny, type MapOldSources, type MapSources, type MultiWatchSources, type Mutable, type Pausable, type PausableFilterOptions, type Promisify, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ThrottleFilterOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayDifferenceOptions, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableOptions, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type WheneverOptions, type WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueuse/shared",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "12.7.0",
|
|
4
5
|
"author": "Anthony Fu <https://github.com/antfu>",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"funding": "https://github.com/sponsors/antfu",
|
|
@@ -30,8 +31,19 @@
|
|
|
30
31
|
"module": "./index.mjs",
|
|
31
32
|
"unpkg": "./index.iife.min.js",
|
|
32
33
|
"jsdelivr": "./index.iife.min.js",
|
|
33
|
-
"types": "./index.d.
|
|
34
|
+
"types": "./index.d.ts",
|
|
35
|
+
"files": [
|
|
36
|
+
"*.cjs",
|
|
37
|
+
"*.d.cts",
|
|
38
|
+
"*.d.mts",
|
|
39
|
+
"*.d.ts",
|
|
40
|
+
"*.js",
|
|
41
|
+
"*.mjs"
|
|
42
|
+
],
|
|
34
43
|
"dependencies": {
|
|
35
44
|
"vue": "^3.5.13"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "rollup --config=rollup.config.ts --configPlugin=rollup-plugin-esbuild"
|
|
36
48
|
}
|
|
37
|
-
}
|
|
49
|
+
}
|
|
@@ -823,7 +823,7 @@ declare type _StoreWithGetters_Readonly<G> = {
|
|
|
823
823
|
* Store augmented with writable getters. For internal usage **only**.
|
|
824
824
|
*/
|
|
825
825
|
declare type _StoreWithGetters_Writable<G> = {
|
|
826
|
-
[K in keyof G as G[K] extends WritableComputedRef<any> ? K : never]: G[K] extends WritableComputedRef<infer R
|
|
826
|
+
[K in keyof G as G[K] extends WritableComputedRef<any> ? K : never]: G[K] extends Readonly<WritableComputedRef<infer R>> ? R : never;
|
|
827
827
|
};
|
|
828
828
|
|
|
829
829
|
/**
|
|
@@ -97,19 +97,11 @@ declare class AtRule_ extends Container {
|
|
|
97
97
|
* layer.nodes //=> undefined
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
nodes: Container['nodes']
|
|
100
|
+
nodes: Container['nodes'] | undefined
|
|
101
101
|
parent: ContainerWithChildren | undefined
|
|
102
102
|
|
|
103
103
|
raws: AtRule.AtRuleRaws
|
|
104
104
|
type: 'atrule'
|
|
105
|
-
constructor(defaults?: AtRule.AtRuleProps)
|
|
106
|
-
assign(overrides: AtRule.AtRuleProps | object): this
|
|
107
|
-
|
|
108
|
-
clone(overrides?: Partial<AtRule.AtRuleProps>): this
|
|
109
|
-
|
|
110
|
-
cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this
|
|
111
|
-
|
|
112
|
-
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
|
|
113
105
|
/**
|
|
114
106
|
* The at-rule’s name immediately follows the `@`.
|
|
115
107
|
*
|
|
@@ -121,6 +113,7 @@ declare class AtRule_ extends Container {
|
|
|
121
113
|
*/
|
|
122
114
|
get name(): string
|
|
123
115
|
set name(value: string)
|
|
116
|
+
|
|
124
117
|
/**
|
|
125
118
|
* The at-rule’s parameters, the values that follow the at-rule’s name
|
|
126
119
|
* but precede any `{}` block.
|
|
@@ -132,7 +125,14 @@ declare class AtRule_ extends Container {
|
|
|
132
125
|
* ```
|
|
133
126
|
*/
|
|
134
127
|
get params(): string
|
|
128
|
+
|
|
135
129
|
set params(value: string)
|
|
130
|
+
|
|
131
|
+
constructor(defaults?: AtRule.AtRuleProps)
|
|
132
|
+
assign(overrides: AtRule.AtRuleProps | object): this
|
|
133
|
+
clone(overrides?: Partial<AtRule.AtRuleProps>): this
|
|
134
|
+
cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this
|
|
135
|
+
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
declare class AtRule extends AtRule_ {}
|
|
@@ -49,18 +49,18 @@ declare class Comment_ extends Node {
|
|
|
49
49
|
parent: Container | undefined
|
|
50
50
|
raws: Comment.CommentRaws
|
|
51
51
|
type: 'comment'
|
|
52
|
-
constructor(defaults?: Comment.CommentProps)
|
|
53
|
-
|
|
54
|
-
assign(overrides: Comment.CommentProps | object): this
|
|
55
|
-
|
|
56
|
-
clone(overrides?: Partial<Comment.CommentProps>): this
|
|
57
|
-
cloneAfter(overrides?: Partial<Comment.CommentProps>): this
|
|
58
|
-
cloneBefore(overrides?: Partial<Comment.CommentProps>): this
|
|
59
52
|
/**
|
|
60
53
|
* The comment's text.
|
|
61
54
|
*/
|
|
62
55
|
get text(): string
|
|
56
|
+
|
|
63
57
|
set text(value: string)
|
|
58
|
+
|
|
59
|
+
constructor(defaults?: Comment.CommentProps)
|
|
60
|
+
assign(overrides: Comment.CommentProps | object): this
|
|
61
|
+
clone(overrides?: Partial<Comment.CommentProps>): this
|
|
62
|
+
cloneAfter(overrides?: Partial<Comment.CommentProps>): this
|
|
63
|
+
cloneBefore(overrides?: Partial<Comment.CommentProps>): this
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
declare class Comment extends Comment_ {}
|
|
@@ -65,25 +65,22 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
65
65
|
nodes: Child[] | undefined
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
69
|
-
* child nodes that can then be added to this container.
|
|
70
|
-
*
|
|
71
|
-
* This ensures that the nodes' parent is set to this container, that they use
|
|
72
|
-
* the correct prototype chain, and that they're marked as dirty.
|
|
68
|
+
* The container’s first child.
|
|
73
69
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* @param type This should be set to `'prepend'` if the new nodes will be
|
|
78
|
-
* inserted at the beginning of the container.
|
|
79
|
-
* @hidden
|
|
70
|
+
* ```js
|
|
71
|
+
* rule.first === rules.nodes[0]
|
|
72
|
+
* ```
|
|
80
73
|
*/
|
|
81
|
-
|
|
82
|
-
nodes: Container.NewChild,
|
|
83
|
-
sample: Node | undefined,
|
|
84
|
-
type?: 'prepend' | false
|
|
85
|
-
): Child[]
|
|
74
|
+
get first(): Child | undefined
|
|
86
75
|
|
|
76
|
+
/**
|
|
77
|
+
* The container’s last child.
|
|
78
|
+
*
|
|
79
|
+
* ```js
|
|
80
|
+
* rule.last === rule.nodes[rule.nodes.length - 1]
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
get last(): Child | undefined
|
|
87
84
|
/**
|
|
88
85
|
* Inserts new nodes to the end of the container.
|
|
89
86
|
*
|
|
@@ -107,10 +104,10 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
107
104
|
append(...nodes: Container.NewChild[]): this
|
|
108
105
|
assign(overrides: Container.ContainerProps | object): this
|
|
109
106
|
clone(overrides?: Partial<Container.ContainerProps>): this
|
|
107
|
+
|
|
110
108
|
cloneAfter(overrides?: Partial<Container.ContainerProps>): this
|
|
111
109
|
|
|
112
110
|
cloneBefore(overrides?: Partial<Container.ContainerProps>): this
|
|
113
|
-
|
|
114
111
|
/**
|
|
115
112
|
* Iterates through the container’s immediate children,
|
|
116
113
|
* calling `callback` for each child.
|
|
@@ -147,6 +144,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
147
144
|
each(
|
|
148
145
|
callback: (node: Child, index: number) => false | void
|
|
149
146
|
): false | undefined
|
|
147
|
+
|
|
150
148
|
/**
|
|
151
149
|
* Returns `true` if callback returns `true`
|
|
152
150
|
* for all of the container’s children.
|
|
@@ -161,7 +159,6 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
161
159
|
every(
|
|
162
160
|
condition: (node: Child, index: number, nodes: Child[]) => boolean
|
|
163
161
|
): boolean
|
|
164
|
-
|
|
165
162
|
/**
|
|
166
163
|
* Returns a `child`’s index within the `Container#nodes` array.
|
|
167
164
|
*
|
|
@@ -173,6 +170,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
173
170
|
* @return Child index.
|
|
174
171
|
*/
|
|
175
172
|
index(child: Child | number): number
|
|
173
|
+
|
|
176
174
|
/**
|
|
177
175
|
* Insert new node after old node within the container.
|
|
178
176
|
*
|
|
@@ -182,19 +180,6 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
182
180
|
*/
|
|
183
181
|
insertAfter(oldNode: Child | number, newNode: Container.NewChild): this
|
|
184
182
|
|
|
185
|
-
/**
|
|
186
|
-
* Insert new node before old node within the container.
|
|
187
|
-
*
|
|
188
|
-
* ```js
|
|
189
|
-
* rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop }))
|
|
190
|
-
* ```
|
|
191
|
-
*
|
|
192
|
-
* @param oldNode Child or child’s index.
|
|
193
|
-
* @param newNode New node.
|
|
194
|
-
* @return This node for methods chain.
|
|
195
|
-
*/
|
|
196
|
-
insertBefore(oldNode: Child | number, newNode: Container.NewChild): this
|
|
197
|
-
|
|
198
183
|
/**
|
|
199
184
|
* Traverses the container’s descendant nodes, calling callback
|
|
200
185
|
* for each comment node.
|
|
@@ -212,6 +197,18 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
212
197
|
* @return Returns `false` if iteration was broke.
|
|
213
198
|
*/
|
|
214
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Insert new node before old node within the container.
|
|
202
|
+
*
|
|
203
|
+
* ```js
|
|
204
|
+
* rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop }))
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
* @param oldNode Child or child’s index.
|
|
208
|
+
* @param newNode New node.
|
|
209
|
+
* @return This node for methods chain.
|
|
210
|
+
*/
|
|
211
|
+
insertBefore(oldNode: Child | number, newNode: Container.NewChild): this
|
|
215
212
|
/**
|
|
216
213
|
* Inserts new nodes to the start of the container.
|
|
217
214
|
*
|
|
@@ -233,6 +230,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
233
230
|
* @return This node for methods chain.
|
|
234
231
|
*/
|
|
235
232
|
prepend(...nodes: Container.NewChild[]): this
|
|
233
|
+
|
|
236
234
|
/**
|
|
237
235
|
* Add child to the end of the node.
|
|
238
236
|
*
|
|
@@ -278,7 +276,6 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
278
276
|
pattern: RegExp | string,
|
|
279
277
|
replaced: { (substring: string, ...args: any[]): string } | string
|
|
280
278
|
): this
|
|
281
|
-
|
|
282
279
|
/**
|
|
283
280
|
* Passes all declaration values within the container that match pattern
|
|
284
281
|
* through callback, replacing those values with the returned result
|
|
@@ -379,14 +376,13 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
379
376
|
nameFilter: RegExp | string,
|
|
380
377
|
callback: (atRule: AtRule, index: number) => false | void
|
|
381
378
|
): false | undefined
|
|
382
|
-
|
|
383
379
|
walkAtRules(
|
|
384
380
|
callback: (atRule: AtRule, index: number) => false | void
|
|
385
381
|
): false | undefined
|
|
382
|
+
|
|
386
383
|
walkComments(
|
|
387
384
|
callback: (comment: Comment, indexed: number) => false | void
|
|
388
385
|
): false | undefined
|
|
389
|
-
|
|
390
386
|
walkComments(
|
|
391
387
|
callback: (comment: Comment, indexed: number) => false | void
|
|
392
388
|
): false | undefined
|
|
@@ -424,11 +420,9 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
424
420
|
propFilter: RegExp | string,
|
|
425
421
|
callback: (decl: Declaration, index: number) => false | void
|
|
426
422
|
): false | undefined
|
|
427
|
-
|
|
428
423
|
walkDecls(
|
|
429
424
|
callback: (decl: Declaration, index: number) => false | void
|
|
430
425
|
): false | undefined
|
|
431
|
-
|
|
432
426
|
/**
|
|
433
427
|
* Traverses the container’s descendant nodes, calling callback
|
|
434
428
|
* for each rule node.
|
|
@@ -459,21 +453,24 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
|
|
|
459
453
|
callback: (rule: Rule, index: number) => false | void
|
|
460
454
|
): false | undefined
|
|
461
455
|
/**
|
|
462
|
-
*
|
|
456
|
+
* An internal method that converts a {@link NewChild} into a list of actual
|
|
457
|
+
* child nodes that can then be added to this container.
|
|
463
458
|
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
* ```
|
|
467
|
-
*/
|
|
468
|
-
get first(): Child | undefined
|
|
469
|
-
/**
|
|
470
|
-
* The container’s last child.
|
|
459
|
+
* This ensures that the nodes' parent is set to this container, that they use
|
|
460
|
+
* the correct prototype chain, and that they're marked as dirty.
|
|
471
461
|
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
462
|
+
* @param mnodes The new node or nodes to add.
|
|
463
|
+
* @param sample A node from whose raws the new node's `before` raw should be
|
|
464
|
+
* taken.
|
|
465
|
+
* @param type This should be set to `'prepend'` if the new nodes will be
|
|
466
|
+
* inserted at the beginning of the container.
|
|
467
|
+
* @hidden
|
|
475
468
|
*/
|
|
476
|
-
|
|
469
|
+
protected normalize(
|
|
470
|
+
nodes: Container.NewChild,
|
|
471
|
+
sample: Node | undefined,
|
|
472
|
+
type?: 'prepend' | false
|
|
473
|
+
): Child[]
|
|
477
474
|
}
|
|
478
475
|
|
|
479
476
|
declare class Container<
|
|
@@ -68,14 +68,6 @@ declare class Declaration_ extends Node {
|
|
|
68
68
|
|
|
69
69
|
type: 'decl'
|
|
70
70
|
|
|
71
|
-
constructor(defaults?: Declaration.DeclarationProps)
|
|
72
|
-
assign(overrides: Declaration.DeclarationProps | object): this
|
|
73
|
-
|
|
74
|
-
clone(overrides?: Partial<Declaration.DeclarationProps>): this
|
|
75
|
-
|
|
76
|
-
cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): this
|
|
77
|
-
|
|
78
|
-
cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): this
|
|
79
71
|
/**
|
|
80
72
|
* It represents a specificity of the declaration.
|
|
81
73
|
*
|
|
@@ -91,8 +83,8 @@ declare class Declaration_ extends Node {
|
|
|
91
83
|
* ```
|
|
92
84
|
*/
|
|
93
85
|
get important(): boolean
|
|
94
|
-
|
|
95
86
|
set important(value: boolean)
|
|
87
|
+
|
|
96
88
|
/**
|
|
97
89
|
* The property name for a CSS declaration.
|
|
98
90
|
*
|
|
@@ -106,6 +98,7 @@ declare class Declaration_ extends Node {
|
|
|
106
98
|
get prop(): string
|
|
107
99
|
|
|
108
100
|
set prop(value: string)
|
|
101
|
+
|
|
109
102
|
/**
|
|
110
103
|
* The property value for a CSS declaration.
|
|
111
104
|
*
|
|
@@ -125,6 +118,7 @@ declare class Declaration_ extends Node {
|
|
|
125
118
|
*/
|
|
126
119
|
get value(): string
|
|
127
120
|
set value(value: string)
|
|
121
|
+
|
|
128
122
|
/**
|
|
129
123
|
* It represents a getter that returns `true` if a declaration starts with
|
|
130
124
|
* `--` or `$`, which are used to declare variables in CSS and SASS/SCSS.
|
|
@@ -144,6 +138,12 @@ declare class Declaration_ extends Node {
|
|
|
144
138
|
* ```
|
|
145
139
|
*/
|
|
146
140
|
get variable(): boolean
|
|
141
|
+
constructor(defaults?: Declaration.DeclarationProps)
|
|
142
|
+
|
|
143
|
+
assign(overrides: Declaration.DeclarationProps | object): this
|
|
144
|
+
clone(overrides?: Partial<Declaration.DeclarationProps>): this
|
|
145
|
+
cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): this
|
|
146
|
+
cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): this
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
declare class Declaration extends Declaration_ {}
|