@wordpress/dom 3.54.0 → 3.55.0
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/CHANGELOG.md +4 -0
- package/build/dom/is-edge.js +1 -1
- package/build/dom/is-edge.js.map +1 -1
- package/build/focusable.js +0 -2
- package/build/focusable.js.map +1 -1
- package/build/tabbable.js +19 -25
- package/build/tabbable.js.map +1 -1
- package/build-module/dom/is-edge.js +1 -1
- package/build-module/dom/is-edge.js.map +1 -1
- package/build-module/focusable.js +0 -2
- package/build-module/focusable.js.map +1 -1
- package/build-module/tabbable.js +19 -25
- package/build-module/tabbable.js.map +1 -1
- package/build-types/focusable.d.ts.map +1 -1
- package/build-types/tabbable.d.ts +7 -7
- package/build-types/tabbable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/dom/is-edge.js +1 -1
- package/src/focusable.js +0 -2
- package/src/tabbable.js +20 -24
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
package/build/dom/is-edge.js
CHANGED
@@ -38,7 +38,7 @@ function isEdge(container, isReverse, onlyVertical = false) {
|
|
38
38
|
}
|
39
39
|
return container.value.length === container.selectionStart;
|
40
40
|
}
|
41
|
-
if (!
|
41
|
+
if (!container.isContentEditable) {
|
42
42
|
return true;
|
43
43
|
}
|
44
44
|
const {
|
package/build/dom/is-edge.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_isRtl","_interopRequireDefault","require","_getRangeHeight","_getRectangleFromRange","_isSelectionForward","_hiddenCaretRangeFromPoint","_assertIsDefined","_isInputOrTextArea","_scrollIfNoRange","isEdge","container","isReverse","onlyVertical","isInputOrTextArea","selectionStart","selectionEnd","value","length","isContentEditable","ownerDocument","defaultView","assertIsDefined","selection","getSelection","rangeCount","range","getRangeAt","collapsedRange","cloneRange","isForward","isSelectionForward","isCollapsed","collapse","collapsedRangeRect","getRectangleFromRange","rangeRect","rangeHeight","getRangeHeight","height","isReverseDir","isRTL","containerRect","getBoundingClientRect","x","left","right","y","top","bottom","testRange","scrollIfNoRange","hiddenCaretRangeFromPoint","testRect","verticalSide","horizontalSide","verticalDiff","horizontalDiff","hasVerticalDiff","Math","abs","hasHorizontalDiff"],"sources":["@wordpress/dom/src/dom/is-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport isRTL from './is-rtl';\nimport getRangeHeight from './get-range-height';\nimport getRectangleFromRange from './get-rectangle-from-range';\nimport isSelectionForward from './is-selection-forward';\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Check whether the selection is at the edge of the container. Checks for\n * horizontal position by default. Set `onlyVertical` to true to check only\n * vertically.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse Set to true to check left, false to check right.\n * @param {boolean} [onlyVertical=false] Set to true to check only vertical position.\n *\n * @return {boolean} True if at the edge, false if not.\n */\nexport default function isEdge( container, isReverse, onlyVertical = false ) {\n\tif (\n\t\tisInputOrTextArea( container ) &&\n\t\ttypeof container.selectionStart === 'number'\n\t) {\n\t\tif ( container.selectionStart !== container.selectionEnd ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\treturn container.selectionStart === 0;\n\t\t}\n\n\t\treturn container.value.length === container.selectionStart;\n\t}\n\n\tif ( !
|
1
|
+
{"version":3,"names":["_isRtl","_interopRequireDefault","require","_getRangeHeight","_getRectangleFromRange","_isSelectionForward","_hiddenCaretRangeFromPoint","_assertIsDefined","_isInputOrTextArea","_scrollIfNoRange","isEdge","container","isReverse","onlyVertical","isInputOrTextArea","selectionStart","selectionEnd","value","length","isContentEditable","ownerDocument","defaultView","assertIsDefined","selection","getSelection","rangeCount","range","getRangeAt","collapsedRange","cloneRange","isForward","isSelectionForward","isCollapsed","collapse","collapsedRangeRect","getRectangleFromRange","rangeRect","rangeHeight","getRangeHeight","height","isReverseDir","isRTL","containerRect","getBoundingClientRect","x","left","right","y","top","bottom","testRange","scrollIfNoRange","hiddenCaretRangeFromPoint","testRect","verticalSide","horizontalSide","verticalDiff","horizontalDiff","hasVerticalDiff","Math","abs","hasHorizontalDiff"],"sources":["@wordpress/dom/src/dom/is-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport isRTL from './is-rtl';\nimport getRangeHeight from './get-range-height';\nimport getRectangleFromRange from './get-rectangle-from-range';\nimport isSelectionForward from './is-selection-forward';\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Check whether the selection is at the edge of the container. Checks for\n * horizontal position by default. Set `onlyVertical` to true to check only\n * vertically.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse Set to true to check left, false to check right.\n * @param {boolean} [onlyVertical=false] Set to true to check only vertical position.\n *\n * @return {boolean} True if at the edge, false if not.\n */\nexport default function isEdge( container, isReverse, onlyVertical = false ) {\n\tif (\n\t\tisInputOrTextArea( container ) &&\n\t\ttypeof container.selectionStart === 'number'\n\t) {\n\t\tif ( container.selectionStart !== container.selectionEnd ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\treturn container.selectionStart === 0;\n\t\t}\n\n\t\treturn container.value.length === container.selectionStart;\n\t}\n\n\tif ( ! container.isContentEditable ) {\n\t\treturn true;\n\t}\n\n\tconst { ownerDocument } = container;\n\tconst { defaultView } = ownerDocument;\n\n\tassertIsDefined( defaultView, 'defaultView' );\n\tconst selection = defaultView.getSelection();\n\n\tif ( ! selection || ! selection.rangeCount ) {\n\t\treturn false;\n\t}\n\n\tconst range = selection.getRangeAt( 0 );\n\tconst collapsedRange = range.cloneRange();\n\tconst isForward = isSelectionForward( selection );\n\tconst isCollapsed = selection.isCollapsed;\n\n\t// Collapse in direction of selection.\n\tif ( ! isCollapsed ) {\n\t\tcollapsedRange.collapse( ! isForward );\n\t}\n\n\tconst collapsedRangeRect = getRectangleFromRange( collapsedRange );\n\tconst rangeRect = getRectangleFromRange( range );\n\n\tif ( ! collapsedRangeRect || ! rangeRect ) {\n\t\treturn false;\n\t}\n\n\t// Only consider the multiline selection at the edge if the direction is\n\t// towards the edge. The selection is multiline if it is taller than the\n\t// collapsed selection.\n\tconst rangeHeight = getRangeHeight( range );\n\tif (\n\t\t! isCollapsed &&\n\t\trangeHeight &&\n\t\trangeHeight > collapsedRangeRect.height &&\n\t\tisForward === isReverse\n\t) {\n\t\treturn false;\n\t}\n\n\t// In the case of RTL scripts, the horizontal edge is at the opposite side.\n\tconst isReverseDir = isRTL( container ) ? ! isReverse : isReverse;\n\tconst containerRect = container.getBoundingClientRect();\n\n\t// To check if a selection is at the edge, we insert a test selection at the\n\t// edge of the container and check if the selections have the same vertical\n\t// or horizontal position. If they do, the selection is at the edge.\n\t// This method proves to be better than a DOM-based calculation for the\n\t// horizontal edge, since it ignores empty textnodes and a trailing line\n\t// break element. In other words, we need to check visual positioning, not\n\t// DOM positioning.\n\t// It also proves better than using the computed style for the vertical\n\t// edge, because we cannot know the padding and line height reliably in\n\t// pixels. `getComputedStyle` may return a value with different units.\n\tconst x = isReverseDir ? containerRect.left + 1 : containerRect.right - 1;\n\tconst y = isReverse ? containerRect.top + 1 : containerRect.bottom - 1;\n\tconst testRange = scrollIfNoRange( container, isReverse, () =>\n\t\thiddenCaretRangeFromPoint( ownerDocument, x, y, container )\n\t);\n\n\tif ( ! testRange ) {\n\t\treturn false;\n\t}\n\n\tconst testRect = getRectangleFromRange( testRange );\n\n\tif ( ! testRect ) {\n\t\treturn false;\n\t}\n\n\tconst verticalSide = isReverse ? 'top' : 'bottom';\n\tconst horizontalSide = isReverseDir ? 'left' : 'right';\n\tconst verticalDiff = testRect[ verticalSide ] - rangeRect[ verticalSide ];\n\tconst horizontalDiff =\n\t\ttestRect[ horizontalSide ] - collapsedRangeRect[ horizontalSide ];\n\n\t// Allow the position to be 1px off.\n\tconst hasVerticalDiff = Math.abs( verticalDiff ) <= 1;\n\tconst hasHorizontalDiff = Math.abs( horizontalDiff ) <= 1;\n\n\treturn onlyVertical\n\t\t? hasVerticalDiff\n\t\t: hasVerticalDiff && hasHorizontalDiff;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,sBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,mBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,0BAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AAVA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASQ,MAAMA,CAAEC,SAAS,EAAEC,SAAS,EAAEC,YAAY,GAAG,KAAK,EAAG;EAC5E,IACC,IAAAC,0BAAiB,EAAEH,SAAU,CAAC,IAC9B,OAAOA,SAAS,CAACI,cAAc,KAAK,QAAQ,EAC3C;IACD,IAAKJ,SAAS,CAACI,cAAc,KAAKJ,SAAS,CAACK,YAAY,EAAG;MAC1D,OAAO,KAAK;IACb;IAEA,IAAKJ,SAAS,EAAG;MAChB,OAAOD,SAAS,CAACI,cAAc,KAAK,CAAC;IACtC;IAEA,OAAOJ,SAAS,CAACM,KAAK,CAACC,MAAM,KAAKP,SAAS,CAACI,cAAc;EAC3D;EAEA,IAAK,CAAEJ,SAAS,CAACQ,iBAAiB,EAAG;IACpC,OAAO,IAAI;EACZ;EAEA,MAAM;IAAEC;EAAc,CAAC,GAAGT,SAAS;EACnC,MAAM;IAAEU;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GAAGH,aAAa,CAACI,KAAK,GAAG,CAAC;EACzE,MAAMC,CAAC,GAAGnC,SAAS,GAAG8B,aAAa,CAACM,GAAG,GAAG,CAAC,GAAGN,aAAa,CAACO,MAAM,GAAG,CAAC;EACtE,MAAMC,SAAS,GAAG,IAAAC,gCAAe,EAAExC,SAAS,EAAEC,SAAS,EAAE,MACxD,IAAAwC,kCAAyB,EAAEhC,aAAa,EAAEwB,CAAC,EAAEG,CAAC,EAAEpC,SAAU,CAC3D,CAAC;EAED,IAAK,CAAEuC,SAAS,EAAG;IAClB,OAAO,KAAK;EACb;EAEA,MAAMG,QAAQ,GAAG,IAAAlB,8BAAqB,EAAEe,SAAU,CAAC;EAEnD,IAAK,CAAEG,QAAQ,EAAG;IACjB,OAAO,KAAK;EACb;EAEA,MAAMC,YAAY,GAAG1C,SAAS,GAAG,KAAK,GAAG,QAAQ;EACjD,MAAM2C,cAAc,GAAGf,YAAY,GAAG,MAAM,GAAG,OAAO;EACtD,MAAMgB,YAAY,GAAGH,QAAQ,CAAEC,YAAY,CAAE,GAAGlB,SAAS,CAAEkB,YAAY,CAAE;EACzE,MAAMG,cAAc,GACnBJ,QAAQ,CAAEE,cAAc,CAAE,GAAGrB,kBAAkB,CAAEqB,cAAc,CAAE;;EAElE;EACA,MAAMG,eAAe,GAAGC,IAAI,CAACC,GAAG,CAAEJ,YAAa,CAAC,IAAI,CAAC;EACrD,MAAMK,iBAAiB,GAAGF,IAAI,CAACC,GAAG,CAAEH,cAAe,CAAC,IAAI,CAAC;EAEzD,OAAO5C,YAAY,GAChB6C,eAAe,GACfA,eAAe,IAAIG,iBAAiB;AACxC"}
|
package/build/focusable.js
CHANGED
@@ -88,9 +88,7 @@ function isValidFocusableArea(element) {
|
|
88
88
|
function find(context, {
|
89
89
|
sequential = false
|
90
90
|
} = {}) {
|
91
|
-
/* eslint-disable jsdoc/no-undefined-types */
|
92
91
|
/** @type {NodeListOf<HTMLElement>} */
|
93
|
-
/* eslint-enable jsdoc/no-undefined-types */
|
94
92
|
const elements = context.querySelectorAll(buildSelector(sequential));
|
95
93
|
return Array.from(elements).filter(element => {
|
96
94
|
if (!isVisible(element)) {
|
package/build/focusable.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["buildSelector","sequential","join","isVisible","element","offsetWidth","offsetHeight","getClientRects","length","isValidFocusableArea","map","closest","img","ownerDocument","querySelector","name","find","context","elements","querySelectorAll","Array","from","filter","nodeName"],"sources":["@wordpress/dom/src/focusable.js"],"sourcesContent":["/**\n * References:\n *\n * Focusable:\n * - https://www.w3.org/TR/html5/editing.html#focus-management\n *\n * Sequential focus navigation:\n * - https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n *\n * Disabled elements:\n * - https://www.w3.org/TR/html5/disabled-elements.html#disabled-elements\n *\n * getClientRects algorithm (requiring layout box):\n * - https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface\n *\n * AREA elements associated with an IMG:\n * - https://w3c.github.io/html/editing.html#data-model\n */\n\n/**\n * Returns a CSS selector used to query for focusable elements.\n *\n * @param {boolean} sequential If set, only query elements that are sequentially\n * focusable. Non-interactive elements with a\n * negative `tabindex` are focusable but not\n * sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {string} CSS selector.\n */\nfunction buildSelector( sequential ) {\n\treturn [\n\t\tsequential ? '[tabindex]:not([tabindex^=\"-\"])' : '[tabindex]',\n\t\t'a[href]',\n\t\t'button:not([disabled])',\n\t\t'input:not([type=\"hidden\"]):not([disabled])',\n\t\t'select:not([disabled])',\n\t\t'textarea:not([disabled])',\n\t\t'iframe:not([tabindex^=\"-\"])',\n\t\t'object',\n\t\t'embed',\n\t\t'area[href]',\n\t\t'[contenteditable]:not([contenteditable=false])',\n\t].join( ',' );\n}\n\n/**\n * Returns true if the specified element is visible (i.e. neither display: none\n * nor visibility: hidden).\n *\n * @param {HTMLElement} element DOM element to test.\n *\n * @return {boolean} Whether element is visible.\n */\nfunction isVisible( element ) {\n\treturn (\n\t\telement.offsetWidth > 0 ||\n\t\telement.offsetHeight > 0 ||\n\t\telement.getClientRects().length > 0\n\t);\n}\n\n/**\n * Returns true if the specified area element is a valid focusable element, or\n * false otherwise. Area is only focusable if within a map where a named map\n * referenced by an image somewhere in the document.\n *\n * @param {HTMLAreaElement} element DOM area element to test.\n *\n * @return {boolean} Whether area element is valid for focus.\n */\nfunction isValidFocusableArea( element ) {\n\t/** @type {HTMLMapElement | null} */\n\tconst map = element.closest( 'map[name]' );\n\tif ( ! map ) {\n\t\treturn false;\n\t}\n\n\t/** @type {HTMLImageElement | null} */\n\tconst img = element.ownerDocument.querySelector(\n\t\t'img[usemap=\"#' + map.name + '\"]'\n\t);\n\treturn !! img && isVisible( img );\n}\n\n/**\n * Returns all focusable elements within a given context.\n *\n * @param {Element} context Element in which to search.\n * @param {Object} options\n * @param {boolean} [options.sequential] If set, only return elements that are\n * sequentially focusable.\n * Non-interactive elements with a\n * negative `tabindex` are focusable but\n * not sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {HTMLElement[]} Focusable elements.\n */\nexport function find( context, { sequential = false } = {} ) {\n\t
|
1
|
+
{"version":3,"names":["buildSelector","sequential","join","isVisible","element","offsetWidth","offsetHeight","getClientRects","length","isValidFocusableArea","map","closest","img","ownerDocument","querySelector","name","find","context","elements","querySelectorAll","Array","from","filter","nodeName"],"sources":["@wordpress/dom/src/focusable.js"],"sourcesContent":["/**\n * References:\n *\n * Focusable:\n * - https://www.w3.org/TR/html5/editing.html#focus-management\n *\n * Sequential focus navigation:\n * - https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n *\n * Disabled elements:\n * - https://www.w3.org/TR/html5/disabled-elements.html#disabled-elements\n *\n * getClientRects algorithm (requiring layout box):\n * - https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface\n *\n * AREA elements associated with an IMG:\n * - https://w3c.github.io/html/editing.html#data-model\n */\n\n/**\n * Returns a CSS selector used to query for focusable elements.\n *\n * @param {boolean} sequential If set, only query elements that are sequentially\n * focusable. Non-interactive elements with a\n * negative `tabindex` are focusable but not\n * sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {string} CSS selector.\n */\nfunction buildSelector( sequential ) {\n\treturn [\n\t\tsequential ? '[tabindex]:not([tabindex^=\"-\"])' : '[tabindex]',\n\t\t'a[href]',\n\t\t'button:not([disabled])',\n\t\t'input:not([type=\"hidden\"]):not([disabled])',\n\t\t'select:not([disabled])',\n\t\t'textarea:not([disabled])',\n\t\t'iframe:not([tabindex^=\"-\"])',\n\t\t'object',\n\t\t'embed',\n\t\t'area[href]',\n\t\t'[contenteditable]:not([contenteditable=false])',\n\t].join( ',' );\n}\n\n/**\n * Returns true if the specified element is visible (i.e. neither display: none\n * nor visibility: hidden).\n *\n * @param {HTMLElement} element DOM element to test.\n *\n * @return {boolean} Whether element is visible.\n */\nfunction isVisible( element ) {\n\treturn (\n\t\telement.offsetWidth > 0 ||\n\t\telement.offsetHeight > 0 ||\n\t\telement.getClientRects().length > 0\n\t);\n}\n\n/**\n * Returns true if the specified area element is a valid focusable element, or\n * false otherwise. Area is only focusable if within a map where a named map\n * referenced by an image somewhere in the document.\n *\n * @param {HTMLAreaElement} element DOM area element to test.\n *\n * @return {boolean} Whether area element is valid for focus.\n */\nfunction isValidFocusableArea( element ) {\n\t/** @type {HTMLMapElement | null} */\n\tconst map = element.closest( 'map[name]' );\n\tif ( ! map ) {\n\t\treturn false;\n\t}\n\n\t/** @type {HTMLImageElement | null} */\n\tconst img = element.ownerDocument.querySelector(\n\t\t'img[usemap=\"#' + map.name + '\"]'\n\t);\n\treturn !! img && isVisible( img );\n}\n\n/**\n * Returns all focusable elements within a given context.\n *\n * @param {Element} context Element in which to search.\n * @param {Object} options\n * @param {boolean} [options.sequential] If set, only return elements that are\n * sequentially focusable.\n * Non-interactive elements with a\n * negative `tabindex` are focusable but\n * not sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {HTMLElement[]} Focusable elements.\n */\nexport function find( context, { sequential = false } = {} ) {\n\t/** @type {NodeListOf<HTMLElement>} */\n\tconst elements = context.querySelectorAll( buildSelector( sequential ) );\n\n\treturn Array.from( elements ).filter( ( element ) => {\n\t\tif ( ! isVisible( element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst { nodeName } = element;\n\t\tif ( 'AREA' === nodeName ) {\n\t\t\treturn isValidFocusableArea(\n\t\t\t\t/** @type {HTMLAreaElement} */ ( element )\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t} );\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAaA,CAAEC,UAAU,EAAG;EACpC,OAAO,CACNA,UAAU,GAAG,iCAAiC,GAAG,YAAY,EAC7D,SAAS,EACT,wBAAwB,EACxB,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,gDAAgD,CAChD,CAACC,IAAI,CAAE,GAAI,CAAC;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,SAASA,CAAEC,OAAO,EAAG;EAC7B,OACCA,OAAO,CAACC,WAAW,GAAG,CAAC,IACvBD,OAAO,CAACE,YAAY,GAAG,CAAC,IACxBF,OAAO,CAACG,cAAc,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC;AAErC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAEL,OAAO,EAAG;EACxC;EACA,MAAMM,GAAG,GAAGN,OAAO,CAACO,OAAO,CAAE,WAAY,CAAC;EAC1C,IAAK,CAAED,GAAG,EAAG;IACZ,OAAO,KAAK;EACb;;EAEA;EACA,MAAME,GAAG,GAAGR,OAAO,CAACS,aAAa,CAACC,aAAa,CAC9C,eAAe,GAAGJ,GAAG,CAACK,IAAI,GAAG,IAC9B,CAAC;EACD,OAAO,CAAC,CAAEH,GAAG,IAAIT,SAAS,CAAES,GAAI,CAAC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,IAAIA,CAAEC,OAAO,EAAE;EAAEhB,UAAU,GAAG;AAAM,CAAC,GAAG,CAAC,CAAC,EAAG;EAC5D;EACA,MAAMiB,QAAQ,GAAGD,OAAO,CAACE,gBAAgB,CAAEnB,aAAa,CAAEC,UAAW,CAAE,CAAC;EAExE,OAAOmB,KAAK,CAACC,IAAI,CAAEH,QAAS,CAAC,CAACI,MAAM,CAAIlB,OAAO,IAAM;IACpD,IAAK,CAAED,SAAS,CAAEC,OAAQ,CAAC,EAAG;MAC7B,OAAO,KAAK;IACb;IAEA,MAAM;MAAEmB;IAAS,CAAC,GAAGnB,OAAO;IAC5B,IAAK,MAAM,KAAKmB,QAAQ,EAAG;MAC1B,OAAOd,oBAAoB,EAC1B,8BAAiCL,OAClC,CAAC;IACF;IAEA,OAAO,IAAI;EACZ,CAAE,CAAC;AACJ"}
|
package/build/tabbable.js
CHANGED
@@ -40,7 +40,7 @@ function isTabbableIndex(element) {
|
|
40
40
|
return getTabIndex(element) !== -1;
|
41
41
|
}
|
42
42
|
|
43
|
-
/** @typedef {
|
43
|
+
/** @typedef {HTMLElement & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */
|
44
44
|
|
45
45
|
/**
|
46
46
|
* Returns a stateful reducer function which constructs a filtered array of
|
@@ -91,10 +91,10 @@ function createStatefulCollapseRadioGroup() {
|
|
91
91
|
* sort where equal tabIndex should be left in order of their occurrence in the
|
92
92
|
* document.
|
93
93
|
*
|
94
|
-
* @param {
|
95
|
-
* @param {number}
|
94
|
+
* @param {HTMLElement} element Element.
|
95
|
+
* @param {number} index Array index of element.
|
96
96
|
*
|
97
|
-
* @return {{ element:
|
97
|
+
* @return {{ element: HTMLElement, index: number }} Mapped object with element, index.
|
98
98
|
*/
|
99
99
|
function mapElementToObjectTabbable(element, index) {
|
100
100
|
return {
|
@@ -107,9 +107,9 @@ function mapElementToObjectTabbable(element, index) {
|
|
107
107
|
* An array map callback, returning an element of the given mapped object's
|
108
108
|
* element value.
|
109
109
|
*
|
110
|
-
* @param {{ element:
|
110
|
+
* @param {{ element: HTMLElement }} object Mapped object with element.
|
111
111
|
*
|
112
|
-
* @return {
|
112
|
+
* @return {HTMLElement} Mapped object element.
|
113
113
|
*/
|
114
114
|
function mapObjectTabbableToElement(object) {
|
115
115
|
return object.element;
|
@@ -120,8 +120,8 @@ function mapObjectTabbableToElement(object) {
|
|
120
120
|
*
|
121
121
|
* @see mapElementToObjectTabbable
|
122
122
|
*
|
123
|
-
* @param {{ element:
|
124
|
-
* @param {{ element:
|
123
|
+
* @param {{ element: HTMLElement, index: number }} a First object to compare.
|
124
|
+
* @param {{ element: HTMLElement, index: number }} b Second object to compare.
|
125
125
|
*
|
126
126
|
* @return {number} Comparator result.
|
127
127
|
*/
|
@@ -137,9 +137,9 @@ function compareObjectTabbables(a, b) {
|
|
137
137
|
/**
|
138
138
|
* Givin focusable elements, filters out tabbable element.
|
139
139
|
*
|
140
|
-
* @param {
|
140
|
+
* @param {HTMLElement[]} focusables Focusable elements to filter.
|
141
141
|
*
|
142
|
-
* @return {
|
142
|
+
* @return {HTMLElement[]} Tabbable elements.
|
143
143
|
*/
|
144
144
|
function filterTabbable(focusables) {
|
145
145
|
return focusables.filter(isTabbableIndex).map(mapElementToObjectTabbable).sort(compareObjectTabbables).map(mapObjectTabbableToElement).reduce(createStatefulCollapseRadioGroup(), []);
|
@@ -147,7 +147,7 @@ function filterTabbable(focusables) {
|
|
147
147
|
|
148
148
|
/**
|
149
149
|
* @param {Element} context
|
150
|
-
* @return {
|
150
|
+
* @return {HTMLElement[]} Tabbable elements within the context.
|
151
151
|
*/
|
152
152
|
function find(context) {
|
153
153
|
return filterTabbable((0, _focusable.find)(context));
|
@@ -159,15 +159,12 @@ function find(context) {
|
|
159
159
|
* @param {Element} element The focusable element before which to look. Defaults
|
160
160
|
* to the active element.
|
161
161
|
*
|
162
|
-
* @return {
|
162
|
+
* @return {HTMLElement|undefined} Preceding tabbable element.
|
163
163
|
*/
|
164
164
|
function findPrevious(element) {
|
165
|
-
return filterTabbable((0, _focusable.find)(element.ownerDocument.body)).reverse().find(focusable =>
|
166
|
-
|
167
|
-
|
168
|
-
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_PRECEDING
|
169
|
-
);
|
170
|
-
});
|
165
|
+
return filterTabbable((0, _focusable.find)(element.ownerDocument.body)).reverse().find(focusable =>
|
166
|
+
// eslint-disable-next-line no-bitwise
|
167
|
+
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_PRECEDING);
|
171
168
|
}
|
172
169
|
|
173
170
|
/**
|
@@ -176,14 +173,11 @@ function findPrevious(element) {
|
|
176
173
|
* @param {Element} element The focusable element after which to look. Defaults
|
177
174
|
* to the active element.
|
178
175
|
*
|
179
|
-
* @return {
|
176
|
+
* @return {HTMLElement|undefined} Next tabbable element.
|
180
177
|
*/
|
181
178
|
function findNext(element) {
|
182
|
-
return filterTabbable((0, _focusable.find)(element.ownerDocument.body)).find(focusable =>
|
183
|
-
|
184
|
-
|
185
|
-
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_FOLLOWING
|
186
|
-
);
|
187
|
-
});
|
179
|
+
return filterTabbable((0, _focusable.find)(element.ownerDocument.body)).find(focusable =>
|
180
|
+
// eslint-disable-next-line no-bitwise
|
181
|
+
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_FOLLOWING);
|
188
182
|
}
|
189
183
|
//# sourceMappingURL=tabbable.js.map
|
package/build/tabbable.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_focusable","require","getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","find","context","findFocusable","findPrevious","ownerDocument","body","reverse","focusable","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findNext","DOCUMENT_POSITION_FOLLOWING"],"sources":["@wordpress/dom/src/tabbable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {
|
1
|
+
{"version":3,"names":["_focusable","require","getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","find","context","findFocusable","findPrevious","ownerDocument","body","reverse","focusable","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findNext","DOCUMENT_POSITION_FOLLOWING"],"sources":["@wordpress/dom/src/tabbable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {HTMLElement & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */\n\n/**\n * Returns a stateful reducer function which constructs a filtered array of\n * tabbable elements, where at most one radio input is selected for a given\n * name, giving priority to checked input, falling back to the first\n * encountered.\n *\n * @return {(acc: MaybeHTMLInputElement[], el: MaybeHTMLInputElement) => MaybeHTMLInputElement[]} Radio group collapse reducer.\n */\nfunction createStatefulCollapseRadioGroup() {\n\t/** @type {Record<string, MaybeHTMLInputElement>} */\n\tconst CHOSEN_RADIO_BY_NAME = {};\n\n\treturn function collapseRadioGroup(\n\t\t/** @type {MaybeHTMLInputElement[]} */ result,\n\t\t/** @type {MaybeHTMLInputElement} */ element\n\t) {\n\t\tconst { nodeName, type, checked, name } = element;\n\n\t\t// For all non-radio tabbables, construct to array by concatenating.\n\t\tif ( nodeName !== 'INPUT' || type !== 'radio' || ! name ) {\n\t\t\treturn result.concat( element );\n\t\t}\n\n\t\tconst hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty( name );\n\n\t\t// Omit by skipping concatenation if the radio element is not chosen.\n\t\tconst isChosen = checked || ! hasChosen;\n\t\tif ( ! isChosen ) {\n\t\t\treturn result;\n\t\t}\n\n\t\t// At this point, if there had been a chosen element, the current\n\t\t// element is checked and should take priority. Retroactively remove\n\t\t// the element which had previously been considered the chosen one.\n\t\tif ( hasChosen ) {\n\t\t\tconst hadChosenElement = CHOSEN_RADIO_BY_NAME[ name ];\n\t\t\tresult = result.filter( ( e ) => e !== hadChosenElement );\n\t\t}\n\n\t\tCHOSEN_RADIO_BY_NAME[ name ] = element;\n\n\t\treturn result.concat( element );\n\t};\n}\n\n/**\n * An array map callback, returning an object with the element value and its\n * array index location as properties. This is used to emulate a proper stable\n * sort where equal tabIndex should be left in order of their occurrence in the\n * document.\n *\n * @param {HTMLElement} element Element.\n * @param {number} index Array index of element.\n *\n * @return {{ element: HTMLElement, index: number }} Mapped object with element, index.\n */\nfunction mapElementToObjectTabbable( element, index ) {\n\treturn { element, index };\n}\n\n/**\n * An array map callback, returning an element of the given mapped object's\n * element value.\n *\n * @param {{ element: HTMLElement }} object Mapped object with element.\n *\n * @return {HTMLElement} Mapped object element.\n */\nfunction mapObjectTabbableToElement( object ) {\n\treturn object.element;\n}\n\n/**\n * A sort comparator function used in comparing two objects of mapped elements.\n *\n * @see mapElementToObjectTabbable\n *\n * @param {{ element: HTMLElement, index: number }} a First object to compare.\n * @param {{ element: HTMLElement, index: number }} b Second object to compare.\n *\n * @return {number} Comparator result.\n */\nfunction compareObjectTabbables( a, b ) {\n\tconst aTabIndex = getTabIndex( a.element );\n\tconst bTabIndex = getTabIndex( b.element );\n\n\tif ( aTabIndex === bTabIndex ) {\n\t\treturn a.index - b.index;\n\t}\n\n\treturn aTabIndex - bTabIndex;\n}\n\n/**\n * Givin focusable elements, filters out tabbable element.\n *\n * @param {HTMLElement[]} focusables Focusable elements to filter.\n *\n * @return {HTMLElement[]} Tabbable elements.\n */\nfunction filterTabbable( focusables ) {\n\treturn focusables\n\t\t.filter( isTabbableIndex )\n\t\t.map( mapElementToObjectTabbable )\n\t\t.sort( compareObjectTabbables )\n\t\t.map( mapObjectTabbableToElement )\n\t\t.reduce( createStatefulCollapseRadioGroup(), [] );\n}\n\n/**\n * @param {Element} context\n * @return {HTMLElement[]} Tabbable elements within the context.\n */\nexport function find( context ) {\n\treturn filterTabbable( findFocusable( context ) );\n}\n\n/**\n * Given a focusable element, find the preceding tabbable element.\n *\n * @param {Element} element The focusable element before which to look. Defaults\n * to the active element.\n *\n * @return {HTMLElement|undefined} Preceding tabbable element.\n */\nexport function findPrevious( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) )\n\t\t.reverse()\n\t\t.find(\n\t\t\t( focusable ) =>\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\t\telement.DOCUMENT_POSITION_PRECEDING\n\t\t);\n}\n\n/**\n * Given a focusable element, find the next tabbable element.\n *\n * @param {Element} element The focusable element after which to look. Defaults\n * to the active element.\n *\n * @return {HTMLElement|undefined} Next tabbable element.\n */\nexport function findNext( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) ).find(\n\t\t( focusable ) =>\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\telement.DOCUMENT_POSITION_FOLLOWING\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAEC,OAAO,EAAG;EAC/B,MAAMC,QAAQ,GAAGD,OAAO,CAACE,YAAY,CAAE,UAAW,CAAC;EACnD,OAAOD,QAAQ,KAAK,IAAI,GAAG,CAAC,GAAGE,QAAQ,CAAEF,QAAQ,EAAE,EAA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U,CAAC,GAC5CzC,OAAO,CAAC2C,2BACV,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,QAAQA,CAAE5C,OAAO,EAAG;EACnC,OAAO6B,cAAc,CAAE,IAAAO,eAAa,EAAEpC,OAAO,CAACsC,aAAa,CAACC,IAAK,CAAE,CAAC,CAACL,IAAI,CACtEO,SAAS;EACV;EACAzC,OAAO,CAAC0C,uBAAuB,CAAED,SAAU,CAAC,GAC5CzC,OAAO,CAAC6C,2BACV,CAAC;AACF"}
|
@@ -31,7 +31,7 @@ export default function isEdge(container, isReverse, onlyVertical = false) {
|
|
31
31
|
}
|
32
32
|
return container.value.length === container.selectionStart;
|
33
33
|
}
|
34
|
-
if (!
|
34
|
+
if (!container.isContentEditable) {
|
35
35
|
return true;
|
36
36
|
}
|
37
37
|
const {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["isRTL","getRangeHeight","getRectangleFromRange","isSelectionForward","hiddenCaretRangeFromPoint","assertIsDefined","isInputOrTextArea","scrollIfNoRange","isEdge","container","isReverse","onlyVertical","selectionStart","selectionEnd","value","length","isContentEditable","ownerDocument","defaultView","selection","getSelection","rangeCount","range","getRangeAt","collapsedRange","cloneRange","isForward","isCollapsed","collapse","collapsedRangeRect","rangeRect","rangeHeight","height","isReverseDir","containerRect","getBoundingClientRect","x","left","right","y","top","bottom","testRange","testRect","verticalSide","horizontalSide","verticalDiff","horizontalDiff","hasVerticalDiff","Math","abs","hasHorizontalDiff"],"sources":["@wordpress/dom/src/dom/is-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport isRTL from './is-rtl';\nimport getRangeHeight from './get-range-height';\nimport getRectangleFromRange from './get-rectangle-from-range';\nimport isSelectionForward from './is-selection-forward';\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Check whether the selection is at the edge of the container. Checks for\n * horizontal position by default. Set `onlyVertical` to true to check only\n * vertically.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse Set to true to check left, false to check right.\n * @param {boolean} [onlyVertical=false] Set to true to check only vertical position.\n *\n * @return {boolean} True if at the edge, false if not.\n */\nexport default function isEdge( container, isReverse, onlyVertical = false ) {\n\tif (\n\t\tisInputOrTextArea( container ) &&\n\t\ttypeof container.selectionStart === 'number'\n\t) {\n\t\tif ( container.selectionStart !== container.selectionEnd ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\treturn container.selectionStart === 0;\n\t\t}\n\n\t\treturn container.value.length === container.selectionStart;\n\t}\n\n\tif ( !
|
1
|
+
{"version":3,"names":["isRTL","getRangeHeight","getRectangleFromRange","isSelectionForward","hiddenCaretRangeFromPoint","assertIsDefined","isInputOrTextArea","scrollIfNoRange","isEdge","container","isReverse","onlyVertical","selectionStart","selectionEnd","value","length","isContentEditable","ownerDocument","defaultView","selection","getSelection","rangeCount","range","getRangeAt","collapsedRange","cloneRange","isForward","isCollapsed","collapse","collapsedRangeRect","rangeRect","rangeHeight","height","isReverseDir","containerRect","getBoundingClientRect","x","left","right","y","top","bottom","testRange","testRect","verticalSide","horizontalSide","verticalDiff","horizontalDiff","hasVerticalDiff","Math","abs","hasHorizontalDiff"],"sources":["@wordpress/dom/src/dom/is-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport isRTL from './is-rtl';\nimport getRangeHeight from './get-range-height';\nimport getRectangleFromRange from './get-rectangle-from-range';\nimport isSelectionForward from './is-selection-forward';\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Check whether the selection is at the edge of the container. Checks for\n * horizontal position by default. Set `onlyVertical` to true to check only\n * vertically.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse Set to true to check left, false to check right.\n * @param {boolean} [onlyVertical=false] Set to true to check only vertical position.\n *\n * @return {boolean} True if at the edge, false if not.\n */\nexport default function isEdge( container, isReverse, onlyVertical = false ) {\n\tif (\n\t\tisInputOrTextArea( container ) &&\n\t\ttypeof container.selectionStart === 'number'\n\t) {\n\t\tif ( container.selectionStart !== container.selectionEnd ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\treturn container.selectionStart === 0;\n\t\t}\n\n\t\treturn container.value.length === container.selectionStart;\n\t}\n\n\tif ( ! container.isContentEditable ) {\n\t\treturn true;\n\t}\n\n\tconst { ownerDocument } = container;\n\tconst { defaultView } = ownerDocument;\n\n\tassertIsDefined( defaultView, 'defaultView' );\n\tconst selection = defaultView.getSelection();\n\n\tif ( ! selection || ! selection.rangeCount ) {\n\t\treturn false;\n\t}\n\n\tconst range = selection.getRangeAt( 0 );\n\tconst collapsedRange = range.cloneRange();\n\tconst isForward = isSelectionForward( selection );\n\tconst isCollapsed = selection.isCollapsed;\n\n\t// Collapse in direction of selection.\n\tif ( ! isCollapsed ) {\n\t\tcollapsedRange.collapse( ! isForward );\n\t}\n\n\tconst collapsedRangeRect = getRectangleFromRange( collapsedRange );\n\tconst rangeRect = getRectangleFromRange( range );\n\n\tif ( ! collapsedRangeRect || ! rangeRect ) {\n\t\treturn false;\n\t}\n\n\t// Only consider the multiline selection at the edge if the direction is\n\t// towards the edge. The selection is multiline if it is taller than the\n\t// collapsed selection.\n\tconst rangeHeight = getRangeHeight( range );\n\tif (\n\t\t! isCollapsed &&\n\t\trangeHeight &&\n\t\trangeHeight > collapsedRangeRect.height &&\n\t\tisForward === isReverse\n\t) {\n\t\treturn false;\n\t}\n\n\t// In the case of RTL scripts, the horizontal edge is at the opposite side.\n\tconst isReverseDir = isRTL( container ) ? ! isReverse : isReverse;\n\tconst containerRect = container.getBoundingClientRect();\n\n\t// To check if a selection is at the edge, we insert a test selection at the\n\t// edge of the container and check if the selections have the same vertical\n\t// or horizontal position. If they do, the selection is at the edge.\n\t// This method proves to be better than a DOM-based calculation for the\n\t// horizontal edge, since it ignores empty textnodes and a trailing line\n\t// break element. In other words, we need to check visual positioning, not\n\t// DOM positioning.\n\t// It also proves better than using the computed style for the vertical\n\t// edge, because we cannot know the padding and line height reliably in\n\t// pixels. `getComputedStyle` may return a value with different units.\n\tconst x = isReverseDir ? containerRect.left + 1 : containerRect.right - 1;\n\tconst y = isReverse ? containerRect.top + 1 : containerRect.bottom - 1;\n\tconst testRange = scrollIfNoRange( container, isReverse, () =>\n\t\thiddenCaretRangeFromPoint( ownerDocument, x, y, container )\n\t);\n\n\tif ( ! testRange ) {\n\t\treturn false;\n\t}\n\n\tconst testRect = getRectangleFromRange( testRange );\n\n\tif ( ! testRect ) {\n\t\treturn false;\n\t}\n\n\tconst verticalSide = isReverse ? 'top' : 'bottom';\n\tconst horizontalSide = isReverseDir ? 'left' : 'right';\n\tconst verticalDiff = testRect[ verticalSide ] - rangeRect[ verticalSide ];\n\tconst horizontalDiff =\n\t\ttestRect[ horizontalSide ] - collapsedRangeRect[ horizontalSide ];\n\n\t// Allow the position to be 1px off.\n\tconst hasVerticalDiff = Math.abs( verticalDiff ) <= 1;\n\tconst hasHorizontalDiff = Math.abs( horizontalDiff ) <= 1;\n\n\treturn onlyVertical\n\t\t? hasVerticalDiff\n\t\t: hasVerticalDiff && hasHorizontalDiff;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,UAAU;AAC5B,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,OAAOC,iBAAiB,MAAM,yBAAyB;AACvD,SAASC,eAAe,QAAQ,sBAAsB;;AAEtD;A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;EACzE,MAAMG,cAAc,GACnBJ,QAAQ,CAAEE,cAAc,CAAE,GAAGhB,kBAAkB,CAAEgB,cAAc,CAAE;;EAElE;EACA,MAAMG,eAAe,GAAGC,IAAI,CAACC,GAAG,CAAEJ,YAAa,CAAC,IAAI,CAAC;EACrD,MAAMK,iBAAiB,GAAGF,IAAI,CAACC,GAAG,CAAEH,cAAe,CAAC,IAAI,CAAC;EAEzD,OAAOpC,YAAY,GAChBqC,eAAe,GACfA,eAAe,IAAIG,iBAAiB;AACxC"}
|
@@ -82,9 +82,7 @@ function isValidFocusableArea(element) {
|
|
82
82
|
export function find(context, {
|
83
83
|
sequential = false
|
84
84
|
} = {}) {
|
85
|
-
/* eslint-disable jsdoc/no-undefined-types */
|
86
85
|
/** @type {NodeListOf<HTMLElement>} */
|
87
|
-
/* eslint-enable jsdoc/no-undefined-types */
|
88
86
|
const elements = context.querySelectorAll(buildSelector(sequential));
|
89
87
|
return Array.from(elements).filter(element => {
|
90
88
|
if (!isVisible(element)) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["buildSelector","sequential","join","isVisible","element","offsetWidth","offsetHeight","getClientRects","length","isValidFocusableArea","map","closest","img","ownerDocument","querySelector","name","find","context","elements","querySelectorAll","Array","from","filter","nodeName"],"sources":["@wordpress/dom/src/focusable.js"],"sourcesContent":["/**\n * References:\n *\n * Focusable:\n * - https://www.w3.org/TR/html5/editing.html#focus-management\n *\n * Sequential focus navigation:\n * - https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n *\n * Disabled elements:\n * - https://www.w3.org/TR/html5/disabled-elements.html#disabled-elements\n *\n * getClientRects algorithm (requiring layout box):\n * - https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface\n *\n * AREA elements associated with an IMG:\n * - https://w3c.github.io/html/editing.html#data-model\n */\n\n/**\n * Returns a CSS selector used to query for focusable elements.\n *\n * @param {boolean} sequential If set, only query elements that are sequentially\n * focusable. Non-interactive elements with a\n * negative `tabindex` are focusable but not\n * sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {string} CSS selector.\n */\nfunction buildSelector( sequential ) {\n\treturn [\n\t\tsequential ? '[tabindex]:not([tabindex^=\"-\"])' : '[tabindex]',\n\t\t'a[href]',\n\t\t'button:not([disabled])',\n\t\t'input:not([type=\"hidden\"]):not([disabled])',\n\t\t'select:not([disabled])',\n\t\t'textarea:not([disabled])',\n\t\t'iframe:not([tabindex^=\"-\"])',\n\t\t'object',\n\t\t'embed',\n\t\t'area[href]',\n\t\t'[contenteditable]:not([contenteditable=false])',\n\t].join( ',' );\n}\n\n/**\n * Returns true if the specified element is visible (i.e. neither display: none\n * nor visibility: hidden).\n *\n * @param {HTMLElement} element DOM element to test.\n *\n * @return {boolean} Whether element is visible.\n */\nfunction isVisible( element ) {\n\treturn (\n\t\telement.offsetWidth > 0 ||\n\t\telement.offsetHeight > 0 ||\n\t\telement.getClientRects().length > 0\n\t);\n}\n\n/**\n * Returns true if the specified area element is a valid focusable element, or\n * false otherwise. Area is only focusable if within a map where a named map\n * referenced by an image somewhere in the document.\n *\n * @param {HTMLAreaElement} element DOM area element to test.\n *\n * @return {boolean} Whether area element is valid for focus.\n */\nfunction isValidFocusableArea( element ) {\n\t/** @type {HTMLMapElement | null} */\n\tconst map = element.closest( 'map[name]' );\n\tif ( ! map ) {\n\t\treturn false;\n\t}\n\n\t/** @type {HTMLImageElement | null} */\n\tconst img = element.ownerDocument.querySelector(\n\t\t'img[usemap=\"#' + map.name + '\"]'\n\t);\n\treturn !! img && isVisible( img );\n}\n\n/**\n * Returns all focusable elements within a given context.\n *\n * @param {Element} context Element in which to search.\n * @param {Object} options\n * @param {boolean} [options.sequential] If set, only return elements that are\n * sequentially focusable.\n * Non-interactive elements with a\n * negative `tabindex` are focusable but\n * not sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {HTMLElement[]} Focusable elements.\n */\nexport function find( context, { sequential = false } = {} ) {\n\t
|
1
|
+
{"version":3,"names":["buildSelector","sequential","join","isVisible","element","offsetWidth","offsetHeight","getClientRects","length","isValidFocusableArea","map","closest","img","ownerDocument","querySelector","name","find","context","elements","querySelectorAll","Array","from","filter","nodeName"],"sources":["@wordpress/dom/src/focusable.js"],"sourcesContent":["/**\n * References:\n *\n * Focusable:\n * - https://www.w3.org/TR/html5/editing.html#focus-management\n *\n * Sequential focus navigation:\n * - https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n *\n * Disabled elements:\n * - https://www.w3.org/TR/html5/disabled-elements.html#disabled-elements\n *\n * getClientRects algorithm (requiring layout box):\n * - https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface\n *\n * AREA elements associated with an IMG:\n * - https://w3c.github.io/html/editing.html#data-model\n */\n\n/**\n * Returns a CSS selector used to query for focusable elements.\n *\n * @param {boolean} sequential If set, only query elements that are sequentially\n * focusable. Non-interactive elements with a\n * negative `tabindex` are focusable but not\n * sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {string} CSS selector.\n */\nfunction buildSelector( sequential ) {\n\treturn [\n\t\tsequential ? '[tabindex]:not([tabindex^=\"-\"])' : '[tabindex]',\n\t\t'a[href]',\n\t\t'button:not([disabled])',\n\t\t'input:not([type=\"hidden\"]):not([disabled])',\n\t\t'select:not([disabled])',\n\t\t'textarea:not([disabled])',\n\t\t'iframe:not([tabindex^=\"-\"])',\n\t\t'object',\n\t\t'embed',\n\t\t'area[href]',\n\t\t'[contenteditable]:not([contenteditable=false])',\n\t].join( ',' );\n}\n\n/**\n * Returns true if the specified element is visible (i.e. neither display: none\n * nor visibility: hidden).\n *\n * @param {HTMLElement} element DOM element to test.\n *\n * @return {boolean} Whether element is visible.\n */\nfunction isVisible( element ) {\n\treturn (\n\t\telement.offsetWidth > 0 ||\n\t\telement.offsetHeight > 0 ||\n\t\telement.getClientRects().length > 0\n\t);\n}\n\n/**\n * Returns true if the specified area element is a valid focusable element, or\n * false otherwise. Area is only focusable if within a map where a named map\n * referenced by an image somewhere in the document.\n *\n * @param {HTMLAreaElement} element DOM area element to test.\n *\n * @return {boolean} Whether area element is valid for focus.\n */\nfunction isValidFocusableArea( element ) {\n\t/** @type {HTMLMapElement | null} */\n\tconst map = element.closest( 'map[name]' );\n\tif ( ! map ) {\n\t\treturn false;\n\t}\n\n\t/** @type {HTMLImageElement | null} */\n\tconst img = element.ownerDocument.querySelector(\n\t\t'img[usemap=\"#' + map.name + '\"]'\n\t);\n\treturn !! img && isVisible( img );\n}\n\n/**\n * Returns all focusable elements within a given context.\n *\n * @param {Element} context Element in which to search.\n * @param {Object} options\n * @param {boolean} [options.sequential] If set, only return elements that are\n * sequentially focusable.\n * Non-interactive elements with a\n * negative `tabindex` are focusable but\n * not sequentially focusable.\n * https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute\n *\n * @return {HTMLElement[]} Focusable elements.\n */\nexport function find( context, { sequential = false } = {} ) {\n\t/** @type {NodeListOf<HTMLElement>} */\n\tconst elements = context.querySelectorAll( buildSelector( sequential ) );\n\n\treturn Array.from( elements ).filter( ( element ) => {\n\t\tif ( ! isVisible( element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst { nodeName } = element;\n\t\tif ( 'AREA' === nodeName ) {\n\t\t\treturn isValidFocusableArea(\n\t\t\t\t/** @type {HTMLAreaElement} */ ( element )\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAaA,CAAEC,UAAU,EAAG;EACpC,OAAO,CACNA,UAAU,GAAG,iCAAiC,GAAG,YAAY,EAC7D,SAAS,EACT,wBAAwB,EACxB,4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O;IAC5B,IAAK,MAAM,KAAKmB,QAAQ,EAAG;MAC1B,OAAOd,oBAAoB,EAC1B,8BAAiCL,OAClC,CAAC;IACF;IAEA,OAAO,IAAI;EACZ,CAAE,CAAC;AACJ"}
|
package/build-module/tabbable.js
CHANGED
@@ -31,7 +31,7 @@ export function isTabbableIndex(element) {
|
|
31
31
|
return getTabIndex(element) !== -1;
|
32
32
|
}
|
33
33
|
|
34
|
-
/** @typedef {
|
34
|
+
/** @typedef {HTMLElement & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */
|
35
35
|
|
36
36
|
/**
|
37
37
|
* Returns a stateful reducer function which constructs a filtered array of
|
@@ -82,10 +82,10 @@ function createStatefulCollapseRadioGroup() {
|
|
82
82
|
* sort where equal tabIndex should be left in order of their occurrence in the
|
83
83
|
* document.
|
84
84
|
*
|
85
|
-
* @param {
|
86
|
-
* @param {number}
|
85
|
+
* @param {HTMLElement} element Element.
|
86
|
+
* @param {number} index Array index of element.
|
87
87
|
*
|
88
|
-
* @return {{ element:
|
88
|
+
* @return {{ element: HTMLElement, index: number }} Mapped object with element, index.
|
89
89
|
*/
|
90
90
|
function mapElementToObjectTabbable(element, index) {
|
91
91
|
return {
|
@@ -98,9 +98,9 @@ function mapElementToObjectTabbable(element, index) {
|
|
98
98
|
* An array map callback, returning an element of the given mapped object's
|
99
99
|
* element value.
|
100
100
|
*
|
101
|
-
* @param {{ element:
|
101
|
+
* @param {{ element: HTMLElement }} object Mapped object with element.
|
102
102
|
*
|
103
|
-
* @return {
|
103
|
+
* @return {HTMLElement} Mapped object element.
|
104
104
|
*/
|
105
105
|
function mapObjectTabbableToElement(object) {
|
106
106
|
return object.element;
|
@@ -111,8 +111,8 @@ function mapObjectTabbableToElement(object) {
|
|
111
111
|
*
|
112
112
|
* @see mapElementToObjectTabbable
|
113
113
|
*
|
114
|
-
* @param {{ element:
|
115
|
-
* @param {{ element:
|
114
|
+
* @param {{ element: HTMLElement, index: number }} a First object to compare.
|
115
|
+
* @param {{ element: HTMLElement, index: number }} b Second object to compare.
|
116
116
|
*
|
117
117
|
* @return {number} Comparator result.
|
118
118
|
*/
|
@@ -128,9 +128,9 @@ function compareObjectTabbables(a, b) {
|
|
128
128
|
/**
|
129
129
|
* Givin focusable elements, filters out tabbable element.
|
130
130
|
*
|
131
|
-
* @param {
|
131
|
+
* @param {HTMLElement[]} focusables Focusable elements to filter.
|
132
132
|
*
|
133
|
-
* @return {
|
133
|
+
* @return {HTMLElement[]} Tabbable elements.
|
134
134
|
*/
|
135
135
|
function filterTabbable(focusables) {
|
136
136
|
return focusables.filter(isTabbableIndex).map(mapElementToObjectTabbable).sort(compareObjectTabbables).map(mapObjectTabbableToElement).reduce(createStatefulCollapseRadioGroup(), []);
|
@@ -138,7 +138,7 @@ function filterTabbable(focusables) {
|
|
138
138
|
|
139
139
|
/**
|
140
140
|
* @param {Element} context
|
141
|
-
* @return {
|
141
|
+
* @return {HTMLElement[]} Tabbable elements within the context.
|
142
142
|
*/
|
143
143
|
export function find(context) {
|
144
144
|
return filterTabbable(findFocusable(context));
|
@@ -150,15 +150,12 @@ export function find(context) {
|
|
150
150
|
* @param {Element} element The focusable element before which to look. Defaults
|
151
151
|
* to the active element.
|
152
152
|
*
|
153
|
-
* @return {
|
153
|
+
* @return {HTMLElement|undefined} Preceding tabbable element.
|
154
154
|
*/
|
155
155
|
export function findPrevious(element) {
|
156
|
-
return filterTabbable(findFocusable(element.ownerDocument.body)).reverse().find(focusable =>
|
157
|
-
|
158
|
-
|
159
|
-
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_PRECEDING
|
160
|
-
);
|
161
|
-
});
|
156
|
+
return filterTabbable(findFocusable(element.ownerDocument.body)).reverse().find(focusable =>
|
157
|
+
// eslint-disable-next-line no-bitwise
|
158
|
+
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_PRECEDING);
|
162
159
|
}
|
163
160
|
|
164
161
|
/**
|
@@ -167,14 +164,11 @@ export function findPrevious(element) {
|
|
167
164
|
* @param {Element} element The focusable element after which to look. Defaults
|
168
165
|
* to the active element.
|
169
166
|
*
|
170
|
-
* @return {
|
167
|
+
* @return {HTMLElement|undefined} Next tabbable element.
|
171
168
|
*/
|
172
169
|
export function findNext(element) {
|
173
|
-
return filterTabbable(findFocusable(element.ownerDocument.body)).find(focusable =>
|
174
|
-
|
175
|
-
|
176
|
-
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_FOLLOWING
|
177
|
-
);
|
178
|
-
});
|
170
|
+
return filterTabbable(findFocusable(element.ownerDocument.body)).find(focusable =>
|
171
|
+
// eslint-disable-next-line no-bitwise
|
172
|
+
element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_FOLLOWING);
|
179
173
|
}
|
180
174
|
//# sourceMappingURL=tabbable.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["find","findFocusable","getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","context","findPrevious","ownerDocument","body","reverse","focusable","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findNext","DOCUMENT_POSITION_FOLLOWING"],"sources":["@wordpress/dom/src/tabbable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {
|
1
|
+
{"version":3,"names":["find","findFocusable","getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","context","findPrevious","ownerDocument","body","reverse","focusable","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findNext","DOCUMENT_POSITION_FOLLOWING"],"sources":["@wordpress/dom/src/tabbable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {HTMLElement & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */\n\n/**\n * Returns a stateful reducer function which constructs a filtered array of\n * tabbable elements, where at most one radio input is selected for a given\n * name, giving priority to checked input, falling back to the first\n * encountered.\n *\n * @return {(acc: MaybeHTMLInputElement[], el: MaybeHTMLInputElement) => MaybeHTMLInputElement[]} Radio group collapse reducer.\n */\nfunction createStatefulCollapseRadioGroup() {\n\t/** @type {Record<string, MaybeHTMLInputElement>} */\n\tconst CHOSEN_RADIO_BY_NAME = {};\n\n\treturn function collapseRadioGroup(\n\t\t/** @type {MaybeHTMLInputElement[]} */ result,\n\t\t/** @type {MaybeHTMLInputElement} */ element\n\t) {\n\t\tconst { nodeName, type, checked, name } = element;\n\n\t\t// For all non-radio tabbables, construct to array by concatenating.\n\t\tif ( nodeName !== 'INPUT' || type !== 'radio' || ! name ) {\n\t\t\treturn result.concat( element );\n\t\t}\n\n\t\tconst hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty( name );\n\n\t\t// Omit by skipping concatenation if the radio element is not chosen.\n\t\tconst isChosen = checked || ! hasChosen;\n\t\tif ( ! isChosen ) {\n\t\t\treturn result;\n\t\t}\n\n\t\t// At this point, if there had been a chosen element, the current\n\t\t// element is checked and should take priority. Retroactively remove\n\t\t// the element which had previously been considered the chosen one.\n\t\tif ( hasChosen ) {\n\t\t\tconst hadChosenElement = CHOSEN_RADIO_BY_NAME[ name ];\n\t\t\tresult = result.filter( ( e ) => e !== hadChosenElement );\n\t\t}\n\n\t\tCHOSEN_RADIO_BY_NAME[ name ] = element;\n\n\t\treturn result.concat( element );\n\t};\n}\n\n/**\n * An array map callback, returning an object with the element value and its\n * array index location as properties. This is used to emulate a proper stable\n * sort where equal tabIndex should be left in order of their occurrence in the\n * document.\n *\n * @param {HTMLElement} element Element.\n * @param {number} index Array index of element.\n *\n * @return {{ element: HTMLElement, index: number }} Mapped object with element, index.\n */\nfunction mapElementToObjectTabbable( element, index ) {\n\treturn { element, index };\n}\n\n/**\n * An array map callback, returning an element of the given mapped object's\n * element value.\n *\n * @param {{ element: HTMLElement }} object Mapped object with element.\n *\n * @return {HTMLElement} Mapped object element.\n */\nfunction mapObjectTabbableToElement( object ) {\n\treturn object.element;\n}\n\n/**\n * A sort comparator function used in comparing two objects of mapped elements.\n *\n * @see mapElementToObjectTabbable\n *\n * @param {{ element: HTMLElement, index: number }} a First object to compare.\n * @param {{ element: HTMLElement, index: number }} b Second object to compare.\n *\n * @return {number} Comparator result.\n */\nfunction compareObjectTabbables( a, b ) {\n\tconst aTabIndex = getTabIndex( a.element );\n\tconst bTabIndex = getTabIndex( b.element );\n\n\tif ( aTabIndex === bTabIndex ) {\n\t\treturn a.index - b.index;\n\t}\n\n\treturn aTabIndex - bTabIndex;\n}\n\n/**\n * Givin focusable elements, filters out tabbable element.\n *\n * @param {HTMLElement[]} focusables Focusable elements to filter.\n *\n * @return {HTMLElement[]} Tabbable elements.\n */\nfunction filterTabbable( focusables ) {\n\treturn focusables\n\t\t.filter( isTabbableIndex )\n\t\t.map( mapElementToObjectTabbable )\n\t\t.sort( compareObjectTabbables )\n\t\t.map( mapObjectTabbableToElement )\n\t\t.reduce( createStatefulCollapseRadioGroup(), [] );\n}\n\n/**\n * @param {Element} context\n * @return {HTMLElement[]} Tabbable elements within the context.\n */\nexport function find( context ) {\n\treturn filterTabbable( findFocusable( context ) );\n}\n\n/**\n * Given a focusable element, find the preceding tabbable element.\n *\n * @param {Element} element The focusable element before which to look. Defaults\n * to the active element.\n *\n * @return {HTMLElement|undefined} Preceding tabbable element.\n */\nexport function findPrevious( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) )\n\t\t.reverse()\n\t\t.find(\n\t\t\t( focusable ) =>\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\t\telement.DOCUMENT_POSITION_PRECEDING\n\t\t);\n}\n\n/**\n * Given a focusable element, find the next tabbable element.\n *\n * @param {Element} element The focusable element after which to look. Defaults\n * to the active element.\n *\n * @return {HTMLElement|undefined} Next tabbable element.\n */\nexport function findNext( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) ).find(\n\t\t( focusable ) =>\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\telement.DOCUMENT_POSITION_FOLLOWING\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,IAAIC,aAAa,QAAQ,aAAa;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAEC,OAAO,EAAG;EAC/B,MAAMC,QAAQ,GAAGD,OAAO,CAACE,YAAY,CAAE,UAAW,CAAC;EACnD,OAAOD,QAAQ,KAAK,IAAI,GAAG,CAAC,GAAGE,QAAQ,CAAEF,QAAQ,EAAE,EAAG,CAAC;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,eAAeA,CAAEJ,OAAO,EAAG;EAC1C,OAAOD,WAAW,CAAEC,OAAQ,CAAC,KAAK,CAAC,CAAC;AACrC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,gCAAgCA,CAAA,EAAG;EAC3C;EACA,MAAMC,oBAAoB,GAAG,CAAC,CAAC;EAE/B,OAAO,SAASC,kBAAkBA,CAAA,CACjC,sCAAuCC,MAAM,EAC7C,oCAAqCR,OAAO,EAC3C;IACD,MAAM;MAAES,QAAQ;MAAEC,IAAI;MAAEC,OAAO;MAAEC;IAAK,CAAC,GAAGZ,OAAO;;IAEjD;IACA,IAAKS,QAAQ,KAAK,OAAO,IAAIC,IAAI,KAAK,OAAO,IAAI,CAAEE,IAAI,EAAG;MACzD,OAAOJ,MAAM,CAACK,MAAM,CAAEb,OAAQ,CAAC;IAChC;IAEA,MAAMc,SAAS,GAAGR,oBAAoB,CAACS,cAAc,CAAEH,IAAK,CAAC;;IAE7D;IACA,MAAMI,QAAQ,GAAGL,OAAO,IAAI,CAAEG,SAAS;IACvC,IAAK,CAAEE,QAAQ,EAAG;MACjB,OAAOR,MA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CW,MAAM,CAAE5B,gCAAgC,CAAC,CAAC,EAAE,EAAG,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASR,IAAIA,CAAEqC,OAAO,EAAG;EAC/B,OAAOL,cAAc,CAAE/B,aAAa,CAAEoC,OAAQ,CAAE,CAAC;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAEnC,OAAO,EAAG;EACvC,OAAO6B,cAAc,CAAE/B,aAAa,CAAEE,OAAO,CAACoC,aAAa,CAACC,IAAK,CAAE,CAAC,CAClEC,OAAO,CAAC,CAAC,CACTzC,IAAI,CACF0C,SAAS;EACV;EACAvC,OAAO,CAACwC,uBAAuB,CAAED,SAAU,CAAC,GAC5CvC,OAAO,CAACyC,2BACV,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAAE1C,OAAO,EAAG;EACnC,OAAO6B,cAAc,CAAE/B,aAAa,CAAEE,OAAO,CAACoC,aAAa,CAACC,IAAK,CAAE,CAAC,CAACxC,IAAI,CACtE0C,SAAS;EACV;EACAvC,OAAO,CAACwC,uBAAuB,CAAED,SAAU,CAAC,GAC5CvC,OAAO,CAAC2C,2BACV,CAAC;AACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"focusable.d.ts","sourceRoot":"","sources":["../src/focusable.js"],"names":[],"mappings":"AAqFA;;;;;;;;;;;;;GAaG;AACH,8BAXW,OAAO;IAEW,UAAU;IAO3B,WAAW,EAAE,
|
1
|
+
{"version":3,"file":"focusable.d.ts","sourceRoot":"","sources":["../src/focusable.js"],"names":[],"mappings":"AAqFA;;;;;;;;;;;;;GAaG;AACH,8BAXW,OAAO;IAEW,UAAU;IAO3B,WAAW,EAAE,CAoBxB"}
|
@@ -8,28 +8,28 @@
|
|
8
8
|
export function isTabbableIndex(element: Element): boolean;
|
9
9
|
/**
|
10
10
|
* @param {Element} context
|
11
|
-
* @return {
|
11
|
+
* @return {HTMLElement[]} Tabbable elements within the context.
|
12
12
|
*/
|
13
|
-
export function find(context: Element):
|
13
|
+
export function find(context: Element): HTMLElement[];
|
14
14
|
/**
|
15
15
|
* Given a focusable element, find the preceding tabbable element.
|
16
16
|
*
|
17
17
|
* @param {Element} element The focusable element before which to look. Defaults
|
18
18
|
* to the active element.
|
19
19
|
*
|
20
|
-
* @return {
|
20
|
+
* @return {HTMLElement|undefined} Preceding tabbable element.
|
21
21
|
*/
|
22
|
-
export function findPrevious(element: Element):
|
22
|
+
export function findPrevious(element: Element): HTMLElement | undefined;
|
23
23
|
/**
|
24
24
|
* Given a focusable element, find the next tabbable element.
|
25
25
|
*
|
26
26
|
* @param {Element} element The focusable element after which to look. Defaults
|
27
27
|
* to the active element.
|
28
28
|
*
|
29
|
-
* @return {
|
29
|
+
* @return {HTMLElement|undefined} Next tabbable element.
|
30
30
|
*/
|
31
|
-
export function findNext(element: Element):
|
32
|
-
export type MaybeHTMLInputElement =
|
31
|
+
export function findNext(element: Element): HTMLElement | undefined;
|
32
|
+
export type MaybeHTMLInputElement = HTMLElement & {
|
33
33
|
type?: string;
|
34
34
|
checked?: boolean;
|
35
35
|
name?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tabbable.d.ts","sourceRoot":"","sources":["../src/tabbable.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,yCAJW,OAAO,GAEN,OAAO,CAIlB;AAiHD;;;GAGG;AACH,8BAHW,OAAO,GACN,
|
1
|
+
{"version":3,"file":"tabbable.d.ts","sourceRoot":"","sources":["../src/tabbable.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,yCAJW,OAAO,GAEN,OAAO,CAIlB;AAiHD;;;GAGG;AACH,8BAHW,OAAO,GACN,WAAW,EAAE,CAIxB;AAED;;;;;;;GAOG;AACH,sCALW,OAAO,GAGN,WAAW,GAAC,SAAS,CAWhC;AAED;;;;;;;GAOG;AACH,kCALW,OAAO,GAGN,WAAW,GAAC,SAAS,CAShC;oCAzJa,WAAW,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/dom",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.55.0",
|
4
4
|
"description": "DOM utilities module for WordPress.",
|
5
5
|
"author": "The WordPress Contributors",
|
6
6
|
"license": "GPL-2.0-or-later",
|
@@ -29,10 +29,10 @@
|
|
29
29
|
"sideEffects": false,
|
30
30
|
"dependencies": {
|
31
31
|
"@babel/runtime": "^7.16.0",
|
32
|
-
"@wordpress/deprecated": "^3.
|
32
|
+
"@wordpress/deprecated": "^3.55.0"
|
33
33
|
},
|
34
34
|
"publishConfig": {
|
35
35
|
"access": "public"
|
36
36
|
},
|
37
|
-
"gitHead": "
|
37
|
+
"gitHead": "ac2b13783c28f959770cf029a797a712f59e1958"
|
38
38
|
}
|
package/src/dom/is-edge.js
CHANGED
@@ -37,7 +37,7 @@ export default function isEdge( container, isReverse, onlyVertical = false ) {
|
|
37
37
|
return container.value.length === container.selectionStart;
|
38
38
|
}
|
39
39
|
|
40
|
-
if ( !
|
40
|
+
if ( ! container.isContentEditable ) {
|
41
41
|
return true;
|
42
42
|
}
|
43
43
|
|
package/src/focusable.js
CHANGED
@@ -98,9 +98,7 @@ function isValidFocusableArea( element ) {
|
|
98
98
|
* @return {HTMLElement[]} Focusable elements.
|
99
99
|
*/
|
100
100
|
export function find( context, { sequential = false } = {} ) {
|
101
|
-
/* eslint-disable jsdoc/no-undefined-types */
|
102
101
|
/** @type {NodeListOf<HTMLElement>} */
|
103
|
-
/* eslint-enable jsdoc/no-undefined-types */
|
104
102
|
const elements = context.querySelectorAll( buildSelector( sequential ) );
|
105
103
|
|
106
104
|
return Array.from( elements ).filter( ( element ) => {
|
package/src/tabbable.js
CHANGED
@@ -31,7 +31,7 @@ export function isTabbableIndex( element ) {
|
|
31
31
|
return getTabIndex( element ) !== -1;
|
32
32
|
}
|
33
33
|
|
34
|
-
/** @typedef {
|
34
|
+
/** @typedef {HTMLElement & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */
|
35
35
|
|
36
36
|
/**
|
37
37
|
* Returns a stateful reducer function which constructs a filtered array of
|
@@ -84,10 +84,10 @@ function createStatefulCollapseRadioGroup() {
|
|
84
84
|
* sort where equal tabIndex should be left in order of their occurrence in the
|
85
85
|
* document.
|
86
86
|
*
|
87
|
-
* @param {
|
88
|
-
* @param {number}
|
87
|
+
* @param {HTMLElement} element Element.
|
88
|
+
* @param {number} index Array index of element.
|
89
89
|
*
|
90
|
-
* @return {{ element:
|
90
|
+
* @return {{ element: HTMLElement, index: number }} Mapped object with element, index.
|
91
91
|
*/
|
92
92
|
function mapElementToObjectTabbable( element, index ) {
|
93
93
|
return { element, index };
|
@@ -97,9 +97,9 @@ function mapElementToObjectTabbable( element, index ) {
|
|
97
97
|
* An array map callback, returning an element of the given mapped object's
|
98
98
|
* element value.
|
99
99
|
*
|
100
|
-
* @param {{ element:
|
100
|
+
* @param {{ element: HTMLElement }} object Mapped object with element.
|
101
101
|
*
|
102
|
-
* @return {
|
102
|
+
* @return {HTMLElement} Mapped object element.
|
103
103
|
*/
|
104
104
|
function mapObjectTabbableToElement( object ) {
|
105
105
|
return object.element;
|
@@ -110,8 +110,8 @@ function mapObjectTabbableToElement( object ) {
|
|
110
110
|
*
|
111
111
|
* @see mapElementToObjectTabbable
|
112
112
|
*
|
113
|
-
* @param {{ element:
|
114
|
-
* @param {{ element:
|
113
|
+
* @param {{ element: HTMLElement, index: number }} a First object to compare.
|
114
|
+
* @param {{ element: HTMLElement, index: number }} b Second object to compare.
|
115
115
|
*
|
116
116
|
* @return {number} Comparator result.
|
117
117
|
*/
|
@@ -129,9 +129,9 @@ function compareObjectTabbables( a, b ) {
|
|
129
129
|
/**
|
130
130
|
* Givin focusable elements, filters out tabbable element.
|
131
131
|
*
|
132
|
-
* @param {
|
132
|
+
* @param {HTMLElement[]} focusables Focusable elements to filter.
|
133
133
|
*
|
134
|
-
* @return {
|
134
|
+
* @return {HTMLElement[]} Tabbable elements.
|
135
135
|
*/
|
136
136
|
function filterTabbable( focusables ) {
|
137
137
|
return focusables
|
@@ -144,7 +144,7 @@ function filterTabbable( focusables ) {
|
|
144
144
|
|
145
145
|
/**
|
146
146
|
* @param {Element} context
|
147
|
-
* @return {
|
147
|
+
* @return {HTMLElement[]} Tabbable elements within the context.
|
148
148
|
*/
|
149
149
|
export function find( context ) {
|
150
150
|
return filterTabbable( findFocusable( context ) );
|
@@ -156,18 +156,17 @@ export function find( context ) {
|
|
156
156
|
* @param {Element} element The focusable element before which to look. Defaults
|
157
157
|
* to the active element.
|
158
158
|
*
|
159
|
-
* @return {
|
159
|
+
* @return {HTMLElement|undefined} Preceding tabbable element.
|
160
160
|
*/
|
161
161
|
export function findPrevious( element ) {
|
162
162
|
return filterTabbable( findFocusable( element.ownerDocument.body ) )
|
163
163
|
.reverse()
|
164
|
-
.find(
|
165
|
-
|
164
|
+
.find(
|
165
|
+
( focusable ) =>
|
166
166
|
// eslint-disable-next-line no-bitwise
|
167
167
|
element.compareDocumentPosition( focusable ) &
|
168
168
|
element.DOCUMENT_POSITION_PRECEDING
|
169
|
-
|
170
|
-
} );
|
169
|
+
);
|
171
170
|
}
|
172
171
|
|
173
172
|
/**
|
@@ -176,16 +175,13 @@ export function findPrevious( element ) {
|
|
176
175
|
* @param {Element} element The focusable element after which to look. Defaults
|
177
176
|
* to the active element.
|
178
177
|
*
|
179
|
-
* @return {
|
178
|
+
* @return {HTMLElement|undefined} Next tabbable element.
|
180
179
|
*/
|
181
180
|
export function findNext( element ) {
|
182
181
|
return filterTabbable( findFocusable( element.ownerDocument.body ) ).find(
|
183
|
-
( focusable ) =>
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
element.DOCUMENT_POSITION_FOLLOWING
|
188
|
-
);
|
189
|
-
}
|
182
|
+
( focusable ) =>
|
183
|
+
// eslint-disable-next-line no-bitwise
|
184
|
+
element.compareDocumentPosition( focusable ) &
|
185
|
+
element.DOCUMENT_POSITION_FOLLOWING
|
190
186
|
);
|
191
187
|
}
|
package/tsconfig.tsbuildinfo
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","./src/data-transfer.js","./src/focusable.js","./src/tabbable.js","./src/utils/assert-is-defined.ts","./src/dom/get-rectangle-from-range.js","./src/dom/compute-caret-rect.js","./src/dom/document-has-text-selection.js","./src/dom/is-html-input-element.js","./src/dom/is-text-field.js","./src/dom/input-field-has-uncollapsed-selection.js","./src/dom/document-has-uncollapsed-selection.js","./src/dom/document-has-selection.js","./src/dom/get-computed-style.js","./src/dom/get-scroll-container.js","./src/dom/get-offset-parent.js","./src/dom/is-input-or-text-area.js","./src/dom/is-entirely-selected.js","./src/dom/is-form-element.js","./src/dom/is-rtl.js","./src/dom/get-range-height.js","./src/dom/is-selection-forward.js","./src/dom/caret-range-from-point.js","./src/dom/hidden-caret-range-from-point.js","./src/dom/scroll-if-no-range.js","./src/dom/is-edge.js","./src/dom/is-horizontal-edge.js","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/dom/is-number-input.js","./src/dom/is-vertical-edge.js","./src/dom/place-caret-at-edge.js","./src/dom/place-caret-at-horizontal-edge.js","./src/dom/place-caret-at-vertical-edge.js","./src/dom/insert-after.js","./src/dom/remove.js","./src/dom/replace.js","./src/dom/unwrap.js","./src/dom/replace-tag.js","./src/dom/wrap.js","./src/dom/safe-html.js","./src/dom/strip-html.js","./src/dom/is-empty.js","./src/phrasing-content.js","./src/dom/is-element.js","./src/dom/clean-node-list.js","./src/dom/remove-invalid-html.js","./src/dom/index.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"80d2e2a2e1685c82cba3c320f5d077376fadff77fe1f52a4c29f995bdc40ea70","signature":"cccc56d5be56aefb6a65bb2d27dede6fab002419984d46dd8b0ed11f408ed972"},{"version":"c84de8e8762e5b6517b16f0eecaead49ee930e4cb441d5f7246ac52349d3b969","signature":"76440ec58b976c2e975139c5b67a9ce7249189c8324dc4675923570314720c44"},{"version":"2f84d4e9df1a03b75f60e69b02d021f2f63704f50a35e0f2bde516743763ad60","signature":"bee5b666813373c1e599b8223bdc4fe62609988a514e0793bf0cf263258bd70b"},{"version":"a7836408f857cb8855443e0ff79d3ed7027415dca85f312c5f9f47daa6cd355d","signature":"427ee9647c5a9082fcc0b808ba059f959fb06904703ab64801dd1a3309aaddfe"},{"version":"1afbeaa1f610339fb0357990a56dcd425c464fd99042b5ec804b1d049de93da5","signature":"2b9a80ad6b2c9899c48146638854914c517eaa4b03d1da735949f038c3f68ca0"},{"version":"99546def4f9cd760e5ee13c0cce45c83aaa3d5474d75cef79c34b1990a808022","signature":"4b9d249b7c9f8418d9bc3ab4cde84f55f4bf046335db8ff3b81a278944fe3ed2"},{"version":"1caa056d021a35691778948dcb48eb6f7550110ea33c0d14c03f0445daa93559","signature":"e72b2bb70a4d9a82306da71d399dcf1a5e80d9e3ebcf59b0fa83b217b9a5f428"},{"version":"4fcfb368b1ba498dab2fd60a1c680c137aacc6df49d8e0e802c9de00f0e047f0","signature":"65486196570af3441b98be062d367ce68cf1aa17154258220468931ec50f4023"},{"version":"c16b538f18087f31e1b99251169cd93e8d7a1ba8dde51768978f4bde67f318ac","signature":"bc8a4e85be3fdf875aabdd8d2ca17eb785972050808bd795c173e532a7aac79c"},{"version":"f329cdfc6aa9467443275d35b330b78fccfe85ff28d1a54e415143645c294ed9","signature":"9ca49cc2c04cf7454383091f3e0d7d8b56bf470f9f0041193aedb08068652ed1"},{"version":"9c32c48fe5fb3b9929609bbd1d7233ed1fc13ac7aaee602b8dd27a0a90baf9cf","signature":"c6952de66e05d6b17f86e48f4c891f1bfb181707b382f8a1c5b7ae57cb56281d"},{"version":"9816eb62d7014f570356c988308e390770fea83993d6eae79788cd79a31ea6dc","signature":"c7e465ccc49c73ed7fc13097fe714e0839083efe7293a73b1dd86184079eecec"},{"version":"dea4257186ad318062499e0aff7122433b1081b7883e95ef78d9b4121fc8e7da","signature":"2c6071a3367c80ae3ad748021b3b29f28d71b2aa12796a618d5a16e7f1fd5c04"},{"version":"bd40af49830b5f090dfcd1940035969a710df6305f223e9297a8667e0ae0ffed","signature":"b3cad4b66b48560eb79b276c2013bef744d530f84fec04e169ec33dd9bf01c35"},{"version":"f5b932cd4c47954ecb9c5010d848afe821486d5785a3c1c81e670146f4245688","signature":"1e95ca15e810ae4867f8639d8c49d3840c0f6a5ae8c4abfa0174be803a67cfcf"},{"version":"4d31f8f7e9d8a43d2fd3c5a378e390080706392dd4d1541fc6b6f876ed961cf4","signature":"9e9cc36373587f235a2e4c952b6bbf2f7effe42dbe0a7f188aaf42990345901f"},{"version":"756cc95fd142eb928ba7bd366cc2756a902d8a1219182a45a2820e86702b1f3e","signature":"a02177379b2fbf723210e7eca2454b38a8a430165eaa6560a560f7e803c04a38"},{"version":"c6d152163c07dc49df635b774cbc479cad88b467f924f3141a28f5a378ec4a36","signature":"45d291fca62fcc1ace9499ef71a7b37a2ffbe437ea6f176faaf22e461fb194bc"},{"version":"4312fd698114e973469529ec29680789e8ce13ffddcf711a8660c85e522b4069","signature":"a280e9e4bc79c5d5fe000c17409673106ad971e18cf357d3bf8c1896031653a8"},{"version":"cb412dab570deef76d26e0c5759e3fbe12625947ac6a82037573c788b7a2d1a4","signature":"9a5b9009d073d51620d5d37185cb3baa65c8efd219b1293b764cb52adce512c3"},{"version":"59fbe797b38f7f549100d38fc9a4c6cd0f4b990407700f5e1979a54c9d8e3ed6","signature":"d2fc8442cba54a7d9981be7ec77ce1a9442bd8c858162f455d702776cd2804d8"},{"version":"e8be8e4d18f330bdd294cdbe7d3c4a89e8dca65585284745a25c515ecb69249f","signature":"42a811ef926623b9091c4efd78f7d9c1375a58641bb466770ab8d51cf30912e8"},{"version":"8b692a361fc9f2d4102106f168b35cf6f30c9efc66050108001955a1a59b4fd2","signature":"9debb575c0fb083c696fe76fed6b933ad4f5c6fb591e332228d5feec857522f9"},{"version":"674cebb58a019bb257d71349493297efe8dce5cfffcfe113ade29efcc2d4cb95","signature":"b4726ffc8f8db298ecbe2d1599d36fa0203e47c2fa86eeb6a14f65a7c0fab4e4"},{"version":"0270d02418e4cda20d2bba7a8803f3435788faf7435e338fdc349d0b05819c01","signature":"f08b8296d0d4f1840ca35ba232ec82b51681d1d403c5c8482a2b9d9182dfb099"},{"version":"204f9aa3215a308c4e0e681acfecfb48c96c67b90247bce788beb36e70a24ecc","signature":"6c3693f28bbf6fb06ceab50425d93a6f352b143ee6c441379403addca32ac492"},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","111864872d90aef86668951ee1765f09e9def8de81160a1ddc3312f2766989ab",{"version":"905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","signature":"e4956b273081c74d1dba8d2f28889922c7feec072e6c7b789d23d385438ee87a"},{"version":"1e487793844c72bdfeeb7dd199e346c991122b1e00701c2c2494de5c5b9a14cb","signature":"dcc847cd5a1a58bc949d80d8686d8136f9de019c4cb232b24b43c8c6bbc93cf5"},{"version":"73745f3b192a256b498ac47e62b23e6b9272d11ce49ab0df686ed6a664eef3ca","signature":"aca230e89b418c782369f8cbfb9de156b977037b3d6c800a28d47984451f6759"},{"version":"609b8944af1aa9b73959c0bd766370986176a197c16c27e365e867a0bc85eed8","signature":"7e3b07bc511efd17b152e0774bc75fdf58a0ec6dc9cbc0d9a5ec524b32d8597c"},{"version":"2ffc9898fdf8f285b73f08ee256ca9a6f20cf3de25c57dd7aa28f7558d3af624","signature":"5c3efc0b48a9ffaebcb92d80764bf511efdc1da294545f048b388f1eb0e776dd"},{"version":"0fb6bab9bd95185809964d513dcfeeab6b5609d280dcc6291b5277e36998afe1","signature":"e9ad4e8f8d4cdf4868ed849477eb52c1fcc8202a0eae09a285044247fa34b3d7"},{"version":"2d18411640dd8fcf1067392b839136628cafef5a648d0d49dc9da2f7d344046e","signature":"551c9be5f02d3f690b8ca4e0b6de31a01144fadae4fd78efffdd1a74975605d8"},{"version":"57597a1e8735ae08b671194c8b64a2c2831fd6ce2793d1bca705dbceb41bdaae","signature":"303140abf8cd05a38a4c80b0093f3eed7f08338f8d7d8835c7673dee2f30c278"},{"version":"fc9b503ac41bf643bdd2c5bcf21e7e8c052881dd6b94699e3624f3a60e02b0be","signature":"99ff0aa192cb6b3a49c33a945cefeb06cb974fb1e5093af322bd5650d23459ff"},{"version":"665d3d55e94122f2fe1c2dd78dd61774134151557a3b8dd41d49868a642c1277","signature":"4888c8bf45b44cba6310f105f461bcd1c68339d1223fa9eba4220d634b037779"},{"version":"2259073e3a0fcbd5d873f90465ad8364007668a97c0291a6b6d7975d8edbe30d","signature":"c0f29d2aa16258e0ca3a269bee4bd423b36db42589f373148d86660d33925059"},{"version":"02959309d4b7d9a875c4f175abae0a359a074585513d073d1fbb828b704e5663","signature":"02b01edc9185b431c83c3529460329623644045a55bf0d2816b270e6654a0d6e"},{"version":"d0472eb54f481ef265c3407b31df68485efda04e40cc8a7238c8dbdaf93fe81b","signature":"dc72c8a5f4dd64a562574eaa4868e415b522b29112a7febec2ab256367b15f0c"},{"version":"eb89338ad7e6dac4cf3435ed1351b5d8340b9b60f583560e89ae8e9997f1ea31","signature":"a3f9a69ff1d069d459a47330207aab3e49cabb1930118c7a1e33ab373c22cdbc"},{"version":"8ede95ee03fa2e8fb112aec1cd71c2261e679c1ac32bb18248172b82f17d8723","signature":"4ab84c99c2d8de9ed09d8cec1d5ebe7dc69b0d14ffbb6f35a08aad635a467459"},{"version":"0d0dd5ae0237a3571383b9ac701d40220e1d963d0bbb22473c336225b2ed44a7","signature":"38b64d98cbfb43b7d5105e47e9c5b7f106c2c619227ca3172d2ad6e4afddeeda"},{"version":"1c1f2d8b269e664047a9b56ce701c02e4223ce8f0fddc513ab4f311af8dbe654","signature":"6cc47928de7798cab399c6bde512a071c571376b1d8939e86c6153b7c789b904"},{"version":"dcc4b56e334bd6f9a8680a5dd343e417cdb03bae06bdc4786211d2cdfd7899e8","signature":"c46b6a3e7cf8c2e34dce279719ba3eec1475005435984daa522544afa3d01659"},{"version":"acbe60d616549a3815593f33a7a34faf0b0d063257c74f3b01bfc20dae42652e","signature":"4e91ca7ccb84757aad03b4a2ad0f5260ac4e3cc67bdf5e684feff2266e88c2fa"},{"version":"0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20","signature":"98c5be1140870c0579a5ad587c6208a96647338f5b022b6c82c570aa5bbc5fb5"},{"version":"94ec7f91d2d32a624e5b59ecb9ab5b7e9e8d848507888f067e14b9dcd6f19a76","affectsGlobalScope":true}],"root":[[61,86],[93,112]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[87,88,89,90],[87],[88],[91],[98,99,101,106,107,108],[64,65],[67,68,69],[64],[67,70],[73],[73,82],[65,66,67,69,71,72,74,75,77,78,79,86,93,94,96,97,98,99,100,101,102,103,104,105,106,110],[68,69],[64,65,76,79,80,81,83,84],[64,76],[76],[85],[68,92],[68],[64,76,79,83,84],[95],[109],[64,98,99],[99],[104],[61,62,63,107,111],[62]],"referencedMap":[[91,1],[88,2],[89,3],[92,4],[109,5],[66,6],[72,7],[67,8],[71,9],[73,8],[75,10],[65,8],[74,10],[83,11],[111,12],[70,13],[98,8],[85,14],[77,15],[78,16],[86,17],[93,18],[79,10],[81,8],[69,19],[94,17],[95,20],[96,21],[97,21],[110,22],[99,8],[102,8],[100,23],[104,24],[105,25],[101,8],[103,8],[112,26],[63,27]],"exportedModulesMap":[[91,1],[88,2],[89,3],[92,4],[110,22]],"semanticDiagnosticsPerFile":[59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,87,90,91,88,89,92,61,82,109,66,72,67,71,73,75,80,65,74,83,111,70,98,85,108,106,77,78,86,68,76,93,79,81,69,94,95,96,97,110,99,102,100,104,84,105,101,103,62,112,107,63,64,113],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"5.1.6"}
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","./src/data-transfer.js","./src/focusable.js","./src/tabbable.js","./src/utils/assert-is-defined.ts","./src/dom/get-rectangle-from-range.js","./src/dom/compute-caret-rect.js","./src/dom/document-has-text-selection.js","./src/dom/is-html-input-element.js","./src/dom/is-text-field.js","./src/dom/input-field-has-uncollapsed-selection.js","./src/dom/document-has-uncollapsed-selection.js","./src/dom/document-has-selection.js","./src/dom/get-computed-style.js","./src/dom/get-scroll-container.js","./src/dom/get-offset-parent.js","./src/dom/is-input-or-text-area.js","./src/dom/is-entirely-selected.js","./src/dom/is-form-element.js","./src/dom/is-rtl.js","./src/dom/get-range-height.js","./src/dom/is-selection-forward.js","./src/dom/caret-range-from-point.js","./src/dom/hidden-caret-range-from-point.js","./src/dom/scroll-if-no-range.js","./src/dom/is-edge.js","./src/dom/is-horizontal-edge.js","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/dom/is-number-input.js","./src/dom/is-vertical-edge.js","./src/dom/place-caret-at-edge.js","./src/dom/place-caret-at-horizontal-edge.js","./src/dom/place-caret-at-vertical-edge.js","./src/dom/insert-after.js","./src/dom/remove.js","./src/dom/replace.js","./src/dom/unwrap.js","./src/dom/replace-tag.js","./src/dom/wrap.js","./src/dom/safe-html.js","./src/dom/strip-html.js","./src/dom/is-empty.js","./src/phrasing-content.js","./src/dom/is-element.js","./src/dom/clean-node-list.js","./src/dom/remove-invalid-html.js","./src/dom/index.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"80d2e2a2e1685c82cba3c320f5d077376fadff77fe1f52a4c29f995bdc40ea70","signature":"cccc56d5be56aefb6a65bb2d27dede6fab002419984d46dd8b0ed11f408ed972"},{"version":"40d57dd6937878c9ce9cf36858406737c7dfadfb4d43094d6b95f74b39865bc8","signature":"76440ec58b976c2e975139c5b67a9ce7249189c8324dc4675923570314720c44"},{"version":"6350972f56d2a7cf935ab6564681ba7457eba3b7ec246cc8b2623e9562fbebdc","signature":"9984f7554f75aea5256bcccaa0692a497da23c904049c3bfb6f89a3d6973e231"},{"version":"a7836408f857cb8855443e0ff79d3ed7027415dca85f312c5f9f47daa6cd355d","signature":"427ee9647c5a9082fcc0b808ba059f959fb06904703ab64801dd1a3309aaddfe"},{"version":"1afbeaa1f610339fb0357990a56dcd425c464fd99042b5ec804b1d049de93da5","signature":"2b9a80ad6b2c9899c48146638854914c517eaa4b03d1da735949f038c3f68ca0"},{"version":"99546def4f9cd760e5ee13c0cce45c83aaa3d5474d75cef79c34b1990a808022","signature":"4b9d249b7c9f8418d9bc3ab4cde84f55f4bf046335db8ff3b81a278944fe3ed2"},{"version":"1caa056d021a35691778948dcb48eb6f7550110ea33c0d14c03f0445daa93559","signature":"e72b2bb70a4d9a82306da71d399dcf1a5e80d9e3ebcf59b0fa83b217b9a5f428"},{"version":"4fcfb368b1ba498dab2fd60a1c680c137aacc6df49d8e0e802c9de00f0e047f0","signature":"65486196570af3441b98be062d367ce68cf1aa17154258220468931ec50f4023"},{"version":"c16b538f18087f31e1b99251169cd93e8d7a1ba8dde51768978f4bde67f318ac","signature":"bc8a4e85be3fdf875aabdd8d2ca17eb785972050808bd795c173e532a7aac79c"},{"version":"f329cdfc6aa9467443275d35b330b78fccfe85ff28d1a54e415143645c294ed9","signature":"9ca49cc2c04cf7454383091f3e0d7d8b56bf470f9f0041193aedb08068652ed1"},{"version":"9c32c48fe5fb3b9929609bbd1d7233ed1fc13ac7aaee602b8dd27a0a90baf9cf","signature":"c6952de66e05d6b17f86e48f4c891f1bfb181707b382f8a1c5b7ae57cb56281d"},{"version":"9816eb62d7014f570356c988308e390770fea83993d6eae79788cd79a31ea6dc","signature":"c7e465ccc49c73ed7fc13097fe714e0839083efe7293a73b1dd86184079eecec"},{"version":"dea4257186ad318062499e0aff7122433b1081b7883e95ef78d9b4121fc8e7da","signature":"2c6071a3367c80ae3ad748021b3b29f28d71b2aa12796a618d5a16e7f1fd5c04"},{"version":"bd40af49830b5f090dfcd1940035969a710df6305f223e9297a8667e0ae0ffed","signature":"b3cad4b66b48560eb79b276c2013bef744d530f84fec04e169ec33dd9bf01c35"},{"version":"f5b932cd4c47954ecb9c5010d848afe821486d5785a3c1c81e670146f4245688","signature":"1e95ca15e810ae4867f8639d8c49d3840c0f6a5ae8c4abfa0174be803a67cfcf"},{"version":"4d31f8f7e9d8a43d2fd3c5a378e390080706392dd4d1541fc6b6f876ed961cf4","signature":"9e9cc36373587f235a2e4c952b6bbf2f7effe42dbe0a7f188aaf42990345901f"},{"version":"756cc95fd142eb928ba7bd366cc2756a902d8a1219182a45a2820e86702b1f3e","signature":"a02177379b2fbf723210e7eca2454b38a8a430165eaa6560a560f7e803c04a38"},{"version":"c6d152163c07dc49df635b774cbc479cad88b467f924f3141a28f5a378ec4a36","signature":"45d291fca62fcc1ace9499ef71a7b37a2ffbe437ea6f176faaf22e461fb194bc"},{"version":"4312fd698114e973469529ec29680789e8ce13ffddcf711a8660c85e522b4069","signature":"a280e9e4bc79c5d5fe000c17409673106ad971e18cf357d3bf8c1896031653a8"},{"version":"cb412dab570deef76d26e0c5759e3fbe12625947ac6a82037573c788b7a2d1a4","signature":"9a5b9009d073d51620d5d37185cb3baa65c8efd219b1293b764cb52adce512c3"},{"version":"59fbe797b38f7f549100d38fc9a4c6cd0f4b990407700f5e1979a54c9d8e3ed6","signature":"d2fc8442cba54a7d9981be7ec77ce1a9442bd8c858162f455d702776cd2804d8"},{"version":"e8be8e4d18f330bdd294cdbe7d3c4a89e8dca65585284745a25c515ecb69249f","signature":"42a811ef926623b9091c4efd78f7d9c1375a58641bb466770ab8d51cf30912e8"},{"version":"8b692a361fc9f2d4102106f168b35cf6f30c9efc66050108001955a1a59b4fd2","signature":"9debb575c0fb083c696fe76fed6b933ad4f5c6fb591e332228d5feec857522f9"},{"version":"674cebb58a019bb257d71349493297efe8dce5cfffcfe113ade29efcc2d4cb95","signature":"b4726ffc8f8db298ecbe2d1599d36fa0203e47c2fa86eeb6a14f65a7c0fab4e4"},{"version":"e0292c4bbb6743b097039bc62688a462772e6ecdace4ba54cd7e1f22a1ab80b9","signature":"f08b8296d0d4f1840ca35ba232ec82b51681d1d403c5c8482a2b9d9182dfb099"},{"version":"204f9aa3215a308c4e0e681acfecfb48c96c67b90247bce788beb36e70a24ecc","signature":"6c3693f28bbf6fb06ceab50425d93a6f352b143ee6c441379403addca32ac492"},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","111864872d90aef86668951ee1765f09e9def8de81160a1ddc3312f2766989ab",{"version":"905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","signature":"e4956b273081c74d1dba8d2f28889922c7feec072e6c7b789d23d385438ee87a"},{"version":"1e487793844c72bdfeeb7dd199e346c991122b1e00701c2c2494de5c5b9a14cb","signature":"dcc847cd5a1a58bc949d80d8686d8136f9de019c4cb232b24b43c8c6bbc93cf5"},{"version":"73745f3b192a256b498ac47e62b23e6b9272d11ce49ab0df686ed6a664eef3ca","signature":"aca230e89b418c782369f8cbfb9de156b977037b3d6c800a28d47984451f6759"},{"version":"609b8944af1aa9b73959c0bd766370986176a197c16c27e365e867a0bc85eed8","signature":"7e3b07bc511efd17b152e0774bc75fdf58a0ec6dc9cbc0d9a5ec524b32d8597c"},{"version":"2ffc9898fdf8f285b73f08ee256ca9a6f20cf3de25c57dd7aa28f7558d3af624","signature":"5c3efc0b48a9ffaebcb92d80764bf511efdc1da294545f048b388f1eb0e776dd"},{"version":"0fb6bab9bd95185809964d513dcfeeab6b5609d280dcc6291b5277e36998afe1","signature":"e9ad4e8f8d4cdf4868ed849477eb52c1fcc8202a0eae09a285044247fa34b3d7"},{"version":"2d18411640dd8fcf1067392b839136628cafef5a648d0d49dc9da2f7d344046e","signature":"551c9be5f02d3f690b8ca4e0b6de31a01144fadae4fd78efffdd1a74975605d8"},{"version":"57597a1e8735ae08b671194c8b64a2c2831fd6ce2793d1bca705dbceb41bdaae","signature":"303140abf8cd05a38a4c80b0093f3eed7f08338f8d7d8835c7673dee2f30c278"},{"version":"fc9b503ac41bf643bdd2c5bcf21e7e8c052881dd6b94699e3624f3a60e02b0be","signature":"99ff0aa192cb6b3a49c33a945cefeb06cb974fb1e5093af322bd5650d23459ff"},{"version":"665d3d55e94122f2fe1c2dd78dd61774134151557a3b8dd41d49868a642c1277","signature":"4888c8bf45b44cba6310f105f461bcd1c68339d1223fa9eba4220d634b037779"},{"version":"2259073e3a0fcbd5d873f90465ad8364007668a97c0291a6b6d7975d8edbe30d","signature":"c0f29d2aa16258e0ca3a269bee4bd423b36db42589f373148d86660d33925059"},{"version":"02959309d4b7d9a875c4f175abae0a359a074585513d073d1fbb828b704e5663","signature":"02b01edc9185b431c83c3529460329623644045a55bf0d2816b270e6654a0d6e"},{"version":"d0472eb54f481ef265c3407b31df68485efda04e40cc8a7238c8dbdaf93fe81b","signature":"dc72c8a5f4dd64a562574eaa4868e415b522b29112a7febec2ab256367b15f0c"},{"version":"eb89338ad7e6dac4cf3435ed1351b5d8340b9b60f583560e89ae8e9997f1ea31","signature":"a3f9a69ff1d069d459a47330207aab3e49cabb1930118c7a1e33ab373c22cdbc"},{"version":"8ede95ee03fa2e8fb112aec1cd71c2261e679c1ac32bb18248172b82f17d8723","signature":"4ab84c99c2d8de9ed09d8cec1d5ebe7dc69b0d14ffbb6f35a08aad635a467459"},{"version":"0d0dd5ae0237a3571383b9ac701d40220e1d963d0bbb22473c336225b2ed44a7","signature":"38b64d98cbfb43b7d5105e47e9c5b7f106c2c619227ca3172d2ad6e4afddeeda"},{"version":"1c1f2d8b269e664047a9b56ce701c02e4223ce8f0fddc513ab4f311af8dbe654","signature":"6cc47928de7798cab399c6bde512a071c571376b1d8939e86c6153b7c789b904"},{"version":"dcc4b56e334bd6f9a8680a5dd343e417cdb03bae06bdc4786211d2cdfd7899e8","signature":"c46b6a3e7cf8c2e34dce279719ba3eec1475005435984daa522544afa3d01659"},{"version":"acbe60d616549a3815593f33a7a34faf0b0d063257c74f3b01bfc20dae42652e","signature":"4e91ca7ccb84757aad03b4a2ad0f5260ac4e3cc67bdf5e684feff2266e88c2fa"},{"version":"0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20","signature":"98c5be1140870c0579a5ad587c6208a96647338f5b022b6c82c570aa5bbc5fb5"},{"version":"94ec7f91d2d32a624e5b59ecb9ab5b7e9e8d848507888f067e14b9dcd6f19a76","affectsGlobalScope":true}],"root":[[61,86],[93,112]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[87,88,89,90],[87],[88],[91],[98,99,101,106,107,108],[64,65],[67,68,69],[64],[67,70],[73],[73,82],[65,66,67,69,71,72,74,75,77,78,79,86,93,94,96,97,98,99,100,101,102,103,104,105,106,110],[68,69],[64,65,76,79,80,81,83,84],[64,76],[76],[85],[68,92],[68],[64,76,79,83,84],[95],[109],[64,98,99],[99],[104],[61,62,63,107,111],[62]],"referencedMap":[[91,1],[88,2],[89,3],[92,4],[109,5],[66,6],[72,7],[67,8],[71,9],[73,8],[75,10],[65,8],[74,10],[83,11],[111,12],[70,13],[98,8],[85,14],[77,15],[78,16],[86,17],[93,18],[79,10],[81,8],[69,19],[94,17],[95,20],[96,21],[97,21],[110,22],[99,8],[102,8],[100,23],[104,24],[105,25],[101,8],[103,8],[112,26],[63,27]],"exportedModulesMap":[[91,1],[88,2],[89,3],[92,4],[110,22]],"semanticDiagnosticsPerFile":[59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,87,90,91,88,89,92,61,82,109,66,72,67,71,73,75,80,65,74,83,111,70,98,85,108,106,77,78,86,68,76,93,79,81,69,94,95,96,97,110,99,102,100,104,84,105,101,103,62,112,107,63,64,113],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"5.1.6"}
|