0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

6
web/node_modules/dom-helpers/esm/activeElement.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Returns the actively focused element safely.
*
* @param doc the document to check
*/
export default function activeElement(doc?: Document): Element | null;

25
web/node_modules/dom-helpers/esm/activeElement.js generated vendored Normal file
View file

@ -0,0 +1,25 @@
import ownerDocument from './ownerDocument';
/**
* Returns the actively focused element safely.
*
* @param doc the document to check
*/
export default function activeElement(doc) {
if (doc === void 0) {
doc = ownerDocument();
}
// Support: IE 9 only
// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
try {
var active = doc.activeElement; // IE11 returns a seemingly empty object in some cases when accessing
// document.activeElement from an <iframe>
if (!active || !active.nodeName) return null;
return active;
} catch (e) {
/* ie throws if no active element */
return doc.body;
}
}

7
web/node_modules/dom-helpers/esm/addClass.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Adds a CSS class to a given element.
*
* @param element the element
* @param className the CSS class name
*/
export default function addClass(element: Element | SVGElement, className: string): void;

11
web/node_modules/dom-helpers/esm/addClass.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
import hasClass from './hasClass';
/**
* Adds a CSS class to a given element.
*
* @param element the element
* @param className the CSS class name
*/
export default function addClass(element, className) {
if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className);
}

16
web/node_modules/dom-helpers/esm/addEventListener.d.ts generated vendored Normal file
View file

@ -0,0 +1,16 @@
export declare let optionsSupported: boolean;
export declare let onceSupported: boolean;
export declare type EventHandler<K extends keyof HTMLElementEventMap> = (this: HTMLElement, event: HTMLElementEventMap[K]) => any;
export declare type TaggedEventHandler<K extends keyof HTMLElementEventMap> = EventHandler<K> & {
__once?: EventHandler<K>;
};
/**
* An `addEventListener` ponyfill, supports the `once` option
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
declare function addEventListener<K extends keyof HTMLElementEventMap>(node: HTMLElement, eventName: K, handler: TaggedEventHandler<K>, options?: boolean | AddEventListenerOptions): void;
export default addEventListener;

56
web/node_modules/dom-helpers/esm/addEventListener.js generated vendored Normal file
View file

@ -0,0 +1,56 @@
/* eslint-disable no-return-assign */
import canUseDOM from './canUseDOM';
export var optionsSupported = false;
export var onceSupported = false;
try {
var options = {
get passive() {
return optionsSupported = true;
},
get once() {
// eslint-disable-next-line no-multi-assign
return onceSupported = optionsSupported = true;
}
};
if (canUseDOM) {
window.addEventListener('test', options, options);
window.removeEventListener('test', options, true);
}
} catch (e) {
/* */
}
/**
* An `addEventListener` ponyfill, supports the `once` option
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
function addEventListener(node, eventName, handler, options) {
if (options && typeof options !== 'boolean' && !onceSupported) {
var once = options.once,
capture = options.capture;
var wrappedHandler = handler;
if (!onceSupported && once) {
wrappedHandler = handler.__once || function onceHandler(event) {
this.removeEventListener(eventName, onceHandler, capture);
handler.call(this, event);
};
handler.__once = wrappedHandler;
}
node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);
}
node.addEventListener(eventName, handler, options);
}
export default addEventListener;

19
web/node_modules/dom-helpers/esm/animate.d.ts generated vendored Normal file
View file

@ -0,0 +1,19 @@
import { EventHandler } from './addEventListener';
import { TransformValue } from './isTransform';
import { Property } from './types';
declare type AnimateProperties = Record<Property | TransformValue, string>;
interface Options {
node: HTMLElement;
properties: AnimateProperties;
duration?: number;
easing?: string;
callback?: EventHandler<'transitionend'>;
}
interface Cancel {
cancel(): void;
}
declare function animate(options: Options): Cancel;
declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number): Cancel;
declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, callback: EventHandler<'transitionend'>): Cancel;
declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, easing: string, callback: EventHandler<'transitionend'>): Cancel;
export default animate;

90
web/node_modules/dom-helpers/esm/animate.js generated vendored Normal file
View file

@ -0,0 +1,90 @@
import css from './css';
import hyphenate from './hyphenate';
import isTransform from './isTransform';
import transitionEnd from './transitionEnd';
var reset = {
transition: '',
'transition-duration': '',
'transition-delay': '',
'transition-timing-function': ''
};
// super lean animate function for transitions
// doesn't support all translations to keep it matching the jquery API
/**
* code in part from: Zepto 1.1.4 | zeptojs.com/license
*/
function _animate(_ref) {
var node = _ref.node,
properties = _ref.properties,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 200 : _ref$duration,
easing = _ref.easing,
callback = _ref.callback;
var cssProperties = [];
var cssValues = {};
var transforms = '';
Object.keys(properties).forEach(function (key) {
var value = properties[key];
if (isTransform(key)) transforms += key + "(" + value + ") ";else {
cssValues[key] = value;
cssProperties.push(hyphenate(key));
}
});
if (transforms) {
cssValues.transform = transforms;
cssProperties.push('transform');
}
function done(event) {
if (event.target !== event.currentTarget) return;
css(node, reset);
if (callback) callback.call(this, event);
}
if (duration > 0) {
cssValues.transition = cssProperties.join(', ');
cssValues['transition-duration'] = duration / 1000 + "s";
cssValues['transition-delay'] = '0s';
cssValues['transition-timing-function'] = easing || 'linear';
}
var removeListener = transitionEnd(node, done, duration); // eslint-disable-next-line no-unused-expressions
node.clientLeft; // trigger page reflow
css(node, cssValues);
return {
cancel: function cancel() {
removeListener();
css(node, reset);
}
};
}
function animate(nodeOrOptions, properties, duration, easing, callback) {
if (!('nodeType' in nodeOrOptions)) {
return _animate(nodeOrOptions);
}
if (!properties) {
throw new Error('must include properties to animate');
}
if (typeof easing === 'function') {
callback = easing;
easing = '';
}
return _animate({
node: nodeOrOptions,
properties: properties,
duration: duration,
easing: easing,
callback: callback
});
}
export default animate;

