@alivault/pico 0.14.0 → 0.16.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/.output/public/_shell.html +19 -0
- package/.output/public/assets/PatchDiff-SN-mXa3p.js +343 -0
- package/.output/public/assets/{angular-html-BZNntD0J.js → angular-html-B9LEBPKs.js} +1 -1
- package/.output/public/assets/{angular-ts-SQQMYL2C.js → angular-ts-CD6u-Ij9.js} +1 -1
- package/.output/public/assets/{apl-D5V6uPDr.js → apl-VeDHIFIx.js} +1 -1
- package/.output/public/assets/app-shell-common-0xa28gDm.js +1 -0
- package/.output/public/assets/{astro-DeXKSaFP.js → astro-Dd8L1z6M.js} +1 -1
- package/.output/public/assets/{blade-Bu5re0Vg.js → blade-BNxrbiva.js} +1 -1
- package/.output/public/assets/{bsl-B1qbqNES.js → bsl-B0twaj2j.js} +1 -1
- package/.output/public/assets/{cairo-BDj8wWhy.js → cairo-DASKFAWI.js} +1 -1
- package/.output/public/assets/{cobol-nvZDS9LT.js → cobol-D_qN8j4K.js} +1 -1
- package/.output/public/assets/{coffee-BKLOTq4e.js → coffee-60nIQewd.js} +1 -1
- package/.output/public/assets/{cpp-D6g1DVNt.js → cpp-e1j1tDCV.js} +1 -1
- package/.output/public/assets/{crystal-DfoZI57w.js → crystal-brDfRjQ_.js} +1 -1
- package/.output/public/assets/{edge-DwocGnOF.js → edge-DadfRK3Q.js} +1 -1
- package/.output/public/assets/{elixir-Dtbfds1r.js → elixir-CsoHPmz3.js} +1 -1
- package/.output/public/assets/{elm-CpPtm471.js → elm-BLTa0sZG.js} +1 -1
- package/.output/public/assets/{erb--z3IM9Cb.js → erb-DIR2QRkp.js} +1 -1
- package/.output/public/assets/{erlang-Bc4hQuqa.js → erlang-DnbJbitJ.js} +1 -1
- package/.output/public/assets/{fortran-fixed-form-B02FOYI-.js → fortran-fixed-form-Bse4XUyD.js} +1 -1
- package/.output/public/assets/{fsharp-DhdR18vN.js → fsharp-Dy8OnZ0O.js} +1 -1
- package/.output/public/assets/{gdresource-DgnrMPIx.js → gdresource-BD_7yRHA.js} +1 -1
- package/.output/public/assets/{git-commit-DGJi7qBD.js → git-commit-CIMjlyHf.js} +1 -1
- package/.output/public/assets/{git-rebase-Ce47xoa6.js → git-rebase-DV2DyQK7.js} +1 -1
- package/.output/public/assets/{glimmer-js-C0BuzxQC.js → glimmer-js-DVG5pFvd.js} +1 -1
- package/.output/public/assets/{glimmer-ts-irOZ-cAQ.js → glimmer-ts-BeWaLARz.js} +1 -1
- package/.output/public/assets/{glsl-JAhLUe0P.js → glsl-BrOWUUEh.js} +1 -1
- package/.output/public/assets/{graphql-D2ba3BkR.js → graphql-B_3o81z5.js} +1 -1
- package/.output/public/assets/{hack-CgzUpY8l.js → hack-BW-0PxQy.js} +1 -1
- package/.output/public/assets/{haml-C-oIZcDo.js → haml-DnNXiHAO.js} +1 -1
- package/.output/public/assets/{handlebars-CbP-Mhzf.js → handlebars-CftcPtku.js} +1 -1
- package/.output/public/assets/{html-ddqpqPg0.js → html-D5IqfVuz.js} +1 -1
- package/.output/public/assets/{html-derivative-DWGxf_At.js → html-derivative-QNqmMkaY.js} +1 -1
- package/.output/public/assets/{http-Bg1nG1nG.js → http-Dd7eRKUa.js} +1 -1
- package/.output/public/assets/{hurl-zm47Pi1n.js → hurl-kBs5Ibg1.js} +1 -1
- package/.output/public/assets/{hxml-adC65L_J.js → hxml-CGx66ebi.js} +1 -1
- package/.output/public/assets/index-C-mxWGZ5.css +2 -0
- package/.output/public/assets/index-FOqZaR4L.js +48 -0
- package/.output/public/assets/{jinja-Bnj4awH5.js → jinja-BPoCSjyd.js} +1 -1
- package/.output/public/assets/{jison-CuCNs9Q3.js → jison-WHPVy3Jl.js} +1 -1
- package/.output/public/assets/{julia-DNYHzXlE.js → julia-BaKiQMPf.js} +1 -1
- package/.output/public/assets/{just-BlWkkmf2.js → just-BKMc7tVT.js} +1 -1
- package/.output/public/assets/{latex-DqPzjMIt.js → latex-Cczzu1HI.js} +1 -1
- package/.output/public/assets/{liquid-BURJK16h.js → liquid-DrJZrMEf.js} +1 -1
- package/.output/public/assets/{lua-31hdJClp.js → lua-CFIwCMnP.js} +1 -1
- package/.output/public/assets/{marko-C2ZcdSLh.js → marko-BreagErn.js} +1 -1
- package/.output/public/assets/{mdc-N1ii9pk5.js → mdc-CBcMHZUq.js} +1 -1
- package/.output/public/assets/{nextflow-JEyYUlIq.js → nextflow-CZbrTmS2.js} +1 -1
- package/.output/public/assets/{nginx-BuomO0W8.js → nginx-CMOi8dTH.js} +1 -1
- package/.output/public/assets/{nim-hKoEPsYL.js → nim-DbDZ9Wa-.js} +1 -1
- package/.output/public/assets/{perl-CAGVW6Ra.js → perl-DyRCGnKu.js} +1 -1
- package/.output/public/assets/{php-BycclmzS.js → php-Ciarv7b4.js} +1 -1
- package/.output/public/assets/plus-B1rJPgNv.js +1 -0
- package/.output/public/assets/preload-helper-Csz9R64u.js +5 -0
- package/.output/public/assets/{pug-4maJHz9G.js → pug-CVCqbfEm.js} +1 -1
- package/.output/public/assets/{qml-JLIQfzyb.js → qml-DechmdFA.js} +1 -1
- package/.output/public/assets/query-keys-C9jMaRnO.js +1 -0
- package/.output/public/assets/{razor-P8rbooCh.js → razor-bgzHke67.js} +1 -1
- package/.output/public/assets/right-sidebar-CWvXcZzC.js +1831 -0
- package/.output/public/assets/routes-CXlaorp4.js +23 -0
- package/.output/public/assets/{rst-C6GHyL-N.js → rst-Ce6_XwFd.js} +1 -1
- package/.output/public/assets/{ruby-Cl8PVkbY.js → ruby-BtLKlt8E.js} +1 -1
- package/.output/public/assets/{sas-CXoVwlZN.js → sas-Bco5tnse.js} +1 -1
- package/.output/public/assets/{scss-DNczJ95n.js → scss-KPCA05M8.js} +1 -1
- package/.output/public/assets/{shaderlab-DZ3Lsiak.js → shaderlab-uUHiM5Mm.js} +1 -1
- package/.output/public/assets/{shellsession-COm1V40U.js → shellsession-BnUZVYXU.js} +1 -1
- package/.output/public/assets/{soy-DwewhJ_3.js → soy-Dsrg4bVI.js} +1 -1
- package/.output/public/assets/{sparql-B9c85a_o.js → sparql-D5zsvcbT.js} +1 -1
- package/.output/public/assets/{stata-Bl--TAbZ.js → stata-BdK5CFUf.js} +1 -1
- package/.output/public/assets/{surrealql-BW79EE-U.js → surrealql-Blm5wp47.js} +1 -1
- package/.output/public/assets/{svelte-ziMErdPi.js → svelte-DZrj_gMz.js} +1 -1
- package/.output/public/assets/{templ-C_9I6ncv.js → templ-CJ7sDrtu.js} +1 -1
- package/.output/public/assets/terminal-panel-YGR6v-ZH.js +1 -0
- package/.output/public/assets/{tex-D8LVuLf5.js → tex-CvSRdXZA.js} +1 -1
- package/.output/public/assets/{ts-tags-DKuFCGsc.js → ts-tags-DgGFCSef.js} +1 -1
- package/.output/public/assets/{twig-Bs1kcsO6.js → twig-D8_PS89g.js} +1 -1
- package/.output/public/assets/{vue-Dnf0y5RU.js → vue-KvGEuYod.js} +1 -1
- package/.output/public/assets/{vue-html-CRtKS76J.js → vue-html-qAt9D-IF.js} +1 -1
- package/.output/public/assets/{vue-vine-BxjPqU7T.js → vue-vine-j1nOqxMu.js} +1 -1
- package/.output/public/assets/{xml-eU7M3iZJ.js → xml-BrFkMwfd.js} +1 -1
- package/.output/public/assets/{xsl-DSqe4nTO.js → xsl-OmCo2PyZ.js} +1 -1
- package/.output/public/index.html +19 -0
- package/README.md +171 -46
- package/bin/native-runtime.mjs +265 -0
- package/bin/pico.mjs +289 -222
- package/package.json +34 -31
- package/.output/nitro.json +0 -17
- package/.output/public/assets/index-DBVxXDtw.js +0 -54
- package/.output/public/assets/routes-yUxD2q-l.js +0 -2194
- package/.output/public/assets/styles-CUVz7jV9.css +0 -2
- package/.output/server/__23tanstack-start-plugin-adapters-y_fshQDY.mjs +0 -5
- package/.output/server/_chunks/ssr-renderer.mjs +0 -15
- package/.output/server/_libs/@base-ui/react+[...].mjs +0 -14512
- package/.output/server/_libs/@dnd-kit/core+[...].mjs +0 -2748
- package/.output/server/_libs/@pierre/diffs+[...].mjs +0 -19314
- package/.output/server/_libs/@pierre/trees+[...].mjs +0 -9236
- package/.output/server/_libs/@radix-ui/react-dialog+[...].mjs +0 -1789
- package/.output/server/_libs/@radix-ui/react-primitive+[...].mjs +0 -136
- package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
- package/.output/server/_libs/@tanstack/hotkeys+[...].mjs +0 -1607
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +0 -13950
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +0 -90
- package/.output/server/_libs/bail.mjs +0 -13
- package/.output/server/_libs/character-entities.mjs +0 -2135
- package/.output/server/_libs/class-variance-authority+clsx.mjs +0 -69
- package/.output/server/_libs/cmdk.mjs +0 -473
- package/.output/server/_libs/crossws.mjs +0 -2929
- package/.output/server/_libs/decode-named-character-reference+[...].mjs +0 -19
- package/.output/server/_libs/devlop.mjs +0 -5
- package/.output/server/_libs/diff.mjs +0 -732
- package/.output/server/_libs/dnd-kit__accessibility.mjs +0 -46
- package/.output/server/_libs/dnd-kit__sortable.mjs +0 -400
- package/.output/server/_libs/entities.mjs +0 -372
- package/.output/server/_libs/escape-string-regexp.mjs +0 -7
- package/.output/server/_libs/estree-util-is-identifier-name.mjs +0 -20
- package/.output/server/_libs/extend.mjs +0 -75
- package/.output/server/_libs/h3+rou3+srvx.mjs +0 -1216
- package/.output/server/_libs/hast-util-from-parse5+[...].mjs +0 -741
- package/.output/server/_libs/hast-util-raw+[...].mjs +0 -7897
- package/.output/server/_libs/hast-util-sanitize.mjs +0 -780
- package/.output/server/_libs/hast-util-to-jsx-runtime+[...].mjs +0 -1165
- package/.output/server/_libs/hookable.mjs +0 -41
- package/.output/server/_libs/html-url-attributes.mjs +0 -44
- package/.output/server/_libs/is-plain-obj.mjs +0 -8
- package/.output/server/_libs/longest-streak.mjs +0 -29
- package/.output/server/_libs/lucide-react.mjs +0 -788
- package/.output/server/_libs/markdown-table.mjs +0 -289
- package/.output/server/_libs/mdast-util-find-and-replace.mjs +0 -198
- package/.output/server/_libs/mdast-util-from-markdown+[...].mjs +0 -8409
- package/.output/server/_libs/mdast-util-gfm+[...].mjs +0 -2062
- package/.output/server/_libs/mdast-util-to-hast+[...].mjs +0 -1771
- package/.output/server/_libs/micromark-extension-gfm+[...].mjs +0 -2234
- package/.output/server/_libs/next-themes.mjs +0 -124
- package/.output/server/_libs/pierre__theme.mjs +0 -10
- package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
- package/.output/server/_libs/radix-ui__react-compose-refs.mjs +0 -30
- package/.output/server/_libs/radix-ui__react-context.mjs +0 -88
- package/.output/server/_libs/react-markdown+[...].mjs +0 -2316
- package/.output/server/_libs/rehype-raw.mjs +0 -37
- package/.output/server/_libs/rehype-sanitize.mjs +0 -27
- package/.output/server/_libs/remark-gfm.mjs +0 -34
- package/.output/server/_libs/shiki.mjs +0 -16
- package/.output/server/_libs/shikijs__langs.mjs +0 -1355
- package/.output/server/_libs/shikijs__themes.mjs +0 -262
- package/.output/server/_libs/sonner.mjs +0 -908
- package/.output/server/_libs/tailwind-merge.mjs +0 -1962
- package/.output/server/_libs/tanstack__history.mjs +0 -342
- package/.output/server/_libs/tanstack__pacer.mjs +0 -1111
- package/.output/server/_libs/tanstack__query-core.mjs +0 -2202
- package/.output/server/_libs/tanstack__react-hotkeys.mjs +0 -152
- package/.output/server/_libs/tanstack__react-query.mjs +0 -180
- package/.output/server/_libs/tanstack__react-store.mjs +0 -39
- package/.output/server/_libs/tanstack__router-core.mjs +0 -6
- package/.output/server/_libs/tanstack__store.mjs +0 -28
- package/.output/server/_libs/ufo.mjs +0 -64
- package/.output/server/_libs/unctx.mjs +0 -82
- package/.output/server/_libs/ungap__structured-clone.mjs +0 -197
- package/.output/server/_libs/vaul.mjs +0 -1250
- package/.output/server/_libs/xterm__addon-fit.mjs +0 -44
- package/.output/server/_libs/xterm__xterm.mjs +0 -10234
- package/.output/server/_libs/zod.mjs +0 -3341
- package/.output/server/_routes/api/terminal/[id]/ws.mjs +0 -8874
- package/.output/server/_runtime.mjs +0 -35
- package/.output/server/_ssr/router-CN4JMm2A.mjs +0 -9733
- package/.output/server/_ssr/routes-BsQ26pbY.mjs +0 -29306
- package/.output/server/_ssr/routes-DbjuMLFI.mjs +0 -3400
- package/.output/server/_ssr/ssr.mjs +0 -5176
- package/.output/server/_ssr/start-jIczsXlR.mjs +0 -4
- package/.output/server/_tanstack-start-manifest_v-Bs4g_j1_.mjs +0 -77
- package/.output/server/index.mjs +0 -2670
- package/.output/server/node_modules/node-pty/LICENSE +0 -69
- package/.output/server/node_modules/node-pty/README.md +0 -165
- package/.output/server/node_modules/node-pty/binding.gyp +0 -111
- package/.output/server/node_modules/node-pty/build/Makefile +0 -369
- package/.output/server/node_modules/node-pty/build/Release/pty.node +0 -0
- package/.output/server/node_modules/node-pty/build/binding.Makefile +0 -6
- package/.output/server/node_modules/node-pty/build/pty.target.mk +0 -168
- package/.output/server/node_modules/node-pty/deps/.editorconfig +0 -2
- package/.output/server/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
- package/.output/server/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
- package/.output/server/node_modules/node-pty/deps/winpty/LICENSE +0 -21
- package/.output/server/node_modules/node-pty/deps/winpty/Makefile +0 -166
- package/.output/server/node_modules/node-pty/deps/winpty/README.md +0 -151
- package/.output/server/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
- package/.output/server/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
- package/.output/server/node_modules/node-pty/deps/winpty/configure +0 -167
- package/.output/server/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
- package/.output/server/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
- package/.output/server/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
- package/.output/server/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
- package/.output/server/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
- package/.output/server/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
- package/.output/server/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
- package/.output/server/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
- package/.output/server/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
- package/.output/server/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
- package/.output/server/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
- package/.output/server/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
- package/.output/server/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
- package/.output/server/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
- package/.output/server/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
- package/.output/server/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
- package/.output/server/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
- package/.output/server/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
- package/.output/server/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -613
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
- package/.output/server/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
- package/.output/server/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
- package/.output/server/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
- package/.output/server/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
- package/.output/server/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
- package/.output/server/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -234
- package/.output/server/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
- package/.output/server/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -16
- package/.output/server/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.js +0 -47
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/index.js +0 -52
- package/.output/server/node_modules/node-pty/lib/index.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/interfaces.js +0 -7
- package/.output/server/node_modules/node-pty/lib/interfaces.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/shared/conout.js +0 -11
- package/.output/server/node_modules/node-pty/lib/shared/conout.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/terminal.js +0 -190
- package/.output/server/node_modules/node-pty/lib/terminal.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/terminal.test.js +0 -139
- package/.output/server/node_modules/node-pty/lib/terminal.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/testUtils.test.js +0 -28
- package/.output/server/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/types.js +0 -7
- package/.output/server/node_modules/node-pty/lib/types.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/unixTerminal.js +0 -346
- package/.output/server/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
- package/.output/server/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/utils.js +0 -39
- package/.output/server/node_modules/node-pty/lib/utils.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsConoutConnection.js +0 -125
- package/.output/server/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.js +0 -320
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.js +0 -199
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
- package/.output/server/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
- package/.output/server/node_modules/node-pty/package.json +0 -64
- package/.output/server/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
- package/.output/server/node_modules/node-pty/scripts/increment-version.js +0 -54
- package/.output/server/node_modules/node-pty/scripts/post-install.js +0 -80
- package/.output/server/node_modules/node-pty/scripts/prebuild.js +0 -34
- package/.output/server/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -15
- package/.output/server/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
- package/.output/server/node_modules/node-pty/src/eventEmitter2.ts +0 -48
- package/.output/server/node_modules/node-pty/src/index.ts +0 -52
- package/.output/server/node_modules/node-pty/src/interfaces.ts +0 -130
- package/.output/server/node_modules/node-pty/src/native.d.ts +0 -54
- package/.output/server/node_modules/node-pty/src/shared/conout.ts +0 -15
- package/.output/server/node_modules/node-pty/src/terminal.test.ts +0 -119
- package/.output/server/node_modules/node-pty/src/terminal.ts +0 -211
- package/.output/server/node_modules/node-pty/src/testUtils.test.ts +0 -23
- package/.output/server/node_modules/node-pty/src/tsconfig.json +0 -22
- package/.output/server/node_modules/node-pty/src/types.ts +0 -15
- package/.output/server/node_modules/node-pty/src/unix/pty.cc +0 -799
- package/.output/server/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
- package/.output/server/node_modules/node-pty/src/unixTerminal.test.ts +0 -367
- package/.output/server/node_modules/node-pty/src/unixTerminal.ts +0 -388
- package/.output/server/node_modules/node-pty/src/utils.ts +0 -29
- package/.output/server/node_modules/node-pty/src/win/conpty.cc +0 -583
- package/.output/server/node_modules/node-pty/src/win/conpty.h +0 -41
- package/.output/server/node_modules/node-pty/src/win/conpty_console_list.cc +0 -44
- package/.output/server/node_modules/node-pty/src/win/path_util.cc +0 -95
- package/.output/server/node_modules/node-pty/src/win/path_util.h +0 -26
- package/.output/server/node_modules/node-pty/src/win/winpty.cc +0 -333
- package/.output/server/node_modules/node-pty/src/windowsConoutConnection.ts +0 -82
- package/.output/server/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
- package/.output/server/node_modules/node-pty/src/windowsPtyAgent.ts +0 -321
- package/.output/server/node_modules/node-pty/src/windowsTerminal.test.ts +0 -229
- package/.output/server/node_modules/node-pty/src/windowsTerminal.ts +0 -203
- package/.output/server/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/typings/node-pty.d.ts +0 -211
- package/.output/server/node_modules/tslib/modules/index.js +0 -70
- package/.output/server/node_modules/tslib/modules/package.json +0 -3
- package/.output/server/node_modules/tslib/package.json +0 -47
- package/.output/server/node_modules/tslib/tslib.js +0 -484
- package/.output/server/package.json +0 -10
- package/scripts/release.mjs +0 -173
- package/vendor/node-domexception/index.js +0 -3
- package/vendor/node-domexception/package.json +0 -10
- /package/.output/public/assets/{abap-smLpETzL.js → abap-CglpPUUh.js} +0 -0
- /package/.output/public/assets/{actionscript-3-o-aRvjY5.js → actionscript-3-CGv72Q9E.js} +0 -0
- /package/.output/public/assets/{ada-D5RRX1i4.js → ada-CfxXaXwr.js} +0 -0
- /package/.output/public/assets/{addon-fit-CMMXLNsg.js → addon-fit-C9RD8ot3.js} +0 -0
- /package/.output/public/assets/{andromeeda-N4z3YzmR.js → andromeeda-DXsn6mTE.js} +0 -0
- /package/.output/public/assets/{apache-DttKlSqg.js → apache-D5xAQKSB.js} +0 -0
- /package/.output/public/assets/{apex-DL7j-a2n.js → apex-qgfedJV2.js} +0 -0
- /package/.output/public/assets/{applescript-DCbL_2FX.js → applescript-DqumQxTt.js} +0 -0
- /package/.output/public/assets/{ara-DqheWJCe.js → ara-Ditv3ow6.js} +0 -0
- /package/.output/public/assets/{asciidoc-BH2sf2K4.js → asciidoc-DL8QwiT7.js} +0 -0
- /package/.output/public/assets/{asm-rfjOMz3U.js → asm-K6TMxl3o.js} +0 -0
- /package/.output/public/assets/{aurora-x-CND-FqEb.js → aurora-x-DGv-xZaa.js} +0 -0
- /package/.output/public/assets/{awk-CMV5n9Z7.js → awk-CYSfQSDT.js} +0 -0
- /package/.output/public/assets/{ayu-dark-on7xzq_B.js → ayu-dark-DGBaJbpH.js} +0 -0
- /package/.output/public/assets/{ayu-light-DnGeGGc2.js → ayu-light-BQrGPVs2.js} +0 -0
- /package/.output/public/assets/{ayu-mirage-DG3LlYC_.js → ayu-mirage-Do-5o2VL.js} +0 -0
- /package/.output/public/assets/{ballerina-BjMqJjlr.js → ballerina-BE-8n54s.js} +0 -0
- /package/.output/public/assets/{bat-BaVbo_qw.js → bat-B1zTc1QZ.js} +0 -0
- /package/.output/public/assets/{beancount-DBt5Mbc_.js → beancount-DhObrvif.js} +0 -0
- /package/.output/public/assets/{berry-Cyjuxiss.js → berry-Cnbvthv1.js} +0 -0
- /package/.output/public/assets/{bibtex-BV_0nsPq.js → bibtex-pp5SrwZy.js} +0 -0
- /package/.output/public/assets/{bicep-C2gEwu4J.js → bicep-BL6eYxbs.js} +0 -0
- /package/.output/public/assets/{bird2-BRyaEJd0.js → bird2-BQaXYY9n.js} +0 -0
- /package/.output/public/assets/{c-Nc9zJT78.js → c-BHFJ4Jk3.js} +0 -0
- /package/.output/public/assets/{c3-DTTbp5N2.js → c3-BHTco5Hb.js} +0 -0
- /package/.output/public/assets/{cadence-CPz83cmI.js → cadence-CoPxW0qb.js} +0 -0
- /package/.output/public/assets/{catppuccin-frappe-Dr22sraq.js → catppuccin-frappe-9fYwMJCf.js} +0 -0
- /package/.output/public/assets/{catppuccin-latte-C57EeX8c.js → catppuccin-latte-BUiKH1yZ.js} +0 -0
- /package/.output/public/assets/{catppuccin-macchiato-CpheI4uD.js → catppuccin-macchiato-ZmO2e0M_.js} +0 -0
- /package/.output/public/assets/{catppuccin-mocha-D8Lmdks_.js → catppuccin-mocha-CFwbXQfO.js} +0 -0
- /package/.output/public/assets/{clarity-CFJ2Yc3q.js → clarity-DVUGm1xP.js} +0 -0
- /package/.output/public/assets/{clojure-6R01QgJC.js → clojure-BgXJG6FG.js} +0 -0
- /package/.output/public/assets/{cmake-D5rSbMir.js → cmake-CZndsvm6.js} +0 -0
- /package/.output/public/assets/{codeowners-_3A-ClkN.js → codeowners-Dd7a447M.js} +0 -0
- /package/.output/public/assets/{codeql-DlIhJTR7.js → codeql-XJR6llG-.js} +0 -0
- /package/.output/public/assets/{common-lisp-BvQzz173.js → common-lisp-BOMbLvgT.js} +0 -0
- /package/.output/public/assets/{coq-DTNXReIC.js → coq-DnhmQYDa.js} +0 -0
- /package/.output/public/assets/{csharp-BDKQY1K9.js → csharp-BdEyRqBm.js} +0 -0
- /package/.output/public/assets/{css-DRmnABqB.js → css-CsTDDTLq.js} +0 -0
- /package/.output/public/assets/{csv-DNUpVBxl.js → csv-CXchYFbz.js} +0 -0
- /package/.output/public/assets/{cue-DDdBc2s3.js → cue-D7YpBZvd.js} +0 -0
- /package/.output/public/assets/{cypher-CguaznO2.js → cypher-XIm1N8YJ.js} +0 -0
- /package/.output/public/assets/{d-CHcoyjv3.js → d-DvB0pbZH.js} +0 -0
- /package/.output/public/assets/{dark-plus-CqeW_0kH.js → dark-plus-BUdpMFIA.js} +0 -0
- /package/.output/public/assets/{dart-RM3aRphk.js → dart-CwpSKTMB.js} +0 -0
- /package/.output/public/assets/{dax-nbnY1d79.js → dax-CEynWJsU.js} +0 -0
- /package/.output/public/assets/{desktop-BD76cvxT.js → desktop-Dk-YiYS_.js} +0 -0
- /package/.output/public/assets/{diff-CdkWtnkL.js → diff-abLZ-xM1.js} +0 -0
- /package/.output/public/assets/{docker-ZyPHc6zB.js → docker-BT48KsRJ.js} +0 -0
- /package/.output/public/assets/{dotenv-BdJZEwA6.js → dotenv-NOMQQbM0.js} +0 -0
- /package/.output/public/assets/{dracula-CtqCPLGa.js → dracula-BUW0ZyNO.js} +0 -0
- /package/.output/public/assets/{dracula-soft-DmBpwRAy.js → dracula-soft-BMjAt1_u.js} +0 -0
- /package/.output/public/assets/{dream-maker-BJL4qlg3.js → dream-maker-D26TP1Q3.js} +0 -0
- /package/.output/public/assets/{emacs-lisp-_LyYa2Ky.js → emacs-lisp-C2EvfotR.js} +0 -0
- /package/.output/public/assets/{everforest-dark-CrbyKk4n.js → everforest-dark-hC6a272f.js} +0 -0
- /package/.output/public/assets/{everforest-light-DRbSh8Tm.js → everforest-light-BTpbYY5G.js} +0 -0
- /package/.output/public/assets/{fennel-CC2BkRsS.js → fennel-DWOL-Ewx.js} +0 -0
- /package/.output/public/assets/{fish-D2ZCzqcE.js → fish-CQPQq0pQ.js} +0 -0
- /package/.output/public/assets/{fluent-DKAm3m7q.js → fluent-BYdsr2M8.js} +0 -0
- /package/.output/public/assets/{fortran-free-form-BPTf0lbT.js → fortran-free-form-C_EtY4F9.js} +0 -0
- /package/.output/public/assets/{gdscript-CsadCSaZ.js → gdscript-CH_tD-VB.js} +0 -0
- /package/.output/public/assets/{gdshader-PfnN_8tR.js → gdshader-BemFblFP.js} +0 -0
- /package/.output/public/assets/{genie-Bj-orPAV.js → genie-hCPg_eq7.js} +0 -0
- /package/.output/public/assets/{gherkin-COVWpJ-Q.js → gherkin-CO0ypD1P.js} +0 -0
- /package/.output/public/assets/{github-dark-ipGuFGYC.js → github-dark-cA72fqmI.js} +0 -0
- /package/.output/public/assets/{github-dark-default-DX3IG_X0.js → github-dark-default-DiYTFvY5.js} +0 -0
- /package/.output/public/assets/{github-dark-dimmed-CH6p_7ez.js → github-dark-dimmed-D-uBHzyG.js} +0 -0
- /package/.output/public/assets/{github-dark-high-contrast-Bg2sSao5.js → github-dark-high-contrast-BrUSkckI.js} +0 -0
- /package/.output/public/assets/{github-light-default-DwpDd1IQ.js → github-light-default-BT-6Vf7C.js} +0 -0
- /package/.output/public/assets/{github-light-high-contrast-C0QeixPf.js → github-light-high-contrast-DqmEyTTc.js} +0 -0
- /package/.output/public/assets/{github-light-BxjqOQl0.js → github-light-piFPqU8R.js} +0 -0
- /package/.output/public/assets/{gleam-BF2NigGj.js → gleam-CWJA_H5i.js} +0 -0
- /package/.output/public/assets/{gn-CMIt9roj.js → gn-nlTwLSjP.js} +0 -0
- /package/.output/public/assets/{gnuplot-DgWlRTEj.js → gnuplot-wYV0MbPl.js} +0 -0
- /package/.output/public/assets/{go-DLnOLj8q.js → go-BUPBDRDo.js} +0 -0
- /package/.output/public/assets/{groovy-B9qLWIkE.js → groovy-BusafOA8.js} +0 -0
- /package/.output/public/assets/{gruvbox-dark-hard-BIMX9ePb.js → gruvbox-dark-hard-BrrZYoPF.js} +0 -0
- /package/.output/public/assets/{gruvbox-dark-medium-DxuwyVzM.js → gruvbox-dark-medium-DsxcLuUs.js} +0 -0
- /package/.output/public/assets/{gruvbox-dark-soft-ba2fjht0.js → gruvbox-dark-soft-DQXOs_GH.js} +0 -0
- /package/.output/public/assets/{gruvbox-light-hard-DAJK2PqC.js → gruvbox-light-hard-CtHwj_cB.js} +0 -0
- /package/.output/public/assets/{gruvbox-light-medium-WRifDAJD.js → gruvbox-light-medium-CPJMdgXQ.js} +0 -0
- /package/.output/public/assets/{gruvbox-light-soft-B0dBOoVB.js → gruvbox-light-soft-C4Xh9Hc-.js} +0 -0
- /package/.output/public/assets/{haskell-BaGpmm_c.js → haskell-CaDqJkn4.js} +0 -0
- /package/.output/public/assets/{haxe-DfXTCEOz.js → haxe-Dxg-8_J7.js} +0 -0
- /package/.output/public/assets/{hcl-CbCtpSbi.js → hcl-Bjg-rMJ0.js} +0 -0
- /package/.output/public/assets/{hjson-_4-w-pHU.js → hjson-BMbeOOMg.js} +0 -0
- /package/.output/public/assets/{hlsl-DpuYn7pp.js → hlsl-D-cuwCFV.js} +0 -0
- /package/.output/public/assets/{horizon-C5RtD1fY.js → horizon-BofYY9of.js} +0 -0
- /package/.output/public/assets/{horizon-bright-pEOice34.js → horizon-bright-CFOVQsf2.js} +0 -0
- /package/.output/public/assets/{houston-A0zg9vNP.js → houston-BIBYxFpQ.js} +0 -0
- /package/.output/public/assets/{hy-t9zDXBje.js → hy-Cye3Jt7O.js} +0 -0
- /package/.output/public/assets/{imba-Bxu-TDfw.js → imba-CjkQtgD2.js} +0 -0
- /package/.output/public/assets/{ini-D-v34c8N.js → ini-BvMtfDNl.js} +0 -0
- /package/.output/public/assets/{java-DVLnIrqC.js → java-BYO3uQJZ.js} +0 -0
- /package/.output/public/assets/{javascript-Cop1kpy_.js → javascript-BsdGTPv_.js} +0 -0
- /package/.output/public/assets/{json-CTw4n7kn.js → json-Kp2u6f_f.js} +0 -0
- /package/.output/public/assets/{json5-D0XL1D5m.js → json5-BCxDPjxU.js} +0 -0
- /package/.output/public/assets/{jsonc-BBgf3TX3.js → jsonc-BV8VFjqO.js} +0 -0
- /package/.output/public/assets/{jsonl-KrKLbtB7.js → jsonl-DHrr7c-M.js} +0 -0
- /package/.output/public/assets/{jsonnet-B2ZwWMOt.js → jsonnet-xURar8mu.js} +0 -0
- /package/.output/public/assets/{jssm-ByRpI9-B.js → jssm-DtoLUQAt.js} +0 -0
- /package/.output/public/assets/{jsx-0oMUGqZj.js → jsx-CyrO086S.js} +0 -0
- /package/.output/public/assets/{kanagawa-dragon-CtPmcCMp.js → kanagawa-dragon-COwlYgQB.js} +0 -0
- /package/.output/public/assets/{kanagawa-lotus-DpOXEGCa.js → kanagawa-lotus-GZWqyq_E.js} +0 -0
- /package/.output/public/assets/{kanagawa-wave-CLVCyc-n.js → kanagawa-wave-CP4uw3DX.js} +0 -0
- /package/.output/public/assets/{kdl-6FPPEH4H.js → kdl-DGo2N7N5.js} +0 -0
- /package/.output/public/assets/{kotlin-D4L3Nd2D.js → kotlin-Cm4W8Bbs.js} +0 -0
- /package/.output/public/assets/{kusto-D-mmc07O.js → kusto-DQ22_tcT.js} +0 -0
- /package/.output/public/assets/{laserwave-7fEj4XGb.js → laserwave-DfABGYsD.js} +0 -0
- /package/.output/public/assets/{lean-BMVMuP2E.js → lean-D-8a6Wwv.js} +0 -0
- /package/.output/public/assets/{less-C95PyOu0.js → less-B-qZzFKw.js} +0 -0
- /package/.output/public/assets/{light-plus-DHI2dh3p.js → light-plus-DS_rmE1N.js} +0 -0
- /package/.output/public/assets/{llvm-Dy3qORTl.js → llvm-Ch-k6TUk.js} +0 -0
- /package/.output/public/assets/{log-BQop7fzg.js → log-BGwbCG2S.js} +0 -0
- /package/.output/public/assets/{logo-DKtnYmrp.js → logo-DHGHbFWy.js} +0 -0
- /package/.output/public/assets/{luau-Dha4KG0q.js → luau-qsvm_nYh.js} +0 -0
- /package/.output/public/assets/{make-DfmS6buu.js → make-Dlfjp_Q8.js} +0 -0
- /package/.output/public/assets/{markdown-BaI9LyM4.js → markdown-COh4ruD_.js} +0 -0
- /package/.output/public/assets/{material-theme-Dm6ETY8i.js → material-theme-Ccrl1jie.js} +0 -0
- /package/.output/public/assets/{material-theme-darker-BeyjmM5Z.js → material-theme-darker-CcOH0iHe.js} +0 -0
- /package/.output/public/assets/{material-theme-lighter-CCOYYzKL.js → material-theme-lighter-DoKpC7NM.js} +0 -0
- /package/.output/public/assets/{material-theme-ocean-CUtPiiX3.js → material-theme-ocean-BcvBZHgH.js} +0 -0
- /package/.output/public/assets/{material-theme-palenight-2L4zMwIM.js → material-theme-palenight-DIL4EAzl.js} +0 -0
- /package/.output/public/assets/{matlab-BT79Cq_j.js → matlab-CBqMuw7w.js} +0 -0
- /package/.output/public/assets/{mdx-CxGBwLNt.js → mdx-BjoJxHxW.js} +0 -0
- /package/.output/public/assets/{mermaid-DLf3axBN.js → mermaid-DjAh2yR5.js} +0 -0
- /package/.output/public/assets/{min-dark-B8TUPGHg.js → min-dark-CbwghdE5.js} +0 -0
- /package/.output/public/assets/{min-light-BDOoBxcA.js → min-light-_F39d_94.js} +0 -0
- /package/.output/public/assets/{mipsasm-DXuU_0cI.js → mipsasm-DA1H0O78.js} +0 -0
- /package/.output/public/assets/{mojo-1Omp2pIo.js → mojo-BVgjRjTn.js} +0 -0
- /package/.output/public/assets/{monokai-E_VBmXGZ.js → monokai-CxgvaWkX.js} +0 -0
- /package/.output/public/assets/{moonbit-DZzq699o.js → moonbit-tKY94ZOM.js} +0 -0
- /package/.output/public/assets/{move-DxDAOJVd.js → move-B5WspEjG.js} +0 -0
- /package/.output/public/assets/{narrat-CxDcPPb9.js → narrat-CDPRStf_.js} +0 -0
- /package/.output/public/assets/{nextflow-groovy-wvmJO4hi.js → nextflow-groovy-1GYTZoD5.js} +0 -0
- /package/.output/public/assets/{night-owl-DefhalNX.js → night-owl-CCydx7ZR.js} +0 -0
- /package/.output/public/assets/{night-owl-light-byb3AbEn.js → night-owl-light-CLM7UUPY.js} +0 -0
- /package/.output/public/assets/{nix-DsFTDHWT.js → nix-DXFN4IwW.js} +0 -0
- /package/.output/public/assets/{nord-D5rQzHT-.js → nord-CiCWZ1de.js} +0 -0
- /package/.output/public/assets/{nushell-BQ_rO0AM.js → nushell-Ck9o2qOx.js} +0 -0
- /package/.output/public/assets/{objective-c-BMq6JT_m.js → objective-c-4koxci9E.js} +0 -0
- /package/.output/public/assets/{objective-cpp-DRwojuGv.js → objective-cpp-BPFAgSN9.js} +0 -0
- /package/.output/public/assets/{ocaml-e4_gKO6E.js → ocaml-BdlBLhZV.js} +0 -0
- /package/.output/public/assets/{odin-mdTPwYOg.js → odin-BcGOLCqZ.js} +0 -0
- /package/.output/public/assets/{one-dark-pro-DxXww9jg.js → one-dark-pro-DEMdTgiO.js} +0 -0
- /package/.output/public/assets/{one-light-D9c03w7t.js → one-light-Cmpe9X1u.js} +0 -0
- /package/.output/public/assets/{openscad-D2aTdNfr.js → openscad-DBveSHYE.js} +0 -0
- /package/.output/public/assets/{pascal-D4n_G8vj.js → pascal-DxOVE99u.js} +0 -0
- /package/.output/public/assets/{pierre-dark-CizZ1Z5z.js → pierre-dark-DIUCKU6U.js} +0 -0
- /package/.output/public/assets/{pierre-light-CHMWfAMe.js → pierre-light-DVO2KPlh.js} +0 -0
- /package/.output/public/assets/{pkl-DcjhAp0L.js → pkl-pIvtf7Vu.js} +0 -0
- /package/.output/public/assets/{plastic-uOsw7z1x.js → plastic-Dvdf8qVN.js} +0 -0
- /package/.output/public/assets/{plsql-BSy3Ag0J.js → plsql-d50MFTFK.js} +0 -0
- /package/.output/public/assets/{po-Be96RYkA.js → po-CboxWwYg.js} +0 -0
- /package/.output/public/assets/{poimandres-CyO4HORD.js → poimandres-DHgQGH4M.js} +0 -0
- /package/.output/public/assets/{polar-BmhMKWum.js → polar-DNp7Oek8.js} +0 -0
- /package/.output/public/assets/{postcss-BTQso3H9.js → postcss-LpmI6XQv.js} +0 -0
- /package/.output/public/assets/{powerquery-DVyQv3M2.js → powerquery-BNCl8Uwz.js} +0 -0
- /package/.output/public/assets/{powershell-BmtCGJVD.js → powershell-CZ9J0XuS.js} +0 -0
- /package/.output/public/assets/{prisma-CCFA9rEj.js → prisma-AELUiJCl.js} +0 -0
- /package/.output/public/assets/{prolog-DWGEEo78.js → prolog-BlqwejRD.js} +0 -0
- /package/.output/public/assets/{proto-C3eop1kM.js → proto-DRQC3swD.js} +0 -0
- /package/.output/public/assets/{puppet-C0_7Nv5A.js → puppet-DBKR8MlH.js} +0 -0
- /package/.output/public/assets/{purescript-Bv-B8yRw.js → purescript-DItLzxZS.js} +0 -0
- /package/.output/public/assets/{python-CKg5r0C3.js → python-D9t_ETu8.js} +0 -0
- /package/.output/public/assets/{qmldir-Cqfb4Lox.js → qmldir-DP_KD1nk.js} +0 -0
- /package/.output/public/assets/{qss-Csho9BH8.js → qss-CL02opOd.js} +0 -0
- /package/.output/public/assets/{r-UcxRcvcA.js → r-DmmrCFmB.js} +0 -0
- /package/.output/public/assets/{racket-D8-uWeQH.js → racket-K0frLTWj.js} +0 -0
- /package/.output/public/assets/{raku-Cj4JSa8p.js → raku-DwgLlPg9.js} +0 -0
- /package/.output/public/assets/{red-z4H4llUY.js → red-DzDu-aXc.js} +0 -0
- /package/.output/public/assets/{reg-DXGFiJSl.js → reg-B_y3c7di.js} +0 -0
- /package/.output/public/assets/{regexp-3-A0406L.js → regexp--eMB47Xx.js} +0 -0
- /package/.output/public/assets/{rel-CunnVTBK.js → rel-CT65ywJp.js} +0 -0
- /package/.output/public/assets/{riscv-C8BcOCkS.js → riscv-Qv5W2vIg.js} +0 -0
- /package/.output/public/assets/{ron-DiDyR9oa.js → ron-cRHu9zPp.js} +0 -0
- /package/.output/public/assets/{rose-pine-BADquuIH.js → rose-pine-DFmTJHIJ.js} +0 -0
- /package/.output/public/assets/{rose-pine-dawn-BLcEeBoh.js → rose-pine-dawn-YIuK9wUm.js} +0 -0
- /package/.output/public/assets/{rose-pine-moon-BK_tLY1Y.js → rose-pine-moon-BYEHfkUB.js} +0 -0
- /package/.output/public/assets/{rosmsg-CHmL1Uyj.js → rosmsg-_L1z4wrx.js} +0 -0
- /package/.output/public/assets/{rust-DjJFInu3.js → rust-BA5wQ_EY.js} +0 -0
- /package/.output/public/assets/{sass-D3xZ5o-v.js → sass-sd__ov8V.js} +0 -0
- /package/.output/public/assets/{scala-B0IRml5w.js → scala--cVG4U7H.js} +0 -0
- /package/.output/public/assets/{scheme-BhwcV3Av.js → scheme-D6Q1O-kY.js} +0 -0
- /package/.output/public/assets/{sdbl-BmWYR-pI.js → sdbl-jB0DUrL_.js} +0 -0
- /package/.output/public/assets/{shellscript-DaVPunOM.js → shellscript-DyWRuzkj.js} +0 -0
- /package/.output/public/assets/{slack-dark-DOnVms5P.js → slack-dark-DHhAlQBa.js} +0 -0
- /package/.output/public/assets/{slack-ochin-DcRTft4q.js → slack-ochin-PZXbcZaN.js} +0 -0
- /package/.output/public/assets/{smalltalk-DVQuUMII.js → smalltalk-C7VkdTlv.js} +0 -0
- /package/.output/public/assets/{snazzy-light-x9CLJ1W9.js → snazzy-light-CPc_Qts9.js} +0 -0
- /package/.output/public/assets/{solarized-dark-BB1sh-pe.js → solarized-dark-DCCfKtTh.js} +0 -0
- /package/.output/public/assets/{solarized-light-9-RPS998.js → solarized-light-B84T-R9X.js} +0 -0
- /package/.output/public/assets/{solidity-gQ4WXILB.js → solidity-DVsDPpDS.js} +0 -0
- /package/.output/public/assets/{splunk-OB48_RcD.js → splunk-A-BwP6Va.js} +0 -0
- /package/.output/public/assets/{sql-CrTmZCMa.js → sql-CRzu7iKx.js} +0 -0
- /package/.output/public/assets/{ssh-config-DA9YMRGV.js → ssh-config-CFPv6mTy.js} +0 -0
- /package/.output/public/assets/{stylus-sKwvsUaC.js → stylus-CUf3IESt.js} +0 -0
- /package/.output/public/assets/{swift-C72NbAtg.js → swift-CSiiYB_Q.js} +0 -0
- /package/.output/public/assets/{synthwave-84-eJ9uRN_S.js → synthwave-84-uJp1j2Jd.js} +0 -0
- /package/.output/public/assets/{system-verilog-CnWMF7Nq.js → system-verilog-rMjKy-O9.js} +0 -0
- /package/.output/public/assets/{systemd-DMzItW5N.js → systemd-R-KDM4-t.js} +0 -0
- /package/.output/public/assets/{talonscript-DopQCWDL.js → talonscript-D666vCtm.js} +0 -0
- /package/.output/public/assets/{tasl-C28SYKbq.js → tasl-68cbBocU.js} +0 -0
- /package/.output/public/assets/{tcl-DHq7zmoF.js → tcl-Y39dJ_pX.js} +0 -0
- /package/.output/public/assets/{terraform-CogS1YKX.js → terraform-BF7wAo-b.js} +0 -0
- /package/.output/public/assets/{tokyo-night-B9N7LyrF.js → tokyo-night-EeABtN82.js} +0 -0
- /package/.output/public/assets/{toml-BH_iPsgK.js → toml-BrMFN1JF.js} +0 -0
- /package/.output/public/assets/{tsv-BIkdBZX1.js → tsv-Dp2l5v7f.js} +0 -0
- /package/.output/public/assets/{tsx-BjkCKOtw.js → tsx-CQqypS0k.js} +0 -0
- /package/.output/public/assets/{turtle-CqNXyJWZ.js → turtle-_N1aDtpV.js} +0 -0
- /package/.output/public/assets/{typescript-BoHeP9q1.js → typescript-CPmDkqmE.js} +0 -0
- /package/.output/public/assets/{typespec-CQ9LYD_e.js → typespec-ghgF2GAI.js} +0 -0
- /package/.output/public/assets/{typst-T-Fsk-Sv.js → typst-DP_izaNK.js} +0 -0
- /package/.output/public/assets/{v-BhMEOw9x.js → v-CdNC_Wok.js} +0 -0
- /package/.output/public/assets/{vala-DzajMnwt.js → vala-Bu4pYkLC.js} +0 -0
- /package/.output/public/assets/{vb-7Xr8dEYW.js → vb-u84IyWSS.js} +0 -0
- /package/.output/public/assets/{verilog-AvXtwZir.js → verilog-BC33pi7Z.js} +0 -0
- /package/.output/public/assets/{vesper-CtgQQ2sf.js → vesper-7-XtS0Kg.js} +0 -0
- /package/.output/public/assets/{vhdl-BHu0zg1P.js → vhdl-BBxTOQe0.js} +0 -0
- /package/.output/public/assets/{viml-Di0QpLfC.js → viml-X_r-ivXA.js} +0 -0
- /package/.output/public/assets/{vitesse-black-jXdfyqgD.js → vitesse-black-DRdlY-cW.js} +0 -0
- /package/.output/public/assets/{vitesse-dark-B88PxG1r.js → vitesse-dark-Bz0hOFHJ.js} +0 -0
- /package/.output/public/assets/{vitesse-light-BXxZh2iV.js → vitesse-light-7kCLd0yn.js} +0 -0
- /package/.output/public/assets/{vyper-C3R5yXgx.js → vyper-E7qIwMXy.js} +0 -0
- /package/.output/public/assets/{wasm-D_MQmneJ.js → wasm-BqG9CUph.js} +0 -0
- /package/.output/public/assets/{wasm-Chsuwt1A.js → wasm-C18OEcCL.js} +0 -0
- /package/.output/public/assets/{wenyan-BonVcr2i.js → wenyan-siXAC4el.js} +0 -0
- /package/.output/public/assets/{wgsl-D59WYmNq.js → wgsl-BJQt8Uld.js} +0 -0
- /package/.output/public/assets/{wikitext-ariTI2Wk.js → wikitext-Ci0ePJmf.js} +0 -0
- /package/.output/public/assets/{wit-EA4fa3Dt.js → wit-BdDJ7geN.js} +0 -0
- /package/.output/public/assets/{wolfram-DDp7LhyU.js → wolfram-Bi-O1IUM.js} +0 -0
- /package/.output/public/assets/{xterm-CCMwI7sy.js → xterm-TTe2Bv9Z.js} +0 -0
- /package/.output/public/assets/{yaml-BTD1XHJG.js → yaml-DgkO7CC2.js} +0 -0
- /package/.output/public/assets/{zenscript-4WaROUyc.js → zenscript-CnkrxCBw.js} +0 -0
- /package/.output/public/assets/{zig-CJoLJGwV.js → zig-CgMsxF9-.js} +0 -0
|
@@ -1,2316 +0,0 @@
|
|
|
1
|
-
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import { $ as require_react, Q as require_jsx_runtime } from "./@base-ui/react+[...].mjs";
|
|
3
|
-
import "./devlop.mjs";
|
|
4
|
-
import { n as VFileMessage, t as toJsxRuntime } from "./hast-util-to-jsx-runtime+[...].mjs";
|
|
5
|
-
import { n as visit } from "./hast-util-raw+[...].mjs";
|
|
6
|
-
import { t as urlAttributes } from "./html-url-attributes.mjs";
|
|
7
|
-
import { t as fromMarkdown } from "./mdast-util-from-markdown+[...].mjs";
|
|
8
|
-
import { t as toHast } from "./mdast-util-to-hast+[...].mjs";
|
|
9
|
-
import { t as bail } from "./bail.mjs";
|
|
10
|
-
import { t as require_extend } from "./extend.mjs";
|
|
11
|
-
import { t as isPlainObject } from "./is-plain-obj.mjs";
|
|
12
|
-
import { fileURLToPath as urlToPath } from "node:url";
|
|
13
|
-
import minpath from "node:path";
|
|
14
|
-
import minproc from "node:process";
|
|
15
|
-
//#region node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js
|
|
16
|
-
/**
|
|
17
|
-
* @typedef {import('mdast').Root} Root
|
|
18
|
-
* @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions
|
|
19
|
-
* @typedef {import('unified').Parser<Root>} Parser
|
|
20
|
-
* @typedef {import('unified').Processor<Root>} Processor
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* @typedef {Omit<FromMarkdownOptions, 'extensions' | 'mdastExtensions'>} Options
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Aadd support for parsing from markdown.
|
|
27
|
-
*
|
|
28
|
-
* @param {Readonly<Options> | null | undefined} [options]
|
|
29
|
-
* Configuration (optional).
|
|
30
|
-
* @returns {undefined}
|
|
31
|
-
* Nothing.
|
|
32
|
-
*/
|
|
33
|
-
function remarkParse(options) {
|
|
34
|
-
/** @type {Processor} */
|
|
35
|
-
const self = this;
|
|
36
|
-
self.parser = parser;
|
|
37
|
-
/**
|
|
38
|
-
* @type {Parser}
|
|
39
|
-
*/
|
|
40
|
-
function parser(doc) {
|
|
41
|
-
return fromMarkdown(doc, {
|
|
42
|
-
...self.data("settings"),
|
|
43
|
-
...options,
|
|
44
|
-
extensions: self.data("micromarkExtensions") || [],
|
|
45
|
-
mdastExtensions: self.data("fromMarkdownExtensions") || []
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.js
|
|
51
|
-
/**
|
|
52
|
-
* @import {Root as HastRoot} from 'hast'
|
|
53
|
-
* @import {Root as MdastRoot} from 'mdast'
|
|
54
|
-
* @import {Options as ToHastOptions} from 'mdast-util-to-hast'
|
|
55
|
-
* @import {Processor} from 'unified'
|
|
56
|
-
* @import {VFile} from 'vfile'
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* @typedef {Omit<ToHastOptions, 'file'>} Options
|
|
60
|
-
*
|
|
61
|
-
* @callback TransformBridge
|
|
62
|
-
* Bridge-mode.
|
|
63
|
-
*
|
|
64
|
-
* Runs the destination with the new hast tree.
|
|
65
|
-
* Discards result.
|
|
66
|
-
* @param {MdastRoot} tree
|
|
67
|
-
* Tree.
|
|
68
|
-
* @param {VFile} file
|
|
69
|
-
* File.
|
|
70
|
-
* @returns {Promise<undefined>}
|
|
71
|
-
* Nothing.
|
|
72
|
-
*
|
|
73
|
-
* @callback TransformMutate
|
|
74
|
-
* Mutate-mode.
|
|
75
|
-
*
|
|
76
|
-
* Further transformers run on the hast tree.
|
|
77
|
-
* @param {MdastRoot} tree
|
|
78
|
-
* Tree.
|
|
79
|
-
* @param {VFile} file
|
|
80
|
-
* File.
|
|
81
|
-
* @returns {HastRoot}
|
|
82
|
-
* Tree (hast).
|
|
83
|
-
*/
|
|
84
|
-
/**
|
|
85
|
-
* Turn markdown into HTML.
|
|
86
|
-
*
|
|
87
|
-
* ##### Notes
|
|
88
|
-
*
|
|
89
|
-
* ###### Signature
|
|
90
|
-
*
|
|
91
|
-
* * if a processor is given,
|
|
92
|
-
* runs the (rehype) plugins used on it with a hast tree,
|
|
93
|
-
* then discards the result (*bridge mode*)
|
|
94
|
-
* * otherwise,
|
|
95
|
-
* returns a hast tree,
|
|
96
|
-
* the plugins used after `remarkRehype` are rehype plugins (*mutate mode*)
|
|
97
|
-
*
|
|
98
|
-
* > 👉 **Note**:
|
|
99
|
-
* > It’s highly unlikely that you want to pass a `processor`.
|
|
100
|
-
*
|
|
101
|
-
* ###### HTML
|
|
102
|
-
*
|
|
103
|
-
* Raw HTML is available in mdast as `html` nodes and can be embedded in hast
|
|
104
|
-
* as semistandard `raw` nodes.
|
|
105
|
-
* Most plugins ignore `raw` nodes but two notable ones don’t:
|
|
106
|
-
*
|
|
107
|
-
* * `rehype-stringify` also has an option `allowDangerousHtml` which will
|
|
108
|
-
* output the raw HTML.
|
|
109
|
-
* This is typically discouraged as noted by the option name but is useful if
|
|
110
|
-
* you completely trust authors
|
|
111
|
-
* * `rehype-raw` can handle the raw embedded HTML strings by parsing them
|
|
112
|
-
* into standard hast nodes (`element`, `text`, etc);
|
|
113
|
-
* this is a heavy task as it needs a full HTML parser,
|
|
114
|
-
* but it is the only way to support untrusted content
|
|
115
|
-
*
|
|
116
|
-
* ###### Footnotes
|
|
117
|
-
*
|
|
118
|
-
* Many options supported here relate to footnotes.
|
|
119
|
-
* Footnotes are not specified by CommonMark,
|
|
120
|
-
* which we follow by default.
|
|
121
|
-
* They are supported by GitHub,
|
|
122
|
-
* so footnotes can be enabled in markdown with `remark-gfm`.
|
|
123
|
-
*
|
|
124
|
-
* The options `footnoteBackLabel` and `footnoteLabel` define natural language
|
|
125
|
-
* that explains footnotes,
|
|
126
|
-
* which is hidden for sighted users but shown to assistive technology.
|
|
127
|
-
* When your page is not in English,
|
|
128
|
-
* you must define translated values.
|
|
129
|
-
*
|
|
130
|
-
* Back references use ARIA attributes,
|
|
131
|
-
* but the section label itself uses a heading that is hidden with an
|
|
132
|
-
* `sr-only` class.
|
|
133
|
-
* To show it to sighted users,
|
|
134
|
-
* define different attributes in `footnoteLabelProperties`.
|
|
135
|
-
*
|
|
136
|
-
* ###### Clobbering
|
|
137
|
-
*
|
|
138
|
-
* Footnotes introduces a problem,
|
|
139
|
-
* as it links footnote calls to footnote definitions on the page through `id`
|
|
140
|
-
* attributes generated from user content,
|
|
141
|
-
* which results in DOM clobbering.
|
|
142
|
-
*
|
|
143
|
-
* DOM clobbering is this:
|
|
144
|
-
*
|
|
145
|
-
* ```html
|
|
146
|
-
* <p id=x></p>
|
|
147
|
-
* <script>alert(x) // `x` now refers to the DOM `p#x` element<\/script>
|
|
148
|
-
* ```
|
|
149
|
-
*
|
|
150
|
-
* Elements by their ID are made available by browsers on the `window` object,
|
|
151
|
-
* which is a security risk.
|
|
152
|
-
* Using a prefix solves this problem.
|
|
153
|
-
*
|
|
154
|
-
* More information on how to handle clobbering and the prefix is explained in
|
|
155
|
-
* *Example: headings (DOM clobbering)* in `rehype-sanitize`.
|
|
156
|
-
*
|
|
157
|
-
* ###### Unknown nodes
|
|
158
|
-
*
|
|
159
|
-
* Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.
|
|
160
|
-
* The default behavior for unknown nodes is:
|
|
161
|
-
*
|
|
162
|
-
* * when the node has a `value`
|
|
163
|
-
* (and doesn’t have `data.hName`, `data.hProperties`, or `data.hChildren`,
|
|
164
|
-
* see later),
|
|
165
|
-
* create a hast `text` node
|
|
166
|
-
* * otherwise,
|
|
167
|
-
* create a `<div>` element (which could be changed with `data.hName`),
|
|
168
|
-
* with its children mapped from mdast to hast as well
|
|
169
|
-
*
|
|
170
|
-
* This behavior can be changed by passing an `unknownHandler`.
|
|
171
|
-
*
|
|
172
|
-
* @overload
|
|
173
|
-
* @param {Processor} processor
|
|
174
|
-
* @param {Readonly<Options> | null | undefined} [options]
|
|
175
|
-
* @returns {TransformBridge}
|
|
176
|
-
*
|
|
177
|
-
* @overload
|
|
178
|
-
* @param {Readonly<Options> | null | undefined} [options]
|
|
179
|
-
* @returns {TransformMutate}
|
|
180
|
-
*
|
|
181
|
-
* @overload
|
|
182
|
-
* @param {Readonly<Options> | Processor | null | undefined} [destination]
|
|
183
|
-
* @param {Readonly<Options> | null | undefined} [options]
|
|
184
|
-
* @returns {TransformBridge | TransformMutate}
|
|
185
|
-
*
|
|
186
|
-
* @param {Readonly<Options> | Processor | null | undefined} [destination]
|
|
187
|
-
* Processor or configuration (optional).
|
|
188
|
-
* @param {Readonly<Options> | null | undefined} [options]
|
|
189
|
-
* When a processor was given,
|
|
190
|
-
* configuration (optional).
|
|
191
|
-
* @returns {TransformBridge | TransformMutate}
|
|
192
|
-
* Transform.
|
|
193
|
-
*/
|
|
194
|
-
function remarkRehype(destination, options) {
|
|
195
|
-
if (destination && "run" in destination)
|
|
196
|
-
/**
|
|
197
|
-
* @type {TransformBridge}
|
|
198
|
-
*/
|
|
199
|
-
return async function(tree, file) {
|
|
200
|
-
const hastTree = toHast(tree, {
|
|
201
|
-
file,
|
|
202
|
-
...options
|
|
203
|
-
});
|
|
204
|
-
await destination.run(hastTree, file);
|
|
205
|
-
};
|
|
206
|
-
/**
|
|
207
|
-
* @type {TransformMutate}
|
|
208
|
-
*/
|
|
209
|
-
return function(tree, file) {
|
|
210
|
-
return toHast(tree, {
|
|
211
|
-
file,
|
|
212
|
-
...destination || options
|
|
213
|
-
});
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.js
|
|
218
|
-
/**
|
|
219
|
-
* @typedef {(error?: Error | null | undefined, ...output: Array<any>) => void} Callback
|
|
220
|
-
* Callback.
|
|
221
|
-
*
|
|
222
|
-
* @typedef {(...input: Array<any>) => any} Middleware
|
|
223
|
-
* Ware.
|
|
224
|
-
*
|
|
225
|
-
* @typedef Pipeline
|
|
226
|
-
* Pipeline.
|
|
227
|
-
* @property {Run} run
|
|
228
|
-
* Run the pipeline.
|
|
229
|
-
* @property {Use} use
|
|
230
|
-
* Add middleware.
|
|
231
|
-
*
|
|
232
|
-
* @typedef {(...input: Array<any>) => void} Run
|
|
233
|
-
* Call all middleware.
|
|
234
|
-
*
|
|
235
|
-
* Calls `done` on completion with either an error or the output of the
|
|
236
|
-
* last middleware.
|
|
237
|
-
*
|
|
238
|
-
* > 👉 **Note**: as the length of input defines whether async functions get a
|
|
239
|
-
* > `next` function,
|
|
240
|
-
* > it’s recommended to keep `input` at one value normally.
|
|
241
|
-
|
|
242
|
-
*
|
|
243
|
-
* @typedef {(fn: Middleware) => Pipeline} Use
|
|
244
|
-
* Add middleware.
|
|
245
|
-
*/
|
|
246
|
-
/**
|
|
247
|
-
* Create new middleware.
|
|
248
|
-
*
|
|
249
|
-
* @returns {Pipeline}
|
|
250
|
-
* Pipeline.
|
|
251
|
-
*/
|
|
252
|
-
function trough() {
|
|
253
|
-
/** @type {Array<Middleware>} */
|
|
254
|
-
const fns = [];
|
|
255
|
-
/** @type {Pipeline} */
|
|
256
|
-
const pipeline = {
|
|
257
|
-
run,
|
|
258
|
-
use
|
|
259
|
-
};
|
|
260
|
-
return pipeline;
|
|
261
|
-
/** @type {Run} */
|
|
262
|
-
function run(...values) {
|
|
263
|
-
let middlewareIndex = -1;
|
|
264
|
-
/** @type {Callback} */
|
|
265
|
-
const callback = values.pop();
|
|
266
|
-
if (typeof callback !== "function") throw new TypeError("Expected function as last argument, not " + callback);
|
|
267
|
-
next(null, ...values);
|
|
268
|
-
/**
|
|
269
|
-
* Run the next `fn`, or we’re done.
|
|
270
|
-
*
|
|
271
|
-
* @param {Error | null | undefined} error
|
|
272
|
-
* @param {Array<any>} output
|
|
273
|
-
*/
|
|
274
|
-
function next(error, ...output) {
|
|
275
|
-
const fn = fns[++middlewareIndex];
|
|
276
|
-
let index = -1;
|
|
277
|
-
if (error) {
|
|
278
|
-
callback(error);
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
while (++index < values.length) if (output[index] === null || output[index] === void 0) output[index] = values[index];
|
|
282
|
-
values = output;
|
|
283
|
-
if (fn) wrap(fn, next)(...output);
|
|
284
|
-
else callback(null, ...output);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
/** @type {Use} */
|
|
288
|
-
function use(middelware) {
|
|
289
|
-
if (typeof middelware !== "function") throw new TypeError("Expected `middelware` to be a function, not " + middelware);
|
|
290
|
-
fns.push(middelware);
|
|
291
|
-
return pipeline;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Wrap `middleware` into a uniform interface.
|
|
296
|
-
*
|
|
297
|
-
* You can pass all input to the resulting function.
|
|
298
|
-
* `callback` is then called with the output of `middleware`.
|
|
299
|
-
*
|
|
300
|
-
* If `middleware` accepts more arguments than the later given in input,
|
|
301
|
-
* an extra `done` function is passed to it after that input,
|
|
302
|
-
* which must be called by `middleware`.
|
|
303
|
-
*
|
|
304
|
-
* The first value in `input` is the main input value.
|
|
305
|
-
* All other input values are the rest input values.
|
|
306
|
-
* The values given to `callback` are the input values,
|
|
307
|
-
* merged with every non-nullish output value.
|
|
308
|
-
*
|
|
309
|
-
* * if `middleware` throws an error,
|
|
310
|
-
* returns a promise that is rejected,
|
|
311
|
-
* or calls the given `done` function with an error,
|
|
312
|
-
* `callback` is called with that error
|
|
313
|
-
* * if `middleware` returns a value or returns a promise that is resolved,
|
|
314
|
-
* that value is the main output value
|
|
315
|
-
* * if `middleware` calls `done`,
|
|
316
|
-
* all non-nullish values except for the first one (the error) overwrite the
|
|
317
|
-
* output values
|
|
318
|
-
*
|
|
319
|
-
* @param {Middleware} middleware
|
|
320
|
-
* Function to wrap.
|
|
321
|
-
* @param {Callback} callback
|
|
322
|
-
* Callback called with the output of `middleware`.
|
|
323
|
-
* @returns {Run}
|
|
324
|
-
* Wrapped middleware.
|
|
325
|
-
*/
|
|
326
|
-
function wrap(middleware, callback) {
|
|
327
|
-
/** @type {boolean} */
|
|
328
|
-
let called;
|
|
329
|
-
return wrapped;
|
|
330
|
-
/**
|
|
331
|
-
* Call `middleware`.
|
|
332
|
-
* @this {any}
|
|
333
|
-
* @param {Array<any>} parameters
|
|
334
|
-
* @returns {void}
|
|
335
|
-
*/
|
|
336
|
-
function wrapped(...parameters) {
|
|
337
|
-
const fnExpectsCallback = middleware.length > parameters.length;
|
|
338
|
-
/** @type {any} */
|
|
339
|
-
let result;
|
|
340
|
-
if (fnExpectsCallback) parameters.push(done);
|
|
341
|
-
try {
|
|
342
|
-
result = middleware.apply(this, parameters);
|
|
343
|
-
} catch (error) {
|
|
344
|
-
const exception = error;
|
|
345
|
-
if (fnExpectsCallback && called) throw exception;
|
|
346
|
-
return done(exception);
|
|
347
|
-
}
|
|
348
|
-
if (!fnExpectsCallback) if (result && result.then && typeof result.then === "function") result.then(then, done);
|
|
349
|
-
else if (result instanceof Error) done(result);
|
|
350
|
-
else then(result);
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Call `callback`, only once.
|
|
354
|
-
*
|
|
355
|
-
* @type {Callback}
|
|
356
|
-
*/
|
|
357
|
-
function done(error, ...output) {
|
|
358
|
-
if (!called) {
|
|
359
|
-
called = true;
|
|
360
|
-
callback(error, ...output);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* Call `done` with one value.
|
|
365
|
-
*
|
|
366
|
-
* @param {any} [value]
|
|
367
|
-
*/
|
|
368
|
-
function then(value) {
|
|
369
|
-
done(null, value);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
//#endregion
|
|
373
|
-
//#region node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.js
|
|
374
|
-
/**
|
|
375
|
-
* Checks if a value has the shape of a WHATWG URL object.
|
|
376
|
-
*
|
|
377
|
-
* Using a symbol or instanceof would not be able to recognize URL objects
|
|
378
|
-
* coming from other implementations (e.g. in Electron), so instead we are
|
|
379
|
-
* checking some well known properties for a lack of a better test.
|
|
380
|
-
*
|
|
381
|
-
* We use `href` and `protocol` as they are the only properties that are
|
|
382
|
-
* easy to retrieve and calculate due to the lazy nature of the getters.
|
|
383
|
-
*
|
|
384
|
-
* We check for auth attribute to distinguish legacy url instance with
|
|
385
|
-
* WHATWG URL instance.
|
|
386
|
-
*
|
|
387
|
-
* @param {unknown} fileUrlOrPath
|
|
388
|
-
* File path or URL.
|
|
389
|
-
* @returns {fileUrlOrPath is URL}
|
|
390
|
-
* Whether it’s a URL.
|
|
391
|
-
*/
|
|
392
|
-
function isUrl(fileUrlOrPath) {
|
|
393
|
-
return Boolean(fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && fileUrlOrPath.auth === void 0);
|
|
394
|
-
}
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.js
|
|
397
|
-
/**
|
|
398
|
-
* @import {Node, Point, Position} from 'unist'
|
|
399
|
-
* @import {Options as MessageOptions} from 'vfile-message'
|
|
400
|
-
* @import {Compatible, Data, Map, Options, Value} from 'vfile'
|
|
401
|
-
*/
|
|
402
|
-
/**
|
|
403
|
-
* @typedef {object & {type: string, position?: Position | undefined}} NodeLike
|
|
404
|
-
*/
|
|
405
|
-
/**
|
|
406
|
-
* Order of setting (least specific to most), we need this because otherwise
|
|
407
|
-
* `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a
|
|
408
|
-
* stem can be set.
|
|
409
|
-
*/
|
|
410
|
-
var order = [
|
|
411
|
-
"history",
|
|
412
|
-
"path",
|
|
413
|
-
"basename",
|
|
414
|
-
"stem",
|
|
415
|
-
"extname",
|
|
416
|
-
"dirname"
|
|
417
|
-
];
|
|
418
|
-
var VFile = class {
|
|
419
|
-
/**
|
|
420
|
-
* Create a new virtual file.
|
|
421
|
-
*
|
|
422
|
-
* `options` is treated as:
|
|
423
|
-
*
|
|
424
|
-
* * `string` or `Uint8Array` — `{value: options}`
|
|
425
|
-
* * `URL` — `{path: options}`
|
|
426
|
-
* * `VFile` — shallow copies its data over to the new file
|
|
427
|
-
* * `object` — all fields are shallow copied over to the new file
|
|
428
|
-
*
|
|
429
|
-
* Path related fields are set in the following order (least specific to
|
|
430
|
-
* most specific): `history`, `path`, `basename`, `stem`, `extname`,
|
|
431
|
-
* `dirname`.
|
|
432
|
-
*
|
|
433
|
-
* You cannot set `dirname` or `extname` without setting either `history`,
|
|
434
|
-
* `path`, `basename`, or `stem` too.
|
|
435
|
-
*
|
|
436
|
-
* @param {Compatible | null | undefined} [value]
|
|
437
|
-
* File value.
|
|
438
|
-
* @returns
|
|
439
|
-
* New instance.
|
|
440
|
-
*/
|
|
441
|
-
constructor(value) {
|
|
442
|
-
/** @type {Options | VFile} */
|
|
443
|
-
let options;
|
|
444
|
-
if (!value) options = {};
|
|
445
|
-
else if (isUrl(value)) options = { path: value };
|
|
446
|
-
else if (typeof value === "string" || isUint8Array$1(value)) options = { value };
|
|
447
|
-
else options = value;
|
|
448
|
-
/**
|
|
449
|
-
* Base of `path` (default: `process.cwd()` or `'/'` in browsers).
|
|
450
|
-
*
|
|
451
|
-
* @type {string}
|
|
452
|
-
*/
|
|
453
|
-
this.cwd = "cwd" in options ? "" : minproc.cwd();
|
|
454
|
-
/**
|
|
455
|
-
* Place to store custom info (default: `{}`).
|
|
456
|
-
*
|
|
457
|
-
* It’s OK to store custom data directly on the file but moving it to
|
|
458
|
-
* `data` is recommended.
|
|
459
|
-
*
|
|
460
|
-
* @type {Data}
|
|
461
|
-
*/
|
|
462
|
-
this.data = {};
|
|
463
|
-
/**
|
|
464
|
-
* List of file paths the file moved between.
|
|
465
|
-
*
|
|
466
|
-
* The first is the original path and the last is the current path.
|
|
467
|
-
*
|
|
468
|
-
* @type {Array<string>}
|
|
469
|
-
*/
|
|
470
|
-
this.history = [];
|
|
471
|
-
/**
|
|
472
|
-
* List of messages associated with the file.
|
|
473
|
-
*
|
|
474
|
-
* @type {Array<VFileMessage>}
|
|
475
|
-
*/
|
|
476
|
-
this.messages = [];
|
|
477
|
-
/**
|
|
478
|
-
* Raw value.
|
|
479
|
-
*
|
|
480
|
-
* @type {Value}
|
|
481
|
-
*/
|
|
482
|
-
this.value;
|
|
483
|
-
/**
|
|
484
|
-
* Source map.
|
|
485
|
-
*
|
|
486
|
-
* This type is equivalent to the `RawSourceMap` type from the `source-map`
|
|
487
|
-
* module.
|
|
488
|
-
*
|
|
489
|
-
* @type {Map | null | undefined}
|
|
490
|
-
*/
|
|
491
|
-
this.map;
|
|
492
|
-
/**
|
|
493
|
-
* Custom, non-string, compiled, representation.
|
|
494
|
-
*
|
|
495
|
-
* This is used by unified to store non-string results.
|
|
496
|
-
* One example is when turning markdown into React nodes.
|
|
497
|
-
*
|
|
498
|
-
* @type {unknown}
|
|
499
|
-
*/
|
|
500
|
-
this.result;
|
|
501
|
-
/**
|
|
502
|
-
* Whether a file was saved to disk.
|
|
503
|
-
*
|
|
504
|
-
* This is used by vfile reporters.
|
|
505
|
-
*
|
|
506
|
-
* @type {boolean}
|
|
507
|
-
*/
|
|
508
|
-
this.stored;
|
|
509
|
-
let index = -1;
|
|
510
|
-
while (++index < order.length) {
|
|
511
|
-
const field = order[index];
|
|
512
|
-
if (field in options && options[field] !== void 0 && options[field] !== null) this[field] = field === "history" ? [...options[field]] : options[field];
|
|
513
|
-
}
|
|
514
|
-
/** @type {string} */
|
|
515
|
-
let field;
|
|
516
|
-
for (field in options) if (!order.includes(field)) this[field] = options[field];
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Get the basename (including extname) (example: `'index.min.js'`).
|
|
520
|
-
*
|
|
521
|
-
* @returns {string | undefined}
|
|
522
|
-
* Basename.
|
|
523
|
-
*/
|
|
524
|
-
get basename() {
|
|
525
|
-
return typeof this.path === "string" ? minpath.basename(this.path) : void 0;
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Set basename (including extname) (`'index.min.js'`).
|
|
529
|
-
*
|
|
530
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
531
|
-
* on windows).
|
|
532
|
-
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
533
|
-
*
|
|
534
|
-
* @param {string} basename
|
|
535
|
-
* Basename.
|
|
536
|
-
* @returns {undefined}
|
|
537
|
-
* Nothing.
|
|
538
|
-
*/
|
|
539
|
-
set basename(basename) {
|
|
540
|
-
assertNonEmpty(basename, "basename");
|
|
541
|
-
assertPart(basename, "basename");
|
|
542
|
-
this.path = minpath.join(this.dirname || "", basename);
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Get the parent path (example: `'~'`).
|
|
546
|
-
*
|
|
547
|
-
* @returns {string | undefined}
|
|
548
|
-
* Dirname.
|
|
549
|
-
*/
|
|
550
|
-
get dirname() {
|
|
551
|
-
return typeof this.path === "string" ? minpath.dirname(this.path) : void 0;
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* Set the parent path (example: `'~'`).
|
|
555
|
-
*
|
|
556
|
-
* Cannot be set if there’s no `path` yet.
|
|
557
|
-
*
|
|
558
|
-
* @param {string | undefined} dirname
|
|
559
|
-
* Dirname.
|
|
560
|
-
* @returns {undefined}
|
|
561
|
-
* Nothing.
|
|
562
|
-
*/
|
|
563
|
-
set dirname(dirname) {
|
|
564
|
-
assertPath(this.basename, "dirname");
|
|
565
|
-
this.path = minpath.join(dirname || "", this.basename);
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* Get the extname (including dot) (example: `'.js'`).
|
|
569
|
-
*
|
|
570
|
-
* @returns {string | undefined}
|
|
571
|
-
* Extname.
|
|
572
|
-
*/
|
|
573
|
-
get extname() {
|
|
574
|
-
return typeof this.path === "string" ? minpath.extname(this.path) : void 0;
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* Set the extname (including dot) (example: `'.js'`).
|
|
578
|
-
*
|
|
579
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
580
|
-
* on windows).
|
|
581
|
-
* Cannot be set if there’s no `path` yet.
|
|
582
|
-
*
|
|
583
|
-
* @param {string | undefined} extname
|
|
584
|
-
* Extname.
|
|
585
|
-
* @returns {undefined}
|
|
586
|
-
* Nothing.
|
|
587
|
-
*/
|
|
588
|
-
set extname(extname) {
|
|
589
|
-
assertPart(extname, "extname");
|
|
590
|
-
assertPath(this.dirname, "extname");
|
|
591
|
-
if (extname) {
|
|
592
|
-
if (extname.codePointAt(0) !== 46) throw new Error("`extname` must start with `.`");
|
|
593
|
-
if (extname.includes(".", 1)) throw new Error("`extname` cannot contain multiple dots");
|
|
594
|
-
}
|
|
595
|
-
this.path = minpath.join(this.dirname, this.stem + (extname || ""));
|
|
596
|
-
}
|
|
597
|
-
/**
|
|
598
|
-
* Get the full path (example: `'~/index.min.js'`).
|
|
599
|
-
*
|
|
600
|
-
* @returns {string}
|
|
601
|
-
* Path.
|
|
602
|
-
*/
|
|
603
|
-
get path() {
|
|
604
|
-
return this.history[this.history.length - 1];
|
|
605
|
-
}
|
|
606
|
-
/**
|
|
607
|
-
* Set the full path (example: `'~/index.min.js'`).
|
|
608
|
-
*
|
|
609
|
-
* Cannot be nullified.
|
|
610
|
-
* You can set a file URL (a `URL` object with a `file:` protocol) which will
|
|
611
|
-
* be turned into a path with `url.fileURLToPath`.
|
|
612
|
-
*
|
|
613
|
-
* @param {URL | string} path
|
|
614
|
-
* Path.
|
|
615
|
-
* @returns {undefined}
|
|
616
|
-
* Nothing.
|
|
617
|
-
*/
|
|
618
|
-
set path(path) {
|
|
619
|
-
if (isUrl(path)) path = urlToPath(path);
|
|
620
|
-
assertNonEmpty(path, "path");
|
|
621
|
-
if (this.path !== path) this.history.push(path);
|
|
622
|
-
}
|
|
623
|
-
/**
|
|
624
|
-
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
625
|
-
*
|
|
626
|
-
* @returns {string | undefined}
|
|
627
|
-
* Stem.
|
|
628
|
-
*/
|
|
629
|
-
get stem() {
|
|
630
|
-
return typeof this.path === "string" ? minpath.basename(this.path, this.extname) : void 0;
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
634
|
-
*
|
|
635
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
636
|
-
* on windows).
|
|
637
|
-
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
638
|
-
*
|
|
639
|
-
* @param {string} stem
|
|
640
|
-
* Stem.
|
|
641
|
-
* @returns {undefined}
|
|
642
|
-
* Nothing.
|
|
643
|
-
*/
|
|
644
|
-
set stem(stem) {
|
|
645
|
-
assertNonEmpty(stem, "stem");
|
|
646
|
-
assertPart(stem, "stem");
|
|
647
|
-
this.path = minpath.join(this.dirname || "", stem + (this.extname || ""));
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* Create a fatal message for `reason` associated with the file.
|
|
651
|
-
*
|
|
652
|
-
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
653
|
-
* and the `file` field is set to the current file path.
|
|
654
|
-
* The message is added to the `messages` field on `file`.
|
|
655
|
-
*
|
|
656
|
-
* > 🪦 **Note**: also has obsolete signatures.
|
|
657
|
-
*
|
|
658
|
-
* @overload
|
|
659
|
-
* @param {string} reason
|
|
660
|
-
* @param {MessageOptions | null | undefined} [options]
|
|
661
|
-
* @returns {never}
|
|
662
|
-
*
|
|
663
|
-
* @overload
|
|
664
|
-
* @param {string} reason
|
|
665
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
666
|
-
* @param {string | null | undefined} [origin]
|
|
667
|
-
* @returns {never}
|
|
668
|
-
*
|
|
669
|
-
* @overload
|
|
670
|
-
* @param {string} reason
|
|
671
|
-
* @param {Point | Position | null | undefined} place
|
|
672
|
-
* @param {string | null | undefined} [origin]
|
|
673
|
-
* @returns {never}
|
|
674
|
-
*
|
|
675
|
-
* @overload
|
|
676
|
-
* @param {string} reason
|
|
677
|
-
* @param {string | null | undefined} [origin]
|
|
678
|
-
* @returns {never}
|
|
679
|
-
*
|
|
680
|
-
* @overload
|
|
681
|
-
* @param {Error | VFileMessage} cause
|
|
682
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
683
|
-
* @param {string | null | undefined} [origin]
|
|
684
|
-
* @returns {never}
|
|
685
|
-
*
|
|
686
|
-
* @overload
|
|
687
|
-
* @param {Error | VFileMessage} cause
|
|
688
|
-
* @param {Point | Position | null | undefined} place
|
|
689
|
-
* @param {string | null | undefined} [origin]
|
|
690
|
-
* @returns {never}
|
|
691
|
-
*
|
|
692
|
-
* @overload
|
|
693
|
-
* @param {Error | VFileMessage} cause
|
|
694
|
-
* @param {string | null | undefined} [origin]
|
|
695
|
-
* @returns {never}
|
|
696
|
-
*
|
|
697
|
-
* @param {Error | VFileMessage | string} causeOrReason
|
|
698
|
-
* Reason for message, should use markdown.
|
|
699
|
-
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
700
|
-
* Configuration (optional).
|
|
701
|
-
* @param {string | null | undefined} [origin]
|
|
702
|
-
* Place in code where the message originates (example:
|
|
703
|
-
* `'my-package:my-rule'` or `'my-rule'`).
|
|
704
|
-
* @returns {never}
|
|
705
|
-
* Never.
|
|
706
|
-
* @throws {VFileMessage}
|
|
707
|
-
* Message.
|
|
708
|
-
*/
|
|
709
|
-
fail(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
710
|
-
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
711
|
-
message.fatal = true;
|
|
712
|
-
throw message;
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* Create an info message for `reason` associated with the file.
|
|
716
|
-
*
|
|
717
|
-
* The `fatal` field of the message is set to `undefined` (info; change
|
|
718
|
-
* likely not needed) and the `file` field is set to the current file path.
|
|
719
|
-
* The message is added to the `messages` field on `file`.
|
|
720
|
-
*
|
|
721
|
-
* > 🪦 **Note**: also has obsolete signatures.
|
|
722
|
-
*
|
|
723
|
-
* @overload
|
|
724
|
-
* @param {string} reason
|
|
725
|
-
* @param {MessageOptions | null | undefined} [options]
|
|
726
|
-
* @returns {VFileMessage}
|
|
727
|
-
*
|
|
728
|
-
* @overload
|
|
729
|
-
* @param {string} reason
|
|
730
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
731
|
-
* @param {string | null | undefined} [origin]
|
|
732
|
-
* @returns {VFileMessage}
|
|
733
|
-
*
|
|
734
|
-
* @overload
|
|
735
|
-
* @param {string} reason
|
|
736
|
-
* @param {Point | Position | null | undefined} place
|
|
737
|
-
* @param {string | null | undefined} [origin]
|
|
738
|
-
* @returns {VFileMessage}
|
|
739
|
-
*
|
|
740
|
-
* @overload
|
|
741
|
-
* @param {string} reason
|
|
742
|
-
* @param {string | null | undefined} [origin]
|
|
743
|
-
* @returns {VFileMessage}
|
|
744
|
-
*
|
|
745
|
-
* @overload
|
|
746
|
-
* @param {Error | VFileMessage} cause
|
|
747
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
748
|
-
* @param {string | null | undefined} [origin]
|
|
749
|
-
* @returns {VFileMessage}
|
|
750
|
-
*
|
|
751
|
-
* @overload
|
|
752
|
-
* @param {Error | VFileMessage} cause
|
|
753
|
-
* @param {Point | Position | null | undefined} place
|
|
754
|
-
* @param {string | null | undefined} [origin]
|
|
755
|
-
* @returns {VFileMessage}
|
|
756
|
-
*
|
|
757
|
-
* @overload
|
|
758
|
-
* @param {Error | VFileMessage} cause
|
|
759
|
-
* @param {string | null | undefined} [origin]
|
|
760
|
-
* @returns {VFileMessage}
|
|
761
|
-
*
|
|
762
|
-
* @param {Error | VFileMessage | string} causeOrReason
|
|
763
|
-
* Reason for message, should use markdown.
|
|
764
|
-
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
765
|
-
* Configuration (optional).
|
|
766
|
-
* @param {string | null | undefined} [origin]
|
|
767
|
-
* Place in code where the message originates (example:
|
|
768
|
-
* `'my-package:my-rule'` or `'my-rule'`).
|
|
769
|
-
* @returns {VFileMessage}
|
|
770
|
-
* Message.
|
|
771
|
-
*/
|
|
772
|
-
info(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
773
|
-
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
774
|
-
message.fatal = void 0;
|
|
775
|
-
return message;
|
|
776
|
-
}
|
|
777
|
-
/**
|
|
778
|
-
* Create a message for `reason` associated with the file.
|
|
779
|
-
*
|
|
780
|
-
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
781
|
-
* needed) and the `file` field is set to the current file path.
|
|
782
|
-
* The message is added to the `messages` field on `file`.
|
|
783
|
-
*
|
|
784
|
-
* > 🪦 **Note**: also has obsolete signatures.
|
|
785
|
-
*
|
|
786
|
-
* @overload
|
|
787
|
-
* @param {string} reason
|
|
788
|
-
* @param {MessageOptions | null | undefined} [options]
|
|
789
|
-
* @returns {VFileMessage}
|
|
790
|
-
*
|
|
791
|
-
* @overload
|
|
792
|
-
* @param {string} reason
|
|
793
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
794
|
-
* @param {string | null | undefined} [origin]
|
|
795
|
-
* @returns {VFileMessage}
|
|
796
|
-
*
|
|
797
|
-
* @overload
|
|
798
|
-
* @param {string} reason
|
|
799
|
-
* @param {Point | Position | null | undefined} place
|
|
800
|
-
* @param {string | null | undefined} [origin]
|
|
801
|
-
* @returns {VFileMessage}
|
|
802
|
-
*
|
|
803
|
-
* @overload
|
|
804
|
-
* @param {string} reason
|
|
805
|
-
* @param {string | null | undefined} [origin]
|
|
806
|
-
* @returns {VFileMessage}
|
|
807
|
-
*
|
|
808
|
-
* @overload
|
|
809
|
-
* @param {Error | VFileMessage} cause
|
|
810
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
811
|
-
* @param {string | null | undefined} [origin]
|
|
812
|
-
* @returns {VFileMessage}
|
|
813
|
-
*
|
|
814
|
-
* @overload
|
|
815
|
-
* @param {Error | VFileMessage} cause
|
|
816
|
-
* @param {Point | Position | null | undefined} place
|
|
817
|
-
* @param {string | null | undefined} [origin]
|
|
818
|
-
* @returns {VFileMessage}
|
|
819
|
-
*
|
|
820
|
-
* @overload
|
|
821
|
-
* @param {Error | VFileMessage} cause
|
|
822
|
-
* @param {string | null | undefined} [origin]
|
|
823
|
-
* @returns {VFileMessage}
|
|
824
|
-
*
|
|
825
|
-
* @param {Error | VFileMessage | string} causeOrReason
|
|
826
|
-
* Reason for message, should use markdown.
|
|
827
|
-
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
828
|
-
* Configuration (optional).
|
|
829
|
-
* @param {string | null | undefined} [origin]
|
|
830
|
-
* Place in code where the message originates (example:
|
|
831
|
-
* `'my-package:my-rule'` or `'my-rule'`).
|
|
832
|
-
* @returns {VFileMessage}
|
|
833
|
-
* Message.
|
|
834
|
-
*/
|
|
835
|
-
message(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
836
|
-
const message = new VFileMessage(causeOrReason, optionsOrParentOrPlace, origin);
|
|
837
|
-
if (this.path) {
|
|
838
|
-
message.name = this.path + ":" + message.name;
|
|
839
|
-
message.file = this.path;
|
|
840
|
-
}
|
|
841
|
-
message.fatal = false;
|
|
842
|
-
this.messages.push(message);
|
|
843
|
-
return message;
|
|
844
|
-
}
|
|
845
|
-
/**
|
|
846
|
-
* Serialize the file.
|
|
847
|
-
*
|
|
848
|
-
* > **Note**: which encodings are supported depends on the engine.
|
|
849
|
-
* > For info on Node.js, see:
|
|
850
|
-
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
|
|
851
|
-
*
|
|
852
|
-
* @param {string | null | undefined} [encoding='utf8']
|
|
853
|
-
* Character encoding to understand `value` as when it’s a `Uint8Array`
|
|
854
|
-
* (default: `'utf-8'`).
|
|
855
|
-
* @returns {string}
|
|
856
|
-
* Serialized file.
|
|
857
|
-
*/
|
|
858
|
-
toString(encoding) {
|
|
859
|
-
if (this.value === void 0) return "";
|
|
860
|
-
if (typeof this.value === "string") return this.value;
|
|
861
|
-
return new TextDecoder(encoding || void 0).decode(this.value);
|
|
862
|
-
}
|
|
863
|
-
};
|
|
864
|
-
/**
|
|
865
|
-
* Assert that `part` is not a path (as in, does not contain `path.sep`).
|
|
866
|
-
*
|
|
867
|
-
* @param {string | null | undefined} part
|
|
868
|
-
* File path part.
|
|
869
|
-
* @param {string} name
|
|
870
|
-
* Part name.
|
|
871
|
-
* @returns {undefined}
|
|
872
|
-
* Nothing.
|
|
873
|
-
*/
|
|
874
|
-
function assertPart(part, name) {
|
|
875
|
-
if (part && part.includes(minpath.sep)) throw new Error("`" + name + "` cannot be a path: did not expect `" + minpath.sep + "`");
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* Assert that `part` is not empty.
|
|
879
|
-
*
|
|
880
|
-
* @param {string | undefined} part
|
|
881
|
-
* Thing.
|
|
882
|
-
* @param {string} name
|
|
883
|
-
* Part name.
|
|
884
|
-
* @returns {asserts part is string}
|
|
885
|
-
* Nothing.
|
|
886
|
-
*/
|
|
887
|
-
function assertNonEmpty(part, name) {
|
|
888
|
-
if (!part) throw new Error("`" + name + "` cannot be empty");
|
|
889
|
-
}
|
|
890
|
-
/**
|
|
891
|
-
* Assert `path` exists.
|
|
892
|
-
*
|
|
893
|
-
* @param {string | undefined} path
|
|
894
|
-
* Path.
|
|
895
|
-
* @param {string} name
|
|
896
|
-
* Dependency name.
|
|
897
|
-
* @returns {asserts path is string}
|
|
898
|
-
* Nothing.
|
|
899
|
-
*/
|
|
900
|
-
function assertPath(path, name) {
|
|
901
|
-
if (!path) throw new Error("Setting `" + name + "` requires `path` to be set too");
|
|
902
|
-
}
|
|
903
|
-
/**
|
|
904
|
-
* Assert `value` is an `Uint8Array`.
|
|
905
|
-
*
|
|
906
|
-
* @param {unknown} value
|
|
907
|
-
* thing.
|
|
908
|
-
* @returns {value is Uint8Array}
|
|
909
|
-
* Whether `value` is an `Uint8Array`.
|
|
910
|
-
*/
|
|
911
|
-
function isUint8Array$1(value) {
|
|
912
|
-
return Boolean(value && typeof value === "object" && "byteLength" in value && "byteOffset" in value);
|
|
913
|
-
}
|
|
914
|
-
//#endregion
|
|
915
|
-
//#region node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.js
|
|
916
|
-
var import_extend = /* @__PURE__ */ __toESM(require_extend(), 1);
|
|
917
|
-
var CallableInstance = (function(property) {
|
|
918
|
-
const proto = this.constructor.prototype;
|
|
919
|
-
const value = proto[property];
|
|
920
|
-
/** @type {(...parameters: Array<unknown>) => unknown} */
|
|
921
|
-
const apply = function() {
|
|
922
|
-
return value.apply(apply, arguments);
|
|
923
|
-
};
|
|
924
|
-
Object.setPrototypeOf(apply, proto);
|
|
925
|
-
return apply;
|
|
926
|
-
});
|
|
927
|
-
//#endregion
|
|
928
|
-
//#region node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js
|
|
929
|
-
/**
|
|
930
|
-
* @typedef {import('trough').Pipeline} Pipeline
|
|
931
|
-
*
|
|
932
|
-
* @typedef {import('unist').Node} Node
|
|
933
|
-
*
|
|
934
|
-
* @typedef {import('vfile').Compatible} Compatible
|
|
935
|
-
* @typedef {import('vfile').Value} Value
|
|
936
|
-
*
|
|
937
|
-
* @typedef {import('../index.js').CompileResultMap} CompileResultMap
|
|
938
|
-
* @typedef {import('../index.js').Data} Data
|
|
939
|
-
* @typedef {import('../index.js').Settings} Settings
|
|
940
|
-
*/
|
|
941
|
-
/**
|
|
942
|
-
* @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults
|
|
943
|
-
* Acceptable results from compilers.
|
|
944
|
-
*
|
|
945
|
-
* To register custom results, add them to
|
|
946
|
-
* {@linkcode CompileResultMap}.
|
|
947
|
-
*/
|
|
948
|
-
/**
|
|
949
|
-
* @template {Node} [Tree=Node]
|
|
950
|
-
* The node that the compiler receives (default: `Node`).
|
|
951
|
-
* @template {CompileResults} [Result=CompileResults]
|
|
952
|
-
* The thing that the compiler yields (default: `CompileResults`).
|
|
953
|
-
* @callback Compiler
|
|
954
|
-
* A **compiler** handles the compiling of a syntax tree to something else
|
|
955
|
-
* (in most cases, text) (TypeScript type).
|
|
956
|
-
*
|
|
957
|
-
* It is used in the stringify phase and called with a {@linkcode Node}
|
|
958
|
-
* and {@linkcode VFile} representation of the document to compile.
|
|
959
|
-
* It should return the textual representation of the given tree (typically
|
|
960
|
-
* `string`).
|
|
961
|
-
*
|
|
962
|
-
* > **Note**: unified typically compiles by serializing: most compilers
|
|
963
|
-
* > return `string` (or `Uint8Array`).
|
|
964
|
-
* > Some compilers, such as the one configured with
|
|
965
|
-
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
966
|
-
* > React tree).
|
|
967
|
-
* > If you’re using a compiler that doesn’t serialize, expect different
|
|
968
|
-
* > result values.
|
|
969
|
-
* >
|
|
970
|
-
* > To register custom results in TypeScript, add them to
|
|
971
|
-
* > {@linkcode CompileResultMap}.
|
|
972
|
-
*
|
|
973
|
-
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
974
|
-
* @param {Tree} tree
|
|
975
|
-
* Tree to compile.
|
|
976
|
-
* @param {VFile} file
|
|
977
|
-
* File associated with `tree`.
|
|
978
|
-
* @returns {Result}
|
|
979
|
-
* New content: compiled text (`string` or `Uint8Array`, for `file.value`) or
|
|
980
|
-
* something else (for `file.result`).
|
|
981
|
-
*/
|
|
982
|
-
/**
|
|
983
|
-
* @template {Node} [Tree=Node]
|
|
984
|
-
* The node that the parser yields (default: `Node`)
|
|
985
|
-
* @callback Parser
|
|
986
|
-
* A **parser** handles the parsing of text to a syntax tree.
|
|
987
|
-
*
|
|
988
|
-
* It is used in the parse phase and is called with a `string` and
|
|
989
|
-
* {@linkcode VFile} of the document to parse.
|
|
990
|
-
* It must return the syntax tree representation of the given file
|
|
991
|
-
* ({@linkcode Node}).
|
|
992
|
-
* @param {string} document
|
|
993
|
-
* Document to parse.
|
|
994
|
-
* @param {VFile} file
|
|
995
|
-
* File associated with `document`.
|
|
996
|
-
* @returns {Tree}
|
|
997
|
-
* Node representing the given file.
|
|
998
|
-
*/
|
|
999
|
-
/**
|
|
1000
|
-
* @typedef {(
|
|
1001
|
-
* Plugin<Array<any>, any, any> |
|
|
1002
|
-
* PluginTuple<Array<any>, any, any> |
|
|
1003
|
-
* Preset
|
|
1004
|
-
* )} Pluggable
|
|
1005
|
-
* Union of the different ways to add plugins and settings.
|
|
1006
|
-
*/
|
|
1007
|
-
/**
|
|
1008
|
-
* @typedef {Array<Pluggable>} PluggableList
|
|
1009
|
-
* List of plugins and presets.
|
|
1010
|
-
*/
|
|
1011
|
-
/**
|
|
1012
|
-
* @template {Array<unknown>} [PluginParameters=[]]
|
|
1013
|
-
* Arguments passed to the plugin (default: `[]`, the empty tuple).
|
|
1014
|
-
* @template {Node | string | undefined} [Input=Node]
|
|
1015
|
-
* Value that is expected as input (default: `Node`).
|
|
1016
|
-
*
|
|
1017
|
-
* * If the plugin returns a {@linkcode Transformer}, this
|
|
1018
|
-
* should be the node it expects.
|
|
1019
|
-
* * If the plugin sets a {@linkcode Parser}, this should be
|
|
1020
|
-
* `string`.
|
|
1021
|
-
* * If the plugin sets a {@linkcode Compiler}, this should be the
|
|
1022
|
-
* node it expects.
|
|
1023
|
-
* @template [Output=Input]
|
|
1024
|
-
* Value that is yielded as output (default: `Input`).
|
|
1025
|
-
*
|
|
1026
|
-
* * If the plugin returns a {@linkcode Transformer}, this
|
|
1027
|
-
* should be the node that that yields.
|
|
1028
|
-
* * If the plugin sets a {@linkcode Parser}, this should be the
|
|
1029
|
-
* node that it yields.
|
|
1030
|
-
* * If the plugin sets a {@linkcode Compiler}, this should be
|
|
1031
|
-
* result it yields.
|
|
1032
|
-
* @typedef {(
|
|
1033
|
-
* (this: Processor, ...parameters: PluginParameters) =>
|
|
1034
|
-
* Input extends string ? // Parser.
|
|
1035
|
-
* Output extends Node | undefined ? undefined | void : never :
|
|
1036
|
-
* Output extends CompileResults ? // Compiler.
|
|
1037
|
-
* Input extends Node | undefined ? undefined | void : never :
|
|
1038
|
-
* Transformer<
|
|
1039
|
-
* Input extends Node ? Input : Node,
|
|
1040
|
-
* Output extends Node ? Output : Node
|
|
1041
|
-
* > | undefined | void
|
|
1042
|
-
* )} Plugin
|
|
1043
|
-
* Single plugin.
|
|
1044
|
-
*
|
|
1045
|
-
* Plugins configure the processors they are applied on in the following
|
|
1046
|
-
* ways:
|
|
1047
|
-
*
|
|
1048
|
-
* * they change the processor, such as the parser, the compiler, or by
|
|
1049
|
-
* configuring data
|
|
1050
|
-
* * they specify how to handle trees and files
|
|
1051
|
-
*
|
|
1052
|
-
* In practice, they are functions that can receive options and configure the
|
|
1053
|
-
* processor (`this`).
|
|
1054
|
-
*
|
|
1055
|
-
* > **Note**: plugins are called when the processor is *frozen*, not when
|
|
1056
|
-
* > they are applied.
|
|
1057
|
-
*/
|
|
1058
|
-
/**
|
|
1059
|
-
* Tuple of a plugin and its configuration.
|
|
1060
|
-
*
|
|
1061
|
-
* The first item is a plugin, the rest are its parameters.
|
|
1062
|
-
*
|
|
1063
|
-
* @template {Array<unknown>} [TupleParameters=[]]
|
|
1064
|
-
* Arguments passed to the plugin (default: `[]`, the empty tuple).
|
|
1065
|
-
* @template {Node | string | undefined} [Input=undefined]
|
|
1066
|
-
* Value that is expected as input (optional).
|
|
1067
|
-
*
|
|
1068
|
-
* * If the plugin returns a {@linkcode Transformer}, this
|
|
1069
|
-
* should be the node it expects.
|
|
1070
|
-
* * If the plugin sets a {@linkcode Parser}, this should be
|
|
1071
|
-
* `string`.
|
|
1072
|
-
* * If the plugin sets a {@linkcode Compiler}, this should be the
|
|
1073
|
-
* node it expects.
|
|
1074
|
-
* @template [Output=undefined] (optional).
|
|
1075
|
-
* Value that is yielded as output.
|
|
1076
|
-
*
|
|
1077
|
-
* * If the plugin returns a {@linkcode Transformer}, this
|
|
1078
|
-
* should be the node that that yields.
|
|
1079
|
-
* * If the plugin sets a {@linkcode Parser}, this should be the
|
|
1080
|
-
* node that it yields.
|
|
1081
|
-
* * If the plugin sets a {@linkcode Compiler}, this should be
|
|
1082
|
-
* result it yields.
|
|
1083
|
-
* @typedef {(
|
|
1084
|
-
* [
|
|
1085
|
-
* plugin: Plugin<TupleParameters, Input, Output>,
|
|
1086
|
-
* ...parameters: TupleParameters
|
|
1087
|
-
* ]
|
|
1088
|
-
* )} PluginTuple
|
|
1089
|
-
*/
|
|
1090
|
-
/**
|
|
1091
|
-
* @typedef Preset
|
|
1092
|
-
* Sharable configuration.
|
|
1093
|
-
*
|
|
1094
|
-
* They can contain plugins and settings.
|
|
1095
|
-
* @property {PluggableList | undefined} [plugins]
|
|
1096
|
-
* List of plugins and presets (optional).
|
|
1097
|
-
* @property {Settings | undefined} [settings]
|
|
1098
|
-
* Shared settings for parsers and compilers (optional).
|
|
1099
|
-
*/
|
|
1100
|
-
/**
|
|
1101
|
-
* @template {VFile} [File=VFile]
|
|
1102
|
-
* The file that the callback receives (default: `VFile`).
|
|
1103
|
-
* @callback ProcessCallback
|
|
1104
|
-
* Callback called when the process is done.
|
|
1105
|
-
*
|
|
1106
|
-
* Called with either an error or a result.
|
|
1107
|
-
* @param {Error | undefined} [error]
|
|
1108
|
-
* Fatal error (optional).
|
|
1109
|
-
* @param {File | undefined} [file]
|
|
1110
|
-
* Processed file (optional).
|
|
1111
|
-
* @returns {undefined}
|
|
1112
|
-
* Nothing.
|
|
1113
|
-
*/
|
|
1114
|
-
/**
|
|
1115
|
-
* @template {Node} [Tree=Node]
|
|
1116
|
-
* The tree that the callback receives (default: `Node`).
|
|
1117
|
-
* @callback RunCallback
|
|
1118
|
-
* Callback called when transformers are done.
|
|
1119
|
-
*
|
|
1120
|
-
* Called with either an error or results.
|
|
1121
|
-
* @param {Error | undefined} [error]
|
|
1122
|
-
* Fatal error (optional).
|
|
1123
|
-
* @param {Tree | undefined} [tree]
|
|
1124
|
-
* Transformed tree (optional).
|
|
1125
|
-
* @param {VFile | undefined} [file]
|
|
1126
|
-
* File (optional).
|
|
1127
|
-
* @returns {undefined}
|
|
1128
|
-
* Nothing.
|
|
1129
|
-
*/
|
|
1130
|
-
/**
|
|
1131
|
-
* @template {Node} [Output=Node]
|
|
1132
|
-
* Node type that the transformer yields (default: `Node`).
|
|
1133
|
-
* @callback TransformCallback
|
|
1134
|
-
* Callback passed to transforms.
|
|
1135
|
-
*
|
|
1136
|
-
* If the signature of a `transformer` accepts a third argument, the
|
|
1137
|
-
* transformer may perform asynchronous operations, and must call it.
|
|
1138
|
-
* @param {Error | undefined} [error]
|
|
1139
|
-
* Fatal error to stop the process (optional).
|
|
1140
|
-
* @param {Output | undefined} [tree]
|
|
1141
|
-
* New, changed, tree (optional).
|
|
1142
|
-
* @param {VFile | undefined} [file]
|
|
1143
|
-
* New, changed, file (optional).
|
|
1144
|
-
* @returns {undefined}
|
|
1145
|
-
* Nothing.
|
|
1146
|
-
*/
|
|
1147
|
-
/**
|
|
1148
|
-
* @template {Node} [Input=Node]
|
|
1149
|
-
* Node type that the transformer expects (default: `Node`).
|
|
1150
|
-
* @template {Node} [Output=Input]
|
|
1151
|
-
* Node type that the transformer yields (default: `Input`).
|
|
1152
|
-
* @callback Transformer
|
|
1153
|
-
* Transformers handle syntax trees and files.
|
|
1154
|
-
*
|
|
1155
|
-
* They are functions that are called each time a syntax tree and file are
|
|
1156
|
-
* passed through the run phase.
|
|
1157
|
-
* When an error occurs in them (either because it’s thrown, returned,
|
|
1158
|
-
* rejected, or passed to `next`), the process stops.
|
|
1159
|
-
*
|
|
1160
|
-
* The run phase is handled by [`trough`][trough], see its documentation for
|
|
1161
|
-
* the exact semantics of these functions.
|
|
1162
|
-
*
|
|
1163
|
-
* > **Note**: you should likely ignore `next`: don’t accept it.
|
|
1164
|
-
* > it supports callback-style async work.
|
|
1165
|
-
* > But promises are likely easier to reason about.
|
|
1166
|
-
*
|
|
1167
|
-
* [trough]: https://github.com/wooorm/trough#function-fninput-next
|
|
1168
|
-
* @param {Input} tree
|
|
1169
|
-
* Tree to handle.
|
|
1170
|
-
* @param {VFile} file
|
|
1171
|
-
* File to handle.
|
|
1172
|
-
* @param {TransformCallback<Output>} next
|
|
1173
|
-
* Callback.
|
|
1174
|
-
* @returns {(
|
|
1175
|
-
* Promise<Output | undefined | void> |
|
|
1176
|
-
* Promise<never> | // For some reason this is needed separately.
|
|
1177
|
-
* Output |
|
|
1178
|
-
* Error |
|
|
1179
|
-
* undefined |
|
|
1180
|
-
* void
|
|
1181
|
-
* )}
|
|
1182
|
-
* If you accept `next`, nothing.
|
|
1183
|
-
* Otherwise:
|
|
1184
|
-
*
|
|
1185
|
-
* * `Error` — fatal error to stop the process
|
|
1186
|
-
* * `Promise<undefined>` or `undefined` — the next transformer keeps using
|
|
1187
|
-
* same tree
|
|
1188
|
-
* * `Promise<Node>` or `Node` — new, changed, tree
|
|
1189
|
-
*/
|
|
1190
|
-
/**
|
|
1191
|
-
* @template {Node | undefined} ParseTree
|
|
1192
|
-
* Output of `parse`.
|
|
1193
|
-
* @template {Node | undefined} HeadTree
|
|
1194
|
-
* Input for `run`.
|
|
1195
|
-
* @template {Node | undefined} TailTree
|
|
1196
|
-
* Output for `run`.
|
|
1197
|
-
* @template {Node | undefined} CompileTree
|
|
1198
|
-
* Input of `stringify`.
|
|
1199
|
-
* @template {CompileResults | undefined} CompileResult
|
|
1200
|
-
* Output of `stringify`.
|
|
1201
|
-
* @template {Node | string | undefined} Input
|
|
1202
|
-
* Input of plugin.
|
|
1203
|
-
* @template Output
|
|
1204
|
-
* Output of plugin (optional).
|
|
1205
|
-
* @typedef {(
|
|
1206
|
-
* Input extends string
|
|
1207
|
-
* ? Output extends Node | undefined
|
|
1208
|
-
* ? // Parser.
|
|
1209
|
-
* Processor<
|
|
1210
|
-
* Output extends undefined ? ParseTree : Output,
|
|
1211
|
-
* HeadTree,
|
|
1212
|
-
* TailTree,
|
|
1213
|
-
* CompileTree,
|
|
1214
|
-
* CompileResult
|
|
1215
|
-
* >
|
|
1216
|
-
* : // Unknown.
|
|
1217
|
-
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
1218
|
-
* : Output extends CompileResults
|
|
1219
|
-
* ? Input extends Node | undefined
|
|
1220
|
-
* ? // Compiler.
|
|
1221
|
-
* Processor<
|
|
1222
|
-
* ParseTree,
|
|
1223
|
-
* HeadTree,
|
|
1224
|
-
* TailTree,
|
|
1225
|
-
* Input extends undefined ? CompileTree : Input,
|
|
1226
|
-
* Output extends undefined ? CompileResult : Output
|
|
1227
|
-
* >
|
|
1228
|
-
* : // Unknown.
|
|
1229
|
-
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
1230
|
-
* : Input extends Node | undefined
|
|
1231
|
-
* ? Output extends Node | undefined
|
|
1232
|
-
* ? // Transform.
|
|
1233
|
-
* Processor<
|
|
1234
|
-
* ParseTree,
|
|
1235
|
-
* HeadTree extends undefined ? Input : HeadTree,
|
|
1236
|
-
* Output extends undefined ? TailTree : Output,
|
|
1237
|
-
* CompileTree,
|
|
1238
|
-
* CompileResult
|
|
1239
|
-
* >
|
|
1240
|
-
* : // Unknown.
|
|
1241
|
-
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
1242
|
-
* : // Unknown.
|
|
1243
|
-
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
1244
|
-
* )} UsePlugin
|
|
1245
|
-
* Create a processor based on the input/output of a {@link Plugin plugin}.
|
|
1246
|
-
*/
|
|
1247
|
-
/**
|
|
1248
|
-
* @template {CompileResults | undefined} Result
|
|
1249
|
-
* Node type that the transformer yields.
|
|
1250
|
-
* @typedef {(
|
|
1251
|
-
* Result extends Value | undefined ?
|
|
1252
|
-
* VFile :
|
|
1253
|
-
* VFile & {result: Result}
|
|
1254
|
-
* )} VFileWithOutput
|
|
1255
|
-
* Type to generate a {@linkcode VFile} corresponding to a compiler result.
|
|
1256
|
-
*
|
|
1257
|
-
* If a result that is not acceptable on a `VFile` is used, that will
|
|
1258
|
-
* be stored on the `result` field of {@linkcode VFile}.
|
|
1259
|
-
*/
|
|
1260
|
-
var own = {}.hasOwnProperty;
|
|
1261
|
-
/**
|
|
1262
|
-
* Create a new processor.
|
|
1263
|
-
*
|
|
1264
|
-
* @example
|
|
1265
|
-
* This example shows how a new processor can be created (from `remark`) and linked
|
|
1266
|
-
* to **stdin**(4) and **stdout**(4).
|
|
1267
|
-
*
|
|
1268
|
-
* ```js
|
|
1269
|
-
* import process from 'node:process'
|
|
1270
|
-
* import concatStream from 'concat-stream'
|
|
1271
|
-
* import {remark} from 'remark'
|
|
1272
|
-
*
|
|
1273
|
-
* process.stdin.pipe(
|
|
1274
|
-
* concatStream(function (buf) {
|
|
1275
|
-
* process.stdout.write(String(remark().processSync(buf)))
|
|
1276
|
-
* })
|
|
1277
|
-
* )
|
|
1278
|
-
* ```
|
|
1279
|
-
*
|
|
1280
|
-
* @returns
|
|
1281
|
-
* New *unfrozen* processor (`processor`).
|
|
1282
|
-
*
|
|
1283
|
-
* This processor is configured to work the same as its ancestor.
|
|
1284
|
-
* When the descendant processor is configured in the future it does not
|
|
1285
|
-
* affect the ancestral processor.
|
|
1286
|
-
*/
|
|
1287
|
-
var unified = new class Processor extends CallableInstance {
|
|
1288
|
-
/**
|
|
1289
|
-
* Create a processor.
|
|
1290
|
-
*/
|
|
1291
|
-
constructor() {
|
|
1292
|
-
super("copy");
|
|
1293
|
-
/**
|
|
1294
|
-
* Compiler to use (deprecated).
|
|
1295
|
-
*
|
|
1296
|
-
* @deprecated
|
|
1297
|
-
* Use `compiler` instead.
|
|
1298
|
-
* @type {(
|
|
1299
|
-
* Compiler<
|
|
1300
|
-
* CompileTree extends undefined ? Node : CompileTree,
|
|
1301
|
-
* CompileResult extends undefined ? CompileResults : CompileResult
|
|
1302
|
-
* > |
|
|
1303
|
-
* undefined
|
|
1304
|
-
* )}
|
|
1305
|
-
*/
|
|
1306
|
-
this.Compiler = void 0;
|
|
1307
|
-
/**
|
|
1308
|
-
* Parser to use (deprecated).
|
|
1309
|
-
*
|
|
1310
|
-
* @deprecated
|
|
1311
|
-
* Use `parser` instead.
|
|
1312
|
-
* @type {(
|
|
1313
|
-
* Parser<ParseTree extends undefined ? Node : ParseTree> |
|
|
1314
|
-
* undefined
|
|
1315
|
-
* )}
|
|
1316
|
-
*/
|
|
1317
|
-
this.Parser = void 0;
|
|
1318
|
-
/**
|
|
1319
|
-
* Internal list of configured plugins.
|
|
1320
|
-
*
|
|
1321
|
-
* @deprecated
|
|
1322
|
-
* This is a private internal property and should not be used.
|
|
1323
|
-
* @type {Array<PluginTuple<Array<unknown>>>}
|
|
1324
|
-
*/
|
|
1325
|
-
this.attachers = [];
|
|
1326
|
-
/**
|
|
1327
|
-
* Compiler to use.
|
|
1328
|
-
*
|
|
1329
|
-
* @type {(
|
|
1330
|
-
* Compiler<
|
|
1331
|
-
* CompileTree extends undefined ? Node : CompileTree,
|
|
1332
|
-
* CompileResult extends undefined ? CompileResults : CompileResult
|
|
1333
|
-
* > |
|
|
1334
|
-
* undefined
|
|
1335
|
-
* )}
|
|
1336
|
-
*/
|
|
1337
|
-
this.compiler = void 0;
|
|
1338
|
-
/**
|
|
1339
|
-
* Internal state to track where we are while freezing.
|
|
1340
|
-
*
|
|
1341
|
-
* @deprecated
|
|
1342
|
-
* This is a private internal property and should not be used.
|
|
1343
|
-
* @type {number}
|
|
1344
|
-
*/
|
|
1345
|
-
this.freezeIndex = -1;
|
|
1346
|
-
/**
|
|
1347
|
-
* Internal state to track whether we’re frozen.
|
|
1348
|
-
*
|
|
1349
|
-
* @deprecated
|
|
1350
|
-
* This is a private internal property and should not be used.
|
|
1351
|
-
* @type {boolean | undefined}
|
|
1352
|
-
*/
|
|
1353
|
-
this.frozen = void 0;
|
|
1354
|
-
/**
|
|
1355
|
-
* Internal state.
|
|
1356
|
-
*
|
|
1357
|
-
* @deprecated
|
|
1358
|
-
* This is a private internal property and should not be used.
|
|
1359
|
-
* @type {Data}
|
|
1360
|
-
*/
|
|
1361
|
-
this.namespace = {};
|
|
1362
|
-
/**
|
|
1363
|
-
* Parser to use.
|
|
1364
|
-
*
|
|
1365
|
-
* @type {(
|
|
1366
|
-
* Parser<ParseTree extends undefined ? Node : ParseTree> |
|
|
1367
|
-
* undefined
|
|
1368
|
-
* )}
|
|
1369
|
-
*/
|
|
1370
|
-
this.parser = void 0;
|
|
1371
|
-
/**
|
|
1372
|
-
* Internal list of configured transformers.
|
|
1373
|
-
*
|
|
1374
|
-
* @deprecated
|
|
1375
|
-
* This is a private internal property and should not be used.
|
|
1376
|
-
* @type {Pipeline}
|
|
1377
|
-
*/
|
|
1378
|
-
this.transformers = trough();
|
|
1379
|
-
}
|
|
1380
|
-
/**
|
|
1381
|
-
* Copy a processor.
|
|
1382
|
-
*
|
|
1383
|
-
* @deprecated
|
|
1384
|
-
* This is a private internal method and should not be used.
|
|
1385
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
1386
|
-
* New *unfrozen* processor ({@linkcode Processor}) that is
|
|
1387
|
-
* configured to work the same as its ancestor.
|
|
1388
|
-
* When the descendant processor is configured in the future it does not
|
|
1389
|
-
* affect the ancestral processor.
|
|
1390
|
-
*/
|
|
1391
|
-
copy() {
|
|
1392
|
-
const destination = new Processor();
|
|
1393
|
-
let index = -1;
|
|
1394
|
-
while (++index < this.attachers.length) {
|
|
1395
|
-
const attacher = this.attachers[index];
|
|
1396
|
-
destination.use(...attacher);
|
|
1397
|
-
}
|
|
1398
|
-
destination.data((0, import_extend.default)(true, {}, this.namespace));
|
|
1399
|
-
return destination;
|
|
1400
|
-
}
|
|
1401
|
-
/**
|
|
1402
|
-
* Configure the processor with info available to all plugins.
|
|
1403
|
-
* Information is stored in an object.
|
|
1404
|
-
*
|
|
1405
|
-
* Typically, options can be given to a specific plugin, but sometimes it
|
|
1406
|
-
* makes sense to have information shared with several plugins.
|
|
1407
|
-
* For example, a list of HTML elements that are self-closing, which is
|
|
1408
|
-
* needed during all phases.
|
|
1409
|
-
*
|
|
1410
|
-
* > **Note**: setting information cannot occur on *frozen* processors.
|
|
1411
|
-
* > Call the processor first to create a new unfrozen processor.
|
|
1412
|
-
*
|
|
1413
|
-
* > **Note**: to register custom data in TypeScript, augment the
|
|
1414
|
-
* > {@linkcode Data} interface.
|
|
1415
|
-
*
|
|
1416
|
-
* @example
|
|
1417
|
-
* This example show how to get and set info:
|
|
1418
|
-
*
|
|
1419
|
-
* ```js
|
|
1420
|
-
* import {unified} from 'unified'
|
|
1421
|
-
*
|
|
1422
|
-
* const processor = unified().data('alpha', 'bravo')
|
|
1423
|
-
*
|
|
1424
|
-
* processor.data('alpha') // => 'bravo'
|
|
1425
|
-
*
|
|
1426
|
-
* processor.data() // => {alpha: 'bravo'}
|
|
1427
|
-
*
|
|
1428
|
-
* processor.data({charlie: 'delta'})
|
|
1429
|
-
*
|
|
1430
|
-
* processor.data() // => {charlie: 'delta'}
|
|
1431
|
-
* ```
|
|
1432
|
-
*
|
|
1433
|
-
* @template {keyof Data} Key
|
|
1434
|
-
*
|
|
1435
|
-
* @overload
|
|
1436
|
-
* @returns {Data}
|
|
1437
|
-
*
|
|
1438
|
-
* @overload
|
|
1439
|
-
* @param {Data} dataset
|
|
1440
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
1441
|
-
*
|
|
1442
|
-
* @overload
|
|
1443
|
-
* @param {Key} key
|
|
1444
|
-
* @returns {Data[Key]}
|
|
1445
|
-
*
|
|
1446
|
-
* @overload
|
|
1447
|
-
* @param {Key} key
|
|
1448
|
-
* @param {Data[Key]} value
|
|
1449
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
1450
|
-
*
|
|
1451
|
-
* @param {Data | Key} [key]
|
|
1452
|
-
* Key to get or set, or entire dataset to set, or nothing to get the
|
|
1453
|
-
* entire dataset (optional).
|
|
1454
|
-
* @param {Data[Key]} [value]
|
|
1455
|
-
* Value to set (optional).
|
|
1456
|
-
* @returns {unknown}
|
|
1457
|
-
* The current processor when setting, the value at `key` when getting, or
|
|
1458
|
-
* the entire dataset when getting without key.
|
|
1459
|
-
*/
|
|
1460
|
-
data(key, value) {
|
|
1461
|
-
if (typeof key === "string") {
|
|
1462
|
-
if (arguments.length === 2) {
|
|
1463
|
-
assertUnfrozen("data", this.frozen);
|
|
1464
|
-
this.namespace[key] = value;
|
|
1465
|
-
return this;
|
|
1466
|
-
}
|
|
1467
|
-
return own.call(this.namespace, key) && this.namespace[key] || void 0;
|
|
1468
|
-
}
|
|
1469
|
-
if (key) {
|
|
1470
|
-
assertUnfrozen("data", this.frozen);
|
|
1471
|
-
this.namespace = key;
|
|
1472
|
-
return this;
|
|
1473
|
-
}
|
|
1474
|
-
return this.namespace;
|
|
1475
|
-
}
|
|
1476
|
-
/**
|
|
1477
|
-
* Freeze a processor.
|
|
1478
|
-
*
|
|
1479
|
-
* Frozen processors are meant to be extended and not to be configured
|
|
1480
|
-
* directly.
|
|
1481
|
-
*
|
|
1482
|
-
* When a processor is frozen it cannot be unfrozen.
|
|
1483
|
-
* New processors working the same way can be created by calling the
|
|
1484
|
-
* processor.
|
|
1485
|
-
*
|
|
1486
|
-
* It’s possible to freeze processors explicitly by calling `.freeze()`.
|
|
1487
|
-
* Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,
|
|
1488
|
-
* `.stringify()`, `.process()`, or `.processSync()` are called.
|
|
1489
|
-
*
|
|
1490
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
1491
|
-
* The current processor.
|
|
1492
|
-
*/
|
|
1493
|
-
freeze() {
|
|
1494
|
-
if (this.frozen) return this;
|
|
1495
|
-
const self = this;
|
|
1496
|
-
while (++this.freezeIndex < this.attachers.length) {
|
|
1497
|
-
const [attacher, ...options] = this.attachers[this.freezeIndex];
|
|
1498
|
-
if (options[0] === false) continue;
|
|
1499
|
-
if (options[0] === true) options[0] = void 0;
|
|
1500
|
-
const transformer = attacher.call(self, ...options);
|
|
1501
|
-
if (typeof transformer === "function") this.transformers.use(transformer);
|
|
1502
|
-
}
|
|
1503
|
-
this.frozen = true;
|
|
1504
|
-
this.freezeIndex = Number.POSITIVE_INFINITY;
|
|
1505
|
-
return this;
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* Parse text to a syntax tree.
|
|
1509
|
-
*
|
|
1510
|
-
* > **Note**: `parse` freezes the processor if not already *frozen*.
|
|
1511
|
-
*
|
|
1512
|
-
* > **Note**: `parse` performs the parse phase, not the run phase or other
|
|
1513
|
-
* > phases.
|
|
1514
|
-
*
|
|
1515
|
-
* @param {Compatible | undefined} [file]
|
|
1516
|
-
* file to parse (optional); typically `string` or `VFile`; any value
|
|
1517
|
-
* accepted as `x` in `new VFile(x)`.
|
|
1518
|
-
* @returns {ParseTree extends undefined ? Node : ParseTree}
|
|
1519
|
-
* Syntax tree representing `file`.
|
|
1520
|
-
*/
|
|
1521
|
-
parse(file) {
|
|
1522
|
-
this.freeze();
|
|
1523
|
-
const realFile = vfile(file);
|
|
1524
|
-
const parser = this.parser || this.Parser;
|
|
1525
|
-
assertParser("parse", parser);
|
|
1526
|
-
return parser(String(realFile), realFile);
|
|
1527
|
-
}
|
|
1528
|
-
/**
|
|
1529
|
-
* Process the given file as configured on the processor.
|
|
1530
|
-
*
|
|
1531
|
-
* > **Note**: `process` freezes the processor if not already *frozen*.
|
|
1532
|
-
*
|
|
1533
|
-
* > **Note**: `process` performs the parse, run, and stringify phases.
|
|
1534
|
-
*
|
|
1535
|
-
* @overload
|
|
1536
|
-
* @param {Compatible | undefined} file
|
|
1537
|
-
* @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
|
|
1538
|
-
* @returns {undefined}
|
|
1539
|
-
*
|
|
1540
|
-
* @overload
|
|
1541
|
-
* @param {Compatible | undefined} [file]
|
|
1542
|
-
* @returns {Promise<VFileWithOutput<CompileResult>>}
|
|
1543
|
-
*
|
|
1544
|
-
* @param {Compatible | undefined} [file]
|
|
1545
|
-
* File (optional); typically `string` or `VFile`]; any value accepted as
|
|
1546
|
-
* `x` in `new VFile(x)`.
|
|
1547
|
-
* @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
|
|
1548
|
-
* Callback (optional).
|
|
1549
|
-
* @returns {Promise<VFile> | undefined}
|
|
1550
|
-
* Nothing if `done` is given.
|
|
1551
|
-
* Otherwise a promise, rejected with a fatal error or resolved with the
|
|
1552
|
-
* processed file.
|
|
1553
|
-
*
|
|
1554
|
-
* The parsed, transformed, and compiled value is available at
|
|
1555
|
-
* `file.value` (see note).
|
|
1556
|
-
*
|
|
1557
|
-
* > **Note**: unified typically compiles by serializing: most
|
|
1558
|
-
* > compilers return `string` (or `Uint8Array`).
|
|
1559
|
-
* > Some compilers, such as the one configured with
|
|
1560
|
-
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
1561
|
-
* > React tree).
|
|
1562
|
-
* > If you’re using a compiler that doesn’t serialize, expect different
|
|
1563
|
-
* > result values.
|
|
1564
|
-
* >
|
|
1565
|
-
* > To register custom results in TypeScript, add them to
|
|
1566
|
-
* > {@linkcode CompileResultMap}.
|
|
1567
|
-
*
|
|
1568
|
-
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1569
|
-
*/
|
|
1570
|
-
process(file, done) {
|
|
1571
|
-
const self = this;
|
|
1572
|
-
this.freeze();
|
|
1573
|
-
assertParser("process", this.parser || this.Parser);
|
|
1574
|
-
assertCompiler("process", this.compiler || this.Compiler);
|
|
1575
|
-
return done ? executor(void 0, done) : new Promise(executor);
|
|
1576
|
-
/**
|
|
1577
|
-
* @param {((file: VFileWithOutput<CompileResult>) => undefined | void) | undefined} resolve
|
|
1578
|
-
* @param {(error: Error | undefined) => undefined | void} reject
|
|
1579
|
-
* @returns {undefined}
|
|
1580
|
-
*/
|
|
1581
|
-
function executor(resolve, reject) {
|
|
1582
|
-
const realFile = vfile(file);
|
|
1583
|
-
const parseTree = self.parse(realFile);
|
|
1584
|
-
self.run(parseTree, realFile, function(error, tree, file) {
|
|
1585
|
-
if (error || !tree || !file) return realDone(error);
|
|
1586
|
-
const compileTree = tree;
|
|
1587
|
-
const compileResult = self.stringify(compileTree, file);
|
|
1588
|
-
if (looksLikeAValue(compileResult)) file.value = compileResult;
|
|
1589
|
-
else file.result = compileResult;
|
|
1590
|
-
realDone(error, file);
|
|
1591
|
-
});
|
|
1592
|
-
/**
|
|
1593
|
-
* @param {Error | undefined} error
|
|
1594
|
-
* @param {VFileWithOutput<CompileResult> | undefined} [file]
|
|
1595
|
-
* @returns {undefined}
|
|
1596
|
-
*/
|
|
1597
|
-
function realDone(error, file) {
|
|
1598
|
-
if (error || !file) reject(error);
|
|
1599
|
-
else if (resolve) resolve(file);
|
|
1600
|
-
else done(void 0, file);
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
/**
|
|
1605
|
-
* Process the given file as configured on the processor.
|
|
1606
|
-
*
|
|
1607
|
-
* An error is thrown if asynchronous transforms are configured.
|
|
1608
|
-
*
|
|
1609
|
-
* > **Note**: `processSync` freezes the processor if not already *frozen*.
|
|
1610
|
-
*
|
|
1611
|
-
* > **Note**: `processSync` performs the parse, run, and stringify phases.
|
|
1612
|
-
*
|
|
1613
|
-
* @param {Compatible | undefined} [file]
|
|
1614
|
-
* File (optional); typically `string` or `VFile`; any value accepted as
|
|
1615
|
-
* `x` in `new VFile(x)`.
|
|
1616
|
-
* @returns {VFileWithOutput<CompileResult>}
|
|
1617
|
-
* The processed file.
|
|
1618
|
-
*
|
|
1619
|
-
* The parsed, transformed, and compiled value is available at
|
|
1620
|
-
* `file.value` (see note).
|
|
1621
|
-
*
|
|
1622
|
-
* > **Note**: unified typically compiles by serializing: most
|
|
1623
|
-
* > compilers return `string` (or `Uint8Array`).
|
|
1624
|
-
* > Some compilers, such as the one configured with
|
|
1625
|
-
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
1626
|
-
* > React tree).
|
|
1627
|
-
* > If you’re using a compiler that doesn’t serialize, expect different
|
|
1628
|
-
* > result values.
|
|
1629
|
-
* >
|
|
1630
|
-
* > To register custom results in TypeScript, add them to
|
|
1631
|
-
* > {@linkcode CompileResultMap}.
|
|
1632
|
-
*
|
|
1633
|
-
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1634
|
-
*/
|
|
1635
|
-
processSync(file) {
|
|
1636
|
-
/** @type {boolean} */
|
|
1637
|
-
let complete = false;
|
|
1638
|
-
/** @type {VFileWithOutput<CompileResult> | undefined} */
|
|
1639
|
-
let result;
|
|
1640
|
-
this.freeze();
|
|
1641
|
-
assertParser("processSync", this.parser || this.Parser);
|
|
1642
|
-
assertCompiler("processSync", this.compiler || this.Compiler);
|
|
1643
|
-
this.process(file, realDone);
|
|
1644
|
-
assertDone("processSync", "process", complete);
|
|
1645
|
-
return result;
|
|
1646
|
-
/**
|
|
1647
|
-
* @type {ProcessCallback<VFileWithOutput<CompileResult>>}
|
|
1648
|
-
*/
|
|
1649
|
-
function realDone(error, file) {
|
|
1650
|
-
complete = true;
|
|
1651
|
-
bail(error);
|
|
1652
|
-
result = file;
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
/**
|
|
1656
|
-
* Run *transformers* on a syntax tree.
|
|
1657
|
-
*
|
|
1658
|
-
* > **Note**: `run` freezes the processor if not already *frozen*.
|
|
1659
|
-
*
|
|
1660
|
-
* > **Note**: `run` performs the run phase, not other phases.
|
|
1661
|
-
*
|
|
1662
|
-
* @overload
|
|
1663
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
1664
|
-
* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
|
|
1665
|
-
* @returns {undefined}
|
|
1666
|
-
*
|
|
1667
|
-
* @overload
|
|
1668
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
1669
|
-
* @param {Compatible | undefined} file
|
|
1670
|
-
* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
|
|
1671
|
-
* @returns {undefined}
|
|
1672
|
-
*
|
|
1673
|
-
* @overload
|
|
1674
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
1675
|
-
* @param {Compatible | undefined} [file]
|
|
1676
|
-
* @returns {Promise<TailTree extends undefined ? Node : TailTree>}
|
|
1677
|
-
*
|
|
1678
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
1679
|
-
* Tree to transform and inspect.
|
|
1680
|
-
* @param {(
|
|
1681
|
-
* RunCallback<TailTree extends undefined ? Node : TailTree> |
|
|
1682
|
-
* Compatible
|
|
1683
|
-
* )} [file]
|
|
1684
|
-
* File associated with `node` (optional); any value accepted as `x` in
|
|
1685
|
-
* `new VFile(x)`.
|
|
1686
|
-
* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
|
|
1687
|
-
* Callback (optional).
|
|
1688
|
-
* @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
|
|
1689
|
-
* Nothing if `done` is given.
|
|
1690
|
-
* Otherwise, a promise rejected with a fatal error or resolved with the
|
|
1691
|
-
* transformed tree.
|
|
1692
|
-
*/
|
|
1693
|
-
run(tree, file, done) {
|
|
1694
|
-
assertNode(tree);
|
|
1695
|
-
this.freeze();
|
|
1696
|
-
const transformers = this.transformers;
|
|
1697
|
-
if (!done && typeof file === "function") {
|
|
1698
|
-
done = file;
|
|
1699
|
-
file = void 0;
|
|
1700
|
-
}
|
|
1701
|
-
return done ? executor(void 0, done) : new Promise(executor);
|
|
1702
|
-
/**
|
|
1703
|
-
* @param {(
|
|
1704
|
-
* ((tree: TailTree extends undefined ? Node : TailTree) => undefined | void) |
|
|
1705
|
-
* undefined
|
|
1706
|
-
* )} resolve
|
|
1707
|
-
* @param {(error: Error) => undefined | void} reject
|
|
1708
|
-
* @returns {undefined}
|
|
1709
|
-
*/
|
|
1710
|
-
function executor(resolve, reject) {
|
|
1711
|
-
const realFile = vfile(file);
|
|
1712
|
-
transformers.run(tree, realFile, realDone);
|
|
1713
|
-
/**
|
|
1714
|
-
* @param {Error | undefined} error
|
|
1715
|
-
* @param {Node} outputTree
|
|
1716
|
-
* @param {VFile} file
|
|
1717
|
-
* @returns {undefined}
|
|
1718
|
-
*/
|
|
1719
|
-
function realDone(error, outputTree, file) {
|
|
1720
|
-
const resultingTree = outputTree || tree;
|
|
1721
|
-
if (error) reject(error);
|
|
1722
|
-
else if (resolve) resolve(resultingTree);
|
|
1723
|
-
else done(void 0, resultingTree, file);
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
/**
|
|
1728
|
-
* Run *transformers* on a syntax tree.
|
|
1729
|
-
*
|
|
1730
|
-
* An error is thrown if asynchronous transforms are configured.
|
|
1731
|
-
*
|
|
1732
|
-
* > **Note**: `runSync` freezes the processor if not already *frozen*.
|
|
1733
|
-
*
|
|
1734
|
-
* > **Note**: `runSync` performs the run phase, not other phases.
|
|
1735
|
-
*
|
|
1736
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
1737
|
-
* Tree to transform and inspect.
|
|
1738
|
-
* @param {Compatible | undefined} [file]
|
|
1739
|
-
* File associated with `node` (optional); any value accepted as `x` in
|
|
1740
|
-
* `new VFile(x)`.
|
|
1741
|
-
* @returns {TailTree extends undefined ? Node : TailTree}
|
|
1742
|
-
* Transformed tree.
|
|
1743
|
-
*/
|
|
1744
|
-
runSync(tree, file) {
|
|
1745
|
-
/** @type {boolean} */
|
|
1746
|
-
let complete = false;
|
|
1747
|
-
/** @type {(TailTree extends undefined ? Node : TailTree) | undefined} */
|
|
1748
|
-
let result;
|
|
1749
|
-
this.run(tree, file, realDone);
|
|
1750
|
-
assertDone("runSync", "run", complete);
|
|
1751
|
-
return result;
|
|
1752
|
-
/**
|
|
1753
|
-
* @type {RunCallback<TailTree extends undefined ? Node : TailTree>}
|
|
1754
|
-
*/
|
|
1755
|
-
function realDone(error, tree) {
|
|
1756
|
-
bail(error);
|
|
1757
|
-
result = tree;
|
|
1758
|
-
complete = true;
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
/**
|
|
1762
|
-
* Compile a syntax tree.
|
|
1763
|
-
*
|
|
1764
|
-
* > **Note**: `stringify` freezes the processor if not already *frozen*.
|
|
1765
|
-
*
|
|
1766
|
-
* > **Note**: `stringify` performs the stringify phase, not the run phase
|
|
1767
|
-
* > or other phases.
|
|
1768
|
-
*
|
|
1769
|
-
* @param {CompileTree extends undefined ? Node : CompileTree} tree
|
|
1770
|
-
* Tree to compile.
|
|
1771
|
-
* @param {Compatible | undefined} [file]
|
|
1772
|
-
* File associated with `node` (optional); any value accepted as `x` in
|
|
1773
|
-
* `new VFile(x)`.
|
|
1774
|
-
* @returns {CompileResult extends undefined ? Value : CompileResult}
|
|
1775
|
-
* Textual representation of the tree (see note).
|
|
1776
|
-
*
|
|
1777
|
-
* > **Note**: unified typically compiles by serializing: most compilers
|
|
1778
|
-
* > return `string` (or `Uint8Array`).
|
|
1779
|
-
* > Some compilers, such as the one configured with
|
|
1780
|
-
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
1781
|
-
* > React tree).
|
|
1782
|
-
* > If you’re using a compiler that doesn’t serialize, expect different
|
|
1783
|
-
* > result values.
|
|
1784
|
-
* >
|
|
1785
|
-
* > To register custom results in TypeScript, add them to
|
|
1786
|
-
* > {@linkcode CompileResultMap}.
|
|
1787
|
-
*
|
|
1788
|
-
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1789
|
-
*/
|
|
1790
|
-
stringify(tree, file) {
|
|
1791
|
-
this.freeze();
|
|
1792
|
-
const realFile = vfile(file);
|
|
1793
|
-
const compiler = this.compiler || this.Compiler;
|
|
1794
|
-
assertCompiler("stringify", compiler);
|
|
1795
|
-
assertNode(tree);
|
|
1796
|
-
return compiler(tree, realFile);
|
|
1797
|
-
}
|
|
1798
|
-
/**
|
|
1799
|
-
* Configure the processor to use a plugin, a list of usable values, or a
|
|
1800
|
-
* preset.
|
|
1801
|
-
*
|
|
1802
|
-
* If the processor is already using a plugin, the previous plugin
|
|
1803
|
-
* configuration is changed based on the options that are passed in.
|
|
1804
|
-
* In other words, the plugin is not added a second time.
|
|
1805
|
-
*
|
|
1806
|
-
* > **Note**: `use` cannot be called on *frozen* processors.
|
|
1807
|
-
* > Call the processor first to create a new unfrozen processor.
|
|
1808
|
-
*
|
|
1809
|
-
* @example
|
|
1810
|
-
* There are many ways to pass plugins to `.use()`.
|
|
1811
|
-
* This example gives an overview:
|
|
1812
|
-
*
|
|
1813
|
-
* ```js
|
|
1814
|
-
* import {unified} from 'unified'
|
|
1815
|
-
*
|
|
1816
|
-
* unified()
|
|
1817
|
-
* // Plugin with options:
|
|
1818
|
-
* .use(pluginA, {x: true, y: true})
|
|
1819
|
-
* // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
|
|
1820
|
-
* .use(pluginA, {y: false, z: true})
|
|
1821
|
-
* // Plugins:
|
|
1822
|
-
* .use([pluginB, pluginC])
|
|
1823
|
-
* // Two plugins, the second with options:
|
|
1824
|
-
* .use([pluginD, [pluginE, {}]])
|
|
1825
|
-
* // Preset with plugins and settings:
|
|
1826
|
-
* .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
|
|
1827
|
-
* // Settings only:
|
|
1828
|
-
* .use({settings: {position: false}})
|
|
1829
|
-
* ```
|
|
1830
|
-
*
|
|
1831
|
-
* @template {Array<unknown>} [Parameters=[]]
|
|
1832
|
-
* @template {Node | string | undefined} [Input=undefined]
|
|
1833
|
-
* @template [Output=Input]
|
|
1834
|
-
*
|
|
1835
|
-
* @overload
|
|
1836
|
-
* @param {Preset | null | undefined} [preset]
|
|
1837
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
1838
|
-
*
|
|
1839
|
-
* @overload
|
|
1840
|
-
* @param {PluggableList} list
|
|
1841
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
1842
|
-
*
|
|
1843
|
-
* @overload
|
|
1844
|
-
* @param {Plugin<Parameters, Input, Output>} plugin
|
|
1845
|
-
* @param {...(Parameters | [boolean])} parameters
|
|
1846
|
-
* @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
|
|
1847
|
-
*
|
|
1848
|
-
* @param {PluggableList | Plugin | Preset | null | undefined} value
|
|
1849
|
-
* Usable value.
|
|
1850
|
-
* @param {...unknown} parameters
|
|
1851
|
-
* Parameters, when a plugin is given as a usable value.
|
|
1852
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
1853
|
-
* Current processor.
|
|
1854
|
-
*/
|
|
1855
|
-
use(value, ...parameters) {
|
|
1856
|
-
const attachers = this.attachers;
|
|
1857
|
-
const namespace = this.namespace;
|
|
1858
|
-
assertUnfrozen("use", this.frozen);
|
|
1859
|
-
if (value === null || value === void 0) {} else if (typeof value === "function") addPlugin(value, parameters);
|
|
1860
|
-
else if (typeof value === "object") if (Array.isArray(value)) addList(value);
|
|
1861
|
-
else addPreset(value);
|
|
1862
|
-
else throw new TypeError("Expected usable value, not `" + value + "`");
|
|
1863
|
-
return this;
|
|
1864
|
-
/**
|
|
1865
|
-
* @param {Pluggable} value
|
|
1866
|
-
* @returns {undefined}
|
|
1867
|
-
*/
|
|
1868
|
-
function add(value) {
|
|
1869
|
-
if (typeof value === "function") addPlugin(value, []);
|
|
1870
|
-
else if (typeof value === "object") if (Array.isArray(value)) {
|
|
1871
|
-
const [plugin, ...parameters] = value;
|
|
1872
|
-
addPlugin(plugin, parameters);
|
|
1873
|
-
} else addPreset(value);
|
|
1874
|
-
else throw new TypeError("Expected usable value, not `" + value + "`");
|
|
1875
|
-
}
|
|
1876
|
-
/**
|
|
1877
|
-
* @param {Preset} result
|
|
1878
|
-
* @returns {undefined}
|
|
1879
|
-
*/
|
|
1880
|
-
function addPreset(result) {
|
|
1881
|
-
if (!("plugins" in result) && !("settings" in result)) throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");
|
|
1882
|
-
addList(result.plugins);
|
|
1883
|
-
if (result.settings) namespace.settings = (0, import_extend.default)(true, namespace.settings, result.settings);
|
|
1884
|
-
}
|
|
1885
|
-
/**
|
|
1886
|
-
* @param {PluggableList | null | undefined} plugins
|
|
1887
|
-
* @returns {undefined}
|
|
1888
|
-
*/
|
|
1889
|
-
function addList(plugins) {
|
|
1890
|
-
let index = -1;
|
|
1891
|
-
if (plugins === null || plugins === void 0) {} else if (Array.isArray(plugins)) while (++index < plugins.length) {
|
|
1892
|
-
const thing = plugins[index];
|
|
1893
|
-
add(thing);
|
|
1894
|
-
}
|
|
1895
|
-
else throw new TypeError("Expected a list of plugins, not `" + plugins + "`");
|
|
1896
|
-
}
|
|
1897
|
-
/**
|
|
1898
|
-
* @param {Plugin} plugin
|
|
1899
|
-
* @param {Array<unknown>} parameters
|
|
1900
|
-
* @returns {undefined}
|
|
1901
|
-
*/
|
|
1902
|
-
function addPlugin(plugin, parameters) {
|
|
1903
|
-
let index = -1;
|
|
1904
|
-
let entryIndex = -1;
|
|
1905
|
-
while (++index < attachers.length) if (attachers[index][0] === plugin) {
|
|
1906
|
-
entryIndex = index;
|
|
1907
|
-
break;
|
|
1908
|
-
}
|
|
1909
|
-
if (entryIndex === -1) attachers.push([plugin, ...parameters]);
|
|
1910
|
-
else if (parameters.length > 0) {
|
|
1911
|
-
let [primary, ...rest] = parameters;
|
|
1912
|
-
const currentPrimary = attachers[entryIndex][1];
|
|
1913
|
-
if (isPlainObject(currentPrimary) && isPlainObject(primary)) primary = (0, import_extend.default)(true, currentPrimary, primary);
|
|
1914
|
-
attachers[entryIndex] = [
|
|
1915
|
-
plugin,
|
|
1916
|
-
primary,
|
|
1917
|
-
...rest
|
|
1918
|
-
];
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
}().freeze();
|
|
1923
|
-
/**
|
|
1924
|
-
* Assert a parser is available.
|
|
1925
|
-
*
|
|
1926
|
-
* @param {string} name
|
|
1927
|
-
* @param {unknown} value
|
|
1928
|
-
* @returns {asserts value is Parser}
|
|
1929
|
-
*/
|
|
1930
|
-
function assertParser(name, value) {
|
|
1931
|
-
if (typeof value !== "function") throw new TypeError("Cannot `" + name + "` without `parser`");
|
|
1932
|
-
}
|
|
1933
|
-
/**
|
|
1934
|
-
* Assert a compiler is available.
|
|
1935
|
-
*
|
|
1936
|
-
* @param {string} name
|
|
1937
|
-
* @param {unknown} value
|
|
1938
|
-
* @returns {asserts value is Compiler}
|
|
1939
|
-
*/
|
|
1940
|
-
function assertCompiler(name, value) {
|
|
1941
|
-
if (typeof value !== "function") throw new TypeError("Cannot `" + name + "` without `compiler`");
|
|
1942
|
-
}
|
|
1943
|
-
/**
|
|
1944
|
-
* Assert the processor is not frozen.
|
|
1945
|
-
*
|
|
1946
|
-
* @param {string} name
|
|
1947
|
-
* @param {unknown} frozen
|
|
1948
|
-
* @returns {asserts frozen is false}
|
|
1949
|
-
*/
|
|
1950
|
-
function assertUnfrozen(name, frozen) {
|
|
1951
|
-
if (frozen) throw new Error("Cannot call `" + name + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.");
|
|
1952
|
-
}
|
|
1953
|
-
/**
|
|
1954
|
-
* Assert `node` is a unist node.
|
|
1955
|
-
*
|
|
1956
|
-
* @param {unknown} node
|
|
1957
|
-
* @returns {asserts node is Node}
|
|
1958
|
-
*/
|
|
1959
|
-
function assertNode(node) {
|
|
1960
|
-
if (!isPlainObject(node) || typeof node.type !== "string") throw new TypeError("Expected node, got `" + node + "`");
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Assert that `complete` is `true`.
|
|
1964
|
-
*
|
|
1965
|
-
* @param {string} name
|
|
1966
|
-
* @param {string} asyncName
|
|
1967
|
-
* @param {unknown} complete
|
|
1968
|
-
* @returns {asserts complete is true}
|
|
1969
|
-
*/
|
|
1970
|
-
function assertDone(name, asyncName, complete) {
|
|
1971
|
-
if (!complete) throw new Error("`" + name + "` finished async. Use `" + asyncName + "` instead");
|
|
1972
|
-
}
|
|
1973
|
-
/**
|
|
1974
|
-
* @param {Compatible | undefined} [value]
|
|
1975
|
-
* @returns {VFile}
|
|
1976
|
-
*/
|
|
1977
|
-
function vfile(value) {
|
|
1978
|
-
return looksLikeAVFile(value) ? value : new VFile(value);
|
|
1979
|
-
}
|
|
1980
|
-
/**
|
|
1981
|
-
* @param {Compatible | undefined} [value]
|
|
1982
|
-
* @returns {value is VFile}
|
|
1983
|
-
*/
|
|
1984
|
-
function looksLikeAVFile(value) {
|
|
1985
|
-
return Boolean(value && typeof value === "object" && "message" in value && "messages" in value);
|
|
1986
|
-
}
|
|
1987
|
-
/**
|
|
1988
|
-
* @param {unknown} [value]
|
|
1989
|
-
* @returns {value is Value}
|
|
1990
|
-
*/
|
|
1991
|
-
function looksLikeAValue(value) {
|
|
1992
|
-
return typeof value === "string" || isUint8Array(value);
|
|
1993
|
-
}
|
|
1994
|
-
/**
|
|
1995
|
-
* Assert `value` is an `Uint8Array`.
|
|
1996
|
-
*
|
|
1997
|
-
* @param {unknown} value
|
|
1998
|
-
* thing.
|
|
1999
|
-
* @returns {value is Uint8Array}
|
|
2000
|
-
* Whether `value` is an `Uint8Array`.
|
|
2001
|
-
*/
|
|
2002
|
-
function isUint8Array(value) {
|
|
2003
|
-
return Boolean(value && typeof value === "object" && "byteLength" in value && "byteOffset" in value);
|
|
2004
|
-
}
|
|
2005
|
-
//#endregion
|
|
2006
|
-
//#region node_modules/.pnpm/react-markdown@10.1.0_@types+react@19.2.14_react@19.2.5/node_modules/react-markdown/lib/index.js
|
|
2007
|
-
/**
|
|
2008
|
-
* @import {Element, Nodes, Parents, Root} from 'hast'
|
|
2009
|
-
* @import {Root as MdastRoot} from 'mdast'
|
|
2010
|
-
* @import {ComponentType, JSX, ReactElement, ReactNode} from 'react'
|
|
2011
|
-
* @import {Options as RemarkRehypeOptions} from 'remark-rehype'
|
|
2012
|
-
* @import {BuildVisitor} from 'unist-util-visit'
|
|
2013
|
-
* @import {PluggableList, Processor} from 'unified'
|
|
2014
|
-
*/
|
|
2015
|
-
/**
|
|
2016
|
-
* @callback AllowElement
|
|
2017
|
-
* Filter elements.
|
|
2018
|
-
* @param {Readonly<Element>} element
|
|
2019
|
-
* Element to check.
|
|
2020
|
-
* @param {number} index
|
|
2021
|
-
* Index of `element` in `parent`.
|
|
2022
|
-
* @param {Readonly<Parents> | undefined} parent
|
|
2023
|
-
* Parent of `element`.
|
|
2024
|
-
* @returns {boolean | null | undefined}
|
|
2025
|
-
* Whether to allow `element` (default: `false`).
|
|
2026
|
-
*/
|
|
2027
|
-
/**
|
|
2028
|
-
* @typedef ExtraProps
|
|
2029
|
-
* Extra fields we pass.
|
|
2030
|
-
* @property {Element | undefined} [node]
|
|
2031
|
-
* passed when `passNode` is on.
|
|
2032
|
-
*/
|
|
2033
|
-
/**
|
|
2034
|
-
* @typedef {{
|
|
2035
|
-
* [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key] & ExtraProps> | keyof JSX.IntrinsicElements
|
|
2036
|
-
* }} Components
|
|
2037
|
-
* Map tag names to components.
|
|
2038
|
-
*/
|
|
2039
|
-
/**
|
|
2040
|
-
* @typedef Deprecation
|
|
2041
|
-
* Deprecation.
|
|
2042
|
-
* @property {string} from
|
|
2043
|
-
* Old field.
|
|
2044
|
-
* @property {string} id
|
|
2045
|
-
* ID in readme.
|
|
2046
|
-
* @property {keyof Options} [to]
|
|
2047
|
-
* New field.
|
|
2048
|
-
*/
|
|
2049
|
-
/**
|
|
2050
|
-
* @typedef Options
|
|
2051
|
-
* Configuration.
|
|
2052
|
-
* @property {AllowElement | null | undefined} [allowElement]
|
|
2053
|
-
* Filter elements (optional);
|
|
2054
|
-
* `allowedElements` / `disallowedElements` is used first.
|
|
2055
|
-
* @property {ReadonlyArray<string> | null | undefined} [allowedElements]
|
|
2056
|
-
* Tag names to allow (default: all tag names);
|
|
2057
|
-
* cannot combine w/ `disallowedElements`.
|
|
2058
|
-
* @property {string | null | undefined} [children]
|
|
2059
|
-
* Markdown.
|
|
2060
|
-
* @property {Components | null | undefined} [components]
|
|
2061
|
-
* Map tag names to components.
|
|
2062
|
-
* @property {ReadonlyArray<string> | null | undefined} [disallowedElements]
|
|
2063
|
-
* Tag names to disallow (default: `[]`);
|
|
2064
|
-
* cannot combine w/ `allowedElements`.
|
|
2065
|
-
* @property {PluggableList | null | undefined} [rehypePlugins]
|
|
2066
|
-
* List of rehype plugins to use.
|
|
2067
|
-
* @property {PluggableList | null | undefined} [remarkPlugins]
|
|
2068
|
-
* List of remark plugins to use.
|
|
2069
|
-
* @property {Readonly<RemarkRehypeOptions> | null | undefined} [remarkRehypeOptions]
|
|
2070
|
-
* Options to pass through to `remark-rehype`.
|
|
2071
|
-
* @property {boolean | null | undefined} [skipHtml=false]
|
|
2072
|
-
* Ignore HTML in markdown completely (default: `false`).
|
|
2073
|
-
* @property {boolean | null | undefined} [unwrapDisallowed=false]
|
|
2074
|
-
* Extract (unwrap) what’s in disallowed elements (default: `false`);
|
|
2075
|
-
* normally when say `strong` is not allowed, it and it’s children are dropped,
|
|
2076
|
-
* with `unwrapDisallowed` the element itself is replaced by its children.
|
|
2077
|
-
* @property {UrlTransform | null | undefined} [urlTransform]
|
|
2078
|
-
* Change URLs (default: `defaultUrlTransform`)
|
|
2079
|
-
*/
|
|
2080
|
-
/**
|
|
2081
|
-
* @typedef HooksOptionsOnly
|
|
2082
|
-
* Configuration specifically for {@linkcode MarkdownHooks}.
|
|
2083
|
-
* @property {ReactNode | null | undefined} [fallback]
|
|
2084
|
-
* Content to render while the processor processing the markdown (optional).
|
|
2085
|
-
*/
|
|
2086
|
-
/**
|
|
2087
|
-
* @typedef {Options & HooksOptionsOnly} HooksOptions
|
|
2088
|
-
* Configuration for {@linkcode MarkdownHooks};
|
|
2089
|
-
* extends the regular {@linkcode Options} with a `fallback` prop.
|
|
2090
|
-
*/
|
|
2091
|
-
/**
|
|
2092
|
-
* @callback UrlTransform
|
|
2093
|
-
* Transform all URLs.
|
|
2094
|
-
* @param {string} url
|
|
2095
|
-
* URL.
|
|
2096
|
-
* @param {string} key
|
|
2097
|
-
* Property name (example: `'href'`).
|
|
2098
|
-
* @param {Readonly<Element>} node
|
|
2099
|
-
* Node.
|
|
2100
|
-
* @returns {string | null | undefined}
|
|
2101
|
-
* Transformed URL (optional).
|
|
2102
|
-
*/
|
|
2103
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
2104
|
-
require_react();
|
|
2105
|
-
/** @type {PluggableList} */
|
|
2106
|
-
var emptyPlugins = [];
|
|
2107
|
-
/** @type {Readonly<RemarkRehypeOptions>} */
|
|
2108
|
-
var emptyRemarkRehypeOptions = { allowDangerousHtml: true };
|
|
2109
|
-
var safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i;
|
|
2110
|
-
/** @type {ReadonlyArray<Readonly<Deprecation>>} */
|
|
2111
|
-
var deprecations = [
|
|
2112
|
-
{
|
|
2113
|
-
from: "astPlugins",
|
|
2114
|
-
id: "remove-buggy-html-in-markdown-parser"
|
|
2115
|
-
},
|
|
2116
|
-
{
|
|
2117
|
-
from: "allowDangerousHtml",
|
|
2118
|
-
id: "remove-buggy-html-in-markdown-parser"
|
|
2119
|
-
},
|
|
2120
|
-
{
|
|
2121
|
-
from: "allowNode",
|
|
2122
|
-
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
2123
|
-
to: "allowElement"
|
|
2124
|
-
},
|
|
2125
|
-
{
|
|
2126
|
-
from: "allowedTypes",
|
|
2127
|
-
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
2128
|
-
to: "allowedElements"
|
|
2129
|
-
},
|
|
2130
|
-
{
|
|
2131
|
-
from: "className",
|
|
2132
|
-
id: "remove-classname"
|
|
2133
|
-
},
|
|
2134
|
-
{
|
|
2135
|
-
from: "disallowedTypes",
|
|
2136
|
-
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
2137
|
-
to: "disallowedElements"
|
|
2138
|
-
},
|
|
2139
|
-
{
|
|
2140
|
-
from: "escapeHtml",
|
|
2141
|
-
id: "remove-buggy-html-in-markdown-parser"
|
|
2142
|
-
},
|
|
2143
|
-
{
|
|
2144
|
-
from: "includeElementIndex",
|
|
2145
|
-
id: "#remove-includeelementindex"
|
|
2146
|
-
},
|
|
2147
|
-
{
|
|
2148
|
-
from: "includeNodeIndex",
|
|
2149
|
-
id: "change-includenodeindex-to-includeelementindex"
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
from: "linkTarget",
|
|
2153
|
-
id: "remove-linktarget"
|
|
2154
|
-
},
|
|
2155
|
-
{
|
|
2156
|
-
from: "plugins",
|
|
2157
|
-
id: "change-plugins-to-remarkplugins",
|
|
2158
|
-
to: "remarkPlugins"
|
|
2159
|
-
},
|
|
2160
|
-
{
|
|
2161
|
-
from: "rawSourcePos",
|
|
2162
|
-
id: "#remove-rawsourcepos"
|
|
2163
|
-
},
|
|
2164
|
-
{
|
|
2165
|
-
from: "renderers",
|
|
2166
|
-
id: "change-renderers-to-components",
|
|
2167
|
-
to: "components"
|
|
2168
|
-
},
|
|
2169
|
-
{
|
|
2170
|
-
from: "source",
|
|
2171
|
-
id: "change-source-to-children",
|
|
2172
|
-
to: "children"
|
|
2173
|
-
},
|
|
2174
|
-
{
|
|
2175
|
-
from: "sourcePos",
|
|
2176
|
-
id: "#remove-sourcepos"
|
|
2177
|
-
},
|
|
2178
|
-
{
|
|
2179
|
-
from: "transformImageUri",
|
|
2180
|
-
id: "#add-urltransform",
|
|
2181
|
-
to: "urlTransform"
|
|
2182
|
-
},
|
|
2183
|
-
{
|
|
2184
|
-
from: "transformLinkUri",
|
|
2185
|
-
id: "#add-urltransform",
|
|
2186
|
-
to: "urlTransform"
|
|
2187
|
-
}
|
|
2188
|
-
];
|
|
2189
|
-
/**
|
|
2190
|
-
* Component to render markdown.
|
|
2191
|
-
*
|
|
2192
|
-
* This is a synchronous component.
|
|
2193
|
-
* When using async plugins,
|
|
2194
|
-
* see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.
|
|
2195
|
-
*
|
|
2196
|
-
* @param {Readonly<Options>} options
|
|
2197
|
-
* Props.
|
|
2198
|
-
* @returns {ReactElement}
|
|
2199
|
-
* React element.
|
|
2200
|
-
*/
|
|
2201
|
-
function Markdown(options) {
|
|
2202
|
-
const processor = createProcessor(options);
|
|
2203
|
-
const file = createFile(options);
|
|
2204
|
-
return post(processor.runSync(processor.parse(file), file), options);
|
|
2205
|
-
}
|
|
2206
|
-
/**
|
|
2207
|
-
* Set up the `unified` processor.
|
|
2208
|
-
*
|
|
2209
|
-
* @param {Readonly<Options>} options
|
|
2210
|
-
* Props.
|
|
2211
|
-
* @returns {Processor<MdastRoot, MdastRoot, Root, undefined, undefined>}
|
|
2212
|
-
* Result.
|
|
2213
|
-
*/
|
|
2214
|
-
function createProcessor(options) {
|
|
2215
|
-
const rehypePlugins = options.rehypePlugins || emptyPlugins;
|
|
2216
|
-
const remarkPlugins = options.remarkPlugins || emptyPlugins;
|
|
2217
|
-
const remarkRehypeOptions = options.remarkRehypeOptions ? {
|
|
2218
|
-
...options.remarkRehypeOptions,
|
|
2219
|
-
...emptyRemarkRehypeOptions
|
|
2220
|
-
} : emptyRemarkRehypeOptions;
|
|
2221
|
-
return unified().use(remarkParse).use(remarkPlugins).use(remarkRehype, remarkRehypeOptions).use(rehypePlugins);
|
|
2222
|
-
}
|
|
2223
|
-
/**
|
|
2224
|
-
* Set up the virtual file.
|
|
2225
|
-
*
|
|
2226
|
-
* @param {Readonly<Options>} options
|
|
2227
|
-
* Props.
|
|
2228
|
-
* @returns {VFile}
|
|
2229
|
-
* Result.
|
|
2230
|
-
*/
|
|
2231
|
-
function createFile(options) {
|
|
2232
|
-
const children = options.children || "";
|
|
2233
|
-
const file = new VFile();
|
|
2234
|
-
if (typeof children === "string") file.value = children;
|
|
2235
|
-
else "" + children;
|
|
2236
|
-
return file;
|
|
2237
|
-
}
|
|
2238
|
-
/**
|
|
2239
|
-
* Process the result from unified some more.
|
|
2240
|
-
*
|
|
2241
|
-
* @param {Nodes} tree
|
|
2242
|
-
* Tree.
|
|
2243
|
-
* @param {Readonly<Options>} options
|
|
2244
|
-
* Props.
|
|
2245
|
-
* @returns {ReactElement}
|
|
2246
|
-
* React element.
|
|
2247
|
-
*/
|
|
2248
|
-
function post(tree, options) {
|
|
2249
|
-
const allowedElements = options.allowedElements;
|
|
2250
|
-
const allowElement = options.allowElement;
|
|
2251
|
-
const components = options.components;
|
|
2252
|
-
const disallowedElements = options.disallowedElements;
|
|
2253
|
-
const skipHtml = options.skipHtml;
|
|
2254
|
-
const unwrapDisallowed = options.unwrapDisallowed;
|
|
2255
|
-
const urlTransform = options.urlTransform || defaultUrlTransform;
|
|
2256
|
-
for (const deprecation of deprecations) if (Object.hasOwn(options, deprecation.from)) "" + deprecation.from + (deprecation.to ? "use `" + deprecation.to + "` instead" : "remove it") + deprecation.id;
|
|
2257
|
-
if (allowedElements && disallowedElements);
|
|
2258
|
-
visit(tree, transform);
|
|
2259
|
-
return toJsxRuntime(tree, {
|
|
2260
|
-
Fragment: import_jsx_runtime.Fragment,
|
|
2261
|
-
components,
|
|
2262
|
-
ignoreInvalidStyle: true,
|
|
2263
|
-
jsx: import_jsx_runtime.jsx,
|
|
2264
|
-
jsxs: import_jsx_runtime.jsxs,
|
|
2265
|
-
passKeys: true,
|
|
2266
|
-
passNode: true
|
|
2267
|
-
});
|
|
2268
|
-
/** @type {BuildVisitor<Root>} */
|
|
2269
|
-
function transform(node, index, parent) {
|
|
2270
|
-
if (node.type === "raw" && parent && typeof index === "number") {
|
|
2271
|
-
if (skipHtml) parent.children.splice(index, 1);
|
|
2272
|
-
else parent.children[index] = {
|
|
2273
|
-
type: "text",
|
|
2274
|
-
value: node.value
|
|
2275
|
-
};
|
|
2276
|
-
return index;
|
|
2277
|
-
}
|
|
2278
|
-
if (node.type === "element") {
|
|
2279
|
-
/** @type {string} */
|
|
2280
|
-
let key;
|
|
2281
|
-
for (key in urlAttributes) if (Object.hasOwn(urlAttributes, key) && Object.hasOwn(node.properties, key)) {
|
|
2282
|
-
const value = node.properties[key];
|
|
2283
|
-
const test = urlAttributes[key];
|
|
2284
|
-
if (test === null || test.includes(node.tagName)) node.properties[key] = urlTransform(String(value || ""), key, node);
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
if (node.type === "element") {
|
|
2288
|
-
let remove = allowedElements ? !allowedElements.includes(node.tagName) : disallowedElements ? disallowedElements.includes(node.tagName) : false;
|
|
2289
|
-
if (!remove && allowElement && typeof index === "number") remove = !allowElement(node, index, parent);
|
|
2290
|
-
if (remove && parent && typeof index === "number") {
|
|
2291
|
-
if (unwrapDisallowed && node.children) parent.children.splice(index, 1, ...node.children);
|
|
2292
|
-
else parent.children.splice(index, 1);
|
|
2293
|
-
return index;
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
}
|
|
2298
|
-
/**
|
|
2299
|
-
* Make a URL safe.
|
|
2300
|
-
*
|
|
2301
|
-
* @satisfies {UrlTransform}
|
|
2302
|
-
* @param {string} value
|
|
2303
|
-
* URL.
|
|
2304
|
-
* @returns {string}
|
|
2305
|
-
* Safe URL.
|
|
2306
|
-
*/
|
|
2307
|
-
function defaultUrlTransform(value) {
|
|
2308
|
-
const colon = value.indexOf(":");
|
|
2309
|
-
const questionMark = value.indexOf("?");
|
|
2310
|
-
const numberSign = value.indexOf("#");
|
|
2311
|
-
const slash = value.indexOf("/");
|
|
2312
|
-
if (colon === -1 || slash !== -1 && colon > slash || questionMark !== -1 && colon > questionMark || numberSign !== -1 && colon > numberSign || safeProtocol.test(value.slice(0, colon))) return value;
|
|
2313
|
-
return "";
|
|
2314
|
-
}
|
|
2315
|
-
//#endregion
|
|
2316
|
-
export { Markdown as t };
|