@wordpress/dom 4.57.0 → 5.1.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/README.md +23 -23
- package/build/data-transfer.cjs +20 -38
- package/build/data-transfer.cjs.map +1 -7
- package/build/dom/caret-range-from-point.cjs +31 -38
- package/build/dom/caret-range-from-point.cjs.map +1 -7
- package/build/dom/clean-node-list.cjs +88 -133
- package/build/dom/clean-node-list.cjs.map +1 -7
- package/build/dom/compute-caret-rect.cjs +36 -36
- package/build/dom/compute-caret-rect.cjs.map +1 -7
- package/build/dom/document-has-selection.cjs +36 -31
- package/build/dom/document-has-selection.cjs.map +1 -7
- package/build/dom/document-has-text-selection.cjs +24 -30
- package/build/dom/document-has-text-selection.cjs.map +1 -7
- package/build/dom/document-has-uncollapsed-selection.cjs +35 -30
- package/build/dom/document-has-uncollapsed-selection.cjs.map +1 -7
- package/build/dom/get-computed-style.cjs +14 -30
- package/build/dom/get-computed-style.cjs.map +1 -7
- package/build/dom/get-offset-parent.cjs +41 -48
- package/build/dom/get-offset-parent.cjs.map +1 -7
- package/build/dom/get-range-height.cjs +18 -31
- package/build/dom/get-range-height.cjs.map +1 -7
- package/build/dom/get-rectangle-from-range.cjs +82 -133
- package/build/dom/get-rectangle-from-range.cjs.map +1 -7
- package/build/dom/get-scroll-container.cjs +47 -55
- package/build/dom/get-scroll-container.cjs.map +1 -7
- package/build/dom/hidden-caret-range-from-point.cjs +49 -43
- package/build/dom/hidden-caret-range-from-point.cjs.map +1 -7
- package/build/dom/index.cjs +233 -110
- package/build/dom/input-field-has-uncollapsed-selection.cjs +49 -47
- package/build/dom/input-field-has-uncollapsed-selection.cjs.map +1 -7
- package/build/dom/insert-after.cjs +17 -27
- package/build/dom/insert-after.cjs.map +1 -7
- package/build/dom/is-edge.cjs +83 -98
- package/build/dom/is-edge.cjs.map +1 -7
- package/build/dom/is-element.cjs +12 -25
- package/build/dom/is-element.cjs.map +1 -7
- package/build/dom/is-empty.cjs +23 -40
- package/build/dom/is-empty.cjs.map +1 -7
- package/build/dom/is-entirely-selected.cjs +71 -71
- package/build/dom/is-entirely-selected.cjs.map +1 -7
- package/build/dom/is-form-element.cjs +34 -34
- package/build/dom/is-form-element.cjs.map +1 -7
- package/build/dom/is-horizontal-edge.cjs +32 -29
- package/build/dom/is-horizontal-edge.cjs.map +1 -7
- package/build/dom/is-html-input-element.cjs +12 -25
- package/build/dom/is-html-input-element.cjs.map +1 -7
- package/build/dom/is-input-or-text-area.cjs +12 -25
- package/build/dom/is-input-or-text-area.cjs.map +1 -7
- package/build/dom/is-number-input.cjs +37 -34
- package/build/dom/is-number-input.cjs.map +1 -7
- package/build/dom/is-rtl.cjs +31 -29
- package/build/dom/is-rtl.cjs.map +1 -7
- package/build/dom/is-selection-forward.cjs +26 -39
- package/build/dom/is-selection-forward.cjs.map +1 -7
- package/build/dom/is-text-field.cjs +46 -44
- package/build/dom/is-text-field.cjs.map +1 -7
- package/build/dom/is-vertical-edge.cjs +32 -29
- package/build/dom/is-vertical-edge.cjs.map +1 -7
- package/build/dom/place-caret-at-edge.cjs +76 -79
- package/build/dom/place-caret-at-edge.cjs.map +1 -7
- package/build/dom/place-caret-at-horizontal-edge.cjs +30 -29
- package/build/dom/place-caret-at-horizontal-edge.cjs.map +1 -7
- package/build/dom/place-caret-at-vertical-edge.cjs +31 -29
- package/build/dom/place-caret-at-vertical-edge.cjs.map +1 -7
- package/build/dom/remove-invalid-html.cjs +36 -32
- package/build/dom/remove-invalid-html.cjs.map +1 -7
- package/build/dom/remove.cjs +15 -27
- package/build/dom/remove.cjs.map +1 -7
- package/build/dom/replace-tag.cjs +21 -32
- package/build/dom/replace-tag.cjs.map +1 -7
- package/build/dom/replace.cjs +35 -33
- package/build/dom/replace.cjs.map +1 -7
- package/build/dom/safe-html.cjs +46 -47
- package/build/dom/safe-html.cjs.map +1 -7
- package/build/dom/scroll-if-no-range.cjs +24 -37
- package/build/dom/scroll-if-no-range.cjs.map +1 -7
- package/build/dom/strip-html.cjs +34 -32
- package/build/dom/strip-html.cjs.map +1 -7
- package/build/dom/types.cjs +5 -0
- package/build/dom/unwrap.cjs +17 -31
- package/build/dom/unwrap.cjs.map +1 -7
- package/build/dom/wrap.cjs +17 -28
- package/build/dom/wrap.cjs.map +1 -7
- package/build/focusable.cjs +99 -77
- package/build/focusable.cjs.map +1 -7
- package/build/index.cjs +58 -39
- package/build/index.cjs.map +1 -7
- package/build/phrasing-content.cjs +163 -159
- package/build/phrasing-content.cjs.map +1 -7
- package/build/tabbable.cjs +123 -78
- package/build/tabbable.cjs.map +1 -7
- package/build/types.cjs +5 -0
- package/build/utils/assert-is-defined.cjs +8 -33
- package/build/utils/assert-is-defined.cjs.map +1 -7
- package/build-module/data-transfer.mjs +17 -15
- package/build-module/data-transfer.mjs.map +1 -7
- package/build-module/dom/caret-range-from-point.mjs +28 -19
- package/build-module/dom/caret-range-from-point.mjs.map +1 -7
- package/build-module/dom/clean-node-list.mjs +60 -105
- package/build-module/dom/clean-node-list.mjs.map +1 -7
- package/build-module/dom/compute-caret-rect.mjs +16 -12
- package/build-module/dom/compute-caret-rect.mjs.map +1 -7
- package/build-module/dom/document-has-selection.mjs +13 -6
- package/build-module/dom/document-has-selection.mjs.map +1 -7
- package/build-module/dom/document-has-text-selection.mjs +20 -10
- package/build-module/dom/document-has-text-selection.mjs.map +1 -7
- package/build-module/dom/document-has-uncollapsed-selection.mjs +14 -6
- package/build-module/dom/document-has-uncollapsed-selection.mjs.map +1 -7
- package/build-module/dom/get-computed-style.mjs +10 -10
- package/build-module/dom/get-computed-style.mjs.map +1 -7
- package/build-module/dom/get-offset-parent.mjs +21 -25
- package/build-module/dom/get-offset-parent.mjs.map +1 -7
- package/build-module/dom/get-range-height.mjs +15 -12
- package/build-module/dom/get-range-height.mjs.map +1 -7
- package/build-module/dom/get-rectangle-from-range.mjs +78 -113
- package/build-module/dom/get-rectangle-from-range.mjs.map +1 -7
- package/build-module/dom/get-scroll-container.mjs +28 -32
- package/build-module/dom/get-scroll-container.mjs.map +1 -7
- package/build-module/dom/hidden-caret-range-from-point.mjs +28 -19
- package/build-module/dom/hidden-caret-range-from-point.mjs.map +1 -7
- package/build-module/dom/index.mjs +28 -58
- package/build-module/dom/input-field-has-uncollapsed-selection.mjs +28 -23
- package/build-module/dom/input-field-has-uncollapsed-selection.mjs.map +1 -7
- package/build-module/dom/insert-after.mjs +13 -7
- package/build-module/dom/insert-after.mjs.map +1 -7
- package/build-module/dom/is-edge.mjs +53 -69
- package/build-module/dom/is-edge.mjs.map +1 -7
- package/build-module/dom/is-element.mjs +9 -6
- package/build-module/dom/is-element.mjs.map +1 -7
- package/build-module/dom/is-empty.mjs +20 -21
- package/build-module/dom/is-empty.mjs.map +1 -7
- package/build-module/dom/is-entirely-selected.mjs +51 -47
- package/build-module/dom/is-entirely-selected.mjs.map +1 -7
- package/build-module/dom/is-form-element.mjs +15 -11
- package/build-module/dom/is-form-element.mjs.map +1 -7
- package/build-module/dom/is-horizontal-edge.mjs +13 -6
- package/build-module/dom/is-horizontal-edge.mjs.map +1 -7
- package/build-module/dom/is-html-input-element.mjs +9 -6
- package/build-module/dom/is-html-input-element.mjs.map +1 -7
- package/build-module/dom/is-input-or-text-area.mjs +9 -6
- package/build-module/dom/is-input-or-text-area.mjs.map +1 -7
- package/build-module/dom/is-number-input.mjs +16 -10
- package/build-module/dom/is-number-input.mjs.map +1 -7
- package/build-module/dom/is-rtl.mjs +12 -6
- package/build-module/dom/is-rtl.mjs.map +1 -7
- package/build-module/dom/is-selection-forward.mjs +22 -19
- package/build-module/dom/is-selection-forward.mjs.map +1 -7
- package/build-module/dom/is-text-field.mjs +27 -21
- package/build-module/dom/is-text-field.mjs.map +1 -7
- package/build-module/dom/is-vertical-edge.mjs +13 -6
- package/build-module/dom/is-vertical-edge.mjs.map +1 -7
- package/build-module/dom/place-caret-at-edge.mjs +51 -52
- package/build-module/dom/place-caret-at-edge.mjs.map +1 -7
- package/build-module/dom/place-caret-at-horizontal-edge.mjs +11 -6
- package/build-module/dom/place-caret-at-horizontal-edge.mjs.map +1 -7
- package/build-module/dom/place-caret-at-vertical-edge.mjs +12 -6
- package/build-module/dom/place-caret-at-vertical-edge.mjs.map +1 -7
- package/build-module/dom/remove-invalid-html.mjs +17 -9
- package/build-module/dom/remove-invalid-html.mjs.map +1 -7
- package/build-module/dom/remove.mjs +11 -7
- package/build-module/dom/remove.mjs.map +1 -7
- package/build-module/dom/replace-tag.mjs +17 -12
- package/build-module/dom/replace-tag.mjs.map +1 -7
- package/build-module/dom/replace.mjs +13 -8
- package/build-module/dom/replace.mjs.map +1 -7
- package/build-module/dom/safe-html.mjs +27 -24
- package/build-module/dom/safe-html.mjs.map +1 -7
- package/build-module/dom/scroll-if-no-range.mjs +21 -14
- package/build-module/dom/scroll-if-no-range.mjs.map +1 -7
- package/build-module/dom/strip-html.mjs +15 -9
- package/build-module/dom/strip-html.mjs.map +1 -7
- package/build-module/dom/types.mjs +0 -0
- package/build-module/dom/unwrap.mjs +13 -11
- package/build-module/dom/unwrap.mjs.map +1 -7
- package/build-module/dom/wrap.mjs +13 -8
- package/build-module/dom/wrap.mjs.map +1 -7
- package/build-module/focusable.mjs +96 -54
- package/build-module/focusable.mjs.map +1 -7
- package/build-module/index.mjs +11 -5
- package/build-module/index.mjs.map +1 -7
- package/build-module/phrasing-content.mjs +158 -134
- package/build-module/phrasing-content.mjs.map +1 -7
- package/build-module/tabbable.mjs +117 -52
- package/build-module/tabbable.mjs.map +1 -7
- package/build-module/types.mjs +0 -0
- package/build-module/utils/assert-is-defined.mjs +4 -9
- package/build-module/utils/assert-is-defined.mjs.map +1 -7
- package/build-types/data-transfer.d.ts +2 -2
- package/build-types/data-transfer.d.ts.map +1 -1
- package/build-types/dom/caret-range-from-point.d.ts +4 -4
- package/build-types/dom/caret-range-from-point.d.ts.map +1 -1
- package/build-types/dom/clean-node-list.d.ts +6 -46
- package/build-types/dom/clean-node-list.d.ts.map +1 -1
- package/build-types/dom/compute-caret-rect.d.ts +2 -2
- package/build-types/dom/compute-caret-rect.d.ts.map +1 -1
- package/build-types/dom/document-has-selection.d.ts +2 -2
- package/build-types/dom/document-has-selection.d.ts.map +1 -1
- package/build-types/dom/document-has-text-selection.d.ts +2 -2
- package/build-types/dom/document-has-text-selection.d.ts.map +1 -1
- package/build-types/dom/document-has-uncollapsed-selection.d.ts +2 -2
- package/build-types/dom/document-has-uncollapsed-selection.d.ts.map +1 -1
- package/build-types/dom/get-computed-style.d.ts +3 -3
- package/build-types/dom/get-computed-style.d.ts.map +1 -1
- package/build-types/dom/get-offset-parent.d.ts +2 -2
- package/build-types/dom/get-offset-parent.d.ts.map +1 -1
- package/build-types/dom/get-range-height.d.ts +2 -2
- package/build-types/dom/get-range-height.d.ts.map +1 -1
- package/build-types/dom/get-rectangle-from-range.d.ts +2 -2
- package/build-types/dom/get-rectangle-from-range.d.ts.map +1 -1
- package/build-types/dom/get-scroll-container.d.ts +5 -5
- package/build-types/dom/get-scroll-container.d.ts.map +1 -1
- package/build-types/dom/hidden-caret-range-from-point.d.ts +5 -5
- package/build-types/dom/hidden-caret-range-from-point.d.ts.map +1 -1
- package/build-types/dom/index.d.ts.map +1 -1
- package/build-types/dom/input-field-has-uncollapsed-selection.d.ts +2 -2
- package/build-types/dom/input-field-has-uncollapsed-selection.d.ts.map +1 -1
- package/build-types/dom/insert-after.d.ts +2 -3
- package/build-types/dom/insert-after.d.ts.map +1 -1
- package/build-types/dom/is-edge.d.ts +4 -4
- package/build-types/dom/is-edge.d.ts.map +1 -1
- package/build-types/dom/is-element.d.ts.map +1 -1
- package/build-types/dom/is-empty.d.ts +3 -3
- package/build-types/dom/is-empty.d.ts.map +1 -1
- package/build-types/dom/is-entirely-selected.d.ts +2 -2
- package/build-types/dom/is-entirely-selected.d.ts.map +1 -1
- package/build-types/dom/is-form-element.d.ts +3 -3
- package/build-types/dom/is-form-element.d.ts.map +1 -1
- package/build-types/dom/is-horizontal-edge.d.ts.map +1 -1
- package/build-types/dom/is-html-input-element.d.ts +1 -1
- package/build-types/dom/is-html-input-element.d.ts.map +1 -1
- package/build-types/dom/is-input-or-text-area.d.ts.map +1 -1
- package/build-types/dom/is-number-input.d.ts +2 -2
- package/build-types/dom/is-number-input.d.ts.map +1 -1
- package/build-types/dom/is-rtl.d.ts +2 -2
- package/build-types/dom/is-rtl.d.ts.map +1 -1
- package/build-types/dom/is-selection-forward.d.ts +2 -2
- package/build-types/dom/is-selection-forward.d.ts.map +1 -1
- package/build-types/dom/is-text-field.d.ts +2 -2
- package/build-types/dom/is-text-field.d.ts.map +1 -1
- package/build-types/dom/is-vertical-edge.d.ts.map +1 -1
- package/build-types/dom/place-caret-at-edge.d.ts +3 -3
- package/build-types/dom/place-caret-at-edge.d.ts.map +1 -1
- package/build-types/dom/place-caret-at-horizontal-edge.d.ts.map +1 -1
- package/build-types/dom/place-caret-at-vertical-edge.d.ts.map +1 -1
- package/build-types/dom/remove-invalid-html.d.ts +5 -4
- package/build-types/dom/remove-invalid-html.d.ts.map +1 -1
- package/build-types/dom/remove.d.ts +1 -2
- package/build-types/dom/remove.d.ts.map +1 -1
- package/build-types/dom/replace-tag.d.ts +3 -3
- package/build-types/dom/replace-tag.d.ts.map +1 -1
- package/build-types/dom/replace.d.ts +2 -3
- package/build-types/dom/replace.d.ts.map +1 -1
- package/build-types/dom/safe-html.d.ts +2 -2
- package/build-types/dom/safe-html.d.ts.map +1 -1
- package/build-types/dom/scroll-if-no-range.d.ts +5 -5
- package/build-types/dom/scroll-if-no-range.d.ts.map +1 -1
- package/build-types/dom/strip-html.d.ts +2 -2
- package/build-types/dom/strip-html.d.ts.map +1 -1
- package/build-types/dom/types.d.ts +32 -0
- package/build-types/dom/types.d.ts.map +1 -0
- package/build-types/dom/unwrap.d.ts +1 -3
- package/build-types/dom/unwrap.d.ts.map +1 -1
- package/build-types/dom/wrap.d.ts +2 -2
- package/build-types/dom/wrap.d.ts.map +1 -1
- package/build-types/focusable.d.ts +11 -30
- package/build-types/focusable.d.ts.map +1 -1
- package/build-types/index.d.ts +17 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/phrasing-content.d.ts +9 -24
- package/build-types/phrasing-content.d.ts.map +1 -1
- package/build-types/tabbable.d.ts +10 -15
- package/build-types/tabbable.d.ts.map +1 -1
- package/build-types/types.d.ts +29 -0
- package/build-types/types.d.ts.map +1 -0
- package/package.json +6 -7
- package/src/{data-transfer.js → data-transfer.ts} +3 -3
- package/src/dom/{caret-range-from-point.js → caret-range-from-point.ts} +9 -5
- package/src/dom/{clean-node-list.js → clean-node-list.ts} +16 -24
- package/src/dom/{compute-caret-rect.js → compute-caret-rect.ts} +3 -3
- package/src/dom/{document-has-selection.js → document-has-selection.ts} +3 -3
- package/src/dom/{document-has-text-selection.js → document-has-text-selection.ts} +3 -3
- package/src/dom/{document-has-uncollapsed-selection.js → document-has-uncollapsed-selection.ts} +5 -3
- package/src/dom/{get-computed-style.js → get-computed-style.ts} +5 -3
- package/src/dom/{get-offset-parent.js → get-offset-parent.ts} +9 -14
- package/src/dom/{get-range-height.js → get-range-height.ts} +3 -3
- package/src/dom/{get-rectangle-from-range.js → get-rectangle-from-range.ts} +6 -12
- package/src/dom/{get-scroll-container.js → get-scroll-container.ts} +9 -9
- package/src/dom/{hidden-caret-range-from-point.js → hidden-caret-range-from-point.ts} +11 -6
- package/src/dom/{input-field-has-uncollapsed-selection.js → input-field-has-uncollapsed-selection.ts} +7 -5
- package/src/dom/{insert-after.js → insert-after.ts} +6 -4
- package/src/dom/{is-edge.js → is-edge.ts} +44 -48
- package/src/dom/{is-element.js → is-element.ts} +3 -1
- package/src/dom/{is-empty.js → is-empty.ts} +5 -7
- package/src/dom/{is-entirely-selected.js → is-entirely-selected.ts} +14 -11
- package/src/dom/{is-form-element.js → is-form-element.ts} +5 -3
- package/src/dom/{is-horizontal-edge.js → is-horizontal-edge.ts} +4 -1
- package/src/dom/{is-html-input-element.js → is-html-input-element.ts} +3 -1
- package/src/dom/{is-input-or-text-area.js → is-input-or-text-area.ts} +3 -1
- package/src/dom/{is-number-input.js → is-number-input.ts} +3 -3
- package/src/dom/{is-rtl.js → is-rtl.ts} +3 -3
- package/src/dom/{is-selection-forward.js → is-selection-forward.ts} +3 -3
- package/src/dom/{is-text-field.js → is-text-field.ts} +4 -4
- package/src/dom/{is-vertical-edge.js → is-vertical-edge.ts} +4 -1
- package/src/dom/{place-caret-at-edge.js → place-caret-at-edge.ts} +17 -9
- package/src/dom/{place-caret-at-horizontal-edge.js → place-caret-at-horizontal-edge.ts} +4 -1
- package/src/dom/{place-caret-at-vertical-edge.js → place-caret-at-vertical-edge.ts} +5 -1
- package/src/dom/{remove-invalid-html.js → remove-invalid-html.ts} +9 -4
- package/src/dom/{remove.js → remove.ts} +2 -3
- package/src/dom/{replace-tag.js → replace-tag.ts} +4 -4
- package/src/dom/{replace.js → replace.ts} +6 -4
- package/src/dom/{safe-html.js → safe-html.ts} +3 -3
- package/src/dom/{scroll-if-no-range.js → scroll-if-no-range.ts} +9 -5
- package/src/dom/{strip-html.js → strip-html.ts} +3 -3
- package/src/dom/test/{get-rectangle-from-range.browser.test.js → get-rectangle-from-range.browser.test.ts} +25 -25
- package/src/dom/types.ts +28 -0
- package/src/dom/{unwrap.js → unwrap.ts} +2 -4
- package/src/dom/{wrap.js → wrap.ts} +3 -3
- package/src/{focusable.js → focusable.ts} +34 -32
- package/src/index.ts +33 -0
- package/src/{phrasing-content.js → phrasing-content.ts} +15 -30
- package/src/{tabbable.js → tabbable.ts} +48 -39
- package/src/test/{dom.jsdom.test.js → dom.jsdom.test.ts} +30 -6
- package/src/test/{focusable.browser.test.js → focusable.browser.test.ts} +14 -13
- package/src/test/{tabbable.browser.test.js → tabbable.browser.test.ts} +3 -2
- package/src/types.ts +32 -0
- package/CHANGELOG.md +0 -317
- package/build/dom/index.cjs.map +0 -7
- package/build-module/dom/index.mjs.map +0 -7
- package/src/index.js +0 -12
- /package/src/dom/{index.js → index.ts} +0 -0
- /package/src/dom/test/{safe-html.jsdom.test.js → safe-html.jsdom.test.ts} +0 -0
- /package/src/dom/test/{strip-html.jsdom.test.js → strip-html.jsdom.test.ts} +0 -0
- /package/src/test/{focusable-area.jsdom.test.js → focusable-area.jsdom.test.ts} +0 -0
- /package/src/test/{utils.js → utils.ts} +0 -0
|
@@ -1,52 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Attributes.
|
|
4
|
-
*/
|
|
5
|
-
attributes?: string[];
|
|
6
|
-
/**
|
|
7
|
-
* Classnames or RegExp to test against. Use '*' to keep all classes.
|
|
8
|
-
*/
|
|
9
|
-
classes?: (string | RegExp)[];
|
|
10
|
-
/**
|
|
11
|
-
* Child schemas.
|
|
12
|
-
*/
|
|
13
|
-
children?: '*' | {
|
|
14
|
-
[tag: string]: SchemaItem;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Selectors to test required children against. Leave empty or undefined if there are no requirements.
|
|
18
|
-
*/
|
|
19
|
-
require?: string[];
|
|
20
|
-
/**
|
|
21
|
-
* Whether to allow nodes without children.
|
|
22
|
-
*/
|
|
23
|
-
allowEmpty: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Function to test whether a node is a match. If left undefined any node will be assumed to match.
|
|
26
|
-
*/
|
|
27
|
-
isMatch?: (node: Node) => boolean;
|
|
28
|
-
};
|
|
29
|
-
export type Schema = {
|
|
30
|
-
[tag: string]: SchemaItem;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* @typedef SchemaItem
|
|
34
|
-
* @property {string[]} [attributes] Attributes.
|
|
35
|
-
* @property {(string | RegExp)[]} [classes] Classnames or RegExp to test against. Use '*' to keep all classes.
|
|
36
|
-
* @property {'*' | { [tag: string]: SchemaItem }} [children] Child schemas.
|
|
37
|
-
* @property {string[]} [require] Selectors to test required children against. Leave empty or undefined if there are no requirements.
|
|
38
|
-
* @property {boolean} allowEmpty Whether to allow nodes without children.
|
|
39
|
-
* @property {(node: Node) => boolean} [isMatch] Function to test whether a node is a match. If left undefined any node will be assumed to match.
|
|
40
|
-
*/
|
|
41
|
-
/** @typedef {{ [tag: string]: SchemaItem }} Schema */
|
|
1
|
+
import type { Schema } from './types';
|
|
42
2
|
/**
|
|
43
3
|
* Given a schema, unwraps or removes nodes, attributes and classes on a node
|
|
44
4
|
* list.
|
|
45
5
|
*
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
49
|
-
* @param
|
|
6
|
+
* @param nodeList The nodeList to filter.
|
|
7
|
+
* @param doc The document of the nodeList.
|
|
8
|
+
* @param schema Schema for the HTML.
|
|
9
|
+
* @param [inline] Whether to clean for inline mode.
|
|
50
10
|
*/
|
|
51
|
-
export default function cleanNodeList(nodeList: NodeList, doc: Document, schema: Schema, inline
|
|
11
|
+
export default function cleanNodeList(nodeList: NodeList, doc: Document, schema: Schema, inline?: boolean): void;
|
|
52
12
|
//# sourceMappingURL=clean-node-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-node-list.d.ts","sourceRoot":"","sources":["../../src/dom/clean-node-list.
|
|
1
|
+
{"version":3,"file":"clean-node-list.d.ts","sourceRoot":"","sources":["../../src/dom/clean-node-list.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAItC;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACpC,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,OAAO,QAiKhB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get the rectangle for the selection in a container.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param win The window of the selection.
|
|
5
5
|
*
|
|
6
|
-
* @return
|
|
6
|
+
* @return The rectangle.
|
|
7
7
|
*/
|
|
8
8
|
export default function computeCaretRect(win: Window): DOMRect | null;
|
|
9
9
|
//# sourceMappingURL=compute-caret-rect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-caret-rect.d.ts","sourceRoot":"","sources":["../../src/dom/compute-caret-rect.
|
|
1
|
+
{"version":3,"file":"compute-caret-rect.d.ts","sourceRoot":"","sources":["../../src/dom/compute-caret-rect.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,GAAG,EAAE,MAAM,GAAI,OAAO,GAAG,IAAI,CAUtE"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Check whether the current document has a selection. This includes focus in
|
|
3
3
|
* input fields, textareas, and general rich-text selection.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param doc The document to check.
|
|
6
6
|
*
|
|
7
|
-
* @return
|
|
7
|
+
* @return True if there is selection, false if not.
|
|
8
8
|
*/
|
|
9
9
|
export default function documentHasSelection(doc: Document): boolean;
|
|
10
10
|
//# sourceMappingURL=document-has-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-has-selection.d.ts","sourceRoot":"","sources":["../../src/dom/document-has-selection.
|
|
1
|
+
{"version":3,"file":"document-has-selection.d.ts","sourceRoot":"","sources":["../../src/dom/document-has-selection.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAE,GAAG,EAAE,QAAQ,GAAI,OAAO,CAOrE"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* See: https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects.
|
|
7
7
|
*
|
|
8
|
-
* @param
|
|
8
|
+
* @param doc The document to check.
|
|
9
9
|
*
|
|
10
|
-
* @return
|
|
10
|
+
* @return True if there is selection, false if not.
|
|
11
11
|
*/
|
|
12
12
|
export default function documentHasTextSelection(doc: Document): boolean;
|
|
13
13
|
//# sourceMappingURL=document-has-text-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-has-text-selection.d.ts","sourceRoot":"","sources":["../../src/dom/document-has-text-selection.
|
|
1
|
+
{"version":3,"file":"document-has-text-selection.d.ts","sourceRoot":"","sources":["../../src/dom/document-has-text-selection.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAE,GAAG,EAAE,QAAQ,GAAI,OAAO,CAMzE"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* This includes ranges of text across elements and any selection inside
|
|
4
4
|
* textual `<input>` and `<textarea>` elements.
|
|
5
5
|
*
|
|
6
|
-
* @param
|
|
6
|
+
* @param doc The document to check.
|
|
7
7
|
*
|
|
8
|
-
* @return
|
|
8
|
+
* @return Whether there is any recognizable text selection in the document.
|
|
9
9
|
*/
|
|
10
10
|
export default function documentHasUncollapsedSelection(doc: Document): boolean;
|
|
11
11
|
//# sourceMappingURL=document-has-uncollapsed-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-has-uncollapsed-selection.d.ts","sourceRoot":"","sources":["../../src/dom/document-has-uncollapsed-selection.
|
|
1
|
+
{"version":3,"file":"document-has-uncollapsed-selection.d.ts","sourceRoot":"","sources":["../../src/dom/document-has-uncollapsed-selection.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,+BAA+B,CACtD,GAAG,EAAE,QAAQ,GACX,OAAO,CAMT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param
|
|
3
|
-
* @return
|
|
2
|
+
* @param element
|
|
3
|
+
* @return The computed style for the element.
|
|
4
4
|
*/
|
|
5
|
-
export default function getComputedStyle(element: Element):
|
|
5
|
+
export default function getComputedStyle(element: Element): CSSStyleDeclaration;
|
|
6
6
|
//# sourceMappingURL=get-computed-style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-computed-style.d.ts","sourceRoot":"","sources":["../../src/dom/get-computed-style.
|
|
1
|
+
{"version":3,"file":"get-computed-style.d.ts","sourceRoot":"","sources":["../../src/dom/get-computed-style.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACvC,OAAO,EAAE,OAAO,GACd,mBAAmB,CAMrB"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetparent
|
|
7
7
|
*
|
|
8
|
-
* @param
|
|
8
|
+
* @param node Node from which to find offset parent.
|
|
9
9
|
*
|
|
10
|
-
* @return
|
|
10
|
+
* @return Offset parent.
|
|
11
11
|
*/
|
|
12
12
|
export default function getOffsetParent(node: Node): Node | null;
|
|
13
13
|
//# sourceMappingURL=get-offset-parent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-offset-parent.d.ts","sourceRoot":"","sources":["../../src/dom/get-offset-parent.
|
|
1
|
+
{"version":3,"file":"get-offset-parent.d.ts","sourceRoot":"","sources":["../../src/dom/get-offset-parent.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,IAAI,EAAE,IAAI,GAAI,IAAI,GAAG,IAAI,CAoBjE"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Gets the height of the range without ignoring zero width rectangles, which
|
|
3
3
|
* some browsers ignore when creating a union.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
6
|
-
* @return
|
|
5
|
+
* @param range The range to check.
|
|
6
|
+
* @return Height of the range or undefined if the range has no client rectangles.
|
|
7
7
|
*/
|
|
8
8
|
export default function getRangeHeight(range: Range): number | undefined;
|
|
9
9
|
//# sourceMappingURL=get-range-height.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-range-height.d.ts","sourceRoot":"","sources":["../../src/dom/get-range-height.
|
|
1
|
+
{"version":3,"file":"get-range-height.d.ts","sourceRoot":"","sources":["../../src/dom/get-range-height.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,KAAK,EAAE,KAAK,GAAI,MAAM,GAAG,SAAS,CAWzE"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* can be found. Use instead of `Range.getBoundingClientRect()`, which is often
|
|
4
4
|
* broken, especially for collapsed ranges.
|
|
5
5
|
*
|
|
6
|
-
* @param
|
|
6
|
+
* @param range The range.
|
|
7
7
|
*
|
|
8
|
-
* @return
|
|
8
|
+
* @return The rectangle.
|
|
9
9
|
*/
|
|
10
10
|
export default function getRectangleFromRange(range: Range): DOMRect | null;
|
|
11
11
|
//# sourceMappingURL=get-rectangle-from-range.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-rectangle-from-range.d.ts","sourceRoot":"","sources":["../../src/dom/get-rectangle-from-range.
|
|
1
|
+
{"version":3,"file":"get-rectangle-from-range.d.ts","sourceRoot":"","sources":["../../src/dom/get-rectangle-from-range.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAE,KAAK,EAAE,KAAK,GAAI,OAAO,GAAG,IAAI,CA2J5E"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Given a DOM node, finds the closest scrollable container node or the node
|
|
3
3
|
* itself, if scrollable.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
7
|
-
*
|
|
8
|
-
* @return
|
|
5
|
+
* @param node Node from which to start.
|
|
6
|
+
* @param direction Direction of scrollable container to search for ('vertical', 'horizontal', 'all').
|
|
7
|
+
* Defaults to 'vertical'.
|
|
8
|
+
* @return Scrollable container node, if found.
|
|
9
9
|
*/
|
|
10
|
-
export default function getScrollContainer(node: Element | null, direction?:
|
|
10
|
+
export default function getScrollContainer(node: Element | null, direction?: 'vertical' | 'horizontal' | 'all'): Element | undefined;
|
|
11
11
|
//# sourceMappingURL=get-scroll-container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-scroll-container.d.ts","sourceRoot":"","sources":["../../src/dom/get-scroll-container.
|
|
1
|
+
{"version":3,"file":"get-scroll-container.d.ts","sourceRoot":"","sources":["../../src/dom/get-scroll-container.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACzC,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,SAAS,GAAE,UAAU,GAAG,YAAY,GAAG,KAAkB,GACvD,OAAO,GAAG,SAAS,CAmCrB"}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Gives the container a temporary high z-index (above any UI).
|
|
4
4
|
* This is preferred over getting the UI nodes and set styles there.
|
|
5
5
|
*
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
6
|
+
* @param doc The document of the range.
|
|
7
|
+
* @param x Horizontal position within the current viewport.
|
|
8
|
+
* @param y Vertical position within the current viewport.
|
|
9
|
+
* @param container Container in which the range is expected to be found.
|
|
10
10
|
*
|
|
11
|
-
* @return
|
|
11
|
+
* @return The best range for the given point.
|
|
12
12
|
*/
|
|
13
13
|
export default function hiddenCaretRangeFromPoint(doc: Document, x: number, y: number, container: HTMLElement): Range | null;
|
|
14
14
|
//# sourceMappingURL=hidden-caret-range-from-point.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-caret-range-from-point.d.ts","sourceRoot":"","sources":["../../src/dom/hidden-caret-range-from-point.
|
|
1
|
+
{"version":3,"file":"hidden-caret-range-from-point.d.ts","sourceRoot":"","sources":["../../src/dom/hidden-caret-range-from-point.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAChD,GAAG,EAAE,QAAQ,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,WAAW,GACpB,KAAK,GAAG,IAAI,CA2Bd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* See: https://html.spec.whatwg.org/multipage/input.html#do-not-apply
|
|
13
13
|
*
|
|
14
|
-
* @param
|
|
14
|
+
* @param element The HTML element.
|
|
15
15
|
*
|
|
16
|
-
* @return
|
|
16
|
+
* @return Whether the input/textarea element has some "selection".
|
|
17
17
|
*/
|
|
18
18
|
export default function inputFieldHasUncollapsedSelection(element: Element): boolean;
|
|
19
19
|
//# sourceMappingURL=input-field-has-uncollapsed-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field-has-uncollapsed-selection.d.ts","sourceRoot":"","sources":["../../src/dom/input-field-has-uncollapsed-selection.
|
|
1
|
+
{"version":3,"file":"input-field-has-uncollapsed-selection.d.ts","sourceRoot":"","sources":["../../src/dom/input-field-has-uncollapsed-selection.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,iCAAiC,CACxD,OAAO,EAAE,OAAO,GACd,OAAO,CAwBT"}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Given two DOM nodes, inserts the former in the DOM as the next sibling of
|
|
3
3
|
* the latter.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
7
|
-
* @return {void}
|
|
5
|
+
* @param newNode Node to be inserted.
|
|
6
|
+
* @param referenceNode Node after which to perform the insertion.
|
|
8
7
|
*/
|
|
9
8
|
export default function insertAfter(newNode: Node, referenceNode: Node): void;
|
|
10
9
|
//# sourceMappingURL=insert-after.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-after.d.ts","sourceRoot":"","sources":["../../src/dom/insert-after.
|
|
1
|
+
{"version":3,"file":"insert-after.d.ts","sourceRoot":"","sources":["../../src/dom/insert-after.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAClC,OAAO,EAAE,IAAI,EACb,aAAa,EAAE,IAAI,GACjB,IAAI,CAGN"}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* horizontal position by default. Set `onlyVertical` to true to check only
|
|
4
4
|
* vertically.
|
|
5
5
|
*
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
6
|
+
* @param container Focusable element.
|
|
7
|
+
* @param isReverse Set to true to check left, false to check right.
|
|
8
|
+
* @param onlyVertical Set to true to check only vertical position.
|
|
9
9
|
*
|
|
10
|
-
* @return
|
|
10
|
+
* @return True if at the edge, false if not.
|
|
11
11
|
*/
|
|
12
12
|
export default function isEdge(container: HTMLElement, isReverse: boolean, onlyVertical?: boolean): boolean;
|
|
13
13
|
//# sourceMappingURL=is-edge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-edge.d.ts","sourceRoot":"","sources":["../../src/dom/is-edge.
|
|
1
|
+
{"version":3,"file":"is-edge.d.ts","sourceRoot":"","sources":["../../src/dom/is-edge.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAC7B,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,OAAO,EAClB,YAAY,GAAE,OAAe,GAC3B,OAAO,CA0HT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-element.d.ts","sourceRoot":"","sources":["../../src/dom/is-element.
|
|
1
|
+
{"version":3,"file":"is-element.d.ts","sourceRoot":"","sources":["../../src/dom/is-element.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAChC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAC3B,IAAI,IAAI,OAAO,CAEjB"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Recursively checks if an element is empty. An element is not empty if it
|
|
3
3
|
* contains text or contains elements with attributes such as images.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param element The element to check.
|
|
6
6
|
*
|
|
7
|
-
* @return
|
|
7
|
+
* @return Whether or not the element is empty.
|
|
8
8
|
*/
|
|
9
|
-
export default function isEmpty(element:
|
|
9
|
+
export default function isEmpty(element: Node): boolean;
|
|
10
10
|
//# sourceMappingURL=is-empty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-empty.d.ts","sourceRoot":"","sources":["../../src/dom/is-empty.
|
|
1
|
+
{"version":3,"file":"is-empty.d.ts","sourceRoot":"","sources":["../../src/dom/is-empty.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAE,OAAO,EAAE,IAAI,GAAI,OAAO,CAiBxD"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Check whether the contents of the element have been entirely selected.
|
|
3
3
|
* Returns true if there is no possibility of selection.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param element The element to check.
|
|
6
6
|
*
|
|
7
|
-
* @return
|
|
7
|
+
* @return True if entirely selected, false if not.
|
|
8
8
|
*/
|
|
9
9
|
export default function isEntirelySelected(element: HTMLElement): boolean;
|
|
10
10
|
//# sourceMappingURL=is-entirely-selected.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-entirely-selected.d.ts","sourceRoot":"","sources":["../../src/dom/is-entirely-selected.
|
|
1
|
+
{"version":3,"file":"is-entirely-selected.d.ts","sourceRoot":"","sources":["../../src/dom/is-entirely-selected.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,OAAO,EAAE,WAAW,GAAI,OAAO,CAuD1E"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Detects if element is a form element.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param element The element to check.
|
|
6
6
|
*
|
|
7
|
-
* @return
|
|
7
|
+
* @return True if form element and false otherwise.
|
|
8
8
|
*/
|
|
9
|
-
export default function isFormElement(element: Element): boolean;
|
|
9
|
+
export default function isFormElement(element: Element | null | undefined): boolean;
|
|
10
10
|
//# sourceMappingURL=is-form-element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-form-element.d.ts","sourceRoot":"","sources":["../../src/dom/is-form-element.
|
|
1
|
+
{"version":3,"file":"is-form-element.d.ts","sourceRoot":"","sources":["../../src/dom/is-form-element.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACpC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GACjC,OAAO,CAUT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-horizontal-edge.d.ts","sourceRoot":"","sources":["../../src/dom/is-horizontal-edge.
|
|
1
|
+
{"version":3,"file":"is-horizontal-edge.d.ts","sourceRoot":"","sources":["../../src/dom/is-horizontal-edge.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACvC,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,OAAO,GAChB,OAAO,CAET"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* @param {Node} node
|
|
3
3
|
* @return {node is HTMLInputElement} Whether the node is an HTMLInputElement.
|
|
4
4
|
*/
|
|
5
|
-
export default function isHTMLInputElement(node: Node): node is HTMLInputElement;
|
|
5
|
+
export default function isHTMLInputElement(node: Node | null | undefined): node is HTMLInputElement;
|
|
6
6
|
//# sourceMappingURL=is-html-input-element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-html-input-element.d.ts","sourceRoot":"","sources":["../../src/dom/is-html-input-element.
|
|
1
|
+
{"version":3,"file":"is-html-input-element.d.ts","sourceRoot":"","sources":["../../src/dom/is-html-input-element.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACzC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAC3B,IAAI,IAAI,gBAAgB,CAE1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-input-or-text-area.d.ts","sourceRoot":"","sources":["../../src/dom/is-input-or-text-area.
|
|
1
|
+
{"version":3,"file":"is-input-or-text-area.d.ts","sourceRoot":"","sources":["../../src/dom/is-input-or-text-area.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACxC,OAAO,EAAE,OAAO,GACd,OAAO,IAAI,gBAAgB,GAAG,mBAAmB,CAEnD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check whether the given element is an input field of type number.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param node The HTML node.
|
|
5
5
|
*
|
|
6
|
-
* @return
|
|
6
|
+
* @return True if the node is number input.
|
|
7
7
|
*/
|
|
8
8
|
export default function isNumberInput(node: Node): node is HTMLInputElement;
|
|
9
9
|
//# sourceMappingURL=is-number-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-number-input.d.ts","sourceRoot":"","sources":["../../src/dom/is-number-input.
|
|
1
|
+
{"version":3,"file":"is-number-input.d.ts","sourceRoot":"","sources":["../../src/dom/is-number-input.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,IAAI,EAAE,IAAI,GAAI,IAAI,IAAI,gBAAgB,CAU5E"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Whether the element's text direction is right-to-left.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param element The element to check.
|
|
5
5
|
*
|
|
6
|
-
* @return
|
|
6
|
+
* @return True if rtl, false if ltr.
|
|
7
7
|
*/
|
|
8
8
|
export default function isRTL(element: Element): boolean;
|
|
9
9
|
//# sourceMappingURL=is-rtl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-rtl.d.ts","sourceRoot":"","sources":["../../src/dom/is-rtl.
|
|
1
|
+
{"version":3,"file":"is-rtl.d.ts","sourceRoot":"","sources":["../../src/dom/is-rtl.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,OAAO,EAAE,OAAO,GAAI,OAAO,CAEzD"}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
7
|
+
* @param selection Selection object to check.
|
|
8
8
|
*
|
|
9
|
-
* @return
|
|
9
|
+
* @return Whether the selection is forward.
|
|
10
10
|
*/
|
|
11
11
|
export default function isSelectionForward(selection: Selection): boolean;
|
|
12
12
|
//# sourceMappingURL=is-selection-forward.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-selection-forward.d.ts","sourceRoot":"","sources":["../../src/dom/is-selection-forward.
|
|
1
|
+
{"version":3,"file":"is-selection-forward.d.ts","sourceRoot":"","sources":["../../src/dom/is-selection-forward.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,SAAS,EAAE,SAAS,GAAI,OAAO,CA6B1E"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* See: https://html.spec.whatwg.org/#textFieldSelection
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
8
|
-
* @return
|
|
7
|
+
* @param node The HTML element.
|
|
8
|
+
* @return True if the element is an text field, false if not.
|
|
9
9
|
*/
|
|
10
10
|
export default function isTextField(node: Node): node is HTMLElement;
|
|
11
11
|
//# sourceMappingURL=is-text-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-text-field.d.ts","sourceRoot":"","sources":["../../src/dom/is-text-field.
|
|
1
|
+
{"version":3,"file":"is-text-field.d.ts","sourceRoot":"","sources":["../../src/dom/is-text-field.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,IAAI,EAAE,IAAI,GAAI,IAAI,IAAI,WAAW,CAsBrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-vertical-edge.d.ts","sourceRoot":"","sources":["../../src/dom/is-vertical-edge.
|
|
1
|
+
{"version":3,"file":"is-vertical-edge.d.ts","sourceRoot":"","sources":["../../src/dom/is-vertical-edge.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACrC,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,OAAO,GAChB,OAAO,CAET"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Places the caret at start or end of a given element.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
4
|
+
* @param container Focusable element.
|
|
5
|
+
* @param isReverse True for end, false for start.
|
|
6
|
+
* @param x X coordinate to vertically position.
|
|
7
7
|
*/
|
|
8
8
|
export default function placeCaretAtEdge(container: HTMLElement, isReverse: boolean, x: number | undefined): void;
|
|
9
9
|
//# sourceMappingURL=place-caret-at-edge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-caret-at-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-edge.
|
|
1
|
+
{"version":3,"file":"place-caret-at-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-edge.ts"],"names":[],"mappings":"AAuCA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACvC,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,OAAO,EAClB,CAAC,EAAE,MAAM,GAAG,SAAS,QAgDrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-caret-at-horizontal-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-horizontal-edge.
|
|
1
|
+
{"version":3,"file":"place-caret-at-horizontal-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-horizontal-edge.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CACjD,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,OAAO,QAGlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-caret-at-vertical-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-vertical-edge.
|
|
1
|
+
{"version":3,"file":"place-caret-at-vertical-edge.d.ts","sourceRoot":"","sources":["../../src/dom/place-caret-at-vertical-edge.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC/C,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,OAAO,QAGd"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import type { Schema } from './types';
|
|
1
2
|
/**
|
|
2
3
|
* Given a schema, unwraps or removes nodes, attributes and classes on HTML.
|
|
3
4
|
*
|
|
4
|
-
* @param {string}
|
|
5
|
-
* @param {
|
|
6
|
-
* @param {boolean}
|
|
5
|
+
* @param {string} HTML The HTML to clean up.
|
|
6
|
+
* @param {Schema} schema Schema for the HTML.
|
|
7
|
+
* @param {boolean} [inline] Whether to clean for inline mode.
|
|
7
8
|
*
|
|
8
9
|
* @return {string} The cleaned up HTML.
|
|
9
10
|
*/
|
|
10
|
-
export default function removeInvalidHTML(HTML: string, schema:
|
|
11
|
+
export default function removeInvalidHTML(HTML: string, schema: Schema, inline?: boolean): string;
|
|
11
12
|
//# sourceMappingURL=remove-invalid-html.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove-invalid-html.d.ts","sourceRoot":"","sources":["../../src/dom/remove-invalid-html.
|
|
1
|
+
{"version":3,"file":"remove-invalid-html.d.ts","sourceRoot":"","sources":["../../src/dom/remove-invalid-html.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACxC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,OAAO,GACd,MAAM,CAQR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../src/dom/remove.
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../src/dom/remove.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,IAAI,EAAE,IAAI,GAAI,IAAI,CAGjD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Replaces the given node with a new node with the given tag name.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
4
|
+
* @param node The node to replace
|
|
5
|
+
* @param tagName The new tag name.
|
|
6
6
|
*
|
|
7
|
-
* @return
|
|
7
|
+
* @return The new node.
|
|
8
8
|
*/
|
|
9
9
|
export default function replaceTag(node: Element, tagName: string): Element;
|
|
10
10
|
//# sourceMappingURL=replace-tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replace-tag.d.ts","sourceRoot":"","sources":["../../src/dom/replace-tag.
|
|
1
|
+
{"version":3,"file":"replace-tag.d.ts","sourceRoot":"","sources":["../../src/dom/replace-tag.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAI,OAAO,CAW5E"}
|