2
web/node_modules/dom-helpers/esm/animationFrame.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export declare const cancel: (id: number) => void;
export declare const request: typeof requestAnimationFrame;

42
web/node_modules/dom-helpers/esm/animationFrame.js generated vendored Normal file
View file

@ -0,0 +1,42 @@
import canUseDOM from './canUseDOM';
/* https://github.com/component/raf */
var prev = new Date().getTime();
function fallback(fn) {
var curr = new Date().getTime();
var ms = Math.max(0, 16 - (curr - prev));
var handle = setTimeout(fn, ms);
prev = curr;
return handle;
}
var vendors = ['', 'webkit', 'moz', 'o', 'ms'];
var cancelMethod = 'clearTimeout';
var rafImpl = fallback; // eslint-disable-next-line import/no-mutable-exports
var getKey = function getKey(vendor, k) {
return vendor + (!vendor ? k : k[0].toUpperCase() + k.substr(1)) + "AnimationFrame";
};
if (canUseDOM) {
vendors.some(function (vendor) {
var rafMethod = getKey(vendor, 'request');
if (rafMethod in window) {
cancelMethod = getKey(vendor, 'cancel'); // @ts-ignore
rafImpl = function rafImpl(cb) {
return window[rafMethod](cb);
};
}
return !!rafImpl;
});
}
export var cancel = function cancel(id) {
// @ts-ignore
if (typeof window[cancelMethod] === 'function') window[cancelMethod](id);
};
export var request = rafImpl;

8
web/node_modules/dom-helpers/esm/attribute.d.ts generated vendored Normal file
View file

@ -0,0 +1,8 @@
/**
* Gets or sets an attribute of a given element.
*
* @param node the element
* @param attr the attribute to get or set
* @param val the attribute value
*/
export default function attribute(node: Element | null, attr: string, val?: string | boolean | null): string | null | undefined;

20
web/node_modules/dom-helpers/esm/attribute.js generated vendored Normal file
View file

@ -0,0 +1,20 @@
/**
* Gets or sets an attribute of a given element.
*
* @param node the element
* @param attr the attribute to get or set
* @param val the attribute value
*/
export default function attribute(node, attr, val) {
if (node) {
if (typeof val === 'undefined') {
return node.getAttribute(attr);
}
if (!val && val !== '') {
node.removeAttribute(attr);
} else {
node.setAttribute(attr, String(val));
}
}
}

1
web/node_modules/dom-helpers/esm/camelize.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export default function camelize(string: string): string;

6
web/node_modules/dom-helpers/esm/camelize.js generated vendored Normal file
View file

@ -0,0 +1,6 @@
var rHyphen = /-(.)/g;
export default function camelize(string) {
return string.replace(rHyphen, function (_, chr) {
return chr.toUpperCase();
});
}

2
web/node_modules/dom-helpers/esm/camelizeStyle.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
import { CamelProperty, Property } from './types';
export default function camelizeStyleName<T extends string = Property>(string: T): CamelProperty;

10
web/node_modules/dom-helpers/esm/camelizeStyle.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
* https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js
*/
import camelize from './camelize';
var msPattern = /^-ms-/;
export default function camelizeStyleName(string) {
return camelize(string.replace(msPattern, 'ms-'));
}

2
web/node_modules/dom-helpers/esm/canUseDOM.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
declare const _default: boolean;
export default _default;

1
web/node_modules/dom-helpers/esm/canUseDOM.js generated vendored Normal file
View file

@ -0,0 +1 @@
export default !!(typeof window !== 'undefined' && window.document && window.document.createElement);

6
web/node_modules/dom-helpers/esm/childElements.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Collects all child elements of an element.
*
* @param node the element
*/
export default function childElements(node: Element | null): Element[];

8
web/node_modules/dom-helpers/esm/childElements.js generated vendored Normal file
View file

@ -0,0 +1,8 @@
/**
* Collects all child elements of an element.
*
* @param node the element
*/
export default function childElements(node) {
return node ? Array.from(node.children) : [];
}

6
web/node_modules/dom-helpers/esm/childNodes.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Collects all child nodes of an element.
*
* @param node the node
*/
export default function childNodes(node: Element | null): Node[];

10
web/node_modules/dom-helpers/esm/childNodes.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
/**
* Collects all child nodes of an element.
*
* @param node the node
*/
export default function childNodes(node) {
return node ? toArray(node.childNodes) : [];
}

6
web/node_modules/dom-helpers/esm/clear.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Removes all child nodes from a given node.
*
* @param node the node to clear
*/
export default function clear(node: Node | null): Node | null;

16
web/node_modules/dom-helpers/esm/clear.js generated vendored Normal file
View file

@ -0,0 +1,16 @@
/**
* Removes all child nodes from a given node.
*
* @param node the node to clear
*/
export default function clear(node) {
if (node) {
while (node.firstChild) {
node.removeChild(node.firstChild);
}
return node;
}
return null;
}

8
web/node_modules/dom-helpers/esm/closest.d.ts generated vendored Normal file
View file

@ -0,0 +1,8 @@
/**
* Returns the closest parent element that matches a given selector.
*
* @param node the reference element
* @param selector the selector to match
* @param stopAt stop traversing when this element is found
*/
export default function closest(node: Element, selector: string, stopAt?: Element): Element | null;

