@easyv/biz-components 0.0.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/_virtual/_commonjsHelpers.es.js +9 -0
- package/dist/_virtual/_commonjsHelpers.es.js.map +1 -0
- package/dist/_virtual/index.es.js +5 -0
- package/dist/_virtual/index.es.js.map +1 -0
- package/dist/_virtual/index.es2.js +5 -0
- package/dist/_virtual/index.es2.js.map +1 -0
- package/dist/_virtual/index.es3.js +5 -0
- package/dist/_virtual/index.es3.js.map +1 -0
- package/dist/_virtual/index.es4.js +5 -0
- package/dist/_virtual/index.es4.js.map +1 -0
- package/dist/_virtual/index.es5.js +5 -0
- package/dist/_virtual/index.es5.js.map +1 -0
- package/dist/_virtual/jsx-runtime.es.js +5 -0
- package/dist/_virtual/jsx-runtime.es.js.map +1 -0
- package/dist/_virtual/react-is.development.es.js +5 -0
- package/dist/_virtual/react-is.development.es.js.map +1 -0
- package/dist/_virtual/react-is.production.min.es.js +5 -0
- package/dist/_virtual/react-is.production.min.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +1 -0
- package/dist/_virtual/utilities.es.js +5 -0
- package/dist/_virtual/utilities.es.js.map +1 -0
- package/dist/components/AiMessageRender/AiMessageRender.d.ts +7 -0
- package/dist/components/AiMessageRender/AiMessageRender.es.js +47 -0
- package/dist/components/AiMessageRender/AiMessageRender.es.js.map +1 -0
- package/dist/components/AiMessageRender/index.css.es.js +17 -0
- package/dist/components/AiMessageRender/index.css.es.js.map +1 -0
- package/dist/components/AiMessageRender/index.d.ts +2 -0
- package/dist/components/AiMessageRender/types.d.ts +9 -0
- package/dist/components/Button/index.d.ts +21 -0
- package/dist/components/Button/index.es.js +23 -0
- package/dist/components/Button/index.es.js.map +1 -0
- package/dist/components/ShadowDom/ShadowDom.d.ts +7 -0
- package/dist/components/ShadowDom/ShadowDom.es.js +23 -0
- package/dist/components/ShadowDom/ShadowDom.es.js.map +1 -0
- package/dist/components/ShadowDom/index.d.ts +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +9 -0
- package/dist/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js +1160 -0
- package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js +63 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js +12 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js +107 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js +14 -0
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js.map +1 -0
- package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js +8 -0
- package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js +43 -0
- package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +43 -0
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js +10 -0
- package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.es.js +15 -0
- package/dist/node_modules/.pnpm/decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.es.js.map +1 -0
- package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js +9 -0
- package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js.map +1 -0
- package/dist/node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.es.js +8 -0
- package/dist/node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js +40 -0
- package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +303 -0
- package/dist/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js +11 -0
- package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js +27 -0
- package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js +87 -0
- package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js +10 -0
- package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.es.js +582 -0
- package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.es.js +91 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.es.js +13 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/break.es.js +9 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/break.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/code.es.js +16 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/code.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/delete.es.js +13 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/delete.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.es.js +13 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.es.js +29 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/heading.es.js +13 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/heading.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/html.es.js +10 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/html.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.es.js +15 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image.es.js +11 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/index.es.js +59 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.es.js +15 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.es.js +20 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link.es.js +16 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.es.js +43 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list.es.js +22 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.es.js +13 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/root.es.js +8 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/root.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/strong.es.js +13 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/strong.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.es.js +14 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.es.js +22 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table.es.js +33 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/text.es.js +9 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/text.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.es.js +13 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.es.js +11 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.es.js +14 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.es.js +105 -0
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.es.js.map +1 -0
- package/dist/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js +30 -0
- package/dist/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js +84 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js +44 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js +19 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js +43 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js +18 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js +31 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js +95 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js +44 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js +46 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js +51 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js +81 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.es.js +18 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js +47 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js +145 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js +103 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js +153 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.es.js +23 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.es.js +20 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js +15 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js +91 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js +58 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js +26 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js +32 -0
- package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js +29 -0
- package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js +16 -0
- package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js +27 -0
- package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js +13 -0
- package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js +40 -0
- package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js +17 -0
- package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js +11 -0
- package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js +37 -0
- package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.es.js +17 -0
- package/dist/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js +19 -0
- package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.es.js +69 -0
- package/dist/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js +7 -0
- package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js +13 -0
- package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js +24 -0
- package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js +56 -0
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js +176 -0
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js +86 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js +224 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js +38 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js +127 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js +34 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js +96 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js +33 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js +10 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js.map +1 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js +40 -0
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js.map +1 -0
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js +55 -0
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js +55 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js.map +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js +53 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js.map +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js +330 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js.map +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +16 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +11 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js.map +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js +8 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js +13 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js +62 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js +34 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js +23 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js +369 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js +7 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js +567 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js +8 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js +7 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js +20 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js +37 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js +29 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js +11 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js +22 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js +15 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js +20 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js +12 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js.map +1 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js +12 -0
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js.map +1 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js +96 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js.map +1 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js +79 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js.map +1 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +11 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/react-markdown@10.1.0_@types_react@18.2.0_react@18.2.0/node_modules/react-markdown/lib/index.es.js +103 -0
- package/dist/node_modules/.pnpm/react-markdown@10.1.0_@types_react@18.2.0_react@18.2.0/node_modules/react-markdown/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js +590 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +1 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +29 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +1 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js +9 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js.map +1 -0
- package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js +20 -0
- package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js +19 -0
- package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js +7 -0
- package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js +21 -0
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js +17 -0
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js.map +1 -0
- package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js +22 -0
- package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js +29 -0
- package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js +61 -0
- package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js +26 -0
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +530 -0
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js +85 -0
- package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js +24 -0
- package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.es.js +16 -0
- package/dist/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.es.js +7 -0
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js +57 -0
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js +17 -0
- package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js +92 -0
- package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js +407 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js.map +1 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js +113 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js.map +1 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js +8 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js.map +1 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js +42 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js.map +1 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js +8 -0
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js.map +1 -0
- package/package.json +33 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import { minpath as n } from "./minpath.browser.es.js";
|
|
2
|
+
import { minproc as p } from "./minproc.browser.es.js";
|
|
3
|
+
import { urlToPath as u } from "./minurl.browser.es.js";
|
|
4
|
+
import { isUrl as f } from "./minurl.shared.es.js";
|
|
5
|
+
import { VFileMessage as c } from "../../../../vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js";
|
|
6
|
+
const a = (
|
|
7
|
+
/** @type {const} */
|
|
8
|
+
[
|
|
9
|
+
"history",
|
|
10
|
+
"path",
|
|
11
|
+
"basename",
|
|
12
|
+
"stem",
|
|
13
|
+
"extname",
|
|
14
|
+
"dirname"
|
|
15
|
+
]
|
|
16
|
+
);
|
|
17
|
+
class E {
|
|
18
|
+
/**
|
|
19
|
+
* Create a new virtual file.
|
|
20
|
+
*
|
|
21
|
+
* `options` is treated as:
|
|
22
|
+
*
|
|
23
|
+
* * `string` or `Uint8Array` — `{value: options}`
|
|
24
|
+
* * `URL` — `{path: options}`
|
|
25
|
+
* * `VFile` — shallow copies its data over to the new file
|
|
26
|
+
* * `object` — all fields are shallow copied over to the new file
|
|
27
|
+
*
|
|
28
|
+
* Path related fields are set in the following order (least specific to
|
|
29
|
+
* most specific): `history`, `path`, `basename`, `stem`, `extname`,
|
|
30
|
+
* `dirname`.
|
|
31
|
+
*
|
|
32
|
+
* You cannot set `dirname` or `extname` without setting either `history`,
|
|
33
|
+
* `path`, `basename`, or `stem` too.
|
|
34
|
+
*
|
|
35
|
+
* @param {Compatible | null | undefined} [value]
|
|
36
|
+
* File value.
|
|
37
|
+
* @returns
|
|
38
|
+
* New instance.
|
|
39
|
+
*/
|
|
40
|
+
constructor(t) {
|
|
41
|
+
let e;
|
|
42
|
+
t ? f(t) ? e = { path: t } : typeof t == "string" || l(t) ? e = { value: t } : e = t : e = {}, this.cwd = "cwd" in e ? "" : p.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
|
|
43
|
+
let r = -1;
|
|
44
|
+
for (; ++r < a.length; ) {
|
|
45
|
+
const h = a[r];
|
|
46
|
+
h in e && e[h] !== void 0 && e[h] !== null && (this[h] = h === "history" ? [...e[h]] : e[h]);
|
|
47
|
+
}
|
|
48
|
+
let i;
|
|
49
|
+
for (i in e)
|
|
50
|
+
a.includes(i) || (this[i] = e[i]);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get the basename (including extname) (example: `'index.min.js'`).
|
|
54
|
+
*
|
|
55
|
+
* @returns {string | undefined}
|
|
56
|
+
* Basename.
|
|
57
|
+
*/
|
|
58
|
+
get basename() {
|
|
59
|
+
return typeof this.path == "string" ? n.basename(this.path) : void 0;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Set basename (including extname) (`'index.min.js'`).
|
|
63
|
+
*
|
|
64
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
65
|
+
* on windows).
|
|
66
|
+
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
67
|
+
*
|
|
68
|
+
* @param {string} basename
|
|
69
|
+
* Basename.
|
|
70
|
+
* @returns {undefined}
|
|
71
|
+
* Nothing.
|
|
72
|
+
*/
|
|
73
|
+
set basename(t) {
|
|
74
|
+
m(t, "basename"), o(t, "basename"), this.path = n.join(this.dirname || "", t);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get the parent path (example: `'~'`).
|
|
78
|
+
*
|
|
79
|
+
* @returns {string | undefined}
|
|
80
|
+
* Dirname.
|
|
81
|
+
*/
|
|
82
|
+
get dirname() {
|
|
83
|
+
return typeof this.path == "string" ? n.dirname(this.path) : void 0;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Set the parent path (example: `'~'`).
|
|
87
|
+
*
|
|
88
|
+
* Cannot be set if there’s no `path` yet.
|
|
89
|
+
*
|
|
90
|
+
* @param {string | undefined} dirname
|
|
91
|
+
* Dirname.
|
|
92
|
+
* @returns {undefined}
|
|
93
|
+
* Nothing.
|
|
94
|
+
*/
|
|
95
|
+
set dirname(t) {
|
|
96
|
+
d(this.basename, "dirname"), this.path = n.join(t || "", this.basename);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get the extname (including dot) (example: `'.js'`).
|
|
100
|
+
*
|
|
101
|
+
* @returns {string | undefined}
|
|
102
|
+
* Extname.
|
|
103
|
+
*/
|
|
104
|
+
get extname() {
|
|
105
|
+
return typeof this.path == "string" ? n.extname(this.path) : void 0;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Set the extname (including dot) (example: `'.js'`).
|
|
109
|
+
*
|
|
110
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
111
|
+
* on windows).
|
|
112
|
+
* Cannot be set if there’s no `path` yet.
|
|
113
|
+
*
|
|
114
|
+
* @param {string | undefined} extname
|
|
115
|
+
* Extname.
|
|
116
|
+
* @returns {undefined}
|
|
117
|
+
* Nothing.
|
|
118
|
+
*/
|
|
119
|
+
set extname(t) {
|
|
120
|
+
if (o(t, "extname"), d(this.dirname, "extname"), t) {
|
|
121
|
+
if (t.codePointAt(0) !== 46)
|
|
122
|
+
throw new Error("`extname` must start with `.`");
|
|
123
|
+
if (t.includes(".", 1))
|
|
124
|
+
throw new Error("`extname` cannot contain multiple dots");
|
|
125
|
+
}
|
|
126
|
+
this.path = n.join(this.dirname, this.stem + (t || ""));
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get the full path (example: `'~/index.min.js'`).
|
|
130
|
+
*
|
|
131
|
+
* @returns {string}
|
|
132
|
+
* Path.
|
|
133
|
+
*/
|
|
134
|
+
get path() {
|
|
135
|
+
return this.history[this.history.length - 1];
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Set the full path (example: `'~/index.min.js'`).
|
|
139
|
+
*
|
|
140
|
+
* Cannot be nullified.
|
|
141
|
+
* You can set a file URL (a `URL` object with a `file:` protocol) which will
|
|
142
|
+
* be turned into a path with `url.fileURLToPath`.
|
|
143
|
+
*
|
|
144
|
+
* @param {URL | string} path
|
|
145
|
+
* Path.
|
|
146
|
+
* @returns {undefined}
|
|
147
|
+
* Nothing.
|
|
148
|
+
*/
|
|
149
|
+
set path(t) {
|
|
150
|
+
f(t) && (t = u(t)), m(t, "path"), this.path !== t && this.history.push(t);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
154
|
+
*
|
|
155
|
+
* @returns {string | undefined}
|
|
156
|
+
* Stem.
|
|
157
|
+
*/
|
|
158
|
+
get stem() {
|
|
159
|
+
return typeof this.path == "string" ? n.basename(this.path, this.extname) : void 0;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
163
|
+
*
|
|
164
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
165
|
+
* on windows).
|
|
166
|
+
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
167
|
+
*
|
|
168
|
+
* @param {string} stem
|
|
169
|
+
* Stem.
|
|
170
|
+
* @returns {undefined}
|
|
171
|
+
* Nothing.
|
|
172
|
+
*/
|
|
173
|
+
set stem(t) {
|
|
174
|
+
m(t, "stem"), o(t, "stem"), this.path = n.join(this.dirname || "", t + (this.extname || ""));
|
|
175
|
+
}
|
|
176
|
+
// Normal prototypal methods.
|
|
177
|
+
/**
|
|
178
|
+
* Create a fatal message for `reason` associated with the file.
|
|
179
|
+
*
|
|
180
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
181
|
+
* and the `file` field is set to the current file path.
|
|
182
|
+
* The message is added to the `messages` field on `file`.
|
|
183
|
+
*
|
|
184
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
185
|
+
*
|
|
186
|
+
* @overload
|
|
187
|
+
* @param {string} reason
|
|
188
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
189
|
+
* @returns {never}
|
|
190
|
+
*
|
|
191
|
+
* @overload
|
|
192
|
+
* @param {string} reason
|
|
193
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
194
|
+
* @param {string | null | undefined} [origin]
|
|
195
|
+
* @returns {never}
|
|
196
|
+
*
|
|
197
|
+
* @overload
|
|
198
|
+
* @param {string} reason
|
|
199
|
+
* @param {Point | Position | null | undefined} place
|
|
200
|
+
* @param {string | null | undefined} [origin]
|
|
201
|
+
* @returns {never}
|
|
202
|
+
*
|
|
203
|
+
* @overload
|
|
204
|
+
* @param {string} reason
|
|
205
|
+
* @param {string | null | undefined} [origin]
|
|
206
|
+
* @returns {never}
|
|
207
|
+
*
|
|
208
|
+
* @overload
|
|
209
|
+
* @param {Error | VFileMessage} cause
|
|
210
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
211
|
+
* @param {string | null | undefined} [origin]
|
|
212
|
+
* @returns {never}
|
|
213
|
+
*
|
|
214
|
+
* @overload
|
|
215
|
+
* @param {Error | VFileMessage} cause
|
|
216
|
+
* @param {Point | Position | null | undefined} place
|
|
217
|
+
* @param {string | null | undefined} [origin]
|
|
218
|
+
* @returns {never}
|
|
219
|
+
*
|
|
220
|
+
* @overload
|
|
221
|
+
* @param {Error | VFileMessage} cause
|
|
222
|
+
* @param {string | null | undefined} [origin]
|
|
223
|
+
* @returns {never}
|
|
224
|
+
*
|
|
225
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
226
|
+
* Reason for message, should use markdown.
|
|
227
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
228
|
+
* Configuration (optional).
|
|
229
|
+
* @param {string | null | undefined} [origin]
|
|
230
|
+
* Place in code where the message originates (example:
|
|
231
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
232
|
+
* @returns {never}
|
|
233
|
+
* Never.
|
|
234
|
+
* @throws {VFileMessage}
|
|
235
|
+
* Message.
|
|
236
|
+
*/
|
|
237
|
+
fail(t, e, r) {
|
|
238
|
+
const i = this.message(t, e, r);
|
|
239
|
+
throw i.fatal = !0, i;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Create an info message for `reason` associated with the file.
|
|
243
|
+
*
|
|
244
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
245
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
246
|
+
* The message is added to the `messages` field on `file`.
|
|
247
|
+
*
|
|
248
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
249
|
+
*
|
|
250
|
+
* @overload
|
|
251
|
+
* @param {string} reason
|
|
252
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
253
|
+
* @returns {VFileMessage}
|
|
254
|
+
*
|
|
255
|
+
* @overload
|
|
256
|
+
* @param {string} reason
|
|
257
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
258
|
+
* @param {string | null | undefined} [origin]
|
|
259
|
+
* @returns {VFileMessage}
|
|
260
|
+
*
|
|
261
|
+
* @overload
|
|
262
|
+
* @param {string} reason
|
|
263
|
+
* @param {Point | Position | null | undefined} place
|
|
264
|
+
* @param {string | null | undefined} [origin]
|
|
265
|
+
* @returns {VFileMessage}
|
|
266
|
+
*
|
|
267
|
+
* @overload
|
|
268
|
+
* @param {string} reason
|
|
269
|
+
* @param {string | null | undefined} [origin]
|
|
270
|
+
* @returns {VFileMessage}
|
|
271
|
+
*
|
|
272
|
+
* @overload
|
|
273
|
+
* @param {Error | VFileMessage} cause
|
|
274
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
275
|
+
* @param {string | null | undefined} [origin]
|
|
276
|
+
* @returns {VFileMessage}
|
|
277
|
+
*
|
|
278
|
+
* @overload
|
|
279
|
+
* @param {Error | VFileMessage} cause
|
|
280
|
+
* @param {Point | Position | null | undefined} place
|
|
281
|
+
* @param {string | null | undefined} [origin]
|
|
282
|
+
* @returns {VFileMessage}
|
|
283
|
+
*
|
|
284
|
+
* @overload
|
|
285
|
+
* @param {Error | VFileMessage} cause
|
|
286
|
+
* @param {string | null | undefined} [origin]
|
|
287
|
+
* @returns {VFileMessage}
|
|
288
|
+
*
|
|
289
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
290
|
+
* Reason for message, should use markdown.
|
|
291
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
292
|
+
* Configuration (optional).
|
|
293
|
+
* @param {string | null | undefined} [origin]
|
|
294
|
+
* Place in code where the message originates (example:
|
|
295
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
296
|
+
* @returns {VFileMessage}
|
|
297
|
+
* Message.
|
|
298
|
+
*/
|
|
299
|
+
info(t, e, r) {
|
|
300
|
+
const i = this.message(t, e, r);
|
|
301
|
+
return i.fatal = void 0, i;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Create a message for `reason` associated with the file.
|
|
305
|
+
*
|
|
306
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
307
|
+
* needed) and the `file` field is set to the current file path.
|
|
308
|
+
* The message is added to the `messages` field on `file`.
|
|
309
|
+
*
|
|
310
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
311
|
+
*
|
|
312
|
+
* @overload
|
|
313
|
+
* @param {string} reason
|
|
314
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
315
|
+
* @returns {VFileMessage}
|
|
316
|
+
*
|
|
317
|
+
* @overload
|
|
318
|
+
* @param {string} reason
|
|
319
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
320
|
+
* @param {string | null | undefined} [origin]
|
|
321
|
+
* @returns {VFileMessage}
|
|
322
|
+
*
|
|
323
|
+
* @overload
|
|
324
|
+
* @param {string} reason
|
|
325
|
+
* @param {Point | Position | null | undefined} place
|
|
326
|
+
* @param {string | null | undefined} [origin]
|
|
327
|
+
* @returns {VFileMessage}
|
|
328
|
+
*
|
|
329
|
+
* @overload
|
|
330
|
+
* @param {string} reason
|
|
331
|
+
* @param {string | null | undefined} [origin]
|
|
332
|
+
* @returns {VFileMessage}
|
|
333
|
+
*
|
|
334
|
+
* @overload
|
|
335
|
+
* @param {Error | VFileMessage} cause
|
|
336
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
337
|
+
* @param {string | null | undefined} [origin]
|
|
338
|
+
* @returns {VFileMessage}
|
|
339
|
+
*
|
|
340
|
+
* @overload
|
|
341
|
+
* @param {Error | VFileMessage} cause
|
|
342
|
+
* @param {Point | Position | null | undefined} place
|
|
343
|
+
* @param {string | null | undefined} [origin]
|
|
344
|
+
* @returns {VFileMessage}
|
|
345
|
+
*
|
|
346
|
+
* @overload
|
|
347
|
+
* @param {Error | VFileMessage} cause
|
|
348
|
+
* @param {string | null | undefined} [origin]
|
|
349
|
+
* @returns {VFileMessage}
|
|
350
|
+
*
|
|
351
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
352
|
+
* Reason for message, should use markdown.
|
|
353
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
354
|
+
* Configuration (optional).
|
|
355
|
+
* @param {string | null | undefined} [origin]
|
|
356
|
+
* Place in code where the message originates (example:
|
|
357
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
358
|
+
* @returns {VFileMessage}
|
|
359
|
+
* Message.
|
|
360
|
+
*/
|
|
361
|
+
message(t, e, r) {
|
|
362
|
+
const i = new c(
|
|
363
|
+
// @ts-expect-error: the overloads are fine.
|
|
364
|
+
t,
|
|
365
|
+
e,
|
|
366
|
+
r
|
|
367
|
+
);
|
|
368
|
+
return this.path && (i.name = this.path + ":" + i.name, i.file = this.path), i.fatal = !1, this.messages.push(i), i;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Serialize the file.
|
|
372
|
+
*
|
|
373
|
+
* > **Note**: which encodings are supported depends on the engine.
|
|
374
|
+
* > For info on Node.js, see:
|
|
375
|
+
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
|
|
376
|
+
*
|
|
377
|
+
* @param {string | null | undefined} [encoding='utf8']
|
|
378
|
+
* Character encoding to understand `value` as when it’s a `Uint8Array`
|
|
379
|
+
* (default: `'utf-8'`).
|
|
380
|
+
* @returns {string}
|
|
381
|
+
* Serialized file.
|
|
382
|
+
*/
|
|
383
|
+
toString(t) {
|
|
384
|
+
return this.value === void 0 ? "" : typeof this.value == "string" ? this.value : new TextDecoder(t || void 0).decode(this.value);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function o(s, t) {
|
|
388
|
+
if (s && s.includes(n.sep))
|
|
389
|
+
throw new Error(
|
|
390
|
+
"`" + t + "` cannot be a path: did not expect `" + n.sep + "`"
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
function m(s, t) {
|
|
394
|
+
if (!s)
|
|
395
|
+
throw new Error("`" + t + "` cannot be empty");
|
|
396
|
+
}
|
|
397
|
+
function d(s, t) {
|
|
398
|
+
if (!s)
|
|
399
|
+
throw new Error("Setting `" + t + "` requires `path` to be set too");
|
|
400
|
+
}
|
|
401
|
+
function l(s) {
|
|
402
|
+
return !!(s && typeof s == "object" && "byteLength" in s && "byteOffset" in s);
|
|
403
|
+
}
|
|
404
|
+
export {
|
|
405
|
+
E as VFile
|
|
406
|
+
};
|
|
407
|
+
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../../../../../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.js"],"sourcesContent":["/**\n * @import {Node, Point, Position} from 'unist'\n * @import {Options as MessageOptions} from 'vfile-message'\n * @import {Compatible, Data, Map, Options, Value} from 'vfile'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n */\n\nimport {VFileMessage} from 'vfile-message'\nimport {minpath} from '#minpath'\nimport {minproc} from '#minproc'\nimport {urlToPath, isUrl} from '#minurl'\n\n/**\n * Order of setting (least specific to most), we need this because otherwise\n * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n * stem can be set.\n */\nconst order = /** @type {const} */ ([\n 'history',\n 'path',\n 'basename',\n 'stem',\n 'extname',\n 'dirname'\n])\n\nexport class VFile {\n /**\n * Create a new virtual file.\n *\n * `options` is treated as:\n *\n * * `string` or `Uint8Array` — `{value: options}`\n * * `URL` — `{path: options}`\n * * `VFile` — shallow copies its data over to the new file\n * * `object` — all fields are shallow copied over to the new file\n *\n * Path related fields are set in the following order (least specific to\n * most specific): `history`, `path`, `basename`, `stem`, `extname`,\n * `dirname`.\n *\n * You cannot set `dirname` or `extname` without setting either `history`,\n * `path`, `basename`, or `stem` too.\n *\n * @param {Compatible | null | undefined} [value]\n * File value.\n * @returns\n * New instance.\n */\n constructor(value) {\n /** @type {Options | VFile} */\n let options\n\n if (!value) {\n options = {}\n } else if (isUrl(value)) {\n options = {path: value}\n } else if (typeof value === 'string' || isUint8Array(value)) {\n options = {value}\n } else {\n options = value\n }\n\n /* eslint-disable no-unused-expressions */\n\n /**\n * Base of `path` (default: `process.cwd()` or `'/'` in browsers).\n *\n * @type {string}\n */\n // Prevent calling `cwd` (which could be expensive) if it’s not needed;\n // the empty string will be overridden in the next block.\n this.cwd = 'cwd' in options ? '' : minproc.cwd()\n\n /**\n * Place to store custom info (default: `{}`).\n *\n * It’s OK to store custom data directly on the file but moving it to\n * `data` is recommended.\n *\n * @type {Data}\n */\n this.data = {}\n\n /**\n * List of file paths the file moved between.\n *\n * The first is the original path and the last is the current path.\n *\n * @type {Array<string>}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array<VFileMessage>}\n */\n this.messages = []\n\n /**\n * Raw value.\n *\n * @type {Value}\n */\n this.value\n\n // The below are non-standard, they are “well-known”.\n // As in, used in several tools.\n /**\n * Source map.\n *\n * This type is equivalent to the `RawSourceMap` type from the `source-map`\n * module.\n *\n * @type {Map | null | undefined}\n */\n this.map\n\n /**\n * Custom, non-string, compiled, representation.\n *\n * This is used by unified to store non-string results.\n * One example is when turning markdown into React nodes.\n *\n * @type {unknown}\n */\n this.result\n\n /**\n * Whether a file was saved to disk.\n *\n * This is used by vfile reporters.\n *\n * @type {boolean}\n */\n this.stored\n /* eslint-enable no-unused-expressions */\n\n // Set path related properties in the correct order.\n let index = -1\n\n while (++index < order.length) {\n const field = order[index]\n\n // Note: we specifically use `in` instead of `hasOwnProperty` to accept\n // `vfile`s too.\n if (\n field in options &&\n options[field] !== undefined &&\n options[field] !== null\n ) {\n // @ts-expect-error: TS doesn’t understand basic reality.\n this[field] = field === 'history' ? [...options[field]] : options[field]\n }\n }\n\n /** @type {string} */\n let field\n\n // Set non-path related properties.\n for (field in options) {\n // @ts-expect-error: fine to set other things.\n if (!order.includes(field)) {\n // @ts-expect-error: fine to set other things.\n this[field] = options[field]\n }\n }\n }\n\n /**\n * Get the basename (including extname) (example: `'index.min.js'`).\n *\n * @returns {string | undefined}\n * Basename.\n */\n get basename() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path)\n : undefined\n }\n\n /**\n * Set basename (including extname) (`'index.min.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} basename\n * Basename.\n * @returns {undefined}\n * Nothing.\n */\n set basename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = minpath.join(this.dirname || '', basename)\n }\n\n /**\n * Get the parent path (example: `'~'`).\n *\n * @returns {string | undefined}\n * Dirname.\n */\n get dirname() {\n return typeof this.path === 'string'\n ? minpath.dirname(this.path)\n : undefined\n }\n\n /**\n * Set the parent path (example: `'~'`).\n *\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} dirname\n * Dirname.\n * @returns {undefined}\n * Nothing.\n */\n set dirname(dirname) {\n assertPath(this.basename, 'dirname')\n this.path = minpath.join(dirname || '', this.basename)\n }\n\n /**\n * Get the extname (including dot) (example: `'.js'`).\n *\n * @returns {string | undefined}\n * Extname.\n */\n get extname() {\n return typeof this.path === 'string'\n ? minpath.extname(this.path)\n : undefined\n }\n\n /**\n * Set the extname (including dot) (example: `'.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} extname\n * Extname.\n * @returns {undefined}\n * Nothing.\n */\n set extname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.dirname, 'extname')\n\n if (extname) {\n if (extname.codePointAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.includes('.', 1)) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = minpath.join(this.dirname, this.stem + (extname || ''))\n }\n\n /**\n * Get the full path (example: `'~/index.min.js'`).\n *\n * @returns {string}\n * Path.\n */\n get path() {\n return this.history[this.history.length - 1]\n }\n\n /**\n * Set the full path (example: `'~/index.min.js'`).\n *\n * Cannot be nullified.\n * You can set a file URL (a `URL` object with a `file:` protocol) which will\n * be turned into a path with `url.fileURLToPath`.\n *\n * @param {URL | string} path\n * Path.\n * @returns {undefined}\n * Nothing.\n */\n set path(path) {\n if (isUrl(path)) {\n path = urlToPath(path)\n }\n\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n }\n\n /**\n * Get the stem (basename w/o extname) (example: `'index.min'`).\n *\n * @returns {string | undefined}\n * Stem.\n */\n get stem() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path, this.extname)\n : undefined\n }\n\n /**\n * Set the stem (basename w/o extname) (example: `'index.min'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} stem\n * Stem.\n * @returns {undefined}\n * Nothing.\n */\n set stem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = minpath.join(this.dirname || '', stem + (this.extname || ''))\n }\n\n // Normal prototypal methods.\n /**\n * Create a fatal message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `true` (error; file not usable)\n * and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {never}\n * Never.\n * @throws {VFileMessage}\n * Message.\n */\n fail(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = true\n\n throw message\n }\n\n /**\n * Create an info message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `undefined` (info; change\n * likely not needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n info(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = undefined\n\n return message\n }\n\n /**\n * Create a message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `false` (warning; change may be\n * needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n message(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = new VFileMessage(\n // @ts-expect-error: the overloads are fine.\n causeOrReason,\n optionsOrParentOrPlace,\n origin\n )\n\n if (this.path) {\n message.name = this.path + ':' + message.name\n message.file = this.path\n }\n\n message.fatal = false\n\n this.messages.push(message)\n\n return message\n }\n\n /**\n * Serialize the file.\n *\n * > **Note**: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.\n *\n * @param {string | null | undefined} [encoding='utf8']\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (default: `'utf-8'`).\n * @returns {string}\n * Serialized file.\n */\n toString(encoding) {\n if (this.value === undefined) {\n return ''\n }\n\n if (typeof this.value === 'string') {\n return this.value\n }\n\n const decoder = new TextDecoder(encoding || undefined)\n return decoder.decode(this.value)\n }\n}\n\n/**\n * Assert that `part` is not a path (as in, does not contain `path.sep`).\n *\n * @param {string | null | undefined} part\n * File path part.\n * @param {string} name\n * Part name.\n * @returns {undefined}\n * Nothing.\n */\nfunction assertPart(part, name) {\n if (part && part.includes(minpath.sep)) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + minpath.sep + '`'\n )\n }\n}\n\n/**\n * Assert that `part` is not empty.\n *\n * @param {string | undefined} part\n * Thing.\n * @param {string} name\n * Part name.\n * @returns {asserts part is string}\n * Nothing.\n */\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n/**\n * Assert `path` exists.\n *\n * @param {string | undefined} path\n * Path.\n * @param {string} name\n * Dependency name.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n"],"names":["order","VFile","value","options","isUrl","isUint8Array","minproc","index","field","minpath","basename","assertNonEmpty","assertPart","dirname","assertPath","extname","path","urlToPath","stem","causeOrReason","optionsOrParentOrPlace","origin","message","VFileMessage","encoding","part","name"],"mappings":";;;;;AAoBA,MAAMA;AAAA;AAAA,EAA8B;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA;AAEO,MAAMC,EAAM;AAAA;AAAA;AAAA;AAAA;AAA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,MAAMiB,IAAO,yCAAyCjB,EAAQ,MAAM;AAAA,IAC1E;AAEA;AAYA,SAASE,EAAec,GAAMC,GAAM;AAClC,MAAI,CAACD;AACH,UAAM,IAAI,MAAM,MAAMC,IAAO,mBAAmB;AAEpD;AAYA,SAASZ,EAAWE,GAAMU,GAAM;AAC9B,MAAI,CAACV;AACH,UAAM,IAAI,MAAM,cAAcU,IAAO,iCAAiC;AAE1E;AAUA,SAASrB,EAAaH,GAAO;AAC3B,SAAO,GACLA,KACE,OAAOA,KAAU,YACjB,gBAAgBA,KAChB,gBAAgBA;AAEtB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const w = { basename: c, dirname: u, extname: g, join: h, sep: "/" };
|
|
2
|
+
function c(t, n) {
|
|
3
|
+
if (n !== void 0 && typeof n != "string")
|
|
4
|
+
throw new TypeError('"ext" argument must be a string');
|
|
5
|
+
s(t);
|
|
6
|
+
let e = 0, l = -1, i = t.length, f;
|
|
7
|
+
if (n === void 0 || n.length === 0 || n.length > t.length) {
|
|
8
|
+
for (; i--; )
|
|
9
|
+
if (t.codePointAt(i) === 47) {
|
|
10
|
+
if (f) {
|
|
11
|
+
e = i + 1;
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
} else l < 0 && (f = !0, l = i + 1);
|
|
15
|
+
return l < 0 ? "" : t.slice(e, l);
|
|
16
|
+
}
|
|
17
|
+
if (n === t)
|
|
18
|
+
return "";
|
|
19
|
+
let o = -1, r = n.length - 1;
|
|
20
|
+
for (; i--; )
|
|
21
|
+
if (t.codePointAt(i) === 47) {
|
|
22
|
+
if (f) {
|
|
23
|
+
e = i + 1;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
} else
|
|
27
|
+
o < 0 && (f = !0, o = i + 1), r > -1 && (t.codePointAt(i) === n.codePointAt(r--) ? r < 0 && (l = i) : (r = -1, l = o));
|
|
28
|
+
return e === l ? l = o : l < 0 && (l = t.length), t.slice(e, l);
|
|
29
|
+
}
|
|
30
|
+
function u(t) {
|
|
31
|
+
if (s(t), t.length === 0)
|
|
32
|
+
return ".";
|
|
33
|
+
let n = -1, e = t.length, l;
|
|
34
|
+
for (; --e; )
|
|
35
|
+
if (t.codePointAt(e) === 47) {
|
|
36
|
+
if (l) {
|
|
37
|
+
n = e;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
} else l || (l = !0);
|
|
41
|
+
return n < 0 ? t.codePointAt(0) === 47 ? "/" : "." : n === 1 && t.codePointAt(0) === 47 ? "//" : t.slice(0, n);
|
|
42
|
+
}
|
|
43
|
+
function g(t) {
|
|
44
|
+
s(t);
|
|
45
|
+
let n = t.length, e = -1, l = 0, i = -1, f = 0, o;
|
|
46
|
+
for (; n--; ) {
|
|
47
|
+
const r = t.codePointAt(n);
|
|
48
|
+
if (r === 47) {
|
|
49
|
+
if (o) {
|
|
50
|
+
l = n + 1;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
e < 0 && (o = !0, e = n + 1), r === 46 ? i < 0 ? i = n : f !== 1 && (f = 1) : i > -1 && (f = -1);
|
|
56
|
+
}
|
|
57
|
+
return i < 0 || e < 0 || // We saw a non-dot character immediately before the dot.
|
|
58
|
+
f === 0 || // The (right-most) trimmed path component is exactly `..`.
|
|
59
|
+
f === 1 && i === e - 1 && i === l + 1 ? "" : t.slice(i, e);
|
|
60
|
+
}
|
|
61
|
+
function h(...t) {
|
|
62
|
+
let n = -1, e;
|
|
63
|
+
for (; ++n < t.length; )
|
|
64
|
+
s(t[n]), t[n] && (e = e === void 0 ? t[n] : e + "/" + t[n]);
|
|
65
|
+
return e === void 0 ? "." : P(e);
|
|
66
|
+
}
|
|
67
|
+
function P(t) {
|
|
68
|
+
s(t);
|
|
69
|
+
const n = t.codePointAt(0) === 47;
|
|
70
|
+
let e = A(t, !n);
|
|
71
|
+
return e.length === 0 && !n && (e = "."), e.length > 0 && t.codePointAt(t.length - 1) === 47 && (e += "/"), n ? "/" + e : e;
|
|
72
|
+
}
|
|
73
|
+
function A(t, n) {
|
|
74
|
+
let e = "", l = 0, i = -1, f = 0, o = -1, r, d;
|
|
75
|
+
for (; ++o <= t.length; ) {
|
|
76
|
+
if (o < t.length)
|
|
77
|
+
r = t.codePointAt(o);
|
|
78
|
+
else {
|
|
79
|
+
if (r === 47)
|
|
80
|
+
break;
|
|
81
|
+
r = 47;
|
|
82
|
+
}
|
|
83
|
+
if (r === 47) {
|
|
84
|
+
if (!(i === o - 1 || f === 1)) if (i !== o - 1 && f === 2) {
|
|
85
|
+
if (e.length < 2 || l !== 2 || e.codePointAt(e.length - 1) !== 46 || e.codePointAt(e.length - 2) !== 46) {
|
|
86
|
+
if (e.length > 2) {
|
|
87
|
+
if (d = e.lastIndexOf("/"), d !== e.length - 1) {
|
|
88
|
+
d < 0 ? (e = "", l = 0) : (e = e.slice(0, d), l = e.length - 1 - e.lastIndexOf("/")), i = o, f = 0;
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
} else if (e.length > 0) {
|
|
92
|
+
e = "", l = 0, i = o, f = 0;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
n && (e = e.length > 0 ? e + "/.." : "..", l = 2);
|
|
97
|
+
} else
|
|
98
|
+
e.length > 0 ? e += "/" + t.slice(i + 1, o) : e = t.slice(i + 1, o), l = o - i - 1;
|
|
99
|
+
i = o, f = 0;
|
|
100
|
+
} else r === 46 && f > -1 ? f++ : f = -1;
|
|
101
|
+
}
|
|
102
|
+
return e;
|
|
103
|
+
}
|
|
104
|
+
function s(t) {
|
|
105
|
+
if (typeof t != "string")
|
|
106
|
+
throw new TypeError(
|
|
107
|
+
"Path must be a string. Received " + JSON.stringify(t)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
w as minpath
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=minpath.browser.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minpath.browser.es.js","sources":["../../../../../../../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.js"],"sourcesContent":["// A derivative work based on:\n// <https://github.com/browserify/path-browserify>.\n// Which is licensed:\n//\n// MIT License\n//\n// Copyright (c) 2013 James Halliday\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A derivative work based on:\n//\n// Parts of that are extracted from Node’s internal `path` module:\n// <https://github.com/nodejs/node/blob/master/lib/path.js>.\n// Which is licensed:\n//\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexport const minpath = {basename, dirname, extname, join, sep: '/'}\n\n/* eslint-disable max-depth, complexity */\n\n/**\n * Get the basename from a path.\n *\n * @param {string} path\n * File path.\n * @param {string | null | undefined} [extname]\n * Extension to strip.\n * @returns {string}\n * Stem or basename.\n */\nfunction basename(path, extname) {\n if (extname !== undefined && typeof extname !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n let start = 0\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let seenNonSlash\n\n if (\n extname === undefined ||\n extname.length === 0 ||\n extname.length > path.length\n ) {\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // path component.\n seenNonSlash = true\n end = index + 1\n }\n }\n\n return end < 0 ? '' : path.slice(start, end)\n }\n\n if (extname === path) {\n return ''\n }\n\n let firstNonSlashEnd = -1\n let extnameIndex = extname.length - 1\n\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else {\n if (firstNonSlashEnd < 0) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching.\n seenNonSlash = true\n firstNonSlashEnd = index + 1\n }\n\n if (extnameIndex > -1) {\n // Try to match the explicit extension.\n if (path.codePointAt(index) === extname.codePointAt(extnameIndex--)) {\n if (extnameIndex < 0) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = index\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extnameIndex = -1\n end = firstNonSlashEnd\n }\n }\n }\n }\n\n if (start === end) {\n end = firstNonSlashEnd\n } else if (end < 0) {\n end = path.length\n }\n\n return path.slice(start, end)\n}\n\n/**\n * Get the dirname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\nfunction dirname(path) {\n assertPath(path)\n\n if (path.length === 0) {\n return '.'\n }\n\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n if (unmatchedSlash) {\n end = index\n break\n }\n } else if (!unmatchedSlash) {\n // We saw the first non-path separator\n unmatchedSlash = true\n }\n }\n\n return end < 0\n ? path.codePointAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.codePointAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\n/**\n * Get an extname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * Extname.\n */\nfunction extname(path) {\n assertPath(path)\n\n let index = path.length\n\n let end = -1\n let startPart = 0\n let startDot = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n let preDotState = 0\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n while (index--) {\n const code = path.codePointAt(index)\n\n if (code === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (unmatchedSlash) {\n startPart = index + 1\n break\n }\n\n continue\n }\n\n if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // extension.\n unmatchedSlash = true\n end = index + 1\n }\n\n if (code === 46 /* `.` */) {\n // If this is our first dot, mark it as the start of our extension.\n if (startDot < 0) {\n startDot = index\n } else if (preDotState !== 1) {\n preDotState = 1\n }\n } else if (startDot > -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension.\n preDotState = -1\n }\n }\n\n if (\n startDot < 0 ||\n end < 0 ||\n // We saw a non-dot character immediately before the dot.\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly `..`.\n (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n ) {\n return ''\n }\n\n return path.slice(startDot, end)\n}\n\n/**\n * Join segments from a path.\n *\n * @param {Array<string>} segments\n * Path segments.\n * @returns {string}\n * File path.\n */\nfunction join(...segments) {\n let index = -1\n /** @type {string | undefined} */\n let joined\n\n while (++index < segments.length) {\n assertPath(segments[index])\n\n if (segments[index]) {\n joined =\n joined === undefined ? segments[index] : joined + '/' + segments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n/**\n * Normalize a basic file path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n assertPath(path)\n\n const absolute = path.codePointAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n let value = normalizeString(path, !absolute)\n\n if (value.length === 0 && !absolute) {\n value = '.'\n }\n\n if (value.length > 0 && path.codePointAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n/**\n * Resolve `.` and `..` elements in a path with directory names.\n *\n * @param {string} path\n * File path.\n * @param {boolean} allowAboveRoot\n * Whether `..` can move above root.\n * @returns {string}\n * File path.\n */\nfunction normalizeString(path, allowAboveRoot) {\n let result = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let index = -1\n /** @type {number | undefined} */\n let code\n /** @type {number} */\n let lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.codePointAt(index)\n } else if (code === 47 /* `/` */) {\n break\n } else {\n code = 47 /* `/` */\n }\n\n if (code === 47 /* `/` */) {\n if (lastSlash === index - 1 || dots === 1) {\n // Empty.\n } else if (lastSlash !== index - 1 && dots === 2) {\n if (\n result.length < 2 ||\n lastSegmentLength !== 2 ||\n result.codePointAt(result.length - 1) !== 46 /* `.` */ ||\n result.codePointAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = ''\n lastSegmentLength = 0\n } else {\n result = result.slice(0, lastSlashIndex)\n lastSegmentLength = result.length - 1 - result.lastIndexOf('/')\n }\n\n lastSlash = index\n dots = 0\n continue\n }\n } else if (result.length > 0) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length > 0 ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length > 0) {\n result += '/' + path.slice(lastSlash + 1, index)\n } else {\n result = path.slice(lastSlash + 1, index)\n }\n\n lastSegmentLength = index - lastSlash - 1\n }\n\n lastSlash = index\n dots = 0\n } else if (code === 46 /* `.` */ && dots > -1) {\n dots++\n } else {\n dots = -1\n }\n }\n\n return result\n}\n\n/**\n * Make sure `path` is a string.\n *\n * @param {string} path\n * File path.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError(\n 'Path must be a string. Received ' + JSON.stringify(path)\n )\n }\n}\n\n/* eslint-enable max-depth, complexity */\n"],"names":["minpath","basename","dirname","extname","join","path","assertPath","start","end","index","seenNonSlash","firstNonSlashEnd","extnameIndex","unmatchedSlash","startPart","startDot","preDotState","code","segments","joined","normalize","absolute","value","normalizeString","allowAboveRoot","result","lastSegmentLength","lastSlash","dots","lastSlashIndex"],"mappings":"AAmDY,MAACA,IAAU,EAAC,UAAAC,GAAU,SA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,IAAIA,IAAS,QAAQ,MAC9CC,IAAoB;AAAA,MAE9B;AACQ,QAAID,EAAO,SAAS,IAClBA,KAAU,MAAMpB,EAAK,MAAMsB,IAAY,GAAGlB,CAAK,IAE/CgB,IAASpB,EAAK,MAAMsB,IAAY,GAAGlB,CAAK,GAG1CiB,IAAoBjB,IAAQkB,IAAY;AAG1C,MAAAA,IAAYlB,GACZmB,IAAO;AAAA,IACR,MAAM,CAAIX,MAAS,MAAgBW,IAAO,KACzCA,MAEAA,IAAO;AAAA,EAEb;AAEE,SAAOH;AACT;AAUA,SAASnB,EAAWD,GAAM;AACxB,MAAI,OAAOA,KAAS;AAClB,UAAM,IAAI;AAAA,MACR,qCAAqC,KAAK,UAAUA,CAAI;AAAA,IAC9D;AAEA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minproc.browser.es.js","sources":["../../../../../../../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.js"],"sourcesContent":["// Somewhat based on:\n// <https://github.com/defunctzombie/node-process/blob/master/browser.js>.\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexport const minproc = {cwd}\n\nfunction cwd() {\n return '/'\n}\n"],"names":["minproc","cwd"],"mappings":"AAGY,MAACA,IAAU,EAAC,KAAAC,EAAG;AAE3B,SAASA,IAAM;AACb,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { isUrl as i } from "./minurl.shared.es.js";
|
|
2
|
+
function R(o) {
|
|
3
|
+
if (typeof o == "string")
|
|
4
|
+
o = new URL(o);
|
|
5
|
+
else if (!i(o)) {
|
|
6
|
+
const e = new TypeError(
|
|
7
|
+
'The "path" argument must be of type string or an instance of URL. Received `' + o + "`"
|
|
8
|
+
);
|
|
9
|
+
throw e.code = "ERR_INVALID_ARG_TYPE", e;
|
|
10
|
+
}
|
|
11
|
+
if (o.protocol !== "file:") {
|
|
12
|
+
const e = new TypeError("The URL must be of scheme file");
|
|
13
|
+
throw e.code = "ERR_INVALID_URL_SCHEME", e;
|
|
14
|
+
}
|
|
15
|
+
return c(o);
|
|
16
|
+
}
|
|
17
|
+
function c(o) {
|
|
18
|
+
if (o.hostname !== "") {
|
|
19
|
+
const r = new TypeError(
|
|
20
|
+
'File URL host must be "localhost" or empty on darwin'
|
|
21
|
+
);
|
|
22
|
+
throw r.code = "ERR_INVALID_FILE_URL_HOST", r;
|
|
23
|
+
}
|
|
24
|
+
const e = o.pathname;
|
|
25
|
+
let t = -1;
|
|
26
|
+
for (; ++t < e.length; )
|
|
27
|
+
if (e.codePointAt(t) === 37 && e.codePointAt(t + 1) === 50) {
|
|
28
|
+
const r = e.codePointAt(t + 2);
|
|
29
|
+
if (r === 70 || r === 102) {
|
|
30
|
+
const n = new TypeError(
|
|
31
|
+
"File URL path must not include encoded / characters"
|
|
32
|
+
);
|
|
33
|
+
throw n.code = "ERR_INVALID_FILE_URL_PATH", n;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return decodeURIComponent(e);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
i as isUrl,
|
|
40
|
+
R as urlToPath
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=minurl.browser.es.js.map
|