@prismicio/client 7.7.5-alpha.0 → 7.9.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +0 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/types/model/contentRelationship.d.ts +2 -0
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.d.ts +2 -0
- package/dist/types/model/link.js.map +1 -1
- package/dist/types/model/linkToMedia.d.ts +2 -0
- package/dist/types/value/contentRelationship.d.ts +1 -0
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.ts +1 -0
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.ts +1 -0
- package/package.json +2 -16
- package/src/index.ts +0 -8
- package/src/types/model/contentRelationship.ts +2 -0
- package/src/types/model/link.ts +3 -0
- package/src/types/model/linkToMedia.ts +2 -0
- package/src/types/value/contentRelationship.ts +1 -0
- package/src/types/value/link.ts +1 -0
- package/src/types/value/linkToMedia.ts +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs +0 -63
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js +0 -63
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs +0 -12
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js +0 -12
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs +0 -127
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js +0 -127
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs +0 -23
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js +0 -23
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js.map +0 -1
- package/dist/_node_modules/bail/index.cjs +0 -9
- package/dist/_node_modules/bail/index.cjs.map +0 -1
- package/dist/_node_modules/bail/index.js +0 -9
- package/dist/_node_modules/bail/index.js.map +0 -1
- package/dist/_node_modules/bcp-47-match/index.cjs +0 -74
- package/dist/_node_modules/bcp-47-match/index.cjs.map +0 -1
- package/dist/_node_modules/bcp-47-match/index.js +0 -74
- package/dist/_node_modules/bcp-47-match/index.js.map +0 -1
- package/dist/_node_modules/boolbase/index.cjs +0 -13
- package/dist/_node_modules/boolbase/index.cjs.map +0 -1
- package/dist/_node_modules/boolbase/index.js +0 -14
- package/dist/_node_modules/boolbase/index.js.map +0 -1
- package/dist/_node_modules/ccount/index.cjs +0 -17
- package/dist/_node_modules/ccount/index.cjs.map +0 -1
- package/dist/_node_modules/ccount/index.js +0 -17
- package/dist/_node_modules/ccount/index.js.map +0 -1
- package/dist/_node_modules/character-entities/index.cjs +0 -2131
- package/dist/_node_modules/character-entities/index.cjs.map +0 -1
- package/dist/_node_modules/character-entities/index.js +0 -2131
- package/dist/_node_modules/character-entities/index.js.map +0 -1
- package/dist/_node_modules/character-entities-html4/index.cjs +0 -258
- package/dist/_node_modules/character-entities-html4/index.cjs.map +0 -1
- package/dist/_node_modules/character-entities-html4/index.js +0 -258
- package/dist/_node_modules/character-entities-html4/index.js.map +0 -1
- package/dist/_node_modules/character-entities-legacy/index.cjs +0 -112
- package/dist/_node_modules/character-entities-legacy/index.cjs.map +0 -1
- package/dist/_node_modules/character-entities-legacy/index.js +0 -112
- package/dist/_node_modules/character-entities-legacy/index.js.map +0 -1
- package/dist/_node_modules/comma-separated-tokens/index.cjs +0 -32
- package/dist/_node_modules/comma-separated-tokens/index.cjs.map +0 -1
- package/dist/_node_modules/comma-separated-tokens/index.js +0 -32
- package/dist/_node_modules/comma-separated-tokens/index.js.map +0 -1
- package/dist/_node_modules/devlop/lib/default.cjs +0 -6
- package/dist/_node_modules/devlop/lib/default.cjs.map +0 -1
- package/dist/_node_modules/devlop/lib/default.js +0 -6
- package/dist/_node_modules/devlop/lib/default.js.map +0 -1
- package/dist/_node_modules/direction/index.cjs +0 -12
- package/dist/_node_modules/direction/index.cjs.map +0 -1
- package/dist/_node_modules/direction/index.js +0 -12
- package/dist/_node_modules/direction/index.js.map +0 -1
- package/dist/_node_modules/extend/index.cjs +0 -89
- package/dist/_node_modules/extend/index.cjs.map +0 -1
- package/dist/_node_modules/extend/index.js +0 -90
- package/dist/_node_modules/extend/index.js.map +0 -1
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs +0 -14
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-embedded/lib/index.js +0 -14
- package/dist/_node_modules/hast-util-embedded/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs +0 -317
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/errors.js +0 -317
- package/dist/_node_modules/hast-util-from-html/lib/errors.js.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs +0 -96
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/index.js +0 -96
- package/dist/_node_modules/hast-util-from-html/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs +0 -187
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js +0 -187
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs +0 -9
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-has-property/lib/index.js +0 -9
- package/dist/_node_modules/hast-util-has-property/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs +0 -102
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-is-element/lib/index.js +0 -102
- package/dist/_node_modules/hast-util-is-element/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs +0 -40
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js +0 -40
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs +0 -67
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/attribute.js +0 -67
- package/dist/_node_modules/hast-util-select/lib/attribute.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs +0 -12
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/class-name.js +0 -12
- package/dist/_node_modules/hast-util-select/lib/class-name.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs +0 -79
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/enter-state.js +0 -79
- package/dist/_node_modules/hast-util-select/lib/enter-state.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/id.cjs +0 -7
- package/dist/_node_modules/hast-util-select/lib/id.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/id.js +0 -7
- package/dist/_node_modules/hast-util-select/lib/id.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/index.cjs +0 -38
- package/dist/_node_modules/hast-util-select/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/index.js +0 -38
- package/dist/_node_modules/hast-util-select/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/name.cjs +0 -7
- package/dist/_node_modules/hast-util-select/lib/name.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/name.js +0 -7
- package/dist/_node_modules/hast-util-select/lib/name.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/parse.cjs +0 -12
- package/dist/_node_modules/hast-util-select/lib/parse.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/parse.js +0 -12
- package/dist/_node_modules/hast-util-select/lib/parse.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs +0 -231
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/pseudo.js +0 -231
- package/dist/_node_modules/hast-util-select/lib/pseudo.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/test.cjs +0 -27
- package/dist/_node_modules/hast-util-select/lib/test.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/test.js +0 -27
- package/dist/_node_modules/hast-util-select/lib/test.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/walk.cjs +0 -132
- package/dist/_node_modules/hast-util-select/lib/walk.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/walk.js +0 -132
- package/dist/_node_modules/hast-util-select/lib/walk.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs +0 -137
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js +0 -137
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs +0 -26
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js +0 -26
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs +0 -8
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js +0 -8
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs +0 -14
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js +0 -14
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs +0 -62
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/index.js +0 -62
- package/dist/_node_modules/hast-util-to-html/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs +0 -92
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js +0 -92
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs +0 -11
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js +0 -11
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs +0 -52
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js +0 -52
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js.map +0 -1
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs +0 -24
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-string/lib/index.js +0 -24
- package/dist/_node_modules/hast-util-to-string/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs +0 -11
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-whitespace/lib/index.js +0 -11
- package/dist/_node_modules/hast-util-whitespace/lib/index.js.map +0 -1
- package/dist/_node_modules/hastscript/lib/create-h.cjs +0 -159
- package/dist/_node_modules/hastscript/lib/create-h.cjs.map +0 -1
- package/dist/_node_modules/hastscript/lib/create-h.js +0 -159
- package/dist/_node_modules/hastscript/lib/create-h.js.map +0 -1
- package/dist/_node_modules/hastscript/lib/index.cjs +0 -10
- package/dist/_node_modules/hastscript/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hastscript/lib/index.js +0 -10
- package/dist/_node_modules/hastscript/lib/index.js.map +0 -1
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs +0 -45
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.map +0 -1
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +0 -45
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js.map +0 -1
- package/dist/_node_modules/html-void-elements/index.cjs +0 -26
- package/dist/_node_modules/html-void-elements/index.cjs.map +0 -1
- package/dist/_node_modules/html-void-elements/index.js +0 -26
- package/dist/_node_modules/html-void-elements/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs +0 -720
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js +0 -720
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs +0 -116
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js +0 -116
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs +0 -42
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +0 -42
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs +0 -12
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js +0 -12
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs +0 -20
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +0 -20
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs +0 -17
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js +0 -17
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs +0 -60
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js +0 -60
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs +0 -19
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js +0 -19
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs +0 -65
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js +0 -65
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs +0 -27
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js +0 -27
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs +0 -15
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +0 -15
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs +0 -36
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js +0 -36
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs +0 -40
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js +0 -40
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs +0 -10
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js +0 -10
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs +0 -30
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js +0 -30
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs +0 -149
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js +0 -149
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs +0 -39
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-string/lib/index.js +0 -39
- package/dist/_node_modules/mdast-util-to-string/lib/index.js.map +0 -1
- package/dist/_node_modules/micromark/lib/constructs.cjs +0 -94
- package/dist/_node_modules/micromark/lib/constructs.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/constructs.js +0 -94
- package/dist/_node_modules/micromark/lib/constructs.js.map +0 -1
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs +0 -316
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/create-tokenizer.js +0 -316
- package/dist/_node_modules/micromark/lib/create-tokenizer.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/content.cjs +0 -58
- package/dist/_node_modules/micromark/lib/initialize/content.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/content.js +0 -58
- package/dist/_node_modules/micromark/lib/initialize/content.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/document.cjs +0 -212
- package/dist/_node_modules/micromark/lib/initialize/document.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/document.js +0 -212
- package/dist/_node_modules/micromark/lib/initialize/document.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs +0 -55
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/flow.js +0 -55
- package/dist/_node_modules/micromark/lib/initialize/flow.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/text.cjs +0 -143
- package/dist/_node_modules/micromark/lib/initialize/text.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/text.js +0 -143
- package/dist/_node_modules/micromark/lib/initialize/text.js.map +0 -1
- package/dist/_node_modules/micromark/lib/parse.cjs +0 -35
- package/dist/_node_modules/micromark/lib/parse.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/parse.js +0 -35
- package/dist/_node_modules/micromark/lib/parse.js.map +0 -1
- package/dist/_node_modules/micromark/lib/postprocess.cjs +0 -10
- package/dist/_node_modules/micromark/lib/postprocess.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/postprocess.js +0 -10
- package/dist/_node_modules/micromark/lib/postprocess.js.map +0 -1
- package/dist/_node_modules/micromark/lib/preprocess.cjs +0 -81
- package/dist/_node_modules/micromark/lib/preprocess.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/preprocess.js +0 -81
- package/dist/_node_modules/micromark/lib/preprocess.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs +0 -116
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js +0 -116
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs +0 -104
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js +0 -104
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs +0 -19
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js +0 -19
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs +0 -62
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js +0 -62
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs +0 -29
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js +0 -29
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs +0 -69
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js +0 -69
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs +0 -187
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js +0 -187
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs +0 -68
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js +0 -68
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs +0 -117
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js +0 -117
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs +0 -76
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js +0 -76
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs +0 -95
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js +0 -95
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs +0 -24
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js +0 -24
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs +0 -96
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js +0 -96
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs +0 -384
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js +0 -384
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs +0 -310
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js +0 -310
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs +0 -219
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js +0 -219
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs +0 -34
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js +0 -34
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs +0 -25
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js +0 -25
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs +0 -18
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js +0 -18
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs +0 -136
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js +0 -136
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs +0 -90
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js +0 -90
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs +0 -43
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js +0 -43
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js.map +0 -1
- package/dist/_node_modules/micromark-factory-destination/index.cjs +0 -95
- package/dist/_node_modules/micromark-factory-destination/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-destination/index.js +0 -95
- package/dist/_node_modules/micromark-factory-destination/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-label/index.cjs +0 -64
- package/dist/_node_modules/micromark-factory-label/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-label/index.js +0 -64
- package/dist/_node_modules/micromark-factory-label/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-space/index.cjs +0 -25
- package/dist/_node_modules/micromark-factory-space/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-space/index.js +0 -25
- package/dist/_node_modules/micromark-factory-space/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-title/index.cjs +0 -66
- package/dist/_node_modules/micromark-factory-title/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-title/index.js +0 -66
- package/dist/_node_modules/micromark-factory-title/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs +0 -27
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-whitespace/index.js +0 -27
- package/dist/_node_modules/micromark-factory-whitespace/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-character/index.cjs +0 -45
- package/dist/_node_modules/micromark-util-character/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-character/index.js +0 -45
- package/dist/_node_modules/micromark-util-character/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-chunked/index.cjs +0 -37
- package/dist/_node_modules/micromark-util-chunked/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-chunked/index.js +0 -37
- package/dist/_node_modules/micromark-util-chunked/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-classify-character/index.cjs +0 -13
- package/dist/_node_modules/micromark-util-classify-character/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-classify-character/index.js +0 -13
- package/dist/_node_modules/micromark-util-classify-character/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs +0 -42
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-combine-extensions/index.js +0 -42
- package/dist/_node_modules/micromark-util-combine-extensions/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs +0 -20
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js +0 -20
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-decode-string/index.cjs +0 -22
- package/dist/_node_modules/micromark-util-decode-string/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-decode-string/index.js +0 -22
- package/dist/_node_modules/micromark-util-decode-string/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs +0 -70
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-html-tag-name/index.js +0 -70
- package/dist/_node_modules/micromark-util-html-tag-name/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs +0 -7
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js +0 -7
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs +0 -16
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-resolve-all/index.js +0 -16
- package/dist/_node_modules/micromark-util-resolve-all/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs +0 -42
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js +0 -42
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs +0 -149
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/index.js +0 -149
- package/dist/_node_modules/micromark-util-subtokenize/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs +0 -195
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js +0 -195
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs +0 -20
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/compile.js +0 -20
- package/dist/_node_modules/nth-check/lib/esm/compile.js.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/index.cjs +0 -11
- package/dist/_node_modules/nth-check/lib/esm/index.cjs.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/index.js +0 -11
- package/dist/_node_modules/nth-check/lib/esm/index.js.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs +0 -59
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/parse.js +0 -59
- package/dist/_node_modules/nth-check/lib/esm/parse.js.map +0 -1
- package/dist/_node_modules/property-information/index.cjs +0 -14
- package/dist/_node_modules/property-information/index.cjs.map +0 -1
- package/dist/_node_modules/property-information/index.js +0 -14
- package/dist/_node_modules/property-information/index.js.map +0 -1
- package/dist/_node_modules/property-information/lib/aria.cjs +0 -62
- package/dist/_node_modules/property-information/lib/aria.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/aria.js +0 -62
- package/dist/_node_modules/property-information/lib/aria.js.map +0 -1
- package/dist/_node_modules/property-information/lib/find.cjs +0 -41
- package/dist/_node_modules/property-information/lib/find.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/find.js +0 -41
- package/dist/_node_modules/property-information/lib/find.js.map +0 -1
- package/dist/_node_modules/property-information/lib/html.cjs +0 -369
- package/dist/_node_modules/property-information/lib/html.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/html.js +0 -369
- package/dist/_node_modules/property-information/lib/html.js.map +0 -1
- package/dist/_node_modules/property-information/lib/normalize.cjs +0 -7
- package/dist/_node_modules/property-information/lib/normalize.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/normalize.js +0 -7
- package/dist/_node_modules/property-information/lib/normalize.js.map +0 -1
- package/dist/_node_modules/property-information/lib/svg.cjs +0 -567
- package/dist/_node_modules/property-information/lib/svg.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/svg.js +0 -567
- package/dist/_node_modules/property-information/lib/svg.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs +0 -8
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js +0 -8
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs +0 -7
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js +0 -7
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/create.cjs +0 -31
- package/dist/_node_modules/property-information/lib/util/create.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/create.js +0 -31
- package/dist/_node_modules/property-information/lib/util/create.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs +0 -33
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/defined-info.js +0 -33
- package/dist/_node_modules/property-information/lib/util/defined-info.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/info.cjs +0 -25
- package/dist/_node_modules/property-information/lib/util/info.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/info.js +0 -25
- package/dist/_node_modules/property-information/lib/util/info.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/merge.cjs +0 -15
- package/dist/_node_modules/property-information/lib/util/merge.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/merge.js +0 -15
- package/dist/_node_modules/property-information/lib/util/merge.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/schema.cjs +0 -22
- package/dist/_node_modules/property-information/lib/util/schema.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/schema.js +0 -22
- package/dist/_node_modules/property-information/lib/util/schema.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/types.cjs +0 -21
- package/dist/_node_modules/property-information/lib/util/types.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/types.js +0 -21
- package/dist/_node_modules/property-information/lib/util/types.js.map +0 -1
- package/dist/_node_modules/property-information/lib/xlink.cjs +0 -20
- package/dist/_node_modules/property-information/lib/xlink.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/xlink.js +0 -20
- package/dist/_node_modules/property-information/lib/xlink.js.map +0 -1
- package/dist/_node_modules/property-information/lib/xml.cjs +0 -12
- package/dist/_node_modules/property-information/lib/xml.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/xml.js +0 -12
- package/dist/_node_modules/property-information/lib/xml.js.map +0 -1
- package/dist/_node_modules/property-information/lib/xmlns.cjs +0 -12
- package/dist/_node_modules/property-information/lib/xmlns.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/xmlns.js +0 -12
- package/dist/_node_modules/property-information/lib/xmlns.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs +0 -122
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js +0 -122
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs +0 -11
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js +0 -11
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs +0 -169
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js +0 -170
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs +0 -24
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js +0 -24
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js.map +0 -1
- package/dist/_node_modules/rehype-parse/lib/index.cjs +0 -21
- package/dist/_node_modules/rehype-parse/lib/index.cjs.map +0 -1
- package/dist/_node_modules/rehype-parse/lib/index.js +0 -22
- package/dist/_node_modules/rehype-parse/lib/index.js.map +0 -1
- package/dist/_node_modules/remark-parse/lib/index.cjs +0 -19
- package/dist/_node_modules/remark-parse/lib/index.cjs.map +0 -1
- package/dist/_node_modules/remark-parse/lib/index.js +0 -20
- package/dist/_node_modules/remark-parse/lib/index.js.map +0 -1
- package/dist/_node_modules/remark-rehype/lib/index.cjs +0 -21
- package/dist/_node_modules/remark-rehype/lib/index.cjs.map +0 -1
- package/dist/_node_modules/remark-rehype/lib/index.js +0 -22
- package/dist/_node_modules/remark-rehype/lib/index.js.map +0 -1
- package/dist/_node_modules/space-separated-tokens/index.cjs +0 -12
- package/dist/_node_modules/space-separated-tokens/index.cjs.map +0 -1
- package/dist/_node_modules/space-separated-tokens/index.js +0 -12
- package/dist/_node_modules/space-separated-tokens/index.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs +0 -14
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js +0 -14
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/core.cjs +0 -52
- package/dist/_node_modules/stringify-entities/lib/core.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/core.js +0 -52
- package/dist/_node_modules/stringify-entities/lib/core.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/index.cjs +0 -9
- package/dist/_node_modules/stringify-entities/lib/index.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/index.js +0 -9
- package/dist/_node_modules/stringify-entities/lib/index.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs +0 -26
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js +0 -26
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs +0 -28
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js +0 -28
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js.map +0 -1
- package/dist/_node_modules/trim-lines/index.cjs +0 -42
- package/dist/_node_modules/trim-lines/index.cjs.map +0 -1
- package/dist/_node_modules/trim-lines/index.js +0 -42
- package/dist/_node_modules/trim-lines/index.js.map +0 -1
- package/dist/_node_modules/trough/lib/index.cjs +0 -87
- package/dist/_node_modules/trough/lib/index.cjs.map +0 -1
- package/dist/_node_modules/trough/lib/index.js +0 -87
- package/dist/_node_modules/trough/lib/index.js.map +0 -1
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs +0 -10
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs.map +0 -1
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js +0 -11
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js.map +0 -1
- package/dist/_node_modules/unified/lib/callable-instance.cjs +0 -31
- package/dist/_node_modules/unified/lib/callable-instance.cjs.map +0 -1
- package/dist/_node_modules/unified/lib/callable-instance.js +0 -31
- package/dist/_node_modules/unified/lib/callable-instance.js.map +0 -1
- package/dist/_node_modules/unified/lib/index.cjs +0 -637
- package/dist/_node_modules/unified/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unified/lib/index.js +0 -637
- package/dist/_node_modules/unified/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-is/lib/index.cjs +0 -94
- package/dist/_node_modules/unist-util-is/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-is/lib/index.js +0 -94
- package/dist/_node_modules/unist-util-is/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-position/lib/index.cjs +0 -28
- package/dist/_node_modules/unist-util-position/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-position/lib/index.js +0 -28
- package/dist/_node_modules/unist-util-position/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-remove/lib/index.cjs +0 -39
- package/dist/_node_modules/unist-util-remove/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-remove/lib/index.js +0 -39
- package/dist/_node_modules/unist-util-remove/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs +0 -28
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js +0 -28
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-visit/lib/index.cjs +0 -28
- package/dist/_node_modules/unist-util-visit/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-visit/lib/index.js +0 -29
- package/dist/_node_modules/unist-util-visit/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs +0 -7
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js +0 -7
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs +0 -84
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js +0 -84
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js.map +0 -1
- package/dist/_node_modules/vfile/lib/index.cjs +0 -463
- package/dist/_node_modules/vfile/lib/index.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/index.js +0 -463
- package/dist/_node_modules/vfile/lib/index.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs +0 -215
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minpath.browser.js +0 -215
- package/dist/_node_modules/vfile/lib/minpath.browser.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs +0 -8
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minproc.browser.js +0 -8
- package/dist/_node_modules/vfile/lib/minproc.browser.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs +0 -47
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.browser.js +0 -47
- package/dist/_node_modules/vfile/lib/minurl.browser.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs +0 -10
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.shared.js +0 -10
- package/dist/_node_modules/vfile/lib/minurl.shared.js.map +0 -1
- package/dist/_node_modules/vfile-location/lib/index.cjs +0 -50
- package/dist/_node_modules/vfile-location/lib/index.cjs.map +0 -1
- package/dist/_node_modules/vfile-location/lib/index.js +0 -50
- package/dist/_node_modules/vfile-location/lib/index.js.map +0 -1
- package/dist/_node_modules/vfile-message/lib/index.cjs +0 -139
- package/dist/_node_modules/vfile-message/lib/index.cjs.map +0 -1
- package/dist/_node_modules/vfile-message/lib/index.js +0 -139
- package/dist/_node_modules/vfile-message/lib/index.js.map +0 -1
- package/dist/_node_modules/web-namespaces/index.cjs +0 -12
- package/dist/_node_modules/web-namespaces/index.cjs.map +0 -1
- package/dist/_node_modules/web-namespaces/index.js +0 -12
- package/dist/_node_modules/web-namespaces/index.js.map +0 -1
- package/dist/_node_modules/zwitch/index.cjs +0 -23
- package/dist/_node_modules/zwitch/index.cjs.map +0 -1
- package/dist/_node_modules/zwitch/index.js +0 -23
- package/dist/_node_modules/zwitch/index.js.map +0 -1
- package/dist/_virtual/_commonjsHelpers.cjs +0 -7
- package/dist/_virtual/_commonjsHelpers.cjs.map +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -7
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/index.cjs +0 -9
- package/dist/_virtual/index.cjs.map +0 -1
- package/dist/_virtual/index.js +0 -9
- package/dist/_virtual/index.js.map +0 -1
- package/dist/errors/PrismicRichTextError.cjs +0 -6
- package/dist/errors/PrismicRichTextError.cjs.map +0 -1
- package/dist/errors/PrismicRichTextError.d.ts +0 -2
- package/dist/errors/PrismicRichTextError.js +0 -6
- package/dist/errors/PrismicRichTextError.js.map +0 -1
- package/dist/errors/PrismicRichTextSerializerError.cjs +0 -7
- package/dist/errors/PrismicRichTextSerializerError.cjs.map +0 -1
- package/dist/errors/PrismicRichTextSerializerError.d.ts +0 -3
- package/dist/errors/PrismicRichTextSerializerError.js +0 -7
- package/dist/errors/PrismicRichTextSerializerError.js.map +0 -1
- package/dist/helpers/unstable_htmlAsRichText.cjs +0 -11
- package/dist/helpers/unstable_htmlAsRichText.cjs.map +0 -1
- package/dist/helpers/unstable_htmlAsRichText.d.ts +0 -81
- package/dist/helpers/unstable_htmlAsRichText.js +0 -11
- package/dist/helpers/unstable_htmlAsRichText.js.map +0 -1
- package/dist/helpers/unstable_markdownAsRichText.cjs +0 -12
- package/dist/helpers/unstable_markdownAsRichText.cjs.map +0 -1
- package/dist/helpers/unstable_markdownAsRichText.d.ts +0 -30
- package/dist/helpers/unstable_markdownAsRichText.js +0 -12
- package/dist/helpers/unstable_markdownAsRichText.js.map +0 -1
- package/dist/lib/RichTextFieldBuilder.cjs +0 -115
- package/dist/lib/RichTextFieldBuilder.cjs.map +0 -1
- package/dist/lib/RichTextFieldBuilder.d.ts +0 -35
- package/dist/lib/RichTextFieldBuilder.js +0 -115
- package/dist/lib/RichTextFieldBuilder.js.map +0 -1
- package/dist/lib/filterRichTextField.cjs +0 -88
- package/dist/lib/filterRichTextField.cjs.map +0 -1
- package/dist/lib/filterRichTextField.d.ts +0 -12
- package/dist/lib/filterRichTextField.js +0 -88
- package/dist/lib/filterRichTextField.js.map +0 -1
- package/dist/lib/hastSerializerHelpers.cjs +0 -96
- package/dist/lib/hastSerializerHelpers.cjs.map +0 -1
- package/dist/lib/hastSerializerHelpers.d.ts +0 -28
- package/dist/lib/hastSerializerHelpers.js +0 -96
- package/dist/lib/hastSerializerHelpers.js.map +0 -1
- package/dist/lib/hastToRichText.cjs +0 -164
- package/dist/lib/hastToRichText.cjs.map +0 -1
- package/dist/lib/hastToRichText.d.ts +0 -30
- package/dist/lib/hastToRichText.js +0 -164
- package/dist/lib/hastToRichText.js.map +0 -1
- package/dist/lib/rehypeRichText.cjs +0 -60
- package/dist/lib/rehypeRichText.cjs.map +0 -1
- package/dist/lib/rehypeRichText.d.ts +0 -66
- package/dist/lib/rehypeRichText.js +0 -60
- package/dist/lib/rehypeRichText.js.map +0 -1
- package/src/errors/PrismicRichTextError.ts +0 -1
- package/src/errors/PrismicRichTextSerializerError.ts +0 -3
- package/src/helpers/unstable_htmlAsRichText.ts +0 -122
- package/src/helpers/unstable_markdownAsRichText.ts +0 -53
- package/src/lib/RichTextFieldBuilder.ts +0 -164
- package/src/lib/filterRichTextField.ts +0 -159
- package/src/lib/hastSerializerHelpers.ts +0 -157
- package/src/lib/hastToRichText.ts +0 -295
- package/src/lib/rehypeRichText.ts +0 -184
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const _default = require("../../devlop/lib/default.cjs");
|
|
4
|
-
const index$1 = require("../../property-information/index.cjs");
|
|
5
|
-
const index = require("../../web-namespaces/index.cjs");
|
|
6
|
-
const index$2 = require("../../hastscript/lib/index.cjs");
|
|
7
|
-
const find = require("../../property-information/lib/find.cjs");
|
|
8
|
-
const index$3 = require("../../vfile-location/lib/index.cjs");
|
|
9
|
-
const own = {}.hasOwnProperty;
|
|
10
|
-
const proto = Object.prototype;
|
|
11
|
-
function fromParse5(tree, options) {
|
|
12
|
-
const settings = options || {};
|
|
13
|
-
return one(
|
|
14
|
-
{
|
|
15
|
-
file: settings.file || void 0,
|
|
16
|
-
location: false,
|
|
17
|
-
schema: settings.space === "svg" ? index$1.svg : index$1.html,
|
|
18
|
-
verbose: settings.verbose || false
|
|
19
|
-
},
|
|
20
|
-
tree
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
function one(state, node) {
|
|
24
|
-
let result;
|
|
25
|
-
switch (node.nodeName) {
|
|
26
|
-
case "#comment": {
|
|
27
|
-
const reference = (
|
|
28
|
-
/** @type {P5Comment} */
|
|
29
|
-
node
|
|
30
|
-
);
|
|
31
|
-
result = { type: "comment", value: reference.data };
|
|
32
|
-
patch(state, reference, result);
|
|
33
|
-
return result;
|
|
34
|
-
}
|
|
35
|
-
case "#document":
|
|
36
|
-
case "#document-fragment": {
|
|
37
|
-
const reference = (
|
|
38
|
-
/** @type {P5Document | P5DocumentFragment} */
|
|
39
|
-
node
|
|
40
|
-
);
|
|
41
|
-
const quirksMode = "mode" in reference ? reference.mode === "quirks" || reference.mode === "limited-quirks" : false;
|
|
42
|
-
result = {
|
|
43
|
-
type: "root",
|
|
44
|
-
children: all(state, node.childNodes),
|
|
45
|
-
data: { quirksMode }
|
|
46
|
-
};
|
|
47
|
-
if (state.file && state.location) {
|
|
48
|
-
const doc = String(state.file);
|
|
49
|
-
const loc = index$3.location(doc);
|
|
50
|
-
const start = loc.toPoint(0);
|
|
51
|
-
const end = loc.toPoint(doc.length);
|
|
52
|
-
result.position = { start, end };
|
|
53
|
-
}
|
|
54
|
-
return result;
|
|
55
|
-
}
|
|
56
|
-
case "#documentType": {
|
|
57
|
-
const reference = (
|
|
58
|
-
/** @type {P5DocumentType} */
|
|
59
|
-
node
|
|
60
|
-
);
|
|
61
|
-
result = { type: "doctype" };
|
|
62
|
-
patch(state, reference, result);
|
|
63
|
-
return result;
|
|
64
|
-
}
|
|
65
|
-
case "#text": {
|
|
66
|
-
const reference = (
|
|
67
|
-
/** @type {P5Text} */
|
|
68
|
-
node
|
|
69
|
-
);
|
|
70
|
-
result = { type: "text", value: reference.value };
|
|
71
|
-
patch(state, reference, result);
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
default: {
|
|
75
|
-
const reference = (
|
|
76
|
-
/** @type {P5Element} */
|
|
77
|
-
node
|
|
78
|
-
);
|
|
79
|
-
result = element(state, reference);
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function all(state, nodes) {
|
|
85
|
-
let index2 = -1;
|
|
86
|
-
const results = [];
|
|
87
|
-
while (++index2 < nodes.length) {
|
|
88
|
-
const result = (
|
|
89
|
-
/** @type {RootContent} */
|
|
90
|
-
one(state, nodes[index2])
|
|
91
|
-
);
|
|
92
|
-
results.push(result);
|
|
93
|
-
}
|
|
94
|
-
return results;
|
|
95
|
-
}
|
|
96
|
-
function element(state, node) {
|
|
97
|
-
const schema = state.schema;
|
|
98
|
-
state.schema = node.namespaceURI === index.webNamespaces.svg ? index$1.svg : index$1.html;
|
|
99
|
-
let index$32 = -1;
|
|
100
|
-
const props = {};
|
|
101
|
-
while (++index$32 < node.attrs.length) {
|
|
102
|
-
const attribute = node.attrs[index$32];
|
|
103
|
-
const name = (attribute.prefix ? attribute.prefix + ":" : "") + attribute.name;
|
|
104
|
-
if (!own.call(proto, name)) {
|
|
105
|
-
props[name] = attribute.value;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
const fn = state.schema.space === "svg" ? index$2.s : index$2.h;
|
|
109
|
-
const result = fn(node.tagName, props, all(state, node.childNodes));
|
|
110
|
-
patch(state, node, result);
|
|
111
|
-
if (result.tagName === "template") {
|
|
112
|
-
const reference = (
|
|
113
|
-
/** @type {P5Template} */
|
|
114
|
-
node
|
|
115
|
-
);
|
|
116
|
-
const pos = reference.sourceCodeLocation;
|
|
117
|
-
const startTag = pos && pos.startTag && position(pos.startTag);
|
|
118
|
-
const endTag = pos && pos.endTag && position(pos.endTag);
|
|
119
|
-
const content = (
|
|
120
|
-
/** @type {Root} */
|
|
121
|
-
one(state, reference.content)
|
|
122
|
-
);
|
|
123
|
-
if (startTag && endTag && state.file) {
|
|
124
|
-
content.position = { start: startTag.end, end: endTag.start };
|
|
125
|
-
}
|
|
126
|
-
result.content = content;
|
|
127
|
-
}
|
|
128
|
-
state.schema = schema;
|
|
129
|
-
return result;
|
|
130
|
-
}
|
|
131
|
-
function patch(state, from, to) {
|
|
132
|
-
if ("sourceCodeLocation" in from && from.sourceCodeLocation && state.file) {
|
|
133
|
-
const position2 = createLocation(state, to, from.sourceCodeLocation);
|
|
134
|
-
if (position2) {
|
|
135
|
-
state.location = true;
|
|
136
|
-
to.position = position2;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
function createLocation(state, node, location) {
|
|
141
|
-
const result = position(location);
|
|
142
|
-
if (node.type === "element") {
|
|
143
|
-
const tail = node.children[node.children.length - 1];
|
|
144
|
-
if (result && !location.endTag && tail && tail.position && tail.position.end) {
|
|
145
|
-
result.end = Object.assign({}, tail.position.end);
|
|
146
|
-
}
|
|
147
|
-
if (state.verbose) {
|
|
148
|
-
const props = {};
|
|
149
|
-
let key;
|
|
150
|
-
if (location.attrs) {
|
|
151
|
-
for (key in location.attrs) {
|
|
152
|
-
if (own.call(location.attrs, key)) {
|
|
153
|
-
props[find.find(state.schema, key).property] = position(
|
|
154
|
-
location.attrs[key]
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
_default.ok(location.startTag);
|
|
160
|
-
const opening = position(location.startTag);
|
|
161
|
-
const closing = location.endTag ? position(location.endTag) : void 0;
|
|
162
|
-
const data = { opening };
|
|
163
|
-
if (closing) data.closing = closing;
|
|
164
|
-
data.properties = props;
|
|
165
|
-
node.data = { position: data };
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return result;
|
|
169
|
-
}
|
|
170
|
-
function position(loc) {
|
|
171
|
-
const start = point({
|
|
172
|
-
line: loc.startLine,
|
|
173
|
-
column: loc.startCol,
|
|
174
|
-
offset: loc.startOffset
|
|
175
|
-
});
|
|
176
|
-
const end = point({
|
|
177
|
-
line: loc.endLine,
|
|
178
|
-
column: loc.endCol,
|
|
179
|
-
offset: loc.endOffset
|
|
180
|
-
});
|
|
181
|
-
return start || end ? { start, end } : void 0;
|
|
182
|
-
}
|
|
183
|
-
function point(point2) {
|
|
184
|
-
return point2.line && point2.column ? point2 : void 0;
|
|
185
|
-
}
|
|
186
|
-
exports.fromParse5 = fromParse5;
|
|
187
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../node_modules/hast-util-from-parse5/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementData} ElementData\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').RootContent} RootContent\n *\n * @typedef {import('parse5').DefaultTreeAdapterMap} DefaultTreeAdapterMap\n * @typedef {import('parse5').Token.ElementLocation} P5ElementLocation\n * @typedef {import('parse5').Token.Location} P5Location\n *\n * @typedef {import('property-information').Schema} Schema\n *\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n *\n * @typedef {import('vfile').VFile} VFile\n */\n\n/**\n * @typedef {DefaultTreeAdapterMap['document']} P5Document\n * @typedef {DefaultTreeAdapterMap['documentFragment']} P5DocumentFragment\n * @typedef {DefaultTreeAdapterMap['documentType']} P5DocumentType\n * @typedef {DefaultTreeAdapterMap['commentNode']} P5Comment\n * @typedef {DefaultTreeAdapterMap['textNode']} P5Text\n * @typedef {DefaultTreeAdapterMap['element']} P5Element\n * @typedef {DefaultTreeAdapterMap['node']} P5Node\n * @typedef {DefaultTreeAdapterMap['template']} P5Template\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in (default: `'html'`).\n *\n * When an `<svg>` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n * @property {VFile | null | undefined} [file]\n * File used to add positional info to nodes (optional).\n *\n * If given, the file should represent the original HTML source.\n * @property {boolean | null | undefined} [verbose=false]\n * Whether to add extra positional info about starting tags, closing tags,\n * and attributes to elements (default: `false`).\n *\n * > 👉 **Note**: only used when `file` is given.\n *\n * @typedef {'html' | 'svg'} Space\n * Namespace.\n *\n * @typedef State\n * Info passed around about the current state.\n * @property {VFile | undefined} file\n * Corresponding file.\n * @property {boolean} location\n * Whether location info was found.\n * @property {Schema} schema\n * Current schema.\n * @property {boolean | undefined} verbose\n * Add extra positional info.\n */\n\nimport {ok as assert} from 'devlop'\nimport {h, s} from 'hastscript'\nimport {find, html, svg} from 'property-information'\nimport {location} from 'vfile-location'\nimport {webNamespaces} from 'web-namespaces'\n\nconst own = {}.hasOwnProperty\n/** @type {unknown} */\n// type-coverage:ignore-next-line\nconst proto = Object.prototype\n\n/**\n * Transform a `parse5` AST to hast.\n *\n * @param {P5Node} tree\n * `parse5` tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Nodes}\n * hast tree.\n */\nexport function fromParse5(tree, options) {\n const settings = options || {}\n\n return one(\n {\n file: settings.file || undefined,\n location: false,\n schema: settings.space === 'svg' ? svg : html,\n verbose: settings.verbose || false\n },\n tree\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} node\n * p5 node.\n * @returns {Nodes}\n * hast node.\n */\nfunction one(state, node) {\n /** @type {Nodes} */\n let result\n\n switch (node.nodeName) {\n case '#comment': {\n const reference = /** @type {P5Comment} */ (node)\n result = {type: 'comment', value: reference.data}\n patch(state, reference, result)\n return result\n }\n\n case '#document':\n case '#document-fragment': {\n const reference = /** @type {P5Document | P5DocumentFragment} */ (node)\n const quirksMode =\n 'mode' in reference\n ? reference.mode === 'quirks' || reference.mode === 'limited-quirks'\n : false\n\n result = {\n type: 'root',\n children: all(state, node.childNodes),\n data: {quirksMode}\n }\n\n if (state.file && state.location) {\n const doc = String(state.file)\n const loc = location(doc)\n const start = loc.toPoint(0)\n const end = loc.toPoint(doc.length)\n // Always defined as we give valid input.\n assert(start, 'expected `start`')\n assert(end, 'expected `end`')\n result.position = {start, end}\n }\n\n return result\n }\n\n case '#documentType': {\n const reference = /** @type {P5DocumentType} */ (node)\n result = {type: 'doctype'}\n patch(state, reference, result)\n return result\n }\n\n case '#text': {\n const reference = /** @type {P5Text} */ (node)\n result = {type: 'text', value: reference.value}\n patch(state, reference, result)\n return result\n }\n\n // Element.\n default: {\n const reference = /** @type {P5Element} */ (node)\n result = element(state, reference)\n return result\n }\n }\n}\n\n/**\n * Transform children.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Array<P5Node>} nodes\n * Nodes.\n * @returns {Array<RootContent>}\n * hast nodes.\n */\nfunction all(state, nodes) {\n let index = -1\n /** @type {Array<RootContent>} */\n const results = []\n\n while (++index < nodes.length) {\n // Assume no roots in `nodes`.\n const result = /** @type {RootContent} */ (one(state, nodes[index]))\n results.push(result)\n }\n\n return results\n}\n\n/**\n * Transform an element.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Element} node\n * `parse5` node to transform.\n * @returns {Element}\n * hast node.\n */\nfunction element(state, node) {\n const schema = state.schema\n\n state.schema = node.namespaceURI === webNamespaces.svg ? svg : html\n\n // Props.\n let index = -1\n /** @type {Record<string, string>} */\n const props = {}\n\n while (++index < node.attrs.length) {\n const attribute = node.attrs[index]\n const name =\n (attribute.prefix ? attribute.prefix + ':' : '') + attribute.name\n if (!own.call(proto, name)) {\n props[name] = attribute.value\n }\n }\n\n // Build.\n const fn = state.schema.space === 'svg' ? s : h\n const result = fn(node.tagName, props, all(state, node.childNodes))\n patch(state, node, result)\n\n // Switch content.\n if (result.tagName === 'template') {\n const reference = /** @type {P5Template} */ (node)\n const pos = reference.sourceCodeLocation\n const startTag = pos && pos.startTag && position(pos.startTag)\n const endTag = pos && pos.endTag && position(pos.endTag)\n\n // Root in, root out.\n const content = /** @type {Root} */ (one(state, reference.content))\n\n if (startTag && endTag && state.file) {\n content.position = {start: startTag.end, end: endTag.start}\n }\n\n result.content = content\n }\n\n state.schema = schema\n\n return result\n}\n\n/**\n * Patch positional info from `from` onto `to`.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} from\n * p5 node.\n * @param {Nodes} to\n * hast node.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(state, from, to) {\n if ('sourceCodeLocation' in from && from.sourceCodeLocation && state.file) {\n const position = createLocation(state, to, from.sourceCodeLocation)\n\n if (position) {\n state.location = true\n to.position = position\n }\n }\n}\n\n/**\n * Create clean positional information.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Nodes} node\n * hast node.\n * @param {P5ElementLocation} location\n * p5 location info.\n * @returns {Position | undefined}\n * Position, or nothing.\n */\nfunction createLocation(state, node, location) {\n const result = position(location)\n\n if (node.type === 'element') {\n const tail = node.children[node.children.length - 1]\n\n // Bug for unclosed with children.\n // See: <https://github.com/inikulin/parse5/issues/109>.\n if (\n result &&\n !location.endTag &&\n tail &&\n tail.position &&\n tail.position.end\n ) {\n result.end = Object.assign({}, tail.position.end)\n }\n\n if (state.verbose) {\n /** @type {Record<string, Position | undefined>} */\n const props = {}\n /** @type {string} */\n let key\n\n if (location.attrs) {\n for (key in location.attrs) {\n if (own.call(location.attrs, key)) {\n props[find(state.schema, key).property] = position(\n location.attrs[key]\n )\n }\n }\n }\n\n assert(location.startTag, 'a start tag should exist')\n const opening = position(location.startTag)\n const closing = location.endTag ? position(location.endTag) : undefined\n /** @type {ElementData['position']} */\n const data = {opening}\n if (closing) data.closing = closing\n data.properties = props\n\n node.data = {position: data}\n }\n }\n\n return result\n}\n\n/**\n * Turn a p5 location into a position.\n *\n * @param {P5Location} loc\n * Location.\n * @returns {Position | undefined}\n * Position or nothing.\n */\nfunction position(loc) {\n const start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n })\n const end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n })\n\n // @ts-expect-error: we do use `undefined` for points if one or the other\n // exists.\n return start || end ? {start, end} : undefined\n}\n\n/**\n * Filter out invalid points.\n *\n * @param {Point} point\n * Point with potentially `undefined` values.\n * @returns {Point | undefined}\n * Point or nothing.\n */\nfunction point(point) {\n return point.line && point.column ? point : undefined\n}\n"],"names":["svg","html","location","index","webNamespaces","s","h","position","find","assert","point"],"mappings":";;;;;;;;AAsEA,MAAM,MAAM,CAAE,EAAC;AAGf,MAAM,QAA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AAM,OAAO,EAAC,QAAO;AACrB,UAAI,QAAS,MAAK,UAAU;AAC5B,WAAK,aAAa;AAElB,WAAK,OAAO,EAAC,UAAU,KAAI;AAAA,IAC5B;AAAA,EACF;AAED,SAAO;AACT;AAUA,SAAS,SAAS,KAAK;AACrB,QAAM,QAAQ,MAAM;AAAA,IAClB,MAAM,IAAI;AAAA,IACV,QAAQ,IAAI;AAAA,IACZ,QAAQ,IAAI;AAAA,EAChB,CAAG;AACD,QAAM,MAAM,MAAM;AAAA,IAChB,MAAM,IAAI;AAAA,IACV,QAAQ,IAAI;AAAA,IACZ,QAAQ,IAAI;AAAA,EAChB,CAAG;AAID,SAAO,SAAS,MAAM,EAAC,OAAO,IAAG,IAAI;AACvC;AAUA,SAAS,MAAMC,QAAO;AACpB,SAAOA,OAAM,QAAQA,OAAM,SAASA,SAAQ;AAC9C;;","x_google_ignoreList":[0]}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { ok } from "../../devlop/lib/default.js";
|
|
2
|
-
import { svg, html } from "../../property-information/index.js";
|
|
3
|
-
import { webNamespaces } from "../../web-namespaces/index.js";
|
|
4
|
-
import { s, h } from "../../hastscript/lib/index.js";
|
|
5
|
-
import { find } from "../../property-information/lib/find.js";
|
|
6
|
-
import { location } from "../../vfile-location/lib/index.js";
|
|
7
|
-
const own = {}.hasOwnProperty;
|
|
8
|
-
const proto = Object.prototype;
|
|
9
|
-
function fromParse5(tree, options) {
|
|
10
|
-
const settings = options || {};
|
|
11
|
-
return one(
|
|
12
|
-
{
|
|
13
|
-
file: settings.file || void 0,
|
|
14
|
-
location: false,
|
|
15
|
-
schema: settings.space === "svg" ? svg : html,
|
|
16
|
-
verbose: settings.verbose || false
|
|
17
|
-
},
|
|
18
|
-
tree
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
function one(state, node) {
|
|
22
|
-
let result;
|
|
23
|
-
switch (node.nodeName) {
|
|
24
|
-
case "#comment": {
|
|
25
|
-
const reference = (
|
|
26
|
-
/** @type {P5Comment} */
|
|
27
|
-
node
|
|
28
|
-
);
|
|
29
|
-
result = { type: "comment", value: reference.data };
|
|
30
|
-
patch(state, reference, result);
|
|
31
|
-
return result;
|
|
32
|
-
}
|
|
33
|
-
case "#document":
|
|
34
|
-
case "#document-fragment": {
|
|
35
|
-
const reference = (
|
|
36
|
-
/** @type {P5Document | P5DocumentFragment} */
|
|
37
|
-
node
|
|
38
|
-
);
|
|
39
|
-
const quirksMode = "mode" in reference ? reference.mode === "quirks" || reference.mode === "limited-quirks" : false;
|
|
40
|
-
result = {
|
|
41
|
-
type: "root",
|
|
42
|
-
children: all(state, node.childNodes),
|
|
43
|
-
data: { quirksMode }
|
|
44
|
-
};
|
|
45
|
-
if (state.file && state.location) {
|
|
46
|
-
const doc = String(state.file);
|
|
47
|
-
const loc = location(doc);
|
|
48
|
-
const start = loc.toPoint(0);
|
|
49
|
-
const end = loc.toPoint(doc.length);
|
|
50
|
-
result.position = { start, end };
|
|
51
|
-
}
|
|
52
|
-
return result;
|
|
53
|
-
}
|
|
54
|
-
case "#documentType": {
|
|
55
|
-
const reference = (
|
|
56
|
-
/** @type {P5DocumentType} */
|
|
57
|
-
node
|
|
58
|
-
);
|
|
59
|
-
result = { type: "doctype" };
|
|
60
|
-
patch(state, reference, result);
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
case "#text": {
|
|
64
|
-
const reference = (
|
|
65
|
-
/** @type {P5Text} */
|
|
66
|
-
node
|
|
67
|
-
);
|
|
68
|
-
result = { type: "text", value: reference.value };
|
|
69
|
-
patch(state, reference, result);
|
|
70
|
-
return result;
|
|
71
|
-
}
|
|
72
|
-
default: {
|
|
73
|
-
const reference = (
|
|
74
|
-
/** @type {P5Element} */
|
|
75
|
-
node
|
|
76
|
-
);
|
|
77
|
-
result = element(state, reference);
|
|
78
|
-
return result;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function all(state, nodes) {
|
|
83
|
-
let index = -1;
|
|
84
|
-
const results = [];
|
|
85
|
-
while (++index < nodes.length) {
|
|
86
|
-
const result = (
|
|
87
|
-
/** @type {RootContent} */
|
|
88
|
-
one(state, nodes[index])
|
|
89
|
-
);
|
|
90
|
-
results.push(result);
|
|
91
|
-
}
|
|
92
|
-
return results;
|
|
93
|
-
}
|
|
94
|
-
function element(state, node) {
|
|
95
|
-
const schema = state.schema;
|
|
96
|
-
state.schema = node.namespaceURI === webNamespaces.svg ? svg : html;
|
|
97
|
-
let index = -1;
|
|
98
|
-
const props = {};
|
|
99
|
-
while (++index < node.attrs.length) {
|
|
100
|
-
const attribute = node.attrs[index];
|
|
101
|
-
const name = (attribute.prefix ? attribute.prefix + ":" : "") + attribute.name;
|
|
102
|
-
if (!own.call(proto, name)) {
|
|
103
|
-
props[name] = attribute.value;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
const fn = state.schema.space === "svg" ? s : h;
|
|
107
|
-
const result = fn(node.tagName, props, all(state, node.childNodes));
|
|
108
|
-
patch(state, node, result);
|
|
109
|
-
if (result.tagName === "template") {
|
|
110
|
-
const reference = (
|
|
111
|
-
/** @type {P5Template} */
|
|
112
|
-
node
|
|
113
|
-
);
|
|
114
|
-
const pos = reference.sourceCodeLocation;
|
|
115
|
-
const startTag = pos && pos.startTag && position(pos.startTag);
|
|
116
|
-
const endTag = pos && pos.endTag && position(pos.endTag);
|
|
117
|
-
const content = (
|
|
118
|
-
/** @type {Root} */
|
|
119
|
-
one(state, reference.content)
|
|
120
|
-
);
|
|
121
|
-
if (startTag && endTag && state.file) {
|
|
122
|
-
content.position = { start: startTag.end, end: endTag.start };
|
|
123
|
-
}
|
|
124
|
-
result.content = content;
|
|
125
|
-
}
|
|
126
|
-
state.schema = schema;
|
|
127
|
-
return result;
|
|
128
|
-
}
|
|
129
|
-
function patch(state, from, to) {
|
|
130
|
-
if ("sourceCodeLocation" in from && from.sourceCodeLocation && state.file) {
|
|
131
|
-
const position2 = createLocation(state, to, from.sourceCodeLocation);
|
|
132
|
-
if (position2) {
|
|
133
|
-
state.location = true;
|
|
134
|
-
to.position = position2;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
function createLocation(state, node, location2) {
|
|
139
|
-
const result = position(location2);
|
|
140
|
-
if (node.type === "element") {
|
|
141
|
-
const tail = node.children[node.children.length - 1];
|
|
142
|
-
if (result && !location2.endTag && tail && tail.position && tail.position.end) {
|
|
143
|
-
result.end = Object.assign({}, tail.position.end);
|
|
144
|
-
}
|
|
145
|
-
if (state.verbose) {
|
|
146
|
-
const props = {};
|
|
147
|
-
let key;
|
|
148
|
-
if (location2.attrs) {
|
|
149
|
-
for (key in location2.attrs) {
|
|
150
|
-
if (own.call(location2.attrs, key)) {
|
|
151
|
-
props[find(state.schema, key).property] = position(
|
|
152
|
-
location2.attrs[key]
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
ok(location2.startTag);
|
|
158
|
-
const opening = position(location2.startTag);
|
|
159
|
-
const closing = location2.endTag ? position(location2.endTag) : void 0;
|
|
160
|
-
const data = { opening };
|
|
161
|
-
if (closing) data.closing = closing;
|
|
162
|
-
data.properties = props;
|
|
163
|
-
node.data = { position: data };
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return result;
|
|
167
|
-
}
|
|
168
|
-
function position(loc) {
|
|
169
|
-
const start = point({
|
|
170
|
-
line: loc.startLine,
|
|
171
|
-
column: loc.startCol,
|
|
172
|
-
offset: loc.startOffset
|
|
173
|
-
});
|
|
174
|
-
const end = point({
|
|
175
|
-
line: loc.endLine,
|
|
176
|
-
column: loc.endCol,
|
|
177
|
-
offset: loc.endOffset
|
|
178
|
-
});
|
|
179
|
-
return start || end ? { start, end } : void 0;
|
|
180
|
-
}
|
|
181
|
-
function point(point2) {
|
|
182
|
-
return point2.line && point2.column ? point2 : void 0;
|
|
183
|
-
}
|
|
184
|
-
export {
|
|
185
|
-
fromParse5
|
|
186
|
-
};
|
|
187
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/hast-util-from-parse5/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementData} ElementData\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').RootContent} RootContent\n *\n * @typedef {import('parse5').DefaultTreeAdapterMap} DefaultTreeAdapterMap\n * @typedef {import('parse5').Token.ElementLocation} P5ElementLocation\n * @typedef {import('parse5').Token.Location} P5Location\n *\n * @typedef {import('property-information').Schema} Schema\n *\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n *\n * @typedef {import('vfile').VFile} VFile\n */\n\n/**\n * @typedef {DefaultTreeAdapterMap['document']} P5Document\n * @typedef {DefaultTreeAdapterMap['documentFragment']} P5DocumentFragment\n * @typedef {DefaultTreeAdapterMap['documentType']} P5DocumentType\n * @typedef {DefaultTreeAdapterMap['commentNode']} P5Comment\n * @typedef {DefaultTreeAdapterMap['textNode']} P5Text\n * @typedef {DefaultTreeAdapterMap['element']} P5Element\n * @typedef {DefaultTreeAdapterMap['node']} P5Node\n * @typedef {DefaultTreeAdapterMap['template']} P5Template\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in (default: `'html'`).\n *\n * When an `<svg>` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n * @property {VFile | null | undefined} [file]\n * File used to add positional info to nodes (optional).\n *\n * If given, the file should represent the original HTML source.\n * @property {boolean | null | undefined} [verbose=false]\n * Whether to add extra positional info about starting tags, closing tags,\n * and attributes to elements (default: `false`).\n *\n * > 👉 **Note**: only used when `file` is given.\n *\n * @typedef {'html' | 'svg'} Space\n * Namespace.\n *\n * @typedef State\n * Info passed around about the current state.\n * @property {VFile | undefined} file\n * Corresponding file.\n * @property {boolean} location\n * Whether location info was found.\n * @property {Schema} schema\n * Current schema.\n * @property {boolean | undefined} verbose\n * Add extra positional info.\n */\n\nimport {ok as assert} from 'devlop'\nimport {h, s} from 'hastscript'\nimport {find, html, svg} from 'property-information'\nimport {location} from 'vfile-location'\nimport {webNamespaces} from 'web-namespaces'\n\nconst own = {}.hasOwnProperty\n/** @type {unknown} */\n// type-coverage:ignore-next-line\nconst proto = Object.prototype\n\n/**\n * Transform a `parse5` AST to hast.\n *\n * @param {P5Node} tree\n * `parse5` tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Nodes}\n * hast tree.\n */\nexport function fromParse5(tree, options) {\n const settings = options || {}\n\n return one(\n {\n file: settings.file || undefined,\n location: false,\n schema: settings.space === 'svg' ? svg : html,\n verbose: settings.verbose || false\n },\n tree\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} node\n * p5 node.\n * @returns {Nodes}\n * hast node.\n */\nfunction one(state, node) {\n /** @type {Nodes} */\n let result\n\n switch (node.nodeName) {\n case '#comment': {\n const reference = /** @type {P5Comment} */ (node)\n result = {type: 'comment', value: reference.data}\n patch(state, reference, result)\n return result\n }\n\n case '#document':\n case '#document-fragment': {\n const reference = /** @type {P5Document | P5DocumentFragment} */ (node)\n const quirksMode =\n 'mode' in reference\n ? reference.mode === 'quirks' || reference.mode === 'limited-quirks'\n : false\n\n result = {\n type: 'root',\n children: all(state, node.childNodes),\n data: {quirksMode}\n }\n\n if (state.file && state.location) {\n const doc = String(state.file)\n const loc = location(doc)\n const start = loc.toPoint(0)\n const end = loc.toPoint(doc.length)\n // Always defined as we give valid input.\n assert(start, 'expected `start`')\n assert(end, 'expected `end`')\n result.position = {start, end}\n }\n\n return result\n }\n\n case '#documentType': {\n const reference = /** @type {P5DocumentType} */ (node)\n result = {type: 'doctype'}\n patch(state, reference, result)\n return result\n }\n\n case '#text': {\n const reference = /** @type {P5Text} */ (node)\n result = {type: 'text', value: reference.value}\n patch(state, reference, result)\n return result\n }\n\n // Element.\n default: {\n const reference = /** @type {P5Element} */ (node)\n result = element(state, reference)\n return result\n }\n }\n}\n\n/**\n * Transform children.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Array<P5Node>} nodes\n * Nodes.\n * @returns {Array<RootContent>}\n * hast nodes.\n */\nfunction all(state, nodes) {\n let index = -1\n /** @type {Array<RootContent>} */\n const results = []\n\n while (++index < nodes.length) {\n // Assume no roots in `nodes`.\n const result = /** @type {RootContent} */ (one(state, nodes[index]))\n results.push(result)\n }\n\n return results\n}\n\n/**\n * Transform an element.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Element} node\n * `parse5` node to transform.\n * @returns {Element}\n * hast node.\n */\nfunction element(state, node) {\n const schema = state.schema\n\n state.schema = node.namespaceURI === webNamespaces.svg ? svg : html\n\n // Props.\n let index = -1\n /** @type {Record<string, string>} */\n const props = {}\n\n while (++index < node.attrs.length) {\n const attribute = node.attrs[index]\n const name =\n (attribute.prefix ? attribute.prefix + ':' : '') + attribute.name\n if (!own.call(proto, name)) {\n props[name] = attribute.value\n }\n }\n\n // Build.\n const fn = state.schema.space === 'svg' ? s : h\n const result = fn(node.tagName, props, all(state, node.childNodes))\n patch(state, node, result)\n\n // Switch content.\n if (result.tagName === 'template') {\n const reference = /** @type {P5Template} */ (node)\n const pos = reference.sourceCodeLocation\n const startTag = pos && pos.startTag && position(pos.startTag)\n const endTag = pos && pos.endTag && position(pos.endTag)\n\n // Root in, root out.\n const content = /** @type {Root} */ (one(state, reference.content))\n\n if (startTag && endTag && state.file) {\n content.position = {start: startTag.end, end: endTag.start}\n }\n\n result.content = content\n }\n\n state.schema = schema\n\n return result\n}\n\n/**\n * Patch positional info from `from` onto `to`.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} from\n * p5 node.\n * @param {Nodes} to\n * hast node.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(state, from, to) {\n if ('sourceCodeLocation' in from && from.sourceCodeLocation && state.file) {\n const position = createLocation(state, to, from.sourceCodeLocation)\n\n if (position) {\n state.location = true\n to.position = position\n }\n }\n}\n\n/**\n * Create clean positional information.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Nodes} node\n * hast node.\n * @param {P5ElementLocation} location\n * p5 location info.\n * @returns {Position | undefined}\n * Position, or nothing.\n */\nfunction createLocation(state, node, location) {\n const result = position(location)\n\n if (node.type === 'element') {\n const tail = node.children[node.children.length - 1]\n\n // Bug for unclosed with children.\n // See: <https://github.com/inikulin/parse5/issues/109>.\n if (\n result &&\n !location.endTag &&\n tail &&\n tail.position &&\n tail.position.end\n ) {\n result.end = Object.assign({}, tail.position.end)\n }\n\n if (state.verbose) {\n /** @type {Record<string, Position | undefined>} */\n const props = {}\n /** @type {string} */\n let key\n\n if (location.attrs) {\n for (key in location.attrs) {\n if (own.call(location.attrs, key)) {\n props[find(state.schema, key).property] = position(\n location.attrs[key]\n )\n }\n }\n }\n\n assert(location.startTag, 'a start tag should exist')\n const opening = position(location.startTag)\n const closing = location.endTag ? position(location.endTag) : undefined\n /** @type {ElementData['position']} */\n const data = {opening}\n if (closing) data.closing = closing\n data.properties = props\n\n node.data = {position: data}\n }\n }\n\n return result\n}\n\n/**\n * Turn a p5 location into a position.\n *\n * @param {P5Location} loc\n * Location.\n * @returns {Position | undefined}\n * Position or nothing.\n */\nfunction position(loc) {\n const start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n })\n const end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n })\n\n // @ts-expect-error: we do use `undefined` for points if one or the other\n // exists.\n return start || end ? {start, end} : undefined\n}\n\n/**\n * Filter out invalid points.\n *\n * @param {Point} point\n * Point with potentially `undefined` values.\n * @returns {Point | undefined}\n * Point or nothing.\n */\nfunction point(point) {\n return point.line && point.column ? point : undefined\n}\n"],"names":["position","location","assert","point"],"mappings":";;;;;;AAsEA,MAAM,MAAM,CAA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U;AAC5B,WAAK,aAAa;AAElB,WAAK,OAAO,EAAC,UAAU,KAAI;AAAA,IAC5B;AAAA,EACF;AAED,SAAO;AACT;AAUA,SAAS,SAAS,KAAK;AACrB,QAAM,QAAQ,MAAM;AAAA,IAClB,MAAM,IAAI;AAAA,IACV,QAAQ,IAAI;AAAA,IACZ,QAAQ,IAAI;AAAA,EAChB,CAAG;AACD,QAAM,MAAM,MAAM;AAAA,IAChB,MAAM,IAAI;AAAA,IACV,QAAQ,IAAI;AAAA,IACZ,QAAQ,IAAI;AAAA,EAChB,CAAG;AAID,SAAO,SAAS,MAAM,EAAC,OAAO,IAAG,IAAI;AACvC;AAUA,SAAS,MAAME,QAAO;AACpB,SAAOA,OAAM,QAAQA,OAAM,SAASA,SAAQ;AAC9C;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const own = {}.hasOwnProperty;
|
|
4
|
-
function hasProperty(node, name) {
|
|
5
|
-
const value = node.type === "element" && own.call(node.properties, name) && node.properties[name];
|
|
6
|
-
return value !== null && value !== void 0 && value !== false;
|
|
7
|
-
}
|
|
8
|
-
exports.hasProperty = hasProperty;
|
|
9
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../node_modules/hast-util-has-property/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Nodes} Nodes\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Check if `node` is an element and has a `name` property.\n *\n * @template {string} Key\n * Type of key.\n * @param {Nodes} node\n * Node to check (typically `Element`).\n * @param {Key} name\n * Property name to check.\n * @returns {node is Element & {properties: Record<Key, Array<number | string> | number | string | true>}}}\n * Whether `node` is an element that has a `name` property.\n *\n * Note: see <https://github.com/DefinitelyTyped/DefinitelyTyped/blob/27c9274/types/hast/index.d.ts#L37C29-L37C98>.\n */\nexport function hasProperty(node, name) {\n const value =\n node.type === 'element' &&\n own.call(node.properties, name) &&\n node.properties[name]\n\n return value !== null && value !== undefined && value !== false\n}\n"],"names":[],"mappings":";;AAKA,MAAM,MAAM,CAAE,EAAC;AAgBR,SAAS,YAAY,MAAM,MAAM;AACtC,QAAM,QACJ,KAAK,SAAS,aACd,IAAI,KAAK,KAAK,YAAY,IAAI,KAC9B,KAAK,WAAW,IAAI;AAEtB,SAAO,UAAU,QAAQ,UAAU,UAAa,UAAU;AAC5D;;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const own = {}.hasOwnProperty;
|
|
2
|
-
function hasProperty(node, name) {
|
|
3
|
-
const value = node.type === "element" && own.call(node.properties, name) && node.properties[name];
|
|
4
|
-
return value !== null && value !== void 0 && value !== false;
|
|
5
|
-
}
|
|
6
|
-
export {
|
|
7
|
-
hasProperty
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/hast-util-has-property/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Nodes} Nodes\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Check if `node` is an element and has a `name` property.\n *\n * @template {string} Key\n * Type of key.\n * @param {Nodes} node\n * Node to check (typically `Element`).\n * @param {Key} name\n * Property name to check.\n * @returns {node is Element & {properties: Record<Key, Array<number | string> | number | string | true>}}}\n * Whether `node` is an element that has a `name` property.\n *\n * Note: see <https://github.com/DefinitelyTyped/DefinitelyTyped/blob/27c9274/types/hast/index.d.ts#L37C29-L37C98>.\n */\nexport function hasProperty(node, name) {\n const value =\n node.type === 'element' &&\n own.call(node.properties, name) &&\n node.properties[name]\n\n return value !== null && value !== undefined && value !== false\n}\n"],"names":[],"mappings":"AAKA,MAAM,MAAM,CAAE,EAAC;AAgBR,SAAS,YAAY,MAAM,MAAM;AACtC,QAAM,QACJ,KAAK,SAAS,aACd,IAAI,KAAK,KAAK,YAAY,IAAI,KAC9B,KAAK,WAAW,IAAI;AAEtB,SAAO,UAAU,QAAQ,UAAU,UAAa,UAAU;AAC5D;","x_google_ignoreList":[0]}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const isElement = (
|
|
4
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
5
|
-
/**
|
|
6
|
-
* @type {(
|
|
7
|
-
* (<Condition extends TestFunction>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
|
|
8
|
-
* (<Condition extends string>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
|
|
9
|
-
* ((element?: null | undefined) => false) &
|
|
10
|
-
* ((element: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
|
|
11
|
-
* ((element: unknown, test?: Test, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => boolean)
|
|
12
|
-
* )}
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* @param {unknown} [element]
|
|
16
|
-
* @param {Test | undefined} [test]
|
|
17
|
-
* @param {number | null | undefined} [index]
|
|
18
|
-
* @param {Parents | null | undefined} [parent]
|
|
19
|
-
* @param {unknown} [context]
|
|
20
|
-
* @returns {boolean}
|
|
21
|
-
*/
|
|
22
|
-
// eslint-disable-next-line max-params
|
|
23
|
-
function(element2, test, index, parent, context) {
|
|
24
|
-
const check = convertElement(test);
|
|
25
|
-
return looksLikeAnElement(element2) ? check.call(context, element2, index, parent) : false;
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
const convertElement = (
|
|
29
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
30
|
-
/**
|
|
31
|
-
* @type {(
|
|
32
|
-
* (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
|
|
33
|
-
* (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
|
|
34
|
-
* ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
|
|
35
|
-
* ((test?: Test) => Check)
|
|
36
|
-
* )}
|
|
37
|
-
*/
|
|
38
|
-
/**
|
|
39
|
-
* @param {Test | null | undefined} [test]
|
|
40
|
-
* @returns {Check}
|
|
41
|
-
*/
|
|
42
|
-
function(test) {
|
|
43
|
-
if (test === null || test === void 0) {
|
|
44
|
-
return element;
|
|
45
|
-
}
|
|
46
|
-
if (typeof test === "string") {
|
|
47
|
-
return tagNameFactory(test);
|
|
48
|
-
}
|
|
49
|
-
if (typeof test === "object") {
|
|
50
|
-
return anyFactory(test);
|
|
51
|
-
}
|
|
52
|
-
if (typeof test === "function") {
|
|
53
|
-
return castFactory(test);
|
|
54
|
-
}
|
|
55
|
-
throw new Error("Expected function, string, or array as `test`");
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
function anyFactory(tests) {
|
|
59
|
-
const checks = [];
|
|
60
|
-
let index = -1;
|
|
61
|
-
while (++index < tests.length) {
|
|
62
|
-
checks[index] = convertElement(tests[index]);
|
|
63
|
-
}
|
|
64
|
-
return castFactory(any);
|
|
65
|
-
function any(...parameters) {
|
|
66
|
-
let index2 = -1;
|
|
67
|
-
while (++index2 < checks.length) {
|
|
68
|
-
if (checks[index2].apply(this, parameters)) return true;
|
|
69
|
-
}
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function tagNameFactory(check) {
|
|
74
|
-
return castFactory(tagName);
|
|
75
|
-
function tagName(element2) {
|
|
76
|
-
return element2.tagName === check;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function castFactory(testFunction) {
|
|
80
|
-
return check;
|
|
81
|
-
function check(value, index, parent) {
|
|
82
|
-
return Boolean(
|
|
83
|
-
looksLikeAnElement(value) && testFunction.call(
|
|
84
|
-
this,
|
|
85
|
-
value,
|
|
86
|
-
typeof index === "number" ? index : void 0,
|
|
87
|
-
parent || void 0
|
|
88
|
-
)
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function element(element2) {
|
|
93
|
-
return Boolean(
|
|
94
|
-
element2 && typeof element2 === "object" && "type" in element2 && element2.type === "element" && "tagName" in element2 && typeof element2.tagName === "string"
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
function looksLikeAnElement(value) {
|
|
98
|
-
return value !== null && typeof value === "object" && "type" in value && "tagName" in value;
|
|
99
|
-
}
|
|
100
|
-
exports.convertElement = convertElement;
|
|
101
|
-
exports.isElement = isElement;
|
|
102
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../node_modules/hast-util-is-element/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is an element.\n * @param {unknown} this\n * Context object (`this`) to call `test` with\n * @param {unknown} [element]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | null | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean}\n * Whether this is an element and passes a test.\n *\n * @typedef {Array<TestFunction | string> | TestFunction | string | null | undefined} Test\n * Check for an arbitrary element.\n *\n * * when `string`, checks that the element has that tag name\n * * when `function`, see `TestFunction`\n * * when `Array`, checks if one of the subtests pass\n *\n * @callback TestFunction\n * Check if an element passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Element} element\n * An element.\n * @param {number | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean | undefined | void}\n * Whether this element passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `element` is an `Element` and whether it passes the given test.\n *\n * @param element\n * Thing to check, typically `element`.\n * @param test\n * Check for a specific element.\n * @param index\n * Position of `element` in its parent.\n * @param parent\n * Parent of `element`.\n * @param context\n * Context object (`this`) to call `test` with.\n * @returns\n * Whether `element` is an `Element` and passes a test.\n * @throws\n * When an incorrect `test`, `index`, or `parent` is given; there is no error\n * thrown when `element` is not a node or not an element.\n */\nexport const isElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends TestFunction>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &\n * (<Condition extends string>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((element?: null | undefined) => false) &\n * ((element: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((element: unknown, test?: Test, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [element]\n * @param {Test | undefined} [test]\n * @param {number | null | undefined} [index]\n * @param {Parents | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (element, test, index, parent, context) {\n const check = convertElement(test)\n\n if (\n index !== null &&\n index !== undefined &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite `index`')\n }\n\n if (\n parent !== null &&\n parent !== undefined &&\n (!parent.type || !parent.children)\n ) {\n throw new Error('Expected valid `parent`')\n }\n\n if (\n (index === null || index === undefined) !==\n (parent === null || parent === undefined)\n ) {\n throw new Error('Expected both `index` and `parent`')\n }\n\n return looksLikeAnElement(element)\n ? check.call(context, element, index, parent)\n : false\n }\n )\n\n/**\n * Generate a check from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * an `element`, `index`, and `parent`.\n *\n * @param test\n * A test for a specific element.\n * @returns\n * A check.\n */\nexport const convertElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &\n * (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test | null | undefined} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return element\n }\n\n if (typeof test === 'string') {\n return tagNameFactory(test)\n }\n\n // Assume array.\n if (typeof test === 'object') {\n return anyFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or array as `test`')\n }\n )\n\n/**\n * Handle multiple tests.\n *\n * @param {Array<TestFunction | string>} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array<Check>} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convertElement(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn a string into a test for an element with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction tagNameFactory(check) {\n return castFactory(tagName)\n\n /**\n * @param {Element} element\n * @returns {boolean}\n */\n function tagName(element) {\n return element.tagName === check\n }\n}\n\n/**\n * Turn a custom test into a test for an element that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeAnElement(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\n/**\n * Make sure something is an element.\n *\n * @param {unknown} element\n * @returns {element is Element}\n */\nfunction element(element) {\n return Boolean(\n element &&\n typeof element === 'object' &&\n 'type' in element &&\n element.type === 'element' &&\n 'tagName' in element &&\n typeof element.tagName === 'string'\n )\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Element}\n */\nfunction looksLikeAnElement(value) {\n return (\n value !== null &&\n typeof value === 'object' &&\n 'type' in value &&\n 'tagName' in value\n )\n}\n"],"names":["element","index"],"mappings":";;AAmEY,MAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBT,SAAUA,UAAS,MAAM,OAAO,QAAQ,SAAS;AAC/C,UAAM,QAAQ,eAAe,IAAI;AA2BjC,WAAO,mBAAmBA,QAAO,IAC7B,MAAM,KAAK,SAASA,UAAS,OAAO,MAAM,IAC1C;AAAA,EACL;AAAA;AAiBO,MAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeT,SAAU,MAAM;AACd,QAAI,SAAS,QAAQ,SAAS,QAAW;AACvC,aAAO;AAAA,IACR;AAED,QAAI,OA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