20
web/node_modules/dom-helpers/esm/closest.js generated vendored Normal file
View file

@ -0,0 +1,20 @@
import matches from './matches';
/**
* Returns the closest parent element that matches a given selector.
*
* @param node the reference element
* @param selector the selector to match
* @param stopAt stop traversing when this element is found
*/
export default function closest(node, selector, stopAt) {
if (node.closest && !stopAt) node.closest(selector);
var nextNode = node;
do {
if (matches(nextNode, selector)) return nextNode;
nextNode = nextNode.parentElement;
} while (nextNode && nextNode !== stopAt && nextNode.nodeType === document.ELEMENT_NODE);
return null;
}

View file

@ -0,0 +1,3 @@
declare type TraverseDirection = 'parentElement' | 'previousElementSibling' | 'nextElementSibling';
export default function collectElements(node: Element | null, direction: TraverseDirection): Element[];
export {};

12
web/node_modules/dom-helpers/esm/collectElements.js generated vendored Normal file
View file

@ -0,0 +1,12 @@
export default function collectElements(node, direction) {
var nextNode = null;
var nodes = [];
nextNode = node ? node[direction] : null;
while (nextNode && nextNode.nodeType !== 9) {
nodes.push(nextNode);
nextNode = nextNode[direction] || null;
}
return nodes;
}

View file

@ -0,0 +1 @@
export default function collectSiblings(node: Element | null, refNode?: Element | null, selector?: string | null): Element[];

24
web/node_modules/dom-helpers/esm/collectSiblings.js generated vendored Normal file
View file

@ -0,0 +1,24 @@
import matches from './matches';
export default function collectSiblings(node, refNode, selector) {
if (refNode === void 0) {
refNode = null;
}
if (selector === void 0) {
selector = null;
}
var siblings = [];
for (; node; node = node.nextElementSibling) {
if (node !== refNode) {
if (selector && matches(node, selector)) {
break;
}
siblings.push(node);
}
}
return siblings;
}

7
web/node_modules/dom-helpers/esm/contains.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Checks if an element contains another given element.
*
* @param context the context element
* @param node the element to check
*/
export default function contains(context: Element, node: Element): boolean | undefined;

14
web/node_modules/dom-helpers/esm/contains.js generated vendored Normal file
View file

@ -0,0 +1,14 @@
/* eslint-disable no-bitwise, no-cond-assign */
/**
* Checks if an element contains another given element.
*
* @param context the context element
* @param node the element to check
*/
export default function contains(context, node) {
// HTML DOM and SVG DOM may have different support levels,
// so we need to check on context instead of a document root element.
if (context.contains) return context.contains(node);
if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);
}

6
web/node_modules/dom-helpers/esm/css.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
import * as CSS from 'csstype';
import { CamelProperty, HyphenProperty, Property } from './types';
declare function style(node: HTMLElement, property: Partial<Record<Property, string>>): void;
declare function style<T extends HyphenProperty>(node: HTMLElement, property: T): CSS.PropertiesHyphen[T];
declare function style<T extends CamelProperty>(node: HTMLElement, property: T): CSS.Properties[T];
export default style;

32
web/node_modules/dom-helpers/esm/css.js generated vendored Normal file
View file

@ -0,0 +1,32 @@
import getComputedStyle from './getComputedStyle';
import hyphenate from './hyphenateStyle';
import isTransform from './isTransform';
function style(node, property) {
var css = '';
var transforms = '';
if (typeof property === 'string') {
return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));
}
Object.keys(property).forEach(function (key) {
var value = property[key];
if (!value && value !== 0) {
node.style.removeProperty(hyphenate(key));
} else if (isTransform(key)) {
transforms += key + "(" + value + ") ";
} else {
css += hyphenate(key) + ": " + value + ";";
}
});
if (transforms) {
css += "transform: " + transforms + ";";
}
node.style.cssText += ";" + css;
}
export default style;

View file

@ -0,0 +1,2 @@
import { EventHandler } from './addEventListener';
export default function filterEvents<K extends keyof HTMLElementEventMap>(selector: string, handler: EventHandler<K>): EventHandler<K>;

12
web/node_modules/dom-helpers/esm/filterEventHandler.js generated vendored Normal file
View file

@ -0,0 +1,12 @@
import contains from './contains';
import qsa from './querySelectorAll';
export default function filterEvents(selector, handler) {
return function filterHandler(e) {
var top = e.currentTarget;
var target = e.target;
var matches = qsa(top, selector);
if (matches.some(function (match) {
return contains(match, target);
})) handler.call(this, e);
};
}

View file

@ -0,0 +1,7 @@
/**
* Returns one or all computed style properties of an element.
*
* @param node the element
* @param psuedoElement the style property
*/
export default function getComputedStyle(node: HTMLElement, psuedoElement?: string): CSSStyleDeclaration;

11
web/node_modules/dom-helpers/esm/getComputedStyle.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
import ownerWindow from './ownerWindow';
/**
* Returns one or all computed style properties of an element.
*
* @param node the element
* @param psuedoElement the style property
*/
export default function getComputedStyle(node, psuedoElement) {
return ownerWindow(node).getComputedStyle(node, psuedoElement);
}

View file

@ -0,0 +1,4 @@
export default function getscrollAccessor(offset: 'pageXOffset' | 'pageYOffset'): {
(node: Element): number;
(node: Element, val: number): undefined;
};

20
web/node_modules/dom-helpers/esm/getScrollAccessor.js generated vendored Normal file
View file

