@aglyn/shared-util-dom 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +37 -0
- package/src/constants/enums.d.ts +18 -0
- package/src/constants/enums.js +19 -0
- package/src/constants/enums.js.map +1 -0
- package/src/dom.d.ts +100 -0
- package/src/dom.js +51 -0
- package/src/dom.js.map +1 -0
- package/src/index.d.ts +17 -0
- package/src/index.js +18 -0
- package/src/index.js.map +1 -0
- package/src/lib/controllers/page-title.d.ts +47 -0
- package/src/lib/controllers/page-title.js +114 -0
- package/src/lib/controllers/page-title.js.map +1 -0
- package/src/lib/get-element-client-rect-bounding-inner.d.ts +19 -0
- package/src/lib/get-element-client-rect-bounding-inner.js +31 -0
- package/src/lib/get-element-client-rect-bounding-inner.js.map +1 -0
- package/src/lib/get-element-client-rect-bounding.d.ts +39 -0
- package/src/lib/get-element-client-rect-bounding.js +45 -0
- package/src/lib/get-element-client-rect-bounding.js.map +1 -0
- package/src/lib/get-element-clipping-rect.d.ts +26 -0
- package/src/lib/get-element-clipping-rect.js +77 -0
- package/src/lib/get-element-clipping-rect.js.map +1 -0
- package/src/lib/get-element-computed-style.d.ts +18 -0
- package/src/lib/get-element-computed-style.js +22 -0
- package/src/lib/get-element-computed-style.js.map +1 -0
- package/src/lib/get-element-document-element-rect.d.ts +19 -0
- package/src/lib/get-element-document-element-rect.js +43 -0
- package/src/lib/get-element-document-element-rect.js.map +1 -0
- package/src/lib/get-element-document-element.d.ts +18 -0
- package/src/lib/get-element-document-element.js +23 -0
- package/src/lib/get-element-document-element.js.map +1 -0
- package/src/lib/get-element-fragment-rects.d.ts +93 -0
- package/src/lib/get-element-fragment-rects.js +113 -0
- package/src/lib/get-element-fragment-rects.js.map +1 -0
- package/src/lib/get-element-list-scroll-parents.d.ts +19 -0
- package/src/lib/get-element-list-scroll-parents.js +38 -0
- package/src/lib/get-element-list-scroll-parents.js.map +1 -0
- package/src/lib/get-element-node-name.d.ts +18 -0
- package/src/lib/get-element-node-name.js +21 -0
- package/src/lib/get-element-node-name.js.map +1 -0
- package/src/lib/get-element-offset-parent.d.ts +18 -0
- package/src/lib/get-element-offset-parent.js +81 -0
- package/src/lib/get-element-offset-parent.js.map +1 -0
- package/src/lib/get-element-parent-node.d.ts +18 -0
- package/src/lib/get-element-parent-node.js +31 -0
- package/src/lib/get-element-parent-node.js.map +1 -0
- package/src/lib/get-element-rect-as-client-rect.d.ts +19 -0
- package/src/lib/get-element-rect-as-client-rect.js +27 -0
- package/src/lib/get-element-rect-as-client-rect.js.map +1 -0
- package/src/lib/get-element-scroll-parent.d.ts +18 -0
- package/src/lib/get-element-scroll-parent.js +36 -0
- package/src/lib/get-element-scroll-parent.js.map +1 -0
- package/src/lib/get-element-viewport-rect.d.ts +23 -0
- package/src/lib/get-element-viewport-rect.js +57 -0
- package/src/lib/get-element-viewport-rect.js.map +1 -0
- package/src/lib/get-element-window-scroll-bar-x.d.ts +18 -0
- package/src/lib/get-element-window-scroll-bar-x.js +31 -0
- package/src/lib/get-element-window-scroll-bar-x.js.map +1 -0
- package/src/lib/get-event-coordinates.d.ts +22 -0
- package/src/lib/get-event-coordinates.js +49 -0
- package/src/lib/get-event-coordinates.js.map +1 -0
- package/src/lib/get-iframe-document.d.ts +18 -0
- package/src/lib/get-iframe-document.js +29 -0
- package/src/lib/get-iframe-document.js.map +1 -0
- package/src/lib/get-node-window-scroll.d.ts +21 -0
- package/src/lib/get-node-window-scroll.js +28 -0
- package/src/lib/get-node-window-scroll.js.map +1 -0
- package/src/lib/get-node-window.d.ts +18 -0
- package/src/lib/get-node-window.js +34 -0
- package/src/lib/get-node-window.js.map +1 -0
- package/src/lib/get-owner-document.d.ts +2 -0
- package/src/lib/get-owner-document.js +40 -0
- package/src/lib/get-owner-document.js.map +1 -0
- package/src/lib/guards/element-contains-child-element.d.ts +18 -0
- package/src/lib/guards/element-contains-child-element.js +37 -0
- package/src/lib/guards/element-contains-child-element.js.map +1 -0
- package/src/lib/guards/event-has-viewport-coordinates.d.ts +18 -0
- package/src/lib/guards/event-has-viewport-coordinates.js +21 -0
- package/src/lib/guards/event-has-viewport-coordinates.js.map +1 -0
- package/src/lib/guards/is-element-html-element.d.ts +18 -0
- package/src/lib/guards/is-element-html-element.js +26 -0
- package/src/lib/guards/is-element-html-element.js.map +1 -0
- package/src/lib/guards/is-element-scroll-parent-element.d.ts +2 -0
- package/src/lib/guards/is-element-scroll-parent-element.js +24 -0
- package/src/lib/guards/is-element-scroll-parent-element.js.map +1 -0
- package/src/lib/guards/is-element-window.d.ts +18 -0
- package/src/lib/guards/is-element-window.js +22 -0
- package/src/lib/guards/is-element-window.js.map +1 -0
- package/src/lib/guards/is-keyboard-event.d.ts +18 -0
- package/src/lib/guards/is-keyboard-event.js +26 -0
- package/src/lib/guards/is-keyboard-event.js.map +1 -0
- package/src/lib/guards/is-node-element.d.ts +2 -0
- package/src/lib/guards/is-node-element.js +23 -0
- package/src/lib/guards/is-node-element.js.map +1 -0
- package/src/lib/guards/is-node-object.d.ts +18 -0
- package/src/lib/guards/is-node-object.js +21 -0
- package/src/lib/guards/is-node-object.js.map +1 -0
- package/src/lib/guards/is-node-shadow-root.d.ts +2 -0
- package/src/lib/guards/is-node-shadow-root.js +27 -0
- package/src/lib/guards/is-node-shadow-root.js.map +1 -0
- package/src/lib/guards/is-node-table-element.d.ts +2 -0
- package/src/lib/guards/is-node-table-element.js +26 -0
- package/src/lib/guards/is-node-table-element.js.map +1 -0
- package/src/lib/guards/is-node-window-document.d.ts +18 -0
- package/src/lib/guards/is-node-window-document.js +23 -0
- package/src/lib/guards/is-node-window-document.js.map +1 -0
- package/src/lib/guards/is-svg-element.d.ts +2 -0
- package/src/lib/guards/is-svg-element.js +22 -0
- package/src/lib/guards/is-svg-element.js.map +1 -0
- package/src/lib/guards/is-touch-event.d.ts +18 -0
- package/src/lib/guards/is-touch-event.js +26 -0
- package/src/lib/guards/is-touch-event.js.map +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import getNodeWindow from "../get-node-window.js";
|
|
17
|
+
export function isKeyboardEvent(event) {
|
|
18
|
+
if (!event) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
const { KeyboardEvent } = getNodeWindow(event.target);
|
|
22
|
+
return KeyboardEvent && event instanceof KeyboardEvent;
|
|
23
|
+
}
|
|
24
|
+
export default isKeyboardEvent;
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=is-keyboard-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-keyboard-event.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport getNodeWindow from '../get-node-window'\n\n\nexport function isKeyboardEvent(\n event: Event | undefined | null,\n): event is KeyboardEvent {\n if (!event) {\n return false\n }\n\n const {KeyboardEvent} = getNodeWindow(event.target)\n\n return KeyboardEvent && event instanceof KeyboardEvent\n}\nexport default isKeyboardEvent\n"],"names":["getNodeWindow","isKeyboardEvent","event","KeyboardEvent","target"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,mBAAmB,wBAAoB;AAG9C,OAAO,SAASC,gBACdC,KAA+B;IAE/B,IAAI,CAACA,OAAO;QACV,OAAO;IACT;IAEA,MAAM,EAACC,aAAa,EAAC,GAAGH,cAAcE,MAAME,MAAM;IAElD,OAAOD,iBAAiBD,iBAAiBC;AAC3C;AACA,eAAeF,gBAAe"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import getNodeWindow from "../get-node-window.js";
|
|
17
|
+
export function isNodeElement(node) {
|
|
18
|
+
const OwnElement = getNodeWindow(node)['Element'];
|
|
19
|
+
return node instanceof OwnElement || node instanceof Element;
|
|
20
|
+
}
|
|
21
|
+
export default isNodeElement;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=is-node-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-node-element.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport getNodeWindow from '../get-node-window'\n\n\nexport function isNodeElement(node: any): node is Element {\n const OwnElement = getNodeWindow(node)['Element']\n return node instanceof OwnElement || node instanceof Element\n}\n\nexport default isNodeElement\n"],"names":["getNodeWindow","isNodeElement","node","OwnElement","Element"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD,OAAOA,mBAAmB,wBAAoB;AAG9C,OAAO,SAASC,cAAcC,IAAS;IACrC,MAAMC,aAAaH,cAAcE,KAAK,CAAC,UAAU;IACjD,OAAOA,gBAAgBC,cAAcD,gBAAgBE;AACvD;AAEA,eAAeH,cAAa"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isNodeObject(node: any): node is Node;
|
|
18
|
+
export default isNodeObject;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ export function isNodeObject(node) {
|
|
17
|
+
return 'nodeType' in node;
|
|
18
|
+
}
|
|
19
|
+
export default isNodeObject;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=is-node-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-node-object.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isNodeObject(node: any): node is Node {\n return 'nodeType' in node\n}\n\nexport default isNodeObject\n"],"names":["isNodeObject","node"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAO,SAASA,aAAaC,IAAS;IACpC,OAAO,cAAcA;AACvB;AAEA,eAAeD,aAAY"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import getNodeWindow from "../get-node-window.js";
|
|
17
|
+
export function isNodeShadowRoot(node) {
|
|
18
|
+
// IE 11 has no ShadowRoot
|
|
19
|
+
if (typeof ShadowRoot === 'undefined') {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
const OwnElement = getNodeWindow(node)['ShadowRoot'];
|
|
23
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
24
|
+
}
|
|
25
|
+
export default isNodeShadowRoot;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=is-node-shadow-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-node-shadow-root.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport getNodeWindow from '../get-node-window'\n\n\nexport function isNodeShadowRoot(node: any): node is ShadowRoot {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false\n }\n const OwnElement = getNodeWindow(node)['ShadowRoot']\n return node instanceof OwnElement || node instanceof ShadowRoot\n}\nexport default isNodeShadowRoot\n"],"names":["getNodeWindow","isNodeShadowRoot","node","ShadowRoot","OwnElement"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD,OAAOA,mBAAmB,wBAAoB;AAG9C,OAAO,SAASC,iBAAiBC,IAAS;IACxC,0BAA0B;IAC1B,IAAI,OAAOC,eAAe,aAAa;QACrC,OAAO;IACT;IACA,MAAMC,aAAaJ,cAAcE,KAAK,CAAC,aAAa;IACpD,OAAOA,gBAAgBE,cAAcF,gBAAgBC;AACvD;AACA,eAAeF,iBAAgB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import getElementNodeName from "../get-element-node-name.js";
|
|
17
|
+
export function isNodeTableElement(node) {
|
|
18
|
+
return [
|
|
19
|
+
'table',
|
|
20
|
+
'td',
|
|
21
|
+
'th'
|
|
22
|
+
].indexOf(getElementNodeName(node)) >= 0;
|
|
23
|
+
}
|
|
24
|
+
export default isNodeTableElement;
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=is-node-table-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-node-table-element.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport getElementNodeName from '../get-element-node-name'\n\n\nexport function isNodeTableElement(node: any): node is HTMLTableElement | HTMLTableCellElement {\n return ['table', 'td', 'th'].indexOf(getElementNodeName(node)) >= 0\n}\nexport default isNodeTableElement\n"],"names":["getElementNodeName","isNodeTableElement","node","indexOf"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD,OAAOA,wBAAwB,8BAA0B;AAGzD,OAAO,SAASC,mBAAmBC,IAAS;IAC1C,OAAO;QAAC;QAAS;QAAM;KAAK,CAACC,OAAO,CAACH,mBAAmBE,UAAU;AACpE;AACA,eAAeD,mBAAkB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isNodeDocument(node: Node): node is Document;
|
|
18
|
+
export default isNodeDocument;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import getNodeWindow from "../get-node-window.js";
|
|
17
|
+
export function isNodeDocument(node) {
|
|
18
|
+
const { Document } = getNodeWindow(node);
|
|
19
|
+
return node instanceof Document;
|
|
20
|
+
}
|
|
21
|
+
export default isNodeDocument;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=is-node-window-document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-node-window-document.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport getNodeWindow from '../get-node-window'\n\n\nexport function isNodeDocument(node: Node): node is Document {\n const {Document} = getNodeWindow(node)\n\n return node instanceof Document\n}\nexport default isNodeDocument\n"],"names":["getNodeWindow","isNodeDocument","node","Document"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,mBAAmB,wBAAoB;AAG9C,OAAO,SAASC,eAAeC,IAAU;IACvC,MAAM,EAACC,QAAQ,EAAC,GAAGH,cAAcE;IAEjC,OAAOA,gBAAgBC;AACzB;AACA,eAAeF,eAAc"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import getNodeWindow from "../get-node-window.js";
|
|
17
|
+
export function isSVGElement(node) {
|
|
18
|
+
return node instanceof getNodeWindow(node).SVGElement;
|
|
19
|
+
}
|
|
20
|
+
export default isSVGElement;
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=is-svg-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-svg-element.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ import getNodeWindow from '../get-node-window'\n\n\nexport function isSVGElement(node: Node): node is SVGElement {\n return node instanceof getNodeWindow(node).SVGElement\n}\nexport default isSVGElement\n"],"names":["getNodeWindow","isSVGElement","node","SVGElement"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAAG,OAAOA,mBAAmB,wBAAoB;AAGlD,OAAO,SAASC,aAAaC,IAAU;IACrC,OAAOA,gBAAgBF,cAAcE,MAAMC,UAAU;AACvD;AACA,eAAeF,aAAY"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isTouchEvent(event: Event | undefined | null): event is TouchEvent;
|
|
18
|
+
export default isTouchEvent;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import getNodeWindow from "../get-node-window.js";
|
|
17
|
+
export function isTouchEvent(event) {
|
|
18
|
+
if (!event) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
const { TouchEvent } = getNodeWindow(event.target);
|
|
22
|
+
return TouchEvent && event instanceof TouchEvent;
|
|
23
|
+
}
|
|
24
|
+
export default isTouchEvent;
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=is-touch-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/util/dom/src/lib/guards/is-touch-event.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport getNodeWindow from '../get-node-window'\n\n\nexport function isTouchEvent(\n event: Event | undefined | null,\n): event is TouchEvent {\n if (!event) {\n return false\n }\n\n const {TouchEvent} = getNodeWindow(event.target)\n\n return TouchEvent && event instanceof TouchEvent\n}\nexport default isTouchEvent\n"],"names":["getNodeWindow","isTouchEvent","event","TouchEvent","target"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,mBAAmB,wBAAoB;AAG9C,OAAO,SAASC,aACdC,KAA+B;IAE/B,IAAI,CAACA,OAAO;QACV,OAAO;IACT;IAEA,MAAM,EAACC,UAAU,EAAC,GAAGH,cAAcE,MAAME,MAAM;IAE/C,OAAOD,cAAcD,iBAAiBC;AACxC;AACA,eAAeF,aAAY"}
|