@wordpress/dom 4.36.1-next.8fd3f8831.0 → 4.37.1-next.06ee73755.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/LICENSE.md +1 -1
- package/build/dom/clean-node-list.cjs +5 -5
- package/build/dom/compute-caret-rect.cjs +1 -1
- package/build/dom/document-has-selection.cjs +3 -3
- package/build/dom/document-has-uncollapsed-selection.cjs +2 -2
- package/build/dom/get-offset-parent.cjs +1 -1
- package/build/dom/get-scroll-container.cjs +1 -1
- package/build/dom/hidden-caret-range-from-point.cjs +2 -2
- package/build/dom/index.cjs +27 -27
- package/build/dom/input-field-has-uncollapsed-selection.cjs +2 -2
- package/build/dom/is-edge.cjs +6 -6
- package/build/dom/is-entirely-selected.cjs +1 -1
- package/build/dom/is-form-element.cjs +1 -1
- package/build/dom/is-horizontal-edge.cjs +1 -1
- package/build/dom/is-number-input.cjs +2 -2
- package/build/dom/is-rtl.cjs +1 -1
- package/build/dom/is-text-field.cjs +1 -1
- package/build/dom/is-vertical-edge.cjs +1 -1
- package/build/dom/place-caret-at-edge.cjs +3 -3
- package/build/dom/place-caret-at-horizontal-edge.cjs +1 -1
- package/build/dom/place-caret-at-vertical-edge.cjs +1 -1
- package/build/dom/remove-invalid-html.cjs +1 -1
- package/build/dom/replace.cjs +2 -2
- package/build/dom/safe-html.cjs +1 -1
- package/build/dom/strip-html.cjs +1 -1
- package/build/index.cjs +2 -2
- 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-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/package.json +5 -6
- package/build-module/dom/index.js +0 -58
- package/build-module/index.js +0 -11
- /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-rectangle-from-range.js.map → get-rectangle-from-range.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
|
@@ -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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/dom/src/dom/place-caret-at-edge.js
|
|
2
|
-
import hiddenCaretRangeFromPoint from "./hidden-caret-range-from-point.
|
|
3
|
-
import { assertIsDefined } from "../utils/assert-is-defined.
|
|
4
|
-
import isInputOrTextArea from "./is-input-or-text-area.
|
|
5
|
-
import isRTL from "./is-rtl.
|
|
6
|
-
import { scrollIfNoRange } from "./scroll-if-no-range.
|
|
2
|
+
import hiddenCaretRangeFromPoint from "./hidden-caret-range-from-point.mjs";
|
|
3
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
4
|
+
import isInputOrTextArea from "./is-input-or-text-area.mjs";
|
|
5
|
+
import isRTL from "./is-rtl.mjs";
|
|
6
|
+
import { scrollIfNoRange } from "./scroll-if-no-range.mjs";
|
|
7
7
|
function getRange(container, isReverse, x) {
|
|
8
8
|
const { ownerDocument } = container;
|
|
9
9
|
const isReverseDir = isRTL(container) ? !isReverse : isReverse;
|
|
@@ -58,4 +58,4 @@ function placeCaretAtEdge(container, isReverse, x) {
|
|
|
58
58
|
export {
|
|
59
59
|
placeCaretAtEdge as default
|
|
60
60
|
};
|
|
61
|
-
//# sourceMappingURL=place-caret-at-edge.
|
|
61
|
+
//# sourceMappingURL=place-caret-at-edge.mjs.map
|
package/build-module/dom/{place-caret-at-horizontal-edge.js → place-caret-at-horizontal-edge.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/dom/src/dom/place-caret-at-horizontal-edge.js
|
|
2
|
-
import placeCaretAtEdge from "./place-caret-at-edge.
|
|
2
|
+
import placeCaretAtEdge from "./place-caret-at-edge.mjs";
|
|
3
3
|
function placeCaretAtHorizontalEdge(container, isReverse) {
|
|
4
4
|
return placeCaretAtEdge(container, isReverse, void 0);
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
placeCaretAtHorizontalEdge as default
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=place-caret-at-horizontal-edge.
|
|
9
|
+
//# sourceMappingURL=place-caret-at-horizontal-edge.mjs.map
|
package/build-module/dom/{place-caret-at-vertical-edge.js → place-caret-at-vertical-edge.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/dom/src/dom/place-caret-at-vertical-edge.js
|
|
2
|
-
import placeCaretAtEdge from "./place-caret-at-edge.
|
|
2
|
+
import placeCaretAtEdge from "./place-caret-at-edge.mjs";
|
|
3
3
|
function placeCaretAtVerticalEdge(container, isReverse, rect) {
|
|
4
4
|
return placeCaretAtEdge(container, isReverse, rect?.left);
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
placeCaretAtVerticalEdge as default
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=place-caret-at-vertical-edge.
|
|
9
|
+
//# sourceMappingURL=place-caret-at-vertical-edge.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/remove-invalid-html.js
|
|
2
|
-
import cleanNodeList from "./clean-node-list.
|
|
2
|
+
import cleanNodeList from "./clean-node-list.mjs";
|
|
3
3
|
function removeInvalidHTML(HTML, schema, inline) {
|
|
4
4
|
const doc = document.implementation.createHTMLDocument("");
|
|
5
5
|
doc.body.innerHTML = HTML;
|
|
@@ -9,4 +9,4 @@ function removeInvalidHTML(HTML, schema, inline) {
|
|
|
9
9
|
export {
|
|
10
10
|
removeInvalidHTML as default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=remove-invalid-html.
|
|
12
|
+
//# sourceMappingURL=remove-invalid-html.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/remove.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined.
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function remove(node) {
|
|
4
4
|
assertIsDefined(node.parentNode, "node.parentNode");
|
|
5
5
|
node.parentNode.removeChild(node);
|
|
@@ -7,4 +7,4 @@ function remove(node) {
|
|
|
7
7
|
export {
|
|
8
8
|
remove as default
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=remove.
|
|
10
|
+
//# sourceMappingURL=remove.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/replace-tag.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined.
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function replaceTag(node, tagName) {
|
|
4
4
|
const newNode = node.ownerDocument.createElement(tagName);
|
|
5
5
|
while (node.firstChild) {
|
|
@@ -12,4 +12,4 @@ function replaceTag(node, tagName) {
|
|
|
12
12
|
export {
|
|
13
13
|
replaceTag as default
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=replace-tag.
|
|
15
|
+
//# sourceMappingURL=replace-tag.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// packages/dom/src/dom/replace.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined.
|
|
3
|
-
import insertAfter from "./insert-after.
|
|
4
|
-
import remove from "./remove.
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
|
+
import insertAfter from "./insert-after.mjs";
|
|
4
|
+
import remove from "./remove.mjs";
|
|
5
5
|
function replace(processedNode, newNode) {
|
|
6
6
|
assertIsDefined(processedNode.parentNode, "processedNode.parentNode");
|
|
7
7
|
insertAfter(newNode, processedNode.parentNode);
|
|
@@ -10,4 +10,4 @@ function replace(processedNode, newNode) {
|
|
|
10
10
|
export {
|
|
11
11
|
replace as default
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=replace.
|
|
13
|
+
//# sourceMappingURL=replace.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/safe-html.js
|
|
2
|
-
import remove from "./remove.
|
|
2
|
+
import remove from "./remove.mjs";
|
|
3
3
|
function safeHTML(html) {
|
|
4
4
|
const { body } = document.implementation.createHTMLDocument("");
|
|
5
5
|
body.innerHTML = html;
|
|
@@ -24,4 +24,4 @@ function safeHTML(html) {
|
|
|
24
24
|
export {
|
|
25
25
|
safeHTML as default
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=safe-html.
|
|
27
|
+
//# sourceMappingURL=safe-html.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/strip-html.js
|
|
2
|
-
import safeHTML from "./safe-html.
|
|
2
|
+
import safeHTML from "./safe-html.mjs";
|
|
3
3
|
function stripHTML(html) {
|
|
4
4
|
html = safeHTML(html);
|
|
5
5
|
const doc = document.implementation.createHTMLDocument("");
|
|
@@ -9,4 +9,4 @@ function stripHTML(html) {
|
|
|
9
9
|
export {
|
|
10
10
|
stripHTML as default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=strip-html.
|
|
12
|
+
//# sourceMappingURL=strip-html.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/unwrap.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined.
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function unwrap(node) {
|
|
4
4
|
const parent = node.parentNode;
|
|
5
5
|
assertIsDefined(parent, "node.parentNode");
|
|
@@ -11,4 +11,4 @@ function unwrap(node) {
|
|
|
11
11
|
export {
|
|
12
12
|
unwrap as default
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=unwrap.
|
|
14
|
+
//# sourceMappingURL=unwrap.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/dom/wrap.js
|
|
2
|
-
import { assertIsDefined } from "../utils/assert-is-defined.
|
|
2
|
+
import { assertIsDefined } from "../utils/assert-is-defined.mjs";
|
|
3
3
|
function wrap(newNode, referenceNode) {
|
|
4
4
|
assertIsDefined(referenceNode.parentNode, "referenceNode.parentNode");
|
|
5
5
|
referenceNode.parentNode.insertBefore(newNode, referenceNode);
|
|
@@ -8,4 +8,4 @@ function wrap(newNode, referenceNode) {
|
|
|
8
8
|
export {
|
|
9
9
|
wrap as default
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=wrap.
|
|
11
|
+
//# sourceMappingURL=wrap.mjs.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// packages/dom/src/index.js
|
|
2
|
+
import * as focusable from "./focusable.mjs";
|
|
3
|
+
import * as tabbable from "./tabbable.mjs";
|
|
4
|
+
export * from "./dom/index.mjs";
|
|
5
|
+
export * from "./phrasing-content.mjs";
|
|
6
|
+
export * from "./data-transfer.mjs";
|
|
7
|
+
var focus = { focusable, tabbable };
|
|
8
|
+
export {
|
|
9
|
+
focus
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/dom/src/tabbable.js
|
|
2
|
-
import { find as findFocusable } from "./focusable.
|
|
2
|
+
import { find as findFocusable } from "./focusable.mjs";
|
|
3
3
|
function getTabIndex(element) {
|
|
4
4
|
const tabIndex = element.getAttribute("tabindex");
|
|
5
5
|
return tabIndex === null ? 0 : parseInt(tabIndex, 10);
|
|
@@ -69,4 +69,4 @@ export {
|
|
|
69
69
|
findPrevious,
|
|
70
70
|
isTabbableIndex
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=tabbable.
|
|
72
|
+
//# sourceMappingURL=tabbable.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/dom",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.37.1-next.06ee73755.0",
|
|
4
4
|
"description": "DOM utilities module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,13 +30,12 @@
|
|
|
30
30
|
"build-types",
|
|
31
31
|
"*.md"
|
|
32
32
|
],
|
|
33
|
-
"type": "module",
|
|
34
33
|
"main": "build/index.cjs",
|
|
35
|
-
"module": "build-module/index.
|
|
34
|
+
"module": "build-module/index.mjs",
|
|
36
35
|
"exports": {
|
|
37
36
|
".": {
|
|
38
37
|
"types": "./build-types/index.d.ts",
|
|
39
|
-
"import": "./build-module/index.
|
|
38
|
+
"import": "./build-module/index.mjs",
|
|
40
39
|
"require": "./build/index.cjs"
|
|
41
40
|
},
|
|
42
41
|
"./package.json": "./package.json"
|
|
@@ -46,10 +45,10 @@
|
|
|
46
45
|
"types": "build-types",
|
|
47
46
|
"sideEffects": false,
|
|
48
47
|
"dependencies": {
|
|
49
|
-
"@wordpress/deprecated": "^4.
|
|
48
|
+
"@wordpress/deprecated": "^4.37.1-next.06ee73755.0"
|
|
50
49
|
},
|
|
51
50
|
"publishConfig": {
|
|
52
51
|
"access": "public"
|
|
53
52
|
},
|
|
54
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "fd315436f44683a993d5f053789b5279d95b2872"
|
|
55
54
|
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// packages/dom/src/dom/index.js
|
|
2
|
-
import { default as default2 } from "./compute-caret-rect.js";
|
|
3
|
-
import { default as default3 } from "./document-has-text-selection.js";
|
|
4
|
-
import { default as default4 } from "./document-has-uncollapsed-selection.js";
|
|
5
|
-
import { default as default5 } from "./document-has-selection.js";
|
|
6
|
-
import { default as default6 } from "./get-rectangle-from-range.js";
|
|
7
|
-
import { default as default7 } from "./get-scroll-container.js";
|
|
8
|
-
import { default as default8 } from "./get-offset-parent.js";
|
|
9
|
-
import { default as default9 } from "./is-entirely-selected.js";
|
|
10
|
-
import { default as default10 } from "./is-form-element.js";
|
|
11
|
-
import { default as default11 } from "./is-horizontal-edge.js";
|
|
12
|
-
import { default as default12 } from "./is-number-input.js";
|
|
13
|
-
import { default as default13 } from "./is-text-field.js";
|
|
14
|
-
import { default as default14 } from "./is-vertical-edge.js";
|
|
15
|
-
import { default as default15 } from "./place-caret-at-horizontal-edge.js";
|
|
16
|
-
import { default as default16 } from "./place-caret-at-vertical-edge.js";
|
|
17
|
-
import { default as default17 } from "./replace.js";
|
|
18
|
-
import { default as default18 } from "./remove.js";
|
|
19
|
-
import { default as default19 } from "./insert-after.js";
|
|
20
|
-
import { default as default20 } from "./unwrap.js";
|
|
21
|
-
import { default as default21 } from "./replace-tag.js";
|
|
22
|
-
import { default as default22 } from "./wrap.js";
|
|
23
|
-
import { default as default23 } from "./strip-html.js";
|
|
24
|
-
import { default as default24 } from "./is-empty.js";
|
|
25
|
-
import { default as default25 } from "./remove-invalid-html.js";
|
|
26
|
-
import { default as default26 } from "./is-rtl.js";
|
|
27
|
-
import { default as default27 } from "./safe-html.js";
|
|
28
|
-
import { default as default28 } from "./is-selection-forward.js";
|
|
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.js.map
|
package/build-module/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// packages/dom/src/index.js
|
|
2
|
-
import * as focusable from "./focusable.js";
|
|
3
|
-
import * as tabbable from "./tabbable.js";
|
|
4
|
-
export * from "./dom/index.js";
|
|
5
|
-
export * from "./phrasing-content.js";
|
|
6
|
-
export * from "./data-transfer.js";
|
|
7
|
-
var focus = { focusable, tabbable };
|
|
8
|
-
export {
|
|
9
|
-
focus
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build-module/dom/{document-has-text-selection.js.map → document-has-text-selection.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build-module/dom/{get-rectangle-from-range.js.map → get-rectangle-from-range.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|