@studiometa/js-toolkit 2.4.2 → 2.4.4-alpha.1
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/Base/index.d.ts +90 -49
- package/Base/managers/AbstractManager.d.ts +3 -3
- package/Base/managers/ChildrenManager.d.ts +1 -1
- package/Base/managers/EventsManager.d.ts +3 -3
- package/Base/managers/OptionsManager.d.ts +1 -1
- package/Base/managers/ResponsiveOptionsManager.cjs +1 -1
- package/Base/managers/ResponsiveOptionsManager.d.ts +3 -7
- package/Base/managers/ServicesManager.d.ts +6 -6
- package/Base/utils.d.ts +2 -2
- package/decorators/index.cjs +1 -1
- package/decorators/index.d.ts +10 -10
- package/decorators/withBreakpointManager.cjs +2 -3
- package/decorators/withBreakpointManager.d.ts +84 -7
- package/decorators/withBreakpointManager.js +1 -2
- package/decorators/withBreakpointObserver.cjs +2 -2
- package/decorators/withBreakpointObserver.d.ts +89 -13
- package/decorators/withBreakpointObserver.js +1 -1
- package/decorators/withDrag.cjs +1 -1
- package/decorators/withDrag.d.ts +81 -18
- package/decorators/withExtraConfig.cjs +1 -1
- package/decorators/withExtraConfig.d.ts +77 -10
- package/decorators/withFreezedOptions.cjs +9 -7
- package/decorators/withFreezedOptions.d.ts +81 -11
- package/decorators/withFreezedOptions.js +8 -6
- package/decorators/withIntersectionObserver.cjs +2 -1
- package/decorators/withIntersectionObserver.d.ts +91 -17
- package/decorators/withIntersectionObserver.js +1 -0
- package/decorators/withMountWhenInView.cjs +1 -1
- package/decorators/withMountWhenInView.d.ts +91 -29
- package/decorators/withResponsiveOptions.cjs +2 -2
- package/decorators/withResponsiveOptions.d.ts +78 -5
- package/decorators/withResponsiveOptions.js +1 -1
- package/decorators/withScrolledInView.cjs +13 -7
- package/decorators/withScrolledInView.d.ts +173 -15
- package/decorators/withScrolledInView.js +12 -6
- package/decorators/withVue2.cjs +5 -5
- package/decorators/withVue2.d.ts +97 -6
- package/decorators/withVue2.js +4 -4
- package/helpers/getDirectChildren.d.ts +11 -4
- package/helpers/importOnInteraction.d.ts +2 -2
- package/helpers/importWhenVisible.d.ts +2 -2
- package/index.cjs +1 -1
- package/index.d.ts +5 -4
- package/package.json +1 -1
- package/services/drag.d.ts +1 -1
- package/services/index.cjs +1 -1
- package/services/index.d.ts +33 -25
- package/services/key.d.ts +1 -1
- package/services/load.d.ts +1 -1
- package/services/pointer.d.ts +1 -1
- package/services/raf.d.ts +1 -1
- package/services/resize.d.ts +1 -1
- package/services/scroll.d.ts +1 -1
package/decorators/withVue2.d.ts
CHANGED
|
@@ -1,7 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type Vue from 'vue';
|
|
2
|
+
import type { ComponentOptions, VueConstructor } from 'vue';
|
|
3
|
+
import type { BaseConstructor, BaseTypeParameter } from '../Base/index.js';
|
|
4
|
+
interface WithVue2Interface {
|
|
5
|
+
$refs: {
|
|
6
|
+
vue: HTMLElement;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* withVue decorator.
|
|
11
|
+
*/
|
|
12
|
+
export default function withVue2<T extends BaseTypeParameter = BaseTypeParameter, VueTypeParameter extends Vue = Vue>(BaseClass: BaseConstructor, VueCtor: VueConstructor): {
|
|
13
|
+
new <U extends BaseTypeParameter = BaseTypeParameter>(element: HTMLElement): {
|
|
14
|
+
$vue: Vue;
|
|
15
|
+
$parent: import("../Base/index.js").default<{
|
|
16
|
+
$el: HTMLElement;
|
|
17
|
+
$options: import("../Base/index.js").BaseOptions;
|
|
18
|
+
$refs: import("../Base/index.js").BaseRefs;
|
|
19
|
+
$children: {
|
|
20
|
+
[name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
$id: string;
|
|
24
|
+
$el: (WithVue2Interface & T & U)["$el"] & HTMLElement & {
|
|
25
|
+
__base__?: WeakMap<typeof import("../Base/index.js").default, import("../Base/index.js").default<{
|
|
26
|
+
$el: HTMLElement;
|
|
27
|
+
$options: import("../Base/index.js").BaseOptions;
|
|
28
|
+
$refs: import("../Base/index.js").BaseRefs;
|
|
29
|
+
$children: {
|
|
30
|
+
[name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
|
|
31
|
+
};
|
|
32
|
+
}> | "terminated">;
|
|
33
|
+
};
|
|
34
|
+
$isMounted: boolean;
|
|
35
|
+
__eventHandlers: Map<string, Set<EventListenerOrEventListenerObject>>;
|
|
36
|
+
readonly $root: import("../Base/index.js").default<{
|
|
37
|
+
$el: HTMLElement;
|
|
38
|
+
$options: import("../Base/index.js").BaseOptions;
|
|
39
|
+
$refs: import("../Base/index.js").BaseRefs;
|
|
40
|
+
$children: {
|
|
41
|
+
[name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
|
|
42
|
+
};
|
|
43
|
+
}>;
|
|
44
|
+
readonly __config: import("../Base/index.js").BaseConfig;
|
|
45
|
+
__services: import("../Base/managers/ServicesManager.js").default;
|
|
46
|
+
readonly $services: import("../Base/managers/ServicesManager.js").default;
|
|
47
|
+
__refs: import("../Base/managers/RefsManager.js").default & (WithVue2Interface & T & U)["$refs"] & import("../Base/index.js").BaseRefs;
|
|
48
|
+
readonly $refs: import("../Base/managers/RefsManager.js").default & (WithVue2Interface & T & U)["$refs"] & import("../Base/index.js").BaseRefs;
|
|
49
|
+
__options: import("../Base/managers/OptionsManager.js").default & (WithVue2Interface & T & U)["$options"] & import("../Base/index.js").BaseOptions;
|
|
50
|
+
readonly $options: import("../Base/managers/OptionsManager.js").default & (WithVue2Interface & T & U)["$options"] & import("../Base/index.js").BaseOptions;
|
|
51
|
+
__children: import("../Base/managers/ChildrenManager.js").default & ((WithVue2Interface & T & U)["$children"] extends infer T_1 ? { [key in keyof T_1]: (WithVue2Interface & T & U)["$children"][key][]; } : never) & import("../Base/index.js").BaseChildren;
|
|
52
|
+
readonly $children: import("../Base/managers/ChildrenManager.js").default & ((WithVue2Interface & T & U)["$children"] extends infer T_2 ? { [key_1 in keyof T_2]: (WithVue2Interface & T & U)["$children"][key_1][]; } : never) & import("../Base/index.js").BaseChildren;
|
|
53
|
+
__events: import("../Base/managers/EventsManager.js").default;
|
|
54
|
+
readonly $log: (...args: any) => void;
|
|
55
|
+
readonly __debug: (...args: any) => void;
|
|
56
|
+
readonly __managers: import("../Base/index.js").Managers;
|
|
57
|
+
__callMethod(method: string, ...args: any[]): any;
|
|
58
|
+
__hasEvent(event: string): boolean;
|
|
59
|
+
$mount(): any;
|
|
60
|
+
$update(): any;
|
|
61
|
+
$destroy(): any;
|
|
62
|
+
$terminate(): void;
|
|
63
|
+
__addEmits(event: string): void;
|
|
64
|
+
__removeEmits(event: string): void;
|
|
65
|
+
readonly __ctor: typeof import("../Base/index.js").default;
|
|
66
|
+
$on(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
|
|
67
|
+
$off(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
68
|
+
$emit(event: string, ...args: any[]): void;
|
|
69
|
+
addEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
70
|
+
dispatchEvent(event: Event): boolean;
|
|
71
|
+
removeEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
72
|
+
};
|
|
73
|
+
config: {
|
|
74
|
+
name: string;
|
|
75
|
+
refs: string[];
|
|
76
|
+
debug?: boolean;
|
|
77
|
+
log?: boolean;
|
|
78
|
+
emits?: string[];
|
|
79
|
+
components?: import("../Base/index.js").BaseConfigComponents;
|
|
80
|
+
options?: import("../Base/managers/OptionsManager.js").OptionsSchema;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Vue app configuration.
|
|
84
|
+
*/
|
|
85
|
+
vueConfig: ComponentOptions<VueTypeParameter, import("vue/types/options.js").DefaultData<VueTypeParameter>, import("vue/types/options.js").DefaultMethods<VueTypeParameter>, import("vue/types/options.js").DefaultComputed, import("vue/types/options.js").PropsDefinition<import("vue/types/options.js").DefaultProps>, import("vue/types/options.js").DefaultProps> & {
|
|
86
|
+
render: ComponentOptions<VueTypeParameter>['render'];
|
|
87
|
+
};
|
|
88
|
+
readonly $isBase: boolean;
|
|
89
|
+
$factory(nameOrSelector: string): import("../Base/index.js").default<{
|
|
90
|
+
$el: HTMLElement;
|
|
91
|
+
$options: import("../Base/index.js").BaseOptions;
|
|
92
|
+
$refs: import("../Base/index.js").BaseRefs;
|
|
93
|
+
$children: {
|
|
94
|
+
[name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
|
|
95
|
+
};
|
|
96
|
+
}>[];
|
|
7
97
|
};
|
|
98
|
+
export {};
|
package/decorators/withVue2.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { isDev, isFunction } from "../utils/index.js";
|
|
8
|
-
|
|
8
|
+
function withVue2(BaseClass, VueCtor) {
|
|
9
9
|
var _a, _b, _c;
|
|
10
10
|
return _c = class extends BaseClass {
|
|
11
11
|
constructor(element) {
|
|
@@ -25,7 +25,7 @@ var withVue2_default = (BaseClass, Vue) => {
|
|
|
25
25
|
}
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
this.$vue = new
|
|
28
|
+
this.$vue = new VueCtor(vueConfig);
|
|
29
29
|
this.$on("mounted", () => {
|
|
30
30
|
if (!(this.$refs.vue instanceof HTMLElement)) {
|
|
31
31
|
throw new Error("[withVue] The `vue` refs must be a single HTMLElement.");
|
|
@@ -41,7 +41,7 @@ var withVue2_default = (BaseClass, Vue) => {
|
|
|
41
41
|
name: `${BaseClass.config.name}WithVue`,
|
|
42
42
|
refs: [...(_b = (_a = BaseClass.config) == null ? void 0 : _a.refs) != null ? _b : [], "vue"]
|
|
43
43
|
}), __publicField(_c, "vueConfig"), _c;
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
withVue2 as default
|
|
47
47
|
};
|
|
@@ -8,9 +8,16 @@
|
|
|
8
8
|
* @param {Base} parentInstance
|
|
9
9
|
* @param {string} parentName
|
|
10
10
|
* @param {string} childrenName
|
|
11
|
-
* @returns {
|
|
11
|
+
* @returns {T[]}
|
|
12
12
|
*/
|
|
13
|
-
export function getDirectChildren<T extends import("../Base/index.js").default<
|
|
13
|
+
export function getDirectChildren<T extends import("../Base/index.js").default<{
|
|
14
|
+
$el: HTMLElement;
|
|
15
|
+
$options: import("../Base/index.js").BaseOptions;
|
|
16
|
+
$refs: import("../Base/index.js").BaseRefs;
|
|
17
|
+
$children: {
|
|
18
|
+
[name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
|
|
19
|
+
};
|
|
20
|
+
}>>(parentInstance: Base, parentName: string, childrenName: string): T[];
|
|
14
21
|
/**
|
|
15
22
|
* Test if a component instance is a direct child from the given component.
|
|
16
23
|
*
|
|
@@ -20,5 +27,5 @@ export function getDirectChildren<T extends import("../Base/index.js").default<a
|
|
|
20
27
|
* @param {Base} childInstance
|
|
21
28
|
* @returns {boolean}
|
|
22
29
|
*/
|
|
23
|
-
export function isDirectChild(parentInstance:
|
|
24
|
-
export type Base = import(
|
|
30
|
+
export function isDirectChild(parentInstance: Base, parentName: string, childrenName: string, childInstance: Base): boolean;
|
|
31
|
+
export type Base = import('../Base/index.js').default;
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
*/
|
|
19
19
|
export default function importOnInteraction<T extends typeof import("../Base/index.js").default>(fn: () => Promise<T | {
|
|
20
20
|
default: T;
|
|
21
|
-
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], events: string | string[], parent?:
|
|
21
|
+
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], events: string | string[], parent?: Base): Promise<T>;
|
|
22
22
|
export type BaseConstructor = import('../Base/index.js').BaseConstructor;
|
|
23
|
-
export type Base = import(
|
|
23
|
+
export type Base = import('../Base/index.js').default;
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
*/
|
|
19
19
|
export default function importWhenVisible<T extends typeof import("../Base/index.js").default>(fn: () => Promise<T | {
|
|
20
20
|
default: T;
|
|
21
|
-
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], parent?:
|
|
22
|
-
export type Base = import(
|
|
21
|
+
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], parent?: Base, observerOptions?: IntersectionObserverInit): Promise<T>;
|
|
22
|
+
export type Base = import('../Base/index.js').default;
|
|
23
23
|
export type BaseConstructor = import('../Base/index.js').BaseConstructor;
|
package/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
));
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
25
|
|
|
26
|
-
// packages/js-toolkit/index.
|
|
26
|
+
// packages/js-toolkit/index.ts
|
|
27
27
|
var js_toolkit_exports = {};
|
|
28
28
|
__export(js_toolkit_exports, {
|
|
29
29
|
Base: () => import_Base.default
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as Base } from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export { default as Base } from './Base/index.js';
|
|
2
|
+
export * from './decorators/index.js';
|
|
3
|
+
export * from './helpers/index.js';
|
|
4
|
+
export * from './services/index.js';
|
|
5
|
+
export type { BaseTypeParameter, BaseConstructor, BaseAsyncConstructor, BaseConfig, } from './Base/index.js';
|
package/package.json
CHANGED
package/services/drag.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @param {DragServiceOptions} options
|
|
15
15
|
* @returns {DragService}
|
|
16
16
|
*/
|
|
17
|
-
export default function useDrag(target: HTMLElement, options: DragServiceOptions):
|
|
17
|
+
export default function useDrag(target: HTMLElement, options: DragServiceOptions): import("./index").ServiceInterface<DragServiceProps>;
|
|
18
18
|
export type DragService = import('./index').ServiceInterface<DragServiceProps>;
|
|
19
19
|
export type PointerServiceProps = import('./pointer.js').PointerServiceProps;
|
|
20
20
|
export type DragLifecycle = 'start' | 'drag' | 'drop' | 'inertia' | 'stop';
|
package/services/index.cjs
CHANGED
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
));
|
|
23
23
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
24
|
|
|
25
|
-
// packages/js-toolkit/services/index.
|
|
25
|
+
// packages/js-toolkit/services/index.ts
|
|
26
26
|
var services_exports = {};
|
|
27
27
|
__export(services_exports, {
|
|
28
28
|
useDrag: () => import_drag.default,
|
package/services/index.d.ts
CHANGED
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export type ServiceInterface<T> = {
|
|
1
|
+
import type { DragServiceProps } from './drag.js';
|
|
2
|
+
import type { KeyServiceProps } from './key.js';
|
|
3
|
+
import type { LoadServiceProps } from './load.js';
|
|
4
|
+
import type { PointerServiceProps } from './pointer.js';
|
|
5
|
+
import type { RafServiceProps } from './raf.js';
|
|
6
|
+
import type { ResizeServiceProps } from './resize.js';
|
|
7
|
+
import type { ScrollServiceProps } from './scroll.js';
|
|
8
|
+
export interface ServiceInterface<T> {
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
10
|
+
* Remove a function from the resize service by its key.
|
|
12
11
|
*/
|
|
13
|
-
remove
|
|
12
|
+
remove(key: string): void;
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
14
|
+
* Add a callback to the service. The callback will receive the current service props as parameter.
|
|
16
15
|
*/
|
|
17
|
-
add
|
|
16
|
+
add(key: string, callback: (props: T) => void): void;
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* Test if the service has alreaydy a callback for the given key.
|
|
20
19
|
*/
|
|
21
|
-
has
|
|
20
|
+
has(key: string): boolean;
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
22
|
+
* Get the service's props.
|
|
24
23
|
*/
|
|
25
|
-
props
|
|
26
|
-
}
|
|
27
|
-
export type
|
|
28
|
-
export type
|
|
29
|
-
export type
|
|
30
|
-
export type
|
|
31
|
-
export type
|
|
32
|
-
export type
|
|
33
|
-
export type
|
|
24
|
+
props(): T;
|
|
25
|
+
}
|
|
26
|
+
export declare type DragServiceInterface = ServiceInterface<DragServiceProps>;
|
|
27
|
+
export declare type KeyServiceInterface = ServiceInterface<KeyServiceProps>;
|
|
28
|
+
export declare type LoadServiceInterface = ServiceInterface<LoadServiceProps>;
|
|
29
|
+
export declare type PointerServiceInterface = ServiceInterface<PointerServiceProps>;
|
|
30
|
+
export declare type RafServiceInterface = ServiceInterface<RafServiceProps>;
|
|
31
|
+
export declare type ResizeServiceInterface = ServiceInterface<ResizeServiceProps>;
|
|
32
|
+
export declare type ScrollServiceInterface = ServiceInterface<ScrollServiceProps>;
|
|
33
|
+
export type { DragServiceProps, KeyServiceProps, LoadServiceProps, PointerServiceProps, RafServiceProps, ResizeServiceProps, ScrollServiceProps, };
|
|
34
|
+
export { default as useDrag } from './drag.js';
|
|
35
|
+
export { default as useKey } from './key.js';
|
|
36
|
+
export { default as useLoad } from './load.js';
|
|
37
|
+
export { default as usePointer } from './pointer.js';
|
|
38
|
+
export { default as useRaf } from './raf.js';
|
|
39
|
+
export { default as useResize } from './resize.js';
|
|
40
|
+
export { default as useScroll } from './scroll.js';
|
|
41
|
+
export { useService } from './service.js';
|
package/services/key.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @returns {KeyService}
|
|
5
5
|
*/
|
|
6
|
-
export default function useKey():
|
|
6
|
+
export default function useKey(): import("./index").ServiceInterface<KeyServiceProps>;
|
|
7
7
|
export type KeyService = import('./index').ServiceInterface<KeyServiceProps>;
|
|
8
8
|
export type KeyServiceProps = {
|
|
9
9
|
event: KeyboardEvent;
|
package/services/load.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @returns {LoadService}
|
|
5
5
|
*/
|
|
6
|
-
export default function useLoad():
|
|
6
|
+
export default function useLoad(): import("./index").ServiceInterface<LoadServiceProps>;
|
|
7
7
|
export type LoadService = import('./index').ServiceInterface<LoadServiceProps>;
|
|
8
8
|
export type LoadServiceProps = {
|
|
9
9
|
time: DOMHighResTimeStamp;
|
package/services/pointer.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @todo Add element as parameter to get the pointer position relatively from.
|
|
5
5
|
* @returns {PointerService}
|
|
6
6
|
*/
|
|
7
|
-
export default function usePointer():
|
|
7
|
+
export default function usePointer(): import("./index").ServiceInterface<PointerServiceProps>;
|
|
8
8
|
export type PointerService = import('./index').ServiceInterface<PointerServiceProps>;
|
|
9
9
|
export type PointerServiceProps = {
|
|
10
10
|
event: MouseEvent | TouchEvent;
|
package/services/raf.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @returns {RafService}
|
|
5
5
|
*/
|
|
6
|
-
export default function useRaf():
|
|
6
|
+
export default function useRaf(): import("./index").ServiceInterface<RafServiceProps>;
|
|
7
7
|
export type RafService = import('./index').ServiceInterface<RafServiceProps>;
|
|
8
8
|
export type RafServiceProps = {
|
|
9
9
|
time: DOMHighResTimeStamp;
|
package/services/resize.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @returns {ResizeService}
|
|
5
5
|
*/
|
|
6
|
-
export default function useResize():
|
|
6
|
+
export default function useResize(): import("./index").ServiceInterface<ResizeServiceProps>;
|
|
7
7
|
export type ResizeService = import('./index').ServiceInterface<ResizeServiceProps>;
|
|
8
8
|
export type ResizeServiceProps = {
|
|
9
9
|
width: number;
|
package/services/scroll.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @returns {ScrollService}
|
|
13
13
|
*/
|
|
14
|
-
export default function useScroll():
|
|
14
|
+
export default function useScroll(): import("./index").ServiceInterface<ScrollServiceProps>;
|
|
15
15
|
export type ScrollService = import('./index').ServiceInterface<ScrollServiceProps>;
|
|
16
16
|
export type ScrollServiceProps = {
|
|
17
17
|
x: number;
|