@prismicio/client 7.7.4 → 7.7.5-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs +63 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js +63 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs +12 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js +12 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs +127 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js +127 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs +23 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs.map +1 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js +23 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js.map +1 -0
- package/dist/_node_modules/bail/index.cjs +9 -0
- package/dist/_node_modules/bail/index.cjs.map +1 -0
- package/dist/_node_modules/bail/index.js +9 -0
- package/dist/_node_modules/bail/index.js.map +1 -0
- package/dist/_node_modules/bcp-47-match/index.cjs +74 -0
- package/dist/_node_modules/bcp-47-match/index.cjs.map +1 -0
- package/dist/_node_modules/bcp-47-match/index.js +74 -0
- package/dist/_node_modules/bcp-47-match/index.js.map +1 -0
- package/dist/_node_modules/boolbase/index.cjs +13 -0
- package/dist/_node_modules/boolbase/index.cjs.map +1 -0
- package/dist/_node_modules/boolbase/index.js +14 -0
- package/dist/_node_modules/boolbase/index.js.map +1 -0
- package/dist/_node_modules/ccount/index.cjs +17 -0
- package/dist/_node_modules/ccount/index.cjs.map +1 -0
- package/dist/_node_modules/ccount/index.js +17 -0
- package/dist/_node_modules/ccount/index.js.map +1 -0
- package/dist/_node_modules/character-entities/index.cjs +2131 -0
- package/dist/_node_modules/character-entities/index.cjs.map +1 -0
- package/dist/_node_modules/character-entities/index.js +2131 -0
- package/dist/_node_modules/character-entities/index.js.map +1 -0
- package/dist/_node_modules/character-entities-html4/index.cjs +258 -0
- package/dist/_node_modules/character-entities-html4/index.cjs.map +1 -0
- package/dist/_node_modules/character-entities-html4/index.js +258 -0
- package/dist/_node_modules/character-entities-html4/index.js.map +1 -0
- package/dist/_node_modules/character-entities-legacy/index.cjs +112 -0
- package/dist/_node_modules/character-entities-legacy/index.cjs.map +1 -0
- package/dist/_node_modules/character-entities-legacy/index.js +112 -0
- package/dist/_node_modules/character-entities-legacy/index.js.map +1 -0
- package/dist/_node_modules/comma-separated-tokens/index.cjs +32 -0
- package/dist/_node_modules/comma-separated-tokens/index.cjs.map +1 -0
- package/dist/_node_modules/comma-separated-tokens/index.js +32 -0
- package/dist/_node_modules/comma-separated-tokens/index.js.map +1 -0
- package/dist/_node_modules/devlop/lib/default.cjs +6 -0
- package/dist/_node_modules/devlop/lib/default.cjs.map +1 -0
- package/dist/_node_modules/devlop/lib/default.js +6 -0
- package/dist/_node_modules/devlop/lib/default.js.map +1 -0
- package/dist/_node_modules/direction/index.cjs +12 -0
- package/dist/_node_modules/direction/index.cjs.map +1 -0
- package/dist/_node_modules/direction/index.js +12 -0
- package/dist/_node_modules/direction/index.js.map +1 -0
- package/dist/_node_modules/extend/index.cjs +89 -0
- package/dist/_node_modules/extend/index.cjs.map +1 -0
- package/dist/_node_modules/extend/index.js +90 -0
- package/dist/_node_modules/extend/index.js.map +1 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs +14 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.js +14 -0
- package/dist/_node_modules/hast-util-embedded/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs +317 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.js +317 -0
- package/dist/_node_modules/hast-util-from-html/lib/errors.js.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs +96 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.js +96 -0
- package/dist/_node_modules/hast-util-from-html/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs +187 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js +187 -0
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs +9 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.js +9 -0
- package/dist/_node_modules/hast-util-has-property/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs +102 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.js +102 -0
- package/dist/_node_modules/hast-util-is-element/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs +40 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js +40 -0
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs +67 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.js +67 -0
- package/dist/_node_modules/hast-util-select/lib/attribute.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs +12 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.js +12 -0
- package/dist/_node_modules/hast-util-select/lib/class-name.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs +79 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.js +79 -0
- package/dist/_node_modules/hast-util-select/lib/enter-state.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/id.cjs +7 -0
- package/dist/_node_modules/hast-util-select/lib/id.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/id.js +7 -0
- package/dist/_node_modules/hast-util-select/lib/id.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/index.cjs +38 -0
- package/dist/_node_modules/hast-util-select/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/index.js +38 -0
- package/dist/_node_modules/hast-util-select/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/name.cjs +7 -0
- package/dist/_node_modules/hast-util-select/lib/name.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/name.js +7 -0
- package/dist/_node_modules/hast-util-select/lib/name.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/parse.cjs +12 -0
- package/dist/_node_modules/hast-util-select/lib/parse.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/parse.js +12 -0
- package/dist/_node_modules/hast-util-select/lib/parse.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs +231 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.js +231 -0
- package/dist/_node_modules/hast-util-select/lib/pseudo.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/test.cjs +27 -0
- package/dist/_node_modules/hast-util-select/lib/test.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/test.js +27 -0
- package/dist/_node_modules/hast-util-select/lib/test.js.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/walk.cjs +132 -0
- package/dist/_node_modules/hast-util-select/lib/walk.cjs.map +1 -0
- package/dist/_node_modules/hast-util-select/lib/walk.js +132 -0
- package/dist/_node_modules/hast-util-select/lib/walk.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs +137 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js +137 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs +26 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js +26 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs +8 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js +8 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js +7 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs +14 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js +14 -0
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs +62 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.js +62 -0
- package/dist/_node_modules/hast-util-to-html/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs +92 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js +92 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs +11 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js +11 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs +52 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js +52 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js +24 -0
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js.map +1 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs +24 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.js +24 -0
- package/dist/_node_modules/hast-util-to-string/lib/index.js.map +1 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs +11 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.js +11 -0
- package/dist/_node_modules/hast-util-whitespace/lib/index.js.map +1 -0
- package/dist/_node_modules/hastscript/lib/create-h.cjs +159 -0
- package/dist/_node_modules/hastscript/lib/create-h.cjs.map +1 -0
- package/dist/_node_modules/hastscript/lib/create-h.js +159 -0
- package/dist/_node_modules/hastscript/lib/create-h.js.map +1 -0
- package/dist/_node_modules/hastscript/lib/index.cjs +10 -0
- package/dist/_node_modules/hastscript/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hastscript/lib/index.js +10 -0
- package/dist/_node_modules/hastscript/lib/index.js.map +1 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs +45 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.map +1 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +45 -0
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js.map +1 -0
- package/dist/_node_modules/html-void-elements/index.cjs +26 -0
- package/dist/_node_modules/html-void-elements/index.cjs.map +1 -0
- package/dist/_node_modules/html-void-elements/index.js +26 -0
- package/dist/_node_modules/html-void-elements/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs +720 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js +720 -0
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs +116 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js +116 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs +42 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +42 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs +12 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js +12 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs +20 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +20 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs +17 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js +17 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs +60 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js +60 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +25 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs +19 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js +19 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs +65 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js +65 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs +27 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js +27 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js +9 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs +15 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +15 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs +36 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js +36 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs +40 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js +40 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs +10 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js +10 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +14 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js +16 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs +30 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js +30 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs +149 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js +149 -0
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js.map +1 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs +39 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs.map +1 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.js +39 -0
- package/dist/_node_modules/mdast-util-to-string/lib/index.js.map +1 -0
- package/dist/_node_modules/micromark/lib/constructs.cjs +94 -0
- package/dist/_node_modules/micromark/lib/constructs.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/constructs.js +94 -0
- package/dist/_node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs +316 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.js +316 -0
- package/dist/_node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/content.cjs +58 -0
- package/dist/_node_modules/micromark/lib/initialize/content.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/content.js +58 -0
- package/dist/_node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/document.cjs +212 -0
- package/dist/_node_modules/micromark/lib/initialize/document.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/document.js +212 -0
- package/dist/_node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs +55 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.js +55 -0
- package/dist/_node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/text.cjs +143 -0
- package/dist/_node_modules/micromark/lib/initialize/text.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/initialize/text.js +143 -0
- package/dist/_node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/_node_modules/micromark/lib/parse.cjs +35 -0
- package/dist/_node_modules/micromark/lib/parse.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/parse.js +35 -0
- package/dist/_node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/_node_modules/micromark/lib/postprocess.cjs +10 -0
- package/dist/_node_modules/micromark/lib/postprocess.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/postprocess.js +10 -0
- package/dist/_node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/_node_modules/micromark/lib/preprocess.cjs +81 -0
- package/dist/_node_modules/micromark/lib/preprocess.cjs.map +1 -0
- package/dist/_node_modules/micromark/lib/preprocess.js +81 -0
- package/dist/_node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs +116 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js +116 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs +104 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js +104 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs +19 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js +19 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs +62 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js +62 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs +29 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js +29 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs +69 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js +69 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs +187 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js +187 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs +68 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js +68 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs +117 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js +117 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs +76 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js +76 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs +95 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js +95 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs +24 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js +24 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs +96 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js +96 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs +384 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js +384 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs +310 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js +310 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs +219 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js +219 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs +34 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js +34 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs +25 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js +25 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs +18 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js +18 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs +136 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js +136 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs +90 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js +90 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs +43 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs.map +1 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js +43 -0
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/_node_modules/micromark-factory-destination/index.cjs +95 -0
- package/dist/_node_modules/micromark-factory-destination/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-destination/index.js +95 -0
- package/dist/_node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-label/index.cjs +64 -0
- package/dist/_node_modules/micromark-factory-label/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-label/index.js +64 -0
- package/dist/_node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-space/index.cjs +25 -0
- package/dist/_node_modules/micromark-factory-space/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-space/index.js +25 -0
- package/dist/_node_modules/micromark-factory-space/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-title/index.cjs +66 -0
- package/dist/_node_modules/micromark-factory-title/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-title/index.js +66 -0
- package/dist/_node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs +27 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.js +27 -0
- package/dist/_node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-character/index.cjs +45 -0
- package/dist/_node_modules/micromark-util-character/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-character/index.js +45 -0
- package/dist/_node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-chunked/index.cjs +37 -0
- package/dist/_node_modules/micromark-util-chunked/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-chunked/index.js +37 -0
- package/dist/_node_modules/micromark-util-chunked/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-classify-character/index.cjs +13 -0
- package/dist/_node_modules/micromark-util-classify-character/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-classify-character/index.js +13 -0
- package/dist/_node_modules/micromark-util-classify-character/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs +42 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.js +42 -0
- package/dist/_node_modules/micromark-util-combine-extensions/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs +20 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js +20 -0
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-decode-string/index.cjs +22 -0
- package/dist/_node_modules/micromark-util-decode-string/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-decode-string/index.js +22 -0
- package/dist/_node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs +70 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.js +70 -0
- package/dist/_node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs +7 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js +7 -0
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs +16 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.js +16 -0
- package/dist/_node_modules/micromark-util-resolve-all/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs +42 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js +42 -0
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs +149 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.js +149 -0
- package/dist/_node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs +195 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs.map +1 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js +195 -0
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs +20 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.js +20 -0
- package/dist/_node_modules/nth-check/lib/esm/compile.js.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/index.cjs +11 -0
- package/dist/_node_modules/nth-check/lib/esm/index.cjs.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/index.js +11 -0
- package/dist/_node_modules/nth-check/lib/esm/index.js.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs +59 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs.map +1 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.js +59 -0
- package/dist/_node_modules/nth-check/lib/esm/parse.js.map +1 -0
- package/dist/_node_modules/property-information/index.cjs +14 -0
- package/dist/_node_modules/property-information/index.cjs.map +1 -0
- package/dist/_node_modules/property-information/index.js +14 -0
- package/dist/_node_modules/property-information/index.js.map +1 -0
- package/dist/_node_modules/property-information/lib/aria.cjs +62 -0
- package/dist/_node_modules/property-information/lib/aria.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/aria.js +62 -0
- package/dist/_node_modules/property-information/lib/aria.js.map +1 -0
- package/dist/_node_modules/property-information/lib/find.cjs +41 -0
- package/dist/_node_modules/property-information/lib/find.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/find.js +41 -0
- package/dist/_node_modules/property-information/lib/find.js.map +1 -0
- package/dist/_node_modules/property-information/lib/html.cjs +369 -0
- package/dist/_node_modules/property-information/lib/html.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/html.js +369 -0
- package/dist/_node_modules/property-information/lib/html.js.map +1 -0
- package/dist/_node_modules/property-information/lib/normalize.cjs +7 -0
- package/dist/_node_modules/property-information/lib/normalize.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/normalize.js +7 -0
- package/dist/_node_modules/property-information/lib/normalize.js.map +1 -0
- package/dist/_node_modules/property-information/lib/svg.cjs +567 -0
- package/dist/_node_modules/property-information/lib/svg.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/svg.js +567 -0
- package/dist/_node_modules/property-information/lib/svg.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs +8 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js +8 -0
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs +7 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js +7 -0
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/create.cjs +31 -0
- package/dist/_node_modules/property-information/lib/util/create.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/create.js +31 -0
- package/dist/_node_modules/property-information/lib/util/create.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs +33 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.js +33 -0
- package/dist/_node_modules/property-information/lib/util/defined-info.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/info.cjs +25 -0
- package/dist/_node_modules/property-information/lib/util/info.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/info.js +25 -0
- package/dist/_node_modules/property-information/lib/util/info.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/merge.cjs +15 -0
- package/dist/_node_modules/property-information/lib/util/merge.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/merge.js +15 -0
- package/dist/_node_modules/property-information/lib/util/merge.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/schema.cjs +22 -0
- package/dist/_node_modules/property-information/lib/util/schema.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/schema.js +22 -0
- package/dist/_node_modules/property-information/lib/util/schema.js.map +1 -0
- package/dist/_node_modules/property-information/lib/util/types.cjs +21 -0
- package/dist/_node_modules/property-information/lib/util/types.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/util/types.js +21 -0
- package/dist/_node_modules/property-information/lib/util/types.js.map +1 -0
- package/dist/_node_modules/property-information/lib/xlink.cjs +20 -0
- package/dist/_node_modules/property-information/lib/xlink.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/xlink.js +20 -0
- package/dist/_node_modules/property-information/lib/xlink.js.map +1 -0
- package/dist/_node_modules/property-information/lib/xml.cjs +12 -0
- package/dist/_node_modules/property-information/lib/xml.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/xml.js +12 -0
- package/dist/_node_modules/property-information/lib/xml.js.map +1 -0
- package/dist/_node_modules/property-information/lib/xmlns.cjs +12 -0
- package/dist/_node_modules/property-information/lib/xmlns.cjs.map +1 -0
- package/dist/_node_modules/property-information/lib/xmlns.js +12 -0
- package/dist/_node_modules/property-information/lib/xmlns.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs +122 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js +122 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs +11 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js +11 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs +169 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js +170 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs +24 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs.map +1 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js +24 -0
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js.map +1 -0
- package/dist/_node_modules/rehype-parse/lib/index.cjs +21 -0
- package/dist/_node_modules/rehype-parse/lib/index.cjs.map +1 -0
- package/dist/_node_modules/rehype-parse/lib/index.js +22 -0
- package/dist/_node_modules/rehype-parse/lib/index.js.map +1 -0
- package/dist/_node_modules/remark-parse/lib/index.cjs +19 -0
- package/dist/_node_modules/remark-parse/lib/index.cjs.map +1 -0
- package/dist/_node_modules/remark-parse/lib/index.js +20 -0
- package/dist/_node_modules/remark-parse/lib/index.js.map +1 -0
- package/dist/_node_modules/remark-rehype/lib/index.cjs +21 -0
- package/dist/_node_modules/remark-rehype/lib/index.cjs.map +1 -0
- package/dist/_node_modules/remark-rehype/lib/index.js +22 -0
- package/dist/_node_modules/remark-rehype/lib/index.js.map +1 -0
- package/dist/_node_modules/space-separated-tokens/index.cjs +12 -0
- package/dist/_node_modules/space-separated-tokens/index.cjs.map +1 -0
- package/dist/_node_modules/space-separated-tokens/index.js +12 -0
- package/dist/_node_modules/space-separated-tokens/index.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs +14 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js +14 -0
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/core.cjs +52 -0
- package/dist/_node_modules/stringify-entities/lib/core.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/core.js +52 -0
- package/dist/_node_modules/stringify-entities/lib/core.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/index.cjs +9 -0
- package/dist/_node_modules/stringify-entities/lib/index.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/index.js +9 -0
- package/dist/_node_modules/stringify-entities/lib/index.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs +26 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js +26 -0
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js +9 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs +28 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs.map +1 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js +28 -0
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js.map +1 -0
- package/dist/_node_modules/trim-lines/index.cjs +42 -0
- package/dist/_node_modules/trim-lines/index.cjs.map +1 -0
- package/dist/_node_modules/trim-lines/index.js +42 -0
- package/dist/_node_modules/trim-lines/index.js.map +1 -0
- package/dist/_node_modules/trough/lib/index.cjs +87 -0
- package/dist/_node_modules/trough/lib/index.cjs.map +1 -0
- package/dist/_node_modules/trough/lib/index.js +87 -0
- package/dist/_node_modules/trough/lib/index.js.map +1 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs +10 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs.map +1 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js +11 -0
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/_node_modules/unified/lib/callable-instance.cjs +31 -0
- package/dist/_node_modules/unified/lib/callable-instance.cjs.map +1 -0
- package/dist/_node_modules/unified/lib/callable-instance.js +31 -0
- package/dist/_node_modules/unified/lib/callable-instance.js.map +1 -0
- package/dist/_node_modules/unified/lib/index.cjs +637 -0
- package/dist/_node_modules/unified/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unified/lib/index.js +637 -0
- package/dist/_node_modules/unified/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-is/lib/index.cjs +94 -0
- package/dist/_node_modules/unist-util-is/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-is/lib/index.js +94 -0
- package/dist/_node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-position/lib/index.cjs +28 -0
- package/dist/_node_modules/unist-util-position/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-position/lib/index.js +28 -0
- package/dist/_node_modules/unist-util-position/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-remove/lib/index.cjs +39 -0
- package/dist/_node_modules/unist-util-remove/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-remove/lib/index.js +39 -0
- package/dist/_node_modules/unist-util-remove/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs +28 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js +28 -0
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-visit/lib/index.cjs +28 -0
- package/dist/_node_modules/unist-util-visit/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit/lib/index.js +29 -0
- package/dist/_node_modules/unist-util-visit/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs +7 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js +7 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs +84 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js +84 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/_node_modules/vfile/lib/index.cjs +463 -0
- package/dist/_node_modules/vfile/lib/index.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/index.js +463 -0
- package/dist/_node_modules/vfile/lib/index.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs +215 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.js +215 -0
- package/dist/_node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs +8 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.js +8 -0
- package/dist/_node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs +47 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.js +47 -0
- package/dist/_node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs +10 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs.map +1 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.js +10 -0
- package/dist/_node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/_node_modules/vfile-location/lib/index.cjs +50 -0
- package/dist/_node_modules/vfile-location/lib/index.cjs.map +1 -0
- package/dist/_node_modules/vfile-location/lib/index.js +50 -0
- package/dist/_node_modules/vfile-location/lib/index.js.map +1 -0
- package/dist/_node_modules/vfile-message/lib/index.cjs +139 -0
- package/dist/_node_modules/vfile-message/lib/index.cjs.map +1 -0
- package/dist/_node_modules/vfile-message/lib/index.js +139 -0
- package/dist/_node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/_node_modules/web-namespaces/index.cjs +12 -0
- package/dist/_node_modules/web-namespaces/index.cjs.map +1 -0
- package/dist/_node_modules/web-namespaces/index.js +12 -0
- package/dist/_node_modules/web-namespaces/index.js.map +1 -0
- package/dist/_node_modules/zwitch/index.cjs +23 -0
- package/dist/_node_modules/zwitch/index.cjs.map +1 -0
- package/dist/_node_modules/zwitch/index.js +23 -0
- package/dist/_node_modules/zwitch/index.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +7 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.cjs +9 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +9 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/helpers/unstable_htmlAsRichText.cjs +3 -3
- package/dist/helpers/unstable_htmlAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_htmlAsRichText.js +2 -2
- package/dist/helpers/unstable_markdownAsRichText.cjs +4 -4
- package/dist/helpers/unstable_markdownAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_markdownAsRichText.js +3 -3
- package/dist/lib/hastSerializerHelpers.cjs +2 -2
- package/dist/lib/hastSerializerHelpers.cjs.map +1 -1
- package/dist/lib/hastSerializerHelpers.js +1 -1
- package/dist/lib/hastToRichText.cjs +5 -5
- package/dist/lib/hastToRichText.cjs.map +1 -1
- package/dist/lib/hastToRichText.js +2 -2
- package/dist/lib/hastToRichText.js.map +1 -1
- package/dist/lib/rehypeRichText.cjs +13 -12
- package/dist/lib/rehypeRichText.cjs.map +1 -1
- package/dist/lib/rehypeRichText.js +5 -4
- package/dist/lib/rehypeRichText.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +15 -13
- package/src/lib/hastToRichText.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-text.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/html-text.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiAlpha, asciiAlphanumeric, markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n};\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable<Code> | undefined} */\n let marker;\n /** @type {number} */\n let index;\n /** @type {State} */\n let returnState;\n return start;\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"htmlText\");\n effects.enter(\"htmlTextData\");\n effects.consume(code);\n return open;\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * > | a <!doctype> c\n * ^\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code);\n return declarationOpen;\n }\n if (code === 47) {\n effects.consume(code);\n return tagCloseStart;\n }\n if (code === 63) {\n effects.consume(code);\n return instruction;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagOpen;\n }\n return nok(code);\n }\n\n /**\n * After `<!`, at declaration, comment, or CDATA.\n *\n * ```markdown\n * > | a <!doctype> c\n * ^\n * > | a <!--b--> c\n * ^\n * > | a <![CDATA[>&<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code);\n return commentOpenInside;\n }\n if (code === 91) {\n effects.consume(code);\n index = 0;\n return cdataOpenInside;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return declaration;\n }\n return nok(code);\n }\n\n /**\n * In a comment, after `<!-`, at another `-`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return nok(code);\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 45) {\n effects.consume(code);\n return commentClose;\n }\n if (markdownLineEnding(code)) {\n returnState = comment;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return comment;\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return comment(code);\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code);\n }\n\n /**\n * After `<![`, in CDATA, expecting `CDATA[`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = \"CDATA[\";\n if (code === value.charCodeAt(index++)) {\n effects.consume(code);\n return index === value.length ? cdata : cdataOpenInside;\n }\n return nok(code);\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataClose;\n }\n if (markdownLineEnding(code)) {\n returnState = cdata;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return cdata;\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a <!b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code);\n }\n if (markdownLineEnding(code)) {\n returnState = declaration;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return declaration;\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a <?b?> c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 63) {\n effects.consume(code);\n return instructionClose;\n }\n if (markdownLineEnding(code)) {\n returnState = instruction;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return instruction;\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a <?b?> c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code);\n }\n\n /**\n * After `</`, in closing tag, at tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagClose;\n }\n return nok(code);\n }\n\n /**\n * After `</x`, in a tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagClose;\n }\n return tagCloseBetween(code);\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagCloseBetween;\n }\n return end(code);\n }\n\n /**\n * After `<x`, in opening tag name.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpen;\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code);\n return end;\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenBetween;\n }\n return end(code);\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a <b c> d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n return tagOpenAttributeNameAfter(code);\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a <b c> d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeNameAfter;\n }\n return tagOpenBetween(code);\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a <b c=d> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {\n return nok(code);\n }\n if (code === 34 || code === 39) {\n effects.consume(code);\n marker = code;\n return tagOpenAttributeValueQuoted;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code);\n marker = undefined;\n return tagOpenAttributeValueQuotedAfter;\n }\n if (code === null) {\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueQuoted;\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a <b c=d> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) {\n return nok(code);\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code);\n effects.exit(\"htmlTextData\");\n effects.exit(\"htmlText\");\n return ok;\n }\n return nok(code);\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a <!--a\n * ^\n * | b-->\n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit(\"htmlTextData\");\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineEndingAfter;\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a <!--a\n * > | b-->\n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code) ? factorySpace(effects, lineEndingAfterPrefix, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : lineEndingAfterPrefix(code);\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a <!--a\n * > | b-->\n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter(\"htmlTextData\");\n return returnState(code);\n }\n}"],"names":[],"mappings":";;AAWY,MAAC,WAAW;AAAA,EACtB,MAAM;AAAA,EACN,UAAU;AACZ;AAMA,SAAS,iBAAiB,SAAS,IAAI,KAAK;AAC1C,QAAM,OAAO;AAEb,MAAI;AAEJ,MAAI;AAEJ,MAAI;AACJ,SAAO;AAYP,WAAS,MAAM,MAAM;AACnB,YAAQ,MAAM,UAAU;AACxB,YAAQ,MAAM,cAAc;AAC5B,YAAQ,QAAQ,IAAI;AACpB,WAAO;AAAA,EAC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AM;AACnC,YAAQ,MAAM,cAAc;AAC5B,WAAO,YAAY,IAAI;AAAA,EACxB;AACH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index$5 = require("../../micromark-factory-destination/index.cjs");
|
|
4
|
+
const index$7 = require("../../micromark-factory-label/index.cjs");
|
|
5
|
+
const index$6 = require("../../micromark-factory-title/index.cjs");
|
|
6
|
+
const index$4 = require("../../micromark-factory-whitespace/index.cjs");
|
|
7
|
+
const index$3 = require("../../micromark-util-character/index.cjs");
|
|
8
|
+
const index = require("../../micromark-util-chunked/index.cjs");
|
|
9
|
+
const index$2 = require("../../micromark-util-normalize-identifier/index.cjs");
|
|
10
|
+
const index$1 = require("../../micromark-util-resolve-all/index.cjs");
|
|
11
|
+
const labelEnd = {
|
|
12
|
+
name: "labelEnd",
|
|
13
|
+
tokenize: tokenizeLabelEnd,
|
|
14
|
+
resolveTo: resolveToLabelEnd,
|
|
15
|
+
resolveAll: resolveAllLabelEnd
|
|
16
|
+
};
|
|
17
|
+
const resourceConstruct = {
|
|
18
|
+
tokenize: tokenizeResource
|
|
19
|
+
};
|
|
20
|
+
const referenceFullConstruct = {
|
|
21
|
+
tokenize: tokenizeReferenceFull
|
|
22
|
+
};
|
|
23
|
+
const referenceCollapsedConstruct = {
|
|
24
|
+
tokenize: tokenizeReferenceCollapsed
|
|
25
|
+
};
|
|
26
|
+
function resolveAllLabelEnd(events) {
|
|
27
|
+
let index2 = -1;
|
|
28
|
+
while (++index2 < events.length) {
|
|
29
|
+
const token = events[index2][1];
|
|
30
|
+
if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
|
|
31
|
+
events.splice(index2 + 1, token.type === "labelImage" ? 4 : 2);
|
|
32
|
+
token.type = "data";
|
|
33
|
+
index2++;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return events;
|
|
37
|
+
}
|
|
38
|
+
function resolveToLabelEnd(events, context) {
|
|
39
|
+
let index$22 = events.length;
|
|
40
|
+
let offset = 0;
|
|
41
|
+
let token;
|
|
42
|
+
let open;
|
|
43
|
+
let close;
|
|
44
|
+
let media;
|
|
45
|
+
while (index$22--) {
|
|
46
|
+
token = events[index$22][1];
|
|
47
|
+
if (open) {
|
|
48
|
+
if (token.type === "link" || token.type === "labelLink" && token._inactive) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
if (events[index$22][0] === "enter" && token.type === "labelLink") {
|
|
52
|
+
token._inactive = true;
|
|
53
|
+
}
|
|
54
|
+
} else if (close) {
|
|
55
|
+
if (events[index$22][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
|
|
56
|
+
open = index$22;
|
|
57
|
+
if (token.type !== "labelLink") {
|
|
58
|
+
offset = 2;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} else if (token.type === "labelEnd") {
|
|
63
|
+
close = index$22;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const group = {
|
|
67
|
+
type: events[open][1].type === "labelLink" ? "link" : "image",
|
|
68
|
+
start: Object.assign({}, events[open][1].start),
|
|
69
|
+
end: Object.assign({}, events[events.length - 1][1].end)
|
|
70
|
+
};
|
|
71
|
+
const label = {
|
|
72
|
+
type: "label",
|
|
73
|
+
start: Object.assign({}, events[open][1].start),
|
|
74
|
+
end: Object.assign({}, events[close][1].end)
|
|
75
|
+
};
|
|
76
|
+
const text = {
|
|
77
|
+
type: "labelText",
|
|
78
|
+
start: Object.assign({}, events[open + offset + 2][1].end),
|
|
79
|
+
end: Object.assign({}, events[close - 2][1].start)
|
|
80
|
+
};
|
|
81
|
+
media = [["enter", group, context], ["enter", label, context]];
|
|
82
|
+
media = index.push(media, events.slice(open + 1, open + offset + 3));
|
|
83
|
+
media = index.push(media, [["enter", text, context]]);
|
|
84
|
+
media = index.push(media, index$1.resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));
|
|
85
|
+
media = index.push(media, [["exit", text, context], events[close - 2], events[close - 1], ["exit", label, context]]);
|
|
86
|
+
media = index.push(media, events.slice(close + 1));
|
|
87
|
+
media = index.push(media, [["exit", group, context]]);
|
|
88
|
+
index.splice(events, open, events.length, media);
|
|
89
|
+
return events;
|
|
90
|
+
}
|
|
91
|
+
function tokenizeLabelEnd(effects, ok, nok) {
|
|
92
|
+
const self = this;
|
|
93
|
+
let index2 = self.events.length;
|
|
94
|
+
let labelStart;
|
|
95
|
+
let defined;
|
|
96
|
+
while (index2--) {
|
|
97
|
+
if ((self.events[index2][1].type === "labelImage" || self.events[index2][1].type === "labelLink") && !self.events[index2][1]._balanced) {
|
|
98
|
+
labelStart = self.events[index2][1];
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return start;
|
|
103
|
+
function start(code) {
|
|
104
|
+
if (!labelStart) {
|
|
105
|
+
return nok(code);
|
|
106
|
+
}
|
|
107
|
+
if (labelStart._inactive) {
|
|
108
|
+
return labelEndNok(code);
|
|
109
|
+
}
|
|
110
|
+
defined = self.parser.defined.includes(index$2.normalizeIdentifier(self.sliceSerialize({
|
|
111
|
+
start: labelStart.end,
|
|
112
|
+
end: self.now()
|
|
113
|
+
})));
|
|
114
|
+
effects.enter("labelEnd");
|
|
115
|
+
effects.enter("labelMarker");
|
|
116
|
+
effects.consume(code);
|
|
117
|
+
effects.exit("labelMarker");
|
|
118
|
+
effects.exit("labelEnd");
|
|
119
|
+
return after;
|
|
120
|
+
}
|
|
121
|
+
function after(code) {
|
|
122
|
+
if (code === 40) {
|
|
123
|
+
return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);
|
|
124
|
+
}
|
|
125
|
+
if (code === 91) {
|
|
126
|
+
return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);
|
|
127
|
+
}
|
|
128
|
+
return defined ? labelEndOk(code) : labelEndNok(code);
|
|
129
|
+
}
|
|
130
|
+
function referenceNotFull(code) {
|
|
131
|
+
return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);
|
|
132
|
+
}
|
|
133
|
+
function labelEndOk(code) {
|
|
134
|
+
return ok(code);
|
|
135
|
+
}
|
|
136
|
+
function labelEndNok(code) {
|
|
137
|
+
labelStart._balanced = true;
|
|
138
|
+
return nok(code);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function tokenizeResource(effects, ok, nok) {
|
|
142
|
+
return resourceStart;
|
|
143
|
+
function resourceStart(code) {
|
|
144
|
+
effects.enter("resource");
|
|
145
|
+
effects.enter("resourceMarker");
|
|
146
|
+
effects.consume(code);
|
|
147
|
+
effects.exit("resourceMarker");
|
|
148
|
+
return resourceBefore;
|
|
149
|
+
}
|
|
150
|
+
function resourceBefore(code) {
|
|
151
|
+
return index$3.markdownLineEndingOrSpace(code) ? index$4.factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);
|
|
152
|
+
}
|
|
153
|
+
function resourceOpen(code) {
|
|
154
|
+
if (code === 41) {
|
|
155
|
+
return resourceEnd(code);
|
|
156
|
+
}
|
|
157
|
+
return index$5.factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(code);
|
|
158
|
+
}
|
|
159
|
+
function resourceDestinationAfter(code) {
|
|
160
|
+
return index$3.markdownLineEndingOrSpace(code) ? index$4.factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);
|
|
161
|
+
}
|
|
162
|
+
function resourceDestinationMissing(code) {
|
|
163
|
+
return nok(code);
|
|
164
|
+
}
|
|
165
|
+
function resourceBetween(code) {
|
|
166
|
+
if (code === 34 || code === 39 || code === 40) {
|
|
167
|
+
return index$6.factoryTitle(effects, resourceTitleAfter, nok, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(code);
|
|
168
|
+
}
|
|
169
|
+
return resourceEnd(code);
|
|
170
|
+
}
|
|
171
|
+
function resourceTitleAfter(code) {
|
|
172
|
+
return index$3.markdownLineEndingOrSpace(code) ? index$4.factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);
|
|
173
|
+
}
|
|
174
|
+
function resourceEnd(code) {
|
|
175
|
+
if (code === 41) {
|
|
176
|
+
effects.enter("resourceMarker");
|
|
177
|
+
effects.consume(code);
|
|
178
|
+
effects.exit("resourceMarker");
|
|
179
|
+
effects.exit("resource");
|
|
180
|
+
return ok;
|
|
181
|
+
}
|
|
182
|
+
return nok(code);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function tokenizeReferenceFull(effects, ok, nok) {
|
|
186
|
+
const self = this;
|
|
187
|
+
return referenceFull;
|
|
188
|
+
function referenceFull(code) {
|
|
189
|
+
return index$7.factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, "reference", "referenceMarker", "referenceString")(code);
|
|
190
|
+
}
|
|
191
|
+
function referenceFullAfter(code) {
|
|
192
|
+
return self.parser.defined.includes(index$2.normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);
|
|
193
|
+
}
|
|
194
|
+
function referenceFullMissing(code) {
|
|
195
|
+
return nok(code);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function tokenizeReferenceCollapsed(effects, ok, nok) {
|
|
199
|
+
return referenceCollapsedStart;
|
|
200
|
+
function referenceCollapsedStart(code) {
|
|
201
|
+
effects.enter("reference");
|
|
202
|
+
effects.enter("referenceMarker");
|
|
203
|
+
effects.consume(code);
|
|
204
|
+
effects.exit("referenceMarker");
|
|
205
|
+
return referenceCollapsedOpen;
|
|
206
|
+
}
|
|
207
|
+
function referenceCollapsedOpen(code) {
|
|
208
|
+
if (code === 93) {
|
|
209
|
+
effects.enter("referenceMarker");
|
|
210
|
+
effects.consume(code);
|
|
211
|
+
effects.exit("referenceMarker");
|
|
212
|
+
effects.exit("reference");
|
|
213
|
+
return ok;
|
|
214
|
+
}
|
|
215
|
+
return nok(code);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
exports.labelEnd = labelEnd;
|
|
219
|
+
//# sourceMappingURL=label-end.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-end.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-end.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n};\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n};\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n};\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n};\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1;\n while (++index < events.length) {\n const token = events[index][1];\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n events.splice(index + 1, token.type === \"labelImage\" ? 4 : 2);\n token.type = \"data\";\n index++;\n }\n }\n return events;\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length;\n let offset = 0;\n /** @type {Token} */\n let token;\n /** @type {number | undefined} */\n let open;\n /** @type {number | undefined} */\n let close;\n /** @type {Array<Event>} */\n let media;\n\n // Find an opening.\n while (index--) {\n token = events[index][1];\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (token.type === \"link\" || token.type === \"labelLink\" && token._inactive) {\n break;\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === \"labelLink\") {\n token._inactive = true;\n }\n } else if (close) {\n if (events[index][0] === 'enter' && (token.type === \"labelImage\" || token.type === \"labelLink\") && !token._balanced) {\n open = index;\n if (token.type !== \"labelLink\") {\n offset = 2;\n break;\n }\n }\n } else if (token.type === \"labelEnd\") {\n close = index;\n }\n }\n const group = {\n type: events[open][1].type === \"labelLink\" ? \"link\" : \"image\",\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n };\n const label = {\n type: \"label\",\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n };\n const text = {\n type: \"labelText\",\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n };\n media = [['enter', group, context], ['enter', label, context]];\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3));\n\n // Text open.\n media = push(media, [['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));\n\n // Text close, marker close, label close.\n media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]);\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1));\n\n // Media close.\n media = push(media, [['exit', group, context]]);\n splice(events, open, events.length, media);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n /** @type {Token} */\n let labelStart;\n /** @type {boolean} */\n let defined;\n\n // Find an opening.\n while (index--) {\n if ((self.events[index][1].type === \"labelImage\" || self.events[index][1].type === \"labelLink\") && !self.events[index][1]._balanced) {\n labelStart = self.events[index][1];\n break;\n }\n }\n return start;\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code);\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code);\n }\n defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })));\n effects.enter(\"labelEnd\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelEnd\");\n return after;\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code);\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code);\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true;\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart;\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter(\"resource\");\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n return resourceBefore;\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code);\n }\n return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, \"resourceDestination\", \"resourceDestinationLiteral\", \"resourceDestinationLiteralMarker\", \"resourceDestinationRaw\", \"resourceDestinationString\", 32)(code);\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code);\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(effects, resourceTitleAfter, nok, \"resourceTitle\", \"resourceTitleMarker\", \"resourceTitleString\")(code);\n }\n return resourceEnd(code);\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n effects.exit(\"resource\");\n return ok;\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this;\n return referenceFull;\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, \"reference\", \"referenceMarker\", \"referenceString\")(code);\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart;\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter(\"reference\");\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n return referenceCollapsedOpen;\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n effects.exit(\"reference\");\n return ok;\n }\n return nok(code);\n }\n}"],"names":["index","push","resolveAll","splice","normalizeIdentifier","markdownLineEndingOrSpace","factoryWhitespace","factoryDestination","factoryTitle","factoryLabel"],"mappings":";;;;;;;;;;AAmBY,MAAC,WAAW;AAAA,EACtB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AACd;AAGA,MAAM,oBAAoB;AAAA,EACxB,UAAU;AACZ;AAEA,MAAM,yBAAyB;AAAA,EAC7B,UAAU;AACZ;AAEA,MAAM,8BAA8B;AAAA,EAClC,UAAU;AACZ;AAGA,SAAS,mBAAmB,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MAAM,gBAAgB;AAC9B,cAAQ,QAAQ,IAAI;AACpB,cAAQ,KAAK,gBAAgB;AAC7B,cAAQ,KAAK,UAAU;AACvB,aAAO;AAAA,IACR;AACD,WAAO,IAAI,IAAI;AAAA,EAChB;AACH;AAMA,SAAS,sBAAsB,SAAS,IAAI,KAAK;AAC/C,QAAM,OAAO;AACb,SAAO;AAYP,WAAS,cAAc,MAAM;AAC3B,WAAOG,qBAAa,KAAK,MAAM,SAAS,oBAAoB,sBAAsB,aAAa,mBAAmB,iBAAiB,EAAE,IAAI;AAAA,EAC1I;AAYD,WAAS,mBAAmB,MAAM;AAChC,WAAO,KAAK,OAAO,QAAQ,SAASL,QAAmB,oBAAC,KAAK,eAAe,KAAK,OAAO,KAAK,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,IAAI;AAAA,EACzJ;AAYD,WAAS,qBAAqB,MAAM;AAClC,WAAO,IAAI,IAAI;AAAA,EAChB;AACH;AAMA,SAAS,2BAA2B,SAAS,IAAI,KAAK;AACpD,SAAO;AAcP,WAAS,wBAAwB,MAAM;AAGrC,YAAQ,MAAM,WAAW;AACzB,YAAQ,MAAM,iBAAiB;AAC/B,YAAQ,QAAQ,IAAI;AACpB,YAAQ,KAAK,iBAAiB;AAC9B,WAAO;AAAA,EACR;AAcD,WAAS,uBAAuB,MAAM;AACpC,QAAI,SAAS,IAAI;AACf,cAAQ,MAAM,iBAAiB;AAC/B,cAAQ,QAAQ,IAAI;AACpB,cAAQ,KAAK,iBAAiB;AAC9B,cAAQ,KAAK,WAAW;AACxB,aAAO;AAAA,IACR;AACD,WAAO,IAAI,IAAI;AAAA,EAChB;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { factoryDestination } from "../../micromark-factory-destination/index.js";
|
|
2
|
+
import { factoryLabel } from "../../micromark-factory-label/index.js";
|
|
3
|
+
import { factoryTitle } from "../../micromark-factory-title/index.js";
|
|
4
|
+
import { factoryWhitespace } from "../../micromark-factory-whitespace/index.js";
|
|
5
|
+
import { markdownLineEndingOrSpace } from "../../micromark-util-character/index.js";
|
|
6
|
+
import { push, splice } from "../../micromark-util-chunked/index.js";
|
|
7
|
+
import { normalizeIdentifier } from "../../micromark-util-normalize-identifier/index.js";
|
|
8
|
+
import { resolveAll } from "../../micromark-util-resolve-all/index.js";
|
|
9
|
+
const labelEnd = {
|
|
10
|
+
name: "labelEnd",
|
|
11
|
+
tokenize: tokenizeLabelEnd,
|
|
12
|
+
resolveTo: resolveToLabelEnd,
|
|
13
|
+
resolveAll: resolveAllLabelEnd
|
|
14
|
+
};
|
|
15
|
+
const resourceConstruct = {
|
|
16
|
+
tokenize: tokenizeResource
|
|
17
|
+
};
|
|
18
|
+
const referenceFullConstruct = {
|
|
19
|
+
tokenize: tokenizeReferenceFull
|
|
20
|
+
};
|
|
21
|
+
const referenceCollapsedConstruct = {
|
|
22
|
+
tokenize: tokenizeReferenceCollapsed
|
|
23
|
+
};
|
|
24
|
+
function resolveAllLabelEnd(events) {
|
|
25
|
+
let index = -1;
|
|
26
|
+
while (++index < events.length) {
|
|
27
|
+
const token = events[index][1];
|
|
28
|
+
if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
|
|
29
|
+
events.splice(index + 1, token.type === "labelImage" ? 4 : 2);
|
|
30
|
+
token.type = "data";
|
|
31
|
+
index++;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return events;
|
|
35
|
+
}
|
|
36
|
+
function resolveToLabelEnd(events, context) {
|
|
37
|
+
let index = events.length;
|
|
38
|
+
let offset = 0;
|
|
39
|
+
let token;
|
|
40
|
+
let open;
|
|
41
|
+
let close;
|
|
42
|
+
let media;
|
|
43
|
+
while (index--) {
|
|
44
|
+
token = events[index][1];
|
|
45
|
+
if (open) {
|
|
46
|
+
if (token.type === "link" || token.type === "labelLink" && token._inactive) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
if (events[index][0] === "enter" && token.type === "labelLink") {
|
|
50
|
+
token._inactive = true;
|
|
51
|
+
}
|
|
52
|
+
} else if (close) {
|
|
53
|
+
if (events[index][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
|
|
54
|
+
open = index;
|
|
55
|
+
if (token.type !== "labelLink") {
|
|
56
|
+
offset = 2;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
} else if (token.type === "labelEnd") {
|
|
61
|
+
close = index;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const group = {
|
|
65
|
+
type: events[open][1].type === "labelLink" ? "link" : "image",
|
|
66
|
+
start: Object.assign({}, events[open][1].start),
|
|
67
|
+
end: Object.assign({}, events[events.length - 1][1].end)
|
|
68
|
+
};
|
|
69
|
+
const label = {
|
|
70
|
+
type: "label",
|
|
71
|
+
start: Object.assign({}, events[open][1].start),
|
|
72
|
+
end: Object.assign({}, events[close][1].end)
|
|
73
|
+
};
|
|
74
|
+
const text = {
|
|
75
|
+
type: "labelText",
|
|
76
|
+
start: Object.assign({}, events[open + offset + 2][1].end),
|
|
77
|
+
end: Object.assign({}, events[close - 2][1].start)
|
|
78
|
+
};
|
|
79
|
+
media = [["enter", group, context], ["enter", label, context]];
|
|
80
|
+
media = push(media, events.slice(open + 1, open + offset + 3));
|
|
81
|
+
media = push(media, [["enter", text, context]]);
|
|
82
|
+
media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));
|
|
83
|
+
media = push(media, [["exit", text, context], events[close - 2], events[close - 1], ["exit", label, context]]);
|
|
84
|
+
media = push(media, events.slice(close + 1));
|
|
85
|
+
media = push(media, [["exit", group, context]]);
|
|
86
|
+
splice(events, open, events.length, media);
|
|
87
|
+
return events;
|
|
88
|
+
}
|
|
89
|
+
function tokenizeLabelEnd(effects, ok, nok) {
|
|
90
|
+
const self = this;
|
|
91
|
+
let index = self.events.length;
|
|
92
|
+
let labelStart;
|
|
93
|
+
let defined;
|
|
94
|
+
while (index--) {
|
|
95
|
+
if ((self.events[index][1].type === "labelImage" || self.events[index][1].type === "labelLink") && !self.events[index][1]._balanced) {
|
|
96
|
+
labelStart = self.events[index][1];
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return start;
|
|
101
|
+
function start(code) {
|
|
102
|
+
if (!labelStart) {
|
|
103
|
+
return nok(code);
|
|
104
|
+
}
|
|
105
|
+
if (labelStart._inactive) {
|
|
106
|
+
return labelEndNok(code);
|
|
107
|
+
}
|
|
108
|
+
defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({
|
|
109
|
+
start: labelStart.end,
|
|
110
|
+
end: self.now()
|
|
111
|
+
})));
|
|
112
|
+
effects.enter("labelEnd");
|
|
113
|
+
effects.enter("labelMarker");
|
|
114
|
+
effects.consume(code);
|
|
115
|
+
effects.exit("labelMarker");
|
|
116
|
+
effects.exit("labelEnd");
|
|
117
|
+
return after;
|
|
118
|
+
}
|
|
119
|
+
function after(code) {
|
|
120
|
+
if (code === 40) {
|
|
121
|
+
return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);
|
|
122
|
+
}
|
|
123
|
+
if (code === 91) {
|
|
124
|
+
return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);
|
|
125
|
+
}
|
|
126
|
+
return defined ? labelEndOk(code) : labelEndNok(code);
|
|
127
|
+
}
|
|
128
|
+
function referenceNotFull(code) {
|
|
129
|
+
return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);
|
|
130
|
+
}
|
|
131
|
+
function labelEndOk(code) {
|
|
132
|
+
return ok(code);
|
|
133
|
+
}
|
|
134
|
+
function labelEndNok(code) {
|
|
135
|
+
labelStart._balanced = true;
|
|
136
|
+
return nok(code);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function tokenizeResource(effects, ok, nok) {
|
|
140
|
+
return resourceStart;
|
|
141
|
+
function resourceStart(code) {
|
|
142
|
+
effects.enter("resource");
|
|
143
|
+
effects.enter("resourceMarker");
|
|
144
|
+
effects.consume(code);
|
|
145
|
+
effects.exit("resourceMarker");
|
|
146
|
+
return resourceBefore;
|
|
147
|
+
}
|
|
148
|
+
function resourceBefore(code) {
|
|
149
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);
|
|
150
|
+
}
|
|
151
|
+
function resourceOpen(code) {
|
|
152
|
+
if (code === 41) {
|
|
153
|
+
return resourceEnd(code);
|
|
154
|
+
}
|
|
155
|
+
return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(code);
|
|
156
|
+
}
|
|
157
|
+
function resourceDestinationAfter(code) {
|
|
158
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);
|
|
159
|
+
}
|
|
160
|
+
function resourceDestinationMissing(code) {
|
|
161
|
+
return nok(code);
|
|
162
|
+
}
|
|
163
|
+
function resourceBetween(code) {
|
|
164
|
+
if (code === 34 || code === 39 || code === 40) {
|
|
165
|
+
return factoryTitle(effects, resourceTitleAfter, nok, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(code);
|
|
166
|
+
}
|
|
167
|
+
return resourceEnd(code);
|
|
168
|
+
}
|
|
169
|
+
function resourceTitleAfter(code) {
|
|
170
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);
|
|
171
|
+
}
|
|
172
|
+
function resourceEnd(code) {
|
|
173
|
+
if (code === 41) {
|
|
174
|
+
effects.enter("resourceMarker");
|
|
175
|
+
effects.consume(code);
|
|
176
|
+
effects.exit("resourceMarker");
|
|
177
|
+
effects.exit("resource");
|
|
178
|
+
return ok;
|
|
179
|
+
}
|
|
180
|
+
return nok(code);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function tokenizeReferenceFull(effects, ok, nok) {
|
|
184
|
+
const self = this;
|
|
185
|
+
return referenceFull;
|
|
186
|
+
function referenceFull(code) {
|
|
187
|
+
return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, "reference", "referenceMarker", "referenceString")(code);
|
|
188
|
+
}
|
|
189
|
+
function referenceFullAfter(code) {
|
|
190
|
+
return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);
|
|
191
|
+
}
|
|
192
|
+
function referenceFullMissing(code) {
|
|
193
|
+
return nok(code);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function tokenizeReferenceCollapsed(effects, ok, nok) {
|
|
197
|
+
return referenceCollapsedStart;
|
|
198
|
+
function referenceCollapsedStart(code) {
|
|
199
|
+
effects.enter("reference");
|
|
200
|
+
effects.enter("referenceMarker");
|
|
201
|
+
effects.consume(code);
|
|
202
|
+
effects.exit("referenceMarker");
|
|
203
|
+
return referenceCollapsedOpen;
|
|
204
|
+
}
|
|
205
|
+
function referenceCollapsedOpen(code) {
|
|
206
|
+
if (code === 93) {
|
|
207
|
+
effects.enter("referenceMarker");
|
|
208
|
+
effects.consume(code);
|
|
209
|
+
effects.exit("referenceMarker");
|
|
210
|
+
effects.exit("reference");
|
|
211
|
+
return ok;
|
|
212
|
+
}
|
|
213
|
+
return nok(code);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
export {
|
|
217
|
+
labelEnd
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=label-end.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-end.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-end.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n};\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n};\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n};\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n};\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1;\n while (++index < events.length) {\n const token = events[index][1];\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n events.splice(index + 1, token.type === \"labelImage\" ? 4 : 2);\n token.type = \"data\";\n index++;\n }\n }\n return events;\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length;\n let offset = 0;\n /** @type {Token} */\n let token;\n /** @type {number | undefined} */\n let open;\n /** @type {number | undefined} */\n let close;\n /** @type {Array<Event>} */\n let media;\n\n // Find an opening.\n while (index--) {\n token = events[index][1];\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (token.type === \"link\" || token.type === \"labelLink\" && token._inactive) {\n break;\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === \"labelLink\") {\n token._inactive = true;\n }\n } else if (close) {\n if (events[index][0] === 'enter' && (token.type === \"labelImage\" || token.type === \"labelLink\") && !token._balanced) {\n open = index;\n if (token.type !== \"labelLink\") {\n offset = 2;\n break;\n }\n }\n } else if (token.type === \"labelEnd\") {\n close = index;\n }\n }\n const group = {\n type: events[open][1].type === \"labelLink\" ? \"link\" : \"image\",\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n };\n const label = {\n type: \"label\",\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n };\n const text = {\n type: \"labelText\",\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n };\n media = [['enter', group, context], ['enter', label, context]];\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3));\n\n // Text open.\n media = push(media, [['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));\n\n // Text close, marker close, label close.\n media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]);\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1));\n\n // Media close.\n media = push(media, [['exit', group, context]]);\n splice(events, open, events.length, media);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n /** @type {Token} */\n let labelStart;\n /** @type {boolean} */\n let defined;\n\n // Find an opening.\n while (index--) {\n if ((self.events[index][1].type === \"labelImage\" || self.events[index][1].type === \"labelLink\") && !self.events[index][1]._balanced) {\n labelStart = self.events[index][1];\n break;\n }\n }\n return start;\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code);\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code);\n }\n defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })));\n effects.enter(\"labelEnd\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelEnd\");\n return after;\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code);\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code);\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true;\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart;\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter(\"resource\");\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n return resourceBefore;\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code);\n }\n return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, \"resourceDestination\", \"resourceDestinationLiteral\", \"resourceDestinationLiteralMarker\", \"resourceDestinationRaw\", \"resourceDestinationString\", 32)(code);\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code);\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(effects, resourceTitleAfter, nok, \"resourceTitle\", \"resourceTitleMarker\", \"resourceTitleString\")(code);\n }\n return resourceEnd(code);\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n effects.exit(\"resource\");\n return ok;\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this;\n return referenceFull;\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, \"reference\", \"referenceMarker\", \"referenceString\")(code);\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart;\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter(\"reference\");\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n return referenceCollapsedOpen;\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n effects.exit(\"reference\");\n return ok;\n }\n return nok(code);\n }\n}"],"names":[],"mappings":";;;;;;;;AAmBY,MAAC,WAAW;AAAA,EACtB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AACd;AAGA,MAAM,oBAAoB;AAAA,EACxB,UAAU;AACZ;AAEA,MAAM,yBAAyB;AAAA,EAC7B,UAAU;AACZ;AAEA,MAAM,8BAA8B;AAAA,EAClC,UAAU;AACZ;AAGA,SAAS,mBAAmB,QAAQ;AAClC,MAAI,QAAQ;AACZ,SAAO,EAAE,QAAQ,OAAO,QAAQ;AAC9B,UAAM,QAAQ,OAAO,KAAK,EAAE,CAAC;AAC7B,QAAI,MAAM,SAAS,gBAAgB,MAAM,SAAS,eAAe,MAAM,SAAS,YAAY;AAE1F,aAAO,OAAO,QAAQ,GAAG,MAAM,SAAS,eAAe,IAAI,CAAC;AAC5D,YAAM,OAAO;AACb;AAAA,IACD;AAAA,EACF;AACD,SAAO;AACT;AAGA,SAAS,kBAAkB,QAAQ,SAAS;AAC1C,MAAI,QAAQ,OAAO;AACnB,MAAI,SAAS;AAEb,MAAI;AAEJ,MAAI;AAEJ,MAAI;AAEJ,MAAI;AAGJ,SA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;AAYD,WAAS,qBAAqB,MAAM;AAClC,WAAO,IAAI,IAAI;AAAA,EAChB;AACH;AAMA,SAAS,2BAA2B,SAAS,IAAI,KAAK;AACpD,SAAO;AAcP,WAAS,wBAAwB,MAAM;AAGrC,YAAQ,MAAM,WAAW;AACzB,YAAQ,MAAM,iBAAiB;AAC/B,YAAQ,QAAQ,IAAI;AACpB,YAAQ,KAAK,iBAAiB;AAC9B,WAAO;AAAA,EACR;AAcD,WAAS,uBAAuB,MAAM;AACpC,QAAI,SAAS,IAAI;AACf,cAAQ,MAAM,iBAAiB;AAC/B,cAAQ,QAAQ,IAAI;AACpB,cAAQ,KAAK,iBAAiB;AAC9B,cAAQ,KAAK,WAAW;AACxB,aAAO;AAAA,IACR;AACD,WAAO,IAAI,IAAI;AAAA,EAChB;AACH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const labelEnd = require("./label-end.cjs");
|
|
4
|
+
const labelStartImage = {
|
|
5
|
+
name: "labelStartImage",
|
|
6
|
+
tokenize: tokenizeLabelStartImage,
|
|
7
|
+
resolveAll: labelEnd.labelEnd.resolveAll
|
|
8
|
+
};
|
|
9
|
+
function tokenizeLabelStartImage(effects, ok, nok) {
|
|
10
|
+
const self = this;
|
|
11
|
+
return start;
|
|
12
|
+
function start(code) {
|
|
13
|
+
effects.enter("labelImage");
|
|
14
|
+
effects.enter("labelImageMarker");
|
|
15
|
+
effects.consume(code);
|
|
16
|
+
effects.exit("labelImageMarker");
|
|
17
|
+
return open;
|
|
18
|
+
}
|
|
19
|
+
function open(code) {
|
|
20
|
+
if (code === 91) {
|
|
21
|
+
effects.enter("labelMarker");
|
|
22
|
+
effects.consume(code);
|
|
23
|
+
effects.exit("labelMarker");
|
|
24
|
+
effects.exit("labelImage");
|
|
25
|
+
return after;
|
|
26
|
+
}
|
|
27
|
+
return nok(code);
|
|
28
|
+
}
|
|
29
|
+
function after(code) {
|
|
30
|
+
return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.labelStartImage = labelStartImage;
|
|
34
|
+
//# sourceMappingURL=label-start-image.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-start-image.cjs","sources":["../../../../node_modules/micromark-core-commonmark/lib/label-start-image.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n};\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * \n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n * <p>!<a href=\\\"b\\\">^a</a></p>\n * <p>!<a href=\\\"c\\\">^a</a></p>\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}"],"names":["labelEnd"],"mappings":";;;AAUY,MAAC,kBAAkB;AAAA,EAC7B,MAAM;AAAA,EACN,UAAU;AAAA,EACV,YAAYA,SAAQ,SAAC;AACvB;AAMA,SAAS,wBAAwB,SAAS,IAAI,KAAK;AACjD,QAAM,OAAO;AACb,SAAO;AAYP,WAAS,MAAM,MAAM;AACnB,YAAQ,MAAM,YAAY;AAC1B,YAAQ,MAAM,kBAAkB;AAChC,YAAQ,QAAQ,IAAI;AACpB,YAAQ,KAAK,kBAAkB;AAC/B,WAAO;AAAA,EACR;AAYD,WAAS,KAAK,MAAM;AAClB,QAAI,SAAS,IAAI;AACf,cAAQ,MAAM,aAAa;AAC3B,cAAQ,QAAQ,IAAI;AACpB,cAAQ,KAAK,aAAa;AAC1B,cAAQ,KAAK,YAAY;AACzB,aAAO;AAAA,IACR;AACD,WAAO,IAAI,IAAI;AAAA,EAChB;AA6BD,WAAS,MAAM,MAAM;AAMnB,WAAO,SAAS,MAAM,4BAA4B,KAAK,OAAO,aAAa,IAAI,IAAI,IAAI,GAAG,IAAI;AAAA,EAC/F;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { labelEnd } from "./label-end.js";
|
|
2
|
+
const labelStartImage = {
|
|
3
|
+
name: "labelStartImage",
|
|
4
|
+
tokenize: tokenizeLabelStartImage,
|
|
5
|
+
resolveAll: labelEnd.resolveAll
|
|
6
|
+
};
|
|
7
|
+
function tokenizeLabelStartImage(effects, ok, nok) {
|
|
8
|
+
const self = this;
|
|
9
|
+
return start;
|
|
10
|
+
function start(code) {
|
|
11
|
+
effects.enter("labelImage");
|
|
12
|
+
effects.enter("labelImageMarker");
|
|
13
|
+
effects.consume(code);
|
|
14
|
+
effects.exit("labelImageMarker");
|
|
15
|
+
return open;
|
|
16
|
+
}
|
|
17
|
+
function open(code) {
|
|
18
|
+
if (code === 91) {
|
|
19
|
+
effects.enter("labelMarker");
|
|
20
|
+
effects.consume(code);
|
|
21
|
+
effects.exit("labelMarker");
|
|
22
|
+
effects.exit("labelImage");
|
|
23
|
+
return after;
|
|
24
|
+
}
|
|
25
|
+
return nok(code);
|
|
26
|
+
}
|
|
27
|
+
function after(code) {
|
|
28
|
+
return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
labelStartImage
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=label-start-image.js.map
|