@ -0,0 +1,20 @@
import isWindow from './isWindow';
export default function getscrollAccessor(offset) {
var prop = offset === 'pageXOffset' ? 'scrollLeft' : 'scrollTop';
function scrollAccessor(node, val) {
var win = isWindow(node);
if (val === undefined) {
return win ? win[offset] : node[prop];
}
if (win) {
win.scrollTo(win[offset], val);
} else {
node[prop] = val;
}
}
return scrollAccessor;
}

7
web/node_modules/dom-helpers/esm/hasClass.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Checks if a given element has a CSS class.
*
* @param element the element
* @param className the CSS class name
*/
export default function hasClass(element: Element | SVGElement, className: string): boolean;

10
web/node_modules/dom-helpers/esm/hasClass.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
/**
* Checks if a given element has a CSS class.
*
* @param element the element
* @param className the CSS class name
*/
export default function hasClass(element, className) {
if (element.classList) return !!className && element.classList.contains(className);
return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
}

7
web/node_modules/dom-helpers/esm/height.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Returns the height of a given element.
*
* @param node the element
* @param client whether to use `clientHeight` if possible
*/
export default function height(node: HTMLElement, client?: boolean): number;

13
web/node_modules/dom-helpers/esm/height.js generated vendored Normal file
View file

@ -0,0 +1,13 @@
import getWindow from './isWindow';
import offset from './offset';
/**
* Returns the height of a given element.
*
* @param node the element
* @param client whether to use `clientHeight` if possible
*/
export default function height(node, client) {
var win = getWindow(node);
return win ? win.innerHeight : client ? node.clientHeight : offset(node).height;
}

1
web/node_modules/dom-helpers/esm/hyphenate.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export default function hyphenate(string: string): string;

4
web/node_modules/dom-helpers/esm/hyphenate.js generated vendored Normal file
View file

@ -0,0 +1,4 @@
var rUpper = /([A-Z])/g;
export default function hyphenate(string) {
return string.replace(rUpper, '-$1').toLowerCase();
}

7
web/node_modules/dom-helpers/esm/hyphenateStyle.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Copyright 2013-2014, Facebook, Inc.
* All rights reserved.
* https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
*/
import { Property } from './types';
export default function hyphenateStyleName(string: Property): Property;

10
web/node_modules/dom-helpers/esm/hyphenateStyle.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
/**
* Copyright 2013-2014, Facebook, Inc.
* All rights reserved.
* https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
*/
import hyphenate from './hyphenate';
var msPattern = /^ms-/;
export default function hyphenateStyleName(string) {
return hyphenate(string).replace(msPattern, '-ms-');
}

99
web/node_modules/dom-helpers/esm/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,99 @@
import activeElement from './activeElement';
import addClass from './addClass';
import addEventListener from './addEventListener';
import animate from './animate';
import { cancel as cancelAnimationFrame, request as requestAnimationFrame } from './animationFrame';
import attribute from './attribute';
import childElements from './childElements';
import clear from './clear';
import closest from './closest';
import contains from './contains';
import childNodes from './childNodes';
import style from './css';
import filter from './filterEventHandler';
import getComputedStyle from './getComputedStyle';
import hasClass from './hasClass';
import height from './height';
import insertAfter from './insertAfter';
import isInput from './isInput';
import isVisible from './isVisible';
import listen from './listen';
import matches from './matches';
import nextUntil from './nextUntil';
import offset from './offset';
import offsetParent from './offsetParent';
import ownerDocument from './ownerDocument';
import ownerWindow from './ownerWindow';
import parents from './parents';
import position from './position';
import prepend from './prepend';
import querySelectorAll from './querySelectorAll';
import remove from './remove';
import removeClass from './removeClass';
import removeEventListener from './removeEventListener';
import scrollbarSize from './scrollbarSize';
import scrollLeft from './scrollLeft';
import scrollParent from './scrollParent';
import scrollTo from './scrollTo';
import scrollTop from './scrollTop';
import siblings from './siblings';
import text from './text';
import toggleClass from './toggleClass';
import transitionEnd from './transitionEnd';
import triggerEvent from './triggerEvent';
import width from './width';
export { addEventListener, removeEventListener, triggerEvent, animate, filter, listen, style, getComputedStyle, attribute, activeElement, ownerDocument, ownerWindow, requestAnimationFrame, cancelAnimationFrame, matches, height, width, offset, offsetParent, position, contains, scrollbarSize, scrollLeft, scrollParent, scrollTo, scrollTop, querySelectorAll, closest, addClass, removeClass, hasClass, toggleClass, transitionEnd, childNodes, childElements, nextUntil, parents, siblings, clear, insertAfter, isInput, isVisible, prepend, remove, text, };
declare const _default: {
addEventListener: typeof addEventListener;
removeEventListener: typeof removeEventListener;
triggerEvent: typeof triggerEvent;
animate: typeof animate;
filter: typeof filter;
listen: typeof listen;
style: typeof style;
getComputedStyle: typeof getComputedStyle;
attribute: typeof attribute;
activeElement: typeof activeElement;
ownerDocument: typeof ownerDocument;
ownerWindow: typeof ownerWindow;
requestAnimationFrame: typeof globalThis.requestAnimationFrame;
cancelAnimationFrame: (id: number) => void;
matches: typeof matches;
height: typeof height;
width: typeof width;
offset: typeof offset;
offsetParent: typeof offsetParent;
position: typeof position;
contains: typeof contains;
scrollbarSize: typeof scrollbarSize;
scrollLeft: {
(node: Element): number;
(node: Element, val: number): undefined;
};
scrollParent: typeof scrollParent;
scrollTo: typeof scrollTo;
scrollTop: {
(node: Element): number;
(node: Element, val: number): undefined;
};
querySelectorAll: typeof querySelectorAll;
closest: typeof closest;
addClass: typeof addClass;
removeClass: typeof removeClass;
hasClass: typeof hasClass;
toggleClass: typeof toggleClass;
transitionEnd: typeof transitionEnd;
childNodes: typeof childNodes;
childElements: typeof childElements;
nextUntil: typeof nextUntil;
parents: typeof parents;
siblings: typeof siblings;
clear: typeof clear;
insertAfter: typeof insertAfter;
isInput: typeof isInput;
isVisible: typeof isVisible;
prepend: typeof prepend;
remove: typeof remove;
text: typeof text;
};
export default _default;

