@prismicio/client 7.7.5-alpha.0 → 7.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +0 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/types/api/repository.d.ts +4 -0
- package/package.json +2 -16
- package/src/index.ts +0 -8
- package/src/types/api/repository.ts +5 -0
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs +0 -63
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js +0 -63
- package/dist/_node_modules/@ungap/structured-clone/esm/deserialize.js.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs +0 -12
- package/dist/_node_modules/@ungap/structured-clone/esm/index.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js +0 -12
- package/dist/_node_modules/@ungap/structured-clone/esm/index.js.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs +0 -127
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js +0 -127
- package/dist/_node_modules/@ungap/structured-clone/esm/serialize.js.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs +0 -23
- package/dist/_node_modules/@ungap/structured-clone/esm/types.cjs.map +0 -1
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js +0 -23
- package/dist/_node_modules/@ungap/structured-clone/esm/types.js.map +0 -1
- package/dist/_node_modules/bail/index.cjs +0 -9
- package/dist/_node_modules/bail/index.cjs.map +0 -1
- package/dist/_node_modules/bail/index.js +0 -9
- package/dist/_node_modules/bail/index.js.map +0 -1
- package/dist/_node_modules/bcp-47-match/index.cjs +0 -74
- package/dist/_node_modules/bcp-47-match/index.cjs.map +0 -1
- package/dist/_node_modules/bcp-47-match/index.js +0 -74
- package/dist/_node_modules/bcp-47-match/index.js.map +0 -1
- package/dist/_node_modules/boolbase/index.cjs +0 -13
- package/dist/_node_modules/boolbase/index.cjs.map +0 -1
- package/dist/_node_modules/boolbase/index.js +0 -14
- package/dist/_node_modules/boolbase/index.js.map +0 -1
- package/dist/_node_modules/ccount/index.cjs +0 -17
- package/dist/_node_modules/ccount/index.cjs.map +0 -1
- package/dist/_node_modules/ccount/index.js +0 -17
- package/dist/_node_modules/ccount/index.js.map +0 -1
- package/dist/_node_modules/character-entities/index.cjs +0 -2131
- package/dist/_node_modules/character-entities/index.cjs.map +0 -1
- package/dist/_node_modules/character-entities/index.js +0 -2131
- package/dist/_node_modules/character-entities/index.js.map +0 -1
- package/dist/_node_modules/character-entities-html4/index.cjs +0 -258
- package/dist/_node_modules/character-entities-html4/index.cjs.map +0 -1
- package/dist/_node_modules/character-entities-html4/index.js +0 -258
- package/dist/_node_modules/character-entities-html4/index.js.map +0 -1
- package/dist/_node_modules/character-entities-legacy/index.cjs +0 -112
- package/dist/_node_modules/character-entities-legacy/index.cjs.map +0 -1
- package/dist/_node_modules/character-entities-legacy/index.js +0 -112
- package/dist/_node_modules/character-entities-legacy/index.js.map +0 -1
- package/dist/_node_modules/comma-separated-tokens/index.cjs +0 -32
- package/dist/_node_modules/comma-separated-tokens/index.cjs.map +0 -1
- package/dist/_node_modules/comma-separated-tokens/index.js +0 -32
- package/dist/_node_modules/comma-separated-tokens/index.js.map +0 -1
- package/dist/_node_modules/devlop/lib/default.cjs +0 -6
- package/dist/_node_modules/devlop/lib/default.cjs.map +0 -1
- package/dist/_node_modules/devlop/lib/default.js +0 -6
- package/dist/_node_modules/devlop/lib/default.js.map +0 -1
- package/dist/_node_modules/direction/index.cjs +0 -12
- package/dist/_node_modules/direction/index.cjs.map +0 -1
- package/dist/_node_modules/direction/index.js +0 -12
- package/dist/_node_modules/direction/index.js.map +0 -1
- package/dist/_node_modules/extend/index.cjs +0 -89
- package/dist/_node_modules/extend/index.cjs.map +0 -1
- package/dist/_node_modules/extend/index.js +0 -90
- package/dist/_node_modules/extend/index.js.map +0 -1
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs +0 -14
- package/dist/_node_modules/hast-util-embedded/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-embedded/lib/index.js +0 -14
- package/dist/_node_modules/hast-util-embedded/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs +0 -317
- package/dist/_node_modules/hast-util-from-html/lib/errors.cjs.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/errors.js +0 -317
- package/dist/_node_modules/hast-util-from-html/lib/errors.js.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs +0 -96
- package/dist/_node_modules/hast-util-from-html/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-from-html/lib/index.js +0 -96
- package/dist/_node_modules/hast-util-from-html/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs +0 -187
- package/dist/_node_modules/hast-util-from-parse5/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js +0 -187
- package/dist/_node_modules/hast-util-from-parse5/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs +0 -9
- package/dist/_node_modules/hast-util-has-property/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-has-property/lib/index.js +0 -9
- package/dist/_node_modules/hast-util-has-property/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs +0 -102
- package/dist/_node_modules/hast-util-is-element/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-is-element/lib/index.js +0 -102
- package/dist/_node_modules/hast-util-is-element/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs +0 -40
- package/dist/_node_modules/hast-util-parse-selector/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js +0 -40
- package/dist/_node_modules/hast-util-parse-selector/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs +0 -67
- package/dist/_node_modules/hast-util-select/lib/attribute.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/attribute.js +0 -67
- package/dist/_node_modules/hast-util-select/lib/attribute.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs +0 -12
- package/dist/_node_modules/hast-util-select/lib/class-name.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/class-name.js +0 -12
- package/dist/_node_modules/hast-util-select/lib/class-name.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs +0 -79
- package/dist/_node_modules/hast-util-select/lib/enter-state.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/enter-state.js +0 -79
- package/dist/_node_modules/hast-util-select/lib/enter-state.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/id.cjs +0 -7
- package/dist/_node_modules/hast-util-select/lib/id.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/id.js +0 -7
- package/dist/_node_modules/hast-util-select/lib/id.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/index.cjs +0 -38
- package/dist/_node_modules/hast-util-select/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/index.js +0 -38
- package/dist/_node_modules/hast-util-select/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/name.cjs +0 -7
- package/dist/_node_modules/hast-util-select/lib/name.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/name.js +0 -7
- package/dist/_node_modules/hast-util-select/lib/name.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/parse.cjs +0 -12
- package/dist/_node_modules/hast-util-select/lib/parse.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/parse.js +0 -12
- package/dist/_node_modules/hast-util-select/lib/parse.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs +0 -231
- package/dist/_node_modules/hast-util-select/lib/pseudo.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/pseudo.js +0 -231
- package/dist/_node_modules/hast-util-select/lib/pseudo.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/test.cjs +0 -27
- package/dist/_node_modules/hast-util-select/lib/test.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/test.js +0 -27
- package/dist/_node_modules/hast-util-select/lib/test.js.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/walk.cjs +0 -132
- package/dist/_node_modules/hast-util-select/lib/walk.cjs.map +0 -1
- package/dist/_node_modules/hast-util-select/lib/walk.js +0 -132
- package/dist/_node_modules/hast-util-select/lib/walk.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/handle/comment.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/doctype.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs +0 -137
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js +0 -137
- package/dist/_node_modules/hast-util-to-html/lib/handle/element.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs +0 -26
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js +0 -26
- package/dist/_node_modules/hast-util-to-html/lib/handle/index.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs +0 -8
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js +0 -8
- package/dist/_node_modules/hast-util-to-html/lib/handle/raw.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js +0 -7
- package/dist/_node_modules/hast-util-to-html/lib/handle/root.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs +0 -14
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js +0 -14
- package/dist/_node_modules/hast-util-to-html/lib/handle/text.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs +0 -62
- package/dist/_node_modules/hast-util-to-html/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/index.js +0 -62
- package/dist/_node_modules/hast-util-to-html/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs +0 -92
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js +0 -92
- package/dist/_node_modules/hast-util-to-html/lib/omission/closing.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs +0 -11
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js +0 -11
- package/dist/_node_modules/hast-util-to-html/lib/omission/omission.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs +0 -52
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js +0 -52
- package/dist/_node_modules/hast-util-to-html/lib/omission/opening.js.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js +0 -24
- package/dist/_node_modules/hast-util-to-html/lib/omission/util/siblings.js.map +0 -1
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs +0 -24
- package/dist/_node_modules/hast-util-to-string/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-to-string/lib/index.js +0 -24
- package/dist/_node_modules/hast-util-to-string/lib/index.js.map +0 -1
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs +0 -11
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-whitespace/lib/index.js +0 -11
- package/dist/_node_modules/hast-util-whitespace/lib/index.js.map +0 -1
- package/dist/_node_modules/hastscript/lib/create-h.cjs +0 -159
- package/dist/_node_modules/hastscript/lib/create-h.cjs.map +0 -1
- package/dist/_node_modules/hastscript/lib/create-h.js +0 -159
- package/dist/_node_modules/hastscript/lib/create-h.js.map +0 -1
- package/dist/_node_modules/hastscript/lib/index.cjs +0 -10
- package/dist/_node_modules/hastscript/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hastscript/lib/index.js +0 -10
- package/dist/_node_modules/hastscript/lib/index.js.map +0 -1
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs +0 -45
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.map +0 -1
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +0 -45
- package/dist/_node_modules/hastscript/lib/svg-case-sensitive-tag-names.js.map +0 -1
- package/dist/_node_modules/html-void-elements/index.cjs +0 -26
- package/dist/_node_modules/html-void-elements/index.cjs.map +0 -1
- package/dist/_node_modules/html-void-elements/index.js +0 -26
- package/dist/_node_modules/html-void-elements/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs +0 -720
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js +0 -720
- package/dist/_node_modules/mdast-util-from-markdown/lib/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs +0 -116
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js +0 -116
- package/dist/_node_modules/mdast-util-to-hast/lib/footer.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/break.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/code.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs +0 -42
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +0 -42
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs +0 -12
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js +0 -12
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/html.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs +0 -20
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +0 -20
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs +0 -17
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js +0 -17
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/image.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs +0 -60
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js +0 -60
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +0 -25
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs +0 -19
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js +0 -19
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/link.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs +0 -65
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js +0 -65
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs +0 -27
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js +0 -27
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/list.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js +0 -9
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/root.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs +0 -15
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +0 -15
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs +0 -36
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js +0 -36
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs +0 -40
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js +0 -40
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/table.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs +0 -10
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js +0 -10
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/text.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +0 -14
- package/dist/_node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js +0 -16
- package/dist/_node_modules/mdast-util-to-hast/lib/index.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs +0 -30
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js +0 -30
- package/dist/_node_modules/mdast-util-to-hast/lib/revert.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs +0 -149
- package/dist/_node_modules/mdast-util-to-hast/lib/state.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js +0 -149
- package/dist/_node_modules/mdast-util-to-hast/lib/state.js.map +0 -1
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs +0 -39
- package/dist/_node_modules/mdast-util-to-string/lib/index.cjs.map +0 -1
- package/dist/_node_modules/mdast-util-to-string/lib/index.js +0 -39
- package/dist/_node_modules/mdast-util-to-string/lib/index.js.map +0 -1
- package/dist/_node_modules/micromark/lib/constructs.cjs +0 -94
- package/dist/_node_modules/micromark/lib/constructs.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/constructs.js +0 -94
- package/dist/_node_modules/micromark/lib/constructs.js.map +0 -1
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs +0 -316
- package/dist/_node_modules/micromark/lib/create-tokenizer.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/create-tokenizer.js +0 -316
- package/dist/_node_modules/micromark/lib/create-tokenizer.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/content.cjs +0 -58
- package/dist/_node_modules/micromark/lib/initialize/content.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/content.js +0 -58
- package/dist/_node_modules/micromark/lib/initialize/content.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/document.cjs +0 -212
- package/dist/_node_modules/micromark/lib/initialize/document.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/document.js +0 -212
- package/dist/_node_modules/micromark/lib/initialize/document.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs +0 -55
- package/dist/_node_modules/micromark/lib/initialize/flow.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/flow.js +0 -55
- package/dist/_node_modules/micromark/lib/initialize/flow.js.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/text.cjs +0 -143
- package/dist/_node_modules/micromark/lib/initialize/text.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/initialize/text.js +0 -143
- package/dist/_node_modules/micromark/lib/initialize/text.js.map +0 -1
- package/dist/_node_modules/micromark/lib/parse.cjs +0 -35
- package/dist/_node_modules/micromark/lib/parse.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/parse.js +0 -35
- package/dist/_node_modules/micromark/lib/parse.js.map +0 -1
- package/dist/_node_modules/micromark/lib/postprocess.cjs +0 -10
- package/dist/_node_modules/micromark/lib/postprocess.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/postprocess.js +0 -10
- package/dist/_node_modules/micromark/lib/postprocess.js.map +0 -1
- package/dist/_node_modules/micromark/lib/preprocess.cjs +0 -81
- package/dist/_node_modules/micromark/lib/preprocess.cjs.map +0 -1
- package/dist/_node_modules/micromark/lib/preprocess.js +0 -81
- package/dist/_node_modules/micromark/lib/preprocess.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs +0 -116
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js +0 -116
- package/dist/_node_modules/micromark-core-commonmark/lib/attention.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs +0 -104
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js +0 -104
- package/dist/_node_modules/micromark-core-commonmark/lib/autolink.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs +0 -19
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js +0 -19
- package/dist/_node_modules/micromark-core-commonmark/lib/blank-line.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs +0 -62
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js +0 -62
- package/dist/_node_modules/micromark-core-commonmark/lib/block-quote.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs +0 -29
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js +0 -29
- package/dist/_node_modules/micromark-core-commonmark/lib/character-escape.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs +0 -69
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js +0 -69
- package/dist/_node_modules/micromark-core-commonmark/lib/character-reference.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs +0 -187
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js +0 -187
- package/dist/_node_modules/micromark-core-commonmark/lib/code-fenced.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs +0 -68
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js +0 -68
- package/dist/_node_modules/micromark-core-commonmark/lib/code-indented.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs +0 -117
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js +0 -117
- package/dist/_node_modules/micromark-core-commonmark/lib/code-text.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs +0 -76
- package/dist/_node_modules/micromark-core-commonmark/lib/content.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js +0 -76
- package/dist/_node_modules/micromark-core-commonmark/lib/content.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs +0 -95
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js +0 -95
- package/dist/_node_modules/micromark-core-commonmark/lib/definition.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs +0 -24
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js +0 -24
- package/dist/_node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs +0 -96
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js +0 -96
- package/dist/_node_modules/micromark-core-commonmark/lib/heading-atx.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs +0 -384
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js +0 -384
- package/dist/_node_modules/micromark-core-commonmark/lib/html-flow.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs +0 -310
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js +0 -310
- package/dist/_node_modules/micromark-core-commonmark/lib/html-text.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs +0 -219
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js +0 -219
- package/dist/_node_modules/micromark-core-commonmark/lib/label-end.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs +0 -34
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js +0 -34
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-image.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs +0 -25
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js +0 -25
- package/dist/_node_modules/micromark-core-commonmark/lib/label-start-link.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs +0 -18
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js +0 -18
- package/dist/_node_modules/micromark-core-commonmark/lib/line-ending.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs +0 -136
- package/dist/_node_modules/micromark-core-commonmark/lib/list.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js +0 -136
- package/dist/_node_modules/micromark-core-commonmark/lib/list.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs +0 -90
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js +0 -90
- package/dist/_node_modules/micromark-core-commonmark/lib/setext-underline.js.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs +0 -43
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.cjs.map +0 -1
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js +0 -43
- package/dist/_node_modules/micromark-core-commonmark/lib/thematic-break.js.map +0 -1
- package/dist/_node_modules/micromark-factory-destination/index.cjs +0 -95
- package/dist/_node_modules/micromark-factory-destination/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-destination/index.js +0 -95
- package/dist/_node_modules/micromark-factory-destination/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-label/index.cjs +0 -64
- package/dist/_node_modules/micromark-factory-label/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-label/index.js +0 -64
- package/dist/_node_modules/micromark-factory-label/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-space/index.cjs +0 -25
- package/dist/_node_modules/micromark-factory-space/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-space/index.js +0 -25
- package/dist/_node_modules/micromark-factory-space/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-title/index.cjs +0 -66
- package/dist/_node_modules/micromark-factory-title/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-title/index.js +0 -66
- package/dist/_node_modules/micromark-factory-title/index.js.map +0 -1
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs +0 -27
- package/dist/_node_modules/micromark-factory-whitespace/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-factory-whitespace/index.js +0 -27
- package/dist/_node_modules/micromark-factory-whitespace/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-character/index.cjs +0 -45
- package/dist/_node_modules/micromark-util-character/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-character/index.js +0 -45
- package/dist/_node_modules/micromark-util-character/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-chunked/index.cjs +0 -37
- package/dist/_node_modules/micromark-util-chunked/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-chunked/index.js +0 -37
- package/dist/_node_modules/micromark-util-chunked/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-classify-character/index.cjs +0 -13
- package/dist/_node_modules/micromark-util-classify-character/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-classify-character/index.js +0 -13
- package/dist/_node_modules/micromark-util-classify-character/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs +0 -42
- package/dist/_node_modules/micromark-util-combine-extensions/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-combine-extensions/index.js +0 -42
- package/dist/_node_modules/micromark-util-combine-extensions/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs +0 -20
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js +0 -20
- package/dist/_node_modules/micromark-util-decode-numeric-character-reference/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-decode-string/index.cjs +0 -22
- package/dist/_node_modules/micromark-util-decode-string/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-decode-string/index.js +0 -22
- package/dist/_node_modules/micromark-util-decode-string/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs +0 -70
- package/dist/_node_modules/micromark-util-html-tag-name/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-html-tag-name/index.js +0 -70
- package/dist/_node_modules/micromark-util-html-tag-name/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs +0 -7
- package/dist/_node_modules/micromark-util-normalize-identifier/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js +0 -7
- package/dist/_node_modules/micromark-util-normalize-identifier/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs +0 -16
- package/dist/_node_modules/micromark-util-resolve-all/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-resolve-all/index.js +0 -16
- package/dist/_node_modules/micromark-util-resolve-all/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs +0 -42
- package/dist/_node_modules/micromark-util-sanitize-uri/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js +0 -42
- package/dist/_node_modules/micromark-util-sanitize-uri/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs +0 -149
- package/dist/_node_modules/micromark-util-subtokenize/index.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/index.js +0 -149
- package/dist/_node_modules/micromark-util-subtokenize/index.js.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs +0 -195
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs.map +0 -1
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js +0 -195
- package/dist/_node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs +0 -20
- package/dist/_node_modules/nth-check/lib/esm/compile.cjs.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/compile.js +0 -20
- package/dist/_node_modules/nth-check/lib/esm/compile.js.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/index.cjs +0 -11
- package/dist/_node_modules/nth-check/lib/esm/index.cjs.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/index.js +0 -11
- package/dist/_node_modules/nth-check/lib/esm/index.js.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs +0 -59
- package/dist/_node_modules/nth-check/lib/esm/parse.cjs.map +0 -1
- package/dist/_node_modules/nth-check/lib/esm/parse.js +0 -59
- package/dist/_node_modules/nth-check/lib/esm/parse.js.map +0 -1
- package/dist/_node_modules/property-information/index.cjs +0 -14
- package/dist/_node_modules/property-information/index.cjs.map +0 -1
- package/dist/_node_modules/property-information/index.js +0 -14
- package/dist/_node_modules/property-information/index.js.map +0 -1
- package/dist/_node_modules/property-information/lib/aria.cjs +0 -62
- package/dist/_node_modules/property-information/lib/aria.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/aria.js +0 -62
- package/dist/_node_modules/property-information/lib/aria.js.map +0 -1
- package/dist/_node_modules/property-information/lib/find.cjs +0 -41
- package/dist/_node_modules/property-information/lib/find.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/find.js +0 -41
- package/dist/_node_modules/property-information/lib/find.js.map +0 -1
- package/dist/_node_modules/property-information/lib/html.cjs +0 -369
- package/dist/_node_modules/property-information/lib/html.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/html.js +0 -369
- package/dist/_node_modules/property-information/lib/html.js.map +0 -1
- package/dist/_node_modules/property-information/lib/normalize.cjs +0 -7
- package/dist/_node_modules/property-information/lib/normalize.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/normalize.js +0 -7
- package/dist/_node_modules/property-information/lib/normalize.js.map +0 -1
- package/dist/_node_modules/property-information/lib/svg.cjs +0 -567
- package/dist/_node_modules/property-information/lib/svg.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/svg.js +0 -567
- package/dist/_node_modules/property-information/lib/svg.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs +0 -8
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js +0 -8
- package/dist/_node_modules/property-information/lib/util/case-insensitive-transform.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs +0 -7
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js +0 -7
- package/dist/_node_modules/property-information/lib/util/case-sensitive-transform.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/create.cjs +0 -31
- package/dist/_node_modules/property-information/lib/util/create.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/create.js +0 -31
- package/dist/_node_modules/property-information/lib/util/create.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs +0 -33
- package/dist/_node_modules/property-information/lib/util/defined-info.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/defined-info.js +0 -33
- package/dist/_node_modules/property-information/lib/util/defined-info.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/info.cjs +0 -25
- package/dist/_node_modules/property-information/lib/util/info.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/info.js +0 -25
- package/dist/_node_modules/property-information/lib/util/info.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/merge.cjs +0 -15
- package/dist/_node_modules/property-information/lib/util/merge.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/merge.js +0 -15
- package/dist/_node_modules/property-information/lib/util/merge.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/schema.cjs +0 -22
- package/dist/_node_modules/property-information/lib/util/schema.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/schema.js +0 -22
- package/dist/_node_modules/property-information/lib/util/schema.js.map +0 -1
- package/dist/_node_modules/property-information/lib/util/types.cjs +0 -21
- package/dist/_node_modules/property-information/lib/util/types.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/util/types.js +0 -21
- package/dist/_node_modules/property-information/lib/util/types.js.map +0 -1
- package/dist/_node_modules/property-information/lib/xlink.cjs +0 -20
- package/dist/_node_modules/property-information/lib/xlink.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/xlink.js +0 -20
- package/dist/_node_modules/property-information/lib/xlink.js.map +0 -1
- package/dist/_node_modules/property-information/lib/xml.cjs +0 -12
- package/dist/_node_modules/property-information/lib/xml.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/xml.js +0 -12
- package/dist/_node_modules/property-information/lib/xml.js.map +0 -1
- package/dist/_node_modules/property-information/lib/xmlns.cjs +0 -12
- package/dist/_node_modules/property-information/lib/xmlns.cjs.map +0 -1
- package/dist/_node_modules/property-information/lib/xmlns.js +0 -12
- package/dist/_node_modules/property-information/lib/xmlns.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs +0 -122
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js +0 -122
- package/dist/_node_modules/rehype-minify-whitespace/lib/block.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs +0 -11
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js +0 -11
- package/dist/_node_modules/rehype-minify-whitespace/lib/content.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs +0 -169
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js +0 -170
- package/dist/_node_modules/rehype-minify-whitespace/lib/index.js.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs +0 -24
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.cjs.map +0 -1
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js +0 -24
- package/dist/_node_modules/rehype-minify-whitespace/lib/skippable.js.map +0 -1
- package/dist/_node_modules/rehype-parse/lib/index.cjs +0 -21
- package/dist/_node_modules/rehype-parse/lib/index.cjs.map +0 -1
- package/dist/_node_modules/rehype-parse/lib/index.js +0 -22
- package/dist/_node_modules/rehype-parse/lib/index.js.map +0 -1
- package/dist/_node_modules/remark-parse/lib/index.cjs +0 -19
- package/dist/_node_modules/remark-parse/lib/index.cjs.map +0 -1
- package/dist/_node_modules/remark-parse/lib/index.js +0 -20
- package/dist/_node_modules/remark-parse/lib/index.js.map +0 -1
- package/dist/_node_modules/remark-rehype/lib/index.cjs +0 -21
- package/dist/_node_modules/remark-rehype/lib/index.cjs.map +0 -1
- package/dist/_node_modules/remark-rehype/lib/index.js +0 -22
- package/dist/_node_modules/remark-rehype/lib/index.js.map +0 -1
- package/dist/_node_modules/space-separated-tokens/index.cjs +0 -12
- package/dist/_node_modules/space-separated-tokens/index.cjs.map +0 -1
- package/dist/_node_modules/space-separated-tokens/index.js +0 -12
- package/dist/_node_modules/space-separated-tokens/index.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs +0 -14
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js +0 -14
- package/dist/_node_modules/stringify-entities/lib/constant/dangerous.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/core.cjs +0 -52
- package/dist/_node_modules/stringify-entities/lib/core.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/core.js +0 -52
- package/dist/_node_modules/stringify-entities/lib/core.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/index.cjs +0 -9
- package/dist/_node_modules/stringify-entities/lib/index.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/index.js +0 -9
- package/dist/_node_modules/stringify-entities/lib/index.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs +0 -26
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js +0 -26
- package/dist/_node_modules/stringify-entities/lib/util/format-smart.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-decimal.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js +0 -9
- package/dist/_node_modules/stringify-entities/lib/util/to-hexadecimal.js.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs +0 -28
- package/dist/_node_modules/stringify-entities/lib/util/to-named.cjs.map +0 -1
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js +0 -28
- package/dist/_node_modules/stringify-entities/lib/util/to-named.js.map +0 -1
- package/dist/_node_modules/trim-lines/index.cjs +0 -42
- package/dist/_node_modules/trim-lines/index.cjs.map +0 -1
- package/dist/_node_modules/trim-lines/index.js +0 -42
- package/dist/_node_modules/trim-lines/index.js.map +0 -1
- package/dist/_node_modules/trough/lib/index.cjs +0 -87
- package/dist/_node_modules/trough/lib/index.cjs.map +0 -1
- package/dist/_node_modules/trough/lib/index.js +0 -87
- package/dist/_node_modules/trough/lib/index.js.map +0 -1
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs +0 -10
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.cjs.map +0 -1
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js +0 -11
- package/dist/_node_modules/unified/_node_modules/is-plain-obj/index.js.map +0 -1
- package/dist/_node_modules/unified/lib/callable-instance.cjs +0 -31
- package/dist/_node_modules/unified/lib/callable-instance.cjs.map +0 -1
- package/dist/_node_modules/unified/lib/callable-instance.js +0 -31
- package/dist/_node_modules/unified/lib/callable-instance.js.map +0 -1
- package/dist/_node_modules/unified/lib/index.cjs +0 -637
- package/dist/_node_modules/unified/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unified/lib/index.js +0 -637
- package/dist/_node_modules/unified/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-is/lib/index.cjs +0 -94
- package/dist/_node_modules/unist-util-is/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-is/lib/index.js +0 -94
- package/dist/_node_modules/unist-util-is/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-position/lib/index.cjs +0 -28
- package/dist/_node_modules/unist-util-position/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-position/lib/index.js +0 -28
- package/dist/_node_modules/unist-util-position/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-remove/lib/index.cjs +0 -39
- package/dist/_node_modules/unist-util-remove/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-remove/lib/index.js +0 -39
- package/dist/_node_modules/unist-util-remove/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs +0 -28
- package/dist/_node_modules/unist-util-stringify-position/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js +0 -28
- package/dist/_node_modules/unist-util-stringify-position/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-visit/lib/index.cjs +0 -28
- package/dist/_node_modules/unist-util-visit/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-visit/lib/index.js +0 -29
- package/dist/_node_modules/unist-util-visit/lib/index.js.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs +0 -7
- package/dist/_node_modules/unist-util-visit-parents/lib/color.cjs.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js +0 -7
- package/dist/_node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs +0 -84
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs.map +0 -1
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js +0 -84
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js.map +0 -1
- package/dist/_node_modules/vfile/lib/index.cjs +0 -463
- package/dist/_node_modules/vfile/lib/index.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/index.js +0 -463
- package/dist/_node_modules/vfile/lib/index.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs +0 -215
- package/dist/_node_modules/vfile/lib/minpath.browser.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minpath.browser.js +0 -215
- package/dist/_node_modules/vfile/lib/minpath.browser.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs +0 -8
- package/dist/_node_modules/vfile/lib/minproc.browser.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minproc.browser.js +0 -8
- package/dist/_node_modules/vfile/lib/minproc.browser.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs +0 -47
- package/dist/_node_modules/vfile/lib/minurl.browser.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.browser.js +0 -47
- package/dist/_node_modules/vfile/lib/minurl.browser.js.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs +0 -10
- package/dist/_node_modules/vfile/lib/minurl.shared.cjs.map +0 -1
- package/dist/_node_modules/vfile/lib/minurl.shared.js +0 -10
- package/dist/_node_modules/vfile/lib/minurl.shared.js.map +0 -1
- package/dist/_node_modules/vfile-location/lib/index.cjs +0 -50
- package/dist/_node_modules/vfile-location/lib/index.cjs.map +0 -1
- package/dist/_node_modules/vfile-location/lib/index.js +0 -50
- package/dist/_node_modules/vfile-location/lib/index.js.map +0 -1
- package/dist/_node_modules/vfile-message/lib/index.cjs +0 -139
- package/dist/_node_modules/vfile-message/lib/index.cjs.map +0 -1
- package/dist/_node_modules/vfile-message/lib/index.js +0 -139
- package/dist/_node_modules/vfile-message/lib/index.js.map +0 -1
- package/dist/_node_modules/web-namespaces/index.cjs +0 -12
- package/dist/_node_modules/web-namespaces/index.cjs.map +0 -1
- package/dist/_node_modules/web-namespaces/index.js +0 -12
- package/dist/_node_modules/web-namespaces/index.js.map +0 -1
- package/dist/_node_modules/zwitch/index.cjs +0 -23
- package/dist/_node_modules/zwitch/index.cjs.map +0 -1
- package/dist/_node_modules/zwitch/index.js +0 -23
- package/dist/_node_modules/zwitch/index.js.map +0 -1
- package/dist/_virtual/_commonjsHelpers.cjs +0 -7
- package/dist/_virtual/_commonjsHelpers.cjs.map +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -7
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/index.cjs +0 -9
- package/dist/_virtual/index.cjs.map +0 -1
- package/dist/_virtual/index.js +0 -9
- package/dist/_virtual/index.js.map +0 -1
- package/dist/errors/PrismicRichTextError.cjs +0 -6
- package/dist/errors/PrismicRichTextError.cjs.map +0 -1
- package/dist/errors/PrismicRichTextError.d.ts +0 -2
- package/dist/errors/PrismicRichTextError.js +0 -6
- package/dist/errors/PrismicRichTextError.js.map +0 -1
- package/dist/errors/PrismicRichTextSerializerError.cjs +0 -7
- package/dist/errors/PrismicRichTextSerializerError.cjs.map +0 -1
- package/dist/errors/PrismicRichTextSerializerError.d.ts +0 -3
- package/dist/errors/PrismicRichTextSerializerError.js +0 -7
- package/dist/errors/PrismicRichTextSerializerError.js.map +0 -1
- package/dist/helpers/unstable_htmlAsRichText.cjs +0 -11
- package/dist/helpers/unstable_htmlAsRichText.cjs.map +0 -1
- package/dist/helpers/unstable_htmlAsRichText.d.ts +0 -81
- package/dist/helpers/unstable_htmlAsRichText.js +0 -11
- package/dist/helpers/unstable_htmlAsRichText.js.map +0 -1
- package/dist/helpers/unstable_markdownAsRichText.cjs +0 -12
- package/dist/helpers/unstable_markdownAsRichText.cjs.map +0 -1
- package/dist/helpers/unstable_markdownAsRichText.d.ts +0 -30
- package/dist/helpers/unstable_markdownAsRichText.js +0 -12
- package/dist/helpers/unstable_markdownAsRichText.js.map +0 -1
- package/dist/lib/RichTextFieldBuilder.cjs +0 -115
- package/dist/lib/RichTextFieldBuilder.cjs.map +0 -1
- package/dist/lib/RichTextFieldBuilder.d.ts +0 -35
- package/dist/lib/RichTextFieldBuilder.js +0 -115
- package/dist/lib/RichTextFieldBuilder.js.map +0 -1
- package/dist/lib/filterRichTextField.cjs +0 -88
- package/dist/lib/filterRichTextField.cjs.map +0 -1
- package/dist/lib/filterRichTextField.d.ts +0 -12
- package/dist/lib/filterRichTextField.js +0 -88
- package/dist/lib/filterRichTextField.js.map +0 -1
- package/dist/lib/hastSerializerHelpers.cjs +0 -96
- package/dist/lib/hastSerializerHelpers.cjs.map +0 -1
- package/dist/lib/hastSerializerHelpers.d.ts +0 -28
- package/dist/lib/hastSerializerHelpers.js +0 -96
- package/dist/lib/hastSerializerHelpers.js.map +0 -1
- package/dist/lib/hastToRichText.cjs +0 -164
- package/dist/lib/hastToRichText.cjs.map +0 -1
- package/dist/lib/hastToRichText.d.ts +0 -30
- package/dist/lib/hastToRichText.js +0 -164
- package/dist/lib/hastToRichText.js.map +0 -1
- package/dist/lib/rehypeRichText.cjs +0 -60
- package/dist/lib/rehypeRichText.cjs.map +0 -1
- package/dist/lib/rehypeRichText.d.ts +0 -66
- package/dist/lib/rehypeRichText.js +0 -60
- package/dist/lib/rehypeRichText.js.map +0 -1
- package/src/errors/PrismicRichTextError.ts +0 -1
- package/src/errors/PrismicRichTextSerializerError.ts +0 -3
- package/src/helpers/unstable_htmlAsRichText.ts +0 -122
- package/src/helpers/unstable_markdownAsRichText.ts +0 -53
- package/src/lib/RichTextFieldBuilder.ts +0 -164
- package/src/lib/filterRichTextField.ts +0 -159
- package/src/lib/hastSerializerHelpers.ts +0 -157
- package/src/lib/hastToRichText.ts +0 -295
- package/src/lib/rehypeRichText.ts +0 -184
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { splice } from "../micromark-util-chunked/index.js";
|
|
2
|
-
import { SpliceBuffer } from "./lib/splice-buffer.js";
|
|
3
|
-
function subtokenize(eventsArray) {
|
|
4
|
-
const jumps = {};
|
|
5
|
-
let index = -1;
|
|
6
|
-
let event;
|
|
7
|
-
let lineIndex;
|
|
8
|
-
let otherIndex;
|
|
9
|
-
let otherEvent;
|
|
10
|
-
let parameters;
|
|
11
|
-
let subevents;
|
|
12
|
-
let more;
|
|
13
|
-
const events = new SpliceBuffer(eventsArray);
|
|
14
|
-
while (++index < events.length) {
|
|
15
|
-
while (index in jumps) {
|
|
16
|
-
index = jumps[index];
|
|
17
|
-
}
|
|
18
|
-
event = events.get(index);
|
|
19
|
-
if (index && event[1].type === "chunkFlow" && events.get(index - 1)[1].type === "listItemPrefix") {
|
|
20
|
-
subevents = event[1]._tokenizer.events;
|
|
21
|
-
otherIndex = 0;
|
|
22
|
-
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
|
|
23
|
-
otherIndex += 2;
|
|
24
|
-
}
|
|
25
|
-
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") {
|
|
26
|
-
while (++otherIndex < subevents.length) {
|
|
27
|
-
if (subevents[otherIndex][1].type === "content") {
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
if (subevents[otherIndex][1].type === "chunkText") {
|
|
31
|
-
subevents[otherIndex][1]._isInFirstContentOfListItem = true;
|
|
32
|
-
otherIndex++;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (event[0] === "enter") {
|
|
38
|
-
if (event[1].contentType) {
|
|
39
|
-
Object.assign(jumps, subcontent(events, index));
|
|
40
|
-
index = jumps[index];
|
|
41
|
-
more = true;
|
|
42
|
-
}
|
|
43
|
-
} else if (event[1]._container) {
|
|
44
|
-
otherIndex = index;
|
|
45
|
-
lineIndex = void 0;
|
|
46
|
-
while (otherIndex--) {
|
|
47
|
-
otherEvent = events.get(otherIndex);
|
|
48
|
-
if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
|
|
49
|
-
if (otherEvent[0] === "enter") {
|
|
50
|
-
if (lineIndex) {
|
|
51
|
-
events.get(lineIndex)[1].type = "lineEndingBlank";
|
|
52
|
-
}
|
|
53
|
-
otherEvent[1].type = "lineEnding";
|
|
54
|
-
lineIndex = otherIndex;
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (lineIndex) {
|
|
61
|
-
event[1].end = Object.assign({}, events.get(lineIndex)[1].start);
|
|
62
|
-
parameters = events.slice(lineIndex, index);
|
|
63
|
-
parameters.unshift(event);
|
|
64
|
-
events.splice(lineIndex, index - lineIndex + 1, parameters);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));
|
|
69
|
-
return !more;
|
|
70
|
-
}
|
|
71
|
-
function subcontent(events, eventIndex) {
|
|
72
|
-
const token = events.get(eventIndex)[1];
|
|
73
|
-
const context = events.get(eventIndex)[2];
|
|
74
|
-
let startPosition = eventIndex - 1;
|
|
75
|
-
const startPositions = [];
|
|
76
|
-
const tokenizer = token._tokenizer || context.parser[token.contentType](token.start);
|
|
77
|
-
const childEvents = tokenizer.events;
|
|
78
|
-
const jumps = [];
|
|
79
|
-
const gaps = {};
|
|
80
|
-
let stream;
|
|
81
|
-
let previous;
|
|
82
|
-
let index = -1;
|
|
83
|
-
let current = token;
|
|
84
|
-
let adjust = 0;
|
|
85
|
-
let start = 0;
|
|
86
|
-
const breaks = [start];
|
|
87
|
-
while (current) {
|
|
88
|
-
while (events.get(++startPosition)[1] !== current) {
|
|
89
|
-
}
|
|
90
|
-
startPositions.push(startPosition);
|
|
91
|
-
if (!current._tokenizer) {
|
|
92
|
-
stream = context.sliceStream(current);
|
|
93
|
-
if (!current.next) {
|
|
94
|
-
stream.push(null);
|
|
95
|
-
}
|
|
96
|
-
if (previous) {
|
|
97
|
-
tokenizer.defineSkip(current.start);
|
|
98
|
-
}
|
|
99
|
-
if (current._isInFirstContentOfListItem) {
|
|
100
|
-
tokenizer._gfmTasklistFirstContentOfListItem = true;
|
|
101
|
-
}
|
|
102
|
-
tokenizer.write(stream);
|
|
103
|
-
if (current._isInFirstContentOfListItem) {
|
|
104
|
-
tokenizer._gfmTasklistFirstContentOfListItem = void 0;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
previous = current;
|
|
108
|
-
current = current.next;
|
|
109
|
-
}
|
|
110
|
-
current = token;
|
|
111
|
-
while (++index < childEvents.length) {
|
|
112
|
-
if (
|
|
113
|
-
// Find a void token that includes a break.
|
|
114
|
-
childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line
|
|
115
|
-
) {
|
|
116
|
-
start = index + 1;
|
|
117
|
-
breaks.push(start);
|
|
118
|
-
current._tokenizer = void 0;
|
|
119
|
-
current.previous = void 0;
|
|
120
|
-
current = current.next;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
tokenizer.events = [];
|
|
124
|
-
if (current) {
|
|
125
|
-
current._tokenizer = void 0;
|
|
126
|
-
current.previous = void 0;
|
|
127
|
-
} else {
|
|
128
|
-
breaks.pop();
|
|
129
|
-
}
|
|
130
|
-
index = breaks.length;
|
|
131
|
-
while (index--) {
|
|
132
|
-
const slice = childEvents.slice(breaks[index], breaks[index + 1]);
|
|
133
|
-
const start2 = startPositions.pop();
|
|
134
|
-
jumps.push([start2, start2 + slice.length - 1]);
|
|
135
|
-
events.splice(start2, 2, slice);
|
|
136
|
-
}
|
|
137
|
-
jumps.reverse();
|
|
138
|
-
index = -1;
|
|
139
|
-
while (++index < jumps.length) {
|
|
140
|
-
gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];
|
|
141
|
-
adjust += jumps[index][1] - jumps[index][0] - 1;
|
|
142
|
-
}
|
|
143
|
-
return gaps;
|
|
144
|
-
}
|
|
145
|
-
export {
|
|
146
|
-
SpliceBuffer,
|
|
147
|
-
subtokenize
|
|
148
|
-
};
|
|
149
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/micromark-util-subtokenize/index.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Token} Token\n */\n\nimport { splice } from 'micromark-util-chunked';\nimport { SpliceBuffer } from './lib/splice-buffer.js';\n\n// Hidden API exposed for testing.\nexport { SpliceBuffer } from './lib/splice-buffer.js';\n\n/**\n * Tokenize subcontent.\n *\n * @param {Array<Event>} eventsArray\n * List of events.\n * @returns {boolean}\n * Whether subtokens were found.\n */\n// eslint-disable-next-line complexity\nexport function subtokenize(eventsArray) {\n /** @type {Record<string, number>} */\n const jumps = {};\n let index = -1;\n /** @type {Event} */\n let event;\n /** @type {number | undefined} */\n let lineIndex;\n /** @type {number} */\n let otherIndex;\n /** @type {Event} */\n let otherEvent;\n /** @type {Array<Event>} */\n let parameters;\n /** @type {Array<Event>} */\n let subevents;\n /** @type {boolean | undefined} */\n let more;\n const events = new SpliceBuffer(eventsArray);\n while (++index < events.length) {\n while (index in jumps) {\n index = jumps[index];\n }\n event = events.get(index);\n\n // Add a hook for the GFM tasklist extension, which needs to know if text\n // is in the first content of a list item.\n if (index && event[1].type === \"chunkFlow\" && events.get(index - 1)[1].type === \"listItemPrefix\") {\n subevents = event[1]._tokenizer.events;\n otherIndex = 0;\n if (otherIndex < subevents.length && subevents[otherIndex][1].type === \"lineEndingBlank\") {\n otherIndex += 2;\n }\n if (otherIndex < subevents.length && subevents[otherIndex][1].type === \"content\") {\n while (++otherIndex < subevents.length) {\n if (subevents[otherIndex][1].type === \"content\") {\n break;\n }\n if (subevents[otherIndex][1].type === \"chunkText\") {\n subevents[otherIndex][1]._isInFirstContentOfListItem = true;\n otherIndex++;\n }\n }\n }\n }\n\n // Enter.\n if (event[0] === 'enter') {\n if (event[1].contentType) {\n Object.assign(jumps, subcontent(events, index));\n index = jumps[index];\n more = true;\n }\n }\n // Exit.\n else if (event[1]._container) {\n otherIndex = index;\n lineIndex = undefined;\n while (otherIndex--) {\n otherEvent = events.get(otherIndex);\n if (otherEvent[1].type === \"lineEnding\" || otherEvent[1].type === \"lineEndingBlank\") {\n if (otherEvent[0] === 'enter') {\n if (lineIndex) {\n events.get(lineIndex)[1].type = \"lineEndingBlank\";\n }\n otherEvent[1].type = \"lineEnding\";\n lineIndex = otherIndex;\n }\n } else {\n break;\n }\n }\n if (lineIndex) {\n // Fix position.\n event[1].end = Object.assign({}, events.get(lineIndex)[1].start);\n\n // Switch container exit w/ line endings.\n parameters = events.slice(lineIndex, index);\n parameters.unshift(event);\n events.splice(lineIndex, index - lineIndex + 1, parameters);\n }\n }\n }\n\n // The changes to the `events` buffer must be copied back into the eventsArray\n splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));\n return !more;\n}\n\n/**\n * Tokenize embedded tokens.\n *\n * @param {SpliceBuffer<Event>} events\n * @param {number} eventIndex\n * @returns {Record<string, number>}\n */\nfunction subcontent(events, eventIndex) {\n const token = events.get(eventIndex)[1];\n const context = events.get(eventIndex)[2];\n let startPosition = eventIndex - 1;\n /** @type {Array<number>} */\n const startPositions = [];\n const tokenizer = token._tokenizer || context.parser[token.contentType](token.start);\n const childEvents = tokenizer.events;\n /** @type {Array<[number, number]>} */\n const jumps = [];\n /** @type {Record<string, number>} */\n const gaps = {};\n /** @type {Array<Chunk>} */\n let stream;\n /** @type {Token | undefined} */\n let previous;\n let index = -1;\n /** @type {Token | undefined} */\n let current = token;\n let adjust = 0;\n let start = 0;\n const breaks = [start];\n\n // Loop forward through the linked tokens to pass them in order to the\n // subtokenizer.\n while (current) {\n // Find the position of the event for this token.\n while (events.get(++startPosition)[1] !== current) {\n // Empty.\n }\n startPositions.push(startPosition);\n if (!current._tokenizer) {\n stream = context.sliceStream(current);\n if (!current.next) {\n stream.push(null);\n }\n if (previous) {\n tokenizer.defineSkip(current.start);\n }\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = true;\n }\n tokenizer.write(stream);\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = undefined;\n }\n }\n\n // Unravel the next token.\n previous = current;\n current = current.next;\n }\n\n // Now, loop back through all events (and linked tokens), to figure out which\n // parts belong where.\n current = token;\n while (++index < childEvents.length) {\n if (\n // Find a void token that includes a break.\n childEvents[index][0] === 'exit' && childEvents[index - 1][0] === 'enter' && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) {\n start = index + 1;\n breaks.push(start);\n // Help GC.\n current._tokenizer = undefined;\n current.previous = undefined;\n current = current.next;\n }\n }\n\n // Help GC.\n tokenizer.events = [];\n\n // If there’s one more token (which is the cases for lines that end in an\n // EOF), that’s perfect: the last point we found starts it.\n // If there isn’t then make sure any remaining content is added to it.\n if (current) {\n // Help GC.\n current._tokenizer = undefined;\n current.previous = undefined;\n } else {\n breaks.pop();\n }\n\n // Now splice the events from the subtokenizer into the current events,\n // moving back to front so that splice indices aren’t affected.\n index = breaks.length;\n while (index--) {\n const slice = childEvents.slice(breaks[index], breaks[index + 1]);\n const start = startPositions.pop();\n jumps.push([start, start + slice.length - 1]);\n events.splice(start, 2, slice);\n }\n jumps.reverse();\n index = -1;\n while (++index < jumps.length) {\n gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];\n adjust += jumps[index][1] - jumps[index][0] - 1;\n }\n return gaps;\n}"],"names":["start"],"mappings":";;AAqBO,SAAS,YAAY,aAAa;AAEvC,QAAM,QAAQ,CAAA;AACd,MAAI,QAAQ;AAEZ,MAAI;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C;AACxD,cAAU,MAAM,KAAK,EAAE,CAAC,IAAI,MAAM,KAAK,EAAE,CAAC,IAAI;AAAA,EAC/C;AACD,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
class SpliceBuffer {
|
|
4
|
-
/**
|
|
5
|
-
* @param {ReadonlyArray<T> | null | undefined} [initial]
|
|
6
|
-
* Initial items (optional).
|
|
7
|
-
* @returns
|
|
8
|
-
* Splice buffer.
|
|
9
|
-
*/
|
|
10
|
-
constructor(initial) {
|
|
11
|
-
this.left = initial ? [...initial] : [];
|
|
12
|
-
this.right = [];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Array access;
|
|
16
|
-
* does not move the cursor.
|
|
17
|
-
*
|
|
18
|
-
* @param {number} index
|
|
19
|
-
* Index.
|
|
20
|
-
* @return {T}
|
|
21
|
-
* Item.
|
|
22
|
-
*/
|
|
23
|
-
get(index) {
|
|
24
|
-
if (index < 0 || index >= this.left.length + this.right.length) {
|
|
25
|
-
throw new RangeError("Cannot access index `" + index + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
|
|
26
|
-
}
|
|
27
|
-
if (index < this.left.length) return this.left[index];
|
|
28
|
-
return this.right[this.right.length - index + this.left.length - 1];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The length of the splice buffer, one greater than the largest index in the
|
|
32
|
-
* array.
|
|
33
|
-
*/
|
|
34
|
-
get length() {
|
|
35
|
-
return this.left.length + this.right.length;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Remove and return `list[0]`;
|
|
39
|
-
* moves the cursor to `0`.
|
|
40
|
-
*
|
|
41
|
-
* @returns {T | undefined}
|
|
42
|
-
* Item, optional.
|
|
43
|
-
*/
|
|
44
|
-
shift() {
|
|
45
|
-
this.setCursor(0);
|
|
46
|
-
return this.right.pop();
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Slice the buffer to get an array;
|
|
50
|
-
* does not move the cursor.
|
|
51
|
-
*
|
|
52
|
-
* @param {number} start
|
|
53
|
-
* Start.
|
|
54
|
-
* @param {number | null | undefined} [end]
|
|
55
|
-
* End (optional).
|
|
56
|
-
* @returns {Array<T>}
|
|
57
|
-
* Array of items.
|
|
58
|
-
*/
|
|
59
|
-
slice(start, end) {
|
|
60
|
-
const stop = end === null || end === void 0 ? Number.POSITIVE_INFINITY : end;
|
|
61
|
-
if (stop < this.left.length) {
|
|
62
|
-
return this.left.slice(start, stop);
|
|
63
|
-
}
|
|
64
|
-
if (start > this.left.length) {
|
|
65
|
-
return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();
|
|
66
|
-
}
|
|
67
|
-
return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Mimics the behavior of Array.prototype.splice() except for the change of
|
|
71
|
-
* interface necessary to avoid segfaults when patching in very large arrays.
|
|
72
|
-
*
|
|
73
|
-
* This operation moves cursor is moved to `start` and results in the cursor
|
|
74
|
-
* placed after any inserted items.
|
|
75
|
-
*
|
|
76
|
-
* @param {number} start
|
|
77
|
-
* Start;
|
|
78
|
-
* zero-based index at which to start changing the array;
|
|
79
|
-
* negative numbers count backwards from the end of the array and values
|
|
80
|
-
* that are out-of bounds are clamped to the appropriate end of the array.
|
|
81
|
-
* @param {number | null | undefined} [deleteCount=0]
|
|
82
|
-
* Delete count (default: `0`);
|
|
83
|
-
* maximum number of elements to delete, starting from start.
|
|
84
|
-
* @param {Array<T> | null | undefined} [items=[]]
|
|
85
|
-
* Items to include in place of the deleted items (default: `[]`).
|
|
86
|
-
* @return {Array<T>}
|
|
87
|
-
* Any removed items.
|
|
88
|
-
*/
|
|
89
|
-
splice(start, deleteCount, items) {
|
|
90
|
-
const count = deleteCount || 0;
|
|
91
|
-
this.setCursor(Math.trunc(start));
|
|
92
|
-
const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);
|
|
93
|
-
if (items) chunkedPush(this.left, items);
|
|
94
|
-
return removed.reverse();
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Remove and return the highest-numbered item in the array, so
|
|
98
|
-
* `list[list.length - 1]`;
|
|
99
|
-
* Moves the cursor to `length`.
|
|
100
|
-
*
|
|
101
|
-
* @returns {T | undefined}
|
|
102
|
-
* Item, optional.
|
|
103
|
-
*/
|
|
104
|
-
pop() {
|
|
105
|
-
this.setCursor(Number.POSITIVE_INFINITY);
|
|
106
|
-
return this.left.pop();
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Inserts a single item to the high-numbered side of the array;
|
|
110
|
-
* moves the cursor to `length`.
|
|
111
|
-
*
|
|
112
|
-
* @param {T} item
|
|
113
|
-
* Item.
|
|
114
|
-
* @returns {undefined}
|
|
115
|
-
* Nothing.
|
|
116
|
-
*/
|
|
117
|
-
push(item) {
|
|
118
|
-
this.setCursor(Number.POSITIVE_INFINITY);
|
|
119
|
-
this.left.push(item);
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Inserts many items to the high-numbered side of the array.
|
|
123
|
-
* Moves the cursor to `length`.
|
|
124
|
-
*
|
|
125
|
-
* @param {Array<T>} items
|
|
126
|
-
* Items.
|
|
127
|
-
* @returns {undefined}
|
|
128
|
-
* Nothing.
|
|
129
|
-
*/
|
|
130
|
-
pushMany(items) {
|
|
131
|
-
this.setCursor(Number.POSITIVE_INFINITY);
|
|
132
|
-
chunkedPush(this.left, items);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Inserts a single item to the low-numbered side of the array;
|
|
136
|
-
* Moves the cursor to `0`.
|
|
137
|
-
*
|
|
138
|
-
* @param {T} item
|
|
139
|
-
* Item.
|
|
140
|
-
* @returns {undefined}
|
|
141
|
-
* Nothing.
|
|
142
|
-
*/
|
|
143
|
-
unshift(item) {
|
|
144
|
-
this.setCursor(0);
|
|
145
|
-
this.right.push(item);
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Inserts many items to the low-numbered side of the array;
|
|
149
|
-
* moves the cursor to `0`.
|
|
150
|
-
*
|
|
151
|
-
* @param {Array<T>} items
|
|
152
|
-
* Items.
|
|
153
|
-
* @returns {undefined}
|
|
154
|
-
* Nothing.
|
|
155
|
-
*/
|
|
156
|
-
unshiftMany(items) {
|
|
157
|
-
this.setCursor(0);
|
|
158
|
-
chunkedPush(this.right, items.reverse());
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Move the cursor to a specific position in the array. Requires
|
|
162
|
-
* time proportional to the distance moved.
|
|
163
|
-
*
|
|
164
|
-
* If `n < 0`, the cursor will end up at the beginning.
|
|
165
|
-
* If `n > length`, the cursor will end up at the end.
|
|
166
|
-
*
|
|
167
|
-
* @param {number} n
|
|
168
|
-
* Position.
|
|
169
|
-
* @return {undefined}
|
|
170
|
-
* Nothing.
|
|
171
|
-
*/
|
|
172
|
-
setCursor(n) {
|
|
173
|
-
if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;
|
|
174
|
-
if (n < this.left.length) {
|
|
175
|
-
const removed = this.left.splice(n, Number.POSITIVE_INFINITY);
|
|
176
|
-
chunkedPush(this.right, removed.reverse());
|
|
177
|
-
} else {
|
|
178
|
-
const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);
|
|
179
|
-
chunkedPush(this.left, removed.reverse());
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
function chunkedPush(list, right) {
|
|
184
|
-
let chunkStart = 0;
|
|
185
|
-
if (right.length < 1e4) {
|
|
186
|
-
list.push(...right);
|
|
187
|
-
} else {
|
|
188
|
-
while (chunkStart < right.length) {
|
|
189
|
-
list.push(...right.slice(chunkStart, chunkStart + 1e4));
|
|
190
|
-
chunkStart += 1e4;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
exports.SpliceBuffer = SpliceBuffer;
|
|
195
|
-
//# sourceMappingURL=splice-buffer.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"splice-buffer.cjs","sources":["../../../../node_modules/micromark-util-subtokenize/lib/splice-buffer.js"],"sourcesContent":["/**\n * Some of the internal operations of micromark do lots of editing\n * operations on very large arrays. This runs into problems with two\n * properties of most circa-2020 JavaScript interpreters:\n *\n * - Array-length modifications at the high end of an array (push/pop) are\n * expected to be common and are implemented in (amortized) time\n * proportional to the number of elements added or removed, whereas\n * other operations (shift/unshift and splice) are much less efficient.\n * - Function arguments are passed on the stack, so adding tens of thousands\n * of elements to an array with `arr.push[...newElements]` will frequently\n * cause stack overflows. (see <https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why>)\n *\n * SpliceBuffers are an implementation of gap buffers, which are a\n * generalization of the \"queue made of two stacks\" idea. The splice buffer\n * maintains a cursor, and moving the cursor has cost proportional to the\n * distance the cursor moves, but inserting, deleting, or splicing in\n * new information at the cursor is as efficient as the push/pop operation.\n * This allows for an efficient sequence of splices (or pushes, pops, shifts,\n * or unshifts) as long such edits happen at the same part of the array or\n * generally sweep through the array from the beginning to the end.\n *\n * The interface for splice buffers also supports large numbers of inputs by\n * passing a single array argument rather passing multiple arguments on the\n * function call stack.\n *\n * @template T\n * Item type.\n */\nexport class SpliceBuffer {\n /**\n * @param {ReadonlyArray<T> | null | undefined} [initial]\n * Initial items (optional).\n * @returns\n * Splice buffer.\n */\n constructor(initial) {\n /** @type {Array<T>} */\n this.left = initial ? [...initial] : [];\n /** @type {Array<T>} */\n this.right = [];\n }\n\n /**\n * Array access;\n * does not move the cursor.\n *\n * @param {number} index\n * Index.\n * @return {T}\n * Item.\n */\n get(index) {\n if (index < 0 || index >= this.left.length + this.right.length) {\n throw new RangeError('Cannot access index `' + index + '` in a splice buffer of size `' + (this.left.length + this.right.length) + '`');\n }\n if (index < this.left.length) return this.left[index];\n return this.right[this.right.length - index + this.left.length - 1];\n }\n\n /**\n * The length of the splice buffer, one greater than the largest index in the\n * array.\n */\n get length() {\n return this.left.length + this.right.length;\n }\n\n /**\n * Remove and return `list[0]`;\n * moves the cursor to `0`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n shift() {\n this.setCursor(0);\n return this.right.pop();\n }\n\n /**\n * Slice the buffer to get an array;\n * does not move the cursor.\n *\n * @param {number} start\n * Start.\n * @param {number | null | undefined} [end]\n * End (optional).\n * @returns {Array<T>}\n * Array of items.\n */\n slice(start, end) {\n /** @type {number} */\n const stop = end === null || end === undefined ? Number.POSITIVE_INFINITY : end;\n if (stop < this.left.length) {\n return this.left.slice(start, stop);\n }\n if (start > this.left.length) {\n return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();\n }\n return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());\n }\n\n /**\n * Mimics the behavior of Array.prototype.splice() except for the change of\n * interface necessary to avoid segfaults when patching in very large arrays.\n *\n * This operation moves cursor is moved to `start` and results in the cursor\n * placed after any inserted items.\n *\n * @param {number} start\n * Start;\n * zero-based index at which to start changing the array;\n * negative numbers count backwards from the end of the array and values\n * that are out-of bounds are clamped to the appropriate end of the array.\n * @param {number | null | undefined} [deleteCount=0]\n * Delete count (default: `0`);\n * maximum number of elements to delete, starting from start.\n * @param {Array<T> | null | undefined} [items=[]]\n * Items to include in place of the deleted items (default: `[]`).\n * @return {Array<T>}\n * Any removed items.\n */\n splice(start, deleteCount, items) {\n /** @type {number} */\n const count = deleteCount || 0;\n this.setCursor(Math.trunc(start));\n const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);\n if (items) chunkedPush(this.left, items);\n return removed.reverse();\n }\n\n /**\n * Remove and return the highest-numbered item in the array, so\n * `list[list.length - 1]`;\n * Moves the cursor to `length`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n pop() {\n this.setCursor(Number.POSITIVE_INFINITY);\n return this.left.pop();\n }\n\n /**\n * Inserts a single item to the high-numbered side of the array;\n * moves the cursor to `length`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n push(item) {\n this.setCursor(Number.POSITIVE_INFINITY);\n this.left.push(item);\n }\n\n /**\n * Inserts many items to the high-numbered side of the array.\n * Moves the cursor to `length`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n pushMany(items) {\n this.setCursor(Number.POSITIVE_INFINITY);\n chunkedPush(this.left, items);\n }\n\n /**\n * Inserts a single item to the low-numbered side of the array;\n * Moves the cursor to `0`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n unshift(item) {\n this.setCursor(0);\n this.right.push(item);\n }\n\n /**\n * Inserts many items to the low-numbered side of the array;\n * moves the cursor to `0`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n unshiftMany(items) {\n this.setCursor(0);\n chunkedPush(this.right, items.reverse());\n }\n\n /**\n * Move the cursor to a specific position in the array. Requires\n * time proportional to the distance moved.\n *\n * If `n < 0`, the cursor will end up at the beginning.\n * If `n > length`, the cursor will end up at the end.\n *\n * @param {number} n\n * Position.\n * @return {undefined}\n * Nothing.\n */\n setCursor(n) {\n if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;\n if (n < this.left.length) {\n // Move cursor to the this.left\n const removed = this.left.splice(n, Number.POSITIVE_INFINITY);\n chunkedPush(this.right, removed.reverse());\n } else {\n // Move cursor to the this.right\n const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);\n chunkedPush(this.left, removed.reverse());\n }\n }\n}\n\n/**\n * Avoid stack overflow by pushing items onto the stack in segments\n *\n * @template T\n * Item type.\n * @param {Array<T>} list\n * List to inject into.\n * @param {ReadonlyArray<T>} right\n * Items to inject.\n * @return {undefined}\n * Nothing.\n */\nfunction chunkedPush(list, right) {\n /** @type {number} */\n let chunkStart = 0;\n if (right.length < 10000) {\n list.push(...right);\n } else {\n while (chunkStart < right.length) {\n list.push(...right.slice(chunkStart, chunkStart + 10000));\n chunkStart += 10000;\n }\n }\n}"],"names":[],"mappings":";;AA6BO,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOxB,YAAY,SAAS;AAEnB,SAAK,OAAO,UAAU,CAAC,GAAG,OAAO,IAAI,CAAA;AAErC,SAAK,QAAQ;EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWD,IAAI,OAAO;AACT,QAAI,QAAQ,KAAK,SAAS,KAAK,KAAK,SAAS,KAAK,MAAM,QAAQ;AAC9D,YAAM,IAAI,WAAW,0BAA0B,QAAQ,oCAAoC,KAAK,KAAK,SAAS,KAAK,MAAM,UAAU,GAAG;AAAA,IACvI;AACD,QAAI,QAAQ,KAAK,KAAK,OAAQ,QAAO,KAAK,KAAK,KAAK;AACpD,WAAO,KAAK,MAAM,KAAK,MAAM,SAAS,QAAQ,KAAK,KAAK,SAAS,CAAC;AAAA,EACnE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMD,IAAI,SAAS;AACX,WAAO,KAAK,KAAK,SAAS,KAAK,MAAM;AAAA,EACtC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASD,QAAQ;AACN,SAAK,UAAU,CAAC;AAChB,WAAO,KAAK,MAAM;EACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaD,MAAM,OAAO,KAAK;AAEhB,UAAM,OAAO,QAAQ,QAAQ,QAAQ,SAAY,OAAO,oBAAoB;AAC5E,QAAI,OAAO,KAAK,KAAK,QAAQ;AAC3B,aAAO,KAAK,KAAK,MAAM,OAAO,IAAI;AAAA,IACnC;AACD,QAAI,QAAQ,KA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B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWD,YAAY,OAAO;AACjB,SAAK,UAAU,CAAC;AAChB,gBAAY,KAAK,OAAO,MAAM,QAAS,CAAA;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcD,UAAU,GAAG;AACX,QAAI,MAAM,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,UAAU,KAAK,MAAM,WAAW,KAAK,IAAI,KAAK,KAAK,KAAK,WAAW,EAAG;AAClH,QAAI,IAAI,KAAK,KAAK,QAAQ;AAExB,YAAM,UAAU,KAAK,KAAK,OAAO,GAAG,OAAO,iBAAiB;AAC5D,kBAAY,KAAK,OAAO,QAAQ,QAAS,CAAA;AAAA,IAC/C,OAAW;AAEL,YAAM,UAAU,KAAK,MAAM,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,SAAS,GAAG,OAAO,iBAAiB;AACpG,kBAAY,KAAK,MAAM,QAAQ,QAAS,CAAA;AAAA,IACzC;AAAA,EACF;AACH;AAcA,SAAS,YAAY,MAAM,OAAO;AAEhC,MAAI,aAAa;AACjB,MAAI,MAAM,SAAS,KAAO;AACxB,SAAK,KAAK,GAAG,KAAK;AAAA,EACtB,OAAS;AACL,WAAO,aAAa,MAAM,QAAQ;AAChC,WAAK,KAAK,GAAG,MAAM,MAAM,YAAY,aAAa,GAAK,CAAC;AACxD,oBAAc;AAAA,IACf;AAAA,EACF;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
class SpliceBuffer {
|
|
2
|
-
/**
|
|
3
|
-
* @param {ReadonlyArray<T> | null | undefined} [initial]
|
|
4
|
-
* Initial items (optional).
|
|
5
|
-
* @returns
|
|
6
|
-
* Splice buffer.
|
|
7
|
-
*/
|
|
8
|
-
constructor(initial) {
|
|
9
|
-
this.left = initial ? [...initial] : [];
|
|
10
|
-
this.right = [];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Array access;
|
|
14
|
-
* does not move the cursor.
|
|
15
|
-
*
|
|
16
|
-
* @param {number} index
|
|
17
|
-
* Index.
|
|
18
|
-
* @return {T}
|
|
19
|
-
* Item.
|
|
20
|
-
*/
|
|
21
|
-
get(index) {
|
|
22
|
-
if (index < 0 || index >= this.left.length + this.right.length) {
|
|
23
|
-
throw new RangeError("Cannot access index `" + index + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
|
|
24
|
-
}
|
|
25
|
-
if (index < this.left.length) return this.left[index];
|
|
26
|
-
return this.right[this.right.length - index + this.left.length - 1];
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The length of the splice buffer, one greater than the largest index in the
|
|
30
|
-
* array.
|
|
31
|
-
*/
|
|
32
|
-
get length() {
|
|
33
|
-
return this.left.length + this.right.length;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Remove and return `list[0]`;
|
|
37
|
-
* moves the cursor to `0`.
|
|
38
|
-
*
|
|
39
|
-
* @returns {T | undefined}
|
|
40
|
-
* Item, optional.
|
|
41
|
-
*/
|
|
42
|
-
shift() {
|
|
43
|
-
this.setCursor(0);
|
|
44
|
-
return this.right.pop();
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Slice the buffer to get an array;
|
|
48
|
-
* does not move the cursor.
|
|
49
|
-
*
|
|
50
|
-
* @param {number} start
|
|
51
|
-
* Start.
|
|
52
|
-
* @param {number | null | undefined} [end]
|
|
53
|
-
* End (optional).
|
|
54
|
-
* @returns {Array<T>}
|
|
55
|
-
* Array of items.
|
|
56
|
-
*/
|
|
57
|
-
slice(start, end) {
|
|
58
|
-
const stop = end === null || end === void 0 ? Number.POSITIVE_INFINITY : end;
|
|
59
|
-
if (stop < this.left.length) {
|
|
60
|
-
return this.left.slice(start, stop);
|
|
61
|
-
}
|
|
62
|
-
if (start > this.left.length) {
|
|
63
|
-
return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();
|
|
64
|
-
}
|
|
65
|
-
return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Mimics the behavior of Array.prototype.splice() except for the change of
|
|
69
|
-
* interface necessary to avoid segfaults when patching in very large arrays.
|
|
70
|
-
*
|
|
71
|
-
* This operation moves cursor is moved to `start` and results in the cursor
|
|
72
|
-
* placed after any inserted items.
|
|
73
|
-
*
|
|
74
|
-
* @param {number} start
|
|
75
|
-
* Start;
|
|
76
|
-
* zero-based index at which to start changing the array;
|
|
77
|
-
* negative numbers count backwards from the end of the array and values
|
|
78
|
-
* that are out-of bounds are clamped to the appropriate end of the array.
|
|
79
|
-
* @param {number | null | undefined} [deleteCount=0]
|
|
80
|
-
* Delete count (default: `0`);
|
|
81
|
-
* maximum number of elements to delete, starting from start.
|
|
82
|
-
* @param {Array<T> | null | undefined} [items=[]]
|
|
83
|
-
* Items to include in place of the deleted items (default: `[]`).
|
|
84
|
-
* @return {Array<T>}
|
|
85
|
-
* Any removed items.
|
|
86
|
-
*/
|
|
87
|
-
splice(start, deleteCount, items) {
|
|
88
|
-
const count = deleteCount || 0;
|
|
89
|
-
this.setCursor(Math.trunc(start));
|
|
90
|
-
const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);
|
|
91
|
-
if (items) chunkedPush(this.left, items);
|
|
92
|
-
return removed.reverse();
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Remove and return the highest-numbered item in the array, so
|
|
96
|
-
* `list[list.length - 1]`;
|
|
97
|
-
* Moves the cursor to `length`.
|
|
98
|
-
*
|
|
99
|
-
* @returns {T | undefined}
|
|
100
|
-
* Item, optional.
|
|
101
|
-
*/
|
|
102
|
-
pop() {
|
|
103
|
-
this.setCursor(Number.POSITIVE_INFINITY);
|
|
104
|
-
return this.left.pop();
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Inserts a single item to the high-numbered side of the array;
|
|
108
|
-
* moves the cursor to `length`.
|
|
109
|
-
*
|
|
110
|
-
* @param {T} item
|
|
111
|
-
* Item.
|
|
112
|
-
* @returns {undefined}
|
|
113
|
-
* Nothing.
|
|
114
|
-
*/
|
|
115
|
-
push(item) {
|
|
116
|
-
this.setCursor(Number.POSITIVE_INFINITY);
|
|
117
|
-
this.left.push(item);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Inserts many items to the high-numbered side of the array.
|
|
121
|
-
* Moves the cursor to `length`.
|
|
122
|
-
*
|
|
123
|
-
* @param {Array<T>} items
|
|
124
|
-
* Items.
|
|
125
|
-
* @returns {undefined}
|
|
126
|
-
* Nothing.
|
|
127
|
-
*/
|
|
128
|
-
pushMany(items) {
|
|
129
|
-
this.setCursor(Number.POSITIVE_INFINITY);
|
|
130
|
-
chunkedPush(this.left, items);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Inserts a single item to the low-numbered side of the array;
|
|
134
|
-
* Moves the cursor to `0`.
|
|
135
|
-
*
|
|
136
|
-
* @param {T} item
|
|
137
|
-
* Item.
|
|
138
|
-
* @returns {undefined}
|
|
139
|
-
* Nothing.
|
|
140
|
-
*/
|
|
141
|
-
unshift(item) {
|
|
142
|
-
this.setCursor(0);
|
|
143
|
-
this.right.push(item);
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Inserts many items to the low-numbered side of the array;
|
|
147
|
-
* moves the cursor to `0`.
|
|
148
|
-
*
|
|
149
|
-
* @param {Array<T>} items
|
|
150
|
-
* Items.
|
|
151
|
-
* @returns {undefined}
|
|
152
|
-
* Nothing.
|
|
153
|
-
*/
|
|
154
|
-
unshiftMany(items) {
|
|
155
|
-
this.setCursor(0);
|
|
156
|
-
chunkedPush(this.right, items.reverse());
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Move the cursor to a specific position in the array. Requires
|
|
160
|
-
* time proportional to the distance moved.
|
|
161
|
-
*
|
|
162
|
-
* If `n < 0`, the cursor will end up at the beginning.
|
|
163
|
-
* If `n > length`, the cursor will end up at the end.
|
|
164
|
-
*
|
|
165
|
-
* @param {number} n
|
|
166
|
-
* Position.
|
|
167
|
-
* @return {undefined}
|
|
168
|
-
* Nothing.
|
|
169
|
-
*/
|
|
170
|
-
setCursor(n) {
|
|
171
|
-
if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;
|
|
172
|
-
if (n < this.left.length) {
|
|
173
|
-
const removed = this.left.splice(n, Number.POSITIVE_INFINITY);
|
|
174
|
-
chunkedPush(this.right, removed.reverse());
|
|
175
|
-
} else {
|
|
176
|
-
const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);
|
|
177
|
-
chunkedPush(this.left, removed.reverse());
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
function chunkedPush(list, right) {
|
|
182
|
-
let chunkStart = 0;
|
|
183
|
-
if (right.length < 1e4) {
|
|
184
|
-
list.push(...right);
|
|
185
|
-
} else {
|
|
186
|
-
while (chunkStart < right.length) {
|
|
187
|
-
list.push(...right.slice(chunkStart, chunkStart + 1e4));
|
|
188
|
-
chunkStart += 1e4;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
export {
|
|
193
|
-
SpliceBuffer
|
|
194
|
-
};
|
|
195
|
-
//# sourceMappingURL=splice-buffer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"splice-buffer.js","sources":["../../../../node_modules/micromark-util-subtokenize/lib/splice-buffer.js"],"sourcesContent":["/**\n * Some of the internal operations of micromark do lots of editing\n * operations on very large arrays. This runs into problems with two\n * properties of most circa-2020 JavaScript interpreters:\n *\n * - Array-length modifications at the high end of an array (push/pop) are\n * expected to be common and are implemented in (amortized) time\n * proportional to the number of elements added or removed, whereas\n * other operations (shift/unshift and splice) are much less efficient.\n * - Function arguments are passed on the stack, so adding tens of thousands\n * of elements to an array with `arr.push[...newElements]` will frequently\n * cause stack overflows. (see <https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why>)\n *\n * SpliceBuffers are an implementation of gap buffers, which are a\n * generalization of the \"queue made of two stacks\" idea. The splice buffer\n * maintains a cursor, and moving the cursor has cost proportional to the\n * distance the cursor moves, but inserting, deleting, or splicing in\n * new information at the cursor is as efficient as the push/pop operation.\n * This allows for an efficient sequence of splices (or pushes, pops, shifts,\n * or unshifts) as long such edits happen at the same part of the array or\n * generally sweep through the array from the beginning to the end.\n *\n * The interface for splice buffers also supports large numbers of inputs by\n * passing a single array argument rather passing multiple arguments on the\n * function call stack.\n *\n * @template T\n * Item type.\n */\nexport class SpliceBuffer {\n /**\n * @param {ReadonlyArray<T> | null | undefined} [initial]\n * Initial items (optional).\n * @returns\n * Splice buffer.\n */\n constructor(initial) {\n /** @type {Array<T>} */\n this.left = initial ? [...initial] : [];\n /** @type {Array<T>} */\n this.right = [];\n }\n\n /**\n * Array access;\n * does not move the cursor.\n *\n * @param {number} index\n * Index.\n * @return {T}\n * Item.\n */\n get(index) {\n if (index < 0 || index >= this.left.length + this.right.length) {\n throw new RangeError('Cannot access index `' + index + '` in a splice buffer of size `' + (this.left.length + this.right.length) + '`');\n }\n if (index < this.left.length) return this.left[index];\n return this.right[this.right.length - index + this.left.length - 1];\n }\n\n /**\n * The length of the splice buffer, one greater than the largest index in the\n * array.\n */\n get length() {\n return this.left.length + this.right.length;\n }\n\n /**\n * Remove and return `list[0]`;\n * moves the cursor to `0`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n shift() {\n this.setCursor(0);\n return this.right.pop();\n }\n\n /**\n * Slice the buffer to get an array;\n * does not move the cursor.\n *\n * @param {number} start\n * Start.\n * @param {number | null | undefined} [end]\n * End (optional).\n * @returns {Array<T>}\n * Array of items.\n */\n slice(start, end) {\n /** @type {number} */\n const stop = end === null || end === undefined ? Number.POSITIVE_INFINITY : end;\n if (stop < this.left.length) {\n return this.left.slice(start, stop);\n }\n if (start > this.left.length) {\n return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();\n }\n return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());\n }\n\n /**\n * Mimics the behavior of Array.prototype.splice() except for the change of\n * interface necessary to avoid segfaults when patching in very large arrays.\n *\n * This operation moves cursor is moved to `start` and results in the cursor\n * placed after any inserted items.\n *\n * @param {number} start\n * Start;\n * zero-based index at which to start changing the array;\n * negative numbers count backwards from the end of the array and values\n * that are out-of bounds are clamped to the appropriate end of the array.\n * @param {number | null | undefined} [deleteCount=0]\n * Delete count (default: `0`);\n * maximum number of elements to delete, starting from start.\n * @param {Array<T> | null | undefined} [items=[]]\n * Items to include in place of the deleted items (default: `[]`).\n * @return {Array<T>}\n * Any removed items.\n */\n splice(start, deleteCount, items) {\n /** @type {number} */\n const count = deleteCount || 0;\n this.setCursor(Math.trunc(start));\n const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);\n if (items) chunkedPush(this.left, items);\n return removed.reverse();\n }\n\n /**\n * Remove and return the highest-numbered item in the array, so\n * `list[list.length - 1]`;\n * Moves the cursor to `length`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n pop() {\n this.setCursor(Number.POSITIVE_INFINITY);\n return this.left.pop();\n }\n\n /**\n * Inserts a single item to the high-numbered side of the array;\n * moves the cursor to `length`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n push(item) {\n this.setCursor(Number.POSITIVE_INFINITY);\n this.left.push(item);\n }\n\n /**\n * Inserts many items to the high-numbered side of the array.\n * Moves the cursor to `length`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n pushMany(items) {\n this.setCursor(Number.POSITIVE_INFINITY);\n chunkedPush(this.left, items);\n }\n\n /**\n * Inserts a single item to the low-numbered side of the array;\n * Moves the cursor to `0`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n unshift(item) {\n this.setCursor(0);\n this.right.push(item);\n }\n\n /**\n * Inserts many items to the low-numbered side of the array;\n * moves the cursor to `0`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n unshiftMany(items) {\n this.setCursor(0);\n chunkedPush(this.right, items.reverse());\n }\n\n /**\n * Move the cursor to a specific position in the array. Requires\n * time proportional to the distance moved.\n *\n * If `n < 0`, the cursor will end up at the beginning.\n * If `n > length`, the cursor will end up at the end.\n *\n * @param {number} n\n * Position.\n * @return {undefined}\n * Nothing.\n */\n setCursor(n) {\n if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;\n if (n < this.left.length) {\n // Move cursor to the this.left\n const removed = this.left.splice(n, Number.POSITIVE_INFINITY);\n chunkedPush(this.right, removed.reverse());\n } else {\n // Move cursor to the this.right\n const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);\n chunkedPush(this.left, removed.reverse());\n }\n }\n}\n\n/**\n * Avoid stack overflow by pushing items onto the stack in segments\n *\n * @template T\n * Item type.\n * @param {Array<T>} list\n * List to inject into.\n * @param {ReadonlyArray<T>} right\n * Items to inject.\n * @return {undefined}\n * Nothing.\n */\nfunction chunkedPush(list, right) {\n /** @type {number} */\n let chunkStart = 0;\n if (right.length < 10000) {\n list.push(...right);\n } else {\n while (chunkStart < right.length) {\n list.push(...right.slice(chunkStart, chunkStart + 10000));\n chunkStart += 10000;\n }\n }\n}"],"names":[],"mappings":"AA6BO,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOxB,YAAY,SAAS;AAEnB,SAAK,OAAO,UAAU,CAAC,GAAG,OAAO,IAAI,CAAA;AAErC,SAAK,QAAQ;EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWD,IAAI,OAAO;AACT,QAAI,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AK,OAAO,GAAG,OAAO,iBAAiB;AAC5D,kBAAY,KAAK,OAAO,QAAQ,QAAS,CAAA;AAAA,IAC/C,OAAW;AAEL,YAAM,UAAU,KAAK,MAAM,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,SAAS,GAAG,OAAO,iBAAiB;AACpG,kBAAY,KAAK,MAAM,QAAQ,QAAS,CAAA;AAAA,IACzC;AAAA,EACF;AACH;AAcA,SAAS,YAAY,MAAM,OAAO;AAEhC,MAAI,aAAa;AACjB,MAAI,MAAM,SAAS,KAAO;AACxB,SAAK,KAAK,GAAG,KAAK;AAAA,EACtB,OAAS;AACL,WAAO,aAAa,MAAM,QAAQ;AAChC,WAAK,KAAK,GAAG,MAAM,MAAM,YAAY,aAAa,GAAK,CAAC;AACxD,oBAAc;AAAA,IACf;AAAA,EACF;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../boolbase/index.cjs");
|
|
4
|
-
function compile(parsed) {
|
|
5
|
-
const a = parsed[0];
|
|
6
|
-
const b = parsed[1] - 1;
|
|
7
|
-
if (b < 0 && a <= 0)
|
|
8
|
-
return index.falseFunc;
|
|
9
|
-
if (a === -1)
|
|
10
|
-
return (index2) => index2 <= b;
|
|
11
|
-
if (a === 0)
|
|
12
|
-
return (index2) => index2 === b;
|
|
13
|
-
if (a === 1)
|
|
14
|
-
return b < 0 ? index.trueFunc : (index2) => index2 >= b;
|
|
15
|
-
const absA = Math.abs(a);
|
|
16
|
-
const bMod = (b % absA + absA) % absA;
|
|
17
|
-
return a > 1 ? (index2) => index2 >= b && index2 % absA === bMod : (index2) => index2 <= b && index2 % absA === bMod;
|
|
18
|
-
}
|
|
19
|
-
exports.compile = compile;
|
|
20
|
-
//# sourceMappingURL=compile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile.cjs","sources":["../../../../../node_modules/nth-check/lib/esm/compile.js"],"sourcesContent":["import boolbase from \"boolbase\";\n/**\n * Returns a function that checks if an elements index matches the given rule\n * highly optimized to return the fastest solution.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A highly optimized function that returns whether an index matches the nth-check.\n * @example\n *\n * ```js\n * const check = nthCheck.compile([2, 3]);\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n * ```\n */\nexport function compile(parsed) {\n const a = parsed[0];\n // Subtract 1 from `b`, to convert from one- to zero-indexed.\n const b = parsed[1] - 1;\n /*\n * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`.\n * Besides, the specification states that no elements are\n * matched when `a` and `b` are 0.\n *\n * `b < 0` here as we subtracted 1 from `b` above.\n */\n if (b < 0 && a <= 0)\n return boolbase.falseFunc;\n // When `a` is in the range -1..1, it matches any element (so only `b` is checked).\n if (a === -1)\n return (index) => index <= b;\n if (a === 0)\n return (index) => index === b;\n // When `b <= 0` and `a === 1`, they match any element.\n if (a === 1)\n return b < 0 ? boolbase.trueFunc : (index) => index >= b;\n /*\n * Otherwise, modulo can be used to check if there is a match.\n *\n * Modulo doesn't care about the sign, so let's use `a`s absolute value.\n */\n const absA = Math.abs(a);\n // Get `b mod a`, + a if this is negative.\n const bMod = ((b % absA) + absA) % absA;\n return a > 1\n ? (index) => index >= b && index % absA === bMod\n : (index) => index <= b && index % absA === bMod;\n}\n/**\n * Returns a function that produces a monotonously increasing sequence of indices.\n *\n * If the sequence has an end, the returned function will return `null` after\n * the last index in the sequence.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A function that produces a sequence of indices.\n * @example <caption>Always increasing (2n+3)</caption>\n *\n * ```js\n * const gen = nthCheck.generate([2, 3])\n *\n * gen() // `1`\n * gen() // `3`\n * gen() // `5`\n * gen() // `8`\n * gen() // `11`\n * ```\n *\n * @example <caption>With end value (-2n+10)</caption>\n *\n * ```js\n *\n * const gen = nthCheck.generate([-2, 5]);\n *\n * gen() // 0\n * gen() // 2\n * gen() // 4\n * gen() // null\n * ```\n */\nexport function generate(parsed) {\n const a = parsed[0];\n // Subtract 1 from `b`, to convert from one- to zero-indexed.\n let b = parsed[1] - 1;\n let n = 0;\n // Make sure to always return an increasing sequence\n if (a < 0) {\n const aPos = -a;\n // Get `b mod a`\n const minValue = ((b % aPos) + aPos) % aPos;\n return () => {\n const val = minValue + aPos * n++;\n return val > b ? null : val;\n };\n }\n if (a === 0)\n return b < 0\n ? // There are no result — always return `null`\n () => null\n : // Return `b` exactly once\n () => (n++ === 0 ? b : null);\n if (b < 0) {\n b += a * Math.ceil(-b / a);\n }\n return () => a * n++ + b;\n}\n//# sourceMappingURL=compile.js.map"],"names":["boolbase","index"],"mappings":";;;AAqBO,SAAS,QAAQ,QAAQ;AAC5B,QAAM,IAAI,OAAO,CAAC;AAElB,QAAM,IAAI,OAAO,CAAC,IAAI;AAQtB,MAAI,IAAI,KAAK,KAAK;AACd,WAAOA,MAAS;AAEpB,MAAI,MAAM;AACN,WAAO,CAACC,WAAUA,UAAS;AAC/B,MAAI,MAAM;AACN,WAAO,CAACA,WAAUA,WAAU;AAEhC,MAAI,MAAM;AACN,WAAO,IAAI,IAAID,MAAS,WAAW,CAACC,WAAUA,UAAS;AAM3D,QAAM,OAAO,KAAK,IAAI,CAAC;AAEvB,QAAM,QAAS,IAAI,OAAQ,QAAQ;AACnC,SAAO,IAAI,IACL,CAACA,WAAUA,UAAS,KAAKA,SAAQ,SAAS,OAC1C,CAACA,WAAUA,UAAS,KAAKA,SAAQ,SAAS;AACpD;;","x_google_ignoreList":[0]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import boolbase from "../../../boolbase/index.js";
|
|
2
|
-
function compile(parsed) {
|
|
3
|
-
const a = parsed[0];
|
|
4
|
-
const b = parsed[1] - 1;
|
|
5
|
-
if (b < 0 && a <= 0)
|
|
6
|
-
return boolbase.falseFunc;
|
|
7
|
-
if (a === -1)
|
|
8
|
-
return (index) => index <= b;
|
|
9
|
-
if (a === 0)
|
|
10
|
-
return (index) => index === b;
|
|
11
|
-
if (a === 1)
|
|
12
|
-
return b < 0 ? boolbase.trueFunc : (index) => index >= b;
|
|
13
|
-
const absA = Math.abs(a);
|
|
14
|
-
const bMod = (b % absA + absA) % absA;
|
|
15
|
-
return a > 1 ? (index) => index >= b && index % absA === bMod : (index) => index <= b && index % absA === bMod;
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
compile
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=compile.js.map
|