@wordpress/dom 4.37.0 → 4.37.1-next.79a2f3cdd.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 +0 -2
- package/LICENSE.md +1 -1
- package/README.md +1 -1
- package/build/{data-transfer.js → data-transfer.cjs} +1 -1
- package/build/dom/{caret-range-from-point.js → caret-range-from-point.cjs} +1 -1
- package/build/dom/{clean-node-list.js → clean-node-list.cjs} +7 -7
- package/build/dom/{compute-caret-rect.js → compute-caret-rect.cjs} +3 -3
- package/build/dom/{document-has-selection.js → document-has-selection.cjs} +4 -4
- package/build/dom/{document-has-text-selection.js → document-has-text-selection.cjs} +2 -2
- package/build/dom/{document-has-uncollapsed-selection.js → document-has-uncollapsed-selection.cjs} +3 -3
- package/build/dom/{get-computed-style.js → get-computed-style.cjs} +2 -2
- package/build/dom/{get-offset-parent.js → get-offset-parent.cjs} +2 -2
- package/build/dom/{get-range-height.js → get-range-height.cjs} +1 -1
- package/build/dom/{get-rectangle-from-range.js → get-rectangle-from-range.cjs} +2 -2
- package/build/dom/get-rectangle-from-range.cjs.map +7 -0
- package/build/dom/{get-scroll-container.js → get-scroll-container.cjs} +2 -2
- package/build/dom/{hidden-caret-range-from-point.js → hidden-caret-range-from-point.cjs} +3 -3
- package/build/dom/{index.js → index.cjs} +28 -28
- package/build/dom/{input-field-has-uncollapsed-selection.js → input-field-has-uncollapsed-selection.cjs} +3 -3
- package/build/dom/{insert-after.js → insert-after.cjs} +2 -2
- package/build/dom/{is-edge.js → is-edge.cjs} +9 -9
- package/build/dom/{is-element.js → is-element.cjs} +1 -1
- package/build/dom/{is-empty.js → is-empty.cjs} +1 -1
- package/build/dom/{is-entirely-selected.js → is-entirely-selected.cjs} +3 -3
- package/build/dom/{is-form-element.js → is-form-element.cjs} +2 -2
- package/build/dom/{is-horizontal-edge.js → is-horizontal-edge.cjs} +2 -2
- package/build/dom/{is-html-input-element.js → is-html-input-element.cjs} +1 -1
- package/build/dom/{is-input-or-text-area.js → is-input-or-text-area.cjs} +1 -1
- package/build/dom/{is-number-input.js → is-number-input.cjs} +2 -2
- package/build/dom/{is-rtl.js → is-rtl.cjs} +2 -2
- package/build/dom/{is-selection-forward.js → is-selection-forward.cjs} +2 -2
- package/build/dom/{is-text-field.js → is-text-field.cjs} +2 -2
- package/build/dom/{is-vertical-edge.js → is-vertical-edge.cjs} +2 -2
- package/build/dom/{place-caret-at-edge.js → place-caret-at-edge.cjs} +6 -6
- package/build/dom/{place-caret-at-horizontal-edge.js → place-caret-at-horizontal-edge.cjs} +2 -2
- package/build/dom/{place-caret-at-vertical-edge.js → place-caret-at-vertical-edge.cjs} +2 -2
- package/build/dom/{remove-invalid-html.js → remove-invalid-html.cjs} +2 -2
- package/build/dom/{remove.js → remove.cjs} +2 -2
- package/build/dom/{replace-tag.js → replace-tag.cjs} +2 -2
- package/build/dom/{replace.js → replace.cjs} +4 -4
- package/build/dom/{safe-html.js → safe-html.cjs} +2 -2
- package/build/dom/{scroll-if-no-range.js → scroll-if-no-range.cjs} +1 -1
- package/build/dom/{strip-html.js → strip-html.cjs} +2 -2
- package/build/dom/{unwrap.js → unwrap.cjs} +2 -2
- package/build/dom/{wrap.js → wrap.cjs} +2 -2
- package/build/{focusable.js → focusable.cjs} +1 -1
- package/build/{index.js → index.cjs} +9 -9
- package/build/{index.js.map → index.cjs.map} +1 -1
- package/build/{phrasing-content.js → phrasing-content.cjs} +1 -1
- package/build/{tabbable.js → tabbable.cjs} +2 -2
- package/build/utils/{assert-is-defined.js → assert-is-defined.cjs} +1 -1
- package/build-module/{data-transfer.js → data-transfer.mjs} +1 -1
- package/build-module/dom/{caret-range-from-point.js → caret-range-from-point.mjs} +1 -1
- package/build-module/dom/{clean-node-list.js → clean-node-list.mjs} +7 -7
- package/build-module/dom/{compute-caret-rect.js → compute-caret-rect.mjs} +3 -3
- package/build-module/dom/{document-has-selection.js → document-has-selection.mjs} +4 -4
- package/build-module/dom/{document-has-text-selection.js → document-has-text-selection.mjs} +2 -2
- package/build-module/dom/{document-has-uncollapsed-selection.js → document-has-uncollapsed-selection.mjs} +3 -3
- package/build-module/dom/{get-computed-style.js → get-computed-style.mjs} +2 -2
- package/build-module/dom/{get-offset-parent.js → get-offset-parent.mjs} +2 -2
- package/build-module/dom/{get-range-height.js → get-range-height.mjs} +1 -1
- package/build-module/dom/{get-rectangle-from-range.js → get-rectangle-from-range.mjs} +2 -2
- package/build-module/dom/get-rectangle-from-range.mjs.map +7 -0
- package/build-module/dom/{get-scroll-container.js → get-scroll-container.mjs} +2 -2
- package/build-module/dom/{hidden-caret-range-from-point.js → hidden-caret-range-from-point.mjs} +3 -3
- package/build-module/dom/index.mjs +58 -0
- package/build-module/dom/{input-field-has-uncollapsed-selection.js → input-field-has-uncollapsed-selection.mjs} +3 -3
- package/build-module/dom/{insert-after.js → insert-after.mjs} +2 -2
- package/build-module/dom/{is-edge.js → is-edge.mjs} +9 -9
- package/build-module/dom/{is-element.js → is-element.mjs} +1 -1
- package/build-module/dom/{is-empty.js → is-empty.mjs} +1 -1
- package/build-module/dom/{is-entirely-selected.js → is-entirely-selected.mjs} +3 -3
- package/build-module/dom/{is-form-element.js → is-form-element.mjs} +2 -2
- package/build-module/dom/{is-horizontal-edge.js → is-horizontal-edge.mjs} +2 -2
- package/build-module/dom/{is-html-input-element.js → is-html-input-element.mjs} +1 -1
- package/build-module/dom/{is-input-or-text-area.js → is-input-or-text-area.mjs} +1 -1
- package/build-module/dom/{is-number-input.js → is-number-input.mjs} +2 -2
- package/build-module/dom/{is-rtl.js → is-rtl.mjs} +2 -2
- package/build-module/dom/{is-selection-forward.js → is-selection-forward.mjs} +2 -2
- package/build-module/dom/{is-text-field.js → is-text-field.mjs} +2 -2
- package/build-module/dom/{is-vertical-edge.js → is-vertical-edge.mjs} +2 -2
- package/build-module/dom/{place-caret-at-edge.js → place-caret-at-edge.mjs} +6 -6
- package/build-module/dom/{place-caret-at-horizontal-edge.js → place-caret-at-horizontal-edge.mjs} +2 -2
- package/build-module/dom/{place-caret-at-vertical-edge.js → place-caret-at-vertical-edge.mjs} +2 -2
- package/build-module/dom/{remove-invalid-html.js → remove-invalid-html.mjs} +2 -2
- package/build-module/dom/{remove.js → remove.mjs} +2 -2
- package/build-module/dom/{replace-tag.js → replace-tag.mjs} +2 -2
- package/build-module/dom/{replace.js → replace.mjs} +4 -4
- package/build-module/dom/{safe-html.js → safe-html.mjs} +2 -2
- package/build-module/dom/{scroll-if-no-range.js → scroll-if-no-range.mjs} +1 -1
- package/build-module/dom/{strip-html.js → strip-html.mjs} +2 -2
- package/build-module/dom/{unwrap.js → unwrap.mjs} +2 -2
- package/build-module/dom/{wrap.js → wrap.mjs} +2 -2
- package/build-module/{focusable.js → focusable.mjs} +1 -1
- package/build-module/index.mjs +11 -0
- package/build-module/{phrasing-content.js → phrasing-content.mjs} +1 -1
- package/build-module/{tabbable.js → tabbable.mjs} +2 -2
- package/build-module/utils/{assert-is-defined.js → assert-is-defined.mjs} +1 -1
- package/build-types/dom/get-rectangle-from-range.d.ts +2 -1
- package/build-types/dom/get-rectangle-from-range.d.ts.map +1 -1
- package/package.json +14 -7
- package/src/dom/get-rectangle-from-range.js +2 -1
- package/build/dom/get-rectangle-from-range.js.map +0 -7
- package/build-module/dom/get-rectangle-from-range.js.map +0 -7
- package/build-module/dom/index.js +0 -58
- package/build-module/index.js +0 -11
- package/tsconfig.json +0 -8
- package/tsconfig.tsbuildinfo +0 -1
- /package/build/{data-transfer.js.map → data-transfer.cjs.map} +0 -0
- /package/build/dom/{caret-range-from-point.js.map → caret-range-from-point.cjs.map} +0 -0
- /package/build/dom/{clean-node-list.js.map → clean-node-list.cjs.map} +0 -0
- /package/build/dom/{compute-caret-rect.js.map → compute-caret-rect.cjs.map} +0 -0
- /package/build/dom/{document-has-selection.js.map → document-has-selection.cjs.map} +0 -0
- /package/build/dom/{document-has-text-selection.js.map → document-has-text-selection.cjs.map} +0 -0
- /package/build/dom/{document-has-uncollapsed-selection.js.map → document-has-uncollapsed-selection.cjs.map} +0 -0
- /package/build/dom/{get-computed-style.js.map → get-computed-style.cjs.map} +0 -0
- /package/build/dom/{get-offset-parent.js.map → get-offset-parent.cjs.map} +0 -0
- /package/build/dom/{get-range-height.js.map → get-range-height.cjs.map} +0 -0
- /package/build/dom/{get-scroll-container.js.map → get-scroll-container.cjs.map} +0 -0
- /package/build/dom/{hidden-caret-range-from-point.js.map → hidden-caret-range-from-point.cjs.map} +0 -0
- /package/build/dom/{index.js.map → index.cjs.map} +0 -0
- /package/build/dom/{input-field-has-uncollapsed-selection.js.map → input-field-has-uncollapsed-selection.cjs.map} +0 -0
- /package/build/dom/{insert-after.js.map → insert-after.cjs.map} +0 -0
- /package/build/dom/{is-edge.js.map → is-edge.cjs.map} +0 -0
- /package/build/dom/{is-element.js.map → is-element.cjs.map} +0 -0
- /package/build/dom/{is-empty.js.map → is-empty.cjs.map} +0 -0
- /package/build/dom/{is-entirely-selected.js.map → is-entirely-selected.cjs.map} +0 -0
- /package/build/dom/{is-form-element.js.map → is-form-element.cjs.map} +0 -0
- /package/build/dom/{is-horizontal-edge.js.map → is-horizontal-edge.cjs.map} +0 -0
- /package/build/dom/{is-html-input-element.js.map → is-html-input-element.cjs.map} +0 -0
- /package/build/dom/{is-input-or-text-area.js.map → is-input-or-text-area.cjs.map} +0 -0
- /package/build/dom/{is-number-input.js.map → is-number-input.cjs.map} +0 -0
- /package/build/dom/{is-rtl.js.map → is-rtl.cjs.map} +0 -0
- /package/build/dom/{is-selection-forward.js.map → is-selection-forward.cjs.map} +0 -0
- /package/build/dom/{is-text-field.js.map → is-text-field.cjs.map} +0 -0
- /package/build/dom/{is-vertical-edge.js.map → is-vertical-edge.cjs.map} +0 -0
- /package/build/dom/{place-caret-at-edge.js.map → place-caret-at-edge.cjs.map} +0 -0
- /package/build/dom/{place-caret-at-horizontal-edge.js.map → place-caret-at-horizontal-edge.cjs.map} +0 -0
- /package/build/dom/{place-caret-at-vertical-edge.js.map → place-caret-at-vertical-edge.cjs.map} +0 -0
- /package/build/dom/{remove-invalid-html.js.map → remove-invalid-html.cjs.map} +0 -0
- /package/build/dom/{remove.js.map → remove.cjs.map} +0 -0
- /package/build/dom/{replace-tag.js.map → replace-tag.cjs.map} +0 -0
- /package/build/dom/{replace.js.map → replace.cjs.map} +0 -0
- /package/build/dom/{safe-html.js.map → safe-html.cjs.map} +0 -0
- /package/build/dom/{scroll-if-no-range.js.map → scroll-if-no-range.cjs.map} +0 -0
- /package/build/dom/{strip-html.js.map → strip-html.cjs.map} +0 -0
- /package/build/dom/{unwrap.js.map → unwrap.cjs.map} +0 -0
- /package/build/dom/{wrap.js.map → wrap.cjs.map} +0 -0
- /package/build/{focusable.js.map → focusable.cjs.map} +0 -0
- /package/build/{phrasing-content.js.map → phrasing-content.cjs.map} +0 -0
- /package/build/{tabbable.js.map → tabbable.cjs.map} +0 -0
- /package/build/utils/{assert-is-defined.js.map → assert-is-defined.cjs.map} +0 -0
- /package/build-module/{data-transfer.js.map → data-transfer.mjs.map} +0 -0
- /package/build-module/dom/{caret-range-from-point.js.map → caret-range-from-point.mjs.map} +0 -0
- /package/build-module/dom/{clean-node-list.js.map → clean-node-list.mjs.map} +0 -0
- /package/build-module/dom/{compute-caret-rect.js.map → compute-caret-rect.mjs.map} +0 -0
- /package/build-module/dom/{document-has-selection.js.map → document-has-selection.mjs.map} +0 -0
- /package/build-module/dom/{document-has-text-selection.js.map → document-has-text-selection.mjs.map} +0 -0
- /package/build-module/dom/{document-has-uncollapsed-selection.js.map → document-has-uncollapsed-selection.mjs.map} +0 -0
- /package/build-module/dom/{get-computed-style.js.map → get-computed-style.mjs.map} +0 -0
- /package/build-module/dom/{get-offset-parent.js.map → get-offset-parent.mjs.map} +0 -0
- /package/build-module/dom/{get-range-height.js.map → get-range-height.mjs.map} +0 -0
- /package/build-module/dom/{get-scroll-container.js.map → get-scroll-container.mjs.map} +0 -0
- /package/build-module/dom/{hidden-caret-range-from-point.js.map → hidden-caret-range-from-point.mjs.map} +0 -0
- /package/build-module/dom/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/dom/{input-field-has-uncollapsed-selection.js.map → input-field-has-uncollapsed-selection.mjs.map} +0 -0
- /package/build-module/dom/{insert-after.js.map → insert-after.mjs.map} +0 -0
- /package/build-module/dom/{is-edge.js.map → is-edge.mjs.map} +0 -0
- /package/build-module/dom/{is-element.js.map → is-element.mjs.map} +0 -0
- /package/build-module/dom/{is-empty.js.map → is-empty.mjs.map} +0 -0
- /package/build-module/dom/{is-entirely-selected.js.map → is-entirely-selected.mjs.map} +0 -0
- /package/build-module/dom/{is-form-element.js.map → is-form-element.mjs.map} +0 -0
- /package/build-module/dom/{is-horizontal-edge.js.map → is-horizontal-edge.mjs.map} +0 -0
- /package/build-module/dom/{is-html-input-element.js.map → is-html-input-element.mjs.map} +0 -0
- /package/build-module/dom/{is-input-or-text-area.js.map → is-input-or-text-area.mjs.map} +0 -0
- /package/build-module/dom/{is-number-input.js.map → is-number-input.mjs.map} +0 -0
- /package/build-module/dom/{is-rtl.js.map → is-rtl.mjs.map} +0 -0
- /package/build-module/dom/{is-selection-forward.js.map → is-selection-forward.mjs.map} +0 -0
- /package/build-module/dom/{is-text-field.js.map → is-text-field.mjs.map} +0 -0
- /package/build-module/dom/{is-vertical-edge.js.map → is-vertical-edge.mjs.map} +0 -0
- /package/build-module/dom/{place-caret-at-edge.js.map → place-caret-at-edge.mjs.map} +0 -0
- /package/build-module/dom/{place-caret-at-horizontal-edge.js.map → place-caret-at-horizontal-edge.mjs.map} +0 -0
- /package/build-module/dom/{place-caret-at-vertical-edge.js.map → place-caret-at-vertical-edge.mjs.map} +0 -0
- /package/build-module/dom/{remove-invalid-html.js.map → remove-invalid-html.mjs.map} +0 -0
- /package/build-module/dom/{remove.js.map → remove.mjs.map} +0 -0
- /package/build-module/dom/{replace-tag.js.map → replace-tag.mjs.map} +0 -0
- /package/build-module/dom/{replace.js.map → replace.mjs.map} +0 -0
- /package/build-module/dom/{safe-html.js.map → safe-html.mjs.map} +0 -0
- /package/build-module/dom/{scroll-if-no-range.js.map → scroll-if-no-range.mjs.map} +0 -0
- /package/build-module/dom/{strip-html.js.map → strip-html.mjs.map} +0 -0
- /package/build-module/dom/{unwrap.js.map → unwrap.mjs.map} +0 -0
- /package/build-module/dom/{wrap.js.map → wrap.mjs.map} +0 -0
- /package/build-module/{focusable.js.map → focusable.mjs.map} +0 -0
- /package/build-module/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/{phrasing-content.js.map → phrasing-content.mjs.map} +0 -0
- /package/build-module/{tabbable.js.map → tabbable.mjs.map} +0 -0
- /package/build-module/utils/{assert-is-defined.js.map → assert-is-defined.mjs.map} +0 -0
|
@@ -33,12 +33,12 @@ __export(replace_exports, {
|
|
|
33
33
|
default: () => replace
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(replace_exports);
|
|
36
|
-
var import_assert_is_defined = require("../utils/assert-is-defined");
|
|
37
|
-
var import_insert_after = __toESM(require("./insert-after"));
|
|
38
|
-
var import_remove = __toESM(require("./remove"));
|
|
36
|
+
var import_assert_is_defined = require("../utils/assert-is-defined.cjs");
|
|
37
|
+
var import_insert_after = __toESM(require("./insert-after.cjs"));
|
|
38
|
+
var import_remove = __toESM(require("./remove.cjs"));
|
|
39
39
|
function replace(processedNode, newNode) {
|
|
40
40
|
(0, import_assert_is_defined.assertIsDefined)(processedNode.parentNode, "processedNode.parentNode");
|
|
41
41
|
(0, import_insert_after.default)(newNode, processedNode.parentNode);
|
|
42
42
|
(0, import_remove.default)(processedNode);
|
|
43
43
|
}
|
|
44
|
-
//# sourceMappingURL=replace.
|
|
44
|
+
//# sourceMappingURL=replace.cjs.map
|
|
@@ -33,7 +33,7 @@ __export(safe_html_exports, {
|
|
|
33
33
|
default: () => safeHTML
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(safe_html_exports);
|
|
36
|
-
var import_remove = __toESM(require("./remove"));
|
|
36
|
+
var import_remove = __toESM(require("./remove.cjs"));
|
|
37
37
|
function safeHTML(html) {
|
|
38
38
|
const { body } = document.implementation.createHTMLDocument("");
|
|
39
39
|
body.innerHTML = html;
|
|
@@ -55,4 +55,4 @@ function safeHTML(html) {
|
|
|
55
55
|
}
|
|
56
56
|
return body.innerHTML;
|
|
57
57
|
}
|
|
58
|
-
//# sourceMappingURL=safe-html.
|
|
58
|
+
//# sourceMappingURL=safe-html.cjs.map
|
|
@@ -33,11 +33,11 @@ __export(strip_html_exports, {
|
|
|
33
33
|
default: () => stripHTML
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(strip_html_exports);
|
|
36
|
-
var import_safe_html = __toESM(require("./safe-html"));
|
|
36
|
+
var import_safe_html = __toESM(require("./safe-html.cjs"));
|
|
37
37
|
function stripHTML(html) {
|
|
38
38
|
html = (0, import_safe_html.default)(html);
|
|
39
39
|
const doc = document.implementation.createHTMLDocument("");
|
|
40
40
|
doc.body.innerHTML = html;
|
|
41
41
|
return doc.body.textContent || "";
|
|
42
42
|
}
|
|
43
|
-
//# sourceMappingURL=strip-html.
|
|
43
|
+
//# sourceMappingURL=strip-html.cjs.map
|
|
@@ -23,7 +23,7 @@ __export(unwrap_exports, {
|
|
|
23
23
|
default: () => unwrap
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(unwrap_exports);
|
|
26
|
-
var import_assert_is_defined = require("../utils/assert-is-defined");
|
|
26
|
+
var import_assert_is_defined = require("../utils/assert-is-defined.cjs");
|
|
27
27
|
function unwrap(node) {
|
|
28
28
|
const parent = node.parentNode;
|
|
29
29
|
(0, import_assert_is_defined.assertIsDefined)(parent, "node.parentNode");
|
|
@@ -32,4 +32,4 @@ function unwrap(node) {
|
|
|
32
32
|
}
|
|
33
33
|
parent.removeChild(node);
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=unwrap.
|
|
35
|
+
//# sourceMappingURL=unwrap.cjs.map
|
|
@@ -23,10 +23,10 @@ __export(wrap_exports, {
|
|
|
23
23
|
default: () => wrap
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(wrap_exports);
|
|
26
|
-
var import_assert_is_defined = require("../utils/assert-is-defined");
|
|
26
|
+
var import_assert_is_defined = require("../utils/assert-is-defined.cjs");
|
|
27
27
|
function wrap(newNode, referenceNode) {
|
|
28
28
|
(0, import_assert_is_defined.assertIsDefined)(referenceNode.parentNode, "referenceNode.parentNode");
|
|
29
29
|
referenceNode.parentNode.insertBefore(newNode, referenceNode);
|
|
30
30
|
newNode.appendChild(referenceNode);
|
|
31
31
|
}
|
|
32
|
-
//# sourceMappingURL=wrap.
|
|
32
|
+
//# sourceMappingURL=wrap.cjs.map
|
|
@@ -34,17 +34,17 @@ __export(index_exports, {
|
|
|
34
34
|
focus: () => focus
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
|
-
var focusable = __toESM(require("./focusable"));
|
|
38
|
-
var tabbable = __toESM(require("./tabbable"));
|
|
39
|
-
__reExport(index_exports, require("./dom"), module.exports);
|
|
40
|
-
__reExport(index_exports, require("./phrasing-content"), module.exports);
|
|
41
|
-
__reExport(index_exports, require("./data-transfer"), module.exports);
|
|
37
|
+
var focusable = __toESM(require("./focusable.cjs"));
|
|
38
|
+
var tabbable = __toESM(require("./tabbable.cjs"));
|
|
39
|
+
__reExport(index_exports, require("./dom/index.cjs"), module.exports);
|
|
40
|
+
__reExport(index_exports, require("./phrasing-content.cjs"), module.exports);
|
|
41
|
+
__reExport(index_exports, require("./data-transfer.cjs"), module.exports);
|
|
42
42
|
var focus = { focusable, tabbable };
|
|
43
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
44
|
0 && (module.exports = {
|
|
45
45
|
focus,
|
|
46
|
-
...require("./dom"),
|
|
47
|
-
...require("./phrasing-content"),
|
|
48
|
-
...require("./data-transfer")
|
|
46
|
+
...require("./dom/index.cjs"),
|
|
47
|
+
...require("./phrasing-content.cjs"),
|
|
48
|
+
...require("./data-transfer.cjs")
|
|
49
49
|
});
|
|
50
|
-
//# sourceMappingURL=index.
|
|
50
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport * as focusable from './focusable';\nimport * as tabbable from './tabbable';\n\n/**\n * Object grouping `focusable` and `tabbable` utils\n * under the keys with the same name.\n */\nexport const focus = { focusable, tabbable };\n\nexport * from './dom';\nexport * from './phrasing-content';\nexport * from './data-transfer';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,gBAA2B;AAC3B,eAA0B;AAQ1B,0BAAc,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,gBAA2B;AAC3B,eAA0B;AAQ1B,0BAAc,4BAZd;AAaA,0BAAc,mCAbd;AAcA,0BAAc,gCAdd;AAUO,IAAM,QAAQ,EAAE,WAAW,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,7 +26,7 @@ __export(tabbable_exports, {
|
|
|
26
26
|
isTabbableIndex: () => isTabbableIndex
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(tabbable_exports);
|
|
29
|
-
var import_focusable = require("./focusable");
|
|
29
|
+
var import_focusable = require("./focusable.cjs");
|
|
30
30
|
function getTabIndex(element) {
|
|
31
31
|
const tabIndex = element.getAttribute("tabindex");
|
|
32
32
|
return tabIndex === null ? 0 : parseInt(tabIndex, 10);
|
|
@@ -97,4 +97,4 @@ function findNext(element) {
|
|
|
97
97
|
findPrevious,
|
|
98
98
|
isTabbableIndex
|
|
99
99
|
});
|
|
100
|
-
//# sourceMappingURL=tabbable.
|
|
100
|
+
//# sourceMappingURL=tabbable.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// packages/dom/src/dom/clean-node-list.js
|
|
2
|
-
import isEmpty from "./is-empty";
|
|
3
|
-
import remove from "./remove";
|
|
4
|
-
import unwrap from "./unwrap";
|
|
5
|
-
import { isPhrasingContent } from "../phrasing-content";
|
|
6
|
-
import insertAfter from "./insert-after";
|
|
7
|
-
import isElement from "./is-element";
|
|
2
|
+
import isEmpty from "./is-empty.mjs";
|
|
3
|
+
import remove from "./remove.mjs";
|
|
4
|
+
import unwrap from "./unwrap.mjs";
|
|
5
|
+
import { isPhrasingContent } from "../phrasing-content.mjs";
|
|
6
|
+
import insertAfter from "./insert-after.mjs";
|
|
7
|
+
import isElement from "./is-element.mjs";
|
|
8
8
|
var noop = () => {
|
|
9
9
|
};
|
|
10
10
|
function cleanNodeList(nodeList, doc, schema, inline) {
|
|
@@ -106,4 +106,4 @@ function cleanNodeList(nodeList, doc, schema, inline) {
|
|
|
106
106
|
export {
|
|
107
107
|
cleanNodeList as default
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=clean-node-list.
|
|
109
|
+
//# sourceMappingURL=clean-node-list.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/dom/src/dom/compute-caret-rect.js
|
|
2
|
-
import getRectangleFromRange from "./get-rectangle-from-range";
|
|
3
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
2
|
+
import getRectangleFromRange from "./get-rectangle-from-range.mjs";
|
|
3
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
4
4
|
function computeCaretRect(win) {
|
|
5
5
|
const selection = win.getSelection();
|
|
6
6
|
assertIsDefined(selection, "selection");
|
|
@@ -13,4 +13,4 @@ function computeCaretRect(win) {
|
|
|
13
13
|
export {
|
|
14
14
|
computeCaretRect as default
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=compute-caret-rect.
|
|
16
|
+
//# sourceMappingURL=compute-caret-rect.mjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// packages/dom/src/dom/document-has-selection.js
|
|
2
|
-
import isTextField from "./is-text-field";
|
|
3
|
-
import isHTMLInputElement from "./is-html-input-element";
|
|
4
|
-
import documentHasTextSelection from "./document-has-text-selection";
|
|
2
|
+
import isTextField from "./is-text-field.mjs";
|
|
3
|
+
import isHTMLInputElement from "./is-html-input-element.mjs";
|
|
4
|
+
import documentHasTextSelection from "./document-has-text-selection.mjs";
|
|
5
5
|
function documentHasSelection(doc) {
|
|
6
6
|
return !!doc.activeElement && (isHTMLInputElement(doc.activeElement) || isTextField(doc.activeElement) || documentHasTextSelection(doc));
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
9
|
documentHasSelection as default
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=document-has-selection.
|
|
11
|
+
//# sourceMappingURL=document-has-selection.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/document-has-text-selection.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function documentHasTextSelection(doc) {
|
|
4
4
|
assertIsDefined(doc.defaultView, "doc.defaultView");
|
|
5
5
|
const selection = doc.defaultView.getSelection();
|
|
@@ -10,4 +10,4 @@ function documentHasTextSelection(doc) {
|
|
|
10
10
|
export {
|
|
11
11
|
documentHasTextSelection as default
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=document-has-text-selection.
|
|
13
|
+
//# sourceMappingURL=document-has-text-selection.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// packages/dom/src/dom/document-has-uncollapsed-selection.js
|
|
2
|
-
import documentHasTextSelection from "./document-has-text-selection";
|
|
3
|
-
import inputFieldHasUncollapsedSelection from "./input-field-has-uncollapsed-selection";
|
|
2
|
+
import documentHasTextSelection from "./document-has-text-selection.mjs";
|
|
3
|
+
import inputFieldHasUncollapsedSelection from "./input-field-has-uncollapsed-selection.mjs";
|
|
4
4
|
function documentHasUncollapsedSelection(doc) {
|
|
5
5
|
return documentHasTextSelection(doc) || !!doc.activeElement && inputFieldHasUncollapsedSelection(doc.activeElement);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
documentHasUncollapsedSelection as default
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=document-has-uncollapsed-selection.
|
|
10
|
+
//# sourceMappingURL=document-has-uncollapsed-selection.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/get-computed-style.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function getComputedStyle(element) {
|
|
4
4
|
assertIsDefined(
|
|
5
5
|
element.ownerDocument.defaultView,
|
|
@@ -10,4 +10,4 @@ function getComputedStyle(element) {
|
|
|
10
10
|
export {
|
|
11
11
|
getComputedStyle as default
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=get-computed-style.
|
|
13
|
+
//# sourceMappingURL=get-computed-style.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/get-offset-parent.js
|
|
2
|
-
import getComputedStyle from "./get-computed-style";
|
|
2
|
+
import getComputedStyle from "./get-computed-style.mjs";
|
|
3
3
|
function getOffsetParent(node) {
|
|
4
4
|
let closestElement;
|
|
5
5
|
while (closestElement = /** @type {Node} */
|
|
@@ -25,4 +25,4 @@ function getOffsetParent(node) {
|
|
|
25
25
|
export {
|
|
26
26
|
getOffsetParent as default
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=get-offset-parent.
|
|
28
|
+
//# sourceMappingURL=get-offset-parent.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/get-rectangle-from-range.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function getRectangleFromRange(range) {
|
|
4
4
|
if (!range.collapsed) {
|
|
5
5
|
const rects2 = Array.from(range.getClientRects());
|
|
@@ -73,4 +73,4 @@ function getRectangleFromRange(range) {
|
|
|
73
73
|
export {
|
|
74
74
|
getRectangleFromRange as default
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=get-rectangle-from-range.
|
|
76
|
+
//# sourceMappingURL=get-rectangle-from-range.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/get-rectangle-from-range.js"],
|
|
4
|
+
"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. Use instead of `Range.getBoundingClientRect()`, which is often\n * broken, especially for collapsed ranges.\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 ) {\n\t\t\t\tfurthestTop = top;\n\t\t\t}\n\t\t\tif ( bottom > furthestBottom ) {\n\t\t\t\tfurthestBottom = bottom;\n\t\t\t}\n\t\t\tif ( left < furthestLeft ) {\n\t\t\t\tfurthestLeft = left;\n\t\t\t}\n\t\t\tif ( right > furthestRight ) {\n\t\t\t\tfurthestRight = right;\n\t\t\t}\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"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,uBAAuB;AAWjB,SAAR,sBAAwC,OAAQ;AAItD,MAAK,CAAE,MAAM,WAAY;AACxB,UAAMA,SAAQ,MAAM,KAAM,MAAM,eAAe,CAAE;AAGjD,QAAKA,OAAM,WAAW,GAAI;AACzB,aAAOA,OAAO,CAAE;AAAA,IACjB;AAGA,UAAM,gBAAgBA,OAAM,OAAQ,CAAE,EAAE,MAAM,MAAO,QAAQ,CAAE;AAG/D,QAAK,cAAc,WAAW,GAAI;AACjC,aAAO,MAAM,sBAAsB;AAAA,IACpC;AAEA,QAAK,cAAc,WAAW,GAAI;AACjC,aAAO,cAAe,CAAE;AAAA,IACzB;AAEA,QAAI;AAAA,MACH,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IACR,IAAI,cAAe,CAAE;AAErB,eAAY,EAAE,KAAK,QAAQ,MAAM,MAAM,KAAK,eAAgB;AAC3D,UAAK,MAAM,aAAc;AACxB,sBAAc;AAAA,MACf;AACA,UAAK,SAAS,gBAAiB;AAC9B,yBAAiB;AAAA,MAClB;AACA,UAAK,OAAO,cAAe;AAC1B,uBAAe;AAAA,MAChB;AACA,UAAK,QAAQ,eAAgB;AAC5B,wBAAgB;AAAA,MACjB;AAAA,IACD;AAEA,WAAO,IAAI,OAAO;AAAA,MACjB;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,iBAAiB;AAAA,IAClB;AAAA,EACD;AAEA,QAAM,EAAE,eAAe,IAAI;AAC3B,QAAM,EAAE,cAAc,IAAI;AAG1B,MAAK,eAAe,aAAa,MAAO;AACvC,UAAM,EAAE,WAAW,IAAI;AACvB,oBAAiB,YAAY,YAAa;AAC1C,UAAM;AAAA;AAAA,MACL,MAAM,KAAM,WAAW,UAAW,EACjC,QAAS,cAAe;AAAA;AAE1B,oBAAiB,eAAe,eAAgB;AAChD,YAAQ,cAAc,YAAY;AAClC,UAAM,SAAU,YAAY,KAAM;AAClC,UAAM,OAAQ,YAAY,KAAM;AAAA,EACjC;AAEA,QAAM,QAAQ,MAAM,eAAe;AAInC,MAAK,MAAM,SAAS,GAAI;AACvB,WAAO;AAAA,EACR;AAEA,MAAI,OAAO,MAAO,CAAE;AAOpB,MAAK,CAAE,QAAQ,KAAK,WAAW,GAAI;AAClC,oBAAiB,eAAe,eAAgB;AAChD,UAAM,UAAU,cAAc,eAAgB,QAAS;AAEvD,YAAQ,MAAM,WAAW;AACzB,UAAM,WAAY,OAAQ;AAC1B,WAAO,MAAM,eAAe,EAAG,CAAE;AACjC,oBAAiB,QAAQ,YAAY,oBAAqB;AAC1D,YAAQ,WAAW,YAAa,OAAQ;AAAA,EACzC;AAEA,SAAO;AACR;",
|
|
6
|
+
"names": ["rects"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/get-scroll-container.js
|
|
2
|
-
import getComputedStyle from "./get-computed-style";
|
|
2
|
+
import getComputedStyle from "./get-computed-style.mjs";
|
|
3
3
|
function getScrollContainer(node, direction = "vertical") {
|
|
4
4
|
if (!node) {
|
|
5
5
|
return void 0;
|
|
@@ -32,4 +32,4 @@ function getScrollContainer(node, direction = "vertical") {
|
|
|
32
32
|
export {
|
|
33
33
|
getScrollContainer as default
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=get-scroll-container.
|
|
35
|
+
//# sourceMappingURL=get-scroll-container.mjs.map
|
package/build-module/dom/{hidden-caret-range-from-point.js → hidden-caret-range-from-point.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/dom/src/dom/hidden-caret-range-from-point.js
|
|
2
|
-
import caretRangeFromPoint from "./caret-range-from-point";
|
|
3
|
-
import getComputedStyle from "./get-computed-style";
|
|
2
|
+
import caretRangeFromPoint from "./caret-range-from-point.mjs";
|
|
3
|
+
import getComputedStyle from "./get-computed-style.mjs";
|
|
4
4
|
function hiddenCaretRangeFromPoint(doc, x, y, container) {
|
|
5
5
|
const originalZIndex = container.style.zIndex;
|
|
6
6
|
const originalPosition = container.style.position;
|
|
@@ -17,4 +17,4 @@ function hiddenCaretRangeFromPoint(doc, x, y, container) {
|
|
|
17
17
|
export {
|
|
18
18
|
hiddenCaretRangeFromPoint as default
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=hidden-caret-range-from-point.
|
|
20
|
+
//# sourceMappingURL=hidden-caret-range-from-point.mjs.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// packages/dom/src/dom/index.js
|
|
2
|
+
import { default as default2 } from "./compute-caret-rect.mjs";
|
|
3
|
+
import { default as default3 } from "./document-has-text-selection.mjs";
|
|
4
|
+
import { default as default4 } from "./document-has-uncollapsed-selection.mjs";
|
|
5
|
+
import { default as default5 } from "./document-has-selection.mjs";
|
|
6
|
+
import { default as default6 } from "./get-rectangle-from-range.mjs";
|
|
7
|
+
import { default as default7 } from "./get-scroll-container.mjs";
|
|
8
|
+
import { default as default8 } from "./get-offset-parent.mjs";
|
|
9
|
+
import { default as default9 } from "./is-entirely-selected.mjs";
|
|
10
|
+
import { default as default10 } from "./is-form-element.mjs";
|
|
11
|
+
import { default as default11 } from "./is-horizontal-edge.mjs";
|
|
12
|
+
import { default as default12 } from "./is-number-input.mjs";
|
|
13
|
+
import { default as default13 } from "./is-text-field.mjs";
|
|
14
|
+
import { default as default14 } from "./is-vertical-edge.mjs";
|
|
15
|
+
import { default as default15 } from "./place-caret-at-horizontal-edge.mjs";
|
|
16
|
+
import { default as default16 } from "./place-caret-at-vertical-edge.mjs";
|
|
17
|
+
import { default as default17 } from "./replace.mjs";
|
|
18
|
+
import { default as default18 } from "./remove.mjs";
|
|
19
|
+
import { default as default19 } from "./insert-after.mjs";
|
|
20
|
+
import { default as default20 } from "./unwrap.mjs";
|
|
21
|
+
import { default as default21 } from "./replace-tag.mjs";
|
|
22
|
+
import { default as default22 } from "./wrap.mjs";
|
|
23
|
+
import { default as default23 } from "./strip-html.mjs";
|
|
24
|
+
import { default as default24 } from "./is-empty.mjs";
|
|
25
|
+
import { default as default25 } from "./remove-invalid-html.mjs";
|
|
26
|
+
import { default as default26 } from "./is-rtl.mjs";
|
|
27
|
+
import { default as default27 } from "./safe-html.mjs";
|
|
28
|
+
import { default as default28 } from "./is-selection-forward.mjs";
|
|
29
|
+
export {
|
|
30
|
+
default23 as __unstableStripHTML,
|
|
31
|
+
default2 as computeCaretRect,
|
|
32
|
+
default5 as documentHasSelection,
|
|
33
|
+
default3 as documentHasTextSelection,
|
|
34
|
+
default4 as documentHasUncollapsedSelection,
|
|
35
|
+
default8 as getOffsetParent,
|
|
36
|
+
default6 as getRectangleFromRange,
|
|
37
|
+
default7 as getScrollContainer,
|
|
38
|
+
default19 as insertAfter,
|
|
39
|
+
default24 as isEmpty,
|
|
40
|
+
default9 as isEntirelySelected,
|
|
41
|
+
default10 as isFormElement,
|
|
42
|
+
default11 as isHorizontalEdge,
|
|
43
|
+
default12 as isNumberInput,
|
|
44
|
+
default26 as isRTL,
|
|
45
|
+
default28 as isSelectionForward,
|
|
46
|
+
default13 as isTextField,
|
|
47
|
+
default14 as isVerticalEdge,
|
|
48
|
+
default15 as placeCaretAtHorizontalEdge,
|
|
49
|
+
default16 as placeCaretAtVerticalEdge,
|
|
50
|
+
default18 as remove,
|
|
51
|
+
default25 as removeInvalidHTML,
|
|
52
|
+
default17 as replace,
|
|
53
|
+
default21 as replaceTag,
|
|
54
|
+
default27 as safeHTML,
|
|
55
|
+
default20 as unwrap,
|
|
56
|
+
default22 as wrap
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/dom/src/dom/input-field-has-uncollapsed-selection.js
|
|
2
|
-
import isTextField from "./is-text-field";
|
|
3
|
-
import isHTMLInputElement from "./is-html-input-element";
|
|
2
|
+
import isTextField from "./is-text-field.mjs";
|
|
3
|
+
import isHTMLInputElement from "./is-html-input-element.mjs";
|
|
4
4
|
function inputFieldHasUncollapsedSelection(element) {
|
|
5
5
|
if (!isHTMLInputElement(element) && !isTextField(element)) {
|
|
6
6
|
return false;
|
|
@@ -24,4 +24,4 @@ function inputFieldHasUncollapsedSelection(element) {
|
|
|
24
24
|
export {
|
|
25
25
|
inputFieldHasUncollapsedSelection as default
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=input-field-has-uncollapsed-selection.
|
|
27
|
+
//# sourceMappingURL=input-field-has-uncollapsed-selection.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/insert-after.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function insertAfter(newNode, referenceNode) {
|
|
4
4
|
assertIsDefined(referenceNode.parentNode, "referenceNode.parentNode");
|
|
5
5
|
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
|
|
@@ -7,4 +7,4 @@ function insertAfter(newNode, referenceNode) {
|
|
|
7
7
|
export {
|
|
8
8
|
insertAfter as default
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=insert-after.
|
|
10
|
+
//# sourceMappingURL=insert-after.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-edge.js
|
|
2
|
-
import isRTL from "./is-rtl";
|
|
3
|
-
import getRangeHeight from "./get-range-height";
|
|
4
|
-
import getRectangleFromRange from "./get-rectangle-from-range";
|
|
5
|
-
import isSelectionForward from "./is-selection-forward";
|
|
6
|
-
import hiddenCaretRangeFromPoint from "./hidden-caret-range-from-point";
|
|
7
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
8
|
-
import isInputOrTextArea from "./is-input-or-text-area";
|
|
9
|
-
import { scrollIfNoRange } from "./scroll-if-no-range";
|
|
2
|
+
import isRTL from "./is-rtl.mjs";
|
|
3
|
+
import getRangeHeight from "./get-range-height.mjs";
|
|
4
|
+
import getRectangleFromRange from "./get-rectangle-from-range.mjs";
|
|
5
|
+
import isSelectionForward from "./is-selection-forward.mjs";
|
|
6
|
+
import hiddenCaretRangeFromPoint from "./hidden-caret-range-from-point.mjs";
|
|
7
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
8
|
+
import isInputOrTextArea from "./is-input-or-text-area.mjs";
|
|
9
|
+
import { scrollIfNoRange } from "./scroll-if-no-range.mjs";
|
|
10
10
|
function isEdge(container, isReverse, onlyVertical = false) {
|
|
11
11
|
if (isInputOrTextArea(container) && typeof container.selectionStart === "number") {
|
|
12
12
|
if (container.selectionStart !== container.selectionEnd) {
|
|
@@ -70,4 +70,4 @@ function isEdge(container, isReverse, onlyVertical = false) {
|
|
|
70
70
|
export {
|
|
71
71
|
isEdge as default
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=is-edge.
|
|
73
|
+
//# sourceMappingURL=is-edge.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-entirely-selected.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
3
|
-
import isInputOrTextArea from "./is-input-or-text-area";
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
|
+
import isInputOrTextArea from "./is-input-or-text-area.mjs";
|
|
4
4
|
function isEntirelySelected(element) {
|
|
5
5
|
if (isInputOrTextArea(element)) {
|
|
6
6
|
return element.selectionStart === 0 && element.value.length === element.selectionEnd;
|
|
@@ -42,4 +42,4 @@ function isDeepChild(query, container, propName) {
|
|
|
42
42
|
export {
|
|
43
43
|
isEntirelySelected as default
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=is-entirely-selected.
|
|
45
|
+
//# sourceMappingURL=is-entirely-selected.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-form-element.js
|
|
2
|
-
import isInputOrTextArea from "./is-input-or-text-area";
|
|
2
|
+
import isInputOrTextArea from "./is-input-or-text-area.mjs";
|
|
3
3
|
function isFormElement(element) {
|
|
4
4
|
if (!element) {
|
|
5
5
|
return false;
|
|
@@ -11,4 +11,4 @@ function isFormElement(element) {
|
|
|
11
11
|
export {
|
|
12
12
|
isFormElement as default
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=is-form-element.
|
|
14
|
+
//# sourceMappingURL=is-form-element.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-horizontal-edge.js
|
|
2
|
-
import isEdge from "./is-edge";
|
|
2
|
+
import isEdge from "./is-edge.mjs";
|
|
3
3
|
function isHorizontalEdge(container, isReverse) {
|
|
4
4
|
return isEdge(container, isReverse);
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
isHorizontalEdge as default
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=is-horizontal-edge.
|
|
9
|
+
//# sourceMappingURL=is-horizontal-edge.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-number-input.js
|
|
2
2
|
import deprecated from "@wordpress/deprecated";
|
|
3
|
-
import isHTMLInputElement from "./is-html-input-element";
|
|
3
|
+
import isHTMLInputElement from "./is-html-input-element.mjs";
|
|
4
4
|
function isNumberInput(node) {
|
|
5
5
|
deprecated("wp.dom.isNumberInput", {
|
|
6
6
|
since: "6.1",
|
|
@@ -11,4 +11,4 @@ function isNumberInput(node) {
|
|
|
11
11
|
export {
|
|
12
12
|
isNumberInput as default
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=is-number-input.
|
|
14
|
+
//# sourceMappingURL=is-number-input.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-rtl.js
|
|
2
|
-
import getComputedStyle from "./get-computed-style";
|
|
2
|
+
import getComputedStyle from "./get-computed-style.mjs";
|
|
3
3
|
function isRTL(element) {
|
|
4
4
|
return getComputedStyle(element).direction === "rtl";
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
isRTL as default
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=is-rtl.
|
|
9
|
+
//# sourceMappingURL=is-rtl.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-selection-forward.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined";
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function isSelectionForward(selection) {
|
|
4
4
|
const { anchorNode, focusNode, anchorOffset, focusOffset } = selection;
|
|
5
5
|
assertIsDefined(anchorNode, "anchorNode");
|
|
@@ -19,4 +19,4 @@ function isSelectionForward(selection) {
|
|
|
19
19
|
export {
|
|
20
20
|
isSelectionForward as default
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=is-selection-forward.
|
|
22
|
+
//# sourceMappingURL=is-selection-forward.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-text-field.js
|
|
2
|
-
import isHTMLInputElement from "./is-html-input-element";
|
|
2
|
+
import isHTMLInputElement from "./is-html-input-element.mjs";
|
|
3
3
|
function isTextField(node) {
|
|
4
4
|
const nonTextInputs = [
|
|
5
5
|
"button",
|
|
@@ -21,4 +21,4 @@ function isTextField(node) {
|
|
|
21
21
|
export {
|
|
22
22
|
isTextField as default
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=is-text-field.
|
|
24
|
+
//# sourceMappingURL=is-text-field.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/dom/src/dom/is-vertical-edge.js
|
|
2
|
-
import isEdge from "./is-edge";
|
|
2
|
+
import isEdge from "./is-edge.mjs";
|
|
3
3
|
function isVerticalEdge(container, isReverse) {
|
|
4
4
|
return isEdge(container, isReverse, true);
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
isVerticalEdge as default
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=is-vertical-edge.
|
|
9
|
+
//# sourceMappingURL=is-vertical-edge.mjs.map
|