92
web/node_modules/dom-helpers/esm/index.js generated vendored Normal file
View file

@ -0,0 +1,92 @@
import activeElement from './activeElement';
import addClass from './addClass';
import addEventListener from './addEventListener';
import animate from './animate';
import { cancel as cancelAnimationFrame, request as requestAnimationFrame } from './animationFrame';
import attribute from './attribute';
import childElements from './childElements';
import clear from './clear';
import closest from './closest';
import contains from './contains';
import childNodes from './childNodes';
import style from './css';
import filter from './filterEventHandler';
import getComputedStyle from './getComputedStyle';
import hasClass from './hasClass';
import height from './height';
import insertAfter from './insertAfter';
import isInput from './isInput';
import isVisible from './isVisible';
import listen from './listen';
import matches from './matches';
import nextUntil from './nextUntil';
import offset from './offset';
import offsetParent from './offsetParent';
import ownerDocument from './ownerDocument';
import ownerWindow from './ownerWindow';
import parents from './parents';
import position from './position';
import prepend from './prepend';
import querySelectorAll from './querySelectorAll';
import remove from './remove';
import removeClass from './removeClass';
import removeEventListener from './removeEventListener';
import scrollbarSize from './scrollbarSize';
import scrollLeft from './scrollLeft';
import scrollParent from './scrollParent';
import scrollTo from './scrollTo';
import scrollTop from './scrollTop';
import siblings from './siblings';
import text from './text';
import toggleClass from './toggleClass';
import transitionEnd from './transitionEnd';
import triggerEvent from './triggerEvent';
import width from './width';
export { addEventListener, removeEventListener, triggerEvent, animate, filter, listen, style, getComputedStyle, attribute, activeElement, ownerDocument, ownerWindow, requestAnimationFrame, cancelAnimationFrame, matches, height, width, offset, offsetParent, position, contains, scrollbarSize, scrollLeft, scrollParent, scrollTo, scrollTop, querySelectorAll, closest, addClass, removeClass, hasClass, toggleClass, transitionEnd, childNodes, childElements, nextUntil, parents, siblings, clear, insertAfter, isInput, isVisible, prepend, remove, text };
export default {
addEventListener: addEventListener,
removeEventListener: removeEventListener,
triggerEvent: triggerEvent,
animate: animate,
filter: filter,
listen: listen,
style: style,
getComputedStyle: getComputedStyle,
attribute: attribute,
activeElement: activeElement,
ownerDocument: ownerDocument,
ownerWindow: ownerWindow,
requestAnimationFrame: requestAnimationFrame,
cancelAnimationFrame: cancelAnimationFrame,
matches: matches,
height: height,
width: width,
offset: offset,
offsetParent: offsetParent,
position: position,
contains: contains,
scrollbarSize: scrollbarSize,
scrollLeft: scrollLeft,
scrollParent: scrollParent,
scrollTo: scrollTo,
scrollTop: scrollTop,
querySelectorAll: querySelectorAll,
closest: closest,
addClass: addClass,
removeClass: removeClass,
hasClass: hasClass,
toggleClass: toggleClass,
transitionEnd: transitionEnd,
childNodes: childNodes,
childElements: childElements,
nextUntil: nextUntil,
parents: parents,
siblings: siblings,
clear: clear,
insertAfter: insertAfter,
isInput: isInput,
isVisible: isVisible,
prepend: prepend,
remove: remove,
text: text
};

7
web/node_modules/dom-helpers/esm/insertAfter.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Inserts a node after a given reference node.
*
* @param node the node to insert
* @param refNode the reference node
*/
export default function insertAfter(node: Node | null, refNode: Node | null): Node | null;

19
web/node_modules/dom-helpers/esm/insertAfter.js generated vendored Normal file
View file

@ -0,0 +1,19 @@
/**
* Inserts a node after a given reference node.
*
* @param node the node to insert
* @param refNode the reference node
*/
export default function insertAfter(node, refNode) {
if (node && refNode && refNode.parentNode) {
if (refNode.nextSibling) {
refNode.parentNode.insertBefore(node, refNode.nextSibling);
} else {
refNode.parentNode.appendChild(node);
}
return node;
}
return null;
}

1
web/node_modules/dom-helpers/esm/isDocument.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export default function isDocument(element: Element | Document | Window): element is Document;

3
web/node_modules/dom-helpers/esm/isDocument.js generated vendored Normal file
View file

@ -0,0 +1,3 @@
export default function isDocument(element) {
return 'nodeType' in element && element.nodeType === document.DOCUMENT_NODE;
}

6
web/node_modules/dom-helpers/esm/isInput.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Checks if a given element is an input (input, select, textarea or button).
*
* @param node the element to check
*/
export default function isInput(node: Element | null): boolean;

10
web/node_modules/dom-helpers/esm/isInput.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
var regExpInputs = /^(?:input|select|textarea|button)$/i;
/**
* Checks if a given element is an input (input, select, textarea or button).
*
* @param node the element to check
*/
export default function isInput(node) {
return node ? regExpInputs.test(node.nodeName) : false;
}

