@prismicio/client 7.7.4 → 7.7.5-alpha.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/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs +63 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js +63 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs +12 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js +12 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs +127 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js +127 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs +23 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js +23 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js.map +1 -0
- package/dist/_node_modules/bail/index.cjs +9 -0
- package/dist/_node_modules/bail/index.cjs.map +1 -0
- package/dist/_node_modules/bail/index.js +9 -0
- package/dist/_node_modules/bail/index.js.map +1 -0
- package/dist/_node_modules/bcp-47-match/index.cjs +74 -0
- package/dist/_node_modules/bcp-47-match/index.cjs.map +1 -0
- package/dist/_node_modules/bcp-47-match/index.js +74 -0
- package/dist/_node_modules/bcp-47-match/index.js.map +1 -0
- package/dist/_node_modules/boolbase/index.cjs +13 -0
- package/dist/_node_modules/boolbase/index.cjs.map +1 -0
- package/dist/_node_modules/boolbase/index.js +14 -0
- package/dist/_node_modules/boolbase/index.js.map +1 -0
- package/dist/_node_modules/ccount/index.cjs +17 -0
- package/dist/_node_modules/ccount/index.cjs.map +1 -0
- package/dist/_node_modules/ccount/index.js +17 -0
- package/dist/_node_modules/ccount/index.js.map +1 -0
- package/dist/_node_modules/character-entities/index.cjs +2131 -0
- package/dist/_node_modules/character-entities/index.cjs.map +1 -0
- package/dist/_node_modules/character-entities/index.js +2131 -0
- package/dist/_node_modules/character-entities/index.js.map +1 -0
- package/dist/_node_modules/character-entities-html4/index.cjs +258 -0
- package/dist/_node_modules/character-entities-html4/index.cjs.map +1 -0
- package/dist/_node_modules/character-entities-html4/index.js +258 -0
- package/dist/_node_modules/character-entities-html4/index.js.map +1 -0
- package/dist/_node_modules/character-entities-legacy/index.cjs +112 -0
- package/dist/_node_modules/character-entities-legacy/index.cjs.map +1 -0
- package/dist/_node_modules/character-entities-legacy/index.js +112 -0
- package/dist/_node_modules/character-entities-legacy/index.js.map +1 -0
- package/dist/_node_modules/comma-separated-tokens/index.cjs +32 -0
- package/dist/_node_modules/comma-separated-tokens/index.cjs.map +1 -0
- package/dist/_node_modules/comma-separated-tokens/index.js +32 -0
- package/dist/_node_modules/comma-separated-tokens/index.js.map +1 -0
- package/dist/_node_modules/devlop/lib/default.cjs +6 -0
- package/dist/_node_modules/devlop/lib/default.cjs.map +1 -0
- package/dist/_node_modules/devlop/lib/default.js +6 -0
- package/dist/_node_modules/devlop/lib/default.js.map +1 -0
- package/dist/_node_modules/direction/index.cjs +12 -0
- package/dist/_node_modules/direction/index.cjs.map +1 -0
- package/dist/_node_modules/direction/index.js +12 -0
- package/dist/_node_modules/direction/index.js.map +1 -0
- package/dist/_node_modules/extend/index.cjs +89 -0
- package/dist/_node_modules/extend/index.cjs.map +1 -0
- package/dist/_node_modules/extend/index.js +90 -0
- package/dist/_node_modules/extend/index.js.map +1 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs +14 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.js +14 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs +317 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.js +317 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.js.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs +96 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.js +96 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs +187 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js +187 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs +9 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.js +9 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs +102 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.js +102 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs +40 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js +40 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs +67 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.js +67 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs +12 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.js +12 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs +79 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.js +79 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/id.cjs +7 -0
- package/dist/_node_modules/hast-util-select/lib/id.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/id.js +7 -0
- package/dist/_node_modules/hast-util-select/lib/id.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/index.cjs +38 -0
- package/dist/_node_modules/hast-util-select/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/index.js +38 -0
- package/dist/_node_modules/hast-util-select/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/name.cjs +7 -0
- package/dist/_node_modules/hast-util-select/lib/name.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/name.js +7 -0
- package/dist/_node_modules/hast-util-select/lib/name.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/parse.cjs +12 -0
- package/dist/_node_modules/hast-util-select/lib/parse.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/parse.js +12 -0
- package/dist/_node_modules/hast-util-select/lib/parse.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs +231 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.js +231 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/test.cjs +27 -0
- package/dist/_node_modules/hast-util-select/lib/test.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/test.js +27 -0
- package/dist/_node_modules/hast-util-select/lib/test.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/walk.cjs +132 -0
- package/dist/_node_modules/hast-util-select/lib/walk.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/walk.js +132 -0
- package/dist/_node_modules/hast-util-select/lib/walk.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs +137 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js +137 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs +26 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js +26 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs +8 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js +8 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs +14 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js +14 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs +62 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.js +62 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs +92 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js +92 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs +11 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js +11 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs +52 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js +52 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js.map +1 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs +24 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.js +24 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs +11 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.js +11 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.js.map +1 -0
- package/dist/_node_modules/hastscript/lib/create-h.cjs +159 -0
- package/dist/_node_modules/hastscript/lib/create-h.cjs.map +1 -0
- package/dist/_node_modules/hastscript/lib/create-h.js +159 -0
- package/dist/_node_modules/hastscript/lib/create-h.js.map +1 -0
- package/dist/_node_modules/hastscript/lib/index.cjs +10 -0
- package/dist/_node_modules/hastscript/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hastscript/lib/index.js +10 -0
- package/dist/_node_modules/hastscript/lib/index.js.map +1 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs +45 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.map +1 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +45 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js.map +1 -0
- package/dist/_node_modules/html-void-elements/index.cjs +26 -0
- package/dist/_node_modules/html-void-elements/index.cjs.map +1 -0
- package/dist/_node_modules/html-void-elements/index.js +26 -0
- package/dist/_node_modules/html-void-elements/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs +720 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js +720 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs +116 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js +116 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs +42 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +42 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs +12 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js +12 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs +20 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +20 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs +17 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js +17 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs +60 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js +60 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs +19 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js +19 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs +65 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js +65 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs +27 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js +27 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs +15 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +15 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs +36 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js +36 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs +40 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js +40 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs +10 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js +10 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs +30 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js +30 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs +149 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js +149 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs +39 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.js +39 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.js.map +1 -0
- package/dist/_node_modules/micromark/lib/constructs.cjs +94 -0
- package/dist/_node_modules/micromark/lib/constructs.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/constructs.js +94 -0
- package/dist/_node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs +316 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.js +316 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/content.cjs +58 -0
- package/dist/_node_modules/micromark/lib/initialize/content.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/content.js +58 -0
- package/dist/_node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/document.cjs +212 -0
- package/dist/_node_modules/micromark/lib/initialize/document.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/document.js +212 -0
- package/dist/_node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs +55 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.js +55 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/text.cjs +143 -0
- package/dist/_node_modules/micromark/lib/initialize/text.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/text.js +143 -0
- package/dist/_node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/_node_modules/micromark/lib/parse.cjs +35 -0
- package/dist/_node_modules/micromark/lib/parse.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/parse.js +35 -0
- package/dist/_node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/_node_modules/micromark/lib/postprocess.cjs +10 -0
- package/dist/_node_modules/micromark/lib/postprocess.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/postprocess.js +10 -0
- package/dist/_node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/_node_modules/micromark/lib/preprocess.cjs +81 -0
- package/dist/_node_modules/micromark/lib/preprocess.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/preprocess.js +81 -0
- package/dist/_node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs +116 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js +116 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs +104 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js +104 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs +19 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js +19 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs +62 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js +62 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs +29 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js +29 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs +69 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js +69 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs +187 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js +187 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs +68 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js +68 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs +117 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js +117 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs +76 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js +76 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs +95 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js +95 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs +24 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js +24 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs +96 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js +96 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs +384 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js +384 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs +310 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js +310 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs +219 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js +219 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs +34 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js +34 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs +25 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js +25 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs +18 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js +18 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs +136 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js +136 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs +90 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js +90 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs +43 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js +43 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/_node_modules/micromark-factory-destination/index.cjs +95 -0
- package/dist/_node_modules/micromark-factory-destination/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-destination/index.js +95 -0
- package/dist/_node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-label/index.cjs +64 -0
- package/dist/_node_modules/micromark-factory-label/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-label/index.js +64 -0
- package/dist/_node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-space/index.cjs +25 -0
- package/dist/_node_modules/micromark-factory-space/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-space/index.js +25 -0
- package/dist/_node_modules/micromark-factory-space/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-title/index.cjs +66 -0
- package/dist/_node_modules/micromark-factory-title/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-title/index.js +66 -0
- package/dist/_node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs +27 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.js +27 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-character/index.cjs +45 -0
- package/dist/_node_modules/micromark-util-character/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-character/index.js +45 -0
- package/dist/_node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-chunked/index.cjs +37 -0
- package/dist/_node_modules/micromark-util-chunked/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-chunked/index.js +37 -0
- package/dist/_node_modules/micromark-util-chunked/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-classify-character/index.cjs +13 -0
- package/dist/_node_modules/micromark-util-classify-character/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-classify-character/index.js +13 -0
- package/dist/_node_modules/micromark-util-classify-character/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs +42 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.js +42 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs +20 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js +20 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-decode-string/index.cjs +22 -0
- package/dist/_node_modules/micromark-util-decode-string/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-decode-string/index.js +22 -0
- package/dist/_node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs +70 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.js +70 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs +7 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js +7 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs +16 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.js +16 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs +42 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js +42 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs +149 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.js +149 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs +195 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js +195 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs +20 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.js +20 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.js.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/index.cjs +11 -0
- package/dist/_node_modules/nth-check/lib/esm/index.cjs.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/index.js +11 -0
- package/dist/_node_modules/nth-check/lib/esm/index.js.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs +59 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.js +59 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.js.map +1 -0
- package/dist/_node_modules/property-information/index.cjs +14 -0
- package/dist/_node_modules/property-information/index.cjs.map +1 -0
- package/dist/_node_modules/property-information/index.js +14 -0
- package/dist/_node_modules/property-information/index.js.map +1 -0
- package/dist/_node_modules/property-information/lib/aria.cjs +62 -0
- package/dist/_node_modules/property-information/lib/aria.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/aria.js +62 -0
- package/dist/_node_modules/property-information/lib/aria.js.map +1 -0
- package/dist/_node_modules/property-information/lib/find.cjs +41 -0
- package/dist/_node_modules/property-information/lib/find.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/find.js +41 -0
- package/dist/_node_modules/property-information/lib/find.js.map +1 -0
- package/dist/_node_modules/property-information/lib/html.cjs +369 -0
- package/dist/_node_modules/property-information/lib/html.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/html.js +369 -0
- package/dist/_node_modules/property-information/lib/html.js.map +1 -0
- package/dist/_node_modules/property-information/lib/normalize.cjs +7 -0
- package/dist/_node_modules/property-information/lib/normalize.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/normalize.js +7 -0
- package/dist/_node_modules/property-information/lib/normalize.js.map +1 -0
- package/dist/_node_modules/property-information/lib/svg.cjs +567 -0
- package/dist/_node_modules/property-information/lib/svg.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/svg.js +567 -0
- package/dist/_node_modules/property-information/lib/svg.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs +8 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js +8 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs +7 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js +7 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/create.cjs +31 -0
- package/dist/_node_modules/property-information/lib/util/create.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/create.js +31 -0
- package/dist/_node_modules/property-information/lib/util/create.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs +33 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.js +33 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/info.cjs +25 -0
- package/dist/_node_modules/property-information/lib/util/info.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/info.js +25 -0
- package/dist/_node_modules/property-information/lib/util/info.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/merge.cjs +15 -0
- package/dist/_node_modules/property-information/lib/util/merge.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/merge.js +15 -0
- package/dist/_node_modules/property-information/lib/util/merge.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/schema.cjs +22 -0
- package/dist/_node_modules/property-information/lib/util/schema.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/schema.js +22 -0
- package/dist/_node_modules/property-information/lib/util/schema.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/types.cjs +21 -0
- package/dist/_node_modules/property-information/lib/util/types.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/types.js +21 -0
- package/dist/_node_modules/property-information/lib/util/types.js.map +1 -0
- package/dist/_node_modules/property-information/lib/xlink.cjs +20 -0
- package/dist/_node_modules/property-information/lib/xlink.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/xlink.js +20 -0
- package/dist/_node_modules/property-information/lib/xlink.js.map +1 -0
- package/dist/_node_modules/property-information/lib/xml.cjs +12 -0
- package/dist/_node_modules/property-information/lib/xml.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/xml.js +12 -0
- package/dist/_node_modules/property-information/lib/xml.js.map +1 -0
- package/dist/_node_modules/property-information/lib/xmlns.cjs +12 -0
- package/dist/_node_modules/property-information/lib/xmlns.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/xmlns.js +12 -0
- package/dist/_node_modules/property-information/lib/xmlns.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs +122 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js +122 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs +11 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js +11 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs +169 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js +170 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs +24 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js +24 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js.map +1 -0
- package/dist/_node_modules/rehype-parse/lib/index.cjs +21 -0
- package/dist/_node_modules/rehype-parse/lib/index.cjs.map +1 -0
- package/dist/_node_modules/rehype-parse/lib/index.js +22 -0
- package/dist/_node_modules/rehype-parse/lib/index.js.map +1 -0
- package/dist/_node_modules/remark-parse/lib/index.cjs +19 -0
- package/dist/_node_modules/remark-parse/lib/index.cjs.map +1 -0
- package/dist/_node_modules/remark-parse/lib/index.js +20 -0
- package/dist/_node_modules/remark-parse/lib/index.js.map +1 -0
- package/dist/_node_modules/remark-rehype/lib/index.cjs +21 -0
- package/dist/_node_modules/remark-rehype/lib/index.cjs.map +1 -0
- package/dist/_node_modules/remark-rehype/lib/index.js +22 -0
- package/dist/_node_modules/remark-rehype/lib/index.js.map +1 -0
- package/dist/_node_modules/space-separated-tokens/index.cjs +12 -0
- package/dist/_node_modules/space-separated-tokens/index.cjs.map +1 -0
- package/dist/_node_modules/space-separated-tokens/index.js +12 -0
- package/dist/_node_modules/space-separated-tokens/index.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs +14 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js +14 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/core.cjs +52 -0
- package/dist/_node_modules/stringify-entities/lib/core.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/core.js +52 -0
- package/dist/_node_modules/stringify-entities/lib/core.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/index.cjs +9 -0
- package/dist/_node_modules/stringify-entities/lib/index.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/index.js +9 -0
- package/dist/_node_modules/stringify-entities/lib/index.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs +26 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js +26 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs +28 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js +28 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js.map +1 -0
- package/dist/_node_modules/trim-lines/index.cjs +42 -0
- package/dist/_node_modules/trim-lines/index.cjs.map +1 -0
- package/dist/_node_modules/trim-lines/index.js +42 -0
- package/dist/_node_modules/trim-lines/index.js.map +1 -0
- package/dist/_node_modules/trough/lib/index.cjs +87 -0
- package/dist/_node_modules/trough/lib/index.cjs.map +1 -0
- package/dist/_node_modules/trough/lib/index.js +87 -0
- package/dist/_node_modules/trough/lib/index.js.map +1 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs +10 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs.map +1 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js +11 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/_node_modules/unified/lib/callable-instance.cjs +31 -0
- package/dist/_node_modules/unified/lib/callable-instance.cjs.map +1 -0
- package/dist/_node_modules/unified/lib/callable-instance.js +31 -0
- package/dist/_node_modules/unified/lib/callable-instance.js.map +1 -0
- package/dist/_node_modules/unified/lib/index.cjs +637 -0
- package/dist/_node_modules/unified/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unified/lib/index.js +637 -0
- package/dist/_node_modules/unified/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-is/lib/index.cjs +94 -0
- package/dist/_node_modules/unist-util-is/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-is/lib/index.js +94 -0
- package/dist/_node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-position/lib/index.cjs +28 -0
- package/dist/_node_modules/unist-util-position/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-position/lib/index.js +28 -0
- package/dist/_node_modules/unist-util-position/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-remove/lib/index.cjs +39 -0
- package/dist/_node_modules/unist-util-remove/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-remove/lib/index.js +39 -0
- package/dist/_node_modules/unist-util-remove/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs +28 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js +28 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-visit/lib/index.cjs +28 -0
- package/dist/_node_modules/unist-util-visit/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit/lib/index.js +29 -0
- package/dist/_node_modules/unist-util-visit/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs +7 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js +7 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs +84 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js +84 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/_node_modules/vfile/lib/index.cjs +463 -0
- package/dist/_node_modules/vfile/lib/index.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/index.js +463 -0
- package/dist/_node_modules/vfile/lib/index.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs +215 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.js +215 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs +8 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.js +8 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs +47 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.js +47 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs +10 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.js +10 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/_node_modules/vfile-location/lib/index.cjs +50 -0
- package/dist/_node_modules/vfile-location/lib/index.cjs.map +1 -0
- package/dist/_node_modules/vfile-location/lib/index.js +50 -0
- package/dist/_node_modules/vfile-location/lib/index.js.map +1 -0
- package/dist/_node_modules/vfile-message/lib/index.cjs +139 -0
- package/dist/_node_modules/vfile-message/lib/index.cjs.map +1 -0
- package/dist/_node_modules/vfile-message/lib/index.js +139 -0
- package/dist/_node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/_node_modules/web-namespaces/index.cjs +12 -0
- package/dist/_node_modules/web-namespaces/index.cjs.map +1 -0
- package/dist/_node_modules/web-namespaces/index.js +12 -0
- package/dist/_node_modules/web-namespaces/index.js.map +1 -0
- package/dist/_node_modules/zwitch/index.cjs +23 -0
- package/dist/_node_modules/zwitch/index.cjs.map +1 -0
- package/dist/_node_modules/zwitch/index.js +23 -0
- package/dist/_node_modules/zwitch/index.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +7 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.cjs +9 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +9 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/helpers/unstable_htmlAsRichText.cjs +3 -3
- package/dist/helpers/unstable_htmlAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_htmlAsRichText.js +2 -2
- package/dist/helpers/unstable_markdownAsRichText.cjs +4 -4
- package/dist/helpers/unstable_markdownAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_markdownAsRichText.js +3 -3
- package/dist/lib/hastSerializerHelpers.cjs +2 -2
- package/dist/lib/hastSerializerHelpers.cjs.map +1 -1
- package/dist/lib/hastSerializerHelpers.js +1 -1
- package/dist/lib/hastToRichText.cjs +5 -5
- package/dist/lib/hastToRichText.cjs.map +1 -1
- package/dist/lib/hastToRichText.js +2 -2
- package/dist/lib/hastToRichText.js.map +1 -1
- package/dist/lib/rehypeRichText.cjs +13 -12
- package/dist/lib/rehypeRichText.cjs.map +1 -1
- package/dist/lib/rehypeRichText.js +5 -4
- package/dist/lib/rehypeRichText.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +15 -13
- package/src/lib/hastToRichText.ts +1 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
const isElement = (
|
|
2
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
3
|
+
/**
|
|
4
|
+
* @type {(
|
|
5
|
+
* (<Condition extends TestFunction>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
|
|
6
|
+
* (<Condition extends string>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
|
|
7
|
+
* ((element?: null | undefined) => false) &
|
|
8
|
+
* ((element: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
|
|
9
|
+
* ((element: unknown, test?: Test, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => boolean)
|
|
10
|
+
* )}
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @param {unknown} [element]
|
|
14
|
+
* @param {Test | undefined} [test]
|
|
15
|
+
* @param {number | null | undefined} [index]
|
|
16
|
+
* @param {Parents | null | undefined} [parent]
|
|
17
|
+
* @param {unknown} [context]
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
// eslint-disable-next-line max-params
|
|
21
|
+
function(element2, test, index, parent, context) {
|
|
22
|
+
const check = convertElement(test);
|
|
23
|
+
return looksLikeAnElement(element2) ? check.call(context, element2, index, parent) : false;
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const convertElement = (
|
|
27
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
28
|
+
/**
|
|
29
|
+
* @type {(
|
|
30
|
+
* (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
|
|
31
|
+
* (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
|
|
32
|
+
* ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
|
|
33
|
+
* ((test?: Test) => Check)
|
|
34
|
+
* )}
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* @param {Test | null | undefined} [test]
|
|
38
|
+
* @returns {Check}
|
|
39
|
+
*/
|
|
40
|
+
function(test) {
|
|
41
|
+
if (test === null || test === void 0) {
|
|
42
|
+
return element;
|
|
43
|
+
}
|
|
44
|
+
if (typeof test === "string") {
|
|
45
|
+
return tagNameFactory(test);
|
|
46
|
+
}
|
|
47
|
+
if (typeof test === "object") {
|
|
48
|
+
return anyFactory(test);
|
|
49
|
+
}
|
|
50
|
+
if (typeof test === "function") {
|
|
51
|
+
return castFactory(test);
|
|
52
|
+
}
|
|
53
|
+
throw new Error("Expected function, string, or array as `test`");
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
function anyFactory(tests) {
|
|
57
|
+
const checks = [];
|
|
58
|
+
let index = -1;
|
|
59
|
+
while (++index < tests.length) {
|
|
60
|
+
checks[index] = convertElement(tests[index]);
|
|
61
|
+
}
|
|
62
|
+
return castFactory(any);
|
|
63
|
+
function any(...parameters) {
|
|
64
|
+
let index2 = -1;
|
|
65
|
+
while (++index2 < checks.length) {
|
|
66
|
+
if (checks[index2].apply(this, parameters)) return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function tagNameFactory(check) {
|
|
72
|
+
return castFactory(tagName);
|
|
73
|
+
function tagName(element2) {
|
|
74
|
+
return element2.tagName === check;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function castFactory(testFunction) {
|
|
78
|
+
return check;
|
|
79
|
+
function check(value, index, parent) {
|
|
80
|
+
return Boolean(
|
|
81
|
+
looksLikeAnElement(value) && testFunction.call(
|
|
82
|
+
this,
|
|
83
|
+
value,
|
|
84
|
+
typeof index === "number" ? index : void 0,
|
|
85
|
+
parent || void 0
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function element(element2) {
|
|
91
|
+
return Boolean(
|
|
92
|
+
element2 && typeof element2 === "object" && "type" in element2 && element2.type === "element" && "tagName" in element2 && typeof element2.tagName === "string"
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
function looksLikeAnElement(value) {
|
|
96
|
+
return value !== null && typeof value === "object" && "type" in value && "tagName" in value;
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
convertElement,
|
|
100
|
+
isElement
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/hast-util-is-element/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is an element.\n * @param {unknown} this\n * Context object (`this`) to call `test` with\n * @param {unknown} [element]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | null | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean}\n * Whether this is an element and passes a test.\n *\n * @typedef {Array<TestFunction | string> | TestFunction | string | null | undefined} Test\n * Check for an arbitrary element.\n *\n * * when `string`, checks that the element has that tag name\n * * when `function`, see `TestFunction`\n * * when `Array`, checks if one of the subtests pass\n *\n * @callback TestFunction\n * Check if an element passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Element} element\n * An element.\n * @param {number | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean | undefined | void}\n * Whether this element passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `element` is an `Element` and whether it passes the given test.\n *\n * @param element\n * Thing to check, typically `element`.\n * @param test\n * Check for a specific element.\n * @param index\n * Position of `element` in its parent.\n * @param parent\n * Parent of `element`.\n * @param context\n * Context object (`this`) to call `test` with.\n * @returns\n * Whether `element` is an `Element` and passes a test.\n * @throws\n * When an incorrect `test`, `index`, or `parent` is given; there is no error\n * thrown when `element` is not a node or not an element.\n */\nexport const isElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends TestFunction>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &\n * (<Condition extends string>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((element?: null | undefined) => false) &\n * ((element: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((element: unknown, test?: Test, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [element]\n * @param {Test | undefined} [test]\n * @param {number | null | undefined} [index]\n * @param {Parents | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (element, test, index, parent, context) {\n const check = convertElement(test)\n\n if (\n index !== null &&\n index !== undefined &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite `index`')\n }\n\n if (\n parent !== null &&\n parent !== undefined &&\n (!parent.type || !parent.children)\n ) {\n throw new Error('Expected valid `parent`')\n }\n\n if (\n (index === null || index === undefined) !==\n (parent === null || parent === undefined)\n ) {\n throw new Error('Expected both `index` and `parent`')\n }\n\n return looksLikeAnElement(element)\n ? check.call(context, element, index, parent)\n : false\n }\n )\n\n/**\n * Generate a check from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * an `element`, `index`, and `parent`.\n *\n * @param test\n * A test for a specific element.\n * @returns\n * A check.\n */\nexport const convertElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &\n * (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test | null | undefined} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return element\n }\n\n if (typeof test === 'string') {\n return tagNameFactory(test)\n }\n\n // Assume array.\n if (typeof test === 'object') {\n return anyFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or array as `test`')\n }\n )\n\n/**\n * Handle multiple tests.\n *\n * @param {Array<TestFunction | string>} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array<Check>} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convertElement(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn a string into a test for an element with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction tagNameFactory(check) {\n return castFactory(tagName)\n\n /**\n * @param {Element} element\n * @returns {boolean}\n */\n function tagName(element) {\n return element.tagName === check\n }\n}\n\n/**\n * Turn a custom test into a test for an element that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeAnElement(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\n/**\n * Make sure something is an element.\n *\n * @param {unknown} element\n * @returns {element is Element}\n */\nfunction element(element) {\n return Boolean(\n element &&\n typeof element === 'object' &&\n 'type' in element &&\n element.type === 'element' &&\n 'tagName' in element &&\n typeof element.tagName === 'string'\n )\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Element}\n */\nfunction looksLikeAnElement(value) {\n return (\n value !== null &&\n typeof value === 'object' &&\n 'type' in value &&\n 'tagName' in value\n )\n}\n"],"names":["element","index"],"mappings":"AAmEY,MAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBT,SAAUA,UAAS,MAAM,OAAO,QAAQ,SAAS;AAC/C,UAAM,QAAQ,eAAe,IAAI;AA2BjC,WAAO,mBAAmBA,QAAO,IAC7B,MAAM,KAAK,SAASA,UAAS,OAAO,MAAM,IAC1C;AAAA,EACL;AAAA;AAiBO,MAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeT,SAAU,MAAM;AACd,QAAI,SAAS,QAAQ,SAAS,QAAW;AACvC,aAAO;AAAA,IACR;AAED,QAAI,OAAO,SAAS,UAAU;AAC5B,aAAO,eAAe,IAAI;AAAA,IAC3B;AAGD,QAAI,OAAO,SAAS,UAAU;AAC5B,aAAO,WAAW,IAAI;AAAA,IACvB;AAED,QAAI,OAAO,SAAS,YAAY;AAC9B,aAAO,YAAY,IAAI;AAAA,IACxB;AAED,UAAM,IAAI,MAAM,+CAA+C;AAAA,EAChE;AAAA;AASL,SAAS,WAAW,OAAO;AAEzB,QAAM,SAAS,CAAE;AACjB,MAAI,QAAQ;AAEZ,SAAO,EAAE,QAAQ,MAAM,QAAQ;AAC7B,WAAO,KAAK,IAAI,eAAe,MAAM,KAAK,CAAC;AAAA,EAC5C;AAED,SAAO,YAAY,GAAG;AAMtB,WAAS,OAAO,YAAY;AAC1B,QAAIC,SAAQ;AAEZ,WAAO,EAAEA,SAAQ,OAAO,QAAQ;AAC9B,UAAI,OAAOA,MAAK,EAAE,MAAM,MAAM,UAAU,EAAG,QAAO;AAAA,IACnD;AAED,WAAO;AAAA,EACR;AACH;AAQA,SAAS,eAAe,OAAO;AAC7B,SAAO,YAAY,OAAO;AAM1B,WAAS,QAAQD,UAAS;AACxB,WAAOA,SAAQ,YAAY;AAAA,EAC5B;AACH;AAQA,SAAS,YAAY,cAAc;AACjC,SAAO;AAMP,WAAS,MAAM,OAAO,OAAO,QAAQ;AACnC,WAAO;AAAA,MACL,mBAAmB,KAAK,KACtB,aAAa;AAAA,QACX;AAAA,QACA;AAAA,QACA,OAAO,UAAU,WAAW,QAAQ;AAAA,QACpC,UAAU;AAAA,MACX;AAAA,IACJ;AAAA,EACF;AACH;AAQA,SAAS,QAAQA,UAAS;AACxB,SAAO;AAAA,IACLA,YACE,OAAOA,aAAY,YACnB,UAAUA,YACVA,SAAQ,SAAS,aACjB,aAAaA,YACb,OAAOA,SAAQ,YAAY;AAAA,EAC9B;AACH;AAMA,SAAS,mBAAmB,OAAO;AACjC,SACE,UAAU,QACV,OAAO,UAAU,YACjB,UAAU,SACV,aAAa;AAEjB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const search = /[#.]/g;
|
|
4
|
+
function parseSelector(selector, defaultTagName) {
|
|
5
|
+
const value = selector || "";
|
|
6
|
+
const props = {};
|
|
7
|
+
let start = 0;
|
|
8
|
+
let previous;
|
|
9
|
+
let tagName;
|
|
10
|
+
while (start < value.length) {
|
|
11
|
+
search.lastIndex = start;
|
|
12
|
+
const match = search.exec(value);
|
|
13
|
+
const subvalue = value.slice(start, match ? match.index : value.length);
|
|
14
|
+
if (subvalue) {
|
|
15
|
+
if (!previous) {
|
|
16
|
+
tagName = subvalue;
|
|
17
|
+
} else if (previous === "#") {
|
|
18
|
+
props.id = subvalue;
|
|
19
|
+
} else if (Array.isArray(props.className)) {
|
|
20
|
+
props.className.push(subvalue);
|
|
21
|
+
} else {
|
|
22
|
+
props.className = [subvalue];
|
|
23
|
+
}
|
|
24
|
+
start += subvalue.length;
|
|
25
|
+
}
|
|
26
|
+
if (match) {
|
|
27
|
+
previous = match[0];
|
|
28
|
+
start++;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
type: "element",
|
|
33
|
+
// @ts-expect-error: tag name is parsed.
|
|
34
|
+
tagName: tagName || defaultTagName || "div",
|
|
35
|
+
properties: props,
|
|
36
|
+
children: []
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.parseSelector = parseSelector;
|
|
40
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../node_modules/hast-util-parse-selector/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n */\n\n/**\n * @template {string} SimpleSelector\n * Selector type.\n * @template {string} DefaultTagName\n * Default tag name.\n * @typedef {(\n * SimpleSelector extends ''\n * ? DefaultTagName\n * : SimpleSelector extends `${infer TagName}.${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends `${infer TagName}#${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends string\n * ? SimpleSelector\n * : DefaultTagName\n * )} ExtractTagName\n * Extract tag name from a simple selector.\n */\n\nconst search = /[#.]/g\n\n/**\n * Create a hast element from a simple CSS selector.\n *\n * @template {string} Selector\n * Type of selector.\n * @template {string} [DefaultTagName='div']\n * Type of default tag name (default: `'div'`).\n * @param {Selector | null | undefined} [selector]\n * Simple CSS selector (optional).\n *\n * Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).\n * Multiple classes are allowed.\n * Uses the last ID if multiple IDs are found.\n * @param {DefaultTagName | null | undefined} [defaultTagName='div']\n * Tag name to use if `selector` does not specify one (default: `'div'`).\n * @returns {Element & {tagName: ExtractTagName<Selector, DefaultTagName>}}\n * Built element.\n */\nexport function parseSelector(selector, defaultTagName) {\n const value = selector || ''\n /** @type {Properties} */\n const props = {}\n let start = 0\n /** @type {string | undefined} */\n let previous\n /** @type {string | undefined} */\n let tagName\n\n while (start < value.length) {\n search.lastIndex = start\n const match = search.exec(value)\n const subvalue = value.slice(start, match ? match.index : value.length)\n\n if (subvalue) {\n if (!previous) {\n tagName = subvalue\n } else if (previous === '#') {\n props.id = subvalue\n } else if (Array.isArray(props.className)) {\n props.className.push(subvalue)\n } else {\n props.className = [subvalue]\n }\n\n start += subvalue.length\n }\n\n if (match) {\n previous = match[0]\n start++\n }\n }\n\n return {\n type: 'element',\n // @ts-expect-error: tag name is parsed.\n tagName: tagName || defaultTagName || 'div',\n properties: props,\n children: []\n }\n}\n"],"names":[],"mappings":";;AAwBA,MAAM,SAAS;AAoBR,SAAS,cAAc,UAAU,gBAAgB;AACtD,QAAM,QAAQ,YAAY;AAE1B,QAAM,QAAQ,CAAE;AAChB,MAAI,QAAQ;AAEZ,MAAI;AAEJ,MAAI;AAEJ,SAAO,QAAQ,MAAM,QAAQ;AAC3B,WAAO,YAAY;AACnB,UAAM,QAAQ,OAAO,KAAK,KAAK;AAC/B,UAAM,WAAW,MAAM,MAAM,OAAO,QAAQ,MAAM,QAAQ,MAAM,MAAM;AAEtE,QAAI,UAAU;AACZ,UAAI,CAAC,UAAU;AACb,kBAAU;AAAA,MAClB,WAAiB,aAAa,KAAK;AAC3B,cAAM,KAAK;AAAA,MACZ,WAAU,MAAM,QAAQ,MAAM,SAAS,GAAG;AACzC,cAAM,UAAU,KAAK,QAAQ;AAAA,MACrC,OAAa;AACL,cAAM,YAAY,CAAC,QAAQ;AAAA,MAC5B;AAED,eAAS,SAAS;AAAA,IACnB;AAED,QAAI,OAAO;AACT,iBAAW,MAAM,CAAC;AAClB;AAAA,IACD;AAAA,EACF;AAED,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,SAAS,WAAW,kBAAkB;AAAA,IACtC,YAAY;AAAA,IACZ,UAAU,CAAE;AAAA,EACb;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const search = /[#.]/g;
|
|
2
|
+
function parseSelector(selector, defaultTagName) {
|
|
3
|
+
const value = selector || "";
|
|
4
|
+
const props = {};
|
|
5
|
+
let start = 0;
|
|
6
|
+
let previous;
|
|
7
|
+
let tagName;
|
|
8
|
+
while (start < value.length) {
|
|
9
|
+
search.lastIndex = start;
|
|
10
|
+
const match = search.exec(value);
|
|
11
|
+
const subvalue = value.slice(start, match ? match.index : value.length);
|
|
12
|
+
if (subvalue) {
|
|
13
|
+
if (!previous) {
|
|
14
|
+
tagName = subvalue;
|
|
15
|
+
} else if (previous === "#") {
|
|
16
|
+
props.id = subvalue;
|
|
17
|
+
} else if (Array.isArray(props.className)) {
|
|
18
|
+
props.className.push(subvalue);
|
|
19
|
+
} else {
|
|
20
|
+
props.className = [subvalue];
|
|
21
|
+
}
|
|
22
|
+
start += subvalue.length;
|
|
23
|
+
}
|
|
24
|
+
if (match) {
|
|
25
|
+
previous = match[0];
|
|
26
|
+
start++;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
type: "element",
|
|
31
|
+
// @ts-expect-error: tag name is parsed.
|
|
32
|
+
tagName: tagName || defaultTagName || "div",
|
|
33
|
+
properties: props,
|
|
34
|
+
children: []
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
parseSelector
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/hast-util-parse-selector/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n */\n\n/**\n * @template {string} SimpleSelector\n * Selector type.\n * @template {string} DefaultTagName\n * Default tag name.\n * @typedef {(\n * SimpleSelector extends ''\n * ? DefaultTagName\n * : SimpleSelector extends `${infer TagName}.${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends `${infer TagName}#${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends string\n * ? SimpleSelector\n * : DefaultTagName\n * )} ExtractTagName\n * Extract tag name from a simple selector.\n */\n\nconst search = /[#.]/g\n\n/**\n * Create a hast element from a simple CSS selector.\n *\n * @template {string} Selector\n * Type of selector.\n * @template {string} [DefaultTagName='div']\n * Type of default tag name (default: `'div'`).\n * @param {Selector | null | undefined} [selector]\n * Simple CSS selector (optional).\n *\n * Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).\n * Multiple classes are allowed.\n * Uses the last ID if multiple IDs are found.\n * @param {DefaultTagName | null | undefined} [defaultTagName='div']\n * Tag name to use if `selector` does not specify one (default: `'div'`).\n * @returns {Element & {tagName: ExtractTagName<Selector, DefaultTagName>}}\n * Built element.\n */\nexport function parseSelector(selector, defaultTagName) {\n const value = selector || ''\n /** @type {Properties} */\n const props = {}\n let start = 0\n /** @type {string | undefined} */\n let previous\n /** @type {string | undefined} */\n let tagName\n\n while (start < value.length) {\n search.lastIndex = start\n const match = search.exec(value)\n const subvalue = value.slice(start, match ? match.index : value.length)\n\n if (subvalue) {\n if (!previous) {\n tagName = subvalue\n } else if (previous === '#') {\n props.id = subvalue\n } else if (Array.isArray(props.className)) {\n props.className.push(subvalue)\n } else {\n props.className = [subvalue]\n }\n\n start += subvalue.length\n }\n\n if (match) {\n previous = match[0]\n start++\n }\n }\n\n return {\n type: 'element',\n // @ts-expect-error: tag name is parsed.\n tagName: tagName || defaultTagName || 'div',\n properties: props,\n children: []\n }\n}\n"],"names":[],"mappings":"AAwBA,MAAM,SAAS;AAoBR,SAAS,cAAc,UAAU,gBAAgB;AACtD,QAAM,QAAQ,YAAY;AAE1B,QAAM,QAAQ,CAAE;AAChB,MAAI,QAAQ;AAEZ,MAAI;AAEJ,MAAI;AAEJ,SAAO,QAAQ,MAAM,QAAQ;AAC3B,WAAO,YAAY;AACnB,UAAM,QAAQ,OAAO,KAAK,KAAK;AAC/B,UAAM,WAAW,MAAM,MAAM,OAAO,QAAQ,MAAM,QAAQ,MAAM,MAAM;AAEtE,QAAI,UAAU;AACZ,UAAI,CAAC,UAAU;AACb,kBAAU;AAAA,MAClB,WAAiB,aAAa,KAAK;AAC3B,cAAM,KAAK;AAAA,MACZ,WAAU,MAAM,QAAQ,MAAM,SAAS,GAAG;AACzC,cAAM,UAAU,KAAK,QAAQ;AAAA,MACrC,OAAa;AACL,cAAM,YAAY,CAAC,QAAQ;AAAA,MAC5B;AAED,eAAS,SAAS;AAAA,IACnB;AAED,QAAI,OAAO;AACT,iBAAW,MAAM,CAAC;AAClB;AAAA,IACD;AAAA,EACF;AAED,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,SAAS,WAAW,kBAAkB;AAAA,IACtC,YAAY;AAAA,IACZ,UAAU,CAAE;AAAA,EACb;AACH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index$1 = require("../../comma-separated-tokens/index.cjs");
|
|
4
|
+
const _default = require("../../devlop/lib/default.cjs");
|
|
5
|
+
const index = require("../../space-separated-tokens/index.cjs");
|
|
6
|
+
const find = require("../../property-information/lib/find.cjs");
|
|
7
|
+
function attribute(query, element, schema) {
|
|
8
|
+
const info = find.find(schema, query.name);
|
|
9
|
+
const propertyValue = element.properties[info.property];
|
|
10
|
+
let value = normalizeValue(propertyValue, info);
|
|
11
|
+
if (!query.value) {
|
|
12
|
+
return value !== void 0;
|
|
13
|
+
}
|
|
14
|
+
_default.ok(query.value.type === "String");
|
|
15
|
+
let key = query.value.value;
|
|
16
|
+
if (query.caseSensitivityModifier === "i") {
|
|
17
|
+
key = key.toLowerCase();
|
|
18
|
+
if (value) {
|
|
19
|
+
value = value.toLowerCase();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (value !== void 0) {
|
|
23
|
+
switch (query.operator) {
|
|
24
|
+
case "=": {
|
|
25
|
+
return key === value;
|
|
26
|
+
}
|
|
27
|
+
case "$=": {
|
|
28
|
+
return key === value.slice(-key.length);
|
|
29
|
+
}
|
|
30
|
+
case "*=": {
|
|
31
|
+
return value.includes(key);
|
|
32
|
+
}
|
|
33
|
+
case "^=": {
|
|
34
|
+
return key === value.slice(0, key.length);
|
|
35
|
+
}
|
|
36
|
+
case "|=": {
|
|
37
|
+
return key === value || key === value.slice(0, key.length) && value.charAt(key.length) === "-";
|
|
38
|
+
}
|
|
39
|
+
case "~=": {
|
|
40
|
+
return (
|
|
41
|
+
// For all other values (including comma-separated lists), return whether this
|
|
42
|
+
// is an exact match.
|
|
43
|
+
key === value || // If this is a space-separated list, and the query is contained in it, return
|
|
44
|
+
// true.
|
|
45
|
+
index.parse(value).includes(key)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
function normalizeValue(value, info) {
|
|
53
|
+
if (value === null || value === void 0) ;
|
|
54
|
+
else if (typeof value === "boolean") {
|
|
55
|
+
if (value) {
|
|
56
|
+
return info.attribute;
|
|
57
|
+
}
|
|
58
|
+
} else if (Array.isArray(value)) {
|
|
59
|
+
if (value.length > 0) {
|
|
60
|
+
return (info.commaSeparated ? index$1.stringify : index.stringify)(value);
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
return String(value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.attribute = attribute;
|
|
67
|
+
//# sourceMappingURL=attribute.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute.cjs","sources":["../../../../node_modules/hast-util-select/lib/attribute.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstAttribute} AstAttribute\n *\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n *\n * @typedef {import('property-information').Info} Info\n * @typedef {import('property-information').Schema} Schema\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {ok as assert} from 'devlop'\nimport {find} from 'property-information'\nimport * as spaces from 'space-separated-tokens'\n\n/**\n * @param {AstAttribute} query\n * Query.\n * @param {Element} element\n * Element.\n * @param {Schema} schema\n * Schema of element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nexport function attribute(query, element, schema) {\n const info = find(schema, query.name)\n const propertyValue = element.properties[info.property]\n let value = normalizeValue(propertyValue, info)\n\n // Exists.\n if (!query.value) {\n return value !== undefined\n }\n\n assert(query.value.type === 'String', 'expected plain string')\n let key = query.value.value\n\n // Case-sensitivity.\n if (query.caseSensitivityModifier === 'i') {\n key = key.toLowerCase()\n\n if (value) {\n value = value.toLowerCase()\n }\n }\n\n if (value !== undefined) {\n switch (query.operator) {\n // Exact.\n case '=': {\n return key === value\n }\n\n // Ends.\n case '$=': {\n return key === value.slice(-key.length)\n }\n\n // Contains.\n case '*=': {\n return value.includes(key)\n }\n\n // Begins.\n case '^=': {\n return key === value.slice(0, key.length)\n }\n\n // Exact or prefix.\n case '|=': {\n return (\n key === value ||\n (key === value.slice(0, key.length) &&\n value.charAt(key.length) === '-')\n )\n }\n\n // Space-separated list.\n case '~=': {\n return (\n // For all other values (including comma-separated lists), return whether this\n // is an exact match.\n key === value ||\n // If this is a space-separated list, and the query is contained in it, return\n // true.\n spaces.parse(value).includes(key)\n )\n }\n // Other values are not yet supported by CSS.\n // No default\n }\n }\n\n return false\n}\n\n/**\n *\n * @param {Properties[keyof Properties]} value\n * @param {Info} info\n * @returns {string | undefined}\n */\nfunction normalizeValue(value, info) {\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'boolean') {\n if (value) {\n return info.attribute\n }\n } else if (Array.isArray(value)) {\n if (value.length > 0) {\n return (info.commaSeparated ? commas : spaces.stringify)(value)\n }\n } else {\n return String(value)\n }\n}\n"],"names":["find","assert","spaces.parse","commas","spaces.stringify"],"mappings":";;;;;;AAyBO,SAAS,UAAU,OAAO,SAAS,QAAQ;AAChD,QAAM,OAAOA,KAAI,KAAC,QAAQ,MAAM,IAAI;AACpC,QAAM,gBAAgB,QAAQ,WAAW,KAAK,QAAQ;AACtD,MAAI,QAAQ,eAAe,eAAe,IAAI;AAG9C,MAAI,CAAC,MAAM,OAAO;AAChB,WAAO,UAAU;AAAA,EAClB;AAEDC,WAAAA,GAAO,MAAM,MAAM,SAAS,QAAiC;AAC7D,MAAI,MAAM,MAAM,MAAM;AAGtB,MAAI,MAAM,4BAA4B,KAAK;AACzC,UAAM,IAAI,YAAa;AAEvB,QAAI,OAAO;AACT,cAAQ,MAAM,YAAa;AAAA,IAC5B;AAAA,EACF;AAED,MAAI,UAAU,QAAW;AACvB,YAAQ,MAAM,UAAQ;AAAA,MAEpB,KAAK,KAAK;AACR,eAAO,QAAQ;AAAA,MAChB;AAAA,MAGD,KAAK,MAAM;AACT,eAAO,QAAQ,MAAM,MAAM,CAAC,IAAI,MAAM;AAAA,MACvC;AAAA,MAGD,KAAK,MAAM;AACT,eAAO,MAAM,SAAS,GAAG;AAAA,MAC1B;AAAA,MAGD,KAAK,MAAM;AACT,eAAO,QAAQ,MAAM,MAAM,GAAG,IAAI,MAAM;AAAA,MACzC;AAAA,MAGD,KAAK,MAAM;AACT,eACE,QAAQ,SACP,QAAQ,MAAM,MAAM,GAAG,IAAI,MAAM,KAChC,MAAM,OAAO,IAAI,MAAM,MAAM;AAAA,MAElC;AAAA,MAGD,KAAK,MAAM;AACT;AAAA;AAAA;AAAA,UAGE,QAAQ;AAAA;AAAA,UAGRC,MAAAA,MAAa,KAAK,EAAE,SAAS,GAAG;AAAA;AAAA,MAEnC;AAAA,IAGF;AAAA,EACF;AAED,SAAO;AACT;AAQA,SAAS,eAAe,OAAO,MAAM;AACnC,MAAI,UAAU,QAAQ,UAAU,OAAW;AAAA,WAEhC,OAAO,UAAU,WAAW;AACrC,QAAI,OAAO;AACT,aAAO,KAAK;AAAA,IACb;AAAA,EACF,WAAU,MAAM,QAAQ,KAAK,GAAG;AAC/B,QAAI,MAAM,SAAS,GAAG;AACpB,cAAQ,KAAK,iBAAiBC,QAAAA,YAASC,MAAAA,WAAkB,KAAK;AAAA,IAC/D;AAAA,EACL,OAAS;AACL,WAAO,OAAO,KAAK;AAAA,EACpB;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { stringify } from "../../comma-separated-tokens/index.js";
|
|
2
|
+
import { ok } from "../../devlop/lib/default.js";
|
|
3
|
+
import { parse, stringify as stringify$1 } from "../../space-separated-tokens/index.js";
|
|
4
|
+
import { find } from "../../property-information/lib/find.js";
|
|
5
|
+
function attribute(query, element, schema) {
|
|
6
|
+
const info = find(schema, query.name);
|
|
7
|
+
const propertyValue = element.properties[info.property];
|
|
8
|
+
let value = normalizeValue(propertyValue, info);
|
|
9
|
+
if (!query.value) {
|
|
10
|
+
return value !== void 0;
|
|
11
|
+
}
|
|
12
|
+
ok(query.value.type === "String");
|
|
13
|
+
let key = query.value.value;
|
|
14
|
+
if (query.caseSensitivityModifier === "i") {
|
|
15
|
+
key = key.toLowerCase();
|
|
16
|
+
if (value) {
|
|
17
|
+
value = value.toLowerCase();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (value !== void 0) {
|
|
21
|
+
switch (query.operator) {
|
|
22
|
+
case "=": {
|
|
23
|
+
return key === value;
|
|
24
|
+
}
|
|
25
|
+
case "$=": {
|
|
26
|
+
return key === value.slice(-key.length);
|
|
27
|
+
}
|
|
28
|
+
case "*=": {
|
|
29
|
+
return value.includes(key);
|
|
30
|
+
}
|
|
31
|
+
case "^=": {
|
|
32
|
+
return key === value.slice(0, key.length);
|
|
33
|
+
}
|
|
34
|
+
case "|=": {
|
|
35
|
+
return key === value || key === value.slice(0, key.length) && value.charAt(key.length) === "-";
|
|
36
|
+
}
|
|
37
|
+
case "~=": {
|
|
38
|
+
return (
|
|
39
|
+
// For all other values (including comma-separated lists), return whether this
|
|
40
|
+
// is an exact match.
|
|
41
|
+
key === value || // If this is a space-separated list, and the query is contained in it, return
|
|
42
|
+
// true.
|
|
43
|
+
parse(value).includes(key)
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
function normalizeValue(value, info) {
|
|
51
|
+
if (value === null || value === void 0) ;
|
|
52
|
+
else if (typeof value === "boolean") {
|
|
53
|
+
if (value) {
|
|
54
|
+
return info.attribute;
|
|
55
|
+
}
|
|
56
|
+
} else if (Array.isArray(value)) {
|
|
57
|
+
if (value.length > 0) {
|
|
58
|
+
return (info.commaSeparated ? stringify : stringify$1)(value);
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
return String(value);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
attribute
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute.js","sources":["../../../../node_modules/hast-util-select/lib/attribute.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstAttribute} AstAttribute\n *\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n *\n * @typedef {import('property-information').Info} Info\n * @typedef {import('property-information').Schema} Schema\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {ok as assert} from 'devlop'\nimport {find} from 'property-information'\nimport * as spaces from 'space-separated-tokens'\n\n/**\n * @param {AstAttribute} query\n * Query.\n * @param {Element} element\n * Element.\n * @param {Schema} schema\n * Schema of element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nexport function attribute(query, element, schema) {\n const info = find(schema, query.name)\n const propertyValue = element.properties[info.property]\n let value = normalizeValue(propertyValue, info)\n\n // Exists.\n if (!query.value) {\n return value !== undefined\n }\n\n assert(query.value.type === 'String', 'expected plain string')\n let key = query.value.value\n\n // Case-sensitivity.\n if (query.caseSensitivityModifier === 'i') {\n key = key.toLowerCase()\n\n if (value) {\n value = value.toLowerCase()\n }\n }\n\n if (value !== undefined) {\n switch (query.operator) {\n // Exact.\n case '=': {\n return key === value\n }\n\n // Ends.\n case '$=': {\n return key === value.slice(-key.length)\n }\n\n // Contains.\n case '*=': {\n return value.includes(key)\n }\n\n // Begins.\n case '^=': {\n return key === value.slice(0, key.length)\n }\n\n // Exact or prefix.\n case '|=': {\n return (\n key === value ||\n (key === value.slice(0, key.length) &&\n value.charAt(key.length) === '-')\n )\n }\n\n // Space-separated list.\n case '~=': {\n return (\n // For all other values (including comma-separated lists), return whether this\n // is an exact match.\n key === value ||\n // If this is a space-separated list, and the query is contained in it, return\n // true.\n spaces.parse(value).includes(key)\n )\n }\n // Other values are not yet supported by CSS.\n // No default\n }\n }\n\n return false\n}\n\n/**\n *\n * @param {Properties[keyof Properties]} value\n * @param {Info} info\n * @returns {string | undefined}\n */\nfunction normalizeValue(value, info) {\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'boolean') {\n if (value) {\n return info.attribute\n }\n } else if (Array.isArray(value)) {\n if (value.length > 0) {\n return (info.commaSeparated ? commas : spaces.stringify)(value)\n }\n } else {\n return String(value)\n }\n}\n"],"names":["assert","spaces.parse","commas","spaces.stringify"],"mappings":";;;;AAyBO,SAAS,UAAU,OAAO,SAAS,QAAQ;AAChD,QAAM,OAAO,KAAK,QAAQ,MAAM,IAAI;AACpC,QAAM,gBAAgB,QAAQ,WAAW,KAAK,QAAQ;AACtD,MAAI,QAAQ,eAAe,eAAe,IAAI;AAG9C,MAAI,CAAC,MAAM,OAAO;AAChB,WAAO,UAAU;AAAA,EAClB;AAEDA,KAAO,MAAM,MAAM,SAAS,QAAiC;AAC7D,MAAI,MAAM,MAAM,MAAM;AAGtB,MAAI,MAAM,4BAA4B,KAAK;AACzC,UAAM,IAAI,YAAa;AAEvB,QAAI,OAAO;AACT,cAAQ,MAAM,YAAa;AAAA,IAC5B;AAAA,EACF;AAED,MAAI,UAAU,QAAW;AACvB,YAAQ,MAAM,UAAQ;AAAA,MAEpB,KAAK,KAAK;AACR,eAAO,QAAQ;AAAA,MAChB;AAAA,MAGD,KAAK,MAAM;AACT,eAAO,QAAQ,MAAM,MAAM,CAAC,IAAI,MAAM;AAAA,MACvC;AAAA,MAGD,KAAK,MAAM;AACT,eAAO,MAAM,SAAS,GAAG;AAAA,MAC1B;AAAA,MAGD,KAAK,MAAM;AACT,eAAO,QAAQ,MAAM,MAAM,GAAG,IAAI,MAAM;AAAA,MACzC;AAAA,MAGD,KAAK,MAAM;AACT,eACE,QAAQ,SACP,QAAQ,MAAM,MAAM,GAAG,IAAI,MAAM,KAChC,MAAM,OAAO,IAAI,MAAM,MAAM;AAAA,MAElC;AAAA,MAGD,KAAK,MAAM;AACT;AAAA;AAAA;AAAA,UAGE,QAAQ;AAAA;AAAA,UAGRC,MAAa,KAAK,EAAE,SAAS,GAAG;AAAA;AAAA,MAEnC;AAAA,IAGF;AAAA,EACF;AAED,SAAO;AACT;AAQA,SAAS,eAAe,OAAO,MAAM;AACnC,MAAI,UAAU,QAAQ,UAAU,OAAW;AAAA,WAEhC,OAAO,UAAU,WAAW;AACrC,QAAI,OAAO;AACT,aAAO,KAAK;AAAA,IACb;AAAA,EACF,WAAU,MAAM,QAAQ,KAAK,GAAG;AAC/B,QAAI,MAAM,SAAS,GAAG;AACpB,cAAQ,KAAK,iBAAiBC,YAASC,aAAkB,KAAK;AAAA,IAC/D;AAAA,EACL,OAAS;AACL,WAAO,OAAO,KAAK;AAAA,EACpB;AACH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const emptyClassNames = [];
|
|
4
|
+
function className(query, element) {
|
|
5
|
+
const value = (
|
|
6
|
+
/** @type {Readonly<Array<string>>} */
|
|
7
|
+
element.properties.className || emptyClassNames
|
|
8
|
+
);
|
|
9
|
+
return value.includes(query.name);
|
|
10
|
+
}
|
|
11
|
+
exports.className = className;
|
|
12
|
+
//# sourceMappingURL=class-name.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-name.cjs","sources":["../../../../node_modules/hast-util-select/lib/class-name.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstClassName} AstClassName\n * @typedef {import('hast').Element} Element\n */\n\n/** @type {Array<never>} */\nconst emptyClassNames = []\n\n/**\n * Check whether an element has all class names.\n *\n * @param {AstClassName} query\n * AST rule (with `classNames`).\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nexport function className(query, element) {\n // Assume array.\n const value = /** @type {Readonly<Array<string>>} */ (\n element.properties.className || emptyClassNames\n )\n\n return value.includes(query.name)\n}\n"],"names":[],"mappings":";;AAMA,MAAM,kBAAkB,CAAE;AAYnB,SAAS,UAAU,OAAO,SAAS;AAExC,QAAM;AAAA;AAAA,IACJ,QAAQ,WAAW,aAAa;AAAA;AAGlC,SAAO,MAAM,SAAS,MAAM,IAAI;AAClC;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const emptyClassNames = [];
|
|
2
|
+
function className(query, element) {
|
|
3
|
+
const value = (
|
|
4
|
+
/** @type {Readonly<Array<string>>} */
|
|
5
|
+
element.properties.className || emptyClassNames
|
|
6
|
+
);
|
|
7
|
+
return value.includes(query.name);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
className
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=class-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-name.js","sources":["../../../../node_modules/hast-util-select/lib/class-name.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstClassName} AstClassName\n * @typedef {import('hast').Element} Element\n */\n\n/** @type {Array<never>} */\nconst emptyClassNames = []\n\n/**\n * Check whether an element has all class names.\n *\n * @param {AstClassName} query\n * AST rule (with `classNames`).\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nexport function className(query, element) {\n // Assume array.\n const value = /** @type {Readonly<Array<string>>} */ (\n element.properties.className || emptyClassNames\n )\n\n return value.includes(query.name)\n}\n"],"names":[],"mappings":"AAMA,MAAM,kBAAkB,CAAE;AAYnB,SAAS,UAAU,OAAO,SAAS;AAExC,QAAM;AAAA;AAAA,IACJ,QAAQ,WAAW,aAAa;AAAA;AAGlC,SAAO,MAAM,SAAS,MAAM,IAAI;AAClC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index$4 = require("../../direction/index.cjs");
|
|
4
|
+
const index = require("../../property-information/index.cjs");
|
|
5
|
+
const index$1 = require("../../hast-util-to-string/lib/index.cjs");
|
|
6
|
+
const index$2 = require("../../unist-util-visit/lib/index.cjs");
|
|
7
|
+
const index$3 = require("../../unist-util-visit-parents/lib/index.cjs");
|
|
8
|
+
function enterState(state, node) {
|
|
9
|
+
const schema = state.schema;
|
|
10
|
+
const language = state.language;
|
|
11
|
+
const currentDirection = state.direction;
|
|
12
|
+
const editableOrEditingHost = state.editableOrEditingHost;
|
|
13
|
+
let dirInferred;
|
|
14
|
+
if (node.type === "element") {
|
|
15
|
+
const lang = node.properties.xmlLang || node.properties.lang;
|
|
16
|
+
const type = node.properties.type || "text";
|
|
17
|
+
const dir = dirProperty(node);
|
|
18
|
+
if (lang !== null && lang !== void 0) {
|
|
19
|
+
state.language = String(lang);
|
|
20
|
+
}
|
|
21
|
+
if (schema && schema.space === "html") {
|
|
22
|
+
if (node.properties.contentEditable === "true") {
|
|
23
|
+
state.editableOrEditingHost = true;
|
|
24
|
+
}
|
|
25
|
+
if (node.tagName === "svg") {
|
|
26
|
+
state.schema = index.svg;
|
|
27
|
+
}
|
|
28
|
+
if (dir === "rtl") {
|
|
29
|
+
dirInferred = dir;
|
|
30
|
+
} else if (
|
|
31
|
+
// Explicit `[dir=ltr]`.
|
|
32
|
+
dir === "ltr" || // HTML with an invalid or no `[dir]`.
|
|
33
|
+
dir !== "auto" && node.tagName === "html" || // `input[type=tel]` with an invalid or no `[dir]`.
|
|
34
|
+
dir !== "auto" && node.tagName === "input" && type === "tel"
|
|
35
|
+
) {
|
|
36
|
+
dirInferred = "ltr";
|
|
37
|
+
} else if (dir === "auto" || node.tagName === "bdi") {
|
|
38
|
+
if (node.tagName === "textarea") {
|
|
39
|
+
dirInferred = dirBidi(index$1.toString(node));
|
|
40
|
+
} else if (node.tagName === "input" && (type === "email" || type === "search" || type === "tel" || type === "text")) {
|
|
41
|
+
dirInferred = node.properties.value ? dirBidi(String(node.properties.value)) : "ltr";
|
|
42
|
+
} else {
|
|
43
|
+
index$2.visit(node, inferDirectionality);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (dirInferred) {
|
|
47
|
+
state.direction = dirInferred;
|
|
48
|
+
}
|
|
49
|
+
} else if (state.editableOrEditingHost) {
|
|
50
|
+
state.editableOrEditingHost = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return reset;
|
|
54
|
+
function reset() {
|
|
55
|
+
state.schema = schema;
|
|
56
|
+
state.language = language;
|
|
57
|
+
state.direction = currentDirection;
|
|
58
|
+
state.editableOrEditingHost = editableOrEditingHost;
|
|
59
|
+
}
|
|
60
|
+
function inferDirectionality(child) {
|
|
61
|
+
if (child.type === "text") {
|
|
62
|
+
dirInferred = dirBidi(child.value);
|
|
63
|
+
return dirInferred ? index$3.EXIT : void 0;
|
|
64
|
+
}
|
|
65
|
+
if (child !== node && child.type === "element" && (child.tagName === "bdi" || child.tagName === "script" || child.tagName === "style" || child.tagName === "textare" || dirProperty(child))) {
|
|
66
|
+
return index$3.SKIP;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function dirBidi(value) {
|
|
71
|
+
const result = index$4.direction(value);
|
|
72
|
+
return result === "neutral" ? void 0 : result;
|
|
73
|
+
}
|
|
74
|
+
function dirProperty(node) {
|
|
75
|
+
const value = node.type === "element" && typeof node.properties.dir === "string" ? node.properties.dir.toLowerCase() : void 0;
|
|
76
|
+
return value === "auto" || value === "ltr" || value === "rtl" ? value : void 0;
|
|
77
|
+
}
|
|
78
|
+
exports.enterState = enterState;
|
|
79
|
+
//# sourceMappingURL=enter-state.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enter-state.cjs","sources":["../../../../node_modules/hast-util-select/lib/enter-state.js"],"sourcesContent":["/**\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Nodes} Nodes\n *\n * @typedef {import('unist-util-visit').Visitor<ElementContent>} Visitor\n *\n * @typedef {import('./index.js').Direction} Direction\n * @typedef {import('./index.js').State} State\n */\n\nimport {direction} from 'direction'\nimport {toString} from 'hast-util-to-string'\nimport {svg} from 'property-information'\nimport {EXIT, SKIP, visit} from 'unist-util-visit'\n\n/**\n * Enter a node.\n *\n * The caller is responsible for calling the return value `exit`.\n *\n * @param {State} state\n * Current state.\n *\n * Will be mutated: `exit` undos the changes.\n * @param {Nodes} node\n * Node to enter.\n * @returns {() => undefined}\n * Call to exit.\n */\n// eslint-disable-next-line complexity\nexport function enterState(state, node) {\n const schema = state.schema\n const language = state.language\n const currentDirection = state.direction\n const editableOrEditingHost = state.editableOrEditingHost\n /** @type {Direction | undefined} */\n let dirInferred\n\n if (node.type === 'element') {\n const lang = node.properties.xmlLang || node.properties.lang\n const type = node.properties.type || 'text'\n const dir = dirProperty(node)\n\n if (lang !== null && lang !== undefined) {\n state.language = String(lang)\n }\n\n if (schema && schema.space === 'html') {\n if (node.properties.contentEditable === 'true') {\n state.editableOrEditingHost = true\n }\n\n if (node.tagName === 'svg') {\n state.schema = svg\n }\n\n // See: <https://html.spec.whatwg.org/#the-directionality>.\n // Explicit `[dir=rtl]`.\n if (dir === 'rtl') {\n dirInferred = dir\n } else if (\n // Explicit `[dir=ltr]`.\n dir === 'ltr' ||\n // HTML with an invalid or no `[dir]`.\n (dir !== 'auto' && node.tagName === 'html') ||\n // `input[type=tel]` with an invalid or no `[dir]`.\n (dir !== 'auto' && node.tagName === 'input' && type === 'tel')\n ) {\n dirInferred = 'ltr'\n // `[dir=auto]` or `bdi` with an invalid or no `[dir]`.\n } else if (dir === 'auto' || node.tagName === 'bdi') {\n if (node.tagName === 'textarea') {\n // Check contents of `<textarea>`.\n dirInferred = dirBidi(toString(node))\n } else if (\n node.tagName === 'input' &&\n (type === 'email' ||\n type === 'search' ||\n type === 'tel' ||\n type === 'text')\n ) {\n // Check value of `<input>`.\n dirInferred = node.properties.value\n ? dirBidi(String(node.properties.value))\n : 'ltr'\n } else {\n // Check text nodes in `node`.\n visit(node, inferDirectionality)\n }\n }\n\n if (dirInferred) {\n state.direction = dirInferred\n }\n }\n // Turn off editing mode in non-HTML spaces.\n else if (state.editableOrEditingHost) {\n state.editableOrEditingHost = false\n }\n }\n\n return reset\n\n /**\n * @returns {undefined}\n * Nothing.\n */\n function reset() {\n state.schema = schema\n state.language = language\n state.direction = currentDirection\n state.editableOrEditingHost = editableOrEditingHost\n }\n\n /** @type {Visitor} */\n function inferDirectionality(child) {\n if (child.type === 'text') {\n dirInferred = dirBidi(child.value)\n return dirInferred ? EXIT : undefined\n }\n\n if (\n child !== node &&\n child.type === 'element' &&\n (child.tagName === 'bdi' ||\n child.tagName === 'script' ||\n child.tagName === 'style' ||\n child.tagName === 'textare' ||\n dirProperty(child))\n ) {\n return SKIP\n }\n }\n}\n\n/**\n * See `wooorm/direction`.\n *\n * @param {string} value\n * Value to check.\n * @returns {Exclude<Direction, 'auto'> | undefined}\n * Directionality.\n */\nfunction dirBidi(value) {\n const result = direction(value)\n return result === 'neutral' ? undefined : result\n}\n\n/**\n * @param {ElementContent} node\n * Node to check.\n * @returns {Direction | undefined}\n * Directionality.\n */\nfunction dirProperty(node) {\n const value =\n node.type === 'element' && typeof node.properties.dir === 'string'\n ? node.properties.dir.toLowerCase()\n : undefined\n\n return value === 'auto' || value === 'ltr' || value === 'rtl'\n ? value\n : undefined\n}\n"],"names":["svg","toString","visit","EXIT","SKIP","direction"],"mappings":";;;;;;;AA8BO,SAAS,WAAW,OAAO,MAAM;AACtC,QAAM,SAAS,MAAM;AACrB,QAAM,WAAW,MAAM;AACvB,QAAM,mBAAmB,MAAM;AAC/B,QAAM,wBAAwB,MAAM;AAEpC,MAAI;AAEJ,MAAI,KAAK,SAAS,WAAW;AAC3B,UAAM,OAAO,KAAK,WAAW,WAAW,KAAK,WAAW;AACxD,UAAM,OAAO,KAAK,WAAW,QAAQ;AACrC,UAAM,MAAM,YAAY,IAAI;AAE5B,QAAI,SAAS,QAAQ,SAAS,QAAW;AACvC,YAAM,WAAW,OAAO,IAAI;AAAA,IAC7B;AAED,QAAI,UAAU,OAAO,UAAU,QAAQ;AACrC,UAAI,KAAK,WAAW,oBAAoB,QAAQ;AAC9C,cAAM,wBAAwB;AAAA,MAC/B;AAED,UAAI,KAAK,YAAY,OAAO;AAC1B,cAAM,SAASA,MAAG;AAAA,MACnB;AAID,UAAI,QAAQ,OAAO;AACjB,sBAAc;AAAA,MACtB;AAAA;AAAA,QAEQ,QAAQ;AAAA,QAEP,QAAQ,UAAU,KAAK,YAAY;AAAA,QAEnC,QAAQ,UAAU,KAAK,YAAY,WAAW,SAAS;AAAA,QACxD;AACA,sBAAc;AAAA,MAEf,WAAU,QAAQ,UAAU,KAAK,YAAY,OAAO;AACnD,YAAI,KAAK,YAAY,YAAY;AAE/B,wBAAc,QAAQC,iBAAS,IAAI,CAAC;AAAA,QAC9C,WACU,KAAK,YAAY,YAChB,SAAS,WACR,SAAS,YACT,SAAS,SACT,SAAS,SACX;AAEA,wBAAc,KAAK,WAAW,QAC1B,QAAQ,OAAO,KAAK,WAAW,KAAK,CAAC,IACrC;AAAA,QACd,OAAe;AAELC,kBAAK,MAAC,MAAM,mBAAmB;AAAA,QAChC;AAAA,MACF;AAED,UAAI,aAAa;AACf,cAAM,YAAY;AAAA,MACnB;AAAA,IACF,WAEQ,MAAM,uBAAuB;AACpC,YAAM,wBAAwB;AAAA,IAC/B;AAAA,EACF;AAED,SAAO;AAMP,WAAS,QAAQ;AACf,UAAM,SAAS;AACf,UAAM,WAAW;AACjB,UAAM,YAAY;AAClB,UAAM,wBAAwB;AAAA,EAC/B;AAGD,WAAS,oBAAoB,OAAO;AAClC,QAAI,MAAM,SAAS,QAAQ;AACzB,oBAAc,QAAQ,MAAM,KAAK;AACjC,aAAO,cAAcC,QAAAA,OAAO;AAAA,IAC7B;AAED,QACE,UAAU,QACV,MAAM,SAAS,cACd,MAAM,YAAY,SACjB,MAAM,YAAY,YAClB,MAAM,YAAY,WAClB,MAAM,YAAY,aAClB,YAAY,KAAK,IACnB;AACA,aAAOC,QAAI;AAAA,IACZ;AAAA,EACF;AACH;AAUA,SAAS,QAAQ,OAAO;AACtB,QAAM,SAASC,QAAS,UAAC,KAAK;AAC9B,SAAO,WAAW,YAAY,SAAY;AAC5C;AAQA,SAAS,YAAY,MAAM;AACzB,QAAM,QACJ,KAAK,SAAS,aAAa,OAAO,KAAK,WAAW,QAAQ,WACtD,KAAK,WAAW,IAAI,YAAa,IACjC;AAEN,SAAO,UAAU,UAAU,UAAU,SAAS,UAAU,QACpD,QACA;AACN;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { direction } from "../../direction/index.js";
|
|
2
|
+
import { svg } from "../../property-information/index.js";
|
|
3
|
+
import { toString } from "../../hast-util-to-string/lib/index.js";
|
|
4
|
+
import { visit } from "../../unist-util-visit/lib/index.js";
|
|
5
|
+
import { EXIT, SKIP } from "../../unist-util-visit-parents/lib/index.js";
|
|
6
|
+
function enterState(state, node) {
|
|
7
|
+
const schema = state.schema;
|
|
8
|
+
const language = state.language;
|
|
9
|
+
const currentDirection = state.direction;
|
|
10
|
+
const editableOrEditingHost = state.editableOrEditingHost;
|
|
11
|
+
let dirInferred;
|
|
12
|
+
if (node.type === "element") {
|
|
13
|
+
const lang = node.properties.xmlLang || node.properties.lang;
|
|
14
|
+
const type = node.properties.type || "text";
|
|
15
|
+
const dir = dirProperty(node);
|
|
16
|
+
if (lang !== null && lang !== void 0) {
|
|
17
|
+
state.language = String(lang);
|
|
18
|
+
}
|
|
19
|
+
if (schema && schema.space === "html") {
|
|
20
|
+
if (node.properties.contentEditable === "true") {
|
|
21
|
+
state.editableOrEditingHost = true;
|
|
22
|
+
}
|
|
23
|
+
if (node.tagName === "svg") {
|
|
24
|
+
state.schema = svg;
|
|
25
|
+
}
|
|
26
|
+
if (dir === "rtl") {
|
|
27
|
+
dirInferred = dir;
|
|
28
|
+
} else if (
|
|
29
|
+
// Explicit `[dir=ltr]`.
|
|
30
|
+
dir === "ltr" || // HTML with an invalid or no `[dir]`.
|
|
31
|
+
dir !== "auto" && node.tagName === "html" || // `input[type=tel]` with an invalid or no `[dir]`.
|
|
32
|
+
dir !== "auto" && node.tagName === "input" && type === "tel"
|
|
33
|
+
) {
|
|
34
|
+
dirInferred = "ltr";
|
|
35
|
+
} else if (dir === "auto" || node.tagName === "bdi") {
|
|
36
|
+
if (node.tagName === "textarea") {
|
|
37
|
+
dirInferred = dirBidi(toString(node));
|
|
38
|
+
} else if (node.tagName === "input" && (type === "email" || type === "search" || type === "tel" || type === "text")) {
|
|
39
|
+
dirInferred = node.properties.value ? dirBidi(String(node.properties.value)) : "ltr";
|
|
40
|
+
} else {
|
|
41
|
+
visit(node, inferDirectionality);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (dirInferred) {
|
|
45
|
+
state.direction = dirInferred;
|
|
46
|
+
}
|
|
47
|
+
} else if (state.editableOrEditingHost) {
|
|
48
|
+
state.editableOrEditingHost = false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return reset;
|
|
52
|
+
function reset() {
|
|
53
|
+
state.schema = schema;
|
|
54
|
+
state.language = language;
|
|
55
|
+
state.direction = currentDirection;
|
|
56
|
+
state.editableOrEditingHost = editableOrEditingHost;
|
|
57
|
+
}
|
|
58
|
+
function inferDirectionality(child) {
|
|
59
|
+
if (child.type === "text") {
|
|
60
|
+
dirInferred = dirBidi(child.value);
|
|
61
|
+
return dirInferred ? EXIT : void 0;
|
|
62
|
+
}
|
|
63
|
+
if (child !== node && child.type === "element" && (child.tagName === "bdi" || child.tagName === "script" || child.tagName === "style" || child.tagName === "textare" || dirProperty(child))) {
|
|
64
|
+
return SKIP;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function dirBidi(value) {
|
|
69
|
+
const result = direction(value);
|
|
70
|
+
return result === "neutral" ? void 0 : result;
|
|
71
|
+
}
|
|
72
|
+
function dirProperty(node) {
|
|
73
|
+
const value = node.type === "element" && typeof node.properties.dir === "string" ? node.properties.dir.toLowerCase() : void 0;
|
|
74
|
+
return value === "auto" || value === "ltr" || value === "rtl" ? value : void 0;
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
enterState
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=enter-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enter-state.js","sources":["../../../../node_modules/hast-util-select/lib/enter-state.js"],"sourcesContent":["/**\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Nodes} Nodes\n *\n * @typedef {import('unist-util-visit').Visitor<ElementContent>} Visitor\n *\n * @typedef {import('./index.js').Direction} Direction\n * @typedef {import('./index.js').State} State\n */\n\nimport {direction} from 'direction'\nimport {toString} from 'hast-util-to-string'\nimport {svg} from 'property-information'\nimport {EXIT, SKIP, visit} from 'unist-util-visit'\n\n/**\n * Enter a node.\n *\n * The caller is responsible for calling the return value `exit`.\n *\n * @param {State} state\n * Current state.\n *\n * Will be mutated: `exit` undos the changes.\n * @param {Nodes} node\n * Node to enter.\n * @returns {() => undefined}\n * Call to exit.\n */\n// eslint-disable-next-line complexity\nexport function enterState(state, node) {\n const schema = state.schema\n const language = state.language\n const currentDirection = state.direction\n const editableOrEditingHost = state.editableOrEditingHost\n /** @type {Direction | undefined} */\n let dirInferred\n\n if (node.type === 'element') {\n const lang = node.properties.xmlLang || node.properties.lang\n const type = node.properties.type || 'text'\n const dir = dirProperty(node)\n\n if (lang !== null && lang !== undefined) {\n state.language = String(lang)\n }\n\n if (schema && schema.space === 'html') {\n if (node.properties.contentEditable === 'true') {\n state.editableOrEditingHost = true\n }\n\n if (node.tagName === 'svg') {\n state.schema = svg\n }\n\n // See: <https://html.spec.whatwg.org/#the-directionality>.\n // Explicit `[dir=rtl]`.\n if (dir === 'rtl') {\n dirInferred = dir\n } else if (\n // Explicit `[dir=ltr]`.\n dir === 'ltr' ||\n // HTML with an invalid or no `[dir]`.\n (dir !== 'auto' && node.tagName === 'html') ||\n // `input[type=tel]` with an invalid or no `[dir]`.\n (dir !== 'auto' && node.tagName === 'input' && type === 'tel')\n ) {\n dirInferred = 'ltr'\n // `[dir=auto]` or `bdi` with an invalid or no `[dir]`.\n } else if (dir === 'auto' || node.tagName === 'bdi') {\n if (node.tagName === 'textarea') {\n // Check contents of `<textarea>`.\n dirInferred = dirBidi(toString(node))\n } else if (\n node.tagName === 'input' &&\n (type === 'email' ||\n type === 'search' ||\n type === 'tel' ||\n type === 'text')\n ) {\n // Check value of `<input>`.\n dirInferred = node.properties.value\n ? dirBidi(String(node.properties.value))\n : 'ltr'\n } else {\n // Check text nodes in `node`.\n visit(node, inferDirectionality)\n }\n }\n\n if (dirInferred) {\n state.direction = dirInferred\n }\n }\n // Turn off editing mode in non-HTML spaces.\n else if (state.editableOrEditingHost) {\n state.editableOrEditingHost = false\n }\n }\n\n return reset\n\n /**\n * @returns {undefined}\n * Nothing.\n */\n function reset() {\n state.schema = schema\n state.language = language\n state.direction = currentDirection\n state.editableOrEditingHost = editableOrEditingHost\n }\n\n /** @type {Visitor} */\n function inferDirectionality(child) {\n if (child.type === 'text') {\n dirInferred = dirBidi(child.value)\n return dirInferred ? EXIT : undefined\n }\n\n if (\n child !== node &&\n child.type === 'element' &&\n (child.tagName === 'bdi' ||\n child.tagName === 'script' ||\n child.tagName === 'style' ||\n child.tagName === 'textare' ||\n dirProperty(child))\n ) {\n return SKIP\n }\n }\n}\n\n/**\n * See `wooorm/direction`.\n *\n * @param {string} value\n * Value to check.\n * @returns {Exclude<Direction, 'auto'> | undefined}\n * Directionality.\n */\nfunction dirBidi(value) {\n const result = direction(value)\n return result === 'neutral' ? undefined : result\n}\n\n/**\n * @param {ElementContent} node\n * Node to check.\n * @returns {Direction | undefined}\n * Directionality.\n */\nfunction dirProperty(node) {\n const value =\n node.type === 'element' && typeof node.properties.dir === 'string'\n ? node.properties.dir.toLowerCase()\n : undefined\n\n return value === 'auto' || value === 'ltr' || value === 'rtl'\n ? value\n : undefined\n}\n"],"names":[],"mappings":";;;;;AA8BO,SAAS,WAAW,OAAO,MAAM;AACtC,QAAM,SAAS,MAAM;AACrB,QAAM,WAAW,MAAM;AACvB,QAAM,mBAAmB,MAAM;AAC/B,QAAM,wBAAwB,MAAM;AAEpC,MAAI;AAEJ,MAAI,KAAK,SAAS,WAAW;AAC3B,UAAM,OAAO,KAAK,WAAW,WAAW,KAAK,WAAW;AACxD,UAAM,OAAO,KAAK,WAAW,QAAQ;AACrC,UAAM,MAAM,YAAY,IAAI;AAE5B,QAAI,SAAS,QAAQ,SAAS,QAAW;AACvC,YAAM,WAAW,OAAO,IAAI;AAAA,IAC7B;AAED,QAAI,UAAU,OAAO,UAAU,QAAQ;AACrC,UAAI,KAAK,WAAW,oBAAoB,QAAQ;AAC9C,cAAM,wBAAwB;AAAA,MAC/B;AAED,UAAI,KAAK,YAAY,OAAO;AAC1B,cAAM,SAAS;AAAA,MAChB;AAID,UAAI,QAAQ,OAAO;AACjB,sBAAc;AAAA,MACtB;AAAA;AAAA,QAEQ,QAAQ;AAAA,QAEP,QAAQ,UAAU,KAAK,YAAY;AAAA,QAEnC,QAAQ,UAAU,KAAK,YAAY,WAAW,SAAS;AAAA,QACxD;AACA,sBAAc;AAAA,MAEf,WAAU,QAAQ,UAAU,KAAK,YAAY,OAAO;AACnD,YAAI,KAAK,YAAY,YAAY;AAE/B,wBAAc,QAAQ,SAAS,IAAI,CAAC;AAAA,QAC9C,WACU,KAAK,YAAY,YAChB,SAAS,WACR,SAAS,YACT,SAAS,SACT,SAAS,SACX;AAEA,wBAAc,KAAK,WAAW,QAC1B,QAAQ,OAAO,KAAK,WAAW,KAAK,CAAC,IACrC;AAAA,QACd,OAAe;AAEL,gBAAM,MAAM,mBAAmB;AAAA,QAChC;AAAA,MACF;AAED,UAAI,aAAa;AACf,cAAM,YAAY;AAAA,MACnB;AAAA,IACF,WAEQ,MAAM,uBAAuB;AACpC,YAAM,wBAAwB;AAAA,IAC/B;AAAA,EACF;AAED,SAAO;AAMP,WAAS,QAAQ;AACf,UAAM,SAAS;AACf,UAAM,WAAW;AACjB,UAAM,YAAY;AAClB,UAAM,wBAAwB;AAAA,EAC/B;AAGD,WAAS,oBAAoB,OAAO;AAClC,QAAI,MAAM,SAAS,QAAQ;AACzB,oBAAc,QAAQ,MAAM,KAAK;AACjC,aAAO,cAAc,OAAO;AAAA,IAC7B;AAED,QACE,UAAU,QACV,MAAM,SAAS,cACd,MAAM,YAAY,SACjB,MAAM,YAAY,YAClB,MAAM,YAAY,WAClB,MAAM,YAAY,aAClB,YAAY,KAAK,IACnB;AACA,aAAO;AAAA,IACR;AAAA,EACF;AACH;AAUA,SAAS,QAAQ,OAAO;AACtB,QAAM,SAAS,UAAU,KAAK;AAC9B,SAAO,WAAW,YAAY,SAAY;AAC5C;AAQA,SAAS,YAAY,MAAM;AACzB,QAAM,QACJ,KAAK,SAAS,aAAa,OAAO,KAAK,WAAW,QAAQ,WACtD,KAAK,WAAW,IAAI,YAAa,IACjC;AAEN,SAAO,UAAU,UAAU,UAAU,SAAS,UAAU,QACpD,QACA;AACN;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.cjs","sources":["../../../../node_modules/hast-util-select/lib/id.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstId} AstId\n *\n * @typedef {import('hast').Element} Element\n */\n\n// Workaround to show references to above types in VS Code.\n''\n\n/**\n * Check whether an element has an ID.\n *\n * @param {AstId} query\n * AST rule (with `ids`).\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nexport function id(query, element) {\n return element.properties.id === query.name\n}\n"],"names":[],"mappings":";;AAmBO,SAAS,GAAG,OAAO,SAAS;AACjC,SAAO,QAAQ,WAAW,OAAO,MAAM;AACzC;;","x_google_ignoreList":[0]}
|