@karta.io/simplebar 0.34.0-alpha.1 → 0.34.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.
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
- const throttle = require('lodash-es/throttle');
4
- const debounce = require('lodash-es/debounce');
5
- const memoize = require('lodash-es/memoize');
3
+ const throttle = require('lodash/throttle');
4
+ const debounce = require('lodash/debounce');
5
+ const memoize = require('lodash/memoize');
6
6
  const resizeObserver = require('@juggle/resize-observer');
7
- const canUseDOM = require('can-use-dom');
7
+
8
+ const canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined";
8
9
 
9
10
  function getElementWindow(element) {
10
11
  if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
@@ -1,8 +1,9 @@
1
- import throttle from 'lodash-es/throttle';
2
- import debounce from 'lodash-es/debounce';
3
- import memoize from 'lodash-es/memoize';
1
+ import throttle from 'lodash/throttle';
2
+ import debounce from 'lodash/debounce';
3
+ import memoize from 'lodash/memoize';
4
4
  import { ResizeObserver } from '@juggle/resize-observer';
5
- import canUseDOM from 'can-use-dom';
5
+
6
+ const canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined";
6
7
 
7
8
  function getElementWindow(element) {
8
9
  if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karta.io/simplebar",
3
- "version": "0.34.0-alpha.1",
3
+ "version": "0.34.0-alpha.2",
4
4
  "description": "Клон core части библиотеки simplebar",
5
5
  "files": [
6
6
  "dist",
@@ -21,8 +21,7 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "@juggle/resize-observer": "3.3.1",
24
- "can-use-dom": "0.1.0",
25
- "lodash-es": "4.17.21"
24
+ "lodash": "4.17.21"
26
25
  },
27
26
  "devDependencies": {
28
27
  "unbuild": "1.0.1"
@@ -0,0 +1,3 @@
1
+ const canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined';
2
+
3
+ export default canUseDOM;
package/src/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import canUseDOM from 'can-use-dom';
1
+ import canUseDOM from './canUseDOM';
2
2
 
3
3
  import SimpleBar from './simplebar';
4
4
  import { getOptions } from './helpers';
@@ -1,4 +1,4 @@
1
- import canUseDOM from 'can-use-dom';
1
+ import canUseDOM from './canUseDOM';
2
2
  import { getElementDocument } from "./helpers";
3
3
 
4
4
  let cachedScrollbarWidth = null;
package/src/simplebar.js CHANGED
@@ -1,8 +1,8 @@
1
- import throttle from 'lodash-es/throttle';
2
- import debounce from 'lodash-es/debounce';
3
- import memoize from 'lodash-es/memoize';
1
+ import throttle from 'lodash/throttle';
2
+ import debounce from 'lodash/debounce';
3
+ import memoize from 'lodash/memoize';
4
4
  import { ResizeObserver } from '@juggle/resize-observer';
5
- import canUseDOM from 'can-use-dom';
5
+ import canUseDOM from './canUseDOM';
6
6
  import scrollbarWidth from './scrollbar-width';
7
7
  import { getElementWindow, getElementDocument } from './helpers';
8
8