2
web/node_modules/dom-helpers/esm/isTransform.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export declare type TransformValue = 'translate' | 'translateY' | 'translateX' | 'translateZ' | 'translate3d' | 'rotate' | 'rotateY' | 'rotateX' | 'rotateZ' | 'rotate3d' | 'scale' | 'scaleY' | 'scaleX' | 'scaleZ' | 'scale3d' | 'matrix' | 'matrix3d' | 'perspective' | 'skew' | 'skewY' | 'skewX';
export default function isTransform(value: string): value is TransformValue;

4
web/node_modules/dom-helpers/esm/isTransform.js generated vendored Normal file
View file

@ -0,0 +1,4 @@
var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
export default function isTransform(value) {
return !!(value && supportedTransforms.test(value));
}

6
web/node_modules/dom-helpers/esm/isVisible.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Checks if a given element is currently visible.
*
* @param node the element to check
*/
export default function isVisible(node: HTMLElement | null): boolean;

8
web/node_modules/dom-helpers/esm/isVisible.js generated vendored Normal file
View file

@ -0,0 +1,8 @@
/**
* Checks if a given element is currently visible.
*
* @param node the element to check
*/
export default function isVisible(node) {
return node ? !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length) : false;
}

1
web/node_modules/dom-helpers/esm/isWindow.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export default function isWindow(node: Element | Document | Window): Window | false;

6
web/node_modules/dom-helpers/esm/isWindow.js generated vendored Normal file
View file

@ -0,0 +1,6 @@
import isDocument from './isDocument';
export default function isWindow(node) {
if ('window' in node && node.window === node) return node;
if (isDocument(node)) return node.defaultView || false;
return false;
}

3
web/node_modules/dom-helpers/esm/listen.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
import { EventHandler } from './addEventListener';
declare function listen<K extends keyof HTMLElementEventMap>(node: HTMLElement, eventName: K, handler: EventHandler<K>, options?: boolean | AddEventListenerOptions): () => void;
export default listen;

11
web/node_modules/dom-helpers/esm/listen.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
import addEventListener from './addEventListener';
import removeEventListener from './removeEventListener';
function listen(node, eventName, handler, options) {
addEventListener(node, eventName, handler, options);
return function () {
removeEventListener(node, eventName, handler, options);
};
}
export default listen;

7
web/node_modules/dom-helpers/esm/matches.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Checks if a given element matches a selector.
*
* @param node the element
* @param selector the selector
*/
export default function matches(node: Element, selector: string): boolean;

20
web/node_modules/dom-helpers/esm/matches.js generated vendored Normal file
View file

@ -0,0 +1,20 @@
var matchesImpl;
/**
* Checks if a given element matches a selector.
*
* @param node the element
* @param selector the selector
*/
export default function matches(node, selector) {
if (!matchesImpl) {
var body = document.body;
var nativeMatch = body.matches || body.matchesSelector || body.webkitMatchesSelector || body.mozMatchesSelector || body.msMatchesSelector;
matchesImpl = function matchesImpl(n, s) {
return nativeMatch.call(n, s);
};
}
return matchesImpl(node, selector);
}

7
web/node_modules/dom-helpers/esm/nextUntil.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Collects all next sibling elements of an element until a given selector is matched.
*
* @param node the referene node
* @param selector the selector to match
*/
export default function nextUntil(node: Element | null, selector: string): Element[];

11
web/node_modules/dom-helpers/esm/nextUntil.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
import collectSiblings from './collectSiblings';
/**
* Collects all next sibling elements of an element until a given selector is matched.
*
* @param node the referene node
* @param selector the selector to match
*/
export default function nextUntil(node, selector) {
return collectSiblings(node, node, selector);
}

11
web/node_modules/dom-helpers/esm/offset.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
/**
* Returns the offset of a given element, including top and left positions, width and height.
*
* @param node the element
*/
export default function offset(node: HTMLElement): {
top: number;
left: number;
height: number;
width: number;
};

30
web/node_modules/dom-helpers/esm/offset.js generated vendored Normal file
View file

@ -0,0 +1,30 @@
import contains from './contains';
import ownerDocument from './ownerDocument';
import scrollLeft from './scrollLeft';
import scrollTop from './scrollTop';
/**
* Returns the offset of a given element, including top and left positions, width and height.
*
* @param node the element
*/
export default function offset(node) {
var doc = ownerDocument(node);
var box = {
top: 0,
left: 0,
height: 0,
width: 0
};
var docElem = doc && doc.documentElement; // Make sure it's not a disconnected DOM node
if (!docElem || !contains(docElem, node)) return box;
if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect();
box = {
top: box.top + scrollTop(docElem) - (docElem.clientTop || 0),
left: box.left + scrollLeft(docElem) - (docElem.clientLeft || 0),
width: box.width,
height: box.height
};
return box;
}

1
web/node_modules/dom-helpers/esm/offsetParent.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export default function offsetParent(node: HTMLElement): HTMLElement;

17
web/node_modules/dom-helpers/esm/offsetParent.js generated vendored Normal file
View file

@ -0,0 +1,17 @@
import css from './css';
import ownerDocument from './ownerDocument';
var isHTMLElement = function isHTMLElement(e) {
return !!e && 'offsetParent' in e;
};
export default function offsetParent(node) {
var doc = ownerDocument(node);
var parent = node && node.offsetParent;
while (isHTMLElement(parent) && parent.nodeName !== 'HTML' && css(parent, 'position') === 'static') {
parent = parent.offsetParent;
}
return parent || doc.documentElement;
}

6
web/node_modules/dom-helpers/esm/ownerDocument.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Returns the owner document of a given element.
*
* @param node the element
*/
export default function ownerDocument(node?: Element): Document;

