@wordpress/dom 3.27.0 → 3.29.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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.29.0 (2023-03-15)
6
+
7
+ ## 3.28.0 (2023-03-01)
8
+
5
9
  ## 3.27.0 (2023-02-15)
6
10
 
7
11
  ## 3.26.0 (2023-02-01)
@@ -102,7 +102,7 @@ function getRectangleFromRange(range) {
102
102
  //
103
103
  // See: https://stackoverflow.com/a/6847328/995445
104
104
 
105
- if (!rect) {
105
+ if (!rect || rect.height === 0) {
106
106
  (0, _assertIsDefined.assertIsDefined)(ownerDocument, 'ownerDocument');
107
107
  const padNode = ownerDocument.createTextNode('\u200b'); // Do not modify the live range.
108
108
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom/src/dom/get-rectangle-from-range.js"],"names":["getRectangleFromRange","range","collapsed","rects","Array","from","getClientRects","length","filteredRects","filter","width","getBoundingClientRect","top","furthestTop","bottom","furthestBottom","left","furthestLeft","right","furthestRight","window","DOMRect","startContainer","ownerDocument","nodeName","parentNode","index","childNodes","indexOf","createRange","setStart","setEnd","rect","padNode","createTextNode","cloneRange","insertNode","removeChild"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,qBAAT,CAAgCC,KAAhC,EAAwC;AACtD;AACA;AACA;AACA,MAAK,CAAEA,KAAK,CAACC,SAAb,EAAyB;AACxB,UAAMC,KAAK,GAAGC,KAAK,CAACC,IAAN,CAAYJ,KAAK,CAACK,cAAN,EAAZ,CAAd,CADwB,CAGxB;;AACA,QAAKH,KAAK,CAACI,MAAN,KAAiB,CAAtB,EAA0B;AACzB,aAAOJ,KAAK,CAAE,CAAF,CAAZ;AACA,KANuB,CAQxB;;;AACA,UAAMK,aAAa,GAAGL,K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iBG,UAAjB,EAA6B,YAA7B;AACA,UAAMC,KAAK;AAAG;AACbtB,IAAAA,KAAK,CAACC,IAAN,CAAYoB,UAAU,CAACE,UAAvB,CADmC,CAElCC,OAFkC,CAEzBN,cAFyB,CAApC;AAIA,0CAAiBC,aAAjB,EAAgC,eAAhC;AACAtB,IAAAA,KAAK,GAAGsB,aAAa,CAACM,WAAd,EAAR;AACA5B,IAAAA,KAAK,CAAC6B,QAAN,CAAgBL,UAAhB,EAA4BC,KAA5B;AACAzB,IAAAA,KAAK,CAAC8B,MAAN,CAAcN,UAAd,EAA0BC,KAA1B;AACA;;AAED,QAAMvB,KAAK,GAAGF,KAAK,CAACK,cAAN,EAAd,CA/DsD,CAiEtD;AACA;;AACA,MAAKH,KAAK,CAACI,MAAN,GAAe,CAApB,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,MAAIyB,IAAI,GAAG7B,KAAK,CAAE,CAAF,CAAhB,CAvEsD,CAyEtD;AACA;AACA;AACA;AACA;;AACA,MAAK,CAAE6B,IAAP,EAAc;AACb,0CAAiBT,aAAjB,EAAgC,eAAhC;AACA,UAAMU,OAAO,GAAGV,aAAa,CAACW,cAAd,CAA8B,QAA9B,CAAhB,CAFa,CAGb;;AACAjC,IAAAA,KAAK,GAAGA,KAAK,CAACkC,UAAN,EAAR;AACAlC,IAAAA,KAAK,CAACmC,UAAN,CAAkBH,OAAlB;AACAD,IAAAA,IAAI,GAAG/B,KAAK,CAACK,cAAN,GAAwB,CAAxB,CAAP;AACA,0CAAiB2B,OAAO,CAACR,UAAzB,EAAqC,oBAArC;AACAQ,IAAAA,OAAO,CAACR,UAAR,CAAmBY,WAAnB,CAAgCJ,OAAhC;AACA;;AAED,SAAOD,IAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { assertIsDefined } from '../utils/assert-is-defined';\n\n/**\n * Get the rectangle of a given Range. Returns `null` if no suitable rectangle\n * can be found.\n *\n * @param {Range} range The range.\n *\n * @return {DOMRect?} The rectangle.\n */\nexport default function getRectangleFromRange( range ) {\n\t// For uncollapsed ranges, get the rectangle that bounds the contents of the\n\t// range; this a rectangle enclosing the union of the bounding rectangles\n\t// for all the elements in the range.\n\tif ( ! range.collapsed ) {\n\t\tconst rects = Array.from( range.getClientRects() );\n\n\t\t// If there's just a single rect, return it.\n\t\tif ( rects.length === 1 ) {\n\t\t\treturn rects[ 0 ];\n\t\t}\n\n\t\t// Ignore tiny selection at the edge of a range.\n\t\tconst filteredRects = rects.filter( ( { width } ) => width > 1 );\n\n\t\t// If it's full of tiny selections, return browser default.\n\t\tif ( filteredRects.length === 0 ) {\n\t\t\treturn range.getBoundingClientRect();\n\t\t}\n\n\t\tif ( filteredRects.length === 1 ) {\n\t\t\treturn filteredRects[ 0 ];\n\t\t}\n\n\t\tlet {\n\t\t\ttop: furthestTop,\n\t\t\tbottom: furthestBottom,\n\t\t\tleft: furthestLeft,\n\t\t\tright: furthestRight,\n\t\t} = filteredRects[ 0 ];\n\n\t\tfor ( const { top, bottom, left, right } of filteredRects ) {\n\t\t\tif ( top < furthestTop ) furthestTop = top;\n\t\t\tif ( bottom > furthestBottom ) furthestBottom = bottom;\n\t\t\tif ( left < furthestLeft ) furthestLeft = left;\n\t\t\tif ( right > furthestRight ) furthestRight = right;\n\t\t}\n\n\t\treturn new window.DOMRect(\n\t\t\tfurthestLeft,\n\t\t\tfurthestTop,\n\t\t\tfurthestRight - furthestLeft,\n\t\t\tfurthestBottom - furthestTop\n\t\t);\n\t}\n\n\tconst { startContainer } = range;\n\tconst { ownerDocument } = startContainer;\n\n\t// Correct invalid \"BR\" ranges. The cannot contain any children.\n\tif ( startContainer.nodeName === 'BR' ) {\n\t\tconst { parentNode } = startContainer;\n\t\tassertIsDefined( parentNode, 'parentNode' );\n\t\tconst index = /** @type {Node[]} */ (\n\t\t\tArray.from( parentNode.childNodes )\n\t\t).indexOf( startContainer );\n\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\trange = ownerDocument.createRange();\n\t\trange.setStart( parentNode, index );\n\t\trange.setEnd( parentNode, index );\n\t}\n\n\tconst rects = range.getClientRects();\n\n\t// If we have multiple rectangles for a collapsed range, there's no way to\n\t// know which it is, so don't return anything.\n\tif ( rects.length > 1 ) {\n\t\treturn null;\n\t}\n\n\tlet rect = rects[ 0 ];\n\n\t// If the collapsed range starts (and therefore ends) at an element node,\n\t// `getClientRects` can be empty in some browsers. This can be resolved\n\t// by adding a temporary text node with zero-width space to the range.\n\t//\n\t// See: https://stackoverflow.com/a/6847328/995445\n\tif ( ! rect ) {\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\tconst padNode = ownerDocument.createTextNode( '\\u200b' );\n\t\t// Do not modify the live range.\n\t\trange = range.cloneRange();\n\t\trange.insertNode( padNode );\n\t\trect = range.getClientRects()[ 0 ];\n\t\tassertIsDefined( padNode.parentNode, 'padNode.parentNode' );\n\t\tpadNode.parentNode.removeChild( padNode );\n\t}\n\n\treturn rect;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/dom/src/dom/get-rectangle-from-range.js"],"names":["getRectangleFromRange","range","collapsed","rects","Array","from","getClientRects","length","filteredRects","filter","width","getBoundingClientRect","top","furthestTop","bottom","furthestBottom","left","furthestLeft","right","furthestRight","window","DOMRect","startContainer","ownerDocument","nodeName","parentNode","index","childNodes","indexOf","createRange","setStart","setEnd","rect","height","padNode","createTextNode","cloneRange","insertNode","removeChild"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,qBAAT,CAAgCC,KAAhC,EAAwC;AACtD;AACA;AACA;AACA,MAAK,CAAEA,KAAK,CAACC,SAAb,EAAyB;AACxB,UAAMC,KAAK,GAAGC,KAAK,CAACC,IAAN,CAAYJ,KAAK,CAACK,cAAN,EAAZ,CAAd,CADwB,CAGxB;;AACA,QAAKH,KAAK,CAACI,MAAN,KAAiB,CAAtB,EAA0B;AACzB,aAAOJ,KAAK,CAAE,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C;AACvC,UAAM;AAAEC,MAAAA;AAAF,QAAiBH,cAAvB;AACA,0CAAiBG,UAAjB,EAA6B,YAA7B;AACA,UAAMC,KAAK;AAAG;AACbtB,IAAAA,KAAK,CAACC,IAAN,CAAYoB,UAAU,CAACE,UAAvB,CADmC,CAElCC,OAFkC,CAEzBN,cAFyB,CAApC;AAIA,0CAAiBC,aAAjB,EAAgC,eAAhC;AACAtB,IAAAA,KAAK,GAAGsB,aAAa,CAACM,WAAd,EAAR;AACA5B,IAAAA,KAAK,CAAC6B,QAAN,CAAgBL,UAAhB,EAA4BC,KAA5B;AACAzB,IAAAA,KAAK,CAAC8B,MAAN,CAAcN,UAAd,EAA0BC,KAA1B;AACA;;AAED,QAAMvB,KAAK,GAAGF,KAAK,CAACK,cAAN,EAAd,CA/DsD,CAiEtD;AACA;;AACA,MAAKH,KAAK,CAACI,MAAN,GAAe,CAApB,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,MAAIyB,IAAI,GAAG7B,KAAK,CAAE,CAAF,CAAhB,CAvEsD,CAyEtD;AACA;AACA;AACA;AACA;;AACA,MAAK,CAAE6B,IAAF,IAAUA,IAAI,CAACC,MAAL,KAAgB,CAA/B,EAAmC;AAClC,0CAAiBV,aAAjB,EAAgC,eAAhC;AACA,UAAMW,OAAO,GAAGX,aAAa,CAACY,cAAd,CAA8B,QAA9B,CAAhB,CAFkC,CAGlC;;AACAlC,IAAAA,KAAK,GAAGA,KAAK,CAACmC,UAAN,EAAR;AACAnC,IAAAA,KAAK,CAACoC,UAAN,CAAkBH,OAAlB;AACAF,IAAAA,IAAI,GAAG/B,KAAK,CAACK,cAAN,GAAwB,CAAxB,CAAP;AACA,0CAAiB4B,OAAO,CAACT,UAAzB,EAAqC,oBAArC;AACAS,IAAAA,OAAO,CAACT,UAAR,CAAmBa,WAAnB,CAAgCJ,OAAhC;AACA;;AAED,SAAOF,IAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { assertIsDefined } from '../utils/assert-is-defined';\n\n/**\n * Get the rectangle of a given Range. Returns `null` if no suitable rectangle\n * can be found.\n *\n * @param {Range} range The range.\n *\n * @return {DOMRect?} The rectangle.\n */\nexport default function getRectangleFromRange( range ) {\n\t// For uncollapsed ranges, get the rectangle that bounds the contents of the\n\t// range; this a rectangle enclosing the union of the bounding rectangles\n\t// for all the elements in the range.\n\tif ( ! range.collapsed ) {\n\t\tconst rects = Array.from( range.getClientRects() );\n\n\t\t// If there's just a single rect, return it.\n\t\tif ( rects.length === 1 ) {\n\t\t\treturn rects[ 0 ];\n\t\t}\n\n\t\t// Ignore tiny selection at the edge of a range.\n\t\tconst filteredRects = rects.filter( ( { width } ) => width > 1 );\n\n\t\t// If it's full of tiny selections, return browser default.\n\t\tif ( filteredRects.length === 0 ) {\n\t\t\treturn range.getBoundingClientRect();\n\t\t}\n\n\t\tif ( filteredRects.length === 1 ) {\n\t\t\treturn filteredRects[ 0 ];\n\t\t}\n\n\t\tlet {\n\t\t\ttop: furthestTop,\n\t\t\tbottom: furthestBottom,\n\t\t\tleft: furthestLeft,\n\t\t\tright: furthestRight,\n\t\t} = filteredRects[ 0 ];\n\n\t\tfor ( const { top, bottom, left, right } of filteredRects ) {\n\t\t\tif ( top < furthestTop ) furthestTop = top;\n\t\t\tif ( bottom > furthestBottom ) furthestBottom = bottom;\n\t\t\tif ( left < furthestLeft ) furthestLeft = left;\n\t\t\tif ( right > furthestRight ) furthestRight = right;\n\t\t}\n\n\t\treturn new window.DOMRect(\n\t\t\tfurthestLeft,\n\t\t\tfurthestTop,\n\t\t\tfurthestRight - furthestLeft,\n\t\t\tfurthestBottom - furthestTop\n\t\t);\n\t}\n\n\tconst { startContainer } = range;\n\tconst { ownerDocument } = startContainer;\n\n\t// Correct invalid \"BR\" ranges. The cannot contain any children.\n\tif ( startContainer.nodeName === 'BR' ) {\n\t\tconst { parentNode } = startContainer;\n\t\tassertIsDefined( parentNode, 'parentNode' );\n\t\tconst index = /** @type {Node[]} */ (\n\t\t\tArray.from( parentNode.childNodes )\n\t\t).indexOf( startContainer );\n\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\trange = ownerDocument.createRange();\n\t\trange.setStart( parentNode, index );\n\t\trange.setEnd( parentNode, index );\n\t}\n\n\tconst rects = range.getClientRects();\n\n\t// If we have multiple rectangles for a collapsed range, there's no way to\n\t// know which it is, so don't return anything.\n\tif ( rects.length > 1 ) {\n\t\treturn null;\n\t}\n\n\tlet rect = rects[ 0 ];\n\n\t// If the collapsed range starts (and therefore ends) at an element node,\n\t// `getClientRects` can be empty in some browsers. This can be resolved\n\t// by adding a temporary text node with zero-width space to the range.\n\t//\n\t// See: https://stackoverflow.com/a/6847328/995445\n\tif ( ! rect || rect.height === 0 ) {\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\tconst padNode = ownerDocument.createTextNode( '\\u200b' );\n\t\t// Do not modify the live range.\n\t\trange = range.cloneRange();\n\t\trange.insertNode( padNode );\n\t\trect = range.getClientRects()[ 0 ];\n\t\tassertIsDefined( padNode.parentNode, 'padNode.parentNode' );\n\t\tpadNode.parentNode.removeChild( padNode );\n\t}\n\n\treturn rect;\n}\n"]}
@@ -79,7 +79,7 @@ function isValidFocusableArea(element) {
79
79
  * Returns all focusable elements within a given context.
80
80
  *
81
81
  * @param {Element} context Element in which to search.
82
- * @param {Object} [options]
82
+ * @param {Object} options
83
83
  * @param {boolean} [options.sequential] If set, only return elements that are
84
84
  * sequentially focusable.
85
85
  * Non-interactive elements with a
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom/src/focusable.js"],"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"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA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,EAAuBI,MAAvB,CAAiClB,OAAF,IAAe;AACpD,QAAK,CAAED,SAAS,CAAEC,OAAF,CAAhB,EAA8B;AAC7B,aAAO,KAAP;AACA;;AAED,UAAM;AAAEmB,MAAAA;AAAF,QAAenB,OAArB;;AACA,QAAK,WAAWmB,QAAhB,EAA2B;AAC1B,aAAOd,oBAAoB;AAC1B;AAAiCL,MAAAA,OADP,CAA3B;AAGA;;AAED,WAAO,IAAP;AACA,GAbM,CAAP;AAcA","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/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {NodeListOf<HTMLElement>} */\n\t/* eslint-enable jsdoc/no-undefined-types */\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"]}
1
+ {"version":3,"sources":["@wordpress/dom/src/focusable.js"],"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"],"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,aAAT,CAAwBC,UAAxB,EAAqC;AACpC,SAAO,CACNA,UAAU,GAAG,iCAAH,GAAuC,YAD3C,EAEN,SAFM,EAGN,wBAHM,EAIN,4CAJM,EAKN,wBALM,EAMN,0BANM,EAON,6BAPM,EAQN,QARM,EASN,OATM,EAUN,YAVM,EAWN,gDAXM,EAYLC,IAZK,CAYC,GAZD,CAAP;AAaA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,SAAT,CAAoBC,OAApB,EAA8B;AAC7B,SACCA,OAAO,CAACC,WAAR,GAAsB,CAAtB,IACAD,OAAO,CAACE,YAAR,GAAuB,CADvB,IAEAF,OAAO,CAACG,cAAR,GAAyBC,MAAzB,GAAkC,CAHnC;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,oBAAT,CAA+BL,OAA/B,EAAyC;AACxC;AACA,QAAMM,GAAG,GAAGN,OAAO,CAACO,OAAR,CAAiB,WAAjB,CAAZ;;AACA,MAAK,CAAED,GAAP,EAAa;AACZ,WAAO,KAAP;AACA;AAED;;;AACA,QAAME,GAAG,GAAGR,OAAO,CAACS,aAAR,CAAsBC,aAAtB,CACX,kBAAkBJ,GAAG,CAACK,IAAtB,GAA6B,IADlB,CAAZ;AAGA,SAAO,CAAC,CAAEH,GAAH,IAAUT,SAAS,CAAES,GAAF,CAA1B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASI,IAAT,CAAeC,OAAf,EAAsD;AAAA,MAA9B;AAAEhB,IAAAA,UAAU,GAAG;AAAf,GAA8B,uEAAL,EAAK;;AAC5D;;AACA;;AACA;AACA,QAAMiB,QAAQ,GAAGD,OAAO,CAACE,gBAAR,CAA0BnB,aAAa,CAAEC,UAAF,CAAvC,CAAjB;AAEA,SAAOmB,KAAK,CAACC,IAAN,CAAYH,QAAZ,EAAuBI,MAAvB,CAAiClB,OAAF,IAAe;AACpD,QAAK,CAAED,SAAS,CAAEC,OAAF,CAAhB,EAA8B;AAC7B,aAAO,KAAP;AACA;;AAED,UAAM;AAAEmB,MAAAA;AAAF,QAAenB,OAArB;;AACA,QAAK,WAAWmB,QAAhB,EAA2B;AAC1B,aAAOd,oBAAoB;AAC1B;AAAiCL,MAAAA,OADP,CAA3B;AAGA;;AAED,WAAO,IAAP;AACA,GAbM,CAAP;AAcA","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/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {NodeListOf<HTMLElement>} */\n\t/* eslint-enable jsdoc/no-undefined-types */\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"]}
@@ -94,7 +94,7 @@ export default function getRectangleFromRange(range) {
94
94
  //
95
95
  // See: https://stackoverflow.com/a/6847328/995445
96
96
 
97
- if (!rect) {
97
+ if (!rect || rect.height === 0) {
98
98
  assertIsDefined(ownerDocument, 'ownerDocument');
99
99
  const padNode = ownerDocument.createTextNode('\u200b'); // Do not modify the live range.
100
100
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom/src/dom/get-rectangle-from-range.js"],"names":["assertIsDefined","getRectangleFromRange","range","collapsed","rects","Array","from","getClientRects","length","filteredRects","filter","width","getBoundingClientRect","top","furthestTop","bottom","furthestBottom","left","furthestLeft","right","furthestRight","window","DOMRect","startContainer","ownerDocument","nodeName","parentNode","index","childNodes","indexOf","createRange","setStart","setEnd","rect","padNode","createTextNode","cloneRange","insertNode","removeChild"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,4BAAhC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,qBAAT,CAAgCC,KAAhC,EAAwC;AACtD;AACA;AACA;AACA,MAAK,CAAEA,KAAK,CAACC,SAAb,EAAyB;AACxB,UAAMC,KAAK,GAAGC,KAAK,CAACC,IAAN,CAAYJ,KAAK,CAACK,cAAN,EAAZ,CAAd,CADwB,CAGxB;;AACA,QAAKH,KAAK,CAACI,MAAN,KAAiB,CAAtB,EAA0B;AACzB,aAAOJ,KAAK,CAAE,CAAF,CAAZ;AACA,KANuB,CAQxB;;;AACA,UAAMK,aAAa,GAAGL,KAAK,CAACM,MAAN,CAAc;AAAA,UAAE;AAAEC,QAAAA;AAAF,OAAF;AAAA,aAAiBA,KAAK,GAAG,CAAzB;AAAA,KAAd,CAAtB,CATwB,CAWxB;;AACA,QAAKF,aAAa,CAACD,MAAd,KAAyB,CAA9B,EAAkC;AACjC,aAAON,KAAK,CAACU,qBAAN,EAA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AjB,CAAf;AACAtB,IAAAA,KAAK,GAAGsB,aAAa,CAACM,WAAd,EAAR;AACA5B,IAAAA,KAAK,CAAC6B,QAAN,CAAgBL,UAAhB,EAA4BC,KAA5B;AACAzB,IAAAA,KAAK,CAAC8B,MAAN,CAAcN,UAAd,EAA0BC,KAA1B;AACA;;AAED,QAAMvB,KAAK,GAAGF,KAAK,CAACK,cAAN,EAAd,CA/DsD,CAiEtD;AACA;;AACA,MAAKH,KAAK,CAACI,MAAN,GAAe,CAApB,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,MAAIyB,IAAI,GAAG7B,KAAK,CAAE,CAAF,CAAhB,CAvEsD,CAyEtD;AACA;AACA;AACA;AACA;;AACA,MAAK,CAAE6B,IAAP,EAAc;AACbjC,IAAAA,eAAe,CAAEwB,aAAF,EAAiB,eAAjB,CAAf;AACA,UAAMU,OAAO,GAAGV,aAAa,CAACW,cAAd,CAA8B,QAA9B,CAAhB,CAFa,CAGb;;AACAjC,IAAAA,KAAK,GAAGA,KAAK,CAACkC,UAAN,EAAR;AACAlC,IAAAA,KAAK,CAACmC,UAAN,CAAkBH,OAAlB;AACAD,IAAAA,IAAI,GAAG/B,KAAK,CAACK,cAAN,GAAwB,CAAxB,CAAP;AACAP,IAAAA,eAAe,CAAEkC,OAAO,CAACR,UAAV,EAAsB,oBAAtB,CAAf;AACAQ,IAAAA,OAAO,CAACR,UAAR,CAAmBY,WAAnB,CAAgCJ,OAAhC;AACA;;AAED,SAAOD,IAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { assertIsDefined } from '../utils/assert-is-defined';\n\n/**\n * Get the rectangle of a given Range. Returns `null` if no suitable rectangle\n * can be found.\n *\n * @param {Range} range The range.\n *\n * @return {DOMRect?} The rectangle.\n */\nexport default function getRectangleFromRange( range ) {\n\t// For uncollapsed ranges, get the rectangle that bounds the contents of the\n\t// range; this a rectangle enclosing the union of the bounding rectangles\n\t// for all the elements in the range.\n\tif ( ! range.collapsed ) {\n\t\tconst rects = Array.from( range.getClientRects() );\n\n\t\t// If there's just a single rect, return it.\n\t\tif ( rects.length === 1 ) {\n\t\t\treturn rects[ 0 ];\n\t\t}\n\n\t\t// Ignore tiny selection at the edge of a range.\n\t\tconst filteredRects = rects.filter( ( { width } ) => width > 1 );\n\n\t\t// If it's full of tiny selections, return browser default.\n\t\tif ( filteredRects.length === 0 ) {\n\t\t\treturn range.getBoundingClientRect();\n\t\t}\n\n\t\tif ( filteredRects.length === 1 ) {\n\t\t\treturn filteredRects[ 0 ];\n\t\t}\n\n\t\tlet {\n\t\t\ttop: furthestTop,\n\t\t\tbottom: furthestBottom,\n\t\t\tleft: furthestLeft,\n\t\t\tright: furthestRight,\n\t\t} = filteredRects[ 0 ];\n\n\t\tfor ( const { top, bottom, left, right } of filteredRects ) {\n\t\t\tif ( top < furthestTop ) furthestTop = top;\n\t\t\tif ( bottom > furthestBottom ) furthestBottom = bottom;\n\t\t\tif ( left < furthestLeft ) furthestLeft = left;\n\t\t\tif ( right > furthestRight ) furthestRight = right;\n\t\t}\n\n\t\treturn new window.DOMRect(\n\t\t\tfurthestLeft,\n\t\t\tfurthestTop,\n\t\t\tfurthestRight - furthestLeft,\n\t\t\tfurthestBottom - furthestTop\n\t\t);\n\t}\n\n\tconst { startContainer } = range;\n\tconst { ownerDocument } = startContainer;\n\n\t// Correct invalid \"BR\" ranges. The cannot contain any children.\n\tif ( startContainer.nodeName === 'BR' ) {\n\t\tconst { parentNode } = startContainer;\n\t\tassertIsDefined( parentNode, 'parentNode' );\n\t\tconst index = /** @type {Node[]} */ (\n\t\t\tArray.from( parentNode.childNodes )\n\t\t).indexOf( startContainer );\n\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\trange = ownerDocument.createRange();\n\t\trange.setStart( parentNode, index );\n\t\trange.setEnd( parentNode, index );\n\t}\n\n\tconst rects = range.getClientRects();\n\n\t// If we have multiple rectangles for a collapsed range, there's no way to\n\t// know which it is, so don't return anything.\n\tif ( rects.length > 1 ) {\n\t\treturn null;\n\t}\n\n\tlet rect = rects[ 0 ];\n\n\t// If the collapsed range starts (and therefore ends) at an element node,\n\t// `getClientRects` can be empty in some browsers. This can be resolved\n\t// by adding a temporary text node with zero-width space to the range.\n\t//\n\t// See: https://stackoverflow.com/a/6847328/995445\n\tif ( ! rect ) {\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\tconst padNode = ownerDocument.createTextNode( '\\u200b' );\n\t\t// Do not modify the live range.\n\t\trange = range.cloneRange();\n\t\trange.insertNode( padNode );\n\t\trect = range.getClientRects()[ 0 ];\n\t\tassertIsDefined( padNode.parentNode, 'padNode.parentNode' );\n\t\tpadNode.parentNode.removeChild( padNode );\n\t}\n\n\treturn rect;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/dom/src/dom/get-rectangle-from-range.js"],"names":["assertIsDefined","getRectangleFromRange","range","collapsed","rects","Array","from","getClientRects","length","filteredRects","filter","width","getBoundingClientRect","top","furthestTop","bottom","furthestBottom","left","furthestLeft","right","furthestRight","window","DOMRect","startContainer","ownerDocument","nodeName","parentNode","index","childNodes","indexOf","createRange","setStart","setEnd","rect","height","padNode","createTextNode","cloneRange","insertNode","removeChild"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,4BAAhC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,qBAAT,CAAgCC,KAAhC,EAAwC;AACtD;AACA;AACA;AACA,MAAK,CAAEA,KAAK,CAACC,SAAb,EAAyB;AACxB,UAAMC,KAAK,GAAGC,KAAK,CAACC,IAAN,CAAYJ,KAAK,CAACK,cAAN,EAAZ,CAAd,CADwB,CAGxB;;AACA,QAAKH,KAAK,CAACI,MAAN,KAAiB,CAAtB,EAA0B;AACzB,aAAOJ,KAAK,CAAE,CAAF,CAAZ;AACA,KANuB,CAQxB;;;AACA,UAAMK,aAAa,GAAGL,KAAK,CAACM,MAAN,CAAc;AAAA,UAAE;AAAEC,QAAAA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UAAMC,KAAK;AAAG;AACbtB,IAAAA,KAAK,CAACC,IAAN,CAAYoB,UAAU,CAACE,UAAvB,CADmC,CAElCC,OAFkC,CAEzBN,cAFyB,CAApC;AAIAvB,IAAAA,eAAe,CAAEwB,aAAF,EAAiB,eAAjB,CAAf;AACAtB,IAAAA,KAAK,GAAGsB,aAAa,CAACM,WAAd,EAAR;AACA5B,IAAAA,KAAK,CAAC6B,QAAN,CAAgBL,UAAhB,EAA4BC,KAA5B;AACAzB,IAAAA,KAAK,CAAC8B,MAAN,CAAcN,UAAd,EAA0BC,KAA1B;AACA;;AAED,QAAMvB,KAAK,GAAGF,KAAK,CAACK,cAAN,EAAd,CA/DsD,CAiEtD;AACA;;AACA,MAAKH,KAAK,CAACI,MAAN,GAAe,CAApB,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,MAAIyB,IAAI,GAAG7B,KAAK,CAAE,CAAF,CAAhB,CAvEsD,CAyEtD;AACA;AACA;AACA;AACA;;AACA,MAAK,CAAE6B,IAAF,IAAUA,IAAI,CAACC,MAAL,KAAgB,CAA/B,EAAmC;AAClClC,IAAAA,eAAe,CAAEwB,aAAF,EAAiB,eAAjB,CAAf;AACA,UAAMW,OAAO,GAAGX,aAAa,CAACY,cAAd,CAA8B,QAA9B,CAAhB,CAFkC,CAGlC;;AACAlC,IAAAA,KAAK,GAAGA,KAAK,CAACmC,UAAN,EAAR;AACAnC,IAAAA,KAAK,CAACoC,UAAN,CAAkBH,OAAlB;AACAF,IAAAA,IAAI,GAAG/B,KAAK,CAACK,cAAN,GAAwB,CAAxB,CAAP;AACAP,IAAAA,eAAe,CAAEmC,OAAO,CAACT,UAAV,EAAsB,oBAAtB,CAAf;AACAS,IAAAA,OAAO,CAACT,UAAR,CAAmBa,WAAnB,CAAgCJ,OAAhC;AACA;;AAED,SAAOF,IAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { assertIsDefined } from '../utils/assert-is-defined';\n\n/**\n * Get the rectangle of a given Range. Returns `null` if no suitable rectangle\n * can be found.\n *\n * @param {Range} range The range.\n *\n * @return {DOMRect?} The rectangle.\n */\nexport default function getRectangleFromRange( range ) {\n\t// For uncollapsed ranges, get the rectangle that bounds the contents of the\n\t// range; this a rectangle enclosing the union of the bounding rectangles\n\t// for all the elements in the range.\n\tif ( ! range.collapsed ) {\n\t\tconst rects = Array.from( range.getClientRects() );\n\n\t\t// If there's just a single rect, return it.\n\t\tif ( rects.length === 1 ) {\n\t\t\treturn rects[ 0 ];\n\t\t}\n\n\t\t// Ignore tiny selection at the edge of a range.\n\t\tconst filteredRects = rects.filter( ( { width } ) => width > 1 );\n\n\t\t// If it's full of tiny selections, return browser default.\n\t\tif ( filteredRects.length === 0 ) {\n\t\t\treturn range.getBoundingClientRect();\n\t\t}\n\n\t\tif ( filteredRects.length === 1 ) {\n\t\t\treturn filteredRects[ 0 ];\n\t\t}\n\n\t\tlet {\n\t\t\ttop: furthestTop,\n\t\t\tbottom: furthestBottom,\n\t\t\tleft: furthestLeft,\n\t\t\tright: furthestRight,\n\t\t} = filteredRects[ 0 ];\n\n\t\tfor ( const { top, bottom, left, right } of filteredRects ) {\n\t\t\tif ( top < furthestTop ) furthestTop = top;\n\t\t\tif ( bottom > furthestBottom ) furthestBottom = bottom;\n\t\t\tif ( left < furthestLeft ) furthestLeft = left;\n\t\t\tif ( right > furthestRight ) furthestRight = right;\n\t\t}\n\n\t\treturn new window.DOMRect(\n\t\t\tfurthestLeft,\n\t\t\tfurthestTop,\n\t\t\tfurthestRight - furthestLeft,\n\t\t\tfurthestBottom - furthestTop\n\t\t);\n\t}\n\n\tconst { startContainer } = range;\n\tconst { ownerDocument } = startContainer;\n\n\t// Correct invalid \"BR\" ranges. The cannot contain any children.\n\tif ( startContainer.nodeName === 'BR' ) {\n\t\tconst { parentNode } = startContainer;\n\t\tassertIsDefined( parentNode, 'parentNode' );\n\t\tconst index = /** @type {Node[]} */ (\n\t\t\tArray.from( parentNode.childNodes )\n\t\t).indexOf( startContainer );\n\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\trange = ownerDocument.createRange();\n\t\trange.setStart( parentNode, index );\n\t\trange.setEnd( parentNode, index );\n\t}\n\n\tconst rects = range.getClientRects();\n\n\t// If we have multiple rectangles for a collapsed range, there's no way to\n\t// know which it is, so don't return anything.\n\tif ( rects.length > 1 ) {\n\t\treturn null;\n\t}\n\n\tlet rect = rects[ 0 ];\n\n\t// If the collapsed range starts (and therefore ends) at an element node,\n\t// `getClientRects` can be empty in some browsers. This can be resolved\n\t// by adding a temporary text node with zero-width space to the range.\n\t//\n\t// See: https://stackoverflow.com/a/6847328/995445\n\tif ( ! rect || rect.height === 0 ) {\n\t\tassertIsDefined( ownerDocument, 'ownerDocument' );\n\t\tconst padNode = ownerDocument.createTextNode( '\\u200b' );\n\t\t// Do not modify the live range.\n\t\trange = range.cloneRange();\n\t\trange.insertNode( padNode );\n\t\trect = range.getClientRects()[ 0 ];\n\t\tassertIsDefined( padNode.parentNode, 'padNode.parentNode' );\n\t\tpadNode.parentNode.removeChild( padNode );\n\t}\n\n\treturn rect;\n}\n"]}
@@ -72,7 +72,7 @@ function isValidFocusableArea(element) {
72
72
  * Returns all focusable elements within a given context.
73
73
  *
74
74
  * @param {Element} context Element in which to search.
75
- * @param {Object} [options]
75
+ * @param {Object} options
76
76
  * @param {boolean} [options.sequential] If set, only return elements that are
77
77
  * sequentially focusable.
78
78
  * Non-interactive elements with a
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom/src/focusable.js"],"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"],"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,aA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;AACpD,QAAK,CAAED,SAAS,CAAEC,OAAF,CAAhB,EAA8B;AAC7B,aAAO,KAAP;AACA;;AAED,UAAM;AAAEmB,MAAAA;AAAF,QAAenB,OAArB;;AACA,QAAK,WAAWmB,QAAhB,EAA2B;AAC1B,aAAOd,oBAAoB;AAC1B;AAAiCL,MAAAA,OADP,CAA3B;AAGA;;AAED,WAAO,IAAP;AACA,GAbM,CAAP;AAcA","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/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {NodeListOf<HTMLElement>} */\n\t/* eslint-enable jsdoc/no-undefined-types */\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"]}
1
+ {"version":3,"sources":["@wordpress/dom/src/focusable.js"],"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"],"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,aAAT,CAAwBC,UAAxB,EAAqC;AACpC,SAAO,CACNA,UAAU,GAAG,iCAAH,GAAuC,YAD3C,EAEN,SAFM,EAGN,wBAHM,EAIN,4CAJM,EAKN,wBALM,EAMN,0BANM,EAON,6BAPM,EAQN,QARM,EASN,OATM,EAUN,YAVM,EAWN,gDAXM,EAYLC,IAZK,CAYC,GAZD,CAAP;AAaA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,SAAT,CAAoBC,OAApB,EAA8B;AAC7B,SACCA,OAAO,CAACC,WAAR,GAAsB,CAAtB,IACAD,OAAO,CAACE,YAAR,GAAuB,CADvB,IAEAF,OAAO,CAACG,cAAR,GAAyBC,MAAzB,GAAkC,CAHnC;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,oBAAT,CAA+BL,OAA/B,EAAyC;AACxC;AACA,QAAMM,GAAG,GAAGN,OAAO,CAACO,OAAR,CAAiB,WAAjB,CAAZ;;AACA,MAAK,CAAED,GAAP,EAAa;AACZ,WAAO,KAAP;AACA;AAED;;;AACA,QAAME,GAAG,GAAGR,OAAO,CAACS,aAAR,CAAsBC,aAAtB,CACX,kBAAkBJ,GAAG,CAACK,IAAtB,GAA6B,IADlB,CAAZ;AAGA,SAAO,CAAC,CAAEH,GAAH,IAAUT,SAAS,CAAES,GAAF,CAA1B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASI,IAAT,CAAeC,OAAf,EAAsD;AAAA,MAA9B;AAAEhB,IAAAA,UAAU,GAAG;AAAf,GAA8B,uEAAL,EAAK;;AAC5D;;AACA;;AACA;AACA,QAAMiB,QAAQ,GAAGD,OAAO,CAACE,gBAAR,CAA0BnB,aAAa,CAAEC,UAAF,CAAvC,CAAjB;AAEA,SAAOmB,KAAK,CAACC,IAAN,CAAYH,QAAZ,EAAuBI,MAAvB,CAAiClB,OAAF,IAAe;AACpD,QAAK,CAAED,SAAS,CAAEC,OAAF,CAAhB,EAA8B;AAC7B,aAAO,KAAP;AACA;;AAED,UAAM;AAAEmB,MAAAA;AAAF,QAAenB,OAArB;;AACA,QAAK,WAAWmB,QAAhB,EAA2B;AAC1B,aAAOd,oBAAoB;AAC1B;AAAiCL,MAAAA,OADP,CAA3B;AAGA;;AAED,WAAO,IAAP;AACA,GAbM,CAAP;AAcA","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/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {NodeListOf<HTMLElement>} */\n\t/* eslint-enable jsdoc/no-undefined-types */\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"]}
@@ -2,7 +2,7 @@
2
2
  * Returns all focusable elements within a given context.
3
3
  *
4
4
  * @param {Element} context Element in which to search.
5
- * @param {Object} [options]
5
+ * @param {Object} options
6
6
  * @param {boolean} [options.sequential] If set, only return elements that are
7
7
  * sequentially focusable.
8
8
  * Non-interactive elements with a
@@ -14,5 +14,5 @@
14
14
  */
15
15
  export function find(context: Element, { sequential }?: {
16
16
  sequential?: boolean | undefined;
17
- } | undefined): HTMLElement[];
17
+ }): HTMLElement[];
18
18
  //# sourceMappingURL=focusable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusable.d.ts","sourceRoot":"","sources":["../src/focusable.js"],"names":[],"mappings":"AAqFA;;;;;;;;;;;;;GAaG;AACH,8BAXW,OAAO;;gBASN,WAAW,EAAE,CAsBxB"}
1
+ {"version":3,"file":"focusable.d.ts","sourceRoot":"","sources":["../src/focusable.js"],"names":[],"mappings":"AAqFA;;;;;;;;;;;;;GAaG;AACH,8BAXW,OAAO;IAEW,UAAU;IAO3B,WAAW,EAAE,CAsBxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dom",
3
- "version": "3.27.0",
3
+ "version": "3.29.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.27.0"
32
+ "@wordpress/deprecated": "^3.29.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "c25ff895413bad4354c55c0c2d732552618b0d56"
37
+ "gitHead": "9534a7b3bbf07c1d40b94fdb7a3d091f297bfb06"
38
38
  }
@@ -89,7 +89,7 @@ export default function getRectangleFromRange( range ) {
89
89
  // by adding a temporary text node with zero-width space to the range.
90
90
  //
91
91
  // See: https://stackoverflow.com/a/6847328/995445
92
- if ( ! rect ) {
92
+ if ( ! rect || rect.height === 0 ) {
93
93
  assertIsDefined( ownerDocument, 'ownerDocument' );
94
94
  const padNode = ownerDocument.createTextNode( '\u200b' );
95
95
  // Do not modify the live range.
package/src/focusable.js CHANGED
@@ -87,7 +87,7 @@ function isValidFocusableArea( element ) {
87
87
  * Returns all focusable elements within a given context.
88
88
  *
89
89
  * @param {Element} context Element in which to search.
90
- * @param {Object} [options]
90
+ * @param {Object} options
91
91
  * @param {boolean} [options.sequential] If set, only return elements that are
92
92
  * sequentially focusable.
93
93
  * Non-interactive elements with a
@@ -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.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.es2020.bigint.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.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.esnext.intl.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/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":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"80d2e2a2e1685c82cba3c320f5d077376fadff77fe1f52a4c29f995bdc40ea70","fdcb64de272733ab2cd819599a3ef9c9ae8aad7c209ff28b7c6399022383cc7a","2f84d4e9df1a03b75f60e69b02d021f2f63704f50a35e0f2bde516743763ad60","a7836408f857cb8855443e0ff79d3ed7027415dca85f312c5f9f47daa6cd355d","526ccdce763cd3eed48a276874e970211dd8dca17e2cf6835fd439ad43fd64ca","99546def4f9cd760e5ee13c0cce45c83aaa3d5474d75cef79c34b1990a808022","1caa056d021a35691778948dcb48eb6f7550110ea33c0d14c03f0445daa93559","4fcfb368b1ba498dab2fd60a1c680c137aacc6df49d8e0e802c9de00f0e047f0","c16b538f18087f31e1b99251169cd93e8d7a1ba8dde51768978f4bde67f318ac","f329cdfc6aa9467443275d35b330b78fccfe85ff28d1a54e415143645c294ed9","9c32c48fe5fb3b9929609bbd1d7233ed1fc13ac7aaee602b8dd27a0a90baf9cf","9816eb62d7014f570356c988308e390770fea83993d6eae79788cd79a31ea6dc","dea4257186ad318062499e0aff7122433b1081b7883e95ef78d9b4121fc8e7da","0577838617fd2f9c66a997b0f0e4e29b9914f4ecd190d376c011b324e4e41a1c","f5b932cd4c47954ecb9c5010d848afe821486d5785a3c1c81e670146f4245688","4d31f8f7e9d8a43d2fd3c5a378e390080706392dd4d1541fc6b6f876ed961cf4","756cc95fd142eb928ba7bd366cc2756a902d8a1219182a45a2820e86702b1f3e","c6d152163c07dc49df635b774cbc479cad88b467f924f3141a28f5a378ec4a36","4312fd698114e973469529ec29680789e8ce13ffddcf711a8660c85e522b4069","cb412dab570deef76d26e0c5759e3fbe12625947ac6a82037573c788b7a2d1a4","59fbe797b38f7f549100d38fc9a4c6cd0f4b990407700f5e1979a54c9d8e3ed6","e8be8e4d18f330bdd294cdbe7d3c4a89e8dca65585284745a25c515ecb69249f","8b692a361fc9f2d4102106f168b35cf6f30c9efc66050108001955a1a59b4fd2","4b8e98da59bd094293f48bcba2b2863f16844f7b628755317c4376d2a57aae6f","6199e013116305fa2d162835ad812abfe210076e1249852851c5a80a753f4f3d","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","ba688a4815abd9d27b425a819def1721b61e1798acc748b471e54d50a7804bcd","6ead72509efbd9dc382f48a146420b917c84af52dbaa1c79c1c944a043503032","609b8944af1aa9b73959c0bd766370986176a197c16c27e365e867a0bc85eed8","2ffc9898fdf8f285b73f08ee256ca9a6f20cf3de25c57dd7aa28f7558d3af624","0fb6bab9bd95185809964d513dcfeeab6b5609d280dcc6291b5277e36998afe1","2d18411640dd8fcf1067392b839136628cafef5a648d0d49dc9da2f7d344046e","57597a1e8735ae08b671194c8b64a2c2831fd6ce2793d1bca705dbceb41bdaae","fc9b503ac41bf643bdd2c5bcf21e7e8c052881dd6b94699e3624f3a60e02b0be","665d3d55e94122f2fe1c2dd78dd61774134151557a3b8dd41d49868a642c1277","2259073e3a0fcbd5d873f90465ad8364007668a97c0291a6b6d7975d8edbe30d","02959309d4b7d9a875c4f175abae0a359a074585513d073d1fbb828b704e5663","d0472eb54f481ef265c3407b31df68485efda04e40cc8a7238c8dbdaf93fe81b","eb89338ad7e6dac4cf3435ed1351b5d8340b9b60f583560e89ae8e9997f1ea31","b40f71b721dba07996ea071f624b52ca6148278a12a17f2cf84b56eb1828ceaf","0d0dd5ae0237a3571383b9ac701d40220e1d963d0bbb22473c336225b2ed44a7","1c1f2d8b269e664047a9b56ce701c02e4223ce8f0fddc513ab4f311af8dbe654","dcc4b56e334bd6f9a8680a5dd343e417cdb03bae06bdc4786211d2cdfd7899e8","acbe60d616549a3815593f33a7a34faf0b0d063257c74f3b01bfc20dae42652e","0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20",{"version":"7b1b47a00ea238e04189f6a4796282ea252bf4f3afce92cdeaed4fe01c669a40","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[70,71,72,73],[70],[71],[74],[81,82,84,89,90,91],[48,49],[51,52,53],[48],[51,54],[57],[57,66],[49,50,51,53,55,56,58,59,61,62,63,69,76,77,79,80,81,82,83,84,85,86,87,88,89,93],[52,53],[48,49,60,63,64,65,67],[48,60],[60],[68],[52,75],[52],[48,60,63,67],[78],[92],[48,81,82],[82],[87],[45,46,47,90,94],[46]],"referencedMap":[[74,1],[71,2],[72,3],[75,4],[92,5],[50,6],[56,7],[51,8],[55,9],[57,8],[59,10],[49,8],[58,10],[67,11],[94,12],[54,13],[81,8],[68,14],[61,15],[62,16],[69,17],[76,18],[63,10],[65,8],[53,19],[77,17],[78,20],[79,21],[80,21],[93,22],[82,8],[85,8],[83,23],[87,24],[88,25],[84,8],[86,8],[95,26],[47,27]],"exportedModulesMap":[[74,1],[71,2],[72,3],[75,4],[92,5],[50,6],[56,7],[51,8],[55,9],[57,8],[59,10],[49,8],[58,10],[67,11],[94,12],[54,13],[81,8],[68,14],[61,15],[62,16],[69,17],[76,18],[63,10],[65,8],[53,19],[77,17],[78,20],[79,21],[80,21],[93,22],[82,8],[85,8],[83,23],[87,24],[88,25],[84,8],[86,8],[95,26],[47,27]],"semanticDiagnosticsPerFile":[10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,70,73,74,71,72,75,45,66,92,50,56,51,55,57,59,64,49,58,67,94,54,81,68,91,89,61,62,69,52,60,76,63,65,53,77,78,79,80,93,82,85,83,87,88,84,86,46,95,90,47,48,96]},"version":"4.4.2"}
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.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.esnext.intl.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/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":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","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":"0577838617fd2f9c66a997b0f0e4e29b9914f4ecd190d376c011b324e4e41a1c","signature":"ada3323e8052bf3834f6921dcd57017e318fdf6c47e2a23cfc350104e63c6736"},{"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":"4b8e98da59bd094293f48bcba2b2863f16844f7b628755317c4376d2a57aae6f","signature":"977179a032d5075028c8849642df39626c0631aa14544042b594e82b9616f67d"},{"version":"6199e013116305fa2d162835ad812abfe210076e1249852851c5a80a753f4f3d","signature":"1dcc986aaa65080625a55f618c1141fbf4f4acbc0d94f4b0ab9999aaf98ac4b2"},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8",{"version":"905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","signature":"e4956b273081c74d1dba8d2f28889922c7feec072e6c7b789d23d385438ee87a"},{"version":"ba688a4815abd9d27b425a819def1721b61e1798acc748b471e54d50a7804bcd","signature":"958ee45e342dcb7e81d8540d060c29b26db76790258945e9ffa4e3e6ec1ab16c"},{"version":"6ead72509efbd9dc382f48a146420b917c84af52dbaa1c79c1c944a043503032","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":"b40f71b721dba07996ea071f624b52ca6148278a12a17f2cf84b56eb1828ceaf","signature":"4ab84c99c2d8de9ed09d8cec1d5ebe7dc69b0d14ffbb6f35a08aad635a467459"},{"version":"0d0dd5ae0237a3571383b9ac701d40220e1d963d0bbb22473c336225b2ed44a7","signature":"38b64d98cbfb43b7d5105e47e9c5b7f106c2c619227ca3172d2ad6e4afddeeda"},{"version":"1c1f2d8b269e664047a9b56ce701c02e4223ce8f0fddc513ab4f311af8dbe654","signature":"6cc47928de7798cab399c6bde512a071c571376b1d8939e86c6153b7c789b904"},{"version":"dcc4b56e334bd6f9a8680a5dd343e417cdb03bae06bdc4786211d2cdfd7899e8","signature":"c46b6a3e7cf8c2e34dce279719ba3eec1475005435984daa522544afa3d01659"},{"version":"acbe60d616549a3815593f33a7a34faf0b0d063257c74f3b01bfc20dae42652e","signature":"4e91ca7ccb84757aad03b4a2ad0f5260ac4e3cc67bdf5e684feff2266e88c2fa"},{"version":"0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20","signature":"4f42c66b38743a110f8ae430ed7c4237170cb27f38620eaca130be2081de007f"},{"version":"084d8b571b1e8b984824263889aabc2c37d29b49f7cbab3e4ebd05e4c02891eb","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[81,82,83,84],[81],[82],[85],[92,93,95,100,101,102],[59,60],[62,63,64],[59],[62,65],[68],[68,77],[60,61,62,64,66,67,69,70,72,73,74,80,87,88,90,91,92,93,94,95,96,97,98,99,100,104],[63,64],[59,60,71,74,75,76,78],[59,71],[71],[79],[63,86],[63],[59,71,74,78],[89],[103],[59,92,93],[93],[98],[56,57,58,101,105],[57]],"referencedMap":[[85,1],[82,2],[83,3],[86,4],[103,5],[61,6],[67,7],[62,8],[66,9],[68,8],[70,10],[60,8],[69,10],[78,11],[105,12],[65,13],[92,8],[79,14],[72,15],[73,16],[80,17],[87,18],[74,10],[76,8],[64,19],[88,17],[89,20],[90,21],[91,21],[104,22],[93,8],[96,8],[94,23],[98,24],[99,25],[95,8],[97,8],[106,26],[58,27]],"exportedModulesMap":[[85,1],[82,2],[83,3],[86,4],[104,22]],"semanticDiagnosticsPerFile":[11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,81,84,85,82,83,86,56,77,103,61,67,62,66,68,70,75,60,69,78,105,65,92,79,102,100,72,73,80,63,71,87,74,76,64,88,89,90,91,104,93,96,94,98,99,95,97,57,106,101,58,59,107],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"4.9.5"}