@prismicio/client 7.7.3 → 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/README.md +3 -3
- 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/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/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.ts +1 -1
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +31 -31
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.ts +35 -35
- package/dist/createClient.js +31 -31
- package/dist/createClient.js.map +1 -1
- package/dist/errors/ForbiddenError.cjs.map +1 -1
- package/dist/errors/ForbiddenError.js.map +1 -1
- package/dist/errors/NotFoundError.cjs.map +1 -1
- package/dist/errors/NotFoundError.js.map +1 -1
- package/dist/errors/ParsingError.cjs.map +1 -1
- package/dist/errors/ParsingError.js.map +1 -1
- package/dist/errors/PreviewTokenExpired.cjs.map +1 -1
- package/dist/errors/PreviewTokenExpired.js.map +1 -1
- package/dist/errors/PrismicError.cjs.map +1 -1
- package/dist/errors/PrismicError.js.map +1 -1
- package/dist/errors/PrismicRichTextSerializerError.cjs.map +1 -1
- package/dist/errors/PrismicRichTextSerializerError.js.map +1 -1
- package/dist/errors/RefExpiredError.cjs.map +1 -1
- package/dist/errors/RefExpiredError.js.map +1 -1
- package/dist/errors/RefNotFoundError.cjs.map +1 -1
- package/dist/errors/RefNotFoundError.js.map +1 -1
- package/dist/errors/RepositoryNotFoundError.cjs.map +1 -1
- package/dist/errors/RepositoryNotFoundError.js.map +1 -1
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.ts +2 -2
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +2 -2
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +2 -2
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +2 -2
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.ts +2 -4
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +2 -2
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.ts +1 -1
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +1 -1
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/helpers/unstable_htmlAsRichText.cjs +3 -3
- package/dist/helpers/unstable_htmlAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_htmlAsRichText.d.ts +4 -4
- package/dist/helpers/unstable_htmlAsRichText.js +2 -2
- package/dist/helpers/unstable_htmlAsRichText.js.map +1 -1
- package/dist/helpers/unstable_markdownAsRichText.cjs +4 -4
- package/dist/helpers/unstable_markdownAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_markdownAsRichText.d.ts +2 -2
- package/dist/helpers/unstable_markdownAsRichText.js +3 -3
- package/dist/helpers/unstable_markdownAsRichText.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/RichTextFieldBuilder.cjs.map +1 -1
- package/dist/lib/RichTextFieldBuilder.d.ts +1 -1
- package/dist/lib/RichTextFieldBuilder.js.map +1 -1
- package/dist/lib/appendFilters.cjs.map +1 -1
- package/dist/lib/appendFilters.js.map +1 -1
- package/dist/lib/castArray.cjs.map +1 -1
- package/dist/lib/castArray.js.map +1 -1
- package/dist/lib/castThunk.cjs.map +1 -1
- package/dist/lib/castThunk.js.map +1 -1
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.d.ts +1 -1
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/escapeHTML.cjs.map +1 -1
- package/dist/lib/escapeHTML.js.map +1 -1
- package/dist/lib/everyTagFilter.cjs.map +1 -1
- package/dist/lib/everyTagFilter.js.map +1 -1
- package/dist/lib/filterRichTextField.cjs.map +1 -1
- package/dist/lib/filterRichTextField.d.ts +3 -3
- package/dist/lib/filterRichTextField.js.map +1 -1
- package/dist/lib/findMasterRef.cjs.map +1 -1
- package/dist/lib/findMasterRef.d.ts +1 -1
- package/dist/lib/findMasterRef.js.map +1 -1
- package/dist/lib/findRef.cjs.map +1 -1
- package/dist/lib/findRef.d.ts +1 -1
- package/dist/lib/findRef.js.map +1 -1
- package/dist/lib/findRefByID.cjs.map +1 -1
- package/dist/lib/findRefByID.d.ts +1 -1
- package/dist/lib/findRefByID.js.map +1 -1
- package/dist/lib/findRefByLabel.cjs.map +1 -1
- package/dist/lib/findRefByLabel.d.ts +1 -1
- package/dist/lib/findRefByLabel.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/hastSerializerHelpers.cjs +2 -2
- package/dist/lib/hastSerializerHelpers.cjs.map +1 -1
- package/dist/lib/hastSerializerHelpers.d.ts +3 -3
- package/dist/lib/hastSerializerHelpers.js +1 -1
- package/dist/lib/hastSerializerHelpers.js.map +1 -1
- package/dist/lib/hastToRichText.cjs +6 -7
- package/dist/lib/hastToRichText.cjs.map +1 -1
- package/dist/lib/hastToRichText.d.ts +4 -4
- package/dist/lib/hastToRichText.js +3 -4
- package/dist/lib/hastToRichText.js.map +1 -1
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/minifyGraphQLQuery.cjs.map +1 -1
- package/dist/lib/minifyGraphQLQuery.js.map +1 -1
- package/dist/lib/rehypeRichText.cjs +13 -12
- package/dist/lib/rehypeRichText.cjs.map +1 -1
- package/dist/lib/rehypeRichText.d.ts +5 -5
- package/dist/lib/rehypeRichText.js +5 -4
- package/dist/lib/rehypeRichText.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.d.ts +2 -2
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/someTagsFilter.cjs.map +1 -1
- package/dist/lib/someTagsFilter.js.map +1 -1
- package/dist/lib/typeFilter.cjs.map +1 -1
- package/dist/lib/typeFilter.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.ts +1 -1
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.ts +2 -2
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +1 -1
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.ts +1 -1
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.ts +1 -1
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +1 -1
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/types/api/query.d.ts +1 -1
- package/dist/types/api/release.d.ts +1 -1
- package/dist/types/api/repository.d.ts +1 -1
- package/dist/types/model/customType.d.ts +1 -1
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.js.map +1 -1
- package/dist/types/model/slice.cjs.map +1 -1
- package/dist/types/model/slice.js.map +1 -1
- package/dist/types/model/sliceZone.cjs.map +1 -1
- package/dist/types/model/sliceZone.js.map +1 -1
- package/dist/types/model/title.d.ts +1 -1
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/value/document.d.ts +4 -4
- package/dist/types/value/embed.cjs.map +1 -1
- package/dist/types/value/embed.js.map +1 -1
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/richText.cjs.map +1 -1
- package/dist/types/value/richText.js.map +1 -1
- package/dist/types/webhook/apiUpdate.d.ts +1 -1
- package/dist/types/webhook/testTrigger.d.ts +1 -1
- package/dist/types/webhook/types.cjs.map +1 -1
- package/dist/types/webhook/types.d.ts +2 -2
- package/dist/types/webhook/types.js.map +1 -1
- package/package.json +15 -13
- package/src/buildQueryURL.ts +51 -51
- package/src/cookie.ts +1 -1
- package/src/createClient.ts +293 -293
- package/src/errors/ForbiddenError.ts +6 -6
- package/src/errors/NotFoundError.ts +1 -1
- package/src/errors/ParsingError.ts +8 -8
- package/src/errors/PreviewTokenExpired.ts +4 -4
- package/src/errors/PrismicError.ts +5 -5
- package/src/errors/PrismicRichTextSerializerError.ts +1 -1
- package/src/errors/RefExpiredError.ts +4 -4
- package/src/errors/RefNotFoundError.ts +4 -4
- package/src/errors/RepositoryNotFoundError.ts +1 -1
- package/src/filter.ts +22 -22
- package/src/getGraphQLEndpoint.ts +5 -5
- package/src/getRepositoryEndpoint.ts +5 -5
- package/src/getRepositoryName.ts +4 -4
- package/src/getToolbarSrc.ts +5 -5
- package/src/helpers/asDate.ts +7 -7
- package/src/helpers/asHTML.ts +54 -56
- package/src/helpers/asImagePixelDensitySrcSet.ts +14 -17
- package/src/helpers/asImageSrc.ts +9 -8
- package/src/helpers/asImageWidthSrcSet.ts +19 -22
- package/src/helpers/asLink.ts +26 -27
- package/src/helpers/asLinkAttrs.ts +30 -29
- package/src/helpers/asText.ts +15 -15
- package/src/helpers/documentToLinkField.ts +6 -6
- package/src/helpers/isFilled.ts +53 -53
- package/src/helpers/mapSliceZone.ts +34 -34
- package/src/helpers/unstable_htmlAsRichText.ts +23 -22
- package/src/helpers/unstable_markdownAsRichText.ts +14 -13
- package/src/index.ts +119 -119
- package/src/isRepositoryEndpoint.ts +4 -4
- package/src/isRepositoryName.ts +2 -2
- package/src/lib/RichTextFieldBuilder.ts +36 -41
- package/src/lib/appendFilters.ts +4 -4
- package/src/lib/castArray.ts +2 -2
- package/src/lib/castThunk.ts +2 -2
- package/src/lib/devMsg.ts +4 -4
- package/src/lib/escapeHTML.ts +24 -24
- package/src/lib/everyTagFilter.ts +4 -4
- package/src/lib/filterRichTextField.ts +31 -31
- package/src/lib/findMasterRef.ts +4 -4
- package/src/lib/findRef.ts +6 -6
- package/src/lib/findRefByID.ts +4 -4
- package/src/lib/findRefByLabel.ts +4 -4
- package/src/lib/getPreviewCookie.ts +11 -11
- package/src/lib/hastSerializerHelpers.ts +41 -37
- package/src/lib/hastToRichText.ts +74 -73
- package/src/lib/isInternalURL.ts +4 -4
- package/src/lib/minifyGraphQLQuery.ts +2 -2
- package/src/lib/rehypeRichText.ts +42 -41
- package/src/lib/serializerHelpers.ts +53 -54
- package/src/lib/someTagsFilter.ts +4 -4
- package/src/lib/typeFilter.ts +3 -3
- package/src/richtext/asText.ts +5 -5
- package/src/richtext/asTree.ts +53 -53
- package/src/richtext/composeSerializers.ts +6 -6
- package/src/richtext/index.ts +7 -7
- package/src/richtext/serialize.ts +11 -11
- package/src/richtext/types.ts +38 -38
- package/src/richtext/wrapMapSerializer.ts +6 -9
- package/src/types/api/query.ts +9 -9
- package/src/types/api/ref.ts +5 -5
- package/src/types/api/release.ts +2 -2
- package/src/types/api/repository.ts +24 -24
- package/src/types/api/tags.ts +1 -1
- package/src/types/model/boolean.ts +7 -7
- package/src/types/model/color.ts +5 -5
- package/src/types/model/contentRelationship.ts +9 -9
- package/src/types/model/customType.ts +9 -9
- package/src/types/model/date.ts +6 -6
- package/src/types/model/embed.ts +5 -5
- package/src/types/model/geoPoint.ts +4 -4
- package/src/types/model/group.ts +6 -6
- package/src/types/model/image.ts +9 -9
- package/src/types/model/integration.ts +6 -6
- package/src/types/model/keyText.ts +5 -5
- package/src/types/model/link.ts +8 -8
- package/src/types/model/linkToMedia.ts +7 -7
- package/src/types/model/number.ts +7 -7
- package/src/types/model/range.ts +8 -8
- package/src/types/model/richText.ts +16 -16
- package/src/types/model/select.ts +7 -7
- package/src/types/model/separator.ts +4 -4
- package/src/types/model/sharedSlice.ts +7 -7
- package/src/types/model/sharedSliceVariation.ts +9 -9
- package/src/types/model/slice.ts +12 -12
- package/src/types/model/sliceZone.ts +11 -11
- package/src/types/model/timestamp.ts +6 -6
- package/src/types/model/title.ts +2 -2
- package/src/types/model/types.ts +26 -26
- package/src/types/model/uid.ts +5 -5
- package/src/types/value/boolean.ts +1 -1
- package/src/types/value/color.ts +2 -2
- package/src/types/value/contentRelationship.ts +15 -15
- package/src/types/value/date.ts +2 -2
- package/src/types/value/document.ts +23 -23
- package/src/types/value/embed.ts +33 -33
- package/src/types/value/geoPoint.ts +4 -4
- package/src/types/value/group.ts +3 -3
- package/src/types/value/image.ts +21 -21
- package/src/types/value/integration.ts +2 -2
- package/src/types/value/keyText.ts +2 -2
- package/src/types/value/link.ts +12 -12
- package/src/types/value/linkToMedia.ts +11 -11
- package/src/types/value/number.ts +2 -2
- package/src/types/value/richText.ts +58 -58
- package/src/types/value/select.ts +2 -2
- package/src/types/value/sharedSlice.ts +5 -5
- package/src/types/value/sharedSliceVariation.ts +5 -5
- package/src/types/value/slice.ts +6 -6
- package/src/types/value/sliceZone.ts +4 -4
- package/src/types/value/timestamp.ts +3 -3
- package/src/types/value/title.ts +4 -4
- package/src/types/value/types.ts +22 -22
- package/src/types/webhook/apiUpdate.ts +18 -18
- package/src/types/webhook/testTrigger.ts +2 -2
- package/src/types/webhook/types.ts +8 -8
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { extendedFilter } from "../../bcp-47-match/index.js";
|
|
2
|
+
import { parse } from "../../comma-separated-tokens/index.js";
|
|
3
|
+
import { ok } from "../../devlop/lib/default.js";
|
|
4
|
+
import nthCheck$1 from "../../nth-check/lib/esm/index.js";
|
|
5
|
+
import { zwitch } from "../../zwitch/index.js";
|
|
6
|
+
import { walk } from "./walk.js";
|
|
7
|
+
import { hasProperty } from "../../hast-util-has-property/lib/index.js";
|
|
8
|
+
import { whitespace } from "../../hast-util-whitespace/lib/index.js";
|
|
9
|
+
const nthCheck = nthCheck$1.default || nthCheck$1;
|
|
10
|
+
const pseudo = zwitch("name", {
|
|
11
|
+
handlers: {
|
|
12
|
+
"any-link": anyLink,
|
|
13
|
+
blank,
|
|
14
|
+
checked,
|
|
15
|
+
dir,
|
|
16
|
+
disabled,
|
|
17
|
+
empty,
|
|
18
|
+
enabled,
|
|
19
|
+
"first-child": firstChild,
|
|
20
|
+
"first-of-type": firstOfType,
|
|
21
|
+
has,
|
|
22
|
+
is,
|
|
23
|
+
lang,
|
|
24
|
+
"last-child": lastChild,
|
|
25
|
+
"last-of-type": lastOfType,
|
|
26
|
+
not,
|
|
27
|
+
"nth-child": nthChild,
|
|
28
|
+
"nth-last-child": nthLastChild,
|
|
29
|
+
"nth-last-of-type": nthLastOfType,
|
|
30
|
+
"nth-of-type": nthOfType,
|
|
31
|
+
"only-child": onlyChild,
|
|
32
|
+
"only-of-type": onlyOfType,
|
|
33
|
+
optional,
|
|
34
|
+
"read-only": readOnly,
|
|
35
|
+
"read-write": readWrite,
|
|
36
|
+
required,
|
|
37
|
+
root,
|
|
38
|
+
scope
|
|
39
|
+
},
|
|
40
|
+
invalid: invalidPseudo,
|
|
41
|
+
unknown: unknownPseudo
|
|
42
|
+
});
|
|
43
|
+
function anyLink(_, element) {
|
|
44
|
+
return (element.tagName === "a" || element.tagName === "area" || element.tagName === "link") && hasProperty(element, "href");
|
|
45
|
+
}
|
|
46
|
+
function assertDeep(state, query) {
|
|
47
|
+
if (state.shallow) {
|
|
48
|
+
throw new Error("Cannot use `:" + query.name + "` without parent");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function blank(_, element) {
|
|
52
|
+
return !someChildren(element, check);
|
|
53
|
+
function check(child) {
|
|
54
|
+
return child.type === "element" || child.type === "text" && !whitespace(child);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function checked(_, element) {
|
|
58
|
+
if (element.tagName === "input" || element.tagName === "menuitem") {
|
|
59
|
+
return Boolean(
|
|
60
|
+
(element.properties.type === "checkbox" || element.properties.type === "radio") && hasProperty(element, "checked")
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
if (element.tagName === "option") {
|
|
64
|
+
return hasProperty(element, "selected");
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
function dir(query, _1, _2, _3, state) {
|
|
69
|
+
ok(query.argument);
|
|
70
|
+
ok(query.argument.type === "String");
|
|
71
|
+
return state.direction === query.argument.value;
|
|
72
|
+
}
|
|
73
|
+
function disabled(_, element) {
|
|
74
|
+
return (element.tagName === "button" || element.tagName === "input" || element.tagName === "select" || element.tagName === "textarea" || element.tagName === "optgroup" || element.tagName === "option" || element.tagName === "menuitem" || element.tagName === "fieldset") && hasProperty(element, "disabled");
|
|
75
|
+
}
|
|
76
|
+
function empty(_, element) {
|
|
77
|
+
return !someChildren(element, check);
|
|
78
|
+
function check(child) {
|
|
79
|
+
return child.type === "element" || child.type === "text";
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function enabled(query, element) {
|
|
83
|
+
return !disabled(query, element);
|
|
84
|
+
}
|
|
85
|
+
function firstChild(query, _1, _2, _3, state) {
|
|
86
|
+
assertDeep(state, query);
|
|
87
|
+
return state.elementIndex === 0;
|
|
88
|
+
}
|
|
89
|
+
function firstOfType(query, _1, _2, _3, state) {
|
|
90
|
+
assertDeep(state, query);
|
|
91
|
+
return state.typeIndex === 0;
|
|
92
|
+
}
|
|
93
|
+
function getCachedNthCheck(query) {
|
|
94
|
+
let fn = query._cachedFn;
|
|
95
|
+
if (!fn) {
|
|
96
|
+
const value = query.argument;
|
|
97
|
+
if (value.type !== "Formula") {
|
|
98
|
+
throw new Error(
|
|
99
|
+
"Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)"
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
fn = nthCheck(value.a + "n+" + value.b);
|
|
103
|
+
query._cachedFn = fn;
|
|
104
|
+
}
|
|
105
|
+
return fn;
|
|
106
|
+
}
|
|
107
|
+
function has(query, element, _1, _2, state) {
|
|
108
|
+
ok(query.argument);
|
|
109
|
+
ok(query.argument.type === "Selector");
|
|
110
|
+
const childState = {
|
|
111
|
+
...state,
|
|
112
|
+
// Not found yet.
|
|
113
|
+
found: false,
|
|
114
|
+
// One result is enough.
|
|
115
|
+
one: true,
|
|
116
|
+
results: [],
|
|
117
|
+
rootQuery: query.argument,
|
|
118
|
+
scopeElements: [element],
|
|
119
|
+
// Do walk deep.
|
|
120
|
+
shallow: false
|
|
121
|
+
};
|
|
122
|
+
walk(childState, { type: "root", children: element.children });
|
|
123
|
+
return childState.results.length > 0;
|
|
124
|
+
}
|
|
125
|
+
function invalidPseudo() {
|
|
126
|
+
}
|
|
127
|
+
function is(query, element, _1, _2, state) {
|
|
128
|
+
ok(query.argument);
|
|
129
|
+
ok(query.argument.type === "Selector");
|
|
130
|
+
const childState = {
|
|
131
|
+
...state,
|
|
132
|
+
// Not found yet.
|
|
133
|
+
found: false,
|
|
134
|
+
// One result is enough.
|
|
135
|
+
one: true,
|
|
136
|
+
results: [],
|
|
137
|
+
rootQuery: query.argument,
|
|
138
|
+
scopeElements: [element],
|
|
139
|
+
// Do walk deep.
|
|
140
|
+
shallow: false
|
|
141
|
+
};
|
|
142
|
+
walk(childState, element);
|
|
143
|
+
return childState.results[0] === element;
|
|
144
|
+
}
|
|
145
|
+
function lang(query, _1, _2, _3, state) {
|
|
146
|
+
ok(query.argument);
|
|
147
|
+
ok(query.argument.type === "String");
|
|
148
|
+
return state.language !== "" && state.language !== void 0 && extendedFilter(state.language, parse(query.argument.value)).length > 0;
|
|
149
|
+
}
|
|
150
|
+
function lastChild(query, _1, _2, _3, state) {
|
|
151
|
+
assertDeep(state, query);
|
|
152
|
+
return Boolean(
|
|
153
|
+
state.elementCount && state.elementIndex === state.elementCount - 1
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
function lastOfType(query, _1, _2, _3, state) {
|
|
157
|
+
assertDeep(state, query);
|
|
158
|
+
return typeof state.typeIndex === "number" && typeof state.typeCount === "number" && state.typeIndex === state.typeCount - 1;
|
|
159
|
+
}
|
|
160
|
+
function not(query, element, index, parent, state) {
|
|
161
|
+
return !is(query, element, index, parent, state);
|
|
162
|
+
}
|
|
163
|
+
function nthChild(query, _1, _2, _3, state) {
|
|
164
|
+
const fn = getCachedNthCheck(query);
|
|
165
|
+
assertDeep(state, query);
|
|
166
|
+
return typeof state.elementIndex === "number" && fn(state.elementIndex);
|
|
167
|
+
}
|
|
168
|
+
function nthLastChild(query, _1, _2, _3, state) {
|
|
169
|
+
const fn = getCachedNthCheck(query);
|
|
170
|
+
assertDeep(state, query);
|
|
171
|
+
return Boolean(
|
|
172
|
+
typeof state.elementCount === "number" && typeof state.elementIndex === "number" && fn(state.elementCount - state.elementIndex - 1)
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function nthLastOfType(query, _1, _2, _3, state) {
|
|
176
|
+
const fn = getCachedNthCheck(query);
|
|
177
|
+
assertDeep(state, query);
|
|
178
|
+
return typeof state.typeCount === "number" && typeof state.typeIndex === "number" && fn(state.typeCount - 1 - state.typeIndex);
|
|
179
|
+
}
|
|
180
|
+
function nthOfType(query, _1, _2, _3, state) {
|
|
181
|
+
const fn = getCachedNthCheck(query);
|
|
182
|
+
assertDeep(state, query);
|
|
183
|
+
return typeof state.typeIndex === "number" && fn(state.typeIndex);
|
|
184
|
+
}
|
|
185
|
+
function onlyChild(query, _1, _2, _3, state) {
|
|
186
|
+
assertDeep(state, query);
|
|
187
|
+
return state.elementCount === 1;
|
|
188
|
+
}
|
|
189
|
+
function onlyOfType(query, _1, _2, _3, state) {
|
|
190
|
+
assertDeep(state, query);
|
|
191
|
+
return state.typeCount === 1;
|
|
192
|
+
}
|
|
193
|
+
function optional(query, element) {
|
|
194
|
+
return !required(query, element);
|
|
195
|
+
}
|
|
196
|
+
function readOnly(query, element, index, parent, state) {
|
|
197
|
+
return !readWrite(query, element, index, parent, state);
|
|
198
|
+
}
|
|
199
|
+
function readWrite(_, element, _1, _2, state) {
|
|
200
|
+
return element.tagName === "input" || element.tagName === "textarea" ? !hasProperty(element, "readOnly") && !hasProperty(element, "disabled") : Boolean(state.editableOrEditingHost);
|
|
201
|
+
}
|
|
202
|
+
function required(_, element) {
|
|
203
|
+
return (element.tagName === "input" || element.tagName === "textarea" || element.tagName === "select") && hasProperty(element, "required");
|
|
204
|
+
}
|
|
205
|
+
function root(_1, element, _2, parent, state) {
|
|
206
|
+
return Boolean(
|
|
207
|
+
(!parent || parent.type === "root") && state.schema && (state.schema.space === "html" || state.schema.space === "svg") && (element.tagName === "html" || element.tagName === "svg")
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
function scope(_1, element, _2, _3, state) {
|
|
211
|
+
return state.scopeElements.includes(element);
|
|
212
|
+
}
|
|
213
|
+
function someChildren(element, check) {
|
|
214
|
+
const children = element.children;
|
|
215
|
+
let index = -1;
|
|
216
|
+
while (++index < children.length) {
|
|
217
|
+
if (check(children[index])) return true;
|
|
218
|
+
}
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
function unknownPseudo(query_) {
|
|
222
|
+
const query = (
|
|
223
|
+
/** @type {AstPseudoClass} */
|
|
224
|
+
query_
|
|
225
|
+
);
|
|
226
|
+
throw new Error("Unknown pseudo-selector `" + query.name + "`");
|
|
227
|
+
}
|
|
228
|
+
export {
|
|
229
|
+
pseudo
|
|
230
|
+
};
|
|
231
|
+
//# sourceMappingURL=pseudo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pseudo.js","sources":["../../../../node_modules/hast-util-select/lib/pseudo.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstPseudoClass} AstPseudoClass\n *\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('./index.js').State} State\n */\n\nimport {extendedFilter} from 'bcp-47-match'\nimport {parse as commas} from 'comma-separated-tokens'\nimport {ok as assert, unreachable} from 'devlop'\nimport {hasProperty} from 'hast-util-has-property'\nimport {whitespace} from 'hast-util-whitespace'\nimport fauxEsmNthCheck from 'nth-check'\nimport {zwitch} from 'zwitch'\nimport {walk} from './walk.js'\n\n/** @type {import('nth-check').default} */\n// @ts-expect-error: types are broken.\nconst nthCheck = fauxEsmNthCheck.default || fauxEsmNthCheck\n\n/** @type {(rule: AstPseudoClass, element: Element, index: number | undefined, parent: Parents | undefined, state: State) => boolean} */\nexport const pseudo = zwitch('name', {\n handlers: {\n 'any-link': anyLink,\n blank,\n checked,\n dir,\n disabled,\n empty,\n enabled,\n 'first-child': firstChild,\n 'first-of-type': firstOfType,\n has,\n is,\n lang,\n 'last-child': lastChild,\n 'last-of-type': lastOfType,\n not,\n 'nth-child': nthChild,\n 'nth-last-child': nthLastChild,\n 'nth-last-of-type': nthLastOfType,\n 'nth-of-type': nthOfType,\n 'only-child': onlyChild,\n 'only-of-type': onlyOfType,\n optional,\n 'read-only': readOnly,\n 'read-write': readWrite,\n required,\n root,\n scope\n },\n invalid: invalidPseudo,\n unknown: unknownPseudo\n})\n\n/**\n * Check whether an element matches an `:any-link` pseudo.\n *\n * @param {AstPseudoClass} _\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction anyLink(_, element) {\n return (\n (element.tagName === 'a' ||\n element.tagName === 'area' ||\n element.tagName === 'link') &&\n hasProperty(element, 'href')\n )\n}\n\n/**\n * @param {State} state\n * State.\n * @param {AstPseudoClass} query\n * Query.\n */\nfunction assertDeep(state, query) {\n if (state.shallow) {\n throw new Error('Cannot use `:' + query.name + '` without parent')\n }\n}\n\n/**\n * Check whether an element matches a `:blank` pseudo.\n *\n * @param {AstPseudoClass} _\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction blank(_, element) {\n return !someChildren(element, check)\n\n /**\n * @param {ElementContent} child\n * @returns {boolean}\n */\n function check(child) {\n return (\n child.type === 'element' || (child.type === 'text' && !whitespace(child))\n )\n }\n}\n\n/**\n * Check whether an element matches a `:checked` pseudo.\n *\n * @param {AstPseudoClass} _\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction checked(_, element) {\n if (element.tagName === 'input' || element.tagName === 'menuitem') {\n return Boolean(\n (element.properties.type === 'checkbox' ||\n element.properties.type === 'radio') &&\n hasProperty(element, 'checked')\n )\n }\n\n if (element.tagName === 'option') {\n return hasProperty(element, 'selected')\n }\n\n return false\n}\n\n/**\n * Check whether an element matches a `:dir()` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction dir(query, _1, _2, _3, state) {\n assert(query.argument, 'expected `argument`')\n assert(query.argument.type === 'String', 'expected plain text')\n return state.direction === query.argument.value\n}\n\n/**\n * Check whether an element matches a `:disabled` pseudo.\n *\n * @param {AstPseudoClass} _\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction disabled(_, element) {\n return (\n (element.tagName === 'button' ||\n element.tagName === 'input' ||\n element.tagName === 'select' ||\n element.tagName === 'textarea' ||\n element.tagName === 'optgroup' ||\n element.tagName === 'option' ||\n element.tagName === 'menuitem' ||\n element.tagName === 'fieldset') &&\n hasProperty(element, 'disabled')\n )\n}\n\n/**\n * Check whether an element matches an `:empty` pseudo.\n *\n * @param {AstPseudoClass} _\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction empty(_, element) {\n return !someChildren(element, check)\n\n /**\n * @param {ElementContent} child\n * @returns {boolean}\n */\n function check(child) {\n return child.type === 'element' || child.type === 'text'\n }\n}\n\n/**\n * Check whether an element matches an `:enabled` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction enabled(query, element) {\n return !disabled(query, element)\n}\n\n/**\n * Check whether an element matches a `:first-child` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction firstChild(query, _1, _2, _3, state) {\n assertDeep(state, query)\n return state.elementIndex === 0\n}\n\n/**\n * Check whether an element matches a `:first-of-type` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction firstOfType(query, _1, _2, _3, state) {\n assertDeep(state, query)\n return state.typeIndex === 0\n}\n\n/**\n * @param {AstPseudoClass} query\n * Query.\n * @returns {(value: number) => boolean}\n * N.\n */\nfunction getCachedNthCheck(query) {\n /** @type {(value: number) => boolean} */\n // @ts-expect-error: cache.\n let fn = query._cachedFn\n\n if (!fn) {\n const value = query.argument\n assert(value, 'expected `argument`')\n\n if (value.type !== 'Formula') {\n throw new Error(\n 'Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)'\n )\n }\n\n fn = nthCheck(value.a + 'n+' + value.b)\n // @ts-expect-error: cache.\n query._cachedFn = fn\n }\n\n return fn\n}\n\n/**\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} element\n * Element.\n * @param {number | undefined} _1\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _2\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction has(query, element, _1, _2, state) {\n assert(query.argument, 'expected `argument`')\n assert(query.argument.type === 'Selector', 'expected selector')\n\n /** @type {State} */\n const childState = {\n ...state,\n // Not found yet.\n found: false,\n // One result is enough.\n one: true,\n results: [],\n rootQuery: query.argument,\n scopeElements: [element],\n // Do walk deep.\n shallow: false\n }\n\n walk(childState, {type: 'root', children: element.children})\n\n return childState.results.length > 0\n}\n\n// Shouldn’t be called, parser gives correct data.\n/* c8 ignore next 3 */\nfunction invalidPseudo() {\n unreachable('Invalid pseudo-selector')\n}\n\n/**\n * Check whether an element `:is` further selectors.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} element\n * Element.\n * @param {number | undefined} _1\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _2\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction is(query, element, _1, _2, state) {\n assert(query.argument, 'expected `argument`')\n assert(query.argument.type === 'Selector', 'expected selector')\n\n /** @type {State} */\n const childState = {\n ...state,\n // Not found yet.\n found: false,\n // One result is enough.\n one: true,\n results: [],\n rootQuery: query.argument,\n scopeElements: [element],\n // Do walk deep.\n shallow: false\n }\n\n walk(childState, element)\n\n return childState.results[0] === element\n}\n\n/**\n * Check whether an element matches a `:lang()` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction lang(query, _1, _2, _3, state) {\n assert(query.argument, 'expected `argument`')\n assert(query.argument.type === 'String', 'expected string')\n\n return (\n state.language !== '' &&\n state.language !== undefined &&\n extendedFilter(state.language, commas(query.argument.value)).length > 0\n )\n}\n\n/**\n * Check whether an element matches a `:last-child` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction lastChild(query, _1, _2, _3, state) {\n assertDeep(state, query)\n return Boolean(\n state.elementCount && state.elementIndex === state.elementCount - 1\n )\n}\n\n/**\n * Check whether an element matches a `:last-of-type` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction lastOfType(query, _1, _2, _3, state) {\n assertDeep(state, query)\n return (\n typeof state.typeIndex === 'number' &&\n typeof state.typeCount === 'number' &&\n state.typeIndex === state.typeCount - 1\n )\n}\n\n/**\n * Check whether an element does `:not` match further selectors.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} element\n * Element.\n * @param {number | undefined} index\n * Index of `element` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction not(query, element, index, parent, state) {\n return !is(query, element, index, parent, state)\n}\n\n/**\n * Check whether an element matches an `:nth-child` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction nthChild(query, _1, _2, _3, state) {\n const fn = getCachedNthCheck(query)\n assertDeep(state, query)\n return typeof state.elementIndex === 'number' && fn(state.elementIndex)\n}\n\n/**\n * Check whether an element matches an `:nth-last-child` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction nthLastChild(query, _1, _2, _3, state) {\n const fn = getCachedNthCheck(query)\n assertDeep(state, query)\n return Boolean(\n typeof state.elementCount === 'number' &&\n typeof state.elementIndex === 'number' &&\n fn(state.elementCount - state.elementIndex - 1)\n )\n}\n\n/**\n * Check whether an element matches a `:nth-last-of-type` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction nthLastOfType(query, _1, _2, _3, state) {\n const fn = getCachedNthCheck(query)\n assertDeep(state, query)\n return (\n typeof state.typeCount === 'number' &&\n typeof state.typeIndex === 'number' &&\n fn(state.typeCount - 1 - state.typeIndex)\n )\n}\n\n/**\n * Check whether an element matches an `:nth-of-type` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction nthOfType(query, _1, _2, _3, state) {\n const fn = getCachedNthCheck(query)\n assertDeep(state, query)\n return typeof state.typeIndex === 'number' && fn(state.typeIndex)\n}\n\n/**\n * Check whether an element matches an `:only-child` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction onlyChild(query, _1, _2, _3, state) {\n assertDeep(state, query)\n return state.elementCount === 1\n}\n\n/**\n * Check whether an element matches an `:only-of-type` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} _1\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction onlyOfType(query, _1, _2, _3, state) {\n assertDeep(state, query)\n return state.typeCount === 1\n}\n\n/**\n * Check whether an element matches an `:optional` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction optional(query, element) {\n return !required(query, element)\n}\n\n/**\n * Check whether an element matches a `:read-only` pseudo.\n *\n * @param {AstPseudoClass} query\n * Query.\n * @param {Element} element\n * Element.\n * @param {number | undefined} index\n * Index of `element` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction readOnly(query, element, index, parent, state) {\n return !readWrite(query, element, index, parent, state)\n}\n\n/**\n * Check whether an element matches a `:read-write` pseudo.\n *\n * @param {AstPseudoClass} _\n * Query.\n * @param {Element} element\n * Element.\n * @param {number | undefined} _1\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _2\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction readWrite(_, element, _1, _2, state) {\n return element.tagName === 'input' || element.tagName === 'textarea'\n ? !hasProperty(element, 'readOnly') && !hasProperty(element, 'disabled')\n : Boolean(state.editableOrEditingHost)\n}\n\n/**\n * Check whether an element matches a `:required` pseudo.\n *\n * @param {AstPseudoClass} _\n * Query.\n * @param {Element} element\n * Element.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction required(_, element) {\n return (\n (element.tagName === 'input' ||\n element.tagName === 'textarea' ||\n element.tagName === 'select') &&\n hasProperty(element, 'required')\n )\n}\n\n/**\n * Check whether an element matches a `:root` pseudo.\n *\n * @param {AstPseudoClass} _1\n * Query.\n * @param {Element} element\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction root(_1, element, _2, parent, state) {\n return Boolean(\n (!parent || parent.type === 'root') &&\n state.schema &&\n (state.schema.space === 'html' || state.schema.space === 'svg') &&\n (element.tagName === 'html' || element.tagName === 'svg')\n )\n}\n\n/**\n * Check whether an element matches a `:scope` pseudo.\n *\n * @param {AstPseudoClass} _1\n * Query.\n * @param {Element} element\n * Element.\n * @param {number | undefined} _2\n * Index of `element` in `parent`.\n * @param {Parents | undefined} _3\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nfunction scope(_1, element, _2, _3, state) {\n return state.scopeElements.includes(element)\n}\n\n/**\n * Check children.\n *\n * @param {Element} element\n * Element.\n * @param {(child: ElementContent) => boolean} check\n * Check.\n * @returns {boolean}\n * Whether a child of `element` matches `check`.\n */\nfunction someChildren(element, check) {\n const children = element.children\n let index = -1\n\n while (++index < children.length) {\n if (check(children[index])) return true\n }\n\n return false\n}\n\n/**\n * @param {unknown} query_\n * Query-like value.\n * @returns {never}\n * Nothing.\n * @throws\n * Exception.\n */\nfunction unknownPseudo(query_) {\n // Runtime JS guarantees it has a `name`.\n const query = /** @type {AstPseudoClass} */ (query_)\n throw new Error('Unknown pseudo-selector `' + query.name + '`')\n}\n"],"names":["fauxEsmNthCheck","assert","commas"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const attribute = require("./attribute.cjs");
|
|
4
|
+
const className = require("./class-name.cjs");
|
|
5
|
+
const id = require("./id.cjs");
|
|
6
|
+
const name = require("./name.cjs");
|
|
7
|
+
const pseudo = require("./pseudo.cjs");
|
|
8
|
+
function test(query, element, index, parent, state) {
|
|
9
|
+
for (const item of query.items) {
|
|
10
|
+
if (item.type === "Attribute") {
|
|
11
|
+
if (!attribute.attribute(item, element, state.schema)) return false;
|
|
12
|
+
} else if (item.type === "Id") {
|
|
13
|
+
if (!id.id(item, element)) return false;
|
|
14
|
+
} else if (item.type === "ClassName") {
|
|
15
|
+
if (!className.className(item, element)) return false;
|
|
16
|
+
} else if (item.type === "PseudoClass") {
|
|
17
|
+
if (!pseudo.pseudo(item, element, index, parent, state)) return false;
|
|
18
|
+
} else if (item.type === "PseudoElement") {
|
|
19
|
+
throw new Error("Invalid selector: `::" + item.name + "`");
|
|
20
|
+
} else if (item.type === "TagName") {
|
|
21
|
+
if (!name.name(item, element)) return false;
|
|
22
|
+
} else ;
|
|
23
|
+
}
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
exports.test = test;
|
|
27
|
+
//# sourceMappingURL=test.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.cjs","sources":["../../../../node_modules/hast-util-select/lib/test.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstRule} AstRule\n *\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('./index.js').State} State\n */\n\nimport {attribute} from './attribute.js'\nimport {className} from './class-name.js'\nimport {id} from './id.js'\nimport {name} from './name.js'\nimport {pseudo} from './pseudo.js'\n\n/**\n * Test a rule.\n *\n * @param {AstRule} query\n * AST rule (with `pseudoClasses`).\n * @param {Element} element\n * Element.\n * @param {number | undefined} index\n * Index of `element` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nexport function test(query, element, index, parent, state) {\n for (const item of query.items) {\n // eslint-disable-next-line unicorn/prefer-switch\n if (item.type === 'Attribute') {\n if (!attribute(item, element, state.schema)) return false\n } else if (item.type === 'Id') {\n if (!id(item, element)) return false\n } else if (item.type === 'ClassName') {\n if (!className(item, element)) return false\n } else if (item.type === 'PseudoClass') {\n if (!pseudo(item, element, index, parent, state)) return false\n } else if (item.type === 'PseudoElement') {\n throw new Error('Invalid selector: `::' + item.name + '`')\n } else if (item.type === 'TagName') {\n if (!name(item, element)) return false\n } else {\n // Otherwise `item.type` is `WildcardTag`, which matches.\n }\n }\n\n return true\n}\n"],"names":["attribute","id","className","pseudo","name"],"mappings":";;;;;;;AA+BO,SAAS,KAAK,OAAO,SAAS,OAAO,QAAQ,OAAO;AACzD,aAAW,QAAQ,MAAM,OAAO;AAE9B,QAAI,KAAK,SAAS,aAAa;AAC7B,UAAI,CAACA,UAAS,UAAC,MAAM,SAAS,MAAM,MAAM,EAAG,QAAO;AAAA,IAC1D,WAAe,KAAK,SAAS,MAAM;AAC7B,UAAI,CAACC,GAAAA,GAAG,MAAM,OAAO,EAAG,QAAO;AAAA,IACrC,WAAe,KAAK,SAAS,aAAa;AACpC,UAAI,CAACC,UAAAA,UAAU,MAAM,OAAO,EAAG,QAAO;AAAA,IAC5C,WAAe,KAAK,SAAS,eAAe;AACtC,UAAI,CAACC,OAAAA,OAAO,MAAM,SAAS,OAAO,QAAQ,KAAK,EAAG,QAAO;AAAA,IAC/D,WAAe,KAAK,SAAS,iBAAiB;AACxC,YAAM,IAAI,MAAM,0BAA0B,KAAK,OAAO,GAAG;AAAA,IAC/D,WAAe,KAAK,SAAS,WAAW;AAClC,UAAI,CAACC,KAAAA,KAAK,MAAM,OAAO,EAAG,QAAO;AAAA,IACvC,MAAW;AAAA,EAGR;AAED,SAAO;AACT;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { attribute } from "./attribute.js";
|
|
2
|
+
import { className } from "./class-name.js";
|
|
3
|
+
import { id } from "./id.js";
|
|
4
|
+
import { name } from "./name.js";
|
|
5
|
+
import { pseudo } from "./pseudo.js";
|
|
6
|
+
function test(query, element, index, parent, state) {
|
|
7
|
+
for (const item of query.items) {
|
|
8
|
+
if (item.type === "Attribute") {
|
|
9
|
+
if (!attribute(item, element, state.schema)) return false;
|
|
10
|
+
} else if (item.type === "Id") {
|
|
11
|
+
if (!id(item, element)) return false;
|
|
12
|
+
} else if (item.type === "ClassName") {
|
|
13
|
+
if (!className(item, element)) return false;
|
|
14
|
+
} else if (item.type === "PseudoClass") {
|
|
15
|
+
if (!pseudo(item, element, index, parent, state)) return false;
|
|
16
|
+
} else if (item.type === "PseudoElement") {
|
|
17
|
+
throw new Error("Invalid selector: `::" + item.name + "`");
|
|
18
|
+
} else if (item.type === "TagName") {
|
|
19
|
+
if (!name(item, element)) return false;
|
|
20
|
+
} else ;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
test
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sources":["../../../../node_modules/hast-util-select/lib/test.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstRule} AstRule\n *\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('./index.js').State} State\n */\n\nimport {attribute} from './attribute.js'\nimport {className} from './class-name.js'\nimport {id} from './id.js'\nimport {name} from './name.js'\nimport {pseudo} from './pseudo.js'\n\n/**\n * Test a rule.\n *\n * @param {AstRule} query\n * AST rule (with `pseudoClasses`).\n * @param {Element} element\n * Element.\n * @param {number | undefined} index\n * Index of `element` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `element`.\n * @param {State} state\n * State.\n * @returns {boolean}\n * Whether `element` matches `query`.\n */\nexport function test(query, element, index, parent, state) {\n for (const item of query.items) {\n // eslint-disable-next-line unicorn/prefer-switch\n if (item.type === 'Attribute') {\n if (!attribute(item, element, state.schema)) return false\n } else if (item.type === 'Id') {\n if (!id(item, element)) return false\n } else if (item.type === 'ClassName') {\n if (!className(item, element)) return false\n } else if (item.type === 'PseudoClass') {\n if (!pseudo(item, element, index, parent, state)) return false\n } else if (item.type === 'PseudoElement') {\n throw new Error('Invalid selector: `::' + item.name + '`')\n } else if (item.type === 'TagName') {\n if (!name(item, element)) return false\n } else {\n // Otherwise `item.type` is `WildcardTag`, which matches.\n }\n }\n\n return true\n}\n"],"names":[],"mappings":";;;;;AA+BO,SAAS,KAAK,OAAO,SAAS,OAAO,QAAQ,OAAO;AACzD,aAAW,QAAQ,MAAM,OAAO;AAE9B,QAAI,KAAK,SAAS,aAAa;AAC7B,UAAI,CAAC,UAAU,MAAM,SAAS,MAAM,MAAM,EAAG,QAAO;AAAA,IAC1D,WAAe,KAAK,SAAS,MAAM;AAC7B,UAAI,CAAC,GAAG,MAAM,OAAO,EAAG,QAAO;AAAA,IACrC,WAAe,KAAK,SAAS,aAAa;AACpC,UAAI,CAAC,UAAU,MAAM,OAAO,EAAG,QAAO;AAAA,IAC5C,WAAe,KAAK,SAAS,eAAe;AACtC,UAAI,CAAC,OAAO,MAAM,SAAS,OAAO,QAAQ,KAAK,EAAG,QAAO;AAAA,IAC/D,WAAe,KAAK,SAAS,iBAAiB;AACxC,YAAM,IAAI,MAAM,0BAA0B,KAAK,OAAO,GAAG;AAAA,IAC/D,WAAe,KAAK,SAAS,WAAW;AAClC,UAAI,CAAC,KAAK,MAAM,OAAO,EAAG,QAAO;AAAA,IACvC,MAAW;AAAA,EAGR;AAED,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const enterState = require("./enter-state.cjs");
|
|
4
|
+
const test = require("./test.cjs");
|
|
5
|
+
const empty = [];
|
|
6
|
+
function walk(state, tree) {
|
|
7
|
+
if (tree) {
|
|
8
|
+
one(state, [], tree, void 0, void 0, tree);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function add(nest, field, rule) {
|
|
12
|
+
const list = nest[field];
|
|
13
|
+
if (list) {
|
|
14
|
+
list.push(rule);
|
|
15
|
+
} else {
|
|
16
|
+
nest[field] = [rule];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function all(state, nest, node, tree) {
|
|
20
|
+
const fromParent = combine(nest.descendant, nest.directChild);
|
|
21
|
+
let fromSibling;
|
|
22
|
+
let index = -1;
|
|
23
|
+
const total = { count: 0, types: /* @__PURE__ */ new Map() };
|
|
24
|
+
const before = { count: 0, types: /* @__PURE__ */ new Map() };
|
|
25
|
+
while (++index < node.children.length) {
|
|
26
|
+
count(total, node.children[index]);
|
|
27
|
+
}
|
|
28
|
+
index = -1;
|
|
29
|
+
while (++index < node.children.length) {
|
|
30
|
+
const child = node.children[index];
|
|
31
|
+
const name = child.type === "element" ? child.tagName.toUpperCase() : void 0;
|
|
32
|
+
state.elementIndex = before.count;
|
|
33
|
+
state.typeIndex = name ? before.types.get(name) || 0 : 0;
|
|
34
|
+
state.elementCount = total.count;
|
|
35
|
+
state.typeCount = name ? total.types.get(name) : 0;
|
|
36
|
+
if ("children" in child) {
|
|
37
|
+
const forSibling = combine(fromParent, fromSibling);
|
|
38
|
+
const nest2 = one(
|
|
39
|
+
state,
|
|
40
|
+
forSibling,
|
|
41
|
+
node.children[index],
|
|
42
|
+
index,
|
|
43
|
+
node,
|
|
44
|
+
tree
|
|
45
|
+
);
|
|
46
|
+
fromSibling = combine(nest2.generalSibling, nest2.adjacentSibling);
|
|
47
|
+
}
|
|
48
|
+
if (state.one && state.found) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
count(before, node.children[index]);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function applySelectors(state, rules, node, index, parent) {
|
|
55
|
+
const nestResult = {
|
|
56
|
+
adjacentSibling: void 0,
|
|
57
|
+
descendant: void 0,
|
|
58
|
+
directChild: void 0,
|
|
59
|
+
generalSibling: void 0
|
|
60
|
+
};
|
|
61
|
+
let selectorIndex = -1;
|
|
62
|
+
while (++selectorIndex < rules.length) {
|
|
63
|
+
const rule = rules[selectorIndex];
|
|
64
|
+
if (state.one && state.found) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
if (state.shallow && rule.nestedRule) {
|
|
68
|
+
throw new Error("Expected selector without nesting");
|
|
69
|
+
}
|
|
70
|
+
if (test.test(rule, node, index, parent, state)) {
|
|
71
|
+
const nest = rule.nestedRule;
|
|
72
|
+
if (nest) {
|
|
73
|
+
const label = nest.combinator === "+" ? "adjacentSibling" : nest.combinator === "~" ? "generalSibling" : nest.combinator === ">" ? "directChild" : "descendant";
|
|
74
|
+
add(nestResult, label, nest);
|
|
75
|
+
} else {
|
|
76
|
+
state.found = true;
|
|
77
|
+
if (!state.results.includes(node)) {
|
|
78
|
+
state.results.push(node);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (rule.combinator === void 0) {
|
|
83
|
+
add(nestResult, "descendant", rule);
|
|
84
|
+
} else if (rule.combinator === "~") {
|
|
85
|
+
add(nestResult, "generalSibling", rule);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return nestResult;
|
|
89
|
+
}
|
|
90
|
+
function combine(left, right) {
|
|
91
|
+
return left && right && left.length > 0 && right.length > 0 ? [...left, ...right] : left && left.length > 0 ? left : right && right.length > 0 ? right : empty;
|
|
92
|
+
}
|
|
93
|
+
function count(counts, node) {
|
|
94
|
+
if (node.type === "element") {
|
|
95
|
+
const name = node.tagName.toUpperCase();
|
|
96
|
+
const count2 = (counts.types.get(name) || 0) + 1;
|
|
97
|
+
counts.count++;
|
|
98
|
+
counts.types.set(name, count2);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function one(state, currentRules, node, index, parent, tree) {
|
|
102
|
+
let nestResult = {
|
|
103
|
+
adjacentSibling: void 0,
|
|
104
|
+
descendant: void 0,
|
|
105
|
+
directChild: void 0,
|
|
106
|
+
generalSibling: void 0
|
|
107
|
+
};
|
|
108
|
+
const exit = enterState.enterState(state, node);
|
|
109
|
+
if (node.type === "element") {
|
|
110
|
+
let rootRules = state.rootQuery.rules;
|
|
111
|
+
if (parent && parent !== tree) {
|
|
112
|
+
rootRules = state.rootQuery.rules.filter(
|
|
113
|
+
(d) => d.combinator === void 0 || d.combinator === ">" && parent === tree
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
nestResult = applySelectors(
|
|
117
|
+
state,
|
|
118
|
+
// Try the root rules for this element too.
|
|
119
|
+
combine(currentRules, rootRules),
|
|
120
|
+
node,
|
|
121
|
+
index,
|
|
122
|
+
parent
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
if ("children" in node && !state.shallow && !(state.one && state.found)) {
|
|
126
|
+
all(state, nestResult, node, tree);
|
|
127
|
+
}
|
|
128
|
+
exit();
|
|
129
|
+
return nestResult;
|
|
130
|
+
}
|
|
131
|
+
exports.walk = walk;
|
|
132
|
+
//# sourceMappingURL=walk.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walk.cjs","sources":["../../../../node_modules/hast-util-select/lib/walk.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstRule} AstRule\n *\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('./index.js').State} State\n */\n\n/**\n * @typedef Counts\n * Info on elements in a parent.\n * @property {number} count\n * Number of elements.\n * @property {Map<string, number>} types\n * Number of elements by tag name.\n *\n * @typedef Nest\n * Rule sets by nesting.\n * @property {Array<AstRule> | undefined} adjacentSibling\n * `a + b`\n * @property {Array<AstRule> | undefined} descendant\n * `a b`\n * @property {Array<AstRule> | undefined} directChild\n * `a > b`\n * @property {Array<AstRule> | undefined} generalSibling\n * `a ~ b`\n */\n\nimport {enterState} from './enter-state.js'\nimport {test} from './test.js'\n\n/** @type {Array<never>} */\nconst empty = []\n\n/**\n * Walk a tree.\n *\n * @param {State} state\n * State.\n * @param {Nodes | undefined} tree\n * Tree.\n */\nexport function walk(state, tree) {\n if (tree) {\n one(state, [], tree, undefined, undefined, tree)\n }\n}\n\n/**\n * Add a rule to a nesting map.\n *\n * @param {Nest} nest\n * Nesting.\n * @param {keyof Nest} field\n * Field.\n * @param {AstRule} rule\n * Rule.\n */\nfunction add(nest, field, rule) {\n const list = nest[field]\n if (list) {\n list.push(rule)\n } else {\n nest[field] = [rule]\n }\n}\n\n/**\n * Check in a parent.\n *\n * @param {State} state\n * State.\n * @param {Nest} nest\n * Nesting.\n * @param {Parents} node\n * Parent.\n * @param {Nodes} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\nfunction all(state, nest, node, tree) {\n const fromParent = combine(nest.descendant, nest.directChild)\n /** @type {Array<AstRule> | undefined} */\n let fromSibling\n let index = -1\n /**\n * Total counts.\n * @type {Counts}\n */\n const total = {count: 0, types: new Map()}\n /**\n * Counts of previous siblings.\n * @type {Counts}\n */\n const before = {count: 0, types: new Map()}\n\n while (++index < node.children.length) {\n count(total, node.children[index])\n }\n\n index = -1\n\n while (++index < node.children.length) {\n const child = node.children[index]\n // Uppercase to prevent prototype polution, injecting `constructor` or so.\n // Normalize because HTML is insensitive.\n const name =\n child.type === 'element' ? child.tagName.toUpperCase() : undefined\n // Before counting further elements:\n state.elementIndex = before.count\n state.typeIndex = name ? before.types.get(name) || 0 : 0\n // After counting all elements.\n state.elementCount = total.count\n state.typeCount = name ? total.types.get(name) : 0\n\n // Only apply if this is a parent, this should be an element, but we check\n // for parents so that we delve into custom nodes too.\n if ('children' in child) {\n const forSibling = combine(fromParent, fromSibling)\n const nest = one(\n state,\n forSibling,\n node.children[index],\n index,\n node,\n tree\n )\n fromSibling = combine(nest.generalSibling, nest.adjacentSibling)\n }\n\n // We found one thing, and one is enough.\n if (state.one && state.found) {\n break\n }\n\n count(before, node.children[index])\n }\n}\n\n/**\n * Apply selectors to an element.\n *\n * @param {State} state\n * Current state.\n * @param {Array<AstRule>} rules\n * Rules to apply.\n * @param {Element} node\n * Element to apply rules to.\n * @param {number | undefined} index\n * Index of `node` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Nest}\n * Further rules.\n */\nfunction applySelectors(state, rules, node, index, parent) {\n /** @type {Nest} */\n const nestResult = {\n adjacentSibling: undefined,\n descendant: undefined,\n directChild: undefined,\n generalSibling: undefined\n }\n let selectorIndex = -1\n\n while (++selectorIndex < rules.length) {\n const rule = rules[selectorIndex]\n\n // We found one thing, and one is enough.\n if (state.one && state.found) {\n break\n }\n\n // When shallow, we don’t allow nested rules.\n // Idea: we could allow a stack of parents?\n // Might get quite complex though.\n if (state.shallow && rule.nestedRule) {\n throw new Error('Expected selector without nesting')\n }\n\n // If this rule matches:\n if (test(rule, node, index, parent, state)) {\n const nest = rule.nestedRule\n\n // Are there more?\n if (nest) {\n /** @type {keyof Nest} */\n const label =\n nest.combinator === '+'\n ? 'adjacentSibling'\n : nest.combinator === '~'\n ? 'generalSibling'\n : nest.combinator === '>'\n ? 'directChild'\n : 'descendant'\n add(nestResult, label, nest)\n } else {\n // We have a match!\n state.found = true\n\n if (!state.results.includes(node)) {\n state.results.push(node)\n }\n }\n }\n\n // Descendant.\n if (rule.combinator === undefined) {\n add(nestResult, 'descendant', rule)\n }\n // Adjacent.\n else if (rule.combinator === '~') {\n add(nestResult, 'generalSibling', rule)\n }\n // Drop direct child (`>`), adjacent sibling (`+`).\n }\n\n return nestResult\n}\n\n/**\n * Combine two lists, if needed.\n *\n * This is optimized to create as few lists as possible.\n *\n * @param {Array<AstRule> | undefined} left\n * Rules.\n * @param {Array<AstRule> | undefined} right\n * Rules.\n * @returns {Array<AstRule>}\n * Rules.\n */\nfunction combine(left, right) {\n return left && right && left.length > 0 && right.length > 0\n ? [...left, ...right]\n : left && left.length > 0\n ? left\n : right && right.length > 0\n ? right\n : empty\n}\n\n/**\n * Count a node.\n *\n * @param {Counts} counts\n * Counts.\n * @param {Nodes} node\n * Node (we’re looking for elements).\n * @returns {undefined}\n * Nothing.\n */\nfunction count(counts, node) {\n if (node.type === 'element') {\n // Uppercase to prevent prototype polution, injecting `constructor` or so.\n // Normalize because HTML is insensitive.\n const name = node.tagName.toUpperCase()\n const count = (counts.types.get(name) || 0) + 1\n counts.count++\n counts.types.set(name, count)\n }\n}\n\n/**\n * Check a node.\n *\n * @param {State} state\n * State.\n * @param {Array<AstRule>} currentRules\n * Rules.\n * @param {Nodes} node\n * Node.\n * @param {number | undefined} index\n * Index of `node` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {Nodes} tree\n * Tree.\n * @returns {Nest}\n * Nesting.\n */\nfunction one(state, currentRules, node, index, parent, tree) {\n /** @type {Nest} */\n let nestResult = {\n adjacentSibling: undefined,\n descendant: undefined,\n directChild: undefined,\n generalSibling: undefined\n }\n\n const exit = enterState(state, node)\n\n if (node.type === 'element') {\n let rootRules = state.rootQuery.rules\n\n // Remove direct child rules if this is the root.\n // This only happens for a `:has()` rule, which can be like\n // `a:has(> b)`.\n if (parent && parent !== tree) {\n rootRules = state.rootQuery.rules.filter(\n (d) =>\n d.combinator === undefined ||\n (d.combinator === '>' && parent === tree)\n )\n }\n\n nestResult = applySelectors(\n state,\n // Try the root rules for this element too.\n combine(currentRules, rootRules),\n node,\n index,\n parent\n )\n }\n\n // If this is a parent, and we want to delve into them, and we haven’t found\n // our single result yet.\n if ('children' in node && !state.shallow && !(state.one && state.found)) {\n all(state, nestResult, node, tree)\n }\n\n exit()\n\n return nestResult\n}\n"],"names":["nest","test","count","enterState"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { enterState } from "./enter-state.js";
|
|
2
|
+
import { test } from "./test.js";
|
|
3
|
+
const empty = [];
|
|
4
|
+
function walk(state, tree) {
|
|
5
|
+
if (tree) {
|
|
6
|
+
one(state, [], tree, void 0, void 0, tree);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function add(nest, field, rule) {
|
|
10
|
+
const list = nest[field];
|
|
11
|
+
if (list) {
|
|
12
|
+
list.push(rule);
|
|
13
|
+
} else {
|
|
14
|
+
nest[field] = [rule];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function all(state, nest, node, tree) {
|
|
18
|
+
const fromParent = combine(nest.descendant, nest.directChild);
|
|
19
|
+
let fromSibling;
|
|
20
|
+
let index = -1;
|
|
21
|
+
const total = { count: 0, types: /* @__PURE__ */ new Map() };
|
|
22
|
+
const before = { count: 0, types: /* @__PURE__ */ new Map() };
|
|
23
|
+
while (++index < node.children.length) {
|
|
24
|
+
count(total, node.children[index]);
|
|
25
|
+
}
|
|
26
|
+
index = -1;
|
|
27
|
+
while (++index < node.children.length) {
|
|
28
|
+
const child = node.children[index];
|
|
29
|
+
const name = child.type === "element" ? child.tagName.toUpperCase() : void 0;
|
|
30
|
+
state.elementIndex = before.count;
|
|
31
|
+
state.typeIndex = name ? before.types.get(name) || 0 : 0;
|
|
32
|
+
state.elementCount = total.count;
|
|
33
|
+
state.typeCount = name ? total.types.get(name) : 0;
|
|
34
|
+
if ("children" in child) {
|
|
35
|
+
const forSibling = combine(fromParent, fromSibling);
|
|
36
|
+
const nest2 = one(
|
|
37
|
+
state,
|
|
38
|
+
forSibling,
|
|
39
|
+
node.children[index],
|
|
40
|
+
index,
|
|
41
|
+
node,
|
|
42
|
+
tree
|
|
43
|
+
);
|
|
44
|
+
fromSibling = combine(nest2.generalSibling, nest2.adjacentSibling);
|
|
45
|
+
}
|
|
46
|
+
if (state.one && state.found) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
count(before, node.children[index]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function applySelectors(state, rules, node, index, parent) {
|
|
53
|
+
const nestResult = {
|
|
54
|
+
adjacentSibling: void 0,
|
|
55
|
+
descendant: void 0,
|
|
56
|
+
directChild: void 0,
|
|
57
|
+
generalSibling: void 0
|
|
58
|
+
};
|
|
59
|
+
let selectorIndex = -1;
|
|
60
|
+
while (++selectorIndex < rules.length) {
|
|
61
|
+
const rule = rules[selectorIndex];
|
|
62
|
+
if (state.one && state.found) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
if (state.shallow && rule.nestedRule) {
|
|
66
|
+
throw new Error("Expected selector without nesting");
|
|
67
|
+
}
|
|
68
|
+
if (test(rule, node, index, parent, state)) {
|
|
69
|
+
const nest = rule.nestedRule;
|
|
70
|
+
if (nest) {
|
|
71
|
+
const label = nest.combinator === "+" ? "adjacentSibling" : nest.combinator === "~" ? "generalSibling" : nest.combinator === ">" ? "directChild" : "descendant";
|
|
72
|
+
add(nestResult, label, nest);
|
|
73
|
+
} else {
|
|
74
|
+
state.found = true;
|
|
75
|
+
if (!state.results.includes(node)) {
|
|
76
|
+
state.results.push(node);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (rule.combinator === void 0) {
|
|
81
|
+
add(nestResult, "descendant", rule);
|
|
82
|
+
} else if (rule.combinator === "~") {
|
|
83
|
+
add(nestResult, "generalSibling", rule);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return nestResult;
|
|
87
|
+
}
|
|
88
|
+
function combine(left, right) {
|
|
89
|
+
return left && right && left.length > 0 && right.length > 0 ? [...left, ...right] : left && left.length > 0 ? left : right && right.length > 0 ? right : empty;
|
|
90
|
+
}
|
|
91
|
+
function count(counts, node) {
|
|
92
|
+
if (node.type === "element") {
|
|
93
|
+
const name = node.tagName.toUpperCase();
|
|
94
|
+
const count2 = (counts.types.get(name) || 0) + 1;
|
|
95
|
+
counts.count++;
|
|
96
|
+
counts.types.set(name, count2);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function one(state, currentRules, node, index, parent, tree) {
|
|
100
|
+
let nestResult = {
|
|
101
|
+
adjacentSibling: void 0,
|
|
102
|
+
descendant: void 0,
|
|
103
|
+
directChild: void 0,
|
|
104
|
+
generalSibling: void 0
|
|
105
|
+
};
|
|
106
|
+
const exit = enterState(state, node);
|
|
107
|
+
if (node.type === "element") {
|
|
108
|
+
let rootRules = state.rootQuery.rules;
|
|
109
|
+
if (parent && parent !== tree) {
|
|
110
|
+
rootRules = state.rootQuery.rules.filter(
|
|
111
|
+
(d) => d.combinator === void 0 || d.combinator === ">" && parent === tree
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
nestResult = applySelectors(
|
|
115
|
+
state,
|
|
116
|
+
// Try the root rules for this element too.
|
|
117
|
+
combine(currentRules, rootRules),
|
|
118
|
+
node,
|
|
119
|
+
index,
|
|
120
|
+
parent
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
if ("children" in node && !state.shallow && !(state.one && state.found)) {
|
|
124
|
+
all(state, nestResult, node, tree);
|
|
125
|
+
}
|
|
126
|
+
exit();
|
|
127
|
+
return nestResult;
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
walk
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=walk.js.map
|