8
web/node_modules/dom-helpers/esm/ownerDocument.js generated vendored Normal file
View file

@ -0,0 +1,8 @@
/**
* Returns the owner document of a given element.
*
* @param node the element
*/
export default function ownerDocument(node) {
return node && node.ownerDocument || document;
}

6
web/node_modules/dom-helpers/esm/ownerWindow.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Returns the owner window of a given element.
*
* @param node the element
*/
export default function ownerWindow(node?: Element): Window;

11
web/node_modules/dom-helpers/esm/ownerWindow.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
import ownerDocument from './ownerDocument';
/**
* Returns the owner window of a given element.
*
* @param node the element
*/
export default function ownerWindow(node) {
var doc = ownerDocument(node);
return doc && doc.defaultView || window;
}

6
web/node_modules/dom-helpers/esm/parents.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Collects all parent elements of a given element.
*
* @param node the element
*/
export default function parents(node: Element | null): Element[];

10
web/node_modules/dom-helpers/esm/parents.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
import collectElements from './collectElements';
/**
* Collects all parent elements of a given element.
*
* @param node the element
*/
export default function parents(node) {
return collectElements(node, 'parentElement');
}

12
web/node_modules/dom-helpers/esm/position.d.ts generated vendored Normal file
View file

@ -0,0 +1,12 @@
/**
* Returns the relative position of a given element.
*
* @param node the element
* @param offsetParent the offset parent
*/
export default function position(node: HTMLElement, offsetParent?: HTMLElement): {
top: number;
left: number;
height: number;
width: number;
};

46
web/node_modules/dom-helpers/esm/position.js generated vendored Normal file
View file

@ -0,0 +1,46 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import css from './css';
import getOffset from './offset';
import getOffsetParent from './offsetParent';
import scrollLeft from './scrollLeft';
import scrollTop from './scrollTop';
var nodeName = function nodeName(node) {
return node.nodeName && node.nodeName.toLowerCase();
};
/**
* Returns the relative position of a given element.
*
* @param node the element
* @param offsetParent the offset parent
*/
export default function position(node, offsetParent) {
var parentOffset = {
top: 0,
left: 0
};
var offset; // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
// because it is its only offset parent
if (css(node, 'position') === 'fixed') {
offset = node.getBoundingClientRect();
} else {
var parent = offsetParent || getOffsetParent(node);
offset = getOffset(node);
if (nodeName(parent) !== 'html') parentOffset = getOffset(parent);
var borderTop = String(css(parent, 'borderTopWidth') || 0);
parentOffset.top += parseInt(borderTop, 10) - scrollTop(parent) || 0;
var borderLeft = String(css(parent, 'borderLeftWidth') || 0);
parentOffset.left += parseInt(borderLeft, 10) - scrollLeft(parent) || 0;
}
var marginTop = String(css(node, 'marginTop') || 0);
var marginLeft = String(css(node, 'marginLeft') || 0); // Subtract parent offsets and node margins
return _extends({}, offset, {
top: offset.top - parentOffset.top - (parseInt(marginTop, 10) || 0),
left: offset.left - parentOffset.left - (parseInt(marginLeft, 10) || 0)
});
}

7
web/node_modules/dom-helpers/esm/prepend.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Insert a given element as the first child of a parent element.
*
* @param node the element to prepend
* @param parent the parent element
*/
export default function prepend(node: Element | null, parent: Element | null): Element | null;

19
web/node_modules/dom-helpers/esm/prepend.js generated vendored Normal file
View file

@ -0,0 +1,19 @@
/**
* Insert a given element as the first child of a parent element.
*
* @param node the element to prepend
* @param parent the parent element
*/
export default function prepend(node, parent) {
if (node && parent) {
if (parent.firstElementChild) {
parent.insertBefore(node, parent.firstElementChild);
} else {
parent.appendChild(node);
}
return node;
}
return null;
}

View file

@ -0,0 +1,7 @@
/**
* Runs `querySelectorAll` on a given element.
*
* @param element the element
* @param selector the selector
*/
export default function qsa(element: HTMLElement | Document, selector: string): HTMLElement[];

11
web/node_modules/dom-helpers/esm/querySelectorAll.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
/**
* Runs `querySelectorAll` on a given element.
*
* @param element the element
* @param selector the selector
*/
export default function qsa(element, selector) {
return toArray(element.querySelectorAll(selector));
}

6
web/node_modules/dom-helpers/esm/remove.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
/**
* Removes a given node from the DOM.
*
* @param node the node to remove
*/
export default function remove(node: Node | null): Node | null;

13
web/node_modules/dom-helpers/esm/remove.js generated vendored Normal file
View file

@ -0,0 +1,13 @@
/**
* Removes a given node from the DOM.
*
* @param node the node to remove
*/
export default function remove(node) {
if (node && node.parentNode) {
node.parentNode.removeChild(node);
return node;
}
return null;
}

7
web/node_modules/dom-helpers/esm/removeClass.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Removes a CSS class from a given element.
*
* @param element the element
* @param className the CSS class name
*/
export default function removeClass(element: Element | SVGElement, className: string): void;

20
web/node_modules/dom-helpers/esm/removeClass.js generated vendored Normal file
View file

@ -0,0 +1,20 @@
function replaceClassName(origClass, classToRemove) {
return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
}
/**
* Removes a CSS class from a given element.
*
* @param element the element
* @param className the CSS class name
*/
export default function removeClass(element, className) {
if (element.classList) {
element.classList.remove(className);
} else if (typeof element.className === 'string') {
element.className = replaceClassName(element.className, className);
} else {
element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
}
}

View file

