@qwik.dev/devtools 0.3.0-beta.3 → 2.0.0-beta.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kit/index.d.mts +3 -3
- package/dist/kit/index.mjs +0 -1
- package/dist/ui/_virtual/_@oxc-project_runtime@0.144.0/helpers/esm/defineProperty.qwik.mjs +10 -0
- package/dist/ui/_virtual/_@oxc-project_runtime@0.144.0/helpers/esm/toPrimitive.qwik.mjs +12 -0
- package/dist/ui/_virtual/_@oxc-project_runtime@0.144.0/helpers/esm/toPropertyKey.qwik.mjs +7 -0
- package/dist/ui/_virtual/_@oxc-project_runtime@0.144.0/helpers/esm/typeof.qwik.mjs +9 -0
- package/dist/ui/_virtual/_rolldown/runtime.qwik.mjs +31 -0
- package/dist/ui/bundle-graph-CoI___e1.json +1 -0
- package/dist/ui/entry.extension.qwik.mjs +13 -14
- package/dist/ui/index.qwik.mjs +2 -5
- package/dist/ui/lib-types/ui/src/features/RenderTree/types.d.ts +1 -1
- package/dist/ui/node_modules/.pnpm/@shikijs_core@4.0.2/node_modules/@shikijs/core/dist/index.qwik.mjs +1058 -1035
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/index.qwik.mjs +360 -408
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/abap.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/actionscript-3.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ada.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-expression.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-html.qwik.mjs +14 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-style.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-template.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-let-declaration.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template-blocks.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-ts.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apache.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apex.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apl.qwik.mjs +14 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/applescript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ara.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asciidoc.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asm.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/astro.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/awk.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ballerina.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bat.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/beancount.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/berry.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bibtex.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bicep.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bird2.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/blade.qwik.mjs +18 -20
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bsl.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c3.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cadence.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cairo.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clarity.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clojure.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cmake.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cobol.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeowners.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeql.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coffee.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/common-lisp.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coq.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp-macro.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/crystal.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csharp.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/css.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csv.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cue.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cypher.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/d.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dart.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dax.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/desktop.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/diff.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/docker.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dotenv.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dream-maker.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/edge.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elixir.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elm.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/emacs-lisp.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erb.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erlang.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-css.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-glsl.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-html.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-sql.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-xml.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fennel.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fish.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fluent.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-fixed-form.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-free-form.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fsharp.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdresource.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdscript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdshader.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/genie.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gherkin.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-commit.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-rebase.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gleam.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-js.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-ts.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glsl.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gn.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gnuplot.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/go.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/graphql.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/groovy.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hack.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haml.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/handlebars.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haskell.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haxe.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hcl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hjson.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hlsl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html-derivative.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/http.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hurl.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hxml.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hy.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/imba.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ini.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/java.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/javascript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja-html.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jison.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json5.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonc.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonnet.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jssm.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsx.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/julia.qwik.mjs +14 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/just.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kdl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kotlin.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kusto.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/latex.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lean.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/less.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/liquid.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/llvm.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/log.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/logo.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lua.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/luau.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/make.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-nix.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-vue.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/marko.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/matlab.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdc.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdx.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mermaid.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mipsasm.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mojo.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/moonbit.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/move.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/narrat.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow-groovy.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nginx.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nim.qwik.mjs +18 -20
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nix.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nushell.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-c.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-cpp.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ocaml.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/odin.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/openscad.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pascal.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/perl.qwik.mjs +14 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/php.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pkl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/plsql.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/po.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/polar.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/postcss.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powerquery.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powershell.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prisma.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prolog.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/proto.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pug.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/puppet.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/purescript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/python.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qml.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qmldir.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qss.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/r.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/racket.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/raku.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/razor.qwik.mjs +8 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/reg.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/regexp.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rel.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/riscv.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ron.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rosmsg.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rst.qwik.mjs +20 -22
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ruby.qwik.mjs +28 -30
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rust.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sas.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sass.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scala.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scheme.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scss.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sdbl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shaderlab.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellscript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellsession.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/smalltalk.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/solidity.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/soy.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sparql.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/splunk.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sql.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ssh-config.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stata.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stylus.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/surrealql.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/svelte.qwik.mjs +12 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/swift.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/system-verilog.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/systemd.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/talonscript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tasl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tcl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/templ.qwik.mjs +10 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/terraform.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tex.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/toml.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ts-tags.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsv.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsx.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/turtle.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/twig.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typescript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typespec.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typst.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/v.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vala.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vb.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/verilog.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vhdl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/viml.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-directives.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-html.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-interpolations.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-vine.qwik.mjs +16 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue.qwik.mjs +24 -26
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vyper.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wasm.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wenyan.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wgsl.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wikitext.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wit.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wolfram.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xml.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xsl.qwik.mjs +4 -9
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/yaml.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zenscript.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zig.qwik.mjs +2 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs +728 -661
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/andromeeda.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/aurora-x.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-dark.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-mirage.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-frappe.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-latte.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-macchiato.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-mocha.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dark-plus.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula-soft.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-dark.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-default.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-dimmed.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-high-contrast.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-default.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-high-contrast.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-hard.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-medium.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-soft.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon-bright.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/houston.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-dragon.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-lotus.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-wave.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/laserwave.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/light-plus.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-darker.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-lighter.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-ocean.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-palenight.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-dark.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/monokai.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/nord.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-dark-pro.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/plastic.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/poimandres.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/red.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-dawn.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-moon.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-dark.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-ochin.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/snazzy-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-dark.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/synthwave-84.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/tokyo-night.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vesper.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-black.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-dark.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-light.qwik.mjs +2 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_types@4.0.2/node_modules/@shikijs/types/dist/index.qwik.mjs +5 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.qwik.mjs +2183 -2953
- package/dist/ui/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.qwik.mjs +20 -14
- package/dist/ui/node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.qwik.mjs +259 -256
- package/dist/ui/node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.qwik.mjs +113 -110
- package/dist/ui/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.qwik.mjs +13 -8
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.qwik.mjs +198 -177
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.qwik.mjs +205 -182
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.qwik.mjs +29 -20
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.qwik.mjs +20 -4
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.qwik.mjs +112 -124
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.qwik.mjs +38 -14
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.qwik.mjs +21 -4
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.qwik.mjs +20 -4
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.qwik.mjs +22 -10
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.qwik.mjs +229 -53
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.qwik.mjs +234 -58
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.qwik.mjs +36 -8
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.qwik.mjs +83 -36
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.qwik.mjs +38 -20
- package/dist/ui/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.qwik.mjs +22 -6
- package/dist/ui/node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.qwik.mjs +27 -24
- package/dist/ui/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.qwik.mjs +119 -120
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.qwik.mjs +17 -6
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.qwik.mjs +57 -59
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.qwik.mjs +72 -33
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.qwik.mjs +312 -366
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.qwik.mjs +11 -4
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.qwik.mjs +558 -564
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.qwik.mjs +10 -4
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.qwik.mjs +10 -4
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.qwik.mjs +47 -21
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.qwik.mjs +43 -37
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.qwik.mjs +19 -17
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.qwik.mjs +21 -10
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.qwik.mjs +22 -22
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.qwik.mjs +20 -18
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.qwik.mjs +15 -17
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.qwik.mjs +11 -9
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.qwik.mjs +9 -8
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/bundle-full.qwik.mjs +21 -59
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/chunk-CtajNgzt.qwik.mjs +17 -28
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/engine-oniguruma.qwik.mjs +4 -11
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/langs-bundle-full-DfKZStlK.qwik.mjs +1279 -1284
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/themes.qwik.mjs +393 -396
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/wasm.qwik.mjs +2 -6
- package/dist/ui/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.qwik.mjs +10 -4
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.qwik.mjs +16 -12
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.qwik.mjs +70 -45
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.qwik.mjs +16 -4
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.qwik.mjs +34 -20
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.qwik.mjs +12 -6
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.qwik.mjs +12 -6
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.qwik.mjs +29 -22
- package/dist/ui/node_modules/.pnpm/vite-hot-client@2.1.0_vite@8.2.1_@types_node@24.10.0_esbuild@0.28.2_jiti@2.6.1_terser@5.46.0_tsx@4.21.0_yaml@2.8.3_/node_modules/vite-hot-client/dist/index.qwik.mjs +25 -0
- package/dist/ui/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.qwik.mjs +102 -20
- package/dist/ui/packages/devtools/kit/src/overlay-paths.qwik.mjs +10 -19
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsButton/DevtoolsButton.qwik.mjs +118 -140
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsContainer/DevtoolsContainer.qwik.mjs +4 -12
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +360 -470
- package/dist/ui/packages/devtools/ui/src/components/IconButton/IconButton.qwik.mjs +13 -15
- package/dist/ui/packages/devtools/ui/src/components/Icons/Icons.qwik.mjs +513 -635
- package/dist/ui/packages/devtools/ui/src/components/InfoBanner/InfoBanner.qwik.mjs +8 -23
- package/dist/ui/packages/devtools/ui/src/components/Tab/Tab.qwik.mjs +13 -20
- package/dist/ui/packages/devtools/ui/src/components/TabContent/TabContent.qwik.mjs +7 -20
- package/dist/ui/packages/devtools/ui/src/components/TabTitle/TabTitle.qwik.mjs +4 -8
- package/dist/ui/packages/devtools/ui/src/components/ThemeToggle/QwikThemeToggle.qwik.mjs +31 -53
- package/dist/ui/packages/devtools/ui/src/components/ThemeToggle/theme-script.qwik.mjs +5 -9
- package/dist/ui/packages/devtools/ui/src/components/Tree/Tree.qwik.mjs +139 -229
- package/dist/ui/packages/devtools/ui/src/components/router-head/theme-script.qwik.mjs +2 -4
- package/dist/ui/packages/devtools/ui/src/devtools/CommandPalette.qwik.mjs +188 -278
- package/dist/ui/packages/devtools/ui/src/devtools/CustomizeTabsPanel.qwik.mjs +111 -198
- package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsContent.qwik.mjs +100 -193
- package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsSidebar.qwik.mjs +46 -102
- package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtools.qwik.mjs +46 -93
- package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtoolsExtension.qwik.mjs +26 -31
- package/dist/ui/packages/devtools/ui/src/devtools/command-palette.qwik.mjs +142 -173
- package/dist/ui/packages/devtools/ui/src/devtools/page-data-source.qwik.mjs +58 -59
- package/dist/ui/packages/devtools/ui/src/devtools/rpc.qwik.mjs +61 -81
- package/dist/ui/packages/devtools/ui/src/devtools/sidebar-tabs.qwik.mjs +60 -84
- package/dist/ui/packages/devtools/ui/src/devtools/state.qwik.mjs +25 -27
- package/dist/ui/packages/devtools/ui/src/devtools/tabs.qwik.mjs +58 -80
- package/dist/ui/packages/devtools/ui/src/features/Assets/Assets.qwik.mjs +15 -49
- package/dist/ui/packages/devtools/ui/src/features/BuildAnalysis/BuildAnalysis.qwik.mjs +118 -181
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/CodeBreak.qwik.mjs +26 -37
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/HtmlParser.qwik.mjs +82 -145
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/StateParser.qwik.mjs +108 -177
- package/dist/ui/packages/devtools/ui/src/features/HookTree/HookTree.qwik.mjs +518 -701
- package/dist/ui/packages/devtools/ui/src/features/HookTree/hookTreeHelpers.qwik.mjs +122 -167
- package/dist/ui/packages/devtools/ui/src/features/Inspect/Inspect.qwik.mjs +24 -28
- package/dist/ui/packages/devtools/ui/src/features/Inspect/constant.qwik.mjs +2 -4
- package/dist/ui/packages/devtools/ui/src/features/Inspect/iframe-theme.qwik.mjs +37 -47
- package/dist/ui/packages/devtools/ui/src/features/Overview/Overview.qwik.mjs +44 -197
- package/dist/ui/packages/devtools/ui/src/features/Packages/Packages.qwik.mjs +246 -289
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +111 -215
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyCard/index.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyOperationFeedback/DependencyOperationFeedback.qwik.mjs +13 -38
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyOperationFeedback/index.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyToolbar/DependencyToolbar.qwik.mjs +41 -74
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyToolbar/index.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/InstalledDependencyList/InstalledDependencyList.qwik.mjs +19 -56
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/InstalledDependencyList/index.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +20 -28
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageIcon/index.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageSearchResults/PackageSearchResults.qwik.mjs +22 -49
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageSearchResults/index.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/SearchResultCard/SearchResultCard.qwik.mjs +31 -96
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/SearchResultCard/index.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/package-utils.qwik.mjs +41 -67
- package/dist/ui/packages/devtools/ui/src/features/Performance/Performance.qwik.mjs +106 -249
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/ComponentCard.qwik.mjs +9 -47
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/HookDetailsPanel.qwik.mjs +27 -91
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/PerformanceOverview.qwik.mjs +13 -33
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/StatCard.qwik.mjs +8 -20
- package/dist/ui/packages/devtools/ui/src/features/Performance/computePerfViewModel.qwik.mjs +96 -105
- package/dist/ui/packages/devtools/ui/src/features/Performance/transformPerformanceData.qwik.mjs +19 -32
- package/dist/ui/packages/devtools/ui/src/features/Performance/utils/formatMs.qwik.mjs +5 -13
- package/dist/ui/packages/devtools/ui/src/features/Preloads/Preloads.qwik.mjs +263 -471
- package/dist/ui/packages/devtools/ui/src/features/Preloads/computePreloadViewModel.qwik.mjs +120 -158
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/RenderTree.qwik.mjs +188 -265
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HighlightedCodeList.qwik.mjs +5 -21
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HookFiltersCard.qwik.mjs +30 -77
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/RenderTreeTabs.qwik.mjs +9 -24
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/StateTreeNodeLabel.qwik.mjs +18 -30
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/utils/getCodeLanguage.qwik.mjs +6 -16
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/utils/getValueColorClass.qwik.mjs +10 -19
- package/dist/ui/packages/devtools/ui/src/features/Routes/Routes.qwik.mjs +27 -50
- package/dist/ui/packages/devtools/ui/src/runtime/preloads.qwik.mjs +596 -796
- package/dist/ui/packages/devtools/ui/src/utils/shiki.qwik.mjs +15 -22
- package/dist/ui/q-manifest.json +1036 -1059
- package/dist/ui/styles.css +1 -0
- package/package.json +8 -7
- package/dist/ui/_virtual/_commonjsHelpers.qwik.mjs +0 -6
- package/dist/ui/_virtual/browser.qwik.mjs +0 -7
- package/dist/ui/_virtual/browser.qwik2.mjs +0 -4
- package/dist/ui/bundle-graph-eeik1E53.json +0 -1
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/engine-compile.qwik.mjs +0 -36
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/scanner-BFcBmQR1.qwik.mjs +0 -78
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/node-utils.qwik.mjs +0 -14
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/parse.qwik.mjs +0 -297
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/tokenizer/tokenize.qwik.mjs +0 -355
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/traverser/traverse.qwik.mjs +0 -79
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/utils.qwik.mjs +0 -19
- package/dist/ui/node_modules/.pnpm/oniguruma-to-es@4.3.5/node_modules/oniguruma-to-es/dist/esm/index.qwik.mjs +0 -1878
- package/dist/ui/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.qwik.mjs +0 -250
- package/dist/ui/node_modules/.pnpm/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.qwik.mjs +0 -98
- package/dist/ui/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/atomic.qwik.mjs +0 -174
- package/dist/ui/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/utils-internals.qwik.mjs +0 -16
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/index.qwik.mjs +0 -47
- package/dist/ui/node_modules/.pnpm/vite-hot-client@2.1.0_vite@7.3.5_@types_node@24.10.0_jiti@2.6.1_lightningcss@1.33.0_terser@5.46.0_tsx@4.21.0_yaml@2.8.3_/node_modules/vite-hot-client/dist/index.qwik.mjs +0 -35
|
@@ -1,1112 +1,1135 @@
|
|
|
1
1
|
import { ShikiError } from "../../../../../@shikijs_types@4.0.2/node_modules/@shikijs/types/dist/index.qwik.mjs";
|
|
2
|
-
import { isSpecialTheme, isSpecialLang, createShikiPrimitiveAsync, codeToTokensWithThemes, getLastGrammarState, getLastGrammarStateFromMap, setLastGrammarStateToMap, resolveColorReplacements, applyColorReplacements, isPlainLang, isNoneTheme, codeToTokensBase as codeToTokensBase$1, splitLines } from "../../../../../@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs";
|
|
3
|
-
import { createShikiPrimitive, normalizeGetter, normalizeTheme, toArray, tokenizeWithTheme } from "../../../../../@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs";
|
|
4
2
|
import { FontStyle } from "../../../../../@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.qwik.mjs";
|
|
3
|
+
import { applyColorReplacements, codeToTokensBase as codeToTokensBase$1, codeToTokensWithThemes, createShikiPrimitiveAsync, getLastGrammarState, getLastGrammarStateFromMap, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, resolveColorReplacements, setLastGrammarStateToMap, splitLines } from "../../../../../@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs";
|
|
5
4
|
import { toHtml } from "../../../../../hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.qwik.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Utility to append class to a hast node
|
|
7
|
+
*
|
|
8
|
+
* If the `property.class` is a string, it will be splitted by space and converted to an array.
|
|
9
|
+
*/
|
|
6
10
|
function addClassToHast(node, className) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
var _node$properties;
|
|
12
|
+
if (!className) return node;
|
|
13
|
+
node.properties || (node.properties = {});
|
|
14
|
+
(_node$properties = node.properties).class || (_node$properties.class = []);
|
|
15
|
+
if (typeof node.properties.class === "string") node.properties.class = node.properties.class.split(/\s+/g);
|
|
16
|
+
if (!Array.isArray(node.properties.class)) node.properties.class = [];
|
|
17
|
+
const targets = Array.isArray(className) ? className : className.split(/\s+/g);
|
|
18
|
+
for (const c of targets) if (c && !node.properties.class.includes(c)) node.properties.class.push(c);
|
|
19
|
+
return node;
|
|
16
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates a converter between index and position in a code block.
|
|
23
|
+
*
|
|
24
|
+
* Overflow/underflow are unchecked.
|
|
25
|
+
*/
|
|
17
26
|
function createPositionConverter(code) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
27
|
+
const lines = splitLines(code, true).map(([line]) => line);
|
|
28
|
+
function indexToPos(index) {
|
|
29
|
+
if (index === code.length) return {
|
|
30
|
+
line: lines.length - 1,
|
|
31
|
+
character: lines[lines.length - 1].length
|
|
32
|
+
};
|
|
33
|
+
let character = index;
|
|
34
|
+
let line = 0;
|
|
35
|
+
for (const lineText of lines) {
|
|
36
|
+
if (character < lineText.length) break;
|
|
37
|
+
character -= lineText.length;
|
|
38
|
+
line++;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
line,
|
|
42
|
+
character
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function posToIndex(line, character) {
|
|
46
|
+
let index = 0;
|
|
47
|
+
for (let i = 0; i < line; i++) index += lines[i].length;
|
|
48
|
+
index += character;
|
|
49
|
+
return index;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
lines,
|
|
53
|
+
indexToPos,
|
|
54
|
+
posToIndex
|
|
55
|
+
};
|
|
47
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Guess embedded languages from given code and highlighter.
|
|
59
|
+
*
|
|
60
|
+
* When highlighter is provided, only bundled languages will be included.
|
|
61
|
+
*
|
|
62
|
+
* @param code - The code string to analyze
|
|
63
|
+
* @param _lang - The primary language of the code (currently unused)
|
|
64
|
+
* @param highlighter - Optional highlighter instance to validate languages
|
|
65
|
+
* @returns Array of detected language identifiers
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* // Detects 'javascript' from Vue SFC
|
|
70
|
+
* guessEmbeddedLanguages('<script lang="javascript">')
|
|
71
|
+
*
|
|
72
|
+
* // Detects 'python' from markdown code block
|
|
73
|
+
* guessEmbeddedLanguages('```python\nprint("hi")\n```')
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
48
76
|
function guessEmbeddedLanguages(code, _lang, highlighter) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
const langs = /* @__PURE__ */ new Set();
|
|
78
|
+
for (const match of code.matchAll(/:?lang=["']([^"']+)["']/g)) {
|
|
79
|
+
const lang = match[1].toLowerCase().trim();
|
|
80
|
+
if (lang) langs.add(lang);
|
|
81
|
+
}
|
|
82
|
+
for (const match of code.matchAll(/(?:```|~~~)([\w-]+)/g)) {
|
|
83
|
+
const lang = match[1].toLowerCase().trim();
|
|
84
|
+
if (lang) langs.add(lang);
|
|
85
|
+
}
|
|
86
|
+
for (const match of code.matchAll(/\\begin\{([\w-]+)\}/g)) {
|
|
87
|
+
const lang = match[1].toLowerCase().trim();
|
|
88
|
+
if (lang) langs.add(lang);
|
|
89
|
+
}
|
|
90
|
+
for (const match of code.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)) {
|
|
91
|
+
const fullType = match[1].toLowerCase().trim();
|
|
92
|
+
const lang = fullType.includes("/") ? fullType.split("/").pop() : fullType;
|
|
93
|
+
if (lang) langs.add(lang);
|
|
94
|
+
}
|
|
95
|
+
if (!highlighter) return Array.from(langs);
|
|
96
|
+
const bundle = highlighter.getBundledLanguages();
|
|
97
|
+
return Array.from(langs).filter((l) => l && bundle[l]);
|
|
70
98
|
}
|
|
71
|
-
|
|
72
|
-
|
|
99
|
+
var DEFAULT_COLOR_LIGHT_DARK = "light-dark()";
|
|
100
|
+
var COLOR_KEYS = ["color", "background-color"];
|
|
101
|
+
/**
|
|
102
|
+
* Split a token into multiple tokens by given offsets.
|
|
103
|
+
*
|
|
104
|
+
* The offsets are relative to the token, and should be sorted.
|
|
105
|
+
*/
|
|
73
106
|
function splitToken(token, offsets) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
107
|
+
let lastOffset = 0;
|
|
108
|
+
const tokens = [];
|
|
109
|
+
for (const offset of offsets) {
|
|
110
|
+
if (offset > lastOffset) tokens.push({
|
|
111
|
+
...token,
|
|
112
|
+
content: token.content.slice(lastOffset, offset),
|
|
113
|
+
offset: token.offset + lastOffset
|
|
114
|
+
});
|
|
115
|
+
lastOffset = offset;
|
|
116
|
+
}
|
|
117
|
+
if (lastOffset < token.content.length) tokens.push({
|
|
118
|
+
...token,
|
|
119
|
+
content: token.content.slice(lastOffset),
|
|
120
|
+
offset: token.offset + lastOffset
|
|
121
|
+
});
|
|
122
|
+
return tokens;
|
|
90
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Split 2D tokens array by given breakpoints.
|
|
126
|
+
*/
|
|
91
127
|
function splitTokens(tokens, breakpoints) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
128
|
+
const sorted = Array.from(breakpoints instanceof Set ? breakpoints : new Set(breakpoints)).sort((a, b) => a - b);
|
|
129
|
+
if (!sorted.length) return tokens;
|
|
130
|
+
return tokens.map((line) => {
|
|
131
|
+
return line.flatMap((token) => {
|
|
132
|
+
const breakpointsInToken = sorted.filter((i) => token.offset < i && i < token.offset + token.content.length).map((i) => i - token.offset).sort((a, b) => a - b);
|
|
133
|
+
if (!breakpointsInToken.length) return token;
|
|
134
|
+
return splitToken(token, breakpointsInToken);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
101
137
|
}
|
|
102
138
|
function flatTokenVariants(merged, variantsOrder, cssVariablePrefix, defaultColor, colorsRendering = "css-vars") {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
139
|
+
const token = {
|
|
140
|
+
content: merged.content,
|
|
141
|
+
explanation: merged.explanation,
|
|
142
|
+
offset: merged.offset
|
|
143
|
+
};
|
|
144
|
+
const styles = variantsOrder.map((t) => getTokenStyleObject(merged.variants[t]));
|
|
145
|
+
const styleKeys = new Set(styles.flatMap((t) => Object.keys(t)));
|
|
146
|
+
const mergedStyles = {};
|
|
147
|
+
const varKey = (idx, key) => {
|
|
148
|
+
const keyName = key === "color" ? "" : key === "background-color" ? "-bg" : `-${key}`;
|
|
149
|
+
return cssVariablePrefix + variantsOrder[idx] + (key === "color" ? "" : keyName);
|
|
150
|
+
};
|
|
151
|
+
styles.forEach((cur, idx) => {
|
|
152
|
+
for (const key of styleKeys) {
|
|
153
|
+
const value = cur[key] || "inherit";
|
|
154
|
+
if (idx === 0 && defaultColor && COLOR_KEYS.includes(key)) if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && styles.length > 1) {
|
|
155
|
+
const lightIndex = variantsOrder.findIndex((t) => t === "light");
|
|
156
|
+
const darkIndex = variantsOrder.findIndex((t) => t === "dark");
|
|
157
|
+
if (lightIndex === -1 || darkIndex === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
|
|
158
|
+
mergedStyles[key] = `light-dark(${styles[lightIndex][key] || "inherit"}, ${styles[darkIndex][key] || "inherit"})`;
|
|
159
|
+
if (colorsRendering === "css-vars") mergedStyles[varKey(idx, key)] = value;
|
|
160
|
+
} else mergedStyles[key] = value;
|
|
161
|
+
else if (colorsRendering === "css-vars") mergedStyles[varKey(idx, key)] = value;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
token.htmlStyle = mergedStyles;
|
|
165
|
+
return token;
|
|
130
166
|
}
|
|
131
167
|
function getTokenStyleObject(token) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
168
|
+
const styles = {};
|
|
169
|
+
if (token.color) styles.color = token.color;
|
|
170
|
+
if (token.bgColor) styles["background-color"] = token.bgColor;
|
|
171
|
+
if (token.fontStyle) {
|
|
172
|
+
if (token.fontStyle & FontStyle.Italic) styles["font-style"] = "italic";
|
|
173
|
+
if (token.fontStyle & FontStyle.Bold) styles["font-weight"] = "bold";
|
|
174
|
+
const decorations = [];
|
|
175
|
+
if (token.fontStyle & FontStyle.Underline) decorations.push("underline");
|
|
176
|
+
if (token.fontStyle & FontStyle.Strikethrough) decorations.push("line-through");
|
|
177
|
+
if (decorations.length) styles["text-decoration"] = decorations.join(" ");
|
|
178
|
+
}
|
|
179
|
+
return styles;
|
|
144
180
|
}
|
|
145
181
|
function stringifyTokenStyle(token) {
|
|
146
|
-
|
|
147
|
-
|
|
182
|
+
if (typeof token === "string") return token;
|
|
183
|
+
return Object.entries(token).map(([key, value]) => `${key}:${value}`).join(";");
|
|
148
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* A built-in transformer to add decorations to the highlighted code.
|
|
187
|
+
*/
|
|
149
188
|
function transformerDecorations() {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
189
|
+
const map = /* @__PURE__ */ new WeakMap();
|
|
190
|
+
function getContext(shiki) {
|
|
191
|
+
if (!map.has(shiki.meta)) {
|
|
192
|
+
const converter = createPositionConverter(shiki.source);
|
|
193
|
+
function normalizePosition(p) {
|
|
194
|
+
if (typeof p === "number") {
|
|
195
|
+
if (p < 0 || p > shiki.source.length) throw new ShikiError(`Invalid decoration offset: ${p}. Code length: ${shiki.source.length}`);
|
|
196
|
+
return {
|
|
197
|
+
...converter.indexToPos(p),
|
|
198
|
+
offset: p
|
|
199
|
+
};
|
|
200
|
+
} else {
|
|
201
|
+
const line = converter.lines[p.line];
|
|
202
|
+
if (line === void 0) throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Lines length: ${converter.lines.length}`);
|
|
203
|
+
let character = p.character;
|
|
204
|
+
if (character < 0) character = line.length + character;
|
|
205
|
+
if (character < 0 || character > line.length) throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Line ${p.line} length: ${line.length}`);
|
|
206
|
+
return {
|
|
207
|
+
...p,
|
|
208
|
+
character,
|
|
209
|
+
offset: converter.posToIndex(p.line, character)
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const decorations = (shiki.options.decorations || []).map((d) => ({
|
|
214
|
+
...d,
|
|
215
|
+
start: normalizePosition(d.start),
|
|
216
|
+
end: normalizePosition(d.end)
|
|
217
|
+
}));
|
|
218
|
+
verifyIntersections(decorations);
|
|
219
|
+
map.set(shiki.meta, {
|
|
220
|
+
decorations,
|
|
221
|
+
converter,
|
|
222
|
+
source: shiki.source
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
return map.get(shiki.meta);
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
name: "shiki:decorations",
|
|
229
|
+
tokens(tokens) {
|
|
230
|
+
if (!this.options.decorations?.length) return;
|
|
231
|
+
return splitTokens(tokens, getContext(this).decorations.flatMap((d) => [d.start.offset, d.end.offset]));
|
|
232
|
+
},
|
|
233
|
+
code(codeEl) {
|
|
234
|
+
if (!this.options.decorations?.length) return;
|
|
235
|
+
const ctx = getContext(this);
|
|
236
|
+
const lines = Array.from(codeEl.children).filter((i) => i.type === "element" && i.tagName === "span");
|
|
237
|
+
if (lines.length !== ctx.converter.lines.length) throw new ShikiError(`Number of lines in code element (${lines.length}) does not match the number of lines in the source (${ctx.converter.lines.length}). Failed to apply decorations.`);
|
|
238
|
+
function applyLineSection(line, start, end, decoration) {
|
|
239
|
+
const lineEl = lines[line];
|
|
240
|
+
let text = "";
|
|
241
|
+
let startIndex = -1;
|
|
242
|
+
let endIndex = -1;
|
|
243
|
+
if (start === 0) startIndex = 0;
|
|
244
|
+
if (end === 0) endIndex = 0;
|
|
245
|
+
if (end === Number.POSITIVE_INFINITY) endIndex = lineEl.children.length;
|
|
246
|
+
if (startIndex === -1 || endIndex === -1) for (let i = 0; i < lineEl.children.length; i++) {
|
|
247
|
+
text += stringify(lineEl.children[i]);
|
|
248
|
+
if (startIndex === -1 && text.length === start) startIndex = i + 1;
|
|
249
|
+
if (endIndex === -1 && text.length === end) endIndex = i + 1;
|
|
250
|
+
}
|
|
251
|
+
if (startIndex === -1) throw new ShikiError(`Failed to find start index for decoration ${JSON.stringify(decoration.start)}`);
|
|
252
|
+
if (endIndex === -1) throw new ShikiError(`Failed to find end index for decoration ${JSON.stringify(decoration.end)}`);
|
|
253
|
+
const children = lineEl.children.slice(startIndex, endIndex);
|
|
254
|
+
if (!decoration.alwaysWrap && children.length === lineEl.children.length) applyDecoration(lineEl, decoration, "line");
|
|
255
|
+
else if (!decoration.alwaysWrap && children.length === 1 && children[0].type === "element") applyDecoration(children[0], decoration, "token");
|
|
256
|
+
else {
|
|
257
|
+
const wrapper = {
|
|
258
|
+
type: "element",
|
|
259
|
+
tagName: "span",
|
|
260
|
+
properties: {},
|
|
261
|
+
children
|
|
262
|
+
};
|
|
263
|
+
applyDecoration(wrapper, decoration, "wrapper");
|
|
264
|
+
lineEl.children.splice(startIndex, children.length, wrapper);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function applyLine(line, decoration) {
|
|
268
|
+
lines[line] = applyDecoration(lines[line], decoration, "line");
|
|
269
|
+
}
|
|
270
|
+
function applyDecoration(el, decoration, type) {
|
|
271
|
+
const properties = decoration.properties || {};
|
|
272
|
+
const transform = decoration.transform || ((i) => i);
|
|
273
|
+
el.tagName = decoration.tagName || "span";
|
|
274
|
+
el.properties = {
|
|
275
|
+
...el.properties,
|
|
276
|
+
...properties,
|
|
277
|
+
class: el.properties.class
|
|
278
|
+
};
|
|
279
|
+
if (decoration.properties?.class) addClassToHast(el, decoration.properties.class);
|
|
280
|
+
el = transform(el, type) || el;
|
|
281
|
+
return el;
|
|
282
|
+
}
|
|
283
|
+
const lineApplies = [];
|
|
284
|
+
const sorted = ctx.decorations.sort((a, b) => b.start.offset - a.start.offset || a.end.offset - b.end.offset);
|
|
285
|
+
for (const decoration of sorted) {
|
|
286
|
+
const { start, end } = decoration;
|
|
287
|
+
if (start.line === end.line) applyLineSection(start.line, start.character, end.character, decoration);
|
|
288
|
+
else if (start.line < end.line) {
|
|
289
|
+
applyLineSection(start.line, start.character, Number.POSITIVE_INFINITY, decoration);
|
|
290
|
+
for (let i = start.line + 1; i < end.line; i++) lineApplies.unshift(() => applyLine(i, decoration));
|
|
291
|
+
applyLineSection(end.line, 0, end.character, decoration);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
lineApplies.forEach((i) => i());
|
|
295
|
+
}
|
|
296
|
+
};
|
|
258
297
|
}
|
|
259
298
|
function verifyIntersections(items) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
299
|
+
for (let i = 0; i < items.length; i++) {
|
|
300
|
+
const foo = items[i];
|
|
301
|
+
if (foo.start.offset > foo.end.offset) throw new ShikiError(`Invalid decoration range: ${JSON.stringify(foo.start)} - ${JSON.stringify(foo.end)}`);
|
|
302
|
+
for (let j = i + 1; j < items.length; j++) {
|
|
303
|
+
const bar = items[j];
|
|
304
|
+
const isFooHasBarStart = foo.start.offset <= bar.start.offset && bar.start.offset < foo.end.offset;
|
|
305
|
+
const isFooHasBarEnd = foo.start.offset < bar.end.offset && bar.end.offset <= foo.end.offset;
|
|
306
|
+
const isBarHasFooStart = bar.start.offset <= foo.start.offset && foo.start.offset < bar.end.offset;
|
|
307
|
+
const isBarHasFooEnd = bar.start.offset < foo.end.offset && foo.end.offset <= bar.end.offset;
|
|
308
|
+
if (isFooHasBarStart || isFooHasBarEnd || isBarHasFooStart || isBarHasFooEnd) {
|
|
309
|
+
if (isFooHasBarStart && isFooHasBarEnd) continue;
|
|
310
|
+
if (isBarHasFooStart && isBarHasFooEnd) continue;
|
|
311
|
+
if (isBarHasFooStart && foo.start.offset === foo.end.offset) continue;
|
|
312
|
+
if (isFooHasBarEnd && bar.start.offset === bar.end.offset) continue;
|
|
313
|
+
throw new ShikiError(`Decorations ${JSON.stringify(foo.start)} and ${JSON.stringify(bar.start)} intersect.`);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
278
317
|
}
|
|
279
318
|
function stringify(el) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
319
|
+
if (el.type === "text") return el.value;
|
|
320
|
+
if (el.type === "element") return el.children.map(stringify).join("");
|
|
321
|
+
return "";
|
|
283
322
|
}
|
|
284
|
-
|
|
323
|
+
var builtInTransformers = [/* @__PURE__ */ transformerDecorations()];
|
|
285
324
|
function getTransformers(options) {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
325
|
+
const transformers = sortTransformersByEnforcement(options.transformers || []);
|
|
326
|
+
return [
|
|
327
|
+
...transformers.pre,
|
|
328
|
+
...transformers.normal,
|
|
329
|
+
...transformers.post,
|
|
330
|
+
...builtInTransformers
|
|
331
|
+
];
|
|
293
332
|
}
|
|
294
333
|
function sortTransformersByEnforcement(transformers) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
};
|
|
334
|
+
const pre = [];
|
|
335
|
+
const post = [];
|
|
336
|
+
const normal = [];
|
|
337
|
+
for (const transformer of transformers) switch (transformer.enforce) {
|
|
338
|
+
case "pre":
|
|
339
|
+
pre.push(transformer);
|
|
340
|
+
break;
|
|
341
|
+
case "post":
|
|
342
|
+
post.push(transformer);
|
|
343
|
+
break;
|
|
344
|
+
default: normal.push(transformer);
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
pre,
|
|
348
|
+
post,
|
|
349
|
+
normal
|
|
350
|
+
};
|
|
313
351
|
}
|
|
314
352
|
var namedColors = [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
353
|
+
"black",
|
|
354
|
+
"red",
|
|
355
|
+
"green",
|
|
356
|
+
"yellow",
|
|
357
|
+
"blue",
|
|
358
|
+
"magenta",
|
|
359
|
+
"cyan",
|
|
360
|
+
"white",
|
|
361
|
+
"brightBlack",
|
|
362
|
+
"brightRed",
|
|
363
|
+
"brightGreen",
|
|
364
|
+
"brightYellow",
|
|
365
|
+
"brightBlue",
|
|
366
|
+
"brightMagenta",
|
|
367
|
+
"brightCyan",
|
|
368
|
+
"brightWhite"
|
|
331
369
|
];
|
|
332
370
|
var decorations = {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
371
|
+
1: "bold",
|
|
372
|
+
2: "dim",
|
|
373
|
+
3: "italic",
|
|
374
|
+
4: "underline",
|
|
375
|
+
7: "reverse",
|
|
376
|
+
8: "hidden",
|
|
377
|
+
9: "strikethrough"
|
|
340
378
|
};
|
|
341
379
|
function findSequence(value, position) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
380
|
+
const nextEscape = value.indexOf("\x1B", position);
|
|
381
|
+
if (nextEscape !== -1) {
|
|
382
|
+
if (value[nextEscape + 1] === "[") {
|
|
383
|
+
const nextClose = value.indexOf("m", nextEscape);
|
|
384
|
+
if (nextClose !== -1) return {
|
|
385
|
+
sequence: value.substring(nextEscape + 2, nextClose).split(";"),
|
|
386
|
+
startPosition: nextEscape,
|
|
387
|
+
position: nextClose + 1
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return { position: value.length };
|
|
354
392
|
}
|
|
355
393
|
function parseColor(sequence) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
394
|
+
const colorMode = sequence.shift();
|
|
395
|
+
if (colorMode === "2") {
|
|
396
|
+
const rgb = sequence.splice(0, 3).map((x) => Number.parseInt(x));
|
|
397
|
+
if (rgb.length !== 3 || rgb.some((x) => Number.isNaN(x))) return;
|
|
398
|
+
return {
|
|
399
|
+
type: "rgb",
|
|
400
|
+
rgb
|
|
401
|
+
};
|
|
402
|
+
} else if (colorMode === "5") {
|
|
403
|
+
const index = sequence.shift();
|
|
404
|
+
if (index) return {
|
|
405
|
+
type: "table",
|
|
406
|
+
index: Number(index)
|
|
407
|
+
};
|
|
408
|
+
}
|
|
371
409
|
}
|
|
372
410
|
function parseSequence(sequence) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
411
|
+
const commands = [];
|
|
412
|
+
while (sequence.length > 0) {
|
|
413
|
+
const code = sequence.shift();
|
|
414
|
+
if (!code) continue;
|
|
415
|
+
const codeInt = Number.parseInt(code);
|
|
416
|
+
if (Number.isNaN(codeInt)) continue;
|
|
417
|
+
if (codeInt === 0) commands.push({ type: "resetAll" });
|
|
418
|
+
else if (codeInt <= 9) {
|
|
419
|
+
if (decorations[codeInt]) commands.push({
|
|
420
|
+
type: "setDecoration",
|
|
421
|
+
value: decorations[codeInt]
|
|
422
|
+
});
|
|
423
|
+
} else if (codeInt <= 29) {
|
|
424
|
+
const decoration = decorations[codeInt - 20];
|
|
425
|
+
if (decoration) {
|
|
426
|
+
commands.push({
|
|
427
|
+
type: "resetDecoration",
|
|
428
|
+
value: decoration
|
|
429
|
+
});
|
|
430
|
+
if (decoration === "dim") commands.push({
|
|
431
|
+
type: "resetDecoration",
|
|
432
|
+
value: "bold"
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
} else if (codeInt <= 37) commands.push({
|
|
436
|
+
type: "setForegroundColor",
|
|
437
|
+
value: {
|
|
438
|
+
type: "named",
|
|
439
|
+
name: namedColors[codeInt - 30]
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
else if (codeInt === 38) {
|
|
443
|
+
const color = parseColor(sequence);
|
|
444
|
+
if (color) commands.push({
|
|
445
|
+
type: "setForegroundColor",
|
|
446
|
+
value: color
|
|
447
|
+
});
|
|
448
|
+
} else if (codeInt === 39) commands.push({ type: "resetForegroundColor" });
|
|
449
|
+
else if (codeInt <= 47) commands.push({
|
|
450
|
+
type: "setBackgroundColor",
|
|
451
|
+
value: {
|
|
452
|
+
type: "named",
|
|
453
|
+
name: namedColors[codeInt - 40]
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
else if (codeInt === 48) {
|
|
457
|
+
const color = parseColor(sequence);
|
|
458
|
+
if (color) commands.push({
|
|
459
|
+
type: "setBackgroundColor",
|
|
460
|
+
value: color
|
|
461
|
+
});
|
|
462
|
+
} else if (codeInt === 49) commands.push({ type: "resetBackgroundColor" });
|
|
463
|
+
else if (codeInt === 53) commands.push({
|
|
464
|
+
type: "setDecoration",
|
|
465
|
+
value: "overline"
|
|
466
|
+
});
|
|
467
|
+
else if (codeInt === 55) commands.push({
|
|
468
|
+
type: "resetDecoration",
|
|
469
|
+
value: "overline"
|
|
470
|
+
});
|
|
471
|
+
else if (codeInt >= 90 && codeInt <= 97) commands.push({
|
|
472
|
+
type: "setForegroundColor",
|
|
473
|
+
value: {
|
|
474
|
+
type: "named",
|
|
475
|
+
name: namedColors[codeInt - 90 + 8]
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
else if (codeInt >= 100 && codeInt <= 107) commands.push({
|
|
479
|
+
type: "setBackgroundColor",
|
|
480
|
+
value: {
|
|
481
|
+
type: "named",
|
|
482
|
+
name: namedColors[codeInt - 100 + 8]
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
return commands;
|
|
449
487
|
}
|
|
450
488
|
function createAnsiSequenceParser() {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
489
|
+
let foreground = null;
|
|
490
|
+
let background = null;
|
|
491
|
+
let decorations2 = /* @__PURE__ */ new Set();
|
|
492
|
+
return { parse(value) {
|
|
493
|
+
const tokens = [];
|
|
494
|
+
let position = 0;
|
|
495
|
+
do {
|
|
496
|
+
const findResult = findSequence(value, position);
|
|
497
|
+
const text = findResult.sequence ? value.substring(position, findResult.startPosition) : value.substring(position);
|
|
498
|
+
if (text.length > 0) tokens.push({
|
|
499
|
+
value: text,
|
|
500
|
+
foreground,
|
|
501
|
+
background,
|
|
502
|
+
decorations: new Set(decorations2)
|
|
503
|
+
});
|
|
504
|
+
if (findResult.sequence) {
|
|
505
|
+
const commands = parseSequence(findResult.sequence);
|
|
506
|
+
for (const styleToken of commands) if (styleToken.type === "resetAll") {
|
|
507
|
+
foreground = null;
|
|
508
|
+
background = null;
|
|
509
|
+
decorations2.clear();
|
|
510
|
+
} else if (styleToken.type === "resetForegroundColor") foreground = null;
|
|
511
|
+
else if (styleToken.type === "resetBackgroundColor") background = null;
|
|
512
|
+
else if (styleToken.type === "resetDecoration") decorations2.delete(styleToken.value);
|
|
513
|
+
for (const styleToken of commands) if (styleToken.type === "setForegroundColor") foreground = styleToken.value;
|
|
514
|
+
else if (styleToken.type === "setBackgroundColor") background = styleToken.value;
|
|
515
|
+
else if (styleToken.type === "setDecoration") decorations2.add(styleToken.value);
|
|
516
|
+
}
|
|
517
|
+
position = findResult.position;
|
|
518
|
+
} while (position < value.length);
|
|
519
|
+
return tokens;
|
|
520
|
+
} };
|
|
483
521
|
}
|
|
484
522
|
var defaultNamedColorsMap = {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
523
|
+
black: "#000000",
|
|
524
|
+
red: "#bb0000",
|
|
525
|
+
green: "#00bb00",
|
|
526
|
+
yellow: "#bbbb00",
|
|
527
|
+
blue: "#0000bb",
|
|
528
|
+
magenta: "#ff00ff",
|
|
529
|
+
cyan: "#00bbbb",
|
|
530
|
+
white: "#eeeeee",
|
|
531
|
+
brightBlack: "#555555",
|
|
532
|
+
brightRed: "#ff5555",
|
|
533
|
+
brightGreen: "#00ff00",
|
|
534
|
+
brightYellow: "#ffff55",
|
|
535
|
+
brightBlue: "#5555ff",
|
|
536
|
+
brightMagenta: "#ff55ff",
|
|
537
|
+
brightCyan: "#55ffff",
|
|
538
|
+
brightWhite: "#ffffff"
|
|
501
539
|
};
|
|
502
540
|
function createColorPalette(namedColorsMap = defaultNamedColorsMap) {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
return { value };
|
|
541
|
+
function namedColor(name) {
|
|
542
|
+
return namedColorsMap[name];
|
|
543
|
+
}
|
|
544
|
+
function rgbColor(rgb) {
|
|
545
|
+
return `#${rgb.map((x) => Math.max(0, Math.min(x, 255)).toString(16).padStart(2, "0")).join("")}`;
|
|
546
|
+
}
|
|
547
|
+
let colorTable;
|
|
548
|
+
function getColorTable() {
|
|
549
|
+
if (colorTable) return colorTable;
|
|
550
|
+
colorTable = [];
|
|
551
|
+
for (let i = 0; i < namedColors.length; i++) colorTable.push(namedColor(namedColors[i]));
|
|
552
|
+
let levels = [
|
|
553
|
+
0,
|
|
554
|
+
95,
|
|
555
|
+
135,
|
|
556
|
+
175,
|
|
557
|
+
215,
|
|
558
|
+
255
|
|
559
|
+
];
|
|
560
|
+
for (let r = 0; r < 6; r++) for (let g = 0; g < 6; g++) for (let b = 0; b < 6; b++) colorTable.push(rgbColor([
|
|
561
|
+
levels[r],
|
|
562
|
+
levels[g],
|
|
563
|
+
levels[b]
|
|
564
|
+
]));
|
|
565
|
+
let level = 8;
|
|
566
|
+
for (let i = 0; i < 24; i++, level += 10) colorTable.push(rgbColor([
|
|
567
|
+
level,
|
|
568
|
+
level,
|
|
569
|
+
level
|
|
570
|
+
]));
|
|
571
|
+
return colorTable;
|
|
572
|
+
}
|
|
573
|
+
function tableColor(index) {
|
|
574
|
+
return getColorTable()[index];
|
|
575
|
+
}
|
|
576
|
+
function value(color) {
|
|
577
|
+
switch (color.type) {
|
|
578
|
+
case "named": return namedColor(color.name);
|
|
579
|
+
case "rgb": return rgbColor(color.rgb);
|
|
580
|
+
case "table": return tableColor(color.index);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return { value };
|
|
549
584
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
585
|
+
/**
|
|
586
|
+
* Default ANSI palette (VSCode compatible fallbacks)
|
|
587
|
+
* Used when the theme does not define terminal.ansi* colors.
|
|
588
|
+
*/
|
|
589
|
+
var defaultAnsiColors = {
|
|
590
|
+
black: "#000000",
|
|
591
|
+
red: "#cd3131",
|
|
592
|
+
green: "#0DBC79",
|
|
593
|
+
yellow: "#E5E510",
|
|
594
|
+
blue: "#2472C8",
|
|
595
|
+
magenta: "#BC3FBC",
|
|
596
|
+
cyan: "#11A8CD",
|
|
597
|
+
white: "#E5E5E5",
|
|
598
|
+
brightBlack: "#666666",
|
|
599
|
+
brightRed: "#F14C4C",
|
|
600
|
+
brightGreen: "#23D18B",
|
|
601
|
+
brightYellow: "#F5F543",
|
|
602
|
+
brightBlue: "#3B8EEA",
|
|
603
|
+
brightMagenta: "#D670D6",
|
|
604
|
+
brightCyan: "#29B8DB",
|
|
605
|
+
brightWhite: "#FFFFFF"
|
|
567
606
|
};
|
|
568
607
|
function tokenizeAnsiWithTheme(theme, fileContents, options) {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
608
|
+
const colorReplacements = resolveColorReplacements(theme, options);
|
|
609
|
+
const lines = splitLines(fileContents);
|
|
610
|
+
const colorPalette = createColorPalette(Object.fromEntries(namedColors.map((name) => {
|
|
611
|
+
const key = `terminal.ansi${name[0].toUpperCase()}${name.substring(1)}`;
|
|
612
|
+
return [name, theme.colors?.[key] || defaultAnsiColors[name]];
|
|
613
|
+
})));
|
|
614
|
+
const parser = createAnsiSequenceParser();
|
|
615
|
+
return lines.map((line) => parser.parse(line[0]).map((token) => {
|
|
616
|
+
let color;
|
|
617
|
+
let bgColor;
|
|
618
|
+
if (token.decorations.has("reverse")) {
|
|
619
|
+
color = token.background ? colorPalette.value(token.background) : theme.bg;
|
|
620
|
+
bgColor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;
|
|
621
|
+
} else {
|
|
622
|
+
color = token.foreground ? colorPalette.value(token.foreground) : theme.fg;
|
|
623
|
+
bgColor = token.background ? colorPalette.value(token.background) : void 0;
|
|
624
|
+
}
|
|
625
|
+
color = applyColorReplacements(color, colorReplacements);
|
|
626
|
+
bgColor = applyColorReplacements(bgColor, colorReplacements);
|
|
627
|
+
if (token.decorations.has("dim")) color = dimColor(color);
|
|
628
|
+
let fontStyle = FontStyle.None;
|
|
629
|
+
if (token.decorations.has("bold")) fontStyle |= FontStyle.Bold;
|
|
630
|
+
if (token.decorations.has("italic")) fontStyle |= FontStyle.Italic;
|
|
631
|
+
if (token.decorations.has("underline")) fontStyle |= FontStyle.Underline;
|
|
632
|
+
if (token.decorations.has("strikethrough")) fontStyle |= FontStyle.Strikethrough;
|
|
633
|
+
return {
|
|
634
|
+
content: token.value,
|
|
635
|
+
offset: line[1],
|
|
636
|
+
color,
|
|
637
|
+
bgColor,
|
|
638
|
+
fontStyle
|
|
639
|
+
};
|
|
640
|
+
}));
|
|
602
641
|
}
|
|
642
|
+
/**
|
|
643
|
+
* Adds 50% alpha to a hex color string or the "-dim" postfix to a CSS variable
|
|
644
|
+
*/
|
|
603
645
|
function dimColor(color) {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
646
|
+
const hexMatch = color.match(/#([0-9a-f]{3,8})/i);
|
|
647
|
+
if (hexMatch) {
|
|
648
|
+
const hex = hexMatch[1];
|
|
649
|
+
if (hex.length === 8) {
|
|
650
|
+
const alpha = Math.round(Number.parseInt(hex.slice(6, 8), 16) / 2).toString(16).padStart(2, "0");
|
|
651
|
+
return `#${hex.slice(0, 6)}${alpha}`;
|
|
652
|
+
} else if (hex.length === 6) return `#${hex}80`;
|
|
653
|
+
else if (hex.length === 4) {
|
|
654
|
+
const r = hex[0];
|
|
655
|
+
const g = hex[1];
|
|
656
|
+
const b = hex[2];
|
|
657
|
+
const a = hex[3];
|
|
658
|
+
return `#${r}${r}${g}${g}${b}${b}${Math.round(Number.parseInt(`${a}${a}`, 16) / 2).toString(16).padStart(2, "0")}`;
|
|
659
|
+
} else if (hex.length === 3) {
|
|
660
|
+
const r = hex[0];
|
|
661
|
+
const g = hex[1];
|
|
662
|
+
const b = hex[2];
|
|
663
|
+
return `#${r}${r}${g}${g}${b}${b}80`;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
const cssVarMatch = color.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
|
|
667
|
+
if (cssVarMatch) return `var(${cssVarMatch[1]}-dim)`;
|
|
668
|
+
return color;
|
|
627
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* Code to tokens, with a simple theme.
|
|
672
|
+
* This wraps the tokenizer's implementation to add ANSI support.
|
|
673
|
+
*/
|
|
628
674
|
function codeToTokensBase(primitive, code, options = {}) {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
675
|
+
const lang = primitive.resolveLangAlias(options.lang || "text");
|
|
676
|
+
const { theme: themeName = primitive.getLoadedThemes()[0] } = options;
|
|
677
|
+
if (!isPlainLang(lang) && !isNoneTheme(themeName) && lang === "ansi") {
|
|
678
|
+
const { theme } = primitive.setTheme(themeName);
|
|
679
|
+
return tokenizeAnsiWithTheme(theme, code, options);
|
|
680
|
+
}
|
|
681
|
+
return codeToTokensBase$1(primitive, code, options);
|
|
636
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* High-level code-to-tokens API.
|
|
685
|
+
*
|
|
686
|
+
* It will use `codeToTokensWithThemes` or `codeToTokensBase` based on the options.
|
|
687
|
+
*/
|
|
637
688
|
function codeToTokens(primitive, code, options) {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
689
|
+
let bg;
|
|
690
|
+
let fg;
|
|
691
|
+
let tokens;
|
|
692
|
+
let themeName;
|
|
693
|
+
let rootStyle;
|
|
694
|
+
let grammarState;
|
|
695
|
+
if ("themes" in options) {
|
|
696
|
+
const { defaultColor = "light", cssVariablePrefix = "--shiki-", colorsRendering = "css-vars" } = options;
|
|
697
|
+
const themes = Object.entries(options.themes).filter((i) => i[1]).map((i) => ({
|
|
698
|
+
color: i[0],
|
|
699
|
+
theme: i[1]
|
|
700
|
+
})).sort((a, b) => a.color === defaultColor ? -1 : b.color === defaultColor ? 1 : 0);
|
|
701
|
+
if (themes.length === 0) throw new ShikiError("`themes` option must not be empty");
|
|
702
|
+
const themeTokens = codeToTokensWithThemes(primitive, code, options, codeToTokensBase);
|
|
703
|
+
grammarState = getLastGrammarStateFromMap(themeTokens);
|
|
704
|
+
if (defaultColor && DEFAULT_COLOR_LIGHT_DARK !== defaultColor && !themes.find((t) => t.color === defaultColor)) throw new ShikiError(`\`themes\` option must contain the defaultColor key \`${defaultColor}\``);
|
|
705
|
+
const themeRegs = themes.map((t) => primitive.getTheme(t.theme));
|
|
706
|
+
const themesOrder = themes.map((t) => t.color);
|
|
707
|
+
tokens = themeTokens.map((line) => line.map((token) => flatTokenVariants(token, themesOrder, cssVariablePrefix, defaultColor, colorsRendering)));
|
|
708
|
+
if (grammarState) setLastGrammarStateToMap(tokens, grammarState);
|
|
709
|
+
const themeColorReplacements = themes.map((t) => resolveColorReplacements(t.theme, options));
|
|
710
|
+
fg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, "fg", colorsRendering);
|
|
711
|
+
bg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, "bg", colorsRendering);
|
|
712
|
+
themeName = `shiki-themes ${themeRegs.map((t) => t.name).join(" ")}`;
|
|
713
|
+
rootStyle = defaultColor ? void 0 : [fg, bg].join(";");
|
|
714
|
+
} else if ("theme" in options) {
|
|
715
|
+
const colorReplacements = resolveColorReplacements(options.theme, options);
|
|
716
|
+
tokens = codeToTokensBase(primitive, code, options);
|
|
717
|
+
const _theme = primitive.getTheme(options.theme);
|
|
718
|
+
bg = applyColorReplacements(_theme.bg, colorReplacements);
|
|
719
|
+
fg = applyColorReplacements(_theme.fg, colorReplacements);
|
|
720
|
+
themeName = _theme.name;
|
|
721
|
+
grammarState = getLastGrammarStateFromMap(tokens);
|
|
722
|
+
} else throw new ShikiError("Invalid options, either `theme` or `themes` must be provided");
|
|
723
|
+
return {
|
|
724
|
+
tokens,
|
|
725
|
+
fg,
|
|
726
|
+
bg,
|
|
727
|
+
themeName,
|
|
728
|
+
rootStyle,
|
|
729
|
+
grammarState
|
|
730
|
+
};
|
|
680
731
|
}
|
|
681
732
|
function mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, property, colorsRendering) {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
733
|
+
return themes.map((t, idx) => {
|
|
734
|
+
const value = applyColorReplacements(themeRegs[idx][property], themeColorReplacements[idx]) || "inherit";
|
|
735
|
+
const cssVar = `${cssVariablePrefix + t.color}${property === "bg" ? "-bg" : ""}:${value}`;
|
|
736
|
+
if (idx === 0 && defaultColor) {
|
|
737
|
+
if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && themes.length > 1) {
|
|
738
|
+
const lightIndex = themes.findIndex((t) => t.color === "light");
|
|
739
|
+
const darkIndex = themes.findIndex((t) => t.color === "dark");
|
|
740
|
+
if (lightIndex === -1 || darkIndex === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
|
|
741
|
+
return `light-dark(${applyColorReplacements(themeRegs[lightIndex][property], themeColorReplacements[lightIndex]) || "inherit"}, ${applyColorReplacements(themeRegs[darkIndex][property], themeColorReplacements[darkIndex]) || "inherit"});${cssVar}`;
|
|
742
|
+
}
|
|
743
|
+
return value;
|
|
744
|
+
}
|
|
745
|
+
if (colorsRendering === "css-vars") return cssVar;
|
|
746
|
+
return null;
|
|
747
|
+
}).filter((i) => !!i).join(";");
|
|
697
748
|
}
|
|
698
749
|
function codeToHast(primitive, code, options, transformerContext = {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
750
|
+
meta: {},
|
|
751
|
+
options,
|
|
752
|
+
codeToHast: (_code, _options) => codeToHast(primitive, _code, _options),
|
|
753
|
+
codeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)
|
|
703
754
|
}) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
755
|
+
let input = code;
|
|
756
|
+
for (const transformer of getTransformers(options)) input = transformer.preprocess?.call(transformerContext, input, options) || input;
|
|
757
|
+
let { tokens, fg, bg, themeName, rootStyle, grammarState } = codeToTokens(primitive, input, options);
|
|
758
|
+
const { mergeWhitespaces = true, mergeSameStyleTokens = false } = options;
|
|
759
|
+
if (mergeWhitespaces === true) tokens = mergeWhitespaceTokens(tokens);
|
|
760
|
+
else if (mergeWhitespaces === "never") tokens = splitWhitespaceTokens(tokens);
|
|
761
|
+
if (mergeSameStyleTokens) tokens = mergeAdjacentStyledTokens(tokens);
|
|
762
|
+
const contextSource = {
|
|
763
|
+
...transformerContext,
|
|
764
|
+
get source() {
|
|
765
|
+
return input;
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
for (const transformer of getTransformers(options)) tokens = transformer.tokens?.call(contextSource, tokens) || tokens;
|
|
769
|
+
return tokensToHast(tokens, {
|
|
770
|
+
...options,
|
|
771
|
+
fg,
|
|
772
|
+
bg,
|
|
773
|
+
themeName,
|
|
774
|
+
rootStyle: options.rootStyle === false ? false : options.rootStyle ?? rootStyle
|
|
775
|
+
}, contextSource, grammarState);
|
|
725
776
|
}
|
|
726
777
|
function tokensToHast(tokens, options, transformerContext, grammarState = getLastGrammarStateFromMap(tokens)) {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
778
|
+
const transformers = getTransformers(options);
|
|
779
|
+
const lines = [];
|
|
780
|
+
const root = {
|
|
781
|
+
type: "root",
|
|
782
|
+
children: []
|
|
783
|
+
};
|
|
784
|
+
const { structure = "classic", tabindex = "0" } = options;
|
|
785
|
+
const properties = { class: `shiki ${options.themeName || ""}` };
|
|
786
|
+
if (options.rootStyle !== false) if (options.rootStyle != null) properties.style = options.rootStyle;
|
|
787
|
+
else properties.style = `background-color:${options.bg};color:${options.fg}`;
|
|
788
|
+
if (tabindex !== false && tabindex != null) properties.tabindex = tabindex.toString();
|
|
789
|
+
for (const [key, value] of Object.entries(options.meta || {})) if (!key.startsWith("_")) properties[key] = value;
|
|
790
|
+
let preNode = {
|
|
791
|
+
type: "element",
|
|
792
|
+
tagName: "pre",
|
|
793
|
+
properties,
|
|
794
|
+
children: [],
|
|
795
|
+
data: options.data
|
|
796
|
+
};
|
|
797
|
+
let codeNode = {
|
|
798
|
+
type: "element",
|
|
799
|
+
tagName: "code",
|
|
800
|
+
properties: {},
|
|
801
|
+
children: lines
|
|
802
|
+
};
|
|
803
|
+
const lineNodes = [];
|
|
804
|
+
const context = {
|
|
805
|
+
...transformerContext,
|
|
806
|
+
structure,
|
|
807
|
+
addClassToHast,
|
|
808
|
+
get source() {
|
|
809
|
+
return transformerContext.source;
|
|
810
|
+
},
|
|
811
|
+
get tokens() {
|
|
812
|
+
return tokens;
|
|
813
|
+
},
|
|
814
|
+
get options() {
|
|
815
|
+
return options;
|
|
816
|
+
},
|
|
817
|
+
get root() {
|
|
818
|
+
return root;
|
|
819
|
+
},
|
|
820
|
+
get pre() {
|
|
821
|
+
return preNode;
|
|
822
|
+
},
|
|
823
|
+
get code() {
|
|
824
|
+
return codeNode;
|
|
825
|
+
},
|
|
826
|
+
get lines() {
|
|
827
|
+
return lineNodes;
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
tokens.forEach((line, idx) => {
|
|
831
|
+
if (idx) {
|
|
832
|
+
if (structure === "inline") root.children.push({
|
|
833
|
+
type: "element",
|
|
834
|
+
tagName: "br",
|
|
835
|
+
properties: {},
|
|
836
|
+
children: []
|
|
837
|
+
});
|
|
838
|
+
else if (structure === "classic") lines.push({
|
|
839
|
+
type: "text",
|
|
840
|
+
value: "\n"
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
let lineNode = {
|
|
844
|
+
type: "element",
|
|
845
|
+
tagName: "span",
|
|
846
|
+
properties: { class: "line" },
|
|
847
|
+
children: []
|
|
848
|
+
};
|
|
849
|
+
let col = 0;
|
|
850
|
+
for (const token of line) {
|
|
851
|
+
let tokenNode = {
|
|
852
|
+
type: "element",
|
|
853
|
+
tagName: "span",
|
|
854
|
+
properties: { ...token.htmlAttrs },
|
|
855
|
+
children: [{
|
|
856
|
+
type: "text",
|
|
857
|
+
value: token.content
|
|
858
|
+
}]
|
|
859
|
+
};
|
|
860
|
+
const style = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));
|
|
861
|
+
if (style) tokenNode.properties.style = style;
|
|
862
|
+
for (const transformer of transformers) tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode, token) || tokenNode;
|
|
863
|
+
if (structure === "inline") root.children.push(tokenNode);
|
|
864
|
+
else if (structure === "classic") lineNode.children.push(tokenNode);
|
|
865
|
+
col += token.content.length;
|
|
866
|
+
}
|
|
867
|
+
if (structure === "classic") {
|
|
868
|
+
for (const transformer of transformers) lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode;
|
|
869
|
+
lineNodes.push(lineNode);
|
|
870
|
+
lines.push(lineNode);
|
|
871
|
+
} else if (structure === "inline") lineNodes.push(lineNode);
|
|
872
|
+
});
|
|
873
|
+
if (structure === "classic") {
|
|
874
|
+
for (const transformer of transformers) codeNode = transformer?.code?.call(context, codeNode) || codeNode;
|
|
875
|
+
preNode.children.push(codeNode);
|
|
876
|
+
for (const transformer of transformers) preNode = transformer?.pre?.call(context, preNode) || preNode;
|
|
877
|
+
root.children.push(preNode);
|
|
878
|
+
} else if (structure === "inline") {
|
|
879
|
+
const syntheticLines = [];
|
|
880
|
+
let currentLine = {
|
|
881
|
+
type: "element",
|
|
882
|
+
tagName: "span",
|
|
883
|
+
properties: { class: "line" },
|
|
884
|
+
children: []
|
|
885
|
+
};
|
|
886
|
+
for (const child of root.children) if (child.type === "element" && child.tagName === "br") {
|
|
887
|
+
syntheticLines.push(currentLine);
|
|
888
|
+
currentLine = {
|
|
889
|
+
type: "element",
|
|
890
|
+
tagName: "span",
|
|
891
|
+
properties: { class: "line" },
|
|
892
|
+
children: []
|
|
893
|
+
};
|
|
894
|
+
} else if (child.type === "element" || child.type === "text") currentLine.children.push(child);
|
|
895
|
+
syntheticLines.push(currentLine);
|
|
896
|
+
let transformedCode = {
|
|
897
|
+
type: "element",
|
|
898
|
+
tagName: "code",
|
|
899
|
+
properties: {},
|
|
900
|
+
children: syntheticLines
|
|
901
|
+
};
|
|
902
|
+
for (const transformer of transformers) transformedCode = transformer?.code?.call(context, transformedCode) || transformedCode;
|
|
903
|
+
root.children = [];
|
|
904
|
+
for (let i = 0; i < transformedCode.children.length; i++) {
|
|
905
|
+
if (i > 0) root.children.push({
|
|
906
|
+
type: "element",
|
|
907
|
+
tagName: "br",
|
|
908
|
+
properties: {},
|
|
909
|
+
children: []
|
|
910
|
+
});
|
|
911
|
+
const line = transformedCode.children[i];
|
|
912
|
+
if (line.type === "element") root.children.push(...line.children);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
let result = root;
|
|
916
|
+
for (const transformer of transformers) result = transformer?.root?.call(context, result) || result;
|
|
917
|
+
if (grammarState) setLastGrammarStateToMap(result, grammarState);
|
|
918
|
+
return result;
|
|
868
919
|
}
|
|
869
920
|
function mergeWhitespaceTokens(tokens) {
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
921
|
+
return tokens.map((line) => {
|
|
922
|
+
const newLine = [];
|
|
923
|
+
let carryOnContent = "";
|
|
924
|
+
let firstOffset;
|
|
925
|
+
line.forEach((token, idx) => {
|
|
926
|
+
const couldMerge = !(token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough));
|
|
927
|
+
if (couldMerge && token.content.match(/^\s+$/) && line[idx + 1]) {
|
|
928
|
+
if (firstOffset === void 0) firstOffset = token.offset;
|
|
929
|
+
carryOnContent += token.content;
|
|
930
|
+
} else if (carryOnContent) {
|
|
931
|
+
if (couldMerge) newLine.push({
|
|
932
|
+
...token,
|
|
933
|
+
offset: firstOffset,
|
|
934
|
+
content: carryOnContent + token.content
|
|
935
|
+
});
|
|
936
|
+
else newLine.push({
|
|
937
|
+
content: carryOnContent,
|
|
938
|
+
offset: firstOffset
|
|
939
|
+
}, token);
|
|
940
|
+
firstOffset = void 0;
|
|
941
|
+
carryOnContent = "";
|
|
942
|
+
} else newLine.push(token);
|
|
943
|
+
});
|
|
944
|
+
return newLine;
|
|
945
|
+
});
|
|
895
946
|
}
|
|
896
947
|
function splitWhitespaceTokens(tokens) {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
948
|
+
return tokens.map((line) => {
|
|
949
|
+
return line.flatMap((token) => {
|
|
950
|
+
if (token.content.match(/^\s+$/)) return token;
|
|
951
|
+
const match = token.content.match(/^(\s*)(.*?)(\s*)$/);
|
|
952
|
+
if (!match) return token;
|
|
953
|
+
const [, leading, content, trailing] = match;
|
|
954
|
+
if (!leading && !trailing) return token;
|
|
955
|
+
const expanded = [{
|
|
956
|
+
...token,
|
|
957
|
+
offset: token.offset + leading.length,
|
|
958
|
+
content
|
|
959
|
+
}];
|
|
960
|
+
if (leading) expanded.unshift({
|
|
961
|
+
content: leading,
|
|
962
|
+
offset: token.offset
|
|
963
|
+
});
|
|
964
|
+
if (trailing) expanded.push({
|
|
965
|
+
content: trailing,
|
|
966
|
+
offset: token.offset + leading.length + content.length
|
|
967
|
+
});
|
|
968
|
+
return expanded;
|
|
969
|
+
});
|
|
970
|
+
});
|
|
920
971
|
}
|
|
921
972
|
function mergeAdjacentStyledTokens(tokens) {
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
973
|
+
return tokens.map((line) => {
|
|
974
|
+
const newLine = [];
|
|
975
|
+
for (const token of line) {
|
|
976
|
+
if (newLine.length === 0) {
|
|
977
|
+
newLine.push({ ...token });
|
|
978
|
+
continue;
|
|
979
|
+
}
|
|
980
|
+
const prevToken = newLine[newLine.length - 1];
|
|
981
|
+
const prevStyle = stringifyTokenStyle(prevToken.htmlStyle || getTokenStyleObject(prevToken));
|
|
982
|
+
const currentStyle = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));
|
|
983
|
+
const isPrevDecorated = prevToken.fontStyle && (prevToken.fontStyle & FontStyle.Underline || prevToken.fontStyle & FontStyle.Strikethrough);
|
|
984
|
+
const isDecorated = token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough);
|
|
985
|
+
if (!isPrevDecorated && !isDecorated && prevStyle === currentStyle) prevToken.content += token.content;
|
|
986
|
+
else newLine.push({ ...token });
|
|
987
|
+
}
|
|
988
|
+
return newLine;
|
|
989
|
+
});
|
|
939
990
|
}
|
|
940
|
-
|
|
991
|
+
var hastToHtml = toHtml;
|
|
992
|
+
/**
|
|
993
|
+
* Get highlighted code in HTML.
|
|
994
|
+
*/
|
|
941
995
|
function codeToHtml(primitive, code, options) {
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
996
|
+
const context = {
|
|
997
|
+
meta: {},
|
|
998
|
+
options,
|
|
999
|
+
codeToHast: (_code, _options) => codeToHast(primitive, _code, _options),
|
|
1000
|
+
codeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)
|
|
1001
|
+
};
|
|
1002
|
+
let result = hastToHtml(codeToHast(primitive, code, options, context));
|
|
1003
|
+
for (const transformer of getTransformers(options)) result = transformer.postprocess?.call(context, result, options) || result;
|
|
1004
|
+
return result;
|
|
951
1005
|
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Create a Shiki core highlighter instance, with no languages or themes bundled.
|
|
1008
|
+
* Wasm and each language and theme must be loaded manually.
|
|
1009
|
+
*
|
|
1010
|
+
* @see http://shiki.style/guide/bundles#fine-grained-bundle
|
|
1011
|
+
*/
|
|
952
1012
|
async function createHighlighterCore(options) {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
1013
|
+
const primitive = await createShikiPrimitiveAsync(options);
|
|
1014
|
+
return {
|
|
1015
|
+
getLastGrammarState: (...args) => getLastGrammarState(primitive, ...args),
|
|
1016
|
+
codeToTokensBase: (code, options) => codeToTokensBase(primitive, code, options),
|
|
1017
|
+
codeToTokensWithThemes: (code, options) => codeToTokensWithThemes(primitive, code, options),
|
|
1018
|
+
codeToTokens: (code, options) => codeToTokens(primitive, code, options),
|
|
1019
|
+
codeToHast: (code, options) => codeToHast(primitive, code, options),
|
|
1020
|
+
codeToHtml: (code, options) => codeToHtml(primitive, code, options),
|
|
1021
|
+
getBundledLanguages: () => ({}),
|
|
1022
|
+
getBundledThemes: () => ({}),
|
|
1023
|
+
...primitive,
|
|
1024
|
+
getInternalContext: () => primitive
|
|
1025
|
+
};
|
|
966
1026
|
}
|
|
967
1027
|
function createBundledHighlighter(options) {
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1028
|
+
const bundledLanguages = options.langs;
|
|
1029
|
+
const bundledThemes = options.themes;
|
|
1030
|
+
const engine = options.engine;
|
|
1031
|
+
async function createHighlighter(options) {
|
|
1032
|
+
function resolveLang(lang) {
|
|
1033
|
+
if (typeof lang === "string") {
|
|
1034
|
+
lang = options.langAlias?.[lang] || lang;
|
|
1035
|
+
if (isSpecialLang(lang)) return [];
|
|
1036
|
+
const bundle = bundledLanguages[lang];
|
|
1037
|
+
if (!bundle) throw new ShikiError(`Language \`${lang}\` is not included in this bundle. You may want to load it from external source.`);
|
|
1038
|
+
return bundle;
|
|
1039
|
+
}
|
|
1040
|
+
return lang;
|
|
1041
|
+
}
|
|
1042
|
+
function resolveTheme(theme) {
|
|
1043
|
+
if (isSpecialTheme(theme)) return "none";
|
|
1044
|
+
if (typeof theme === "string") {
|
|
1045
|
+
const bundle = bundledThemes[theme];
|
|
1046
|
+
if (!bundle) throw new ShikiError(`Theme \`${theme}\` is not included in this bundle. You may want to load it from external source.`);
|
|
1047
|
+
return bundle;
|
|
1048
|
+
}
|
|
1049
|
+
return theme;
|
|
1050
|
+
}
|
|
1051
|
+
const _themes = (options.themes ?? []).map((i) => resolveTheme(i));
|
|
1052
|
+
const langs = (options.langs ?? []).map((i) => resolveLang(i));
|
|
1053
|
+
const core = await createHighlighterCore({
|
|
1054
|
+
engine: options.engine ?? engine(),
|
|
1055
|
+
...options,
|
|
1056
|
+
themes: _themes,
|
|
1057
|
+
langs
|
|
1058
|
+
});
|
|
1059
|
+
return {
|
|
1060
|
+
...core,
|
|
1061
|
+
loadLanguage(...langs) {
|
|
1062
|
+
return core.loadLanguage(...langs.map(resolveLang));
|
|
1063
|
+
},
|
|
1064
|
+
loadTheme(...themes) {
|
|
1065
|
+
return core.loadTheme(...themes.map(resolveTheme));
|
|
1066
|
+
},
|
|
1067
|
+
getBundledLanguages() {
|
|
1068
|
+
return bundledLanguages;
|
|
1069
|
+
},
|
|
1070
|
+
getBundledThemes() {
|
|
1071
|
+
return bundledThemes;
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
return createHighlighter;
|
|
1016
1076
|
}
|
|
1017
1077
|
function makeSingletonHighlighter(createHighlighter) {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1078
|
+
let _shiki;
|
|
1079
|
+
async function getSingletonHighlighter(options = {}) {
|
|
1080
|
+
if (!_shiki) {
|
|
1081
|
+
_shiki = createHighlighter({
|
|
1082
|
+
...options,
|
|
1083
|
+
themes: [],
|
|
1084
|
+
langs: []
|
|
1085
|
+
});
|
|
1086
|
+
const s = await _shiki;
|
|
1087
|
+
await Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);
|
|
1088
|
+
return s;
|
|
1089
|
+
} else {
|
|
1090
|
+
const s = await _shiki;
|
|
1091
|
+
await Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);
|
|
1092
|
+
return s;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
return getSingletonHighlighter;
|
|
1036
1096
|
}
|
|
1037
1097
|
function createSingletonShorthands(createHighlighter, config) {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1098
|
+
const getSingletonHighlighter = makeSingletonHighlighter(createHighlighter);
|
|
1099
|
+
async function get(code, options) {
|
|
1100
|
+
const shiki = await getSingletonHighlighter({
|
|
1101
|
+
langs: [options.lang],
|
|
1102
|
+
themes: "theme" in options ? [options.theme] : Object.values(options.themes)
|
|
1103
|
+
});
|
|
1104
|
+
const langs = await config?.guessEmbeddedLanguages?.(code, options.lang, shiki);
|
|
1105
|
+
if (langs) await shiki.loadLanguage(...langs);
|
|
1106
|
+
return shiki;
|
|
1107
|
+
}
|
|
1108
|
+
return {
|
|
1109
|
+
getSingletonHighlighter(options) {
|
|
1110
|
+
return getSingletonHighlighter(options);
|
|
1111
|
+
},
|
|
1112
|
+
async codeToHtml(code, options) {
|
|
1113
|
+
return (await get(code, options)).codeToHtml(code, options);
|
|
1114
|
+
},
|
|
1115
|
+
async codeToHast(code, options) {
|
|
1116
|
+
return (await get(code, options)).codeToHast(code, options);
|
|
1117
|
+
},
|
|
1118
|
+
async codeToTokens(code, options) {
|
|
1119
|
+
return (await get(code, options)).codeToTokens(code, options);
|
|
1120
|
+
},
|
|
1121
|
+
async codeToTokensBase(code, options) {
|
|
1122
|
+
return (await get(code, options)).codeToTokensBase(code, options);
|
|
1123
|
+
},
|
|
1124
|
+
async codeToTokensWithThemes(code, options) {
|
|
1125
|
+
return (await get(code, options)).codeToTokensWithThemes(code, options);
|
|
1126
|
+
},
|
|
1127
|
+
async getLastGrammarState(code, options) {
|
|
1128
|
+
return (await getSingletonHighlighter({
|
|
1129
|
+
langs: [options.lang],
|
|
1130
|
+
themes: [options.theme]
|
|
1131
|
+
})).getLastGrammarState(code, options);
|
|
1132
|
+
}
|
|
1133
|
+
};
|
|
1074
1134
|
}
|
|
1075
|
-
export {
|
|
1076
|
-
ShikiError,
|
|
1077
|
-
addClassToHast,
|
|
1078
|
-
applyColorReplacements,
|
|
1079
|
-
codeToHast,
|
|
1080
|
-
codeToHtml,
|
|
1081
|
-
codeToTokens,
|
|
1082
|
-
codeToTokensBase,
|
|
1083
|
-
codeToTokensWithThemes,
|
|
1084
|
-
createBundledHighlighter,
|
|
1085
|
-
createHighlighterCore,
|
|
1086
|
-
createPositionConverter,
|
|
1087
|
-
createShikiPrimitive,
|
|
1088
|
-
createShikiPrimitiveAsync,
|
|
1089
|
-
createSingletonShorthands,
|
|
1090
|
-
flatTokenVariants,
|
|
1091
|
-
getLastGrammarState,
|
|
1092
|
-
getTokenStyleObject,
|
|
1093
|
-
guessEmbeddedLanguages,
|
|
1094
|
-
hastToHtml,
|
|
1095
|
-
isNoneTheme,
|
|
1096
|
-
isPlainLang,
|
|
1097
|
-
isSpecialLang,
|
|
1098
|
-
isSpecialTheme,
|
|
1099
|
-
makeSingletonHighlighter,
|
|
1100
|
-
normalizeGetter,
|
|
1101
|
-
normalizeTheme,
|
|
1102
|
-
resolveColorReplacements,
|
|
1103
|
-
splitLines,
|
|
1104
|
-
splitToken,
|
|
1105
|
-
splitTokens,
|
|
1106
|
-
stringifyTokenStyle,
|
|
1107
|
-
toArray,
|
|
1108
|
-
tokenizeAnsiWithTheme,
|
|
1109
|
-
tokenizeWithTheme,
|
|
1110
|
-
tokensToHast,
|
|
1111
|
-
transformerDecorations
|
|
1112
|
-
};
|
|
1135
|
+
export { addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, createBundledHighlighter, createHighlighterCore, createPositionConverter, createSingletonShorthands, flatTokenVariants, getLastGrammarState, getTokenStyleObject, guessEmbeddedLanguages, hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, makeSingletonHighlighter, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, tokenizeAnsiWithTheme, tokensToHast, transformerDecorations };
|