@karta.io/simplebar 1.0.0-beta.18 → 1.0.0-beta.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.
@@ -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 _SimpleBar {
64
+ const _SimpleBar = class {
65
65
  constructor(element, options) {
66
66
  /**
67
67
  * On scroll event handling
@@ -711,7 +711,8 @@ const _SimpleBar = class _SimpleBar {
711
711
  )[0];
712
712
  }
713
713
  };
714
- __publicField(_SimpleBar, "defaultOptions", {
714
+ let SimpleBar = _SimpleBar;
715
+ __publicField(SimpleBar, "defaultOptions", {
715
716
  autoHide: true,
716
717
  forceVisible: false,
717
718
  clickOnTrack: true,
@@ -737,7 +738,6 @@ __publicField(_SimpleBar, "defaultOptions", {
737
738
  scrollbarMaxSize: 0,
738
739
  timeout: 1e3
739
740
  });
740
- __publicField(_SimpleBar, "instances", /* @__PURE__ */ new WeakMap());
741
- let SimpleBar = _SimpleBar;
741
+ __publicField(SimpleBar, "instances", /* @__PURE__ */ new WeakMap());
742
742
 
743
743
  module.exports = SimpleBar;
@@ -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 _SimpleBar {
56
+ const _SimpleBar = class {
57
57
  constructor(element, options) {
58
58
  /**
59
59
  * On scroll event handling
@@ -703,7 +703,8 @@ const _SimpleBar = class _SimpleBar {
703
703
  )[0];
704
704
  }
705
705
  };
706
- __publicField(_SimpleBar, "defaultOptions", {
706
+ let SimpleBar = _SimpleBar;
707
+ __publicField(SimpleBar, "defaultOptions", {
707
708
  autoHide: true,
708
709
  forceVisible: false,
709
710
  clickOnTrack: true,
@@ -729,7 +730,6 @@ __publicField(_SimpleBar, "defaultOptions", {
729
730
  scrollbarMaxSize: 0,
730
731
  timeout: 1e3
731
732
  });
732
- __publicField(_SimpleBar, "instances", /* @__PURE__ */ new WeakMap());
733
- let SimpleBar = _SimpleBar;
733
+ __publicField(SimpleBar, "instances", /* @__PURE__ */ new WeakMap());
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.18",
3
+ "version": "1.0.0-beta.2",
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.4.0",
23
+ "@juggle/resize-observer": "3.3.1",
24
24
  "lodash": "4.17.21"
25
25
  },
26
26
  "devDependencies": {
27
- "unbuild": "2.0.0"
27
+ "unbuild": "1.2.1"
28
28
  },
29
29
  "lint-staged": {
30
30
  "*.{js,jsx,json}": [
@@ -1,50 +0,0 @@
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 };
@@ -1,50 +0,0 @@
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 };