@wordpress/dom 4.5.0 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.7.0 (2024-09-05)
6
+
7
+ ## 4.6.0 (2024-08-21)
8
+
5
9
  ## 4.5.0 (2024-08-07)
6
10
 
7
11
  ## 4.4.0 (2024-07-24)
package/README.md CHANGED
@@ -239,6 +239,22 @@ _Returns_
239
239
 
240
240
  - `boolean`: True if rtl, false if ltr.
241
241
 
242
+ ### isSelectionForward
243
+
244
+ Returns true if the given selection object is in the forward direction, or false otherwise.
245
+
246
+ _Related_
247
+
248
+ - <https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition>
249
+
250
+ _Parameters_
251
+
252
+ - _selection_ `Selection`: Selection object to check.
253
+
254
+ _Returns_
255
+
256
+ - `boolean`: Whether the selection is forward.
257
+
242
258
  ### isTextContent
243
259
 
244
260
  _Parameters_
@@ -94,6 +94,12 @@ Object.defineProperty(exports, "isRTL", {
94
94
  return _isRtl.default;
95
95
  }
96
96
  });
97
+ Object.defineProperty(exports, "isSelectionForward", {
98
+ enumerable: true,
99
+ get: function () {
100
+ return _isSelectionForward.default;
101
+ }
102
+ });
97
103
  Object.defineProperty(exports, "isTextField", {
98
104
  enumerable: true,
99
105
  get: function () {
@@ -186,4 +192,5 @@ var _isEmpty = _interopRequireDefault(require("./is-empty"));
186
192
  var _removeInvalidHtml = _interopRequireDefault(require("./remove-invalid-html"));
187
193
  var _isRtl = _interopRequireDefault(require("./is-rtl"));
188
194
  var _safeHtml = _interopRequireDefault(require("./safe-html"));
195
+ var _isSelectionForward = _interopRequireDefault(require("./is-selection-forward"));
189
196
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_computeCaretRect","_interopRequireDefault","require","_documentHasTextSelection","_documentHasUncollapsedSelection","_documentHasSelection","_getRectangleFromRange","_getScrollContainer","_getOffsetParent","_isEntirelySelected","_isFormElement","_isHorizontalEdge","_isNumberInput","_isTextField","_isVerticalEdge","_placeCaretAtHorizontalEdge","_placeCaretAtVerticalEdge","_replace","_remove","_insertAfter","_unwrap","_replaceTag","_wrap","_stripHtml","_isEmpty","_removeInvalidHtml","_isRtl","_safeHtml"],"sources":["@wordpress/dom/src/dom/index.js"],"sourcesContent":["export { default as computeCaretRect } from './compute-caret-rect';\nexport { default as documentHasTextSelection } from './document-has-text-selection';\nexport { default as documentHasUncollapsedSelection } from './document-has-uncollapsed-selection';\nexport { default as documentHasSelection } from './document-has-selection';\nexport { default as getRectangleFromRange } from './get-rectangle-from-range';\nexport { default as getScrollContainer } from './get-scroll-container';\nexport { default as getOffsetParent } from './get-offset-parent';\nexport { default as isEntirelySelected } from './is-entirely-selected';\nexport { default as isFormElement } from './is-form-element';\nexport { default as isHorizontalEdge } from './is-horizontal-edge';\nexport { default as isNumberInput } from './is-number-input';\nexport { default as isTextField } from './is-text-field';\nexport { default as isVerticalEdge } from './is-vertical-edge';\nexport { default as placeCaretAtHorizontalEdge } from './place-caret-at-horizontal-edge';\nexport { default as placeCaretAtVerticalEdge } from './place-caret-at-vertical-edge';\nexport { default as replace } from './replace';\nexport { default as remove } from './remove';\nexport { default as insertAfter } from './insert-after';\nexport { default as unwrap } from './unwrap';\nexport { default as replaceTag } from './replace-tag';\nexport { default as wrap } from './wrap';\nexport { default as __unstableStripHTML } from './strip-html';\nexport { default as isEmpty } from './is-empty';\nexport { default as removeInvalidHTML } from './remove-invalid-html';\nexport { default as isRTL } from './is-rtl';\nexport { default as safeHTML } from './safe-html';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,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RequireDefault","require","_documentHasTextSelection","_documentHasUncollapsedSelection","_documentHasSelection","_getRectangleFromRange","_getScrollContainer","_getOffsetParent","_isEntirelySelected","_isFormElement","_isHorizontalEdge","_isNumberInput","_isTextField","_isVerticalEdge","_placeCaretAtHorizontalEdge","_placeCaretAtVerticalEdge","_replace","_remove","_insertAfter","_unwrap","_replaceTag","_wrap","_stripHtml","_isEmpty","_removeInvalidHtml","_isRtl","_safeHtml","_isSelectionForward"],"sources":["@wordpress/dom/src/dom/index.js"],"sourcesContent":["export { default as computeCaretRect } from './compute-caret-rect';\nexport { default as documentHasTextSelection } from './document-has-text-selection';\nexport { default as documentHasUncollapsedSelection } from './document-has-uncollapsed-selection';\nexport { default as documentHasSelection } from './document-has-selection';\nexport { default as getRectangleFromRange } from './get-rectangle-from-range';\nexport { default as getScrollContainer } from './get-scroll-container';\nexport { default as getOffsetParent } from './get-offset-parent';\nexport { default as isEntirelySelected } from './is-entirely-selected';\nexport { default as isFormElement } from './is-form-element';\nexport { default as isHorizontalEdge } from './is-horizontal-edge';\nexport { default as isNumberInput } from './is-number-input';\nexport { default as isTextField } from './is-text-field';\nexport { default as isVerticalEdge } from './is-vertical-edge';\nexport { default as placeCaretAtHorizontalEdge } from './place-caret-at-horizontal-edge';\nexport { default as placeCaretAtVerticalEdge } from './place-caret-at-vertical-edge';\nexport { default as replace } from './replace';\nexport { default as remove } from './remove';\nexport { default as insertAfter } from './insert-after';\nexport { default as unwrap } from './unwrap';\nexport { default as replaceTag } from './replace-tag';\nexport { default as wrap } from './wrap';\nexport { default as __unstableStripHTML } from './strip-html';\nexport { default as isEmpty } from './is-empty';\nexport { default as removeInvalidHTML } from './remove-invalid-html';\nexport { default as isRTL } from './is-rtl';\nexport { default as safeHTML } from './safe-html';\nexport { default as isSelectionForward } from './is-selection-forward';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA;AACA,IAAAwB,MAAA,GAAAzB,sBAAA,CAAAC,OAAA;AACA,IAAAyB,SAAA,GAAA1B,sBAAA,CAAAC,OAAA;AACA,IAAA0B,mBAAA,GAAA3B,sBAAA,CAAAC,OAAA","ignoreList":[]}
@@ -71,13 +71,6 @@ function placeCaretAtEdge(container, isReverse, x) {
71
71
  }
72
72
  return;
73
73
  }
74
- if (!container.isContentEditable) {
75
- return;
76
- }
77
- const range = (0, _scrollIfNoRange.scrollIfNoRange)(container, isReverse, () => getRange(container, isReverse, x));
78
- if (!range) {
79
- return;
80
- }
81
74
  const {
82
75
  ownerDocument
83
76
  } = container;
@@ -87,6 +80,14 @@ function placeCaretAtEdge(container, isReverse, x) {
87
80
  (0, _assertIsDefined.assertIsDefined)(defaultView, 'defaultView');
88
81
  const selection = defaultView.getSelection();
89
82
  (0, _assertIsDefined.assertIsDefined)(selection, 'selection');
83
+ if (!container.isContentEditable) {
84
+ selection.removeAllRanges();
85
+ return;
86
+ }
87
+ const range = (0, _scrollIfNoRange.scrollIfNoRange)(container, isReverse, () => getRange(container, isReverse, x));
88
+ if (!range) {
89
+ return;
90
+ }
90
91
  selection.removeAllRanges();
91
92
  selection.addRange(range);
92
93
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_hiddenCaretRangeFromPoint","_interopRequireDefault","require","_assertIsDefined","_isInputOrTextArea","_isRtl","_scrollIfNoRange","getRange","container","isReverse","x","ownerDocument","isReverseDir","isRTL","containerRect","getBoundingClientRect","undefined","right","left","y","bottom","top","hiddenCaretRangeFromPoint","placeCaretAtEdge","focus","isInputOrTextArea","selectionStart","value","length","selectionEnd","isContentEditable","range","scrollIfNoRange","defaultView","assertIsDefined","selection","getSelection","removeAllRanges","addRange"],"sources":["@wordpress/dom/src/dom/place-caret-at-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport isRTL from './is-rtl';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Gets the range to place.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n *\n * @return {Range|null} The range to place.\n */\nfunction getRange( container, isReverse, x ) {\n\tconst { ownerDocument } = container;\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\t// When placing at the end (isReverse), find the closest range to the bottom\n\t// right corner. When placing at the start, to the top left corner.\n\t// Ensure x is defined and within the container's boundaries. When it's\n\t// exactly at the boundary, it's not considered within the boundaries.\n\tif ( x === undefined ) {\n\t\tx = isReverse ? containerRect.right - 1 : containerRect.left + 1;\n\t} else if ( x <= containerRect.left ) {\n\t\tx = containerRect.left + 1;\n\t} else if ( x >= containerRect.right ) {\n\t\tx = containerRect.right - 1;\n\t}\n\tconst y = isReverseDir ? containerRect.bottom - 1 : containerRect.top + 1;\n\treturn hiddenCaretRangeFromPoint( ownerDocument, x, y, container );\n}\n\n/**\n * Places the caret at start or end of a given element.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n */\nexport default function placeCaretAtEdge( container, isReverse, x ) {\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tcontainer.focus();\n\n\tif ( isInputOrTextArea( container ) ) {\n\t\t// The element may not support selection setting.\n\t\tif ( typeof container.selectionStart !== 'number' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\tcontainer.selectionStart = container.value.length;\n\t\t\tcontainer.selectionEnd = container.value.length;\n\t\t} else {\n\t\t\tcontainer.selectionStart = 0;\n\t\t\tcontainer.selectionEnd = 0;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tif ( ! container.isContentEditable ) {\n\t\treturn;\n\t}\n\n\tconst range = scrollIfNoRange( container, isReverse, () =>\n\t\tgetRange( container, isReverse, x )\n\t);\n\n\tif ( ! range ) {\n\t\treturn;\n\t}\n\n\tconst { ownerDocument } = container;\n\tconst { defaultView } = ownerDocument;\n\tassertIsDefined( defaultView, 'defaultView' );\n\tconst selection = defaultView.getSelection();\n\tassertIsDefined( selection, 'selection' );\n\tselection.removeAllRanges();\n\tselection.addRange( range );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAPA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,QAAQA,CAAEC,SAAS,EAAEC,SAAS,EAAEC,CAAC,EAAG;EAC5C,MAAM;IAAEC;EAAc,CAAC,GAAGH,SAAS;EACnC;EACA,MAAMI,YAAY,GAAG,IAAAC,cAAK,EAAEL,SAAU,CAAC,GAAG,CAAEC,SAAS,GAAGA,SAAS;EACjE,MAAMK,aAAa,GAAGN,SAAS,CAACO,qBAAqB,CAAC,CAAC;EACvD;EACA;EACA;EACA;EACA,IAAKL,CAAC,KAAKM,SAAS,EAAG;IACtBN,CAAC,GAAGD,SAAS,GAAGK,aAAa,CAACG,KAAK,GAAG,CAAC,GAAGH,aAAa,CAACI,IAAI,GAAG,CAAC;EACjE,CAAC,MAAM,IAAKR,CAAC,IAAII,aAAa,CAACI,IAAI,EAAG;IACrCR,CAAC,GAAGI,aAAa,CAACI,IAAI,GAAG,CAAC;EAC3B,CAAC,MAAM,IAAKR,CAAC,IAAII,aAAa,CAACG,KAAK,EAAG;IACtCP,CAAC,GAAGI,aAAa,CAACG,KAAK,GAAG,CAAC;EAC5B;EACA,MAAME,CAAC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,SAAS,EAAE,WAAY,CAAC;EACzCA,SAAS,CAACE,eAAe,CAAC,CAAC;EAC3BF,SAAS,CAACG,QAAQ,CAAEP,KAAM,CAAC;AAC5B","ignoreList":[]}
1
+ {"version":3,"names":["_hiddenCaretRangeFromPoint","_interopRequireDefault","require","_assertIsDefined","_isInputOrTextArea","_isRtl","_scrollIfNoRange","getRange","container","isReverse","x","ownerDocument","isReverseDir","isRTL","containerRect","getBoundingClientRect","undefined","right","left","y","bottom","top","hiddenCaretRangeFromPoint","placeCaretAtEdge","focus","isInputOrTextArea","selectionStart","value","length","selectionEnd","defaultView","assertIsDefined","selection","getSelection","isContentEditable","removeAllRanges","range","scrollIfNoRange","addRange"],"sources":["@wordpress/dom/src/dom/place-caret-at-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport isRTL from './is-rtl';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Gets the range to place.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n *\n * @return {Range|null} The range to place.\n */\nfunction getRange( container, isReverse, x ) {\n\tconst { ownerDocument } = container;\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\t// When placing at the end (isReverse), find the closest range to the bottom\n\t// right corner. When placing at the start, to the top left corner.\n\t// Ensure x is defined and within the container's boundaries. When it's\n\t// exactly at the boundary, it's not considered within the boundaries.\n\tif ( x === undefined ) {\n\t\tx = isReverse ? containerRect.right - 1 : containerRect.left + 1;\n\t} else if ( x <= containerRect.left ) {\n\t\tx = containerRect.left + 1;\n\t} else if ( x >= containerRect.right ) {\n\t\tx = containerRect.right - 1;\n\t}\n\tconst y = isReverseDir ? containerRect.bottom - 1 : containerRect.top + 1;\n\treturn hiddenCaretRangeFromPoint( ownerDocument, x, y, container );\n}\n\n/**\n * Places the caret at start or end of a given element.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n */\nexport default function placeCaretAtEdge( container, isReverse, x ) {\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tcontainer.focus();\n\n\tif ( isInputOrTextArea( container ) ) {\n\t\t// The element may not support selection setting.\n\t\tif ( typeof container.selectionStart !== 'number' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\tcontainer.selectionStart = container.value.length;\n\t\t\tcontainer.selectionEnd = container.value.length;\n\t\t} else {\n\t\t\tcontainer.selectionStart = 0;\n\t\t\tcontainer.selectionEnd = 0;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tconst { ownerDocument } = container;\n\tconst { defaultView } = ownerDocument;\n\tassertIsDefined( defaultView, 'defaultView' );\n\tconst selection = defaultView.getSelection();\n\tassertIsDefined( selection, 'selection' );\n\n\tif ( ! container.isContentEditable ) {\n\t\tselection.removeAllRanges();\n\t\treturn;\n\t}\n\n\tconst range = scrollIfNoRange( container, isReverse, () =>\n\t\tgetRange( container, isReverse, x )\n\t);\n\n\tif ( ! range ) {\n\t\treturn;\n\t}\n\n\tselection.removeAllRanges();\n\tselection.addRange( range );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAPA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,QAAQA,CAAEC,SAAS,EAAEC,SAAS,EAAEC,CA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rB,SAAS,CAACmB,KAAK,CAACC,MAAM;IAChD,CAAC,MAAM;MACNpB,SAAS,CAACkB,cAAc,GAAG,CAAC;MAC5BlB,SAAS,CAACqB,YAAY,GAAG,CAAC;IAC3B;IAEA;EACD;EAEA,MAAM;IAAElB;EAAc,CAAC,GAAGH,SAAS;EACnC,MAAM;IAAEsB;EAAY,CAAC,GAAGnB,aAAa;EACrC,IAAAoB,gCAAe,EAAED,WAAW,EAAE,aAAc,CAAC;EAC7C,MAAME,SAAS,GAAGF,WAAW,CAACG,YAAY,CAAC,CAAC;EAC5C,IAAAF,gCAAe,EAAEC,SAAS,EAAE,WAAY,CAAC;EAEzC,IAAK,CAAExB,SAAS,CAAC0B,iBAAiB,EAAG;IACpCF,SAAS,CAACG,eAAe,CAAC,CAAC;IAC3B;EACD;EAEA,MAAMC,KAAK,GAAG,IAAAC,gCAAe,EAAE7B,SAAS,EAAEC,SAAS,EAAE,MACpDF,QAAQ,CAAEC,SAAS,EAAEC,SAAS,EAAEC,CAAE,CACnC,CAAC;EAED,IAAK,CAAE0B,KAAK,EAAG;IACd;EACD;EAEAJ,SAAS,CAACG,eAAe,CAAC,CAAC;EAC3BH,SAAS,CAACM,QAAQ,CAAEF,KAAM,CAAC;AAC5B","ignoreList":[]}
@@ -24,4 +24,5 @@ export { default as isEmpty } from './is-empty';
24
24
  export { default as removeInvalidHTML } from './remove-invalid-html';
25
25
  export { default as isRTL } from './is-rtl';
26
26
  export { default as safeHTML } from './safe-html';
27
+ export { default as isSelectionForward } from './is-selection-forward';
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default","computeCaretRect","documentHasTextSelection","documentHasUncollapsedSelection","documentHasSelection","getRectangleFromRange","getScrollContainer","getOffsetParent","isEntirelySelected","isFormElement","isHorizontalEdge","isNumberInput","isTextField","isVerticalEdge","placeCaretAtHorizontalEdge","placeCaretAtVerticalEdge","replace","remove","insertAfter","unwrap","replaceTag","wrap","__unstableStripHTML","isEmpty","removeInvalidHTML","isRTL","safeHTML"],"sources":["@wordpress/dom/src/dom/index.js"],"sourcesContent":["export { default as computeCaretRect } from './compute-caret-rect';\nexport { default as documentHasTextSelection } from './document-has-text-selection';\nexport { default as documentHasUncollapsedSelection } from './document-has-uncollapsed-selection';\nexport { default as documentHasSelection } from './document-has-selection';\nexport { default as getRectangleFromRange } from './get-rectangle-from-range';\nexport { default as getScrollContainer } from './get-scroll-container';\nexport { default as getOffsetParent } from './get-offset-parent';\nexport { default as isEntirelySelected } from './is-entirely-selected';\nexport { default as isFormElement } from './is-form-element';\nexport { default as isHorizontalEdge } from './is-horizontal-edge';\nexport { default as isNumberInput } from './is-number-input';\nexport { default as isTextField } from './is-text-field';\nexport { default as isVerticalEdge } from './is-vertical-edge';\nexport { default as placeCaretAtHorizontalEdge } from './place-caret-at-horizontal-edge';\nexport { default as placeCaretAtVerticalEdge } from './place-caret-at-vertical-edge';\nexport { default as replace } from './replace';\nexport { default as remove } from './remove';\nexport { default as insertAfter } from './insert-after';\nexport { default as unwrap } from './unwrap';\nexport { default as replaceTag } from './replace-tag';\nexport { default as wrap } from './wrap';\nexport { default as __unstableStripHTML } from './strip-html';\nexport { default as isEmpty } from './is-empty';\nexport { default as removeInvalidHTML } from './remove-invalid-html';\nexport { default as isRTL } from './is-rtl';\nexport { default as safeHTML } from './safe-html';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,gBAAgB,QAAQ,sBAAsB;AAClE,SAASD,OAAO,IAAIE,wBAAwB,QAAQ,+BAA+B;AACnF,SAASF,OAAO,IAAIG,+BAA+B,QAAQ,sCAAsC;AACjG,SAASH,OAAO,IAAII,oBAAoB,QAAQ,0BAA0B;AAC1E,SAASJ,OAAO,IAAIK,qBAAqB,QAAQ,4BAA4B;AAC7E,SAASL,OAAO,IAAIM,kBAAkB,QAAQ,wBAAwB;AACtE,SAASN,OAAO,IAAIO,eAAe,QAAQ,qBAAqB;AAChE,SAASP,OAAO,IAAIQ,kBAAkB,QAAQ,wBAAwB;AACtE,SAASR,OAAO,IAAIS,aAAa,QAAQ,mBAAmB;AAC5D,SAAST,OAAO,IAAIU,gBAAgB,QAAQ,sBAAsB;AAClE,SAASV,OAAO,IAAIW,aAAa,QAAQ,mBAAmB;AAC5D,SAASX,OAAO,IAAIY,WAAW,QAAQ,iBAAiB;AACxD,SAASZ,OAAO,IAAIa,cAAc,QAAQ,oBAAoB;AAC9D,SAASb,OAAO,IAAIc,0BAA0B,QAAQ,kCAAkC;AACxF,SAASd,OAAO,IAAIe,wBAAwB,QAAQ,gCAAgC;AACpF,SAASf,OAAO,IAAIgB,OAAO,QAAQ,WAAW;AAC9C,SAAShB,OAAO,IAAIiB,MAAM,QAAQ,UAAU;AAC5C,SAASjB,OAAO,IAAIkB,WAAW,QAAQ,gBAAgB;AACvD,SAASlB,OAAO,IAAImB,MAAM,QAAQ,UAAU;AAC5C,SAASnB,OAAO,IAAIoB,UAAU,QAAQ,eAAe;AACrD,SAASpB,OAAO,IAAIqB,IAAI,QAAQ,QAAQ;AACxC,SAASrB,OAAO,IAAIsB,mBAAmB,QAAQ,cAAc;AAC7D,SAAStB,OAAO,IAAIuB,OAAO,QAAQ,YAAY;AAC/C,SAASvB,OAAO,IAAIwB,iBAAiB,QAAQ,uBAAuB;AACpE,SAASxB,OAAO,IAAIyB,KAAK,QAAQ,UAAU;AAC3C,SAASzB,OAAO,IAAI0B,QAAQ,QAAQ,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["default","computeCaretRect","documentHasTextSelection","documentHasUncollapsedSelection","documentHasSelection","getRectangleFromRange","getScrollContainer","getOffsetParent","isEntirelySelected","isFormElement","isHorizontalEdge","isNumberInput","isTextField","isVerticalEdge","placeCaretAtHorizontalEdge","placeCaretAtVerticalEdge","replace","remove","insertAfter","unwrap","replaceTag","wrap","__unstableStripHTML","isEmpty","removeInvalidHTML","isRTL","safeHTML","isSelectionForward"],"sources":["@wordpress/dom/src/dom/index.js"],"sourcesContent":["export { default as computeCaretRect } from './compute-caret-rect';\nexport { default as documentHasTextSelection } from './document-has-text-selection';\nexport { default as documentHasUncollapsedSelection } from './document-has-uncollapsed-selection';\nexport { default as documentHasSelection } from './document-has-selection';\nexport { default as getRectangleFromRange } from './get-rectangle-from-range';\nexport { default as getScrollContainer } from './get-scroll-container';\nexport { default as getOffsetParent } from './get-offset-parent';\nexport { default as isEntirelySelected } from './is-entirely-selected';\nexport { default as isFormElement } from './is-form-element';\nexport { default as isHorizontalEdge } from './is-horizontal-edge';\nexport { default as isNumberInput } from './is-number-input';\nexport { default as isTextField } from './is-text-field';\nexport { default as isVerticalEdge } from './is-vertical-edge';\nexport { default as placeCaretAtHorizontalEdge } from './place-caret-at-horizontal-edge';\nexport { default as placeCaretAtVerticalEdge } from './place-caret-at-vertical-edge';\nexport { default as replace } from './replace';\nexport { default as remove } from './remove';\nexport { default as insertAfter } from './insert-after';\nexport { default as unwrap } from './unwrap';\nexport { default as replaceTag } from './replace-tag';\nexport { default as wrap } from './wrap';\nexport { default as __unstableStripHTML } from './strip-html';\nexport { default as isEmpty } from './is-empty';\nexport { default as removeInvalidHTML } from './remove-invalid-html';\nexport { default as isRTL } from './is-rtl';\nexport { default as safeHTML } from './safe-html';\nexport { default as isSelectionForward } from './is-selection-forward';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,gBAAgB,QAAQ,sBAAsB;AAClE,SAASD,OAAO,IAAIE,wBAAwB,QAAQ,+BAA+B;AACnF,SAASF,OAAO,IAAIG,+BAA+B,QAAQ,sCAAsC;AACjG,SAASH,OAAO,IAAII,oBAAoB,QAAQ,0BAA0B;AAC1E,SAASJ,OAAO,IAAIK,qBAAqB,QAAQ,4BAA4B;AAC7E,SAASL,OAAO,IAAIM,kBAAkB,QAAQ,wBAAwB;AACtE,SAASN,OAAO,IAAIO,eAAe,QAAQ,qBAAqB;AAChE,SAASP,OAAO,IAAIQ,kBAAkB,QAAQ,wBAAwB;AACtE,SAASR,OAAO,IAAIS,aAAa,QAAQ,mBAAmB;AAC5D,SAAST,OAAO,IAAIU,gBAAgB,QAAQ,sBAAsB;AAClE,SAASV,OAAO,IAAIW,aAAa,QAAQ,mBAAmB;AAC5D,SAASX,OAAO,IAAIY,WAAW,QAAQ,iBAAiB;AACxD,SAASZ,OAAO,IAAIa,cAAc,QAAQ,oBAAoB;AAC9D,SAASb,OAAO,IAAIc,0BAA0B,QAAQ,kCAAkC;AACxF,SAASd,OAAO,IAAIe,wBAAwB,QAAQ,gCAAgC;AACpF,SAASf,OAAO,IAAIgB,OAAO,QAAQ,WAAW;AAC9C,SAAShB,OAAO,IAAIiB,MAAM,QAAQ,UAAU;AAC5C,SAASjB,OAAO,IAAIkB,WAAW,QAAQ,gBAAgB;AACvD,SAASlB,OAAO,IAAImB,MAAM,QAAQ,UAAU;AAC5C,SAASnB,OAAO,IAAIoB,UAAU,QAAQ,eAAe;AACrD,SAASpB,OAAO,IAAIqB,IAAI,QAAQ,QAAQ;AACxC,SAASrB,OAAO,IAAIsB,mBAAmB,QAAQ,cAAc;AAC7D,SAAStB,OAAO,IAAIuB,OAAO,QAAQ,YAAY;AAC/C,SAASvB,OAAO,IAAIwB,iBAAiB,QAAQ,uBAAuB;AACpE,SAASxB,OAAO,IAAIyB,KAAK,QAAQ,UAAU;AAC3C,SAASzB,OAAO,IAAI0B,QAAQ,QAAQ,aAAa;AACjD,SAAS1B,OAAO,IAAI2B,kBAAkB,QAAQ,wBAAwB","ignoreList":[]}
@@ -64,13 +64,6 @@ export default function placeCaretAtEdge(container, isReverse, x) {
64
64
  }
65
65
  return;
66
66
  }
67
- if (!container.isContentEditable) {
68
- return;
69
- }
70
- const range = scrollIfNoRange(container, isReverse, () => getRange(container, isReverse, x));
71
- if (!range) {
72
- return;
73
- }
74
67
  const {
75
68
  ownerDocument
76
69
  } = container;
@@ -80,6 +73,14 @@ export default function placeCaretAtEdge(container, isReverse, x) {
80
73
  assertIsDefined(defaultView, 'defaultView');
81
74
  const selection = defaultView.getSelection();
82
75
  assertIsDefined(selection, 'selection');
76
+ if (!container.isContentEditable) {
77
+ selection.removeAllRanges();
78
+ return;
79
+ }
80
+ const range = scrollIfNoRange(container, isReverse, () => getRange(container, isReverse, x));
81
+ if (!range) {
82
+ return;
83
+ }
83
84
  selection.removeAllRanges();
84
85
  selection.addRange(range);
85
86
  }
@@ -1 +1 @@
1
- {"version":3,"names":["hiddenCaretRangeFromPoint","assertIsDefined","isInputOrTextArea","isRTL","scrollIfNoRange","getRange","container","isReverse","x","ownerDocument","isReverseDir","containerRect","getBoundingClientRect","undefined","right","left","y","bottom","top","placeCaretAtEdge","focus","selectionStart","value","length","selectionEnd","isContentEditable","range","defaultView","selection","getSelection","removeAllRanges","addRange"],"sources":["@wordpress/dom/src/dom/place-caret-at-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport isRTL from './is-rtl';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Gets the range to place.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n *\n * @return {Range|null} The range to place.\n */\nfunction getRange( container, isReverse, x ) {\n\tconst { ownerDocument } = container;\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\t// When placing at the end (isReverse), find the closest range to the bottom\n\t// right corner. When placing at the start, to the top left corner.\n\t// Ensure x is defined and within the container's boundaries. When it's\n\t// exactly at the boundary, it's not considered within the boundaries.\n\tif ( x === undefined ) {\n\t\tx = isReverse ? containerRect.right - 1 : containerRect.left + 1;\n\t} else if ( x <= containerRect.left ) {\n\t\tx = containerRect.left + 1;\n\t} else if ( x >= containerRect.right ) {\n\t\tx = containerRect.right - 1;\n\t}\n\tconst y = isReverseDir ? containerRect.bottom - 1 : containerRect.top + 1;\n\treturn hiddenCaretRangeFromPoint( ownerDocument, x, y, container );\n}\n\n/**\n * Places the caret at start or end of a given element.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n */\nexport default function placeCaretAtEdge( container, isReverse, x ) {\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tcontainer.focus();\n\n\tif ( isInputOrTextArea( container ) ) {\n\t\t// The element may not support selection setting.\n\t\tif ( typeof container.selectionStart !== 'number' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\tcontainer.selectionStart = container.value.length;\n\t\t\tcontainer.selectionEnd = container.value.length;\n\t\t} else {\n\t\t\tcontainer.selectionStart = 0;\n\t\t\tcontainer.selectionEnd = 0;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tif ( ! container.isContentEditable ) {\n\t\treturn;\n\t}\n\n\tconst range = scrollIfNoRange( container, isReverse, () =>\n\t\tgetRange( container, isReverse, x )\n\t);\n\n\tif ( ! range ) {\n\t\treturn;\n\t}\n\n\tconst { ownerDocument } = container;\n\tconst { defaultView } = ownerDocument;\n\tassertIsDefined( defaultView, 'defaultView' );\n\tconst selection = defaultView.getSelection();\n\tassertIsDefined( selection, 'selection' );\n\tselection.removeAllRanges();\n\tselection.addRange( range );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,yBAAyB,MAAM,iCAAiC;AACvE,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,OAAOC,iBAAiB,MAAM,yBAAyB;AACvD,OAAOC,KAAK,MAAM,UAAU;AAC5B,SAASC,eAAe,QAAQ,sBAAsB;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAAEC,SAAS,EAAEC,SAAS,EAAEC,CAAC,EAAG;EAC5C,MAAM;IAAEC;EAAc,CAAC,GAAGH,SAAS;EACnC;EACA,MAAMI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CAAC;MAC5Bf,SAAS,CAACkB,YAAY,GAAG,CAAC;IAC3B;IAEA;EACD;EAEA,IAAK,CAAElB,SAAS,CAACmB,iBAAiB,EAAG;IACpC;EACD;EAEA,MAAMC,KAAK,GAAGtB,eAAe,CAAEE,SAAS,EAAEC,SAAS,EAAE,MACpDF,QAAQ,CAAEC,SAAS,EAAEC,SAAS,EAAEC,CAAE,CACnC,CAAC;EAED,IAAK,CAAEkB,KAAK,EAAG;IACd;EACD;EAEA,MAAM;IAAEjB;EAAc,CAAC,GAAGH,SAAS;EACnC,MAAM;IAAEqB;EAAY,CAAC,GAAGlB,aAAa;EACrCR,eAAe,CAAE0B,WAAW,EAAE,aAAc,CAAC;EAC7C,MAAMC,SAAS,GAAGD,WAAW,CAACE,YAAY,CAAC,CAAC;EAC5C5B,eAAe,CAAE2B,SAAS,EAAE,WAAY,CAAC;EACzCA,SAAS,CAACE,eAAe,CAAC,CAAC;EAC3BF,SAAS,CAACG,QAAQ,CAAEL,KAAM,CAAC;AAC5B","ignoreList":[]}
1
+ {"version":3,"names":["hiddenCaretRangeFromPoint","assertIsDefined","isInputOrTextArea","isRTL","scrollIfNoRange","getRange","container","isReverse","x","ownerDocument","isReverseDir","containerRect","getBoundingClientRect","undefined","right","left","y","bottom","top","placeCaretAtEdge","focus","selectionStart","value","length","selectionEnd","defaultView","selection","getSelection","isContentEditable","removeAllRanges","range","addRange"],"sources":["@wordpress/dom/src/dom/place-caret-at-edge.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport hiddenCaretRangeFromPoint from './hidden-caret-range-from-point';\nimport { assertIsDefined } from '../utils/assert-is-defined';\nimport isInputOrTextArea from './is-input-or-text-area';\nimport isRTL from './is-rtl';\nimport { scrollIfNoRange } from './scroll-if-no-range';\n\n/**\n * Gets the range to place.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n *\n * @return {Range|null} The range to place.\n */\nfunction getRange( container, isReverse, x ) {\n\tconst { ownerDocument } = container;\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\t// When placing at the end (isReverse), find the closest range to the bottom\n\t// right corner. When placing at the start, to the top left corner.\n\t// Ensure x is defined and within the container's boundaries. When it's\n\t// exactly at the boundary, it's not considered within the boundaries.\n\tif ( x === undefined ) {\n\t\tx = isReverse ? containerRect.right - 1 : containerRect.left + 1;\n\t} else if ( x <= containerRect.left ) {\n\t\tx = containerRect.left + 1;\n\t} else if ( x >= containerRect.right ) {\n\t\tx = containerRect.right - 1;\n\t}\n\tconst y = isReverseDir ? containerRect.bottom - 1 : containerRect.top + 1;\n\treturn hiddenCaretRangeFromPoint( ownerDocument, x, y, container );\n}\n\n/**\n * Places the caret at start or end of a given element.\n *\n * @param {HTMLElement} container Focusable element.\n * @param {boolean} isReverse True for end, false for start.\n * @param {number|undefined} x X coordinate to vertically position.\n */\nexport default function placeCaretAtEdge( container, isReverse, x ) {\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tcontainer.focus();\n\n\tif ( isInputOrTextArea( container ) ) {\n\t\t// The element may not support selection setting.\n\t\tif ( typeof container.selectionStart !== 'number' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isReverse ) {\n\t\t\tcontainer.selectionStart = container.value.length;\n\t\t\tcontainer.selectionEnd = container.value.length;\n\t\t} else {\n\t\t\tcontainer.selectionStart = 0;\n\t\t\tcontainer.selectionEnd = 0;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tconst { ownerDocument } = container;\n\tconst { defaultView } = ownerDocument;\n\tassertIsDefined( defaultView, 'defaultView' );\n\tconst selection = defaultView.getSelection();\n\tassertIsDefined( selection, 'selection' );\n\n\tif ( ! container.isContentEditable ) {\n\t\tselection.removeAllRanges();\n\t\treturn;\n\t}\n\n\tconst range = scrollIfNoRange( container, isReverse, () =>\n\t\tgetRange( container, isReverse, x )\n\t);\n\n\tif ( ! range ) {\n\t\treturn;\n\t}\n\n\tselection.removeAllRanges();\n\tselection.addRange( range );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,yBAAyB,MAAM,iCAAiC;AACvE,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,OAAOC,iBAAiB,MAAM,yBAAyB;AACvD,OAAOC,KAAK,MAAM,UAAU;AAC5B,SAASC,eAAe,QAAQ,sBAAsB;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAAEC,SAAS,EAAEC,SAAS,EAAEC,CAAC,EAAG;EAC5C,MAAM;IAAEC;EAAc,CAAC,GAAGH,SAAS;EACnC;EACA,MAAMI,YAAY,GAAGP,KAAK,CAAEG,SAAU,CAAC,GAAG,CAAEC,SAAS,GAAGA,SAAS;EACjE,MAAMI,aAAa,GAAGL,SAAS,CAACM,qBAAqB,CAAC,CAAC;EACvD;EACA;EACA;EACA;EACA,IAAKJ,CAAC,KAAKK,SAAS,EAAG;IACtBL,CAAC,GAAGD,SAAS,GAAGI,aAAa,CAACG,KAAK,GAAG,CAAC,GAAGH,aAAa,CAACI,IAAI,GAAG,CAAC;EACjE,CAAC,MAAM,IAAKP,CAAC,IAAIG,aAAa,CAACI,IAAI,EAAG;IACrCP,CAAC,GAAGG,aAAa,CAACI,IAAI,GAAG,CAAC;EAC3B,CAAC,MAAM,IAAKP,CAAC,IAAIG,aAAa,CAACG,KAAK,EAAG;IACtCN,CAAC,GAAGG,aAAa,CAACG,KAAK,GAAG,CAAC;EAC5B;EACA,MAAME,CAAC,GAAGN,YAAY,GAAGC,aAAa,CAACM,MAAM,GAAG,CAAC,GAAGN,aAAa,CAACO,GAAG,GAAG,CAAC;EACzE,OAAOlB,yBAAyB,CAAES,aAAa,EAAED,CAAC,EAAEQ,CAAC,EAAEV,SAAU,CAAC;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASa,gBAAgBA,CAAEb,SAAS,EAAEC,SAAS,EAAEC,CAAC,EAAG;EACnE,IAAK,CAAEF,SAAS,EAAG;IAClB;EACD;EAEAA,SAAS,CAACc,KAAK,CAAC,CAAC;EAEjB,IAAKlB,iBAAiB,CAAEI,SAAU,CAAC,EAAG;IACrC;IACA,IAAK,OAAOA,SAAS,CAACe,cAAc,KAAK,QAAQ,EAAG;MACnD;IACD;IAEA,IAAKd,SAAS,EAAG;MAChBD,SAAS,CAACe,cAAc,GAAGf,SAAS,CAACgB,KAAK,CAACC,MAAM;MACjDjB,SAAS,CAACkB,YAAY,GAAGlB,SAAS,CAACgB,KAAK,CAACC,MAAM;IAChD,CAAC,MAAM;MACNjB,SAAS,CAACe,cAAc,GAAG,CAAC;MAC5Bf,SAAS,CAACkB,YAAY,GAAG,CAAC;IAC3B;IAEA;EACD;EAEA,MAAM;IAAEf;EAAc,CAAC,GAAGH,SAAS;EACnC,MAAM;IAAEmB;EAAY,CAAC,GAAGhB,aAAa;EACrCR,eAAe,CAAEwB,WAAW,EAAE,aAAc,CAAC;EAC7C,MAAMC,SAAS,GAAGD,WAAW,CAACE,YAAY,CAAC,CAAC;EAC5C1B,eAAe,CAAEyB,SAAS,EAAE,WAAY,CAAC;EAEzC,IAAK,CAAEpB,SAAS,CAACsB,iBAAiB,EAAG;IACpCF,SAAS,CAACG,eAAe,CAAC,CAAC;IAC3B;EACD;EAEA,MAAMC,KAAK,GAAG1B,eAAe,CAAEE,SAAS,EAAEC,SAAS,EAAE,MACpDF,QAAQ,CAAEC,SAAS,EAAEC,SAAS,EAAEC,CAAE,CACnC,CAAC;EAED,IAAK,CAAEsB,KAAK,EAAG;IACd;EACD;EAEAJ,SAAS,CAACG,eAAe,CAAC,CAAC;EAC3BH,SAAS,CAACK,QAAQ,CAAED,KAAM,CAAC;AAC5B","ignoreList":[]}
@@ -24,4 +24,5 @@ export { default as isEmpty } from "./is-empty";
24
24
  export { default as removeInvalidHTML } from "./remove-invalid-html";
25
25
  export { default as isRTL } from "./is-rtl";
26
26
  export { default as safeHTML } from "./safe-html";
27
+ export { default as isSelectionForward } from "./is-selection-forward";
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"place-caret-at-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-edge.js"],"names":[],"mappings":"AAsCA;;;;;;GAMG;AACH,oDAJW,WAAW,aACX,OAAO,KACP,MAAM,GAAC,SAAS,QA6C1B"}
1
+ {"version":3,"file":"place-caret-at-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-edge.js"],"names":[],"mappings":"AAsCA;;;;;;GAMG;AACH,oDAJW,WAAW,aACX,OAAO,KACP,MAAM,GAAC,SAAS,QA+C1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dom",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "description": "DOM utilities module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,10 +30,10 @@
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.16.0",
33
- "@wordpress/deprecated": "^4.5.0"
33
+ "@wordpress/deprecated": "^4.7.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "c3101ab024e2bfc85d525c6d247e0d57cafc9fd9"
38
+ "gitHead": "c90d920de07c53dff82c5914635b56fafa503b7f"
39
39
  }
package/src/dom/index.js CHANGED
@@ -24,3 +24,4 @@ export { default as isEmpty } from './is-empty';
24
24
  export { default as removeInvalidHTML } from './remove-invalid-html';
25
25
  export { default as isRTL } from './is-rtl';
26
26
  export { default as safeHTML } from './safe-html';
27
+ export { default as isSelectionForward } from './is-selection-forward';
@@ -67,7 +67,14 @@ export default function placeCaretAtEdge( container, isReverse, x ) {
67
67
  return;
68
68
  }
69
69
 
70
+ const { ownerDocument } = container;
71
+ const { defaultView } = ownerDocument;
72
+ assertIsDefined( defaultView, 'defaultView' );
73
+ const selection = defaultView.getSelection();
74
+ assertIsDefined( selection, 'selection' );
75
+
70
76
  if ( ! container.isContentEditable ) {
77
+ selection.removeAllRanges();
71
78
  return;
72
79
  }
73
80
 
@@ -79,11 +86,6 @@ export default function placeCaretAtEdge( container, isReverse, x ) {
79
86
  return;
80
87
  }
81
88
 
82
- const { ownerDocument } = container;
83
- const { defaultView } = ownerDocument;
84
- assertIsDefined( defaultView, 'defaultView' );
85
- const selection = defaultView.getSelection();
86
- assertIsDefined( selection, 'selection' );
87
89
  selection.removeAllRanges();
88
90
  selection.addRange( range );
89
91
  }
@@ -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.dom.iterable.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.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.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.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/typescript/lib/lib.esnext.regexp.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":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"80d2e2a2e1685c82cba3c320f5d077376fadff77fe1f52a4c29f995bdc40ea70","signature":"cccc56d5be56aefb6a65bb2d27dede6fab002419984d46dd8b0ed11f408ed972"},{"version":"40d57dd6937878c9ce9cf36858406737c7dfadfb4d43094d6b95f74b39865bc8","signature":"76440ec58b976c2e975139c5b67a9ce7249189c8324dc4675923570314720c44"},{"version":"6350972f56d2a7cf935ab6564681ba7457eba3b7ec246cc8b2623e9562fbebdc","signature":"9984f7554f75aea5256bcccaa0692a497da23c904049c3bfb6f89a3d6973e231"},{"version":"a7836408f857cb8855443e0ff79d3ed7027415dca85f312c5f9f47daa6cd355d","signature":"427ee9647c5a9082fcc0b808ba059f959fb06904703ab64801dd1a3309aaddfe"},{"version":"34754095ae1b0b9f52d4317a69b27bf7a7715f3c080c06039ddd8ed1b0b8c369","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":"2a716d14827f6e39f5f79e728974a783a2f9137889336d30f3a4a51b03b7dbfd"},{"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":"574e9ae30de8b269755a20412cb6bff872ed939066b9185cef8db29dd8b3bce9"},{"version":"8b692a361fc9f2d4102106f168b35cf6f30c9efc66050108001955a1a59b4fd2","signature":"9debb575c0fb083c696fe76fed6b933ad4f5c6fb591e332228d5feec857522f9"},{"version":"674cebb58a019bb257d71349493297efe8dce5cfffcfe113ade29efcc2d4cb95","signature":"b4726ffc8f8db298ecbe2d1599d36fa0203e47c2fa86eeb6a14f65a7c0fab4e4"},{"version":"e0292c4bbb6743b097039bc62688a462772e6ecdace4ba54cd7e1f22a1ab80b9","signature":"f08b8296d0d4f1840ca35ba232ec82b51681d1d403c5c8482a2b9d9182dfb099"},{"version":"204f9aa3215a308c4e0e681acfecfb48c96c67b90247bce788beb36e70a24ecc","signature":"6c3693f28bbf6fb06ceab50425d93a6f352b143ee6c441379403addca32ac492"},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","1032b6aba205cad9dc80b333286f2c4e78a405bf183d08852ebc380f9e18082a",{"version":"905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","signature":"e4956b273081c74d1dba8d2f28889922c7feec072e6c7b789d23d385438ee87a"},{"version":"1e487793844c72bdfeeb7dd199e346c991122b1e00701c2c2494de5c5b9a14cb","signature":"dcc847cd5a1a58bc949d80d8686d8136f9de019c4cb232b24b43c8c6bbc93cf5"},{"version":"a9714b2e7254a341d08b72d56409a66f22790d27a1512596b1108f5c386ef789","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":"d91f44462a1982e997851776cf8e4a0f51a92787879098e24fb25b2436602d3b"},{"version":"acbe60d616549a3815593f33a7a34faf0b0d063257c74f3b01bfc20dae42652e","signature":"4e91ca7ccb84757aad03b4a2ad0f5260ac4e3cc67bdf5e684feff2266e88c2fa"},{"version":"0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20","signature":"98c5be1140870c0579a5ad587c6208a96647338f5b022b6c82c570aa5bbc5fb5"},{"version":"cd62baba8e325afe998a6537894fcc0420146c242e1b6fdfdaaadfd21dc0d969","affectsGlobalScope":true}],"root":[[74,99],[106,125]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"target":99},"fileIdsList":[[100,101,102,103],[100],[101],[104],[111,112,114,119,120,121],[77,78],[80,81,82],[77],[80,83],[86],[86,95],[78,79,80,82,84,85,87,88,90,91,92,99,106,107,109,110,111,112,113,114,115,116,117,118,119,123],[81,82],[77,78,89,92,93,94,96,97],[77,89],[89],[98],[81,105],[81],[77,89,92,96,97],[108],[122],[77,111,112],[112],[117],[74,75,76,120,124],[75]],"referencedMap":[[104,1],[101,2],[102,3],[105,4],[122,5],[79,6],[85,7],[80,8],[84,9],[86,8],[88,10],[78,8],[87,10],[96,11],[124,12],[83,13],[111,8],[98,14],[90,15],[91,16],[99,17],[106,18],[92,10],[94,8],[82,19],[107,17],[108,20],[109,21],[110,21],[123,22],[112,8],[115,8],[113,23],[117,24],[118,25],[114,8],[116,8],[125,26],[76,27]],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"5.5.3"}
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.dom.iterable.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.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.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.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/typescript/lib/lib.esnext.regexp.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":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"80d2e2a2e1685c82cba3c320f5d077376fadff77fe1f52a4c29f995bdc40ea70","signature":"cccc56d5be56aefb6a65bb2d27dede6fab002419984d46dd8b0ed11f408ed972"},{"version":"40d57dd6937878c9ce9cf36858406737c7dfadfb4d43094d6b95f74b39865bc8","signature":"76440ec58b976c2e975139c5b67a9ce7249189c8324dc4675923570314720c44"},{"version":"6350972f56d2a7cf935ab6564681ba7457eba3b7ec246cc8b2623e9562fbebdc","signature":"9984f7554f75aea5256bcccaa0692a497da23c904049c3bfb6f89a3d6973e231"},{"version":"a7836408f857cb8855443e0ff79d3ed7027415dca85f312c5f9f47daa6cd355d","signature":"427ee9647c5a9082fcc0b808ba059f959fb06904703ab64801dd1a3309aaddfe"},{"version":"34754095ae1b0b9f52d4317a69b27bf7a7715f3c080c06039ddd8ed1b0b8c369","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":"2a716d14827f6e39f5f79e728974a783a2f9137889336d30f3a4a51b03b7dbfd"},{"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":"574e9ae30de8b269755a20412cb6bff872ed939066b9185cef8db29dd8b3bce9"},{"version":"8b692a361fc9f2d4102106f168b35cf6f30c9efc66050108001955a1a59b4fd2","signature":"9debb575c0fb083c696fe76fed6b933ad4f5c6fb591e332228d5feec857522f9"},{"version":"674cebb58a019bb257d71349493297efe8dce5cfffcfe113ade29efcc2d4cb95","signature":"b4726ffc8f8db298ecbe2d1599d36fa0203e47c2fa86eeb6a14f65a7c0fab4e4"},{"version":"e0292c4bbb6743b097039bc62688a462772e6ecdace4ba54cd7e1f22a1ab80b9","signature":"f08b8296d0d4f1840ca35ba232ec82b51681d1d403c5c8482a2b9d9182dfb099"},{"version":"204f9aa3215a308c4e0e681acfecfb48c96c67b90247bce788beb36e70a24ecc","signature":"6c3693f28bbf6fb06ceab50425d93a6f352b143ee6c441379403addca32ac492"},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","1032b6aba205cad9dc80b333286f2c4e78a405bf183d08852ebc380f9e18082a",{"version":"905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","signature":"e4956b273081c74d1dba8d2f28889922c7feec072e6c7b789d23d385438ee87a"},{"version":"1e487793844c72bdfeeb7dd199e346c991122b1e00701c2c2494de5c5b9a14cb","signature":"dcc847cd5a1a58bc949d80d8686d8136f9de019c4cb232b24b43c8c6bbc93cf5"},{"version":"78ca1d40c5eea0c6dc7e5b4d3162a86b860e9b958db03028468a058faa13cf81","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":"d91f44462a1982e997851776cf8e4a0f51a92787879098e24fb25b2436602d3b"},{"version":"9f9c81bad6bcffa44094a8ef43e0d34a66c2f0dfa6c6260e213e64ef2e2e4955","signature":"a9ea87aa97206821d4c4dce3381632cb01aceff0203d20b7b0451df099842d7c"},{"version":"0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20","signature":"98c5be1140870c0579a5ad587c6208a96647338f5b022b6c82c570aa5bbc5fb5"},{"version":"cd62baba8e325afe998a6537894fcc0420146c242e1b6fdfdaaadfd21dc0d969","affectsGlobalScope":true}],"root":[[74,99],[106,125]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"target":99},"fileIdsList":[[100,101,102,103],[100],[101],[104],[111,112,114,119,120,121],[77,78],[80,81,82],[77],[80,83],[86],[86,95],[78,79,80,82,84,85,87,88,90,91,92,94,99,106,107,109,110,111,112,113,114,115,116,117,118,119,123],[81,82],[77,78,89,92,93,94,96,97],[77,89],[89],[98],[81,105],[81],[77,89,92,96,97],[108],[122],[77,111,112],[112],[117],[74,75,76,120,124],[75]],"referencedMap":[[104,1],[101,2],[102,3],[105,4],[122,5],[79,6],[85,7],[80,8],[84,9],[86,8],[88,10],[78,8],[87,10],[96,11],[124,12],[83,13],[111,8],[98,14],[90,15],[91,16],[99,17],[106,18],[92,10],[94,8],[82,19],[107,17],[108,20],[109,21],[110,21],[123,22],[112,8],[115,8],[113,23],[117,24],[118,25],[114,8],[116,8],[125,26],[76,27]],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"5.5.3"}