@ -0,0 +1,11 @@
import { TaggedEventHandler } from './addEventListener';
/**
* A `removeEventListener` ponyfill
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
declare function removeEventListener<K extends keyof HTMLElementEventMap>(node: HTMLElement, eventName: K, handler: TaggedEventHandler<K>, options?: boolean | EventListenerOptions): void;
export default removeEventListener;

View file

@ -0,0 +1,18 @@
/**
* A `removeEventListener` ponyfill
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
function removeEventListener(node, eventName, handler, options) {
var capture = options && typeof options !== 'boolean' ? options.capture : options;
node.removeEventListener(eventName, handler, capture);
if (handler.__once) {
node.removeEventListener(eventName, handler.__once, capture);
}
}
export default removeEventListener;

11
web/node_modules/dom-helpers/esm/scrollLeft.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
declare const _default: {
(node: Element): number;
(node: Element, val: number): undefined;
};
/**
* Gets or sets the scroll left position of a given element.
*
* @param node the element
* @param val the position to set
*/
export default _default;

9
web/node_modules/dom-helpers/esm/scrollLeft.js generated vendored Normal file
View file

@ -0,0 +1,9 @@
import getScrollAccessor from './getScrollAccessor';
/**
* Gets or sets the scroll left position of a given element.
*
* @param node the element
* @param val the position to set
*/
export default getScrollAccessor('pageXOffset');

7
web/node_modules/dom-helpers/esm/scrollParent.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
/**
* Find the first scrollable parent of an element.
*
* @param element Starting element
* @param firstPossible Stop at the first scrollable parent, even if it's not currently scrollable
*/
export default function scrollParent(element: HTMLElement, firstPossible?: boolean): Document | HTMLElement;

29
web/node_modules/dom-helpers/esm/scrollParent.js generated vendored Normal file
View file

@ -0,0 +1,29 @@
/* eslint-disable no-cond-assign, no-continue */
import css from './css';
import height from './height';
import isDocument from './isDocument';
/**
* Find the first scrollable parent of an element.
*
* @param element Starting element
* @param firstPossible Stop at the first scrollable parent, even if it's not currently scrollable
*/
export default function scrollParent(element, firstPossible) {
var position = css(element, 'position');
var excludeStatic = position === 'absolute';
var ownerDoc = element.ownerDocument;
if (position === 'fixed') return ownerDoc || document; // @ts-ignore
while ((element = element.parentNode) && !isDocument(element)) {
var isStatic = excludeStatic && css(element, 'position') === 'static';
var style = (css(element, 'overflow') || '') + (css(element, 'overflow-y') || '') + css(element, 'overflow-x');
if (isStatic) continue;
if (/(auto|scroll)/.test(style) && (firstPossible || height(element) < element.scrollHeight)) {
return element;
}
}
return ownerDoc || document;
}

1
web/node_modules/dom-helpers/esm/scrollTo.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export default function scrollTo(selected: HTMLElement, scrollParent?: HTMLElement): (() => void) | undefined;

36
web/node_modules/dom-helpers/esm/scrollTo.js generated vendored Normal file
View file

@ -0,0 +1,36 @@
/* eslint-disable no-nested-ternary */
import { cancel, request } from './animationFrame';
import height from './height';
import getWindow from './isWindow';
import getOffset from './offset';
import getScrollParent from './scrollParent';
import scrollTop from './scrollTop';
export default function scrollTo(selected, scrollParent) {
var offset = getOffset(selected);
var poff = {
top: 0,
left: 0
};
if (!selected) return undefined;
var list = scrollParent || getScrollParent(selected);
var isWin = getWindow(list);
var listScrollTop = scrollTop(list);
var listHeight = height(list, true);
if (!isWin) poff = getOffset(list);
offset = {
top: offset.top - poff.top,
left: offset.left - poff.left,
height: offset.height,
width: offset.width
};
var selectedHeight = offset.height;
var selectedTop = offset.top + (isWin ? 0 : listScrollTop);
var bottom = selectedTop + selectedHeight;
listScrollTop = listScrollTop > selectedTop ? selectedTop : bottom > listScrollTop + listHeight ? bottom - listHeight : listScrollTop;
var id = request(function () {
return scrollTop(list, listScrollTop);
});
return function () {
return cancel(id);
};
}

11
web/node_modules/dom-helpers/esm/scrollTop.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
declare const _default: {
(node: Element): number;
(node: Element, val: number): undefined;
};
/**
* Gets or sets the scroll top position of a given element.
*
* @param node the element
* @param val the position to set
*/
export default _default;

9
web/node_modules/dom-helpers/esm/scrollTop.js generated vendored Normal file
View file

@ -0,0 +1,9 @@
import getScrollAccessor from './getScrollAccessor';
/**
* Gets or sets the scroll top position of a given element.
*
* @param node the element
* @param val the position to set
*/
export default getScrollAccessor('pageYOffset');

1
web/node_modules/dom-helpers/esm/scrollbarSize.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export default function scrollbarSize(recalc?: boolean): number;

19
web/node_modules/dom-helpers/esm/scrollbarSize.js generated vendored Normal file
View file

@ -0,0 +1,19 @@
import canUseDOM from './canUseDOM';
var size;
export default function scrollbarSize(recalc) {
if (!size && size !== 0 || recalc) {
if (canUseDOM) {
var scrollDiv = document.createElement('div');
scrollDiv.style.position = 'absolute';
scrollDiv.style.top = '-9999px';
scrollDiv.style.width = '50px';
scrollDiv.style.height = '50px';
scrollDiv.style.overflow = 'scroll';
document.body.appendChild(scrollDiv);
size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
}
}
return size;
}

Some files were not shown because too many files have changed in this diff Show more