@karta.io/simplebar 1.0.0-beta.2 → 1.0.0-beta.20
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/simplebar.cjs +4 -4
- package/dist/simplebar.d.cts +50 -0
- package/dist/simplebar.d.mts +50 -0
- package/dist/simplebar.mjs +4 -4
- package/package.json +3 -3
package/dist/simplebar.cjs
CHANGED
|
@@ -61,7 +61,7 @@ var __publicField = (obj, key, value) => {
|
|
|
61
61
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
62
62
|
return value;
|
|
63
63
|
};
|
|
64
|
-
const _SimpleBar = class {
|
|
64
|
+
const _SimpleBar = class _SimpleBar {
|
|
65
65
|
constructor(element, options) {
|
|
66
66
|
/**
|
|
67
67
|
* On scroll event handling
|
|
@@ -711,8 +711,7 @@ const _SimpleBar = class {
|
|
|
711
711
|
)[0];
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
|
-
|
|
715
|
-
__publicField(SimpleBar, "defaultOptions", {
|
|
714
|
+
__publicField(_SimpleBar, "defaultOptions", {
|
|
716
715
|
autoHide: true,
|
|
717
716
|
forceVisible: false,
|
|
718
717
|
clickOnTrack: true,
|
|
@@ -738,6 +737,7 @@ __publicField(SimpleBar, "defaultOptions", {
|
|
|
738
737
|
scrollbarMaxSize: 0,
|
|
739
738
|
timeout: 1e3
|
|
740
739
|
});
|
|
741
|
-
__publicField(
|
|
740
|
+
__publicField(_SimpleBar, "instances", /* @__PURE__ */ new WeakMap());
|
|
741
|
+
let SimpleBar = _SimpleBar;
|
|
742
742
|
|
|
743
743
|
module.exports = SimpleBar;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare namespace SimpleBar {
|
|
2
|
+
interface KnownClassNamesOptions {
|
|
3
|
+
contentEl?: string;
|
|
4
|
+
contentWrapper?: string;
|
|
5
|
+
offset?: string;
|
|
6
|
+
mask?: string;
|
|
7
|
+
wrapper?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
scrollbar?: string;
|
|
10
|
+
track?: string;
|
|
11
|
+
heightAutoObserverWrapperEl?: string;
|
|
12
|
+
heightAutoObserverEl?: string;
|
|
13
|
+
visible?: string;
|
|
14
|
+
horizontal?: string;
|
|
15
|
+
vertical?: string;
|
|
16
|
+
hover?: string;
|
|
17
|
+
dragging?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type ClassNamesOptions = KnownClassNamesOptions & {
|
|
21
|
+
[className: string]: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
interface Options {
|
|
25
|
+
autoHide?: boolean;
|
|
26
|
+
classNames?: ClassNamesOptions;
|
|
27
|
+
forceVisible?: boolean | 'x' | 'y';
|
|
28
|
+
direction?: 'rtl' | 'ltr';
|
|
29
|
+
timeout?: number;
|
|
30
|
+
clickOnTrack?: boolean;
|
|
31
|
+
scrollbarMinSize?: number;
|
|
32
|
+
scrollbarMaxSize?: number;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare class SimpleBar {
|
|
37
|
+
static removeObserver(): void;
|
|
38
|
+
static instances: Pick<WeakMap<HTMLElement, SimpleBar>, 'get' | 'has'>;
|
|
39
|
+
|
|
40
|
+
constructor(element: HTMLElement, options?: SimpleBar.Options);
|
|
41
|
+
|
|
42
|
+
recalculate(): void;
|
|
43
|
+
getScrollElement(): HTMLElement;
|
|
44
|
+
getContentElement(): HTMLElement;
|
|
45
|
+
unMount(): void;
|
|
46
|
+
|
|
47
|
+
el: HTMLElement;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { SimpleBar as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare namespace SimpleBar {
|
|
2
|
+
interface KnownClassNamesOptions {
|
|
3
|
+
contentEl?: string;
|
|
4
|
+
contentWrapper?: string;
|
|
5
|
+
offset?: string;
|
|
6
|
+
mask?: string;
|
|
7
|
+
wrapper?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
scrollbar?: string;
|
|
10
|
+
track?: string;
|
|
11
|
+
heightAutoObserverWrapperEl?: string;
|
|
12
|
+
heightAutoObserverEl?: string;
|
|
13
|
+
visible?: string;
|
|
14
|
+
horizontal?: string;
|
|
15
|
+
vertical?: string;
|
|
16
|
+
hover?: string;
|
|
17
|
+
dragging?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type ClassNamesOptions = KnownClassNamesOptions & {
|
|
21
|
+
[className: string]: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
interface Options {
|
|
25
|
+
autoHide?: boolean;
|
|
26
|
+
classNames?: ClassNamesOptions;
|
|
27
|
+
forceVisible?: boolean | 'x' | 'y';
|
|
28
|
+
direction?: 'rtl' | 'ltr';
|
|
29
|
+
timeout?: number;
|
|
30
|
+
clickOnTrack?: boolean;
|
|
31
|
+
scrollbarMinSize?: number;
|
|
32
|
+
scrollbarMaxSize?: number;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare class SimpleBar {
|
|
37
|
+
static removeObserver(): void;
|
|
38
|
+
static instances: Pick<WeakMap<HTMLElement, SimpleBar>, 'get' | 'has'>;
|
|
39
|
+
|
|
40
|
+
constructor(element: HTMLElement, options?: SimpleBar.Options);
|
|
41
|
+
|
|
42
|
+
recalculate(): void;
|
|
43
|
+
getScrollElement(): HTMLElement;
|
|
44
|
+
getContentElement(): HTMLElement;
|
|
45
|
+
unMount(): void;
|
|
46
|
+
|
|
47
|
+
el: HTMLElement;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { SimpleBar as default };
|
package/dist/simplebar.mjs
CHANGED
|
@@ -53,7 +53,7 @@ var __publicField = (obj, key, value) => {
|
|
|
53
53
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
54
54
|
return value;
|
|
55
55
|
};
|
|
56
|
-
const _SimpleBar = class {
|
|
56
|
+
const _SimpleBar = class _SimpleBar {
|
|
57
57
|
constructor(element, options) {
|
|
58
58
|
/**
|
|
59
59
|
* On scroll event handling
|
|
@@ -703,8 +703,7 @@ const _SimpleBar = class {
|
|
|
703
703
|
)[0];
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
|
-
|
|
707
|
-
__publicField(SimpleBar, "defaultOptions", {
|
|
706
|
+
__publicField(_SimpleBar, "defaultOptions", {
|
|
708
707
|
autoHide: true,
|
|
709
708
|
forceVisible: false,
|
|
710
709
|
clickOnTrack: true,
|
|
@@ -730,6 +729,7 @@ __publicField(SimpleBar, "defaultOptions", {
|
|
|
730
729
|
scrollbarMaxSize: 0,
|
|
731
730
|
timeout: 1e3
|
|
732
731
|
});
|
|
733
|
-
__publicField(
|
|
732
|
+
__publicField(_SimpleBar, "instances", /* @__PURE__ */ new WeakMap());
|
|
733
|
+
let SimpleBar = _SimpleBar;
|
|
734
734
|
|
|
735
735
|
export { SimpleBar as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karta.io/simplebar",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.20",
|
|
4
4
|
"description": "Клон core части библиотеки simplebar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"types": "dist/simplebar.d.ts",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@juggle/resize-observer": "3.
|
|
23
|
+
"@juggle/resize-observer": "3.4.0",
|
|
24
24
|
"lodash": "4.17.21"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"unbuild": "
|
|
27
|
+
"unbuild": "2.0.0"
|
|
28
28
|
},
|
|
29
29
|
"lint-staged": {
|
|
30
30
|
"*.{js,jsx,json}": [
|