@prismicio/client 7.7.5-alpha.0 → 7.8.1
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/api/repository.d.ts +4 -0
- package/package.json +2 -16
- package/src/index.ts +0 -8
- package/src/types/api/repository.ts +5 -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"walk.js","sources":["../../../../node_modules/hast-util-select/lib/walk.js"],"sourcesContent":["/**\n * @typedef {import('css-selector-parser').AstRule} AstRule\n *\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('./index.js').State} State\n */\n\n/**\n * @typedef Counts\n * Info on elements in a parent.\n * @property {number} count\n * Number of elements.\n * @property {Map<string, number>} types\n * Number of elements by tag name.\n *\n * @typedef Nest\n * Rule sets by nesting.\n * @property {Array<AstRule> | undefined} adjacentSibling\n * `a + b`\n * @property {Array<AstRule> | undefined} descendant\n * `a b`\n * @property {Array<AstRule> | undefined} directChild\n * `a > b`\n * @property {Array<AstRule> | undefined} generalSibling\n * `a ~ b`\n */\n\nimport {enterState} from './enter-state.js'\nimport {test} from './test.js'\n\n/** @type {Array<never>} */\nconst empty = []\n\n/**\n * Walk a tree.\n *\n * @param {State} state\n * State.\n * @param {Nodes | undefined} tree\n * Tree.\n */\nexport function walk(state, tree) {\n if (tree) {\n one(state, [], tree, undefined, undefined, tree)\n }\n}\n\n/**\n * Add a rule to a nesting map.\n *\n * @param {Nest} nest\n * Nesting.\n * @param {keyof Nest} field\n * Field.\n * @param {AstRule} rule\n * Rule.\n */\nfunction add(nest, field, rule) {\n const list = nest[field]\n if (list) {\n list.push(rule)\n } else {\n nest[field] = [rule]\n }\n}\n\n/**\n * Check in a parent.\n *\n * @param {State} state\n * State.\n * @param {Nest} nest\n * Nesting.\n * @param {Parents} node\n * Parent.\n * @param {Nodes} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\nfunction all(state, nest, node, tree) {\n const fromParent = combine(nest.descendant, nest.directChild)\n /** @type {Array<AstRule> | undefined} */\n let fromSibling\n let index = -1\n /**\n * Total counts.\n * @type {Counts}\n */\n const total = {count: 0, types: new Map()}\n /**\n * Counts of previous siblings.\n * @type {Counts}\n */\n const before = {count: 0, types: new Map()}\n\n while (++index < node.children.length) {\n count(total, node.children[index])\n }\n\n index = -1\n\n while (++index < node.children.length) {\n const child = node.children[index]\n // Uppercase to prevent prototype polution, injecting `constructor` or so.\n // Normalize because HTML is insensitive.\n const name =\n child.type === 'element' ? child.tagName.toUpperCase() : undefined\n // Before counting further elements:\n state.elementIndex = before.count\n state.typeIndex = name ? before.types.get(name) || 0 : 0\n // After counting all elements.\n state.elementCount = total.count\n state.typeCount = name ? total.types.get(name) : 0\n\n // Only apply if this is a parent, this should be an element, but we check\n // for parents so that we delve into custom nodes too.\n if ('children' in child) {\n const forSibling = combine(fromParent, fromSibling)\n const nest = one(\n state,\n forSibling,\n node.children[index],\n index,\n node,\n tree\n )\n fromSibling = combine(nest.generalSibling, nest.adjacentSibling)\n }\n\n // We found one thing, and one is enough.\n if (state.one && state.found) {\n break\n }\n\n count(before, node.children[index])\n }\n}\n\n/**\n * Apply selectors to an element.\n *\n * @param {State} state\n * Current state.\n * @param {Array<AstRule>} rules\n * Rules to apply.\n * @param {Element} node\n * Element to apply rules to.\n * @param {number | undefined} index\n * Index of `node` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Nest}\n * Further rules.\n */\nfunction applySelectors(state, rules, node, index, parent) {\n /** @type {Nest} */\n const nestResult = {\n adjacentSibling: undefined,\n descendant: undefined,\n directChild: undefined,\n generalSibling: undefined\n }\n let selectorIndex = -1\n\n while (++selectorIndex < rules.length) {\n const rule = rules[selectorIndex]\n\n // We found one thing, and one is enough.\n if (state.one && state.found) {\n break\n }\n\n // When shallow, we don’t allow nested rules.\n // Idea: we could allow a stack of parents?\n // Might get quite complex though.\n if (state.shallow && rule.nestedRule) {\n throw new Error('Expected selector without nesting')\n }\n\n // If this rule matches:\n if (test(rule, node, index, parent, state)) {\n const nest = rule.nestedRule\n\n // Are there more?\n if (nest) {\n /** @type {keyof Nest} */\n const label =\n nest.combinator === '+'\n ? 'adjacentSibling'\n : nest.combinator === '~'\n ? 'generalSibling'\n : nest.combinator === '>'\n ? 'directChild'\n : 'descendant'\n add(nestResult, label, nest)\n } else {\n // We have a match!\n state.found = true\n\n if (!state.results.includes(node)) {\n state.results.push(node)\n }\n }\n }\n\n // Descendant.\n if (rule.combinator === undefined) {\n add(nestResult, 'descendant', rule)\n }\n // Adjacent.\n else if (rule.combinator === '~') {\n add(nestResult, 'generalSibling', rule)\n }\n // Drop direct child (`>`), adjacent sibling (`+`).\n }\n\n return nestResult\n}\n\n/**\n * Combine two lists, if needed.\n *\n * This is optimized to create as few lists as possible.\n *\n * @param {Array<AstRule> | undefined} left\n * Rules.\n * @param {Array<AstRule> | undefined} right\n * Rules.\n * @returns {Array<AstRule>}\n * Rules.\n */\nfunction combine(left, right) {\n return left && right && left.length > 0 && right.length > 0\n ? [...left, ...right]\n : left && left.length > 0\n ? left\n : right && right.length > 0\n ? right\n : empty\n}\n\n/**\n * Count a node.\n *\n * @param {Counts} counts\n * Counts.\n * @param {Nodes} node\n * Node (we’re looking for elements).\n * @returns {undefined}\n * Nothing.\n */\nfunction count(counts, node) {\n if (node.type === 'element') {\n // Uppercase to prevent prototype polution, injecting `constructor` or so.\n // Normalize because HTML is insensitive.\n const name = node.tagName.toUpperCase()\n const count = (counts.types.get(name) || 0) + 1\n counts.count++\n counts.types.set(name, count)\n }\n}\n\n/**\n * Check a node.\n *\n * @param {State} state\n * State.\n * @param {Array<AstRule>} currentRules\n * Rules.\n * @param {Nodes} node\n * Node.\n * @param {number | undefined} index\n * Index of `node` in `parent`.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {Nodes} tree\n * Tree.\n * @returns {Nest}\n * Nesting.\n */\nfunction one(state, currentRules, node, index, parent, tree) {\n /** @type {Nest} */\n let nestResult = {\n adjacentSibling: undefined,\n descendant: undefined,\n directChild: undefined,\n generalSibling: undefined\n }\n\n const exit = enterState(state, node)\n\n if (node.type === 'element') {\n let rootRules = state.rootQuery.rules\n\n // Remove direct child rules if this is the root.\n // This only happens for a `:has()` rule, which can be like\n // `a:has(> b)`.\n if (parent && parent !== tree) {\n rootRules = state.rootQuery.rules.filter(\n (d) =>\n d.combinator === undefined ||\n (d.combinator === '>' && parent === tree)\n )\n }\n\n nestResult = applySelectors(\n state,\n // Try the root rules for this element too.\n combine(currentRules, rootRules),\n node,\n index,\n parent\n )\n }\n\n // If this is a parent, and we want to delve into them, and we haven’t found\n // our single result yet.\n if ('children' in node && !state.shallow && !(state.one && state.found)) {\n all(state, nestResult, node, tree)\n }\n\n exit()\n\n return nestResult\n}\n"],"names":["nest","count"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../stringify-entities/lib/index.cjs");
|
|
4
|
-
const htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
|
|
5
|
-
const bogusCommentEntitySubset = [">"];
|
|
6
|
-
const commentEntitySubset = ["<", ">"];
|
|
7
|
-
function comment(node, _1, _2, state) {
|
|
8
|
-
return state.settings.bogusComments ? "<?" + index.stringifyEntities(
|
|
9
|
-
node.value,
|
|
10
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
11
|
-
subset: bogusCommentEntitySubset
|
|
12
|
-
})
|
|
13
|
-
) + ">" : "<!--" + node.value.replace(htmlCommentRegex, encode) + "-->";
|
|
14
|
-
function encode($0) {
|
|
15
|
-
return index.stringifyEntities(
|
|
16
|
-
$0,
|
|
17
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
18
|
-
subset: commentEntitySubset
|
|
19
|
-
})
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.comment = comment;
|
|
24
|
-
//# sourceMappingURL=comment.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.cjs","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/comment.js"],"sourcesContent":["/**\n * @typedef {import('hast').Comment} Comment\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {stringifyEntities} from 'stringify-entities'\n\nconst htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g\n\n// Declare arrays as variables so it can be cached by `stringifyEntities`\nconst bogusCommentEntitySubset = ['>']\nconst commentEntitySubset = ['<', '>']\n\n/**\n * Serialize a comment.\n *\n * @param {Comment} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function comment(node, _1, _2, state) {\n // See: <https://html.spec.whatwg.org/multipage/syntax.html#comments>\n return state.settings.bogusComments\n ? '<?' +\n stringifyEntities(\n node.value,\n Object.assign({}, state.settings.characterReferences, {\n subset: bogusCommentEntitySubset\n })\n ) +\n '>'\n : '<!--' + node.value.replace(htmlCommentRegex, encode) + '-->'\n\n /**\n * @param {string} $0\n */\n function encode($0) {\n return stringifyEntities(\n $0,\n Object.assign({}, state.settings.characterReferences, {\n subset: commentEntitySubset\n })\n )\n }\n}\n"],"names":["stringifyEntities"],"mappings":";;;AASA,MAAM,mBAAmB;AAGzB,MAAM,2BAA2B,CAAC,GAAG;AACrC,MAAM,sBAAsB,CAAC,KAAK,GAAG;AAgB9B,SAAS,QAAQ,MAAM,IAAI,IAAI,OAAO;AAE3C,SAAO,MAAM,SAAS,gBAClB,OACEA,MAAiB;AAAA,IACf,KAAK;AAAA,IACL,OAAO,OAAO,CAAA,GAAI,MAAM,SAAS,qBAAqB;AAAA,MACpD,QAAQ;AAAA,IACpB,CAAW;AAAA,EACF,IACD,MACF,SAAS,KAAK,MAAM,QAAQ,kBAAkB,MAAM,IAAI;AAK5D,WAAS,OAAO,IAAI;AAClB,WAAOA,MAAiB;AAAA,MACtB;AAAA,MACA,OAAO,OAAO,CAAA,GAAI,MAAM,SAAS,qBAAqB;AAAA,QACpD,QAAQ;AAAA,MAChB,CAAO;AAAA,IACF;AAAA,EACF;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { stringifyEntities } from "../../../stringify-entities/lib/index.js";
|
|
2
|
-
const htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
|
|
3
|
-
const bogusCommentEntitySubset = [">"];
|
|
4
|
-
const commentEntitySubset = ["<", ">"];
|
|
5
|
-
function comment(node, _1, _2, state) {
|
|
6
|
-
return state.settings.bogusComments ? "<?" + stringifyEntities(
|
|
7
|
-
node.value,
|
|
8
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
9
|
-
subset: bogusCommentEntitySubset
|
|
10
|
-
})
|
|
11
|
-
) + ">" : "<!--" + node.value.replace(htmlCommentRegex, encode) + "-->";
|
|
12
|
-
function encode($0) {
|
|
13
|
-
return stringifyEntities(
|
|
14
|
-
$0,
|
|
15
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
16
|
-
subset: commentEntitySubset
|
|
17
|
-
})
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
comment
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=comment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.js","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/comment.js"],"sourcesContent":["/**\n * @typedef {import('hast').Comment} Comment\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {stringifyEntities} from 'stringify-entities'\n\nconst htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g\n\n// Declare arrays as variables so it can be cached by `stringifyEntities`\nconst bogusCommentEntitySubset = ['>']\nconst commentEntitySubset = ['<', '>']\n\n/**\n * Serialize a comment.\n *\n * @param {Comment} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function comment(node, _1, _2, state) {\n // See: <https://html.spec.whatwg.org/multipage/syntax.html#comments>\n return state.settings.bogusComments\n ? '<?' +\n stringifyEntities(\n node.value,\n Object.assign({}, state.settings.characterReferences, {\n subset: bogusCommentEntitySubset\n })\n ) +\n '>'\n : '<!--' + node.value.replace(htmlCommentRegex, encode) + '-->'\n\n /**\n * @param {string} $0\n */\n function encode($0) {\n return stringifyEntities(\n $0,\n Object.assign({}, state.settings.characterReferences, {\n subset: commentEntitySubset\n })\n )\n }\n}\n"],"names":[],"mappings":";AASA,MAAM,mBAAmB;AAGzB,MAAM,2BAA2B,CAAC,GAAG;AACrC,MAAM,sBAAsB,CAAC,KAAK,GAAG;AAgB9B,SAAS,QAAQ,MAAM,IAAI,IAAI,OAAO;AAE3C,SAAO,MAAM,SAAS,gBAClB,OACE;AAAA,IACE,KAAK;AAAA,IACL,OAAO,OAAO,CAAA,GAAI,MAAM,SAAS,qBAAqB;AAAA,MACpD,QAAQ;AAAA,IACpB,CAAW;AAAA,EACF,IACD,MACF,SAAS,KAAK,MAAM,QAAQ,kBAAkB,MAAM,IAAI;AAK5D,WAAS,OAAO,IAAI;AAClB,WAAO;AAAA,MACL;AAAA,MACA,OAAO,OAAO,CAAA,GAAI,MAAM,SAAS,qBAAqB;AAAA,QACpD,QAAQ;AAAA,MAChB,CAAO;AAAA,IACF;AAAA,EACF;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
function doctype(_1, _2, _3, state) {
|
|
4
|
-
return "<!" + (state.settings.upperDoctype ? "DOCTYPE" : "doctype") + (state.settings.tightDoctype ? "" : " ") + "html>";
|
|
5
|
-
}
|
|
6
|
-
exports.doctype = doctype;
|
|
7
|
-
//# sourceMappingURL=doctype.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctype.cjs","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/doctype.js"],"sourcesContent":["/**\n * @typedef {import('hast').Doctype} Doctype\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('../index.js').State} State\n */\n\n// Make VS code see references to the above types.\n''\n\n/**\n * Serialize a doctype.\n *\n * @param {Doctype} _1\n * Node to handle.\n * @param {number | undefined} _2\n * Index of `node` in `parent.\n * @param {Parents | undefined} _3\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function doctype(_1, _2, _3, state) {\n return (\n '<!' +\n (state.settings.upperDoctype ? 'DOCTYPE' : 'doctype') +\n (state.settings.tightDoctype ? '' : ' ') +\n 'html>'\n )\n}\n"],"names":[],"mappings":";;AAwBO,SAAS,QAAQ,IAAI,IAAI,IAAI,OAAO;AACzC,SACE,QACC,MAAM,SAAS,eAAe,YAAY,cAC1C,MAAM,SAAS,eAAe,KAAK,OACpC;AAEJ;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctype.js","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/doctype.js"],"sourcesContent":["/**\n * @typedef {import('hast').Doctype} Doctype\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('../index.js').State} State\n */\n\n// Make VS code see references to the above types.\n''\n\n/**\n * Serialize a doctype.\n *\n * @param {Doctype} _1\n * Node to handle.\n * @param {number | undefined} _2\n * Index of `node` in `parent.\n * @param {Parents | undefined} _3\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function doctype(_1, _2, _3, state) {\n return (\n '<!' +\n (state.settings.upperDoctype ? 'DOCTYPE' : 'doctype') +\n (state.settings.tightDoctype ? '' : ' ') +\n 'html>'\n )\n}\n"],"names":[],"mappings":"AAwBO,SAAS,QAAQ,IAAI,IAAI,IAAI,OAAO;AACzC,SACE,QACC,MAAM,SAAS,eAAe,YAAY,cAC1C,MAAM,SAAS,eAAe,KAAK,OACpC;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index$4 = require("../../../ccount/index.cjs");
|
|
4
|
-
const index$2 = require("../../../comma-separated-tokens/index.cjs");
|
|
5
|
-
const index = require("../../../property-information/index.cjs");
|
|
6
|
-
const index$3 = require("../../../space-separated-tokens/index.cjs");
|
|
7
|
-
const closing = require("../omission/closing.cjs");
|
|
8
|
-
const opening = require("../omission/opening.cjs");
|
|
9
|
-
const find = require("../../../property-information/lib/find.cjs");
|
|
10
|
-
const index$1 = require("../../../stringify-entities/lib/index.cjs");
|
|
11
|
-
const constants = {
|
|
12
|
-
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
|
13
|
-
name: [
|
|
14
|
-
[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")],
|
|
15
|
-
[`\0
|
|
16
|
-
\f\r "&'/<=>`.split(""), "\0 \n\f\r \"&'/<=>`".split("")]
|
|
17
|
-
],
|
|
18
|
-
// See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.
|
|
19
|
-
unquoted: [
|
|
20
|
-
[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")],
|
|
21
|
-
["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]
|
|
22
|
-
],
|
|
23
|
-
// See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.
|
|
24
|
-
single: [
|
|
25
|
-
["&'".split(""), "\"&'`".split("")],
|
|
26
|
-
["\0&'".split(""), "\0\"&'`".split("")]
|
|
27
|
-
],
|
|
28
|
-
// See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.
|
|
29
|
-
double: [
|
|
30
|
-
['"&'.split(""), "\"&'`".split("")],
|
|
31
|
-
['\0"&'.split(""), "\0\"&'`".split("")]
|
|
32
|
-
]
|
|
33
|
-
};
|
|
34
|
-
function element(node, index$12, parent, state) {
|
|
35
|
-
const schema = state.schema;
|
|
36
|
-
const omit = schema.space === "svg" ? false : state.settings.omitOptionalTags;
|
|
37
|
-
let selfClosing = schema.space === "svg" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());
|
|
38
|
-
const parts = [];
|
|
39
|
-
let last;
|
|
40
|
-
if (schema.space === "html" && node.tagName === "svg") {
|
|
41
|
-
state.schema = index.svg;
|
|
42
|
-
}
|
|
43
|
-
const attributes = serializeAttributes(state, node.properties);
|
|
44
|
-
const content = state.all(
|
|
45
|
-
schema.space === "html" && node.tagName === "template" ? node.content : node
|
|
46
|
-
);
|
|
47
|
-
state.schema = schema;
|
|
48
|
-
if (content) selfClosing = false;
|
|
49
|
-
if (attributes || !omit || !opening.opening(node, index$12, parent)) {
|
|
50
|
-
parts.push("<", node.tagName, attributes ? " " + attributes : "");
|
|
51
|
-
if (selfClosing && (schema.space === "svg" || state.settings.closeSelfClosing)) {
|
|
52
|
-
last = attributes.charAt(attributes.length - 1);
|
|
53
|
-
if (!state.settings.tightSelfClosing || last === "/" || last && last !== '"' && last !== "'") {
|
|
54
|
-
parts.push(" ");
|
|
55
|
-
}
|
|
56
|
-
parts.push("/");
|
|
57
|
-
}
|
|
58
|
-
parts.push(">");
|
|
59
|
-
}
|
|
60
|
-
parts.push(content);
|
|
61
|
-
if (!selfClosing && (!omit || !closing.closing(node, index$12, parent))) {
|
|
62
|
-
parts.push("</" + node.tagName + ">");
|
|
63
|
-
}
|
|
64
|
-
return parts.join("");
|
|
65
|
-
}
|
|
66
|
-
function serializeAttributes(state, properties) {
|
|
67
|
-
const values = [];
|
|
68
|
-
let index2 = -1;
|
|
69
|
-
let key;
|
|
70
|
-
if (properties) {
|
|
71
|
-
for (key in properties) {
|
|
72
|
-
if (properties[key] !== null && properties[key] !== void 0) {
|
|
73
|
-
const value = serializeAttribute(state, key, properties[key]);
|
|
74
|
-
if (value) values.push(value);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
while (++index2 < values.length) {
|
|
79
|
-
const last = state.settings.tightAttributes ? values[index2].charAt(values[index2].length - 1) : void 0;
|
|
80
|
-
if (index2 !== values.length - 1 && last !== '"' && last !== "'") {
|
|
81
|
-
values[index2] += " ";
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return values.join("");
|
|
85
|
-
}
|
|
86
|
-
function serializeAttribute(state, key, value) {
|
|
87
|
-
const info = find.find(state.schema, key);
|
|
88
|
-
const x = state.settings.allowParseErrors && state.schema.space === "html" ? 0 : 1;
|
|
89
|
-
const y = state.settings.allowDangerousCharacters ? 0 : 1;
|
|
90
|
-
let quote = state.quote;
|
|
91
|
-
let result;
|
|
92
|
-
if (info.overloadedBoolean && (value === info.attribute || value === "")) {
|
|
93
|
-
value = true;
|
|
94
|
-
} else if (info.boolean || info.overloadedBoolean && typeof value !== "string") {
|
|
95
|
-
value = Boolean(value);
|
|
96
|
-
}
|
|
97
|
-
if (value === null || value === void 0 || value === false || typeof value === "number" && Number.isNaN(value)) {
|
|
98
|
-
return "";
|
|
99
|
-
}
|
|
100
|
-
const name = index$1.stringifyEntities(
|
|
101
|
-
info.attribute,
|
|
102
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
103
|
-
// Always encode without parse errors in non-HTML.
|
|
104
|
-
subset: constants.name[x][y]
|
|
105
|
-
})
|
|
106
|
-
);
|
|
107
|
-
if (value === true) return name;
|
|
108
|
-
value = Array.isArray(value) ? (info.commaSeparated ? index$2.stringify : index$3.stringify)(value, {
|
|
109
|
-
padLeft: !state.settings.tightCommaSeparatedLists
|
|
110
|
-
}) : String(value);
|
|
111
|
-
if (state.settings.collapseEmptyAttributes && !value) return name;
|
|
112
|
-
if (state.settings.preferUnquoted) {
|
|
113
|
-
result = index$1.stringifyEntities(
|
|
114
|
-
value,
|
|
115
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
116
|
-
attribute: true,
|
|
117
|
-
subset: constants.unquoted[x][y]
|
|
118
|
-
})
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
if (result !== value) {
|
|
122
|
-
if (state.settings.quoteSmart && index$4.ccount(value, quote) > index$4.ccount(value, state.alternative)) {
|
|
123
|
-
quote = state.alternative;
|
|
124
|
-
}
|
|
125
|
-
result = quote + index$1.stringifyEntities(
|
|
126
|
-
value,
|
|
127
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
128
|
-
// Always encode without parse errors in non-HTML.
|
|
129
|
-
subset: (quote === "'" ? constants.single : constants.double)[x][y],
|
|
130
|
-
attribute: true
|
|
131
|
-
})
|
|
132
|
-
) + quote;
|
|
133
|
-
}
|
|
134
|
-
return name + (result ? "=" + result : result);
|
|
135
|
-
}
|
|
136
|
-
exports.element = element;
|
|
137
|
-
//# sourceMappingURL=element.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"element.cjs","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/element.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Properties} Properties\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {ccount} from 'ccount'\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {find, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {stringifyEntities} from 'stringify-entities'\nimport {closing} from '../omission/closing.js'\nimport {opening} from '../omission/opening.js'\n\n/**\n * Maps of subsets.\n *\n * Each value is a matrix of tuples.\n * The value at `0` causes parse errors, the value at `1` is valid.\n * Of both, the value at `0` is unsafe, and the value at `1` is safe.\n *\n * @type {Record<'double' | 'name' | 'single' | 'unquoted', Array<[Array<string>, Array<string>]>>}\n */\nconst constants = {\n // See: <https://html.spec.whatwg.org/#attribute-name-state>.\n name: [\n ['\\t\\n\\f\\r &/=>'.split(''), '\\t\\n\\f\\r \"&\\'/=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'/<=>'.split(''), '\\0\\t\\n\\f\\r \"&\\'/<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.\n unquoted: [\n ['\\t\\n\\f\\r &>'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'<=>`'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.\n single: [\n [\"&'\".split(''), '\"&\\'`'.split('')],\n [\"\\0&'\".split(''), '\\0\"&\\'`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.\n double: [\n ['\"&'.split(''), '\"&\\'`'.split('')],\n ['\\0\"&'.split(''), '\\0\"&\\'`'.split('')]\n ]\n}\n\n/**\n * Serialize an element node.\n *\n * @param {Element} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function element(node, index, parent, state) {\n const schema = state.schema\n const omit = schema.space === 'svg' ? false : state.settings.omitOptionalTags\n let selfClosing =\n schema.space === 'svg'\n ? state.settings.closeEmptyElements\n : state.settings.voids.includes(node.tagName.toLowerCase())\n /** @type {Array<string>} */\n const parts = []\n /** @type {string} */\n let last\n\n if (schema.space === 'html' && node.tagName === 'svg') {\n state.schema = svg\n }\n\n const attributes = serializeAttributes(state, node.properties)\n\n const content = state.all(\n schema.space === 'html' && node.tagName === 'template' ? node.content : node\n )\n\n state.schema = schema\n\n // If the node is categorised as void, but it has children, remove the\n // categorisation.\n // This enables for example `menuitem`s, which are void in W3C HTML but not\n // void in WHATWG HTML, to be stringified properly.\n // Note: `menuitem` has since been removed from the HTML spec, and so is no\n // longer void.\n if (content) selfClosing = false\n\n if (attributes || !omit || !opening(node, index, parent)) {\n parts.push('<', node.tagName, attributes ? ' ' + attributes : '')\n\n if (\n selfClosing &&\n (schema.space === 'svg' || state.settings.closeSelfClosing)\n ) {\n last = attributes.charAt(attributes.length - 1)\n if (\n !state.settings.tightSelfClosing ||\n last === '/' ||\n (last && last !== '\"' && last !== \"'\")\n ) {\n parts.push(' ')\n }\n\n parts.push('/')\n }\n\n parts.push('>')\n }\n\n parts.push(content)\n\n if (!selfClosing && (!omit || !closing(node, index, parent))) {\n parts.push('</' + node.tagName + '>')\n }\n\n return parts.join('')\n}\n\n/**\n * @param {State} state\n * @param {Properties | null | undefined} properties\n * @returns {string}\n */\nfunction serializeAttributes(state, properties) {\n /** @type {Array<string>} */\n const values = []\n let index = -1\n /** @type {string} */\n let key\n\n if (properties) {\n for (key in properties) {\n if (properties[key] !== null && properties[key] !== undefined) {\n const value = serializeAttribute(state, key, properties[key])\n if (value) values.push(value)\n }\n }\n }\n\n while (++index < values.length) {\n const last = state.settings.tightAttributes\n ? values[index].charAt(values[index].length - 1)\n : undefined\n\n // In tight mode, don’t add a space after quoted attributes.\n if (index !== values.length - 1 && last !== '\"' && last !== \"'\") {\n values[index] += ' '\n }\n }\n\n return values.join('')\n}\n\n/**\n * @param {State} state\n * @param {string} key\n * @param {Properties[keyof Properties]} value\n * @returns {string}\n */\nfunction serializeAttribute(state, key, value) {\n const info = find(state.schema, key)\n const x =\n state.settings.allowParseErrors && state.schema.space === 'html' ? 0 : 1\n const y = state.settings.allowDangerousCharacters ? 0 : 1\n let quote = state.quote\n /** @type {string | undefined} */\n let result\n\n if (info.overloadedBoolean && (value === info.attribute || value === '')) {\n value = true\n } else if (\n info.boolean ||\n (info.overloadedBoolean && typeof value !== 'string')\n ) {\n value = Boolean(value)\n }\n\n if (\n value === null ||\n value === undefined ||\n value === false ||\n (typeof value === 'number' && Number.isNaN(value))\n ) {\n return ''\n }\n\n const name = stringifyEntities(\n info.attribute,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: constants.name[x][y]\n })\n )\n\n // No value.\n // There is currently only one boolean property in SVG: `[download]` on\n // `<a>`.\n // This property does not seem to work in browsers (Firefox, Safari, Chrome),\n // so I can’t test if dropping the value works.\n // But I assume that it should:\n //\n // ```html\n // <!doctype html>\n // <svg viewBox=\"0 0 100 100\">\n // <a href=https://example.com download>\n // <circle cx=50 cy=40 r=35 />\n // </a>\n // </svg>\n // ```\n //\n // See: <https://github.com/wooorm/property-information/blob/main/lib/svg.js>\n if (value === true) return name\n\n // `spaces` doesn’t accept a second argument, but it’s given here just to\n // keep the code cleaner.\n value = Array.isArray(value)\n ? (info.commaSeparated ? commas : spaces)(value, {\n padLeft: !state.settings.tightCommaSeparatedLists\n })\n : String(value)\n\n if (state.settings.collapseEmptyAttributes && !value) return name\n\n // Check unquoted value.\n if (state.settings.preferUnquoted) {\n result = stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n attribute: true,\n subset: constants.unquoted[x][y]\n })\n )\n }\n\n // If we don’t want unquoted, or if `value` contains character references when\n // unquoted…\n if (result !== value) {\n // If the alternative is less common than `quote`, switch.\n if (\n state.settings.quoteSmart &&\n ccount(value, quote) > ccount(value, state.alternative)\n ) {\n quote = state.alternative\n }\n\n result =\n quote +\n stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: (quote === \"'\" ? constants.single : constants.double)[x][y],\n attribute: true\n })\n ) +\n quote\n }\n\n // Don’t add a `=` for unquoted empties.\n return name + (result ? '=' + result : result)\n}\n"],"names":["index","svg","opening","closing","find","stringifyEntities","commas","spaces","ccount"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { ccount } from "../../../ccount/index.js";
|
|
2
|
-
import { stringify } from "../../../comma-separated-tokens/index.js";
|
|
3
|
-
import { svg } from "../../../property-information/index.js";
|
|
4
|
-
import { stringify as stringify$1 } from "../../../space-separated-tokens/index.js";
|
|
5
|
-
import { closing } from "../omission/closing.js";
|
|
6
|
-
import { opening } from "../omission/opening.js";
|
|
7
|
-
import { find } from "../../../property-information/lib/find.js";
|
|
8
|
-
import { stringifyEntities } from "../../../stringify-entities/lib/index.js";
|
|
9
|
-
const constants = {
|
|
10
|
-
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
|
11
|
-
name: [
|
|
12
|
-
[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")],
|
|
13
|
-
[`\0
|
|
14
|
-
\f\r "&'/<=>`.split(""), "\0 \n\f\r \"&'/<=>`".split("")]
|
|
15
|
-
],
|
|
16
|
-
// See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.
|
|
17
|
-
unquoted: [
|
|
18
|
-
[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")],
|
|
19
|
-
["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]
|
|
20
|
-
],
|
|
21
|
-
// See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.
|
|
22
|
-
single: [
|
|
23
|
-
["&'".split(""), "\"&'`".split("")],
|
|
24
|
-
["\0&'".split(""), "\0\"&'`".split("")]
|
|
25
|
-
],
|
|
26
|
-
// See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.
|
|
27
|
-
double: [
|
|
28
|
-
['"&'.split(""), "\"&'`".split("")],
|
|
29
|
-
['\0"&'.split(""), "\0\"&'`".split("")]
|
|
30
|
-
]
|
|
31
|
-
};
|
|
32
|
-
function element(node, index, parent, state) {
|
|
33
|
-
const schema = state.schema;
|
|
34
|
-
const omit = schema.space === "svg" ? false : state.settings.omitOptionalTags;
|
|
35
|
-
let selfClosing = schema.space === "svg" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());
|
|
36
|
-
const parts = [];
|
|
37
|
-
let last;
|
|
38
|
-
if (schema.space === "html" && node.tagName === "svg") {
|
|
39
|
-
state.schema = svg;
|
|
40
|
-
}
|
|
41
|
-
const attributes = serializeAttributes(state, node.properties);
|
|
42
|
-
const content = state.all(
|
|
43
|
-
schema.space === "html" && node.tagName === "template" ? node.content : node
|
|
44
|
-
);
|
|
45
|
-
state.schema = schema;
|
|
46
|
-
if (content) selfClosing = false;
|
|
47
|
-
if (attributes || !omit || !opening(node, index, parent)) {
|
|
48
|
-
parts.push("<", node.tagName, attributes ? " " + attributes : "");
|
|
49
|
-
if (selfClosing && (schema.space === "svg" || state.settings.closeSelfClosing)) {
|
|
50
|
-
last = attributes.charAt(attributes.length - 1);
|
|
51
|
-
if (!state.settings.tightSelfClosing || last === "/" || last && last !== '"' && last !== "'") {
|
|
52
|
-
parts.push(" ");
|
|
53
|
-
}
|
|
54
|
-
parts.push("/");
|
|
55
|
-
}
|
|
56
|
-
parts.push(">");
|
|
57
|
-
}
|
|
58
|
-
parts.push(content);
|
|
59
|
-
if (!selfClosing && (!omit || !closing(node, index, parent))) {
|
|
60
|
-
parts.push("</" + node.tagName + ">");
|
|
61
|
-
}
|
|
62
|
-
return parts.join("");
|
|
63
|
-
}
|
|
64
|
-
function serializeAttributes(state, properties) {
|
|
65
|
-
const values = [];
|
|
66
|
-
let index = -1;
|
|
67
|
-
let key;
|
|
68
|
-
if (properties) {
|
|
69
|
-
for (key in properties) {
|
|
70
|
-
if (properties[key] !== null && properties[key] !== void 0) {
|
|
71
|
-
const value = serializeAttribute(state, key, properties[key]);
|
|
72
|
-
if (value) values.push(value);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
while (++index < values.length) {
|
|
77
|
-
const last = state.settings.tightAttributes ? values[index].charAt(values[index].length - 1) : void 0;
|
|
78
|
-
if (index !== values.length - 1 && last !== '"' && last !== "'") {
|
|
79
|
-
values[index] += " ";
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return values.join("");
|
|
83
|
-
}
|
|
84
|
-
function serializeAttribute(state, key, value) {
|
|
85
|
-
const info = find(state.schema, key);
|
|
86
|
-
const x = state.settings.allowParseErrors && state.schema.space === "html" ? 0 : 1;
|
|
87
|
-
const y = state.settings.allowDangerousCharacters ? 0 : 1;
|
|
88
|
-
let quote = state.quote;
|
|
89
|
-
let result;
|
|
90
|
-
if (info.overloadedBoolean && (value === info.attribute || value === "")) {
|
|
91
|
-
value = true;
|
|
92
|
-
} else if (info.boolean || info.overloadedBoolean && typeof value !== "string") {
|
|
93
|
-
value = Boolean(value);
|
|
94
|
-
}
|
|
95
|
-
if (value === null || value === void 0 || value === false || typeof value === "number" && Number.isNaN(value)) {
|
|
96
|
-
return "";
|
|
97
|
-
}
|
|
98
|
-
const name = stringifyEntities(
|
|
99
|
-
info.attribute,
|
|
100
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
101
|
-
// Always encode without parse errors in non-HTML.
|
|
102
|
-
subset: constants.name[x][y]
|
|
103
|
-
})
|
|
104
|
-
);
|
|
105
|
-
if (value === true) return name;
|
|
106
|
-
value = Array.isArray(value) ? (info.commaSeparated ? stringify : stringify$1)(value, {
|
|
107
|
-
padLeft: !state.settings.tightCommaSeparatedLists
|
|
108
|
-
}) : String(value);
|
|
109
|
-
if (state.settings.collapseEmptyAttributes && !value) return name;
|
|
110
|
-
if (state.settings.preferUnquoted) {
|
|
111
|
-
result = stringifyEntities(
|
|
112
|
-
value,
|
|
113
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
114
|
-
attribute: true,
|
|
115
|
-
subset: constants.unquoted[x][y]
|
|
116
|
-
})
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
if (result !== value) {
|
|
120
|
-
if (state.settings.quoteSmart && ccount(value, quote) > ccount(value, state.alternative)) {
|
|
121
|
-
quote = state.alternative;
|
|
122
|
-
}
|
|
123
|
-
result = quote + stringifyEntities(
|
|
124
|
-
value,
|
|
125
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
126
|
-
// Always encode without parse errors in non-HTML.
|
|
127
|
-
subset: (quote === "'" ? constants.single : constants.double)[x][y],
|
|
128
|
-
attribute: true
|
|
129
|
-
})
|
|
130
|
-
) + quote;
|
|
131
|
-
}
|
|
132
|
-
return name + (result ? "=" + result : result);
|
|
133
|
-
}
|
|
134
|
-
export {
|
|
135
|
-
element
|
|
136
|
-
};
|
|
137
|
-
//# sourceMappingURL=element.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/element.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Properties} Properties\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {ccount} from 'ccount'\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {find, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {stringifyEntities} from 'stringify-entities'\nimport {closing} from '../omission/closing.js'\nimport {opening} from '../omission/opening.js'\n\n/**\n * Maps of subsets.\n *\n * Each value is a matrix of tuples.\n * The value at `0` causes parse errors, the value at `1` is valid.\n * Of both, the value at `0` is unsafe, and the value at `1` is safe.\n *\n * @type {Record<'double' | 'name' | 'single' | 'unquoted', Array<[Array<string>, Array<string>]>>}\n */\nconst constants = {\n // See: <https://html.spec.whatwg.org/#attribute-name-state>.\n name: [\n ['\\t\\n\\f\\r &/=>'.split(''), '\\t\\n\\f\\r \"&\\'/=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'/<=>'.split(''), '\\0\\t\\n\\f\\r \"&\\'/<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.\n unquoted: [\n ['\\t\\n\\f\\r &>'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'<=>`'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.\n single: [\n [\"&'\".split(''), '\"&\\'`'.split('')],\n [\"\\0&'\".split(''), '\\0\"&\\'`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.\n double: [\n ['\"&'.split(''), '\"&\\'`'.split('')],\n ['\\0\"&'.split(''), '\\0\"&\\'`'.split('')]\n ]\n}\n\n/**\n * Serialize an element node.\n *\n * @param {Element} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function element(node, index, parent, state) {\n const schema = state.schema\n const omit = schema.space === 'svg' ? false : state.settings.omitOptionalTags\n let selfClosing =\n schema.space === 'svg'\n ? state.settings.closeEmptyElements\n : state.settings.voids.includes(node.tagName.toLowerCase())\n /** @type {Array<string>} */\n const parts = []\n /** @type {string} */\n let last\n\n if (schema.space === 'html' && node.tagName === 'svg') {\n state.schema = svg\n }\n\n const attributes = serializeAttributes(state, node.properties)\n\n const content = state.all(\n schema.space === 'html' && node.tagName === 'template' ? node.content : node\n )\n\n state.schema = schema\n\n // If the node is categorised as void, but it has children, remove the\n // categorisation.\n // This enables for example `menuitem`s, which are void in W3C HTML but not\n // void in WHATWG HTML, to be stringified properly.\n // Note: `menuitem` has since been removed from the HTML spec, and so is no\n // longer void.\n if (content) selfClosing = false\n\n if (attributes || !omit || !opening(node, index, parent)) {\n parts.push('<', node.tagName, attributes ? ' ' + attributes : '')\n\n if (\n selfClosing &&\n (schema.space === 'svg' || state.settings.closeSelfClosing)\n ) {\n last = attributes.charAt(attributes.length - 1)\n if (\n !state.settings.tightSelfClosing ||\n last === '/' ||\n (last && last !== '\"' && last !== \"'\")\n ) {\n parts.push(' ')\n }\n\n parts.push('/')\n }\n\n parts.push('>')\n }\n\n parts.push(content)\n\n if (!selfClosing && (!omit || !closing(node, index, parent))) {\n parts.push('</' + node.tagName + '>')\n }\n\n return parts.join('')\n}\n\n/**\n * @param {State} state\n * @param {Properties | null | undefined} properties\n * @returns {string}\n */\nfunction serializeAttributes(state, properties) {\n /** @type {Array<string>} */\n const values = []\n let index = -1\n /** @type {string} */\n let key\n\n if (properties) {\n for (key in properties) {\n if (properties[key] !== null && properties[key] !== undefined) {\n const value = serializeAttribute(state, key, properties[key])\n if (value) values.push(value)\n }\n }\n }\n\n while (++index < values.length) {\n const last = state.settings.tightAttributes\n ? values[index].charAt(values[index].length - 1)\n : undefined\n\n // In tight mode, don’t add a space after quoted attributes.\n if (index !== values.length - 1 && last !== '\"' && last !== \"'\") {\n values[index] += ' '\n }\n }\n\n return values.join('')\n}\n\n/**\n * @param {State} state\n * @param {string} key\n * @param {Properties[keyof Properties]} value\n * @returns {string}\n */\nfunction serializeAttribute(state, key, value) {\n const info = find(state.schema, key)\n const x =\n state.settings.allowParseErrors && state.schema.space === 'html' ? 0 : 1\n const y = state.settings.allowDangerousCharacters ? 0 : 1\n let quote = state.quote\n /** @type {string | undefined} */\n let result\n\n if (info.overloadedBoolean && (value === info.attribute || value === '')) {\n value = true\n } else if (\n info.boolean ||\n (info.overloadedBoolean && typeof value !== 'string')\n ) {\n value = Boolean(value)\n }\n\n if (\n value === null ||\n value === undefined ||\n value === false ||\n (typeof value === 'number' && Number.isNaN(value))\n ) {\n return ''\n }\n\n const name = stringifyEntities(\n info.attribute,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: constants.name[x][y]\n })\n )\n\n // No value.\n // There is currently only one boolean property in SVG: `[download]` on\n // `<a>`.\n // This property does not seem to work in browsers (Firefox, Safari, Chrome),\n // so I can’t test if dropping the value works.\n // But I assume that it should:\n //\n // ```html\n // <!doctype html>\n // <svg viewBox=\"0 0 100 100\">\n // <a href=https://example.com download>\n // <circle cx=50 cy=40 r=35 />\n // </a>\n // </svg>\n // ```\n //\n // See: <https://github.com/wooorm/property-information/blob/main/lib/svg.js>\n if (value === true) return name\n\n // `spaces` doesn’t accept a second argument, but it’s given here just to\n // keep the code cleaner.\n value = Array.isArray(value)\n ? (info.commaSeparated ? commas : spaces)(value, {\n padLeft: !state.settings.tightCommaSeparatedLists\n })\n : String(value)\n\n if (state.settings.collapseEmptyAttributes && !value) return name\n\n // Check unquoted value.\n if (state.settings.preferUnquoted) {\n result = stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n attribute: true,\n subset: constants.unquoted[x][y]\n })\n )\n }\n\n // If we don’t want unquoted, or if `value` contains character references when\n // unquoted…\n if (result !== value) {\n // If the alternative is less common than `quote`, switch.\n if (\n state.settings.quoteSmart &&\n ccount(value, quote) > ccount(value, state.alternative)\n ) {\n quote = state.alternative\n }\n\n result =\n quote +\n stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: (quote === \"'\" ? constants.single : constants.double)[x][y],\n attribute: true\n })\n ) +\n quote\n }\n\n // Don’t add a `=` for unquoted empties.\n return name + (result ? '=' + result : result)\n}\n"],"names":["commas","spaces"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../zwitch/index.cjs");
|
|
4
|
-
const comment = require("./comment.cjs");
|
|
5
|
-
const doctype = require("./doctype.cjs");
|
|
6
|
-
const element = require("./element.cjs");
|
|
7
|
-
const raw = require("./raw.cjs");
|
|
8
|
-
const root = require("./root.cjs");
|
|
9
|
-
const text = require("./text.cjs");
|
|
10
|
-
const handle = index.zwitch("type", {
|
|
11
|
-
invalid,
|
|
12
|
-
unknown,
|
|
13
|
-
handlers: { comment: comment.comment, doctype: doctype.doctype, element: element.element, raw: raw.raw, root: root.root, text: text.text }
|
|
14
|
-
});
|
|
15
|
-
function invalid(node) {
|
|
16
|
-
throw new Error("Expected node, not `" + node + "`");
|
|
17
|
-
}
|
|
18
|
-
function unknown(node_) {
|
|
19
|
-
const node = (
|
|
20
|
-
/** @type {Nodes} */
|
|
21
|
-
node_
|
|
22
|
-
);
|
|
23
|
-
throw new Error("Cannot compile unknown node `" + node.type + "`");
|
|
24
|
-
}
|
|
25
|
-
exports.handle = handle;
|
|
26
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {zwitch} from 'zwitch'\nimport {comment} from './comment.js'\nimport {doctype} from './doctype.js'\nimport {element} from './element.js'\nimport {raw} from './raw.js'\nimport {root} from './root.js'\nimport {text} from './text.js'\n\n/**\n * @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}\n */\nexport const handle = zwitch('type', {\n invalid,\n unknown,\n handlers: {comment, doctype, element, raw, root, text}\n})\n\n/**\n * Fail when a non-node is found in the tree.\n *\n * @param {unknown} node\n * Unknown value.\n * @returns {never}\n * Never.\n */\nfunction invalid(node) {\n throw new Error('Expected node, not `' + node + '`')\n}\n\n/**\n * Fail when a node with an unknown type is found in the tree.\n *\n * @param {unknown} node_\n * Unknown node.\n * @returns {never}\n * Never.\n */\nfunction unknown(node_) {\n // `type` is guaranteed by runtime JS.\n const node = /** @type {Nodes} */ (node_)\n throw new Error('Cannot compile unknown node `' + node.type + '`')\n}\n"],"names":["zwitch","comment","doctype","element","raw","root","text"],"mappings":";;;;;;;;;AAkBY,MAAC,SAASA,MAAM,OAAC,QAAQ;AAAA,EACnC;AAAA,EACA;AAAA,EACA,UAAU,EAACC,SAAAA,QAAAA,kBAASC,QAAO,SAAA,SAAEC,QAAO,SAAA,KAAEC,IAAG,KAAA,MAAEC,KAAI,MAAA,MAAEC,UAAI;AACvD,CAAC;AAUD,SAAS,QAAQ,MAAM;AACrB,QAAM,IAAI,MAAM,yBAAyB,OAAO,GAAG;AACrD;AAUA,SAAS,QAAQ,OAAO;AAEtB,QAAM;AAAA;AAAA,IAA6B;AAAA;AACnC,QAAM,IAAI,MAAM,kCAAkC,KAAK,OAAO,GAAG;AACnE;;","x_google_ignoreList":[0]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { zwitch } from "../../../zwitch/index.js";
|
|
2
|
-
import { comment } from "./comment.js";
|
|
3
|
-
import { doctype } from "./doctype.js";
|
|
4
|
-
import { element } from "./element.js";
|
|
5
|
-
import { raw } from "./raw.js";
|
|
6
|
-
import { root } from "./root.js";
|
|
7
|
-
import { text } from "./text.js";
|
|
8
|
-
const handle = zwitch("type", {
|
|
9
|
-
invalid,
|
|
10
|
-
unknown,
|
|
11
|
-
handlers: { comment, doctype, element, raw, root, text }
|
|
12
|
-
});
|
|
13
|
-
function invalid(node) {
|
|
14
|
-
throw new Error("Expected node, not `" + node + "`");
|
|
15
|
-
}
|
|
16
|
-
function unknown(node_) {
|
|
17
|
-
const node = (
|
|
18
|
-
/** @type {Nodes} */
|
|
19
|
-
node_
|
|
20
|
-
);
|
|
21
|
-
throw new Error("Cannot compile unknown node `" + node.type + "`");
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
handle
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {zwitch} from 'zwitch'\nimport {comment} from './comment.js'\nimport {doctype} from './doctype.js'\nimport {element} from './element.js'\nimport {raw} from './raw.js'\nimport {root} from './root.js'\nimport {text} from './text.js'\n\n/**\n * @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}\n */\nexport const handle = zwitch('type', {\n invalid,\n unknown,\n handlers: {comment, doctype, element, raw, root, text}\n})\n\n/**\n * Fail when a non-node is found in the tree.\n *\n * @param {unknown} node\n * Unknown value.\n * @returns {never}\n * Never.\n */\nfunction invalid(node) {\n throw new Error('Expected node, not `' + node + '`')\n}\n\n/**\n * Fail when a node with an unknown type is found in the tree.\n *\n * @param {unknown} node_\n * Unknown node.\n * @returns {never}\n * Never.\n */\nfunction unknown(node_) {\n // `type` is guaranteed by runtime JS.\n const node = /** @type {Nodes} */ (node_)\n throw new Error('Cannot compile unknown node `' + node.type + '`')\n}\n"],"names":[],"mappings":";;;;;;;AAkBY,MAAC,SAAS,OAAO,QAAQ;AAAA,EACnC;AAAA,EACA;AAAA,EACA,UAAU,EAAC,SAAS,SAAS,SAAS,KAAK,MAAM,KAAI;AACvD,CAAC;AAUD,SAAS,QAAQ,MAAM;AACrB,QAAM,IAAI,MAAM,yBAAyB,OAAO,GAAG;AACrD;AAUA,SAAS,QAAQ,OAAO;AAEtB,QAAM;AAAA;AAAA,IAA6B;AAAA;AACnC,QAAM,IAAI,MAAM,kCAAkC,KAAK,OAAO,GAAG;AACnE;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const text = require("./text.cjs");
|
|
4
|
-
function raw(node, index, parent, state) {
|
|
5
|
-
return state.settings.allowDangerousHtml ? node.value : text.text(node, index, parent, state);
|
|
6
|
-
}
|
|
7
|
-
exports.raw = raw;
|
|
8
|
-
//# sourceMappingURL=raw.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"raw.cjs","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/raw.js"],"sourcesContent":["/**\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('mdast-util-to-hast').Raw} Raw\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {text} from './text.js'\n\n/**\n * Serialize a raw node.\n *\n * @param {Raw} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function raw(node, index, parent, state) {\n return state.settings.allowDangerousHtml\n ? node.value\n : text(node, index, parent, state)\n}\n"],"names":["text"],"mappings":";;;AAwBO,SAAS,IAAI,MAAM,OAAO,QAAQ,OAAO;AAC9C,SAAO,MAAM,SAAS,qBAClB,KAAK,QACLA,KAAAA,KAAK,MAAM,OAAO,QAAQ,KAAK;AACrC;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"raw.js","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/raw.js"],"sourcesContent":["/**\n * @typedef {import('hast').Parents} Parents\n *\n * @typedef {import('mdast-util-to-hast').Raw} Raw\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {text} from './text.js'\n\n/**\n * Serialize a raw node.\n *\n * @param {Raw} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function raw(node, index, parent, state) {\n return state.settings.allowDangerousHtml\n ? node.value\n : text(node, index, parent, state)\n}\n"],"names":[],"mappings":";AAwBO,SAAS,IAAI,MAAM,OAAO,QAAQ,OAAO;AAC9C,SAAO,MAAM,SAAS,qBAClB,KAAK,QACL,KAAK,MAAM,OAAO,QAAQ,KAAK;AACrC;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root.cjs","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/root.js"],"sourcesContent":["/**\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Root} Root\n *\n * @typedef {import('../index.js').State} State\n */\n\n// Make VS code see references to the above types.\n''\n\n/**\n * Serialize a root.\n *\n * @param {Root} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function root(node, _1, _2, state) {\n return state.all(node)\n}\n"],"names":[],"mappings":";;AAwBO,SAAS,KAAK,MAAM,IAAI,IAAI,OAAO;AACxC,SAAO,MAAM,IAAI,IAAI;AACvB;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/root.js"],"sourcesContent":["/**\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Root} Root\n *\n * @typedef {import('../index.js').State} State\n */\n\n// Make VS code see references to the above types.\n''\n\n/**\n * Serialize a root.\n *\n * @param {Root} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function root(node, _1, _2, state) {\n return state.all(node)\n}\n"],"names":[],"mappings":"AAwBO,SAAS,KAAK,MAAM,IAAI,IAAI,OAAO;AACxC,SAAO,MAAM,IAAI,IAAI;AACvB;","x_google_ignoreList":[0]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../stringify-entities/lib/index.cjs");
|
|
4
|
-
const textEntitySubset = ["<", "&"];
|
|
5
|
-
function text(node, _, parent, state) {
|
|
6
|
-
return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : index.stringifyEntities(
|
|
7
|
-
node.value,
|
|
8
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
9
|
-
subset: textEntitySubset
|
|
10
|
-
})
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
exports.text = text;
|
|
14
|
-
//# sourceMappingURL=text.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.cjs","sources":["../../../../../node_modules/hast-util-to-html/lib/handle/text.js"],"sourcesContent":["/**\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Text} Text\n *\n * @typedef {import('mdast-util-to-hast').Raw} Raw\n *\n * @typedef {import('../index.js').State} State\n */\n\nimport {stringifyEntities} from 'stringify-entities'\n\n// Declare array as variable so it can be cached by `stringifyEntities`\nconst textEntitySubset = ['<', '&']\n\n/**\n * Serialize a text node.\n *\n * @param {Raw | Text} node\n * Node to handle.\n * @param {number | undefined} _\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function text(node, _, parent, state) {\n // Check if content of `node` should be escaped.\n return parent &&\n parent.type === 'element' &&\n (parent.tagName === 'script' || parent.tagName === 'style')\n ? node.value\n : stringifyEntities(\n node.value,\n Object.assign({}, state.settings.characterReferences, {\n subset: textEntitySubset\n })\n )\n}\n"],"names":["stringifyEntities"],"mappings":";;;AAYA,MAAM,mBAAmB,CAAC,KAAK,GAAG;AAgB3B,SAAS,KAAK,MAAM,GAAG,QAAQ,OAAO;AAE3C,SAAO,UACL,OAAO,SAAS,cACf,OAAO,YAAY,YAAY,OAAO,YAAY,WACjD,KAAK,QACLA,MAAiB;AAAA,IACf,KAAK;AAAA,IACL,OAAO,OAAO,CAAA,GAAI,MAAM,SAAS,qBAAqB;AAAA,MACpD,QAAQ;AAAA,IAClB,CAAS;AAAA,EACF;AACP;;","x_google_ignoreList":[0]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { stringifyEntities } from "../../../stringify-entities/lib/index.js";
|
|
2
|
-
const textEntitySubset = ["<", "&"];
|
|
3
|
-
function text(node, _, parent, state) {
|
|
4
|
-
return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(
|
|
5
|
-
node.value,
|
|
6
|
-
Object.assign({}, state.settings.characterReferences, {
|
|
7
|
-
subset: textEntitySubset
|
|
8
|
-
})
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
text
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=text.js.map
|