mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-07 17:32:27 +03:00
build an add optimize terser compress
This commit is contained in:
@@ -1176,7 +1176,7 @@ const createTrinsicLifecycle = (lifecycleHub) => {
|
||||
const createPaddingLifecycle = (lifecycleHub) => {
|
||||
const { _structureSetup, _setLifecycleCommunication } = lifecycleHub;
|
||||
const { _host, _padding, _viewport } = _structureSetup._targetObj;
|
||||
const { _update: updatePaddingCache, _current: currentPaddingCache } = createCache(() => topRightBottomLeft(_host, 'padding'), {
|
||||
const { _update: updatePaddingCache, _current: currentPaddingCache } = createCache(topRightBottomLeft.bind(0, _host, 'padding'), {
|
||||
_equal: equalTRBL,
|
||||
_initialValue: topRightBottomLeft(),
|
||||
});
|
||||
@@ -1275,11 +1275,11 @@ const createOverflowLifecycle = (lifecycleHub) => {
|
||||
const { _structureSetup, _doViewportArrange, _getLifecycleCommunication, _setLifecycleCommunication } = lifecycleHub;
|
||||
const { _host, _viewport, _viewportArrange } = _structureSetup._targetObj;
|
||||
const { _update: updateViewportSizeFraction, _current: getCurrentViewportSizeFraction } = createCache(
|
||||
() => sizeFraction(_viewport),
|
||||
sizeFraction.bind(0, _viewport),
|
||||
whCacheOptions
|
||||
);
|
||||
const { _update: updateViewportScrollSizeCache, _current: getCurrentViewportScrollSizeCache } = createCache(
|
||||
() => scrollSize(_viewport),
|
||||
scrollSize.bind(0, _viewport),
|
||||
whCacheOptions
|
||||
);
|
||||
const { _update: updateOverflowAmountCache, _current: getCurrentOverflowAmountCache } = createCache(
|
||||
@@ -1302,9 +1302,9 @@ const createOverflowLifecycle = (lifecycleHub) => {
|
||||
const hostSizeFraction = sizeFraction(_host);
|
||||
const hostClientSize = clientSize(_host);
|
||||
const paddingVertical = paddingAbsolute || style(_viewport, 'boxSizing') === 'content-box' ? padding.b + padding.t : 0;
|
||||
const fractionalcleintHeight = hostClientSize.h + (abs$1(hostSizeFraction.h) < 1 ? hostSizeFraction.h : 0);
|
||||
const fractionalClientHeight = hostClientSize.h + (abs$1(hostSizeFraction.h) < 1 ? hostSizeFraction.h : 0);
|
||||
style(_viewport, {
|
||||
height: fractionalcleintHeight + (_overflowScroll.x ? _scrollbarsHideOffset.x : 0) - paddingVertical,
|
||||
height: fractionalClientHeight + (_overflowScroll.x ? _scrollbarsHideOffset.x : 0) - paddingVertical,
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1630,7 +1630,7 @@ const createSizeObserver = (target, onSizeChangedCallback, options) => {
|
||||
const shrinkElement = observerElementChildrenRoot.lastChild;
|
||||
const expandElement = observerElementChildrenRoot.firstChild;
|
||||
const expandElementChild = expandElement == null ? void 0 : expandElement.firstChild;
|
||||
let cacheSize = offsetSize(listenerElement);
|
||||
let cacheSize = offsetSize(observerElementChildrenRoot);
|
||||
let currSize = cacheSize;
|
||||
let isDirty = false;
|
||||
let rAFId;
|
||||
@@ -1652,7 +1652,7 @@ const createSizeObserver = (target, onSizeChangedCallback, options) => {
|
||||
};
|
||||
|
||||
const onScroll = (scrollEvent) => {
|
||||
currSize = offsetSize(listenerElement);
|
||||
currSize = offsetSize(observerElementChildrenRoot);
|
||||
isDirty = !scrollEvent || !equalWH(currSize, cacheSize);
|
||||
|
||||
if (scrollEvent) {
|
||||
@@ -1679,7 +1679,7 @@ const createSizeObserver = (target, onSizeChangedCallback, options) => {
|
||||
}
|
||||
|
||||
if (observeDirectionChange) {
|
||||
directionIsRTLCache = createCache(() => directionIsRTL(sizeObserver));
|
||||
directionIsRTLCache = createCache(directionIsRTL.bind(0, sizeObserver));
|
||||
const { _update: updateDirectionIsRTLCache } = directionIsRTLCache;
|
||||
push(
|
||||
offListeners,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+11
-22
@@ -1293,15 +1293,10 @@
|
||||
_padding = _structureSetup$_targ._padding,
|
||||
_viewport = _structureSetup$_targ._viewport;
|
||||
|
||||
var _createCache = createCache(
|
||||
function () {
|
||||
return topRightBottomLeft(_host, 'padding');
|
||||
},
|
||||
{
|
||||
_equal: equalTRBL,
|
||||
_initialValue: topRightBottomLeft(),
|
||||
}
|
||||
),
|
||||
var _createCache = createCache(topRightBottomLeft.bind(0, _host, 'padding'), {
|
||||
_equal: equalTRBL,
|
||||
_initialValue: topRightBottomLeft(),
|
||||
}),
|
||||
updatePaddingCache = _createCache._update,
|
||||
currentPaddingCache = _createCache._current;
|
||||
|
||||
@@ -1424,15 +1419,11 @@
|
||||
_viewport = _structureSetup$_targ._viewport,
|
||||
_viewportArrange = _structureSetup$_targ._viewportArrange;
|
||||
|
||||
var _createCache = createCache(function () {
|
||||
return sizeFraction(_viewport);
|
||||
}, whCacheOptions),
|
||||
var _createCache = createCache(sizeFraction.bind(0, _viewport), whCacheOptions),
|
||||
updateViewportSizeFraction = _createCache._update,
|
||||
getCurrentViewportSizeFraction = _createCache._current;
|
||||
|
||||
var _createCache2 = createCache(function () {
|
||||
return scrollSize(_viewport);
|
||||
}, whCacheOptions),
|
||||
var _createCache2 = createCache(scrollSize.bind(0, _viewport), whCacheOptions),
|
||||
updateViewportScrollSizeCache = _createCache2._update,
|
||||
getCurrentViewportScrollSizeCache = _createCache2._current;
|
||||
|
||||
@@ -1463,9 +1454,9 @@
|
||||
var hostSizeFraction = sizeFraction(_host);
|
||||
var hostClientSize = clientSize(_host);
|
||||
var paddingVertical = paddingAbsolute || style(_viewport, 'boxSizing') === 'content-box' ? padding.b + padding.t : 0;
|
||||
var fractionalcleintHeight = hostClientSize.h + (abs$1(hostSizeFraction.h) < 1 ? hostSizeFraction.h : 0);
|
||||
var fractionalClientHeight = hostClientSize.h + (abs$1(hostSizeFraction.h) < 1 ? hostSizeFraction.h : 0);
|
||||
style(_viewport, {
|
||||
height: fractionalcleintHeight + (_overflowScroll.x ? _scrollbarsHideOffset.x : 0) - paddingVertical,
|
||||
height: fractionalClientHeight + (_overflowScroll.x ? _scrollbarsHideOffset.x : 0) - paddingVertical,
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1871,7 +1862,7 @@
|
||||
var shrinkElement = observerElementChildrenRoot.lastChild;
|
||||
var expandElement = observerElementChildrenRoot.firstChild;
|
||||
var expandElementChild = expandElement == null ? void 0 : expandElement.firstChild;
|
||||
var cacheSize = offsetSize(listenerElement);
|
||||
var cacheSize = offsetSize(observerElementChildrenRoot);
|
||||
var currSize = cacheSize;
|
||||
var isDirty = false;
|
||||
var rAFId;
|
||||
@@ -1893,7 +1884,7 @@
|
||||
};
|
||||
|
||||
var onScroll = function onScroll(scrollEvent) {
|
||||
currSize = offsetSize(listenerElement);
|
||||
currSize = offsetSize(observerElementChildrenRoot);
|
||||
isDirty = !scrollEvent || !equalWH(currSize, cacheSize);
|
||||
|
||||
if (scrollEvent) {
|
||||
@@ -1920,9 +1911,7 @@
|
||||
}
|
||||
|
||||
if (observeDirectionChange) {
|
||||
directionIsRTLCache = createCache(function () {
|
||||
return directionIsRTL(sizeObserver);
|
||||
});
|
||||
directionIsRTLCache = createCache(directionIsRTL.bind(0, sizeObserver));
|
||||
var _directionIsRTLCache = directionIsRTLCache,
|
||||
updateDirectionIsRTLCache = _directionIsRTLCache._update;
|
||||
push(
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -276,6 +276,9 @@ const rollupConfig = (config = {}, { project = process.cwd(), overwrite = {}, si
|
||||
regex: /^_/,
|
||||
},
|
||||
},
|
||||
compress: {
|
||||
evaluate: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user