@songtonyli/dsh-cli 0.1.19 → 0.1.21
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/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +14 -16
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +14 -16
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +802 -387
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +4 -1
- package/node_modules/@shikijs/core/LICENSE +22 -0
- package/node_modules/@shikijs/core/README.md +5 -0
- package/node_modules/@shikijs/core/dist/index.mjs +1425 -0
- package/node_modules/@shikijs/core/dist/textmate.mjs +2 -0
- package/node_modules/@shikijs/core/dist/types.mjs +2 -0
- package/node_modules/@shikijs/core/package.json +55 -0
- package/node_modules/@shikijs/engine-javascript/LICENSE +22 -0
- package/node_modules/@shikijs/engine-javascript/README.md +9 -0
- package/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +47 -0
- package/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +27 -0
- package/node_modules/@shikijs/engine-javascript/dist/index.mjs +4 -0
- package/node_modules/@shikijs/engine-javascript/dist/scanner-DX8LRFGE.mjs +77 -0
- package/node_modules/@shikijs/engine-javascript/package.json +38 -0
- package/node_modules/@shikijs/engine-oniguruma/LICENSE +22 -0
- package/node_modules/@shikijs/engine-oniguruma/README.md +9 -0
- package/node_modules/@shikijs/engine-oniguruma/dist/index.mjs +449 -0
- package/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.mjs +8 -0
- package/node_modules/@shikijs/engine-oniguruma/package.json +41 -0
- package/node_modules/@shikijs/langs/LICENSE +22 -0
- package/node_modules/@shikijs/langs/README.md +7 -0
- package/node_modules/@shikijs/langs/dist/1c-query.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/1c.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/abap.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/actionscript-3.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/actionscript.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ada.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/adoc.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ahk.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/ahk1.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ahk2.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/angular-expression.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/angular-html.mjs +16 -0
- package/node_modules/@shikijs/langs/dist/angular-inline-style.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/angular-inline-template.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/angular-let-declaration.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/angular-template-blocks.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/angular-template.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/angular-ts.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/apache.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/apex.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/apl.mjs +16 -0
- package/node_modules/@shikijs/langs/dist/applescript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/ara.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/as3.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/asciidoc.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/asm.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/astro.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/awk.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/ballerina.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/bash.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/bat.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/batch.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/be.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/beancount.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/berry.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/bibtex.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/bicep.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/bird.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/bird2.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/blade.mjs +20 -0
- package/node_modules/@shikijs/langs/dist/bsl.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/c.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/c3.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/cadence.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/cairo.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/cdc.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/chapel.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/chpl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/cjs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/clarity.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/clj.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/clojure.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/closure-templates.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/cmake.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/cmd.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/cobol.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/codeowners.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/codeql.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/coffee.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/coffeescript.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/common-lisp.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/console.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/coq.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/cpp-macro.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/cpp.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/cql.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/crystal.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/cs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/csharp.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/css.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/csv.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/cts.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/cue.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/cypher.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/d.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/dart.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/dax.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/desktop.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/diff.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/docker.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/dockerfile.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/dotenv.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/dream-maker.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/edge.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/elisp.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/elixir.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/elm.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/emacs-lisp.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/erb.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/erl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/erlang.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/es-tag-css.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/es-tag-glsl.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/es-tag-html.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/es-tag-sql.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/es-tag-xml.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/f.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/f03.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/f08.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/f18.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/f77.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/f90.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/f95.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/fennel.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/fish.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/fluent.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/for.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/fortran-fixed-form.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/fortran-free-form.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/fs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/fsharp.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/fsl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ftl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/gd.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/gdresource.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/gdscript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/gdshader.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/genie.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/gherkin.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/git-commit.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/git-rebase.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/gjs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/gleam.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/glimmer-js.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/glimmer-ts.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/glsl.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/gn.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/gnuplot.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/go.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/gql.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/graphql.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/groovy.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/gts.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/hack.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/haml.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/handlebars.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/haskell.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/haxe.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/hbs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/hcl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/hjson.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/hlsl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/hs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/html-derivative.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/html.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/http.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/hurl.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/hxml.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/hy.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/imba.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/index.mjs +367 -0
- package/node_modules/@shikijs/langs/dist/ini.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/jade.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/java.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/javascript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/jinja-html.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/jinja.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/jison.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/jl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/js.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/json.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/json5.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/jsonc.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/jsonl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/jsonnet.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/jssm.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/jsx.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/julia.mjs +16 -0
- package/node_modules/@shikijs/langs/dist/just.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/justfile.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/kdl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/kotlin.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/kql.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/kt.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/kts.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/kusto.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/latex.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/lean.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/lean4.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/less.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/liquid.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/lisp.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/lit.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/llvm.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/log.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/logo.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/lua.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/luau.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/make.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/makefile.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/markdown-nix.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/markdown-vue.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/markdown.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/marko.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/matlab.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/mbt.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/mbti.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/md.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/mdc.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/mdx.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/mediawiki.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/mermaid.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/mips.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/mipsasm.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/mjs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/mmd.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/mojo.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/moonbit.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/move.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/mts.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/nar.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/narrat.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/nextflow-groovy.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/nextflow.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/nf.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/nginx.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/nim.mjs +20 -0
- package/node_modules/@shikijs/langs/dist/nix.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/nsis.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/nu.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/nushell.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/objc.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/objective-c.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/objective-cpp.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/ocaml.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/odin.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/openscad.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/org.mjs +100 -0
- package/node_modules/@shikijs/langs/dist/pascal.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/perl.mjs +16 -0
- package/node_modules/@shikijs/langs/dist/perl6.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/php.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/pkl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/plsql.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/po.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/polar.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/postcss.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/pot.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/potx.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/powerquery.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/powershell.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/prisma.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/prolog.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/properties.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/proto.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/protobuf.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ps.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ps1.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/pug.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/puppet.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/purescript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/pwsh.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/py.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/python.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/ql.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/qml.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/qmldir.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/qss.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/r.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/racket.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/raku.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/razor.mjs +10 -0
- package/node_modules/@shikijs/langs/dist/rb.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/rbs.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/reg.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/regex.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/regexp.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/rel.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/riscv.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/ron.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/rosmsg.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/rs.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/rst.mjs +22 -0
- package/node_modules/@shikijs/langs/dist/ruby-signature.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ruby.mjs +30 -0
- package/node_modules/@shikijs/langs/dist/rust.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/sas.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/sass.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/scad.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/scala.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/scheme.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/scss.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/sdbl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/sh.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/shader.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/shaderlab.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/shell.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/shellscript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/shellsession.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/smalltalk.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/smithy.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/solidity.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/soy.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/sparql.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/spl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/splunk.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/sql.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/ssh-config.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/stata.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/styl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/stylus.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/surql.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/surrealql.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/svelte.mjs +14 -0
- package/node_modules/@shikijs/langs/dist/swift.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/system-verilog.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/systemd.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/talon.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/talonscript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/tasl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/tcl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/templ.mjs +12 -0
- package/node_modules/@shikijs/langs/dist/terraform.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/tex.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/tf.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/tfvars.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/toml.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/tres.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/ts-tags.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/ts.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/tscn.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/tsp.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/tsv.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/tsx.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/turtle.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/twig.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/typ.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/typescript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/typespec.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/typst.mjs +120 -0
- package/node_modules/@shikijs/langs/dist/v.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/vala.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/vb.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/verilog.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/vhdl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/vim.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/viml.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/vimscript.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/vue-directives.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/vue-html.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/vue-interpolations.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/vue-vine.mjs +18 -0
- package/node_modules/@shikijs/langs/dist/vue.mjs +26 -0
- package/node_modules/@shikijs/langs/dist/vy.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/vyper.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/wasm.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/wenyan.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/wgsl.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/wiki.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/wikitext.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/wit.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/wl.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/wolfram.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/xml.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/xsl.mjs +8 -0
- package/node_modules/@shikijs/langs/dist/yaml.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/yml.mjs +2 -0
- package/node_modules/@shikijs/langs/dist/zenscript.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/zig.mjs +5 -0
- package/node_modules/@shikijs/langs/dist/zsh.mjs +2 -0
- package/node_modules/@shikijs/langs/package.json +398 -0
- package/node_modules/@shikijs/primitive/LICENSE +22 -0
- package/node_modules/@shikijs/primitive/dist/index.mjs +834 -0
- package/node_modules/@shikijs/primitive/dist/textmate.mjs +2 -0
- package/node_modules/@shikijs/primitive/dist/types.mjs +2 -0
- package/node_modules/@shikijs/primitive/package.json +51 -0
- package/node_modules/@shikijs/themes/LICENSE +22 -0
- package/node_modules/@shikijs/themes/README.md +7 -0
- package/node_modules/@shikijs/themes/dist/andromeeda.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/aurora-x.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/ayu-dark.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/ayu-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/ayu-mirage.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/catppuccin-frappe.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/catppuccin-latte.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/catppuccin-macchiato.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/catppuccin-mocha.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/dark-plus.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/dracula-soft.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/dracula.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/everforest-dark.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/everforest-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/github-dark-default.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/github-dark-dimmed.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/github-dark-high-contrast.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/github-dark.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/github-light-default.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/github-light-high-contrast.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/github-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/gruvbox-light-hard.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/gruvbox-light-medium.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/gruvbox-light-soft.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/horizon-bright.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/horizon.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/houston.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/index.mjs +67 -0
- package/node_modules/@shikijs/themes/dist/kanagawa-dragon.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/kanagawa-lotus.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/kanagawa-wave.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/laserwave.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/light-plus.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/material-theme-darker.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/material-theme-lighter.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/material-theme-ocean.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/material-theme-palenight.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/material-theme.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/min-dark.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/min-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/monokai.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/night-owl-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/night-owl.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/nord.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/one-dark-pro.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/one-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/plastic.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/poimandres.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/red.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/rose-pine-dawn.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/rose-pine-moon.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/rose-pine.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/slack-dark.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/slack-ochin.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/snazzy-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/solarized-dark.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/solarized-light.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/synthwave-84.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/tokyo-night.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/vesper.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/vitesse-black.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/vitesse-dark.mjs +2 -0
- package/node_modules/@shikijs/themes/dist/vitesse-light.mjs +2 -0
- package/node_modules/@shikijs/themes/package.json +103 -0
- package/node_modules/@shikijs/types/LICENSE +22 -0
- package/node_modules/@shikijs/types/README.md +7 -0
- package/node_modules/@shikijs/types/dist/index.mjs +9 -0
- package/node_modules/@shikijs/types/package.json +35 -0
- package/node_modules/@shikijs/vscode-textmate/LICENSE.md +21 -0
- package/node_modules/@shikijs/vscode-textmate/README.md +9 -0
- package/node_modules/@shikijs/vscode-textmate/dist/index.js +3216 -0
- package/node_modules/@shikijs/vscode-textmate/package.json +35 -0
- package/node_modules/@types/hast/LICENSE +21 -0
- package/node_modules/@types/hast/README.md +15 -0
- package/node_modules/@types/hast/package.json +47 -0
- package/node_modules/@types/mdast/LICENSE +21 -0
- package/node_modules/@types/mdast/README.md +15 -0
- package/node_modules/@types/mdast/package.json +46 -0
- package/node_modules/@types/unist/LICENSE +21 -0
- package/node_modules/@types/unist/README.md +15 -0
- package/node_modules/@types/unist/package.json +59 -0
- package/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml +31 -0
- package/node_modules/@ungap/structured-clone/LICENSE +15 -0
- package/node_modules/@ungap/structured-clone/README.md +95 -0
- package/node_modules/@ungap/structured-clone/cjs/deserialize.js +112 -0
- package/node_modules/@ungap/structured-clone/cjs/index.js +27 -0
- package/node_modules/@ungap/structured-clone/cjs/json.js +24 -0
- package/node_modules/@ungap/structured-clone/cjs/package.json +1 -0
- package/node_modules/@ungap/structured-clone/cjs/serialize.js +174 -0
- package/node_modules/@ungap/structured-clone/cjs/types.js +22 -0
- package/node_modules/@ungap/structured-clone/esm/deserialize.js +113 -0
- package/node_modules/@ungap/structured-clone/esm/index.js +25 -0
- package/node_modules/@ungap/structured-clone/esm/json.js +21 -0
- package/node_modules/@ungap/structured-clone/esm/serialize.js +175 -0
- package/node_modules/@ungap/structured-clone/esm/types.js +11 -0
- package/node_modules/@ungap/structured-clone/package.json +52 -0
- package/node_modules/@ungap/structured-clone/structured-json.js +1 -0
- package/node_modules/ccount/index.js +27 -0
- package/node_modules/ccount/license +22 -0
- package/node_modules/ccount/package.json +63 -0
- package/node_modules/ccount/readme.md +149 -0
- package/node_modules/character-entities-html4/index.js +259 -0
- package/node_modules/character-entities-html4/license +22 -0
- package/node_modules/character-entities-html4/package.json +70 -0
- package/node_modules/character-entities-html4/readme.md +153 -0
- package/node_modules/character-entities-legacy/index.js +113 -0
- package/node_modules/character-entities-legacy/license +22 -0
- package/node_modules/character-entities-legacy/package.json +68 -0
- package/node_modules/character-entities-legacy/readme.md +157 -0
- package/node_modules/comma-separated-tokens/index.js +74 -0
- package/node_modules/comma-separated-tokens/license +22 -0
- package/node_modules/comma-separated-tokens/package.json +64 -0
- package/node_modules/comma-separated-tokens/readme.md +167 -0
- package/node_modules/dequal/dist/index.js +86 -0
- package/node_modules/dequal/dist/index.min.js +1 -0
- package/node_modules/dequal/dist/index.mjs +84 -0
- package/node_modules/dequal/license +21 -0
- package/node_modules/dequal/lite/index.js +31 -0
- package/node_modules/dequal/lite/index.min.js +1 -0
- package/node_modules/dequal/lite/index.mjs +29 -0
- package/node_modules/dequal/package.json +51 -0
- package/node_modules/dequal/readme.md +112 -0
- package/node_modules/devlop/lib/default.js +9 -0
- package/node_modules/devlop/lib/development.js +238 -0
- package/node_modules/devlop/license +22 -0
- package/node_modules/devlop/package.json +70 -0
- package/node_modules/devlop/readme.md +360 -0
- package/node_modules/hast-util-to-html/index.js +8 -0
- package/node_modules/hast-util-to-html/lib/handle/comment.js +52 -0
- package/node_modules/hast-util-to-html/lib/handle/doctype.js +27 -0
- package/node_modules/hast-util-to-html/lib/handle/element.js +265 -0
- package/node_modules/hast-util-to-html/lib/handle/index.js +47 -0
- package/node_modules/hast-util-to-html/lib/handle/raw.js +27 -0
- package/node_modules/hast-util-to-html/lib/handle/root.js +22 -0
- package/node_modules/hast-util-to-html/lib/handle/text.js +38 -0
- package/node_modules/hast-util-to-html/lib/index.js +257 -0
- package/node_modules/hast-util-to-html/lib/omission/closing.js +358 -0
- package/node_modules/hast-util-to-html/lib/omission/omission.js +44 -0
- package/node_modules/hast-util-to-html/lib/omission/opening.js +148 -0
- package/node_modules/hast-util-to-html/lib/omission/util/siblings.js +50 -0
- package/node_modules/hast-util-to-html/license +22 -0
- package/node_modules/hast-util-to-html/package.json +99 -0
- package/node_modules/hast-util-to-html/readme.md +486 -0
- package/node_modules/hast-util-whitespace/index.js +1 -0
- package/node_modules/hast-util-whitespace/lib/index.js +34 -0
- package/node_modules/hast-util-whitespace/license +22 -0
- package/node_modules/hast-util-whitespace/package.json +75 -0
- package/node_modules/hast-util-whitespace/readme.md +231 -0
- package/node_modules/html-void-elements/index.js +27 -0
- package/node_modules/html-void-elements/license +22 -0
- package/node_modules/html-void-elements/package.json +70 -0
- package/node_modules/html-void-elements/readme.md +164 -0
- package/node_modules/mdast-util-to-hast/index.js +7 -0
- package/node_modules/mdast-util-to-hast/lib/footer.js +250 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +27 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/break.js +22 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/code.js +49 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/delete.js +27 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +27 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +70 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/heading.js +27 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/html.js +28 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +39 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/image.js +35 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/index.js +68 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +31 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +44 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/link.js +36 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +119 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/list.js +52 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +27 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/root.js +22 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/strong.js +27 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +29 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +63 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/table.js +61 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/text.js +24 -0
- package/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +27 -0
- package/node_modules/mdast-util-to-hast/lib/index.js +106 -0
- package/node_modules/mdast-util-to-hast/lib/revert.js +49 -0
- package/node_modules/mdast-util-to-hast/lib/state.js +476 -0
- package/node_modules/mdast-util-to-hast/license +22 -0
- package/node_modules/mdast-util-to-hast/package.json +111 -0
- package/node_modules/mdast-util-to-hast/readme.md +1725 -0
- package/node_modules/micromark-util-character/dev/index.js +252 -0
- package/node_modules/micromark-util-character/index.js +246 -0
- package/node_modules/micromark-util-character/license +22 -0
- package/node_modules/micromark-util-character/package.json +54 -0
- package/node_modules/micromark-util-character/readme.md +446 -0
- package/node_modules/micromark-util-encode/index.js +33 -0
- package/node_modules/micromark-util-encode/license +22 -0
- package/node_modules/micromark-util-encode/package.json +47 -0
- package/node_modules/micromark-util-encode/readme.md +176 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
- package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
- package/node_modules/micromark-util-sanitize-uri/license +22 -0
- package/node_modules/micromark-util-sanitize-uri/package.json +56 -0
- package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
- package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
- package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
- package/node_modules/micromark-util-symbol/lib/default.js +4 -0
- package/node_modules/micromark-util-symbol/lib/types.js +453 -0
- package/node_modules/micromark-util-symbol/lib/values.js +109 -0
- package/node_modules/micromark-util-symbol/license +22 -0
- package/node_modules/micromark-util-symbol/package.json +43 -0
- package/node_modules/micromark-util-symbol/readme.md +168 -0
- package/node_modules/micromark-util-types/index.js +2 -0
- package/node_modules/micromark-util-types/license +22 -0
- package/node_modules/micromark-util-types/package.json +71 -0
- package/node_modules/micromark-util-types/readme.md +151 -0
- package/node_modules/oniguruma-parser/LICENSE +21 -0
- package/node_modules/oniguruma-parser/README.md +310 -0
- package/node_modules/oniguruma-parser/dist/bundle.js +2 -0
- package/node_modules/oniguruma-parser/dist/generator/generate.js +2 -0
- package/node_modules/oniguruma-parser/dist/index.js +2 -0
- package/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js +904 -0
- package/node_modules/oniguruma-parser/dist/optimizer/optimizations.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/optimize.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/alternation-to-class.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/expose-anchors.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/extract-prefix-2.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/extract-prefix.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/extract-suffix.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/merge-ranges.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/optionalize.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/prevent-redos.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/remove-empty-groups.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/remove-useless-flags.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/simplify-callouts.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/unnest-useless-classes.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/unwrap-negation-wrappers.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/unwrap-useless-classes.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/unwrap-useless-groups.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/use-shorthands.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/use-unicode-aliases.js +2 -0
- package/node_modules/oniguruma-parser/dist/optimizer/transforms/use-unicode-props.js +2 -0
- package/node_modules/oniguruma-parser/dist/parser/node-utils.js +2 -0
- package/node_modules/oniguruma-parser/dist/parser/parse.js +2 -0
- package/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js +34 -0
- package/node_modules/oniguruma-parser/dist/traverser/traverse.js +2 -0
- package/node_modules/oniguruma-parser/dist/unicode.js +872 -0
- package/node_modules/oniguruma-parser/dist/utils.js +2 -0
- package/node_modules/oniguruma-parser/package.json +56 -0
- package/node_modules/oniguruma-to-es/LICENSE +21 -0
- package/node_modules/oniguruma-to-es/README.md +1110 -0
- package/node_modules/oniguruma-to-es/dist/cjs/index.js +3145 -0
- package/node_modules/oniguruma-to-es/dist/cjs/package.json +1 -0
- package/node_modules/oniguruma-to-es/dist/esm/index.js +1878 -0
- package/node_modules/oniguruma-to-es/dist/esm/package.json +1 -0
- package/node_modules/oniguruma-to-es/dist/index.min.js +142 -0
- package/node_modules/oniguruma-to-es/package.json +49 -0
- package/node_modules/property-information/index.js +17 -0
- package/node_modules/property-information/lib/aria.js +61 -0
- package/node_modules/property-information/lib/find.js +97 -0
- package/node_modules/property-information/lib/hast-to-react.js +30 -0
- package/node_modules/property-information/lib/html.js +332 -0
- package/node_modules/property-information/lib/normalize.js +12 -0
- package/node_modules/property-information/lib/svg.js +569 -0
- package/node_modules/property-information/lib/util/case-insensitive-transform.js +13 -0
- package/node_modules/property-information/lib/util/case-sensitive-transform.js +11 -0
- package/node_modules/property-information/lib/util/create.js +69 -0
- package/node_modules/property-information/lib/util/defined-info.js +60 -0
- package/node_modules/property-information/lib/util/info.js +32 -0
- package/node_modules/property-information/lib/util/merge.js +27 -0
- package/node_modules/property-information/lib/util/schema.js +29 -0
- package/node_modules/property-information/lib/util/types.js +13 -0
- package/node_modules/property-information/lib/xlink.js +17 -0
- package/node_modules/property-information/lib/xml.js +9 -0
- package/node_modules/property-information/lib/xmlns.js +9 -0
- package/node_modules/property-information/license +22 -0
- package/node_modules/property-information/package.json +76 -0
- package/node_modules/property-information/readme.md +1073 -0
- package/node_modules/regex/LICENSE +21 -0
- package/node_modules/regex/README.md +972 -0
- package/node_modules/regex/dist/cjs/package.json +1 -0
- package/node_modules/regex/dist/cjs/regex.js +1335 -0
- package/node_modules/regex/dist/esm/package.json +1 -0
- package/node_modules/regex/dist/esm/regex.js +1313 -0
- package/node_modules/regex/dist/regex.min.js +76 -0
- package/node_modules/regex/package.json +49 -0
- package/node_modules/regex/src/atomic.js +224 -0
- package/node_modules/regex/src/backcompat.js +64 -0
- package/node_modules/regex/src/flag-n.js +49 -0
- package/node_modules/regex/src/flag-x.js +198 -0
- package/node_modules/regex/src/internals.js +2 -0
- package/node_modules/regex/src/pattern.js +45 -0
- package/node_modules/regex/src/regex.js +389 -0
- package/node_modules/regex/src/subclass.js +98 -0
- package/node_modules/regex/src/subroutines.js +375 -0
- package/node_modules/regex/src/utils-internals.js +33 -0
- package/node_modules/regex/src/utils.js +401 -0
- package/node_modules/regex-recursion/LICENSE +21 -0
- package/node_modules/regex-recursion/README.md +151 -0
- package/node_modules/regex-recursion/dist/regex-recursion.min.js +2 -0
- package/node_modules/regex-recursion/package.json +39 -0
- package/node_modules/regex-recursion/src/index.js +365 -0
- package/node_modules/regex-utilities/LICENSE +21 -0
- package/node_modules/regex-utilities/README.md +78 -0
- package/node_modules/regex-utilities/package.json +27 -0
- package/node_modules/regex-utilities/src/index.js +170 -0
- package/node_modules/shiki/LICENSE +22 -0
- package/node_modules/shiki/README.md +15 -0
- package/node_modules/shiki/dist/bundle-full.mjs +25 -0
- package/node_modules/shiki/dist/bundle-web.mjs +347 -0
- package/node_modules/shiki/dist/core-unwasm.mjs +10 -0
- package/node_modules/shiki/dist/core.mjs +3 -0
- package/node_modules/shiki/dist/engine-javascript.mjs +2 -0
- package/node_modules/shiki/dist/engine-oniguruma.mjs +8 -0
- package/node_modules/shiki/dist/index.mjs +8 -0
- package/node_modules/shiki/dist/langs/1c-query.mjs +1 -0
- package/node_modules/shiki/dist/langs/1c.mjs +1 -0
- package/node_modules/shiki/dist/langs/abap.mjs +1 -0
- package/node_modules/shiki/dist/langs/actionscript-3.mjs +1 -0
- package/node_modules/shiki/dist/langs/actionscript.mjs +1 -0
- package/node_modules/shiki/dist/langs/ada.mjs +1 -0
- package/node_modules/shiki/dist/langs/adoc.mjs +1 -0
- package/node_modules/shiki/dist/langs/ahk.mjs +1 -0
- package/node_modules/shiki/dist/langs/ahk1.mjs +1 -0
- package/node_modules/shiki/dist/langs/ahk2.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-expression.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-html.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-inline-style.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-inline-template.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-let-declaration.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-template-blocks.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-template.mjs +1 -0
- package/node_modules/shiki/dist/langs/angular-ts.mjs +1 -0
- package/node_modules/shiki/dist/langs/apache.mjs +1 -0
- package/node_modules/shiki/dist/langs/apex.mjs +1 -0
- package/node_modules/shiki/dist/langs/apl.mjs +1 -0
- package/node_modules/shiki/dist/langs/applescript.mjs +1 -0
- package/node_modules/shiki/dist/langs/ara.mjs +1 -0
- package/node_modules/shiki/dist/langs/as3.mjs +1 -0
- package/node_modules/shiki/dist/langs/asciidoc.mjs +1 -0
- package/node_modules/shiki/dist/langs/asm.mjs +1 -0
- package/node_modules/shiki/dist/langs/astro.mjs +1 -0
- package/node_modules/shiki/dist/langs/awk.mjs +1 -0
- package/node_modules/shiki/dist/langs/ballerina.mjs +1 -0
- package/node_modules/shiki/dist/langs/bash.mjs +1 -0
- package/node_modules/shiki/dist/langs/bat.mjs +1 -0
- package/node_modules/shiki/dist/langs/batch.mjs +1 -0
- package/node_modules/shiki/dist/langs/be.mjs +1 -0
- package/node_modules/shiki/dist/langs/beancount.mjs +1 -0
- package/node_modules/shiki/dist/langs/berry.mjs +1 -0
- package/node_modules/shiki/dist/langs/bibtex.mjs +1 -0
- package/node_modules/shiki/dist/langs/bicep.mjs +1 -0
- package/node_modules/shiki/dist/langs/bird.mjs +1 -0
- package/node_modules/shiki/dist/langs/bird2.mjs +1 -0
- package/node_modules/shiki/dist/langs/blade.mjs +1 -0
- package/node_modules/shiki/dist/langs/bsl.mjs +1 -0
- package/node_modules/shiki/dist/langs/c.mjs +1 -0
- package/node_modules/shiki/dist/langs/c3.mjs +1 -0
- package/node_modules/shiki/dist/langs/cadence.mjs +1 -0
- package/node_modules/shiki/dist/langs/cairo.mjs +1 -0
- package/node_modules/shiki/dist/langs/cdc.mjs +1 -0
- package/node_modules/shiki/dist/langs/chapel.mjs +1 -0
- package/node_modules/shiki/dist/langs/chpl.mjs +1 -0
- package/node_modules/shiki/dist/langs/cjs.mjs +1 -0
- package/node_modules/shiki/dist/langs/clarity.mjs +1 -0
- package/node_modules/shiki/dist/langs/clj.mjs +1 -0
- package/node_modules/shiki/dist/langs/clojure.mjs +1 -0
- package/node_modules/shiki/dist/langs/closure-templates.mjs +1 -0
- package/node_modules/shiki/dist/langs/cmake.mjs +1 -0
- package/node_modules/shiki/dist/langs/cmd.mjs +1 -0
- package/node_modules/shiki/dist/langs/cobol.mjs +1 -0
- package/node_modules/shiki/dist/langs/codeowners.mjs +1 -0
- package/node_modules/shiki/dist/langs/codeql.mjs +1 -0
- package/node_modules/shiki/dist/langs/coffee.mjs +1 -0
- package/node_modules/shiki/dist/langs/coffeescript.mjs +1 -0
- package/node_modules/shiki/dist/langs/common-lisp.mjs +1 -0
- package/node_modules/shiki/dist/langs/console.mjs +1 -0
- package/node_modules/shiki/dist/langs/coq.mjs +1 -0
- package/node_modules/shiki/dist/langs/cpp-macro.mjs +1 -0
- package/node_modules/shiki/dist/langs/cpp.mjs +1 -0
- package/node_modules/shiki/dist/langs/cql.mjs +1 -0
- package/node_modules/shiki/dist/langs/crystal.mjs +1 -0
- package/node_modules/shiki/dist/langs/cs.mjs +1 -0
- package/node_modules/shiki/dist/langs/csharp.mjs +1 -0
- package/node_modules/shiki/dist/langs/css.mjs +1 -0
- package/node_modules/shiki/dist/langs/csv.mjs +1 -0
- package/node_modules/shiki/dist/langs/cts.mjs +1 -0
- package/node_modules/shiki/dist/langs/cue.mjs +1 -0
- package/node_modules/shiki/dist/langs/cypher.mjs +1 -0
- package/node_modules/shiki/dist/langs/d.mjs +1 -0
- package/node_modules/shiki/dist/langs/dart.mjs +1 -0
- package/node_modules/shiki/dist/langs/dax.mjs +1 -0
- package/node_modules/shiki/dist/langs/desktop.mjs +1 -0
- package/node_modules/shiki/dist/langs/diff.mjs +1 -0
- package/node_modules/shiki/dist/langs/docker.mjs +1 -0
- package/node_modules/shiki/dist/langs/dockerfile.mjs +1 -0
- package/node_modules/shiki/dist/langs/dotenv.mjs +1 -0
- package/node_modules/shiki/dist/langs/dream-maker.mjs +1 -0
- package/node_modules/shiki/dist/langs/edge.mjs +1 -0
- package/node_modules/shiki/dist/langs/elisp.mjs +1 -0
- package/node_modules/shiki/dist/langs/elixir.mjs +1 -0
- package/node_modules/shiki/dist/langs/elm.mjs +1 -0
- package/node_modules/shiki/dist/langs/emacs-lisp.mjs +1 -0
- package/node_modules/shiki/dist/langs/erb.mjs +1 -0
- package/node_modules/shiki/dist/langs/erl.mjs +1 -0
- package/node_modules/shiki/dist/langs/erlang.mjs +1 -0
- package/node_modules/shiki/dist/langs/es-tag-css.mjs +1 -0
- package/node_modules/shiki/dist/langs/es-tag-glsl.mjs +1 -0
- package/node_modules/shiki/dist/langs/es-tag-html.mjs +1 -0
- package/node_modules/shiki/dist/langs/es-tag-sql.mjs +1 -0
- package/node_modules/shiki/dist/langs/es-tag-xml.mjs +1 -0
- package/node_modules/shiki/dist/langs/f.mjs +1 -0
- package/node_modules/shiki/dist/langs/f03.mjs +1 -0
- package/node_modules/shiki/dist/langs/f08.mjs +1 -0
- package/node_modules/shiki/dist/langs/f18.mjs +1 -0
- package/node_modules/shiki/dist/langs/f77.mjs +1 -0
- package/node_modules/shiki/dist/langs/f90.mjs +1 -0
- package/node_modules/shiki/dist/langs/f95.mjs +1 -0
- package/node_modules/shiki/dist/langs/fennel.mjs +1 -0
- package/node_modules/shiki/dist/langs/fish.mjs +1 -0
- package/node_modules/shiki/dist/langs/fluent.mjs +1 -0
- package/node_modules/shiki/dist/langs/for.mjs +1 -0
- package/node_modules/shiki/dist/langs/fortran-fixed-form.mjs +1 -0
- package/node_modules/shiki/dist/langs/fortran-free-form.mjs +1 -0
- package/node_modules/shiki/dist/langs/fs.mjs +1 -0
- package/node_modules/shiki/dist/langs/fsharp.mjs +1 -0
- package/node_modules/shiki/dist/langs/fsl.mjs +1 -0
- package/node_modules/shiki/dist/langs/ftl.mjs +1 -0
- package/node_modules/shiki/dist/langs/gd.mjs +1 -0
- package/node_modules/shiki/dist/langs/gdresource.mjs +1 -0
- package/node_modules/shiki/dist/langs/gdscript.mjs +1 -0
- package/node_modules/shiki/dist/langs/gdshader.mjs +1 -0
- package/node_modules/shiki/dist/langs/genie.mjs +1 -0
- package/node_modules/shiki/dist/langs/gherkin.mjs +1 -0
- package/node_modules/shiki/dist/langs/git-commit.mjs +1 -0
- package/node_modules/shiki/dist/langs/git-rebase.mjs +1 -0
- package/node_modules/shiki/dist/langs/gjs.mjs +1 -0
- package/node_modules/shiki/dist/langs/gleam.mjs +1 -0
- package/node_modules/shiki/dist/langs/glimmer-js.mjs +1 -0
- package/node_modules/shiki/dist/langs/glimmer-ts.mjs +1 -0
- package/node_modules/shiki/dist/langs/glsl.mjs +1 -0
- package/node_modules/shiki/dist/langs/gn.mjs +1 -0
- package/node_modules/shiki/dist/langs/gnuplot.mjs +1 -0
- package/node_modules/shiki/dist/langs/go.mjs +1 -0
- package/node_modules/shiki/dist/langs/gql.mjs +1 -0
- package/node_modules/shiki/dist/langs/graphql.mjs +1 -0
- package/node_modules/shiki/dist/langs/groovy.mjs +1 -0
- package/node_modules/shiki/dist/langs/gts.mjs +1 -0
- package/node_modules/shiki/dist/langs/hack.mjs +1 -0
- package/node_modules/shiki/dist/langs/haml.mjs +1 -0
- package/node_modules/shiki/dist/langs/handlebars.mjs +1 -0
- package/node_modules/shiki/dist/langs/haskell.mjs +1 -0
- package/node_modules/shiki/dist/langs/haxe.mjs +1 -0
- package/node_modules/shiki/dist/langs/hbs.mjs +1 -0
- package/node_modules/shiki/dist/langs/hcl.mjs +1 -0
- package/node_modules/shiki/dist/langs/hjson.mjs +1 -0
- package/node_modules/shiki/dist/langs/hlsl.mjs +1 -0
- package/node_modules/shiki/dist/langs/hs.mjs +1 -0
- package/node_modules/shiki/dist/langs/html-derivative.mjs +1 -0
- package/node_modules/shiki/dist/langs/html.mjs +1 -0
- package/node_modules/shiki/dist/langs/http.mjs +1 -0
- package/node_modules/shiki/dist/langs/hurl.mjs +1 -0
- package/node_modules/shiki/dist/langs/hxml.mjs +1 -0
- package/node_modules/shiki/dist/langs/hy.mjs +1 -0
- package/node_modules/shiki/dist/langs/imba.mjs +1 -0
- package/node_modules/shiki/dist/langs/ini.mjs +1 -0
- package/node_modules/shiki/dist/langs/jade.mjs +1 -0
- package/node_modules/shiki/dist/langs/java.mjs +1 -0
- package/node_modules/shiki/dist/langs/javascript.mjs +1 -0
- package/node_modules/shiki/dist/langs/jinja-html.mjs +1 -0
- package/node_modules/shiki/dist/langs/jinja.mjs +1 -0
- package/node_modules/shiki/dist/langs/jison.mjs +1 -0
- package/node_modules/shiki/dist/langs/jl.mjs +1 -0
- package/node_modules/shiki/dist/langs/js.mjs +1 -0
- package/node_modules/shiki/dist/langs/json.mjs +1 -0
- package/node_modules/shiki/dist/langs/json5.mjs +1 -0
- package/node_modules/shiki/dist/langs/jsonc.mjs +1 -0
- package/node_modules/shiki/dist/langs/jsonl.mjs +1 -0
- package/node_modules/shiki/dist/langs/jsonnet.mjs +1 -0
- package/node_modules/shiki/dist/langs/jssm.mjs +1 -0
- package/node_modules/shiki/dist/langs/jsx.mjs +1 -0
- package/node_modules/shiki/dist/langs/julia.mjs +1 -0
- package/node_modules/shiki/dist/langs/just.mjs +1 -0
- package/node_modules/shiki/dist/langs/justfile.mjs +1 -0
- package/node_modules/shiki/dist/langs/kdl.mjs +1 -0
- package/node_modules/shiki/dist/langs/kotlin.mjs +1 -0
- package/node_modules/shiki/dist/langs/kql.mjs +1 -0
- package/node_modules/shiki/dist/langs/kt.mjs +1 -0
- package/node_modules/shiki/dist/langs/kts.mjs +1 -0
- package/node_modules/shiki/dist/langs/kusto.mjs +1 -0
- package/node_modules/shiki/dist/langs/latex.mjs +1 -0
- package/node_modules/shiki/dist/langs/lean.mjs +1 -0
- package/node_modules/shiki/dist/langs/lean4.mjs +1 -0
- package/node_modules/shiki/dist/langs/less.mjs +1 -0
- package/node_modules/shiki/dist/langs/liquid.mjs +1 -0
- package/node_modules/shiki/dist/langs/lisp.mjs +1 -0
- package/node_modules/shiki/dist/langs/lit.mjs +1 -0
- package/node_modules/shiki/dist/langs/llvm.mjs +1 -0
- package/node_modules/shiki/dist/langs/log.mjs +1 -0
- package/node_modules/shiki/dist/langs/logo.mjs +1 -0
- package/node_modules/shiki/dist/langs/lua.mjs +1 -0
- package/node_modules/shiki/dist/langs/luau.mjs +1 -0
- package/node_modules/shiki/dist/langs/make.mjs +1 -0
- package/node_modules/shiki/dist/langs/makefile.mjs +1 -0
- package/node_modules/shiki/dist/langs/markdown-nix.mjs +1 -0
- package/node_modules/shiki/dist/langs/markdown-vue.mjs +1 -0
- package/node_modules/shiki/dist/langs/markdown.mjs +1 -0
- package/node_modules/shiki/dist/langs/marko.mjs +1 -0
- package/node_modules/shiki/dist/langs/matlab.mjs +1 -0
- package/node_modules/shiki/dist/langs/mbt.mjs +1 -0
- package/node_modules/shiki/dist/langs/mbti.mjs +1 -0
- package/node_modules/shiki/dist/langs/md.mjs +1 -0
- package/node_modules/shiki/dist/langs/mdc.mjs +1 -0
- package/node_modules/shiki/dist/langs/mdx.mjs +1 -0
- package/node_modules/shiki/dist/langs/mediawiki.mjs +1 -0
- package/node_modules/shiki/dist/langs/mermaid.mjs +1 -0
- package/node_modules/shiki/dist/langs/mips.mjs +1 -0
- package/node_modules/shiki/dist/langs/mipsasm.mjs +1 -0
- package/node_modules/shiki/dist/langs/mjs.mjs +1 -0
- package/node_modules/shiki/dist/langs/mmd.mjs +1 -0
- package/node_modules/shiki/dist/langs/mojo.mjs +1 -0
- package/node_modules/shiki/dist/langs/moonbit.mjs +1 -0
- package/node_modules/shiki/dist/langs/move.mjs +1 -0
- package/node_modules/shiki/dist/langs/mts.mjs +1 -0
- package/node_modules/shiki/dist/langs/nar.mjs +1 -0
- package/node_modules/shiki/dist/langs/narrat.mjs +1 -0
- package/node_modules/shiki/dist/langs/nextflow-groovy.mjs +1 -0
- package/node_modules/shiki/dist/langs/nextflow.mjs +1 -0
- package/node_modules/shiki/dist/langs/nf.mjs +1 -0
- package/node_modules/shiki/dist/langs/nginx.mjs +1 -0
- package/node_modules/shiki/dist/langs/nim.mjs +1 -0
- package/node_modules/shiki/dist/langs/nix.mjs +1 -0
- package/node_modules/shiki/dist/langs/nsis.mjs +1 -0
- package/node_modules/shiki/dist/langs/nu.mjs +1 -0
- package/node_modules/shiki/dist/langs/nushell.mjs +1 -0
- package/node_modules/shiki/dist/langs/objc.mjs +1 -0
- package/node_modules/shiki/dist/langs/objective-c.mjs +1 -0
- package/node_modules/shiki/dist/langs/objective-cpp.mjs +1 -0
- package/node_modules/shiki/dist/langs/ocaml.mjs +1 -0
- package/node_modules/shiki/dist/langs/odin.mjs +1 -0
- package/node_modules/shiki/dist/langs/openscad.mjs +1 -0
- package/node_modules/shiki/dist/langs/org.mjs +1 -0
- package/node_modules/shiki/dist/langs/pascal.mjs +1 -0
- package/node_modules/shiki/dist/langs/perl.mjs +1 -0
- package/node_modules/shiki/dist/langs/perl6.mjs +1 -0
- package/node_modules/shiki/dist/langs/php.mjs +1 -0
- package/node_modules/shiki/dist/langs/pkl.mjs +1 -0
- package/node_modules/shiki/dist/langs/plsql.mjs +1 -0
- package/node_modules/shiki/dist/langs/po.mjs +1 -0
- package/node_modules/shiki/dist/langs/polar.mjs +1 -0
- package/node_modules/shiki/dist/langs/postcss.mjs +1 -0
- package/node_modules/shiki/dist/langs/pot.mjs +1 -0
- package/node_modules/shiki/dist/langs/potx.mjs +1 -0
- package/node_modules/shiki/dist/langs/powerquery.mjs +1 -0
- package/node_modules/shiki/dist/langs/powershell.mjs +1 -0
- package/node_modules/shiki/dist/langs/prisma.mjs +1 -0
- package/node_modules/shiki/dist/langs/prolog.mjs +1 -0
- package/node_modules/shiki/dist/langs/properties.mjs +1 -0
- package/node_modules/shiki/dist/langs/proto.mjs +1 -0
- package/node_modules/shiki/dist/langs/protobuf.mjs +1 -0
- package/node_modules/shiki/dist/langs/ps.mjs +1 -0
- package/node_modules/shiki/dist/langs/ps1.mjs +1 -0
- package/node_modules/shiki/dist/langs/pug.mjs +1 -0
- package/node_modules/shiki/dist/langs/puppet.mjs +1 -0
- package/node_modules/shiki/dist/langs/purescript.mjs +1 -0
- package/node_modules/shiki/dist/langs/pwsh.mjs +1 -0
- package/node_modules/shiki/dist/langs/py.mjs +1 -0
- package/node_modules/shiki/dist/langs/python.mjs +1 -0
- package/node_modules/shiki/dist/langs/ql.mjs +1 -0
- package/node_modules/shiki/dist/langs/qml.mjs +1 -0
- package/node_modules/shiki/dist/langs/qmldir.mjs +1 -0
- package/node_modules/shiki/dist/langs/qss.mjs +1 -0
- package/node_modules/shiki/dist/langs/r.mjs +1 -0
- package/node_modules/shiki/dist/langs/racket.mjs +1 -0
- package/node_modules/shiki/dist/langs/raku.mjs +1 -0
- package/node_modules/shiki/dist/langs/razor.mjs +1 -0
- package/node_modules/shiki/dist/langs/rb.mjs +1 -0
- package/node_modules/shiki/dist/langs/rbs.mjs +1 -0
- package/node_modules/shiki/dist/langs/reg.mjs +1 -0
- package/node_modules/shiki/dist/langs/regex.mjs +1 -0
- package/node_modules/shiki/dist/langs/regexp.mjs +1 -0
- package/node_modules/shiki/dist/langs/rel.mjs +1 -0
- package/node_modules/shiki/dist/langs/riscv.mjs +1 -0
- package/node_modules/shiki/dist/langs/ron.mjs +1 -0
- package/node_modules/shiki/dist/langs/rosmsg.mjs +1 -0
- package/node_modules/shiki/dist/langs/rs.mjs +1 -0
- package/node_modules/shiki/dist/langs/rst.mjs +1 -0
- package/node_modules/shiki/dist/langs/ruby-signature.mjs +1 -0
- package/node_modules/shiki/dist/langs/ruby.mjs +1 -0
- package/node_modules/shiki/dist/langs/rust.mjs +1 -0
- package/node_modules/shiki/dist/langs/sas.mjs +1 -0
- package/node_modules/shiki/dist/langs/sass.mjs +1 -0
- package/node_modules/shiki/dist/langs/scad.mjs +1 -0
- package/node_modules/shiki/dist/langs/scala.mjs +1 -0
- package/node_modules/shiki/dist/langs/scheme.mjs +1 -0
- package/node_modules/shiki/dist/langs/scss.mjs +1 -0
- package/node_modules/shiki/dist/langs/sdbl.mjs +1 -0
- package/node_modules/shiki/dist/langs/sh.mjs +1 -0
- package/node_modules/shiki/dist/langs/shader.mjs +1 -0
- package/node_modules/shiki/dist/langs/shaderlab.mjs +1 -0
- package/node_modules/shiki/dist/langs/shell.mjs +1 -0
- package/node_modules/shiki/dist/langs/shellscript.mjs +1 -0
- package/node_modules/shiki/dist/langs/shellsession.mjs +1 -0
- package/node_modules/shiki/dist/langs/smalltalk.mjs +1 -0
- package/node_modules/shiki/dist/langs/smithy.mjs +1 -0
- package/node_modules/shiki/dist/langs/solidity.mjs +1 -0
- package/node_modules/shiki/dist/langs/soy.mjs +1 -0
- package/node_modules/shiki/dist/langs/sparql.mjs +1 -0
- package/node_modules/shiki/dist/langs/spl.mjs +1 -0
- package/node_modules/shiki/dist/langs/splunk.mjs +1 -0
- package/node_modules/shiki/dist/langs/sql.mjs +1 -0
- package/node_modules/shiki/dist/langs/ssh-config.mjs +1 -0
- package/node_modules/shiki/dist/langs/stata.mjs +1 -0
- package/node_modules/shiki/dist/langs/styl.mjs +1 -0
- package/node_modules/shiki/dist/langs/stylus.mjs +1 -0
- package/node_modules/shiki/dist/langs/surql.mjs +1 -0
- package/node_modules/shiki/dist/langs/surrealql.mjs +1 -0
- package/node_modules/shiki/dist/langs/svelte.mjs +1 -0
- package/node_modules/shiki/dist/langs/swift.mjs +1 -0
- package/node_modules/shiki/dist/langs/system-verilog.mjs +1 -0
- package/node_modules/shiki/dist/langs/systemd.mjs +1 -0
- package/node_modules/shiki/dist/langs/talon.mjs +1 -0
- package/node_modules/shiki/dist/langs/talonscript.mjs +1 -0
- package/node_modules/shiki/dist/langs/tasl.mjs +1 -0
- package/node_modules/shiki/dist/langs/tcl.mjs +1 -0
- package/node_modules/shiki/dist/langs/templ.mjs +1 -0
- package/node_modules/shiki/dist/langs/terraform.mjs +1 -0
- package/node_modules/shiki/dist/langs/tex.mjs +1 -0
- package/node_modules/shiki/dist/langs/tf.mjs +1 -0
- package/node_modules/shiki/dist/langs/tfvars.mjs +1 -0
- package/node_modules/shiki/dist/langs/toml.mjs +1 -0
- package/node_modules/shiki/dist/langs/tres.mjs +1 -0
- package/node_modules/shiki/dist/langs/ts-tags.mjs +1 -0
- package/node_modules/shiki/dist/langs/ts.mjs +1 -0
- package/node_modules/shiki/dist/langs/tscn.mjs +1 -0
- package/node_modules/shiki/dist/langs/tsp.mjs +1 -0
- package/node_modules/shiki/dist/langs/tsv.mjs +1 -0
- package/node_modules/shiki/dist/langs/tsx.mjs +1 -0
- package/node_modules/shiki/dist/langs/turtle.mjs +1 -0
- package/node_modules/shiki/dist/langs/twig.mjs +1 -0
- package/node_modules/shiki/dist/langs/typ.mjs +1 -0
- package/node_modules/shiki/dist/langs/typescript.mjs +1 -0
- package/node_modules/shiki/dist/langs/typespec.mjs +1 -0
- package/node_modules/shiki/dist/langs/typst.mjs +1 -0
- package/node_modules/shiki/dist/langs/v.mjs +1 -0
- package/node_modules/shiki/dist/langs/vala.mjs +1 -0
- package/node_modules/shiki/dist/langs/vb.mjs +1 -0
- package/node_modules/shiki/dist/langs/verilog.mjs +1 -0
- package/node_modules/shiki/dist/langs/vhdl.mjs +1 -0
- package/node_modules/shiki/dist/langs/vim.mjs +1 -0
- package/node_modules/shiki/dist/langs/viml.mjs +1 -0
- package/node_modules/shiki/dist/langs/vimscript.mjs +1 -0
- package/node_modules/shiki/dist/langs/vue-directives.mjs +1 -0
- package/node_modules/shiki/dist/langs/vue-html.mjs +1 -0
- package/node_modules/shiki/dist/langs/vue-interpolations.mjs +1 -0
- package/node_modules/shiki/dist/langs/vue-sfc-style-variable-injection.mjs +1 -0
- package/node_modules/shiki/dist/langs/vue-vine.mjs +1 -0
- package/node_modules/shiki/dist/langs/vue.mjs +1 -0
- package/node_modules/shiki/dist/langs/vy.mjs +1 -0
- package/node_modules/shiki/dist/langs/vyper.mjs +1 -0
- package/node_modules/shiki/dist/langs/wasm.mjs +1 -0
- package/node_modules/shiki/dist/langs/wenyan.mjs +1 -0
- package/node_modules/shiki/dist/langs/wgsl.mjs +1 -0
- package/node_modules/shiki/dist/langs/wiki.mjs +1 -0
- package/node_modules/shiki/dist/langs/wikitext.mjs +1 -0
- package/node_modules/shiki/dist/langs/wit.mjs +1 -0
- package/node_modules/shiki/dist/langs/wl.mjs +1 -0
- package/node_modules/shiki/dist/langs/wolfram.mjs +1 -0
- package/node_modules/shiki/dist/langs/xml.mjs +1 -0
- package/node_modules/shiki/dist/langs/xsl.mjs +1 -0
- package/node_modules/shiki/dist/langs/yaml.mjs +1 -0
- package/node_modules/shiki/dist/langs/yml.mjs +1 -0
- package/node_modules/shiki/dist/langs/zenscript.mjs +1 -0
- package/node_modules/shiki/dist/langs/zig.mjs +1 -0
- package/node_modules/shiki/dist/langs/zsh.mjs +1 -0
- package/node_modules/shiki/dist/langs-bundle-full-xQVO1Cek.mjs +1326 -0
- package/node_modules/shiki/dist/langs.mjs +2 -0
- package/node_modules/shiki/dist/onig.wasm +0 -0
- package/node_modules/shiki/dist/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/node_modules/shiki/dist/textmate.mjs +2 -0
- package/node_modules/shiki/dist/themes/andromeeda.mjs +1 -0
- package/node_modules/shiki/dist/themes/aurora-x.mjs +1 -0
- package/node_modules/shiki/dist/themes/ayu-dark.mjs +1 -0
- package/node_modules/shiki/dist/themes/ayu-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/ayu-mirage.mjs +1 -0
- package/node_modules/shiki/dist/themes/catppuccin-frappe.mjs +1 -0
- package/node_modules/shiki/dist/themes/catppuccin-latte.mjs +1 -0
- package/node_modules/shiki/dist/themes/catppuccin-macchiato.mjs +1 -0
- package/node_modules/shiki/dist/themes/catppuccin-mocha.mjs +1 -0
- package/node_modules/shiki/dist/themes/dark-plus.mjs +1 -0
- package/node_modules/shiki/dist/themes/dracula-soft.mjs +1 -0
- package/node_modules/shiki/dist/themes/dracula.mjs +1 -0
- package/node_modules/shiki/dist/themes/everforest-dark.mjs +1 -0
- package/node_modules/shiki/dist/themes/everforest-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/github-dark-default.mjs +1 -0
- package/node_modules/shiki/dist/themes/github-dark-dimmed.mjs +1 -0
- package/node_modules/shiki/dist/themes/github-dark-high-contrast.mjs +1 -0
- package/node_modules/shiki/dist/themes/github-dark.mjs +1 -0
- package/node_modules/shiki/dist/themes/github-light-default.mjs +1 -0
- package/node_modules/shiki/dist/themes/github-light-high-contrast.mjs +1 -0
- package/node_modules/shiki/dist/themes/github-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/gruvbox-dark-hard.mjs +1 -0
- package/node_modules/shiki/dist/themes/gruvbox-dark-medium.mjs +1 -0
- package/node_modules/shiki/dist/themes/gruvbox-dark-soft.mjs +1 -0
- package/node_modules/shiki/dist/themes/gruvbox-light-hard.mjs +1 -0
- package/node_modules/shiki/dist/themes/gruvbox-light-medium.mjs +1 -0
- package/node_modules/shiki/dist/themes/gruvbox-light-soft.mjs +1 -0
- package/node_modules/shiki/dist/themes/horizon-bright.mjs +1 -0
- package/node_modules/shiki/dist/themes/horizon.mjs +1 -0
- package/node_modules/shiki/dist/themes/houston.mjs +1 -0
- package/node_modules/shiki/dist/themes/kanagawa-dragon.mjs +1 -0
- package/node_modules/shiki/dist/themes/kanagawa-lotus.mjs +1 -0
- package/node_modules/shiki/dist/themes/kanagawa-wave.mjs +1 -0
- package/node_modules/shiki/dist/themes/laserwave.mjs +1 -0
- package/node_modules/shiki/dist/themes/light-plus.mjs +1 -0
- package/node_modules/shiki/dist/themes/material-theme-darker.mjs +1 -0
- package/node_modules/shiki/dist/themes/material-theme-lighter.mjs +1 -0
- package/node_modules/shiki/dist/themes/material-theme-ocean.mjs +1 -0
- package/node_modules/shiki/dist/themes/material-theme-palenight.mjs +1 -0
- package/node_modules/shiki/dist/themes/material-theme.mjs +1 -0
- package/node_modules/shiki/dist/themes/min-dark.mjs +1 -0
- package/node_modules/shiki/dist/themes/min-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/monokai.mjs +1 -0
- package/node_modules/shiki/dist/themes/night-owl-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/night-owl.mjs +1 -0
- package/node_modules/shiki/dist/themes/nord.mjs +1 -0
- package/node_modules/shiki/dist/themes/one-dark-pro.mjs +1 -0
- package/node_modules/shiki/dist/themes/one-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/plastic.mjs +1 -0
- package/node_modules/shiki/dist/themes/poimandres.mjs +1 -0
- package/node_modules/shiki/dist/themes/red.mjs +1 -0
- package/node_modules/shiki/dist/themes/rose-pine-dawn.mjs +1 -0
- package/node_modules/shiki/dist/themes/rose-pine-moon.mjs +1 -0
- package/node_modules/shiki/dist/themes/rose-pine.mjs +1 -0
- package/node_modules/shiki/dist/themes/slack-dark.mjs +1 -0
- package/node_modules/shiki/dist/themes/slack-ochin.mjs +1 -0
- package/node_modules/shiki/dist/themes/snazzy-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/solarized-dark.mjs +1 -0
- package/node_modules/shiki/dist/themes/solarized-light.mjs +1 -0
- package/node_modules/shiki/dist/themes/synthwave-84.mjs +1 -0
- package/node_modules/shiki/dist/themes/tokyo-night.mjs +1 -0
- package/node_modules/shiki/dist/themes/vesper.mjs +1 -0
- package/node_modules/shiki/dist/themes/vitesse-black.mjs +1 -0
- package/node_modules/shiki/dist/themes/vitesse-dark.mjs +1 -0
- package/node_modules/shiki/dist/themes/vitesse-light.mjs +1 -0
- package/node_modules/shiki/dist/themes.mjs +396 -0
- package/node_modules/shiki/dist/types.mjs +1 -0
- package/node_modules/shiki/dist/wasm.mjs +3 -0
- package/node_modules/shiki/package.json +67 -0
- package/node_modules/space-separated-tokens/index.js +24 -0
- package/node_modules/space-separated-tokens/license +22 -0
- package/node_modules/space-separated-tokens/package.json +59 -0
- package/node_modules/space-separated-tokens/readme.md +156 -0
- package/node_modules/stringify-entities/index.js +6 -0
- package/node_modules/stringify-entities/lib/constant/dangerous.js +16 -0
- package/node_modules/stringify-entities/lib/core.js +117 -0
- package/node_modules/stringify-entities/lib/index.js +36 -0
- package/node_modules/stringify-entities/lib/util/format-basic.js +9 -0
- package/node_modules/stringify-entities/lib/util/format-smart.js +69 -0
- package/node_modules/stringify-entities/lib/util/to-decimal.js +16 -0
- package/node_modules/stringify-entities/lib/util/to-hexadecimal.js +16 -0
- package/node_modules/stringify-entities/lib/util/to-named.js +57 -0
- package/node_modules/stringify-entities/license +22 -0
- package/node_modules/stringify-entities/package.json +77 -0
- package/node_modules/stringify-entities/readme.md +233 -0
- package/node_modules/trim-lines/index.js +69 -0
- package/node_modules/trim-lines/license +22 -0
- package/node_modules/trim-lines/package.json +58 -0
- package/node_modules/trim-lines/readme.md +125 -0
- package/node_modules/unist-util-is/index.js +7 -0
- package/node_modules/unist-util-is/lib/index.js +296 -0
- package/node_modules/unist-util-is/license +22 -0
- package/node_modules/unist-util-is/package.json +95 -0
- package/node_modules/unist-util-is/readme.md +351 -0
- package/node_modules/unist-util-position/index.js +1 -0
- package/node_modules/unist-util-position/lib/index.js +95 -0
- package/node_modules/unist-util-position/license +22 -0
- package/node_modules/unist-util-position/package.json +68 -0
- package/node_modules/unist-util-position/readme.md +243 -0
- package/node_modules/unist-util-stringify-position/index.js +1 -0
- package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
- package/node_modules/unist-util-stringify-position/license +22 -0
- package/node_modules/unist-util-stringify-position/package.json +72 -0
- package/node_modules/unist-util-stringify-position/readme.md +206 -0
- package/node_modules/unist-util-visit/index.js +2 -0
- package/node_modules/unist-util-visit/lib/index.js +312 -0
- package/node_modules/unist-util-visit/license +22 -0
- package/node_modules/unist-util-visit/package.json +100 -0
- package/node_modules/unist-util-visit/readme.md +313 -0
- package/node_modules/unist-util-visit-parents/index.js +2 -0
- package/node_modules/unist-util-visit-parents/lib/color.js +7 -0
- package/node_modules/unist-util-visit-parents/lib/color.node.js +7 -0
- package/node_modules/unist-util-visit-parents/lib/index.js +399 -0
- package/node_modules/unist-util-visit-parents/license +22 -0
- package/node_modules/unist-util-visit-parents/package.json +98 -0
- package/node_modules/unist-util-visit-parents/readme.md +388 -0
- package/node_modules/vfile/index.js +2 -0
- package/node_modules/vfile/lib/index.js +643 -0
- package/node_modules/vfile/lib/minpath.browser.js +426 -0
- package/node_modules/vfile/lib/minpath.js +1 -0
- package/node_modules/vfile/lib/minproc.browser.js +8 -0
- package/node_modules/vfile/lib/minproc.js +1 -0
- package/node_modules/vfile/lib/minurl.browser.js +76 -0
- package/node_modules/vfile/lib/minurl.js +2 -0
- package/node_modules/vfile/lib/minurl.shared.js +31 -0
- package/node_modules/vfile/license +21 -0
- package/node_modules/vfile/package.json +126 -0
- package/node_modules/vfile/readme.md +785 -0
- package/node_modules/vfile-message/index.js +5 -0
- package/node_modules/vfile-message/lib/index.js +314 -0
- package/node_modules/vfile-message/license +22 -0
- package/node_modules/vfile-message/package.json +72 -0
- package/node_modules/vfile-message/readme.md +252 -0
- package/node_modules/zwitch/index.js +118 -0
- package/node_modules/zwitch/license +22 -0
- package/node_modules/zwitch/package.json +64 -0
- package/node_modules/zwitch/readme.md +226 -0
- package/package.json +93 -3
|
@@ -991,17 +991,17 @@ function reportChange(result) {
|
|
|
991
991
|
return text;
|
|
992
992
|
}
|
|
993
993
|
/** Control Sequence Introducer. */
|
|
994
|
-
const CSI = "\x1B[";
|
|
994
|
+
const CSI$1 = "\x1B[";
|
|
995
995
|
/**
|
|
996
996
|
* Ends the foreground color a recolored run set. SGR 39 restores the default
|
|
997
997
|
* foreground only: bold, italic, underline, inverse, and the background set by
|
|
998
998
|
* enclosing markdown styling stay in force.
|
|
999
999
|
*/
|
|
1000
|
-
const RESET_FOREGROUND = `${CSI}39m`;
|
|
1000
|
+
const RESET_FOREGROUND$1 = `${CSI$1}39m`;
|
|
1001
1001
|
/** Faint intensity: the only ramp level the two-level mode draws. */
|
|
1002
|
-
const DIM = `${CSI}2m`;
|
|
1002
|
+
const DIM = `${CSI$1}2m`;
|
|
1003
1003
|
/** Ends faint intensity. SGR 22 also ends bold, which shares the code. */
|
|
1004
|
-
const RESET_INTENSITY = `${CSI}22m`;
|
|
1004
|
+
const RESET_INTENSITY = `${CSI$1}22m`;
|
|
1005
1005
|
/** Ages the two-level mode draws faint; later ages draw as rendered. */
|
|
1006
1006
|
const DIM_AGES = 2;
|
|
1007
1007
|
/** First xterm 256-color grayscale index. */
|
|
@@ -1013,7 +1013,7 @@ const GRAY_FIRST_VALUE = 8;
|
|
|
1013
1013
|
/** Gray value step between consecutive grayscale indices. */
|
|
1014
1014
|
const GRAY_VALUE_STEP = 10;
|
|
1015
1015
|
/** Relative-luminance weights used to pick the nearest gray. */
|
|
1016
|
-
const LUMINANCE = {
|
|
1016
|
+
const LUMINANCE$1 = {
|
|
1017
1017
|
r: .2126,
|
|
1018
1018
|
g: .7152,
|
|
1019
1019
|
b: .0722
|
|
@@ -1075,7 +1075,7 @@ function resolveFadeCapability(input) {
|
|
|
1075
1075
|
* @param steps - brightness levels; defaults to {@link FADE_STEPS}.
|
|
1076
1076
|
* @returns `steps` levels, darkest first.
|
|
1077
1077
|
*/
|
|
1078
|
-
function buildFadeRamp(bg, fg, steps =
|
|
1078
|
+
function buildFadeRamp(bg, fg, steps = 12) {
|
|
1079
1079
|
return Array.from({ length: steps }, (_unused, level) => {
|
|
1080
1080
|
if (level === steps - 1) return {
|
|
1081
1081
|
r: fg.r,
|
|
@@ -1169,7 +1169,7 @@ function fadeSgr(style, age) {
|
|
|
1169
1169
|
* @returns `ESC[38;2;R;G;Bm` with each channel clamped to a byte.
|
|
1170
1170
|
*/
|
|
1171
1171
|
function truecolorSgr(color) {
|
|
1172
|
-
return `${CSI}38;2;${channel(color.r)};${channel(color.g)};${channel(color.b)}m`;
|
|
1172
|
+
return `${CSI$1}38;2;${channel(color.r)};${channel(color.g)};${channel(color.b)}m`;
|
|
1173
1173
|
}
|
|
1174
1174
|
/**
|
|
1175
1175
|
* Encode one level as the nearest xterm grayscale index.
|
|
@@ -1177,9 +1177,9 @@ function truecolorSgr(color) {
|
|
|
1177
1177
|
* @returns `ESC[38;5;Nm` with N in 232..255.
|
|
1178
1178
|
*/
|
|
1179
1179
|
function grayscaleSgr(color) {
|
|
1180
|
-
const luminance = LUMINANCE.r * color.r + LUMINANCE.g * color.g + LUMINANCE.b * color.b;
|
|
1180
|
+
const luminance = LUMINANCE$1.r * color.r + LUMINANCE$1.g * color.g + LUMINANCE$1.b * color.b;
|
|
1181
1181
|
const step = Math.round((luminance - GRAY_FIRST_VALUE) / GRAY_VALUE_STEP);
|
|
1182
|
-
return `${CSI}38;5;${GRAY_FIRST_INDEX + Math.max(0, Math.min(GRAY_LEVELS - 1, step))}m`;
|
|
1182
|
+
return `${CSI$1}38;5;${GRAY_FIRST_INDEX + Math.max(0, Math.min(GRAY_LEVELS - 1, step))}m`;
|
|
1183
1183
|
}
|
|
1184
1184
|
/**
|
|
1185
1185
|
* Clamp one channel to what an SGR byte carries.
|
|
@@ -1196,7 +1196,7 @@ function channel(value) {
|
|
|
1196
1196
|
* `ESC[39m` for the color modes, which set a foreground.
|
|
1197
1197
|
*/
|
|
1198
1198
|
function restoreFor(capability) {
|
|
1199
|
-
return capability === "dim" ? RESET_INTENSITY : RESET_FOREGROUND;
|
|
1199
|
+
return capability === "dim" ? RESET_INTENSITY : RESET_FOREGROUND$1;
|
|
1200
1200
|
}
|
|
1201
1201
|
/** Every SGR sequence, the sequences a block's own palette styling writes. */
|
|
1202
1202
|
const SGR_SEQUENCE = /\u001b\[[0-9;]*m/g;
|
|
@@ -1326,7 +1326,7 @@ const ANSI16 = [
|
|
|
1326
1326
|
* @returns the weighted sum of the channels.
|
|
1327
1327
|
*/
|
|
1328
1328
|
function colorLuminance(color) {
|
|
1329
|
-
return LUMINANCE.r * color.r + LUMINANCE.g * color.g + LUMINANCE.b * color.b;
|
|
1329
|
+
return LUMINANCE$1.r * color.r + LUMINANCE$1.g * color.g + LUMINANCE$1.b * color.b;
|
|
1330
1330
|
}
|
|
1331
1331
|
/**
|
|
1332
1332
|
* The color a float-out starts from: the assumed foreground when that is
|
|
@@ -1367,7 +1367,7 @@ function settledRgb(state, fg) {
|
|
|
1367
1367
|
* @returns the SGR sequence, or empty when the capability cannot encode a mix.
|
|
1368
1368
|
*/
|
|
1369
1369
|
function encodeMix(capability, color) {
|
|
1370
|
-
return capability === "truecolor" ? truecolorSgr(color) : `${CSI}38;5;${String(nearestAnsi256(color))}m`;
|
|
1370
|
+
return capability === "truecolor" ? truecolorSgr(color) : `${CSI$1}38;5;${String(nearestAnsi256(color))}m`;
|
|
1371
1371
|
}
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Rebuild one card row as a per-run float-out mix.
|
|
@@ -1392,7 +1392,7 @@ function floatOutLine(line, t, capability, fg) {
|
|
|
1392
1392
|
last = start + match[0].length;
|
|
1393
1393
|
}
|
|
1394
1394
|
if (last < line.length) out += paintSegment(line.slice(last), state, t, capability, fg);
|
|
1395
|
-
return `${out}${RESET_FOREGROUND}`;
|
|
1395
|
+
return `${out}${RESET_FOREGROUND$1}`;
|
|
1396
1396
|
}
|
|
1397
1397
|
/**
|
|
1398
1398
|
* Overlay one text run with the float-out mix for the SGR in force.
|
|
@@ -1564,7 +1564,7 @@ var FadeTracker = class {
|
|
|
1564
1564
|
chunks = [];
|
|
1565
1565
|
openChunk = void 0;
|
|
1566
1566
|
constructor(options) {
|
|
1567
|
-
this.steps = options.steps ??
|
|
1567
|
+
this.steps = options.steps ?? 12;
|
|
1568
1568
|
this.stepMs = options.stepMs ?? 33;
|
|
1569
1569
|
this.now = options.now;
|
|
1570
1570
|
}
|
|
@@ -1723,10 +1723,14 @@ var FadeRegistry = class {
|
|
|
1723
1723
|
* Whitespace is skipped on both sides while matching, so a chunk still matches
|
|
1724
1724
|
* after the renderer turned its space into a line break or trimmed it.
|
|
1725
1725
|
*
|
|
1726
|
-
* Markdown rewrites text, so a chunk may
|
|
1727
|
-
*
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1726
|
+
* Markdown rewrites text, so a chunk's characters may reach the screen without
|
|
1727
|
+
* the syntax around them, or not at all. The rendered text is therefore matched
|
|
1728
|
+
* as a subsequence of what was streamed: a character the renderer consumed is
|
|
1729
|
+
* skipped and the columns keep their alignment, so a delta that closes a bold
|
|
1730
|
+
* run or a code span no longer drops the whole tail to the foreground for one
|
|
1731
|
+
* frame. Matching stops at a chunk fewer than half of whose characters are
|
|
1732
|
+
* there at all - text this tail never reached; that chunk and every older one
|
|
1733
|
+
* then draw at the foreground, unchanged.
|
|
1730
1734
|
*
|
|
1731
1735
|
* Styling inside a recolored run survives. The run reasserts the sequences in
|
|
1732
1736
|
* force at its start, so an enclosing bold or italic continues across it; an
|
|
@@ -1750,7 +1754,7 @@ var FadeRegistry = class {
|
|
|
1750
1754
|
*/
|
|
1751
1755
|
function recolorTail(lines, spans, style, from = 0, mode = "in") {
|
|
1752
1756
|
if (spans.length === 0 || lines.length === 0) return [...lines];
|
|
1753
|
-
const cells = cellsFromEnd(lines);
|
|
1757
|
+
const cells = new CellWalk(cellsFromEnd(lines));
|
|
1754
1758
|
const runs = [];
|
|
1755
1759
|
for (const span of [...spans].reverse()) {
|
|
1756
1760
|
const covered = consumeSpan(cells, span.text);
|
|
@@ -1795,26 +1799,86 @@ function* cellsFromEnd(lines) {
|
|
|
1795
1799
|
}
|
|
1796
1800
|
}
|
|
1797
1801
|
/**
|
|
1802
|
+
* The backwards cell walk with one cell of pushback, so a chunk that hands a
|
|
1803
|
+
* cell back leaves it for the chunk before it rather than eating it.
|
|
1804
|
+
*/
|
|
1805
|
+
var CellWalk = class {
|
|
1806
|
+
cells;
|
|
1807
|
+
pending;
|
|
1808
|
+
/**
|
|
1809
|
+
* @param cells - the backwards walk over the rendered lines.
|
|
1810
|
+
*/
|
|
1811
|
+
constructor(cells) {
|
|
1812
|
+
this.cells = cells;
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* The next cell towards the start of the text.
|
|
1816
|
+
* @returns the cell, or undefined once the walk is spent.
|
|
1817
|
+
*/
|
|
1818
|
+
next() {
|
|
1819
|
+
const held = this.pending;
|
|
1820
|
+
if (held !== void 0) {
|
|
1821
|
+
this.pending = void 0;
|
|
1822
|
+
return held;
|
|
1823
|
+
}
|
|
1824
|
+
const step = this.cells.next();
|
|
1825
|
+
return step.done ? void 0 : step.value;
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Put one cell back for the next read.
|
|
1829
|
+
* @param cell - the cell the caller did not claim.
|
|
1830
|
+
*/
|
|
1831
|
+
back(cell) {
|
|
1832
|
+
this.pending = cell;
|
|
1833
|
+
}
|
|
1834
|
+
};
|
|
1835
|
+
/**
|
|
1798
1836
|
* Take the cells one chunk covers off the walk.
|
|
1837
|
+
*
|
|
1838
|
+
* Markdown is rendered, not echoed: `**bold**` reaches the screen as `bold`,
|
|
1839
|
+
* a fence and a bullet disappear, and a link keeps its text and drops its
|
|
1840
|
+
* target. A character of the chunk that the renderer consumed therefore has no
|
|
1841
|
+
* cell, and it is skipped rather than failing the whole tail - the rendered
|
|
1842
|
+
* text is matched as a subsequence of what was streamed. Only a chunk whose
|
|
1843
|
+
* cells have run out ends the walk, because past that point the columns
|
|
1844
|
+
* belong to text this tail never appended.
|
|
1799
1845
|
* @param cells - the backwards walk, positioned at the end of the region still unclaimed.
|
|
1800
1846
|
* @param text - the chunk's text as it was appended.
|
|
1801
1847
|
* @returns the cells the chunk covers, whitespace included, or undefined when
|
|
1802
|
-
* the
|
|
1848
|
+
* the walk reached the start of the rendered text mid-chunk.
|
|
1803
1849
|
*/
|
|
1804
1850
|
function consumeSpan(cells, text) {
|
|
1805
1851
|
const wanted = Array.from(GRAPHEMES.segment(text), (part) => part.segment).filter((part) => !isBlank(part)).reverse();
|
|
1806
1852
|
const covered = [];
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1853
|
+
let index = 0;
|
|
1854
|
+
let matched = 0;
|
|
1855
|
+
while (index < wanted.length) {
|
|
1856
|
+
let cell = cells.next();
|
|
1857
|
+
while (cell !== void 0 && isBlank(cell.grapheme)) {
|
|
1858
|
+
covered.push(cell);
|
|
1859
|
+
cell = cells.next();
|
|
1860
|
+
}
|
|
1861
|
+
if (cell === void 0) break;
|
|
1862
|
+
/* v8 ignore next -- the loop condition holds the index inside the list */
|
|
1863
|
+
const want = wanted[index] ?? "";
|
|
1864
|
+
if (cell.grapheme === want) {
|
|
1865
|
+
covered.push(cell);
|
|
1866
|
+
matched += 1;
|
|
1867
|
+
index += 1;
|
|
1868
|
+
} else if (wanted.includes(cell.grapheme, index + 1) || MARKDOWN_SYNTAX.test(want)) {
|
|
1869
|
+
cells.back(cell);
|
|
1870
|
+
index += 1;
|
|
1871
|
+
} else covered.push(cell);
|
|
1872
|
+
}
|
|
1873
|
+
return matched * 2 >= wanted.length ? covered : void 0;
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* Characters a Markdown renderer consumes rather than draws: emphasis and code
|
|
1877
|
+
* fences, headings and rules, list and quote markers, and link brackets. A
|
|
1878
|
+
* chunk's own character that the rendered text does not carry is one of these
|
|
1879
|
+
* far more often than it is text the renderer dropped outright.
|
|
1880
|
+
*/
|
|
1881
|
+
const MARKDOWN_SYNTAX = /^[*_`~#>[\]()|\\!+=-]$/u;
|
|
1818
1882
|
/**
|
|
1819
1883
|
* Whether a grapheme draws nothing.
|
|
1820
1884
|
* @param grapheme - one grapheme cluster.
|
|
@@ -2003,10 +2067,13 @@ function colorEnabled(env, isTty) {
|
|
|
2003
2067
|
/**
|
|
2004
2068
|
* The Markdown theme derived from the palette.
|
|
2005
2069
|
* @param palette - the active palette.
|
|
2070
|
+
* @param highlight - colours fenced code; omitted draws every block plain,
|
|
2071
|
+
* which is also what a block whose language has no grammar here draws as.
|
|
2006
2072
|
* @returns a complete pi-tui Markdown theme.
|
|
2007
2073
|
*/
|
|
2008
|
-
function markdownTheme(palette) {
|
|
2074
|
+
function markdownTheme(palette, highlight) {
|
|
2009
2075
|
return {
|
|
2076
|
+
highlightCode: (code, lang) => highlight?.lines(code, lang) ?? code.split("\n"),
|
|
2010
2077
|
heading: (text) => palette.bold(palette.accent(text)),
|
|
2011
2078
|
link: palette.accent,
|
|
2012
2079
|
linkUrl: palette.dim,
|
|
@@ -2322,7 +2389,7 @@ var AssistantBlock = class {
|
|
|
2322
2389
|
this.theme = theme;
|
|
2323
2390
|
this.turn = turn;
|
|
2324
2391
|
const palette = theme.palette;
|
|
2325
|
-
this.markdown = new Markdown("", 0, 0, markdownTheme(palette));
|
|
2392
|
+
this.markdown = new Markdown("", 0, 0, markdownTheme(palette, theme.codeHighlight));
|
|
2326
2393
|
this.reasoningText = new Text("", 0, 0);
|
|
2327
2394
|
}
|
|
2328
2395
|
/**
|
|
@@ -5599,58 +5666,50 @@ var ModalQueue = class {
|
|
|
5599
5666
|
this.active?.withdraw();
|
|
5600
5667
|
}
|
|
5601
5668
|
};
|
|
5602
|
-
/**
|
|
5603
|
-
const
|
|
5604
|
-
/**
|
|
5605
|
-
const
|
|
5606
|
-
/**
|
|
5607
|
-
const
|
|
5608
|
-
/** Widest turn rail. */
|
|
5609
|
-
const RAIL_MAX_WIDTH = 30;
|
|
5610
|
-
/** Share of the terminal the turn rail asks for between its two bounds. */
|
|
5611
|
-
const RAIL_SHARE = .28;
|
|
5669
|
+
/** Narrowest turn list. */
|
|
5670
|
+
const LIST_MIN_WIDTH = 18;
|
|
5671
|
+
/** Widest turn list. */
|
|
5672
|
+
const LIST_MAX_WIDTH = 30;
|
|
5673
|
+
/** Share of the terminal the turn list asks for between its two bounds. */
|
|
5674
|
+
const LIST_SHARE = .28;
|
|
5612
5675
|
/** Rows the frame itself takes: the top rule, the legend rule, and the bottom rule. */
|
|
5613
5676
|
const CHROME_ROWS = 3;
|
|
5614
5677
|
/** Columns one body column spends on the border before it and the space after it. */
|
|
5615
5678
|
const COLUMN_MARGIN = 2;
|
|
5616
|
-
/** Columns a pane row spends on its left edge, which the held section accents. */
|
|
5617
|
-
const EDGE_WIDTH = 1;
|
|
5618
5679
|
/** What the chip names this mode. */
|
|
5619
5680
|
const READER_CHIP = "READER";
|
|
5620
5681
|
/** What ends a line the width cut short; one column, so the mark itself fits. */
|
|
5621
5682
|
const ELLIPSIS$1 = "…";
|
|
5622
|
-
/** The left border of a body row and the border between two
|
|
5683
|
+
/** The left border of a body row and the border between the two panels. */
|
|
5623
5684
|
const SIDE = "│";
|
|
5624
|
-
/** Marks the
|
|
5625
|
-
const
|
|
5626
|
-
/** The left edge every row of the held section carries. */
|
|
5627
|
-
const HELD_EDGE = "▌";
|
|
5685
|
+
/** Marks the listed turn the keyboard holds. */
|
|
5686
|
+
const LIST_MARK = "▸ ";
|
|
5628
5687
|
/** What a section header opens with before its label. */
|
|
5629
5688
|
const HEADER_LEAD = "──";
|
|
5630
|
-
/** What a section header fills the rest of its
|
|
5689
|
+
/** What a section header fills the rest of its panel with. */
|
|
5631
5690
|
const HEADER_FILL = "─";
|
|
5632
5691
|
/** What the reader says on a terminal it cannot draw its frame in. */
|
|
5633
5692
|
const TOO_SMALL = `terminal too small for the reader (needs ${String(24)}×${String(8)})`;
|
|
5634
5693
|
/**
|
|
5635
5694
|
* The legend of each keyboard owner inside the reader, in declared
|
|
5636
|
-
* degradation steps, widest first: the turn
|
|
5637
|
-
*
|
|
5638
|
-
*
|
|
5639
|
-
*
|
|
5695
|
+
* degradation steps, widest first: the turn list, and the turn beside it. The
|
|
5696
|
+
* query line borrows the list's half of the legend rule, so it declares none
|
|
5697
|
+
* of its own. `/help` lists the widest step of each, so the reader's keys are
|
|
5698
|
+
* named in one place.
|
|
5640
5699
|
*/
|
|
5641
5700
|
const READER_HINTS = {
|
|
5642
|
-
|
|
5643
|
-
"↑↓
|
|
5644
|
-
"↑↓
|
|
5701
|
+
list: [
|
|
5702
|
+
"↑↓ sections · PgUp PgDn turns · → opens · / filters · Esc closes",
|
|
5703
|
+
"↑↓ sections · → opens · Esc closes",
|
|
5645
5704
|
"Esc closes"
|
|
5646
5705
|
],
|
|
5647
5706
|
pane: [
|
|
5648
|
-
"↑↓
|
|
5649
|
-
"↑↓
|
|
5650
|
-
"Esc
|
|
5707
|
+
"↑↓ scrolls · PgUp PgDn pages · ← turns · Esc closes",
|
|
5708
|
+
"↑↓ scrolls · ← turns · Esc closes",
|
|
5709
|
+
"Esc closes"
|
|
5651
5710
|
]
|
|
5652
5711
|
};
|
|
5653
|
-
/** A
|
|
5712
|
+
/** A panel with nothing in it, for a reader with no turn to show. */
|
|
5654
5713
|
const EMPTY_MEASURE = {
|
|
5655
5714
|
headers: [],
|
|
5656
5715
|
total: 0
|
|
@@ -5677,7 +5736,7 @@ function sameCursor(left, right) {
|
|
|
5677
5736
|
/**
|
|
5678
5737
|
* Which turn the reader holds.
|
|
5679
5738
|
* @param state - where the reader is.
|
|
5680
|
-
* @param groups - the turns the
|
|
5739
|
+
* @param groups - the turns the list names.
|
|
5681
5740
|
* @returns the index into `groups`, and 0 when no listed turn holds the cursor.
|
|
5682
5741
|
*/
|
|
5683
5742
|
function groupIndex(state, groups) {
|
|
@@ -5685,7 +5744,7 @@ function groupIndex(state, groups) {
|
|
|
5685
5744
|
return index === -1 ? 0 : index;
|
|
5686
5745
|
}
|
|
5687
5746
|
/**
|
|
5688
|
-
* Which section of its turn the reader
|
|
5747
|
+
* Which section of its turn the reader is reading.
|
|
5689
5748
|
* @param state - where the reader is.
|
|
5690
5749
|
* @param group - the turn that holds the cursor.
|
|
5691
5750
|
* @returns the index into the turn's sections, and 0 when the turn no longer carries it.
|
|
@@ -5710,8 +5769,8 @@ function sectionAt(cursor, blocks) {
|
|
|
5710
5769
|
};
|
|
5711
5770
|
}
|
|
5712
5771
|
/**
|
|
5713
|
-
* What one section is called in the
|
|
5714
|
-
* of thing it is at a glance.
|
|
5772
|
+
* What one section is called in the turn panel, with the glyph that says what
|
|
5773
|
+
* kind of thing it is at a glance.
|
|
5715
5774
|
* @param block - the block the section belongs to.
|
|
5716
5775
|
* @param part - the section.
|
|
5717
5776
|
* @returns the label, e.g. `✻ reasoning` or `⚒ bash git status · result`.
|
|
@@ -5728,25 +5787,24 @@ function paneLabel(block, part) {
|
|
|
5728
5787
|
}
|
|
5729
5788
|
}
|
|
5730
5789
|
/**
|
|
5731
|
-
* One section's rows as the
|
|
5790
|
+
* One section's rows as the panel wraps them; never folded, because folding is
|
|
5732
5791
|
* a decision the transcript makes and this is where the rest of the text is.
|
|
5733
5792
|
* @param cursor - the section.
|
|
5734
5793
|
* @param blocks - the navigable blocks.
|
|
5735
|
-
* @param width - the
|
|
5794
|
+
* @param width - the panel's columns.
|
|
5736
5795
|
* @returns the wrapped rows, unstyled.
|
|
5737
5796
|
*/
|
|
5738
5797
|
function sectionBody(cursor, blocks, width) {
|
|
5739
5798
|
const held = sectionAt(cursor, blocks);
|
|
5740
5799
|
if (held === void 0) return [];
|
|
5741
|
-
|
|
5742
|
-
return held.part.rows.flatMap((row) => wrapTextWithAnsi(row, room));
|
|
5800
|
+
return held.part.rows.flatMap((row) => wrapTextWithAnsi(row, Math.max(1, width)));
|
|
5743
5801
|
}
|
|
5744
5802
|
/**
|
|
5745
|
-
* Measure the
|
|
5746
|
-
* @param group - the turn the
|
|
5803
|
+
* Measure the turn panel, which is what the scroll keys move over.
|
|
5804
|
+
* @param group - the turn the panel shows.
|
|
5747
5805
|
* @param blocks - the navigable blocks.
|
|
5748
|
-
* @param width - the
|
|
5749
|
-
* @returns where each section's header lands and how many rows the
|
|
5806
|
+
* @param width - the panel's columns.
|
|
5807
|
+
* @returns where each section's header lands and how many rows the panel has.
|
|
5750
5808
|
*/
|
|
5751
5809
|
function measurePane(group, blocks, width) {
|
|
5752
5810
|
const headers = [];
|
|
@@ -5761,118 +5819,113 @@ function measurePane(group, blocks, width) {
|
|
|
5761
5819
|
};
|
|
5762
5820
|
}
|
|
5763
5821
|
/**
|
|
5764
|
-
*
|
|
5765
|
-
*
|
|
5766
|
-
*
|
|
5767
|
-
* width, so the line names whichever of the two is larger.
|
|
5768
|
-
* @param minColumns - columns compare needs before the body splits in two.
|
|
5769
|
-
* @returns the refusal.
|
|
5770
|
-
*/
|
|
5771
|
-
function compareRefusal(minColumns) {
|
|
5772
|
-
return `compare needs ${String(Math.max(minColumns, TWO_COLUMN_MIN_WIDTH))} columns`;
|
|
5773
|
-
}
|
|
5774
|
-
/**
|
|
5775
|
-
* How the reader's body splits one terminal.
|
|
5776
|
-
*
|
|
5777
|
-
* The rail is what gives way: compare keeps its two panes wherever both still
|
|
5778
|
-
* hold a readable section, and a terminal too narrow for two columns draws
|
|
5779
|
-
* whichever one the keyboard is in.
|
|
5822
|
+
* How the reader's body splits one terminal: the turn list and the held turn
|
|
5823
|
+
* beside it, or — on a terminal too narrow for two panels — whichever one the
|
|
5824
|
+
* keyboard is in.
|
|
5780
5825
|
* @param width - the terminal's columns.
|
|
5781
5826
|
* @param rows - the rows the reader draws.
|
|
5782
|
-
* @param state - where the reader is, which decides the single narrow
|
|
5783
|
-
* @param minColumns - columns
|
|
5784
|
-
* @
|
|
5785
|
-
* @returns the rail width, the pane widths in drawing order, the body rows,
|
|
5786
|
-
* and the refusal the legend reports.
|
|
5827
|
+
* @param state - where the reader is, which decides the single narrow panel.
|
|
5828
|
+
* @param minColumns - columns the reader needs before it draws both panels.
|
|
5829
|
+
* @returns the panel widths, the body rows, and whether the frame fits at all.
|
|
5787
5830
|
*/
|
|
5788
|
-
function readerGeometry(width, rows, state, minColumns
|
|
5831
|
+
function readerGeometry(width, rows, state, minColumns) {
|
|
5789
5832
|
const base = {
|
|
5790
5833
|
body: Math.max(0, rows - CHROME_ROWS),
|
|
5791
|
-
refusal: "",
|
|
5792
5834
|
tiny: false,
|
|
5793
|
-
|
|
5835
|
+
measure: EMPTY_MEASURE
|
|
5794
5836
|
};
|
|
5795
5837
|
if (width < 24 || rows < 8) return {
|
|
5796
5838
|
...base,
|
|
5797
|
-
|
|
5798
|
-
|
|
5839
|
+
list: 0,
|
|
5840
|
+
pane: 0,
|
|
5799
5841
|
tiny: true
|
|
5800
5842
|
};
|
|
5801
|
-
|
|
5802
|
-
if (width < TWO_COLUMN_MIN_WIDTH) return state.column === "pane" ? {
|
|
5843
|
+
if (width < minColumns) return state.column === "pane" ? {
|
|
5803
5844
|
...base,
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
panes: [width - COLUMN_MARGIN]
|
|
5845
|
+
list: 0,
|
|
5846
|
+
pane: width - COLUMN_MARGIN
|
|
5807
5847
|
} : {
|
|
5808
5848
|
...base,
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
panes: []
|
|
5812
|
-
};
|
|
5813
|
-
const rail = clamp(Math.floor(width * RAIL_SHARE), RAIL_MIN_WIDTH, RAIL_MAX_WIDTH);
|
|
5814
|
-
const single = width - rail - 2 * COLUMN_MARGIN;
|
|
5815
|
-
if (state.pinned === void 0) return {
|
|
5816
|
-
...base,
|
|
5817
|
-
rail,
|
|
5818
|
-
panes: [single]
|
|
5849
|
+
list: width - COLUMN_MARGIN,
|
|
5850
|
+
pane: 0
|
|
5819
5851
|
};
|
|
5820
|
-
|
|
5821
|
-
...base,
|
|
5822
|
-
rail,
|
|
5823
|
-
panes: [single],
|
|
5824
|
-
refusal
|
|
5825
|
-
};
|
|
5826
|
-
const shared = Math.floor((width - rail - 3 * COLUMN_MARGIN) / 2);
|
|
5827
|
-
if (shared >= READER_MIN_PANE) return {
|
|
5828
|
-
...base,
|
|
5829
|
-
rail,
|
|
5830
|
-
panes: [shared, shared]
|
|
5831
|
-
};
|
|
5832
|
-
const wide = Math.floor((width - 2 * COLUMN_MARGIN) / 2);
|
|
5852
|
+
const list = clamp(Math.floor(width * LIST_SHARE), LIST_MIN_WIDTH, LIST_MAX_WIDTH);
|
|
5833
5853
|
return {
|
|
5834
5854
|
...base,
|
|
5835
|
-
|
|
5836
|
-
|
|
5855
|
+
list,
|
|
5856
|
+
pane: width - list - 2 * COLUMN_MARGIN
|
|
5837
5857
|
};
|
|
5838
5858
|
}
|
|
5839
5859
|
/**
|
|
5840
|
-
* The reader's geometry over the transcript it is showing, with the
|
|
5841
|
-
*
|
|
5860
|
+
* The reader's geometry over the transcript it is showing, with the turn panel
|
|
5861
|
+
* measured at the width that geometry gives it.
|
|
5842
5862
|
* @param state - where the reader is.
|
|
5843
|
-
* @param groups - the turns the
|
|
5863
|
+
* @param groups - the turns the list names.
|
|
5844
5864
|
* @param blocks - the navigable blocks.
|
|
5845
5865
|
* @param width - the terminal's columns.
|
|
5846
5866
|
* @param rows - the rows the reader draws.
|
|
5847
|
-
* @param minColumns - columns
|
|
5848
|
-
* @returns the geometry, with its
|
|
5867
|
+
* @param minColumns - columns the reader needs before it draws both panels.
|
|
5868
|
+
* @returns the geometry, with its panel measure filled in.
|
|
5849
5869
|
*/
|
|
5850
5870
|
function readerGeometryFor(state, groups, blocks, width, rows, minColumns) {
|
|
5851
|
-
const layout = readerGeometry(width, rows, state, minColumns
|
|
5871
|
+
const layout = readerGeometry(width, rows, state, minColumns);
|
|
5852
5872
|
const group = groups[groupIndex(state, groups)];
|
|
5853
|
-
|
|
5854
|
-
if (group === void 0 || paneWidth === void 0) return layout;
|
|
5873
|
+
if (group === void 0 || layout.pane === 0) return layout;
|
|
5855
5874
|
return {
|
|
5856
5875
|
...layout,
|
|
5857
|
-
|
|
5876
|
+
measure: measurePane(group, blocks, layout.pane)
|
|
5858
5877
|
};
|
|
5859
5878
|
}
|
|
5860
5879
|
/**
|
|
5861
|
-
* The
|
|
5880
|
+
* The rows the turn list draws: every turn, with the sections of the one being
|
|
5881
|
+
* read listed under it. Only that turn opens, so the list stays a timeline a
|
|
5882
|
+
* long session can still be walked through, and the sections of another turn
|
|
5883
|
+
* are one step away rather than behind a key of their own.
|
|
5884
|
+
* @param state - where the reader is.
|
|
5885
|
+
* @param groups - the turns the list names.
|
|
5886
|
+
* @returns the rows in drawing order, each marked when the cursor holds it.
|
|
5887
|
+
*/
|
|
5888
|
+
function readerOutline(state, groups) {
|
|
5889
|
+
const held = groupIndex(state, groups);
|
|
5890
|
+
return groups.flatMap((group, index) => {
|
|
5891
|
+
const turn = {
|
|
5892
|
+
kind: "turn",
|
|
5893
|
+
group,
|
|
5894
|
+
open: index === held
|
|
5895
|
+
};
|
|
5896
|
+
if (index !== held) return [turn];
|
|
5897
|
+
return [turn, ...group.sections.map((cursor) => ({
|
|
5898
|
+
kind: "section",
|
|
5899
|
+
cursor,
|
|
5900
|
+
held: sameCursor(cursor, state.cursor)
|
|
5901
|
+
}))];
|
|
5902
|
+
});
|
|
5903
|
+
}
|
|
5904
|
+
/**
|
|
5905
|
+
* Every section of every listed turn, in reading order, which is what the
|
|
5906
|
+
* list's own `Up` and `Down` step along.
|
|
5907
|
+
* @param groups - the turns the list names.
|
|
5908
|
+
* @returns one cursor per section.
|
|
5909
|
+
*/
|
|
5910
|
+
function allSections(groups) {
|
|
5911
|
+
return groups.flatMap((group) => [...group.sections]);
|
|
5912
|
+
}
|
|
5913
|
+
/**
|
|
5914
|
+
* The largest first visible panel row; 0 while the whole turn fits at once.
|
|
5862
5915
|
* @param geometry - the reader's geometry.
|
|
5863
5916
|
* @returns the row the scroll stops at.
|
|
5864
5917
|
*/
|
|
5865
5918
|
function maxOffset(geometry) {
|
|
5866
|
-
return Math.max(0, geometry.
|
|
5919
|
+
return Math.max(0, geometry.measure.total - geometry.body);
|
|
5867
5920
|
}
|
|
5868
5921
|
/**
|
|
5869
|
-
* Where the
|
|
5922
|
+
* Where the panel scrolls to put one section's header on its first row.
|
|
5870
5923
|
* @param index - the section, by position in its turn.
|
|
5871
5924
|
* @param geometry - the reader's geometry.
|
|
5872
5925
|
* @returns the offset.
|
|
5873
5926
|
*/
|
|
5874
5927
|
function showSection(index, geometry) {
|
|
5875
|
-
return Math.min(geometry.
|
|
5928
|
+
return Math.min(geometry.measure.headers[index] ?? 0, maxOffset(geometry));
|
|
5876
5929
|
}
|
|
5877
5930
|
/**
|
|
5878
5931
|
* Where one movement target lands along a list.
|
|
@@ -5892,63 +5945,87 @@ function targetIndex(to, index, count) {
|
|
|
5892
5945
|
}
|
|
5893
5946
|
}
|
|
5894
5947
|
/**
|
|
5895
|
-
* The
|
|
5896
|
-
*
|
|
5897
|
-
*
|
|
5948
|
+
* The panel measure of one turn, which is the geometry's own while the cursor
|
|
5949
|
+
* stays in the turn it was measured for and a fresh one once it crosses into
|
|
5950
|
+
* another.
|
|
5951
|
+
* @param group - the turn to measure.
|
|
5952
|
+
* @param held - the turn the geometry was measured for.
|
|
5953
|
+
* @param geometry - the reader's geometry.
|
|
5954
|
+
* @param blocks - the navigable blocks.
|
|
5955
|
+
* @returns where each of that turn's sections starts.
|
|
5898
5956
|
*/
|
|
5899
|
-
function
|
|
5957
|
+
function measureOf(group, held, geometry, blocks) {
|
|
5958
|
+
if (group === held) return geometry.measure;
|
|
5959
|
+
return geometry.pane === 0 ? EMPTY_MEASURE : measurePane(group, blocks, geometry.pane);
|
|
5960
|
+
}
|
|
5961
|
+
/**
|
|
5962
|
+
* Put the reader on one section, with the panel scrolled to its header.
|
|
5963
|
+
* @param state - where the reader is.
|
|
5964
|
+
* @param cursor - the section to read.
|
|
5965
|
+
* @param groups - the turns the list names.
|
|
5966
|
+
* @param geometry - the reader's geometry.
|
|
5967
|
+
* @param blocks - the navigable blocks.
|
|
5968
|
+
* @returns the state on that section.
|
|
5969
|
+
*/
|
|
5970
|
+
function readSection(state, cursor, groups, geometry, blocks) {
|
|
5971
|
+
const held = groups[groupIndex(state, groups)];
|
|
5972
|
+
const next = groups[turnIndexOf(cursor, groups)];
|
|
5973
|
+
/* v8 ignore next -- every cursor the list steps to comes from a listed turn */
|
|
5974
|
+
if (next === void 0) return state;
|
|
5975
|
+
const measure = measureOf(next, held, geometry, blocks);
|
|
5976
|
+
const index = next.sections.findIndex((section) => sameCursor(section, cursor));
|
|
5977
|
+
/* v8 ignore next -- the cursor came from this turn's own sections, so the measure has its row */
|
|
5978
|
+
const header = measure.headers[index] ?? 0;
|
|
5900
5979
|
return {
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
offset:
|
|
5904
|
-
...state.query === void 0 ? {} : { query: state.query }
|
|
5980
|
+
...state,
|
|
5981
|
+
cursor,
|
|
5982
|
+
offset: Math.min(header, Math.max(0, measure.total - geometry.body))
|
|
5905
5983
|
};
|
|
5906
5984
|
}
|
|
5907
5985
|
/**
|
|
5908
5986
|
* The state without its query.
|
|
5909
5987
|
* @param state - where the reader is.
|
|
5910
|
-
* @returns the same state with the
|
|
5988
|
+
* @returns the same state with the list naming every turn again.
|
|
5911
5989
|
*/
|
|
5912
5990
|
function withoutQuery(state) {
|
|
5913
5991
|
return {
|
|
5914
5992
|
cursor: state.cursor,
|
|
5915
5993
|
column: state.column,
|
|
5916
|
-
offset: state.offset
|
|
5917
|
-
...state.pinned === void 0 ? {} : { pinned: state.pinned }
|
|
5994
|
+
offset: state.offset
|
|
5918
5995
|
};
|
|
5919
5996
|
}
|
|
5920
5997
|
/**
|
|
5921
|
-
*
|
|
5998
|
+
* Scroll the turn panel, and read the cursor off the row it landed on: the
|
|
5999
|
+
* section the top row belongs to is the one the transcript resumes at.
|
|
5922
6000
|
* @param state - where the reader is.
|
|
5923
|
-
* @param
|
|
5924
|
-
* @param groups - the turns the
|
|
6001
|
+
* @param offset - the first visible panel row, already clamped.
|
|
6002
|
+
* @param groups - the turns the list names.
|
|
5925
6003
|
* @param geometry - the reader's geometry.
|
|
5926
|
-
* @returns the state
|
|
6004
|
+
* @returns the state at that row.
|
|
5927
6005
|
*/
|
|
5928
|
-
function
|
|
6006
|
+
function readAt(state, offset, groups, geometry) {
|
|
5929
6007
|
const group = groups[groupIndex(state, groups)];
|
|
5930
|
-
|
|
5931
|
-
const
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
6008
|
+
const index = geometry.measure.headers.findLastIndex((header) => header <= offset);
|
|
6009
|
+
const cursor = group?.sections[index];
|
|
6010
|
+
return cursor === void 0 ? {
|
|
6011
|
+
...state,
|
|
6012
|
+
offset
|
|
6013
|
+
} : {
|
|
5936
6014
|
...state,
|
|
5937
|
-
column: "pane",
|
|
5938
6015
|
cursor,
|
|
5939
|
-
offset
|
|
6016
|
+
offset
|
|
5940
6017
|
};
|
|
5941
6018
|
}
|
|
5942
6019
|
/**
|
|
5943
6020
|
* Put the reader on one turn, at its first section.
|
|
5944
6021
|
* @param state - where the reader is.
|
|
5945
6022
|
* @param index - the turn, by position in the listed turns.
|
|
5946
|
-
* @param groups - the turns the
|
|
6023
|
+
* @param groups - the turns the list names.
|
|
5947
6024
|
* @returns the state on that turn, scrolled to its top.
|
|
5948
6025
|
*/
|
|
5949
6026
|
function selectTurn(state, index, groups) {
|
|
5950
6027
|
const cursor = cursorAt(groups, index, 0);
|
|
5951
|
-
/* v8 ignore next --
|
|
6028
|
+
/* v8 ignore next -- the caller refuses an empty list first */
|
|
5952
6029
|
if (cursor === void 0) return state;
|
|
5953
6030
|
return {
|
|
5954
6031
|
...state,
|
|
@@ -5957,100 +6034,56 @@ function selectTurn(state, index, groups) {
|
|
|
5957
6034
|
};
|
|
5958
6035
|
}
|
|
5959
6036
|
/**
|
|
5960
|
-
* Answer
|
|
5961
|
-
*
|
|
5962
|
-
* @
|
|
5963
|
-
* @param step - 1 for the next page, -1 for the previous one.
|
|
5964
|
-
* @param groups - the turns the rail lists.
|
|
5965
|
-
* @param geometry - the reader's geometry.
|
|
5966
|
-
* @returns the state after the page.
|
|
5967
|
-
*/
|
|
5968
|
-
function pageBy(state, step, groups, geometry) {
|
|
5969
|
-
if (state.column === "pane") {
|
|
5970
|
-
const by = Math.max(1, geometry.body - 1);
|
|
5971
|
-
return {
|
|
5972
|
-
...state,
|
|
5973
|
-
offset: clamp(state.offset + step * by, 0, maxOffset(geometry))
|
|
5974
|
-
};
|
|
5975
|
-
}
|
|
5976
|
-
if (groups.length === 0) return state;
|
|
5977
|
-
return selectTurn(state, clamp(groupIndex(state, groups) + step * Math.max(1, geometry.body), 0, groups.length - 1), groups);
|
|
5978
|
-
}
|
|
5979
|
-
/**
|
|
5980
|
-
* Whether the body draws one of its columns at a time, which is what a
|
|
5981
|
-
* terminal too narrow to hold the rail beside a pane does.
|
|
5982
|
-
* @param geometry - the reader's geometry.
|
|
5983
|
-
* @returns true while the rail and the sections take turns at the body.
|
|
5984
|
-
*/
|
|
5985
|
-
function singleColumn(geometry) {
|
|
5986
|
-
return geometry.rail === 0 && geometry.panes.length === 1;
|
|
5987
|
-
}
|
|
5988
|
-
/**
|
|
5989
|
-
* Answer `Escape` inside the reader: clear the query, close the query line,
|
|
5990
|
-
* unpin, then - on a terminal that draws one column at a time - step back to
|
|
5991
|
-
* the rail. {@link readerClosesOnEscape} reports when the chain is spent and
|
|
5992
|
-
* the press closes the reader instead.
|
|
6037
|
+
* Answer `Escape` on the query line: clear the query, then close the line and
|
|
6038
|
+
* list every turn again. From either panel the key closes the reader instead,
|
|
6039
|
+
* which {@link readerClosesOnEscape} reports.
|
|
5993
6040
|
* @param state - where the reader is.
|
|
5994
6041
|
* @returns the state after one step of the chain.
|
|
5995
6042
|
*/
|
|
5996
6043
|
function escapeStep(state) {
|
|
5997
|
-
if (state.
|
|
5998
|
-
if (state.query !== void 0 && state.query !== "") return {
|
|
5999
|
-
...state,
|
|
6000
|
-
query: ""
|
|
6001
|
-
};
|
|
6002
|
-
return withoutQuery({
|
|
6003
|
-
...state,
|
|
6004
|
-
column: "rail"
|
|
6005
|
-
});
|
|
6006
|
-
}
|
|
6007
|
-
if (state.pinned !== void 0) return withoutPin(state);
|
|
6008
|
-
return {
|
|
6044
|
+
if (state.query !== void 0 && state.query !== "") return {
|
|
6009
6045
|
...state,
|
|
6010
|
-
|
|
6046
|
+
query: ""
|
|
6011
6047
|
};
|
|
6048
|
+
return withoutQuery({
|
|
6049
|
+
...state,
|
|
6050
|
+
column: "list"
|
|
6051
|
+
});
|
|
6012
6052
|
}
|
|
6013
6053
|
/**
|
|
6014
|
-
* Whether `Escape` closes the reader rather than stepping
|
|
6054
|
+
* Whether `Escape` closes the reader rather than stepping the query chain.
|
|
6015
6055
|
* @param state - where the reader is.
|
|
6016
|
-
* @
|
|
6017
|
-
*
|
|
6018
|
-
* @returns true once no query line is open, nothing is pinned, and the
|
|
6019
|
-
* keyboard is not in a narrow terminal's sections.
|
|
6056
|
+
* @returns true from either panel; the key leaves the reader from both, and
|
|
6057
|
+
* `Left` is the way back to the turn list.
|
|
6020
6058
|
*/
|
|
6021
|
-
function readerClosesOnEscape(state
|
|
6022
|
-
|
|
6023
|
-
return !(state.column === "pane" && singleColumn(geometry));
|
|
6059
|
+
function readerClosesOnEscape(state) {
|
|
6060
|
+
return state.column !== "filter";
|
|
6024
6061
|
}
|
|
6025
6062
|
/**
|
|
6026
6063
|
* Apply one key press to the reader.
|
|
6027
6064
|
* @param state - where the reader is.
|
|
6028
6065
|
* @param intent - what the key meant.
|
|
6029
|
-
* @param groups - the turns the
|
|
6030
|
-
* @param geometry - the reader's geometry, with the
|
|
6066
|
+
* @param groups - the turns the list names, already narrowed by the query.
|
|
6067
|
+
* @param geometry - the reader's geometry, with the turn panel measured.
|
|
6068
|
+
* @param blocks - the navigable blocks, for the panel rows of a turn the
|
|
6069
|
+
* geometry was not measured for, which is what the list crossing a turn
|
|
6070
|
+
* boundary lands on.
|
|
6031
6071
|
* @returns the state after the press; the state itself when nothing moves.
|
|
6032
6072
|
*/
|
|
6033
|
-
function reduceReader(state, intent, groups, geometry) {
|
|
6073
|
+
function reduceReader(state, intent, groups, geometry, blocks) {
|
|
6034
6074
|
switch (intent.kind) {
|
|
6035
|
-
case "turn": return groups.length === 0 ? state : selectTurn(state, targetIndex(intent.to, groupIndex(state, groups), groups.length), groups);
|
|
6036
6075
|
case "section": {
|
|
6037
|
-
const
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
case "
|
|
6076
|
+
const sections = allSections(groups);
|
|
6077
|
+
const at = sections.findIndex((section) => sameCursor(section, state.cursor));
|
|
6078
|
+
const cursor = sections[targetIndex(intent.to, Math.max(0, at), sections.length)];
|
|
6079
|
+
return cursor === void 0 ? state : readSection(state, cursor, groups, geometry, blocks);
|
|
6080
|
+
}
|
|
6081
|
+
case "turn": return groups.length === 0 ? state : selectTurn(state, clamp(groupIndex(state, groups) + intent.step, 0, groups.length - 1), groups);
|
|
6082
|
+
case "scroll": return readAt(state, targetIndex(intent.to, state.offset, maxOffset(geometry) + 1), groups, geometry);
|
|
6083
|
+
case "page": return readAt(state, clamp(state.offset + intent.step * Math.max(1, geometry.body - 1), 0, maxOffset(geometry)), groups, geometry);
|
|
6084
|
+
case "column": return {
|
|
6043
6085
|
...state,
|
|
6044
|
-
|
|
6045
|
-
};
|
|
6046
|
-
case "page": return pageBy(state, intent.step, groups, geometry);
|
|
6047
|
-
case "column": return intent.to === "rail" ? {
|
|
6048
|
-
...state,
|
|
6049
|
-
column: "rail"
|
|
6050
|
-
} : selectSection(state, 0, groups, geometry);
|
|
6051
|
-
case "pin": return state.pinned !== void 0 && sameCursor(state.pinned, state.cursor) ? withoutPin(state) : {
|
|
6052
|
-
...state,
|
|
6053
|
-
pinned: state.cursor
|
|
6086
|
+
column: intent.to
|
|
6054
6087
|
};
|
|
6055
6088
|
case "filter": return {
|
|
6056
6089
|
...state,
|
|
@@ -6067,7 +6100,7 @@ function reduceReader(state, intent, groups, geometry) {
|
|
|
6067
6100
|
};
|
|
6068
6101
|
case "commit": return {
|
|
6069
6102
|
...state,
|
|
6070
|
-
column: "
|
|
6103
|
+
column: "list"
|
|
6071
6104
|
};
|
|
6072
6105
|
case "escape": return escapeStep(state);
|
|
6073
6106
|
case "anchor": return anchorOffset(state, groups, geometry);
|
|
@@ -6076,33 +6109,29 @@ function reduceReader(state, intent, groups, geometry) {
|
|
|
6076
6109
|
}
|
|
6077
6110
|
}
|
|
6078
6111
|
/**
|
|
6079
|
-
* Put the
|
|
6080
|
-
* it: the reader re-anchors on the section itself, never on a row
|
|
6081
|
-
* a narrower terminal does not lose the user's place.
|
|
6112
|
+
* Put the section being read back in view after a resize rewrapped the panel
|
|
6113
|
+
* under it: the reader re-anchors on the section itself, never on a row
|
|
6114
|
+
* number, so a narrower terminal does not lose the user's place.
|
|
6082
6115
|
* @param state - where the reader is.
|
|
6083
|
-
* @param groups - the turns the
|
|
6116
|
+
* @param groups - the turns the list names.
|
|
6084
6117
|
* @param geometry - the reader's geometry after the change.
|
|
6085
6118
|
* @returns the state with its offset settled.
|
|
6086
6119
|
*/
|
|
6087
6120
|
function anchorOffset(state, groups, geometry) {
|
|
6088
6121
|
const group = groups[groupIndex(state, groups)];
|
|
6089
6122
|
if (group === void 0) return state;
|
|
6090
|
-
const index = sectionIndex(state, group);
|
|
6091
|
-
const header = geometry.pane.headers[index] ?? 0;
|
|
6092
|
-
const top = clamp(state.offset, 0, maxOffset(geometry));
|
|
6093
|
-
const visible = header >= top && header < top + geometry.body;
|
|
6094
6123
|
return {
|
|
6095
6124
|
...state,
|
|
6096
|
-
offset:
|
|
6125
|
+
offset: showSection(sectionIndex(state, group), geometry)
|
|
6097
6126
|
};
|
|
6098
6127
|
}
|
|
6099
6128
|
/**
|
|
6100
6129
|
* Narrow the turns to the ones a query matches, keeping the conversation's
|
|
6101
|
-
* own order: the
|
|
6130
|
+
* own order: the list is a timeline, so it is filtered rather than ranked.
|
|
6102
6131
|
* @param groups - every turn of the transcript.
|
|
6103
6132
|
* @param blocks - the navigable blocks, for the text inside each turn.
|
|
6104
6133
|
* @param query - what the user typed; an empty query keeps every turn.
|
|
6105
|
-
* @returns the turns to
|
|
6134
|
+
* @returns the turns to name.
|
|
6106
6135
|
*/
|
|
6107
6136
|
function filterTurns(groups, blocks, query) {
|
|
6108
6137
|
if (query === void 0 || query === "") return groups;
|
|
@@ -6111,7 +6140,7 @@ function filterTurns(groups, blocks, query) {
|
|
|
6111
6140
|
return groups.filter((group) => matched.has(group));
|
|
6112
6141
|
}
|
|
6113
6142
|
/**
|
|
6114
|
-
* What one turn contributed, as the
|
|
6143
|
+
* What one turn contributed, as the list reports it at a glance.
|
|
6115
6144
|
* @param markers - the turn's counts and flags.
|
|
6116
6145
|
* @returns the marker strip, empty for a turn that contributed none of them.
|
|
6117
6146
|
*/
|
|
@@ -6134,75 +6163,95 @@ function cell(text, width) {
|
|
|
6134
6163
|
return `${cut}${" ".repeat(Math.max(0, width - visibleWidth(cut)))}`;
|
|
6135
6164
|
}
|
|
6136
6165
|
/**
|
|
6137
|
-
* One row of the turn
|
|
6166
|
+
* One row of the turn list: the mark, the turn number, its prompt, and what
|
|
6138
6167
|
* the turn contributed.
|
|
6139
6168
|
* @param group - the turn.
|
|
6140
|
-
* @param
|
|
6169
|
+
* @param open - whether this is the turn being read, whose sections follow it.
|
|
6170
|
+
* @param focused - whether the list itself has the keyboard.
|
|
6141
6171
|
* @param palette - the palette the row is styled with.
|
|
6142
|
-
* @param width - the
|
|
6172
|
+
* @param width - the list's columns.
|
|
6143
6173
|
* @returns the row, exactly `width` columns.
|
|
6144
6174
|
*/
|
|
6145
|
-
function
|
|
6175
|
+
function listRow(group, open, focused, palette, width) {
|
|
6146
6176
|
const marks = markerStrip(group.markers);
|
|
6147
6177
|
const room = Math.max(1, width - visibleWidth(marks));
|
|
6148
|
-
const lead =
|
|
6149
|
-
const label = truncateToWidth(group.label, Math.max(1, room - visibleWidth(lead) - (
|
|
6150
|
-
const head = `${lead}${
|
|
6151
|
-
const
|
|
6178
|
+
const lead = ` ${String(group.turn)} `;
|
|
6179
|
+
const label = truncateToWidth(group.label, Math.max(1, room - visibleWidth(lead) - (open ? 2 : 0)), ELLIPSIS$1);
|
|
6180
|
+
const head = `${lead}${open ? `[${label}]` : label}`;
|
|
6181
|
+
const paint = (text) => {
|
|
6182
|
+
if (!open) return palette.dim(text);
|
|
6183
|
+
return focused ? palette.bold(palette.accent(text)) : palette.accent(text);
|
|
6184
|
+
};
|
|
6185
|
+
const text = truncateToWidth(paint(head), room, ELLIPSIS$1);
|
|
6152
6186
|
return `${text}${" ".repeat(Math.max(0, room - visibleWidth(text)))}${palette.dim(marks)}`;
|
|
6153
6187
|
}
|
|
6188
|
+
/** Columns a section row is indented by, so the turn it belongs to reads as its heading. */
|
|
6189
|
+
const SECTION_INDENT = " ";
|
|
6190
|
+
/**
|
|
6191
|
+
* One section row of the turn list: the mark, the indent, and the label the
|
|
6192
|
+
* panel heads that section with.
|
|
6193
|
+
* @param cursor - the section.
|
|
6194
|
+
* @param blocks - the navigable blocks.
|
|
6195
|
+
* @param selected - whether the cursor holds it.
|
|
6196
|
+
* @param focused - whether the list itself has the keyboard.
|
|
6197
|
+
* @param palette - the palette the row is styled with.
|
|
6198
|
+
* @param width - the list's columns.
|
|
6199
|
+
* @returns the row, exactly `width` columns.
|
|
6200
|
+
*/
|
|
6201
|
+
function sectionRow(cursor, blocks, selected, focused, palette, width) {
|
|
6202
|
+
const found = sectionAt(cursor, blocks);
|
|
6203
|
+
const label = found === void 0 ? "" : paneLabel(found.block, found.part);
|
|
6204
|
+
const head = `${selected ? LIST_MARK : " "}${SECTION_INDENT}${label}`;
|
|
6205
|
+
const paint = (text) => {
|
|
6206
|
+
if (!selected) return palette.dim(text);
|
|
6207
|
+
return focused ? palette.bold(palette.accent(text)) : palette.accent(text);
|
|
6208
|
+
};
|
|
6209
|
+
return cell(paint(head), width);
|
|
6210
|
+
}
|
|
6154
6211
|
/**
|
|
6155
|
-
* The turn
|
|
6156
|
-
* @param
|
|
6157
|
-
* @param
|
|
6212
|
+
* The turn list's rows, windowed so the row the cursor holds is always drawn.
|
|
6213
|
+
* @param rows - the outline the list draws.
|
|
6214
|
+
* @param blocks - the navigable blocks, for each section's own label.
|
|
6215
|
+
* @param focused - whether the list itself has the keyboard.
|
|
6158
6216
|
* @param palette - the palette the rows are styled with.
|
|
6159
|
-
* @param width - the
|
|
6217
|
+
* @param width - the list's columns.
|
|
6160
6218
|
* @param body - the rows the body has.
|
|
6161
6219
|
* @returns the rows to draw, oldest first.
|
|
6162
6220
|
*/
|
|
6163
|
-
function
|
|
6164
|
-
const
|
|
6165
|
-
|
|
6221
|
+
function listColumn(rows, blocks, focused, palette, width, body) {
|
|
6222
|
+
const cursor = rows.findIndex((row) => row.kind === "section" && row.held);
|
|
6223
|
+
const start = clamp(Math.max(0, cursor) - Math.floor(Math.max(0, body - 1) / 2), 0, Math.max(0, rows.length - body));
|
|
6224
|
+
return rows.slice(start, start + body).map((row) => row.kind === "turn" ? listRow(row.group, row.open, focused, palette, width) : sectionRow(row.cursor, blocks, row.held, focused, palette, width));
|
|
6166
6225
|
}
|
|
6167
6226
|
/**
|
|
6168
|
-
* One section header inside
|
|
6227
|
+
* One section header inside the turn panel.
|
|
6169
6228
|
* @param text - what the section is called, with its turn.
|
|
6170
6229
|
* @param palette - the palette the header is styled with.
|
|
6171
|
-
* @param width - the
|
|
6172
|
-
* @param
|
|
6230
|
+
* @param width - the panel's columns.
|
|
6231
|
+
* @param reading - whether this is the section the top row belongs to.
|
|
6173
6232
|
* @returns the header row.
|
|
6174
6233
|
*/
|
|
6175
|
-
function headerRow(text, palette, width,
|
|
6234
|
+
function headerRow(text, palette, width, reading) {
|
|
6176
6235
|
const body = ` ${text} `;
|
|
6177
6236
|
const line = `${HEADER_LEAD}${body}${HEADER_FILL.repeat(Math.max(0, width - visibleWidth(HEADER_LEAD) - visibleWidth(body)))}`;
|
|
6178
|
-
return
|
|
6237
|
+
return reading ? palette.bold(palette.accent(line)) : palette.dim(line);
|
|
6179
6238
|
}
|
|
6180
6239
|
/**
|
|
6181
|
-
*
|
|
6182
|
-
*
|
|
6240
|
+
* The turn panel's rows: every section of the held turn, in reading order,
|
|
6241
|
+
* each under its own header.
|
|
6242
|
+
* @param group - the turn the panel shows.
|
|
6183
6243
|
* @param blocks - the navigable blocks.
|
|
6184
|
-
* @param
|
|
6185
|
-
* @param
|
|
6186
|
-
* @param
|
|
6187
|
-
* @returns the rows, header first.
|
|
6188
|
-
*/
|
|
6189
|
-
function sectionRows(cursor, blocks, palette, width, held) {
|
|
6190
|
-
const found = sectionAt(cursor, blocks);
|
|
6191
|
-
if (found === void 0) return [];
|
|
6192
|
-
const edge = held ? palette.accent(HELD_EDGE) : " ";
|
|
6193
|
-
return [headerRow(`${paneLabel(found.block, found.part)} · turn ${String(found.block.turn)}`, palette, width, held), ...sectionBody(cursor, blocks, width).map((row) => `${edge}${row}`)];
|
|
6194
|
-
}
|
|
6195
|
-
/**
|
|
6196
|
-
* The walking pane's rows: every section of the held turn, in reading order.
|
|
6197
|
-
* @param group - the turn the pane shows.
|
|
6198
|
-
* @param blocks - the navigable blocks.
|
|
6199
|
-
* @param cursor - the section the keyboard holds.
|
|
6200
|
-
* @param palette - the palette the headers and edges are styled with.
|
|
6201
|
-
* @param width - the pane's columns.
|
|
6244
|
+
* @param cursor - the section the top row belongs to.
|
|
6245
|
+
* @param palette - the palette the headers are styled with.
|
|
6246
|
+
* @param width - the panel's columns.
|
|
6202
6247
|
* @returns the rows, before the scroll window is applied.
|
|
6203
6248
|
*/
|
|
6204
6249
|
function paneColumn(group, blocks, cursor, palette, width) {
|
|
6205
|
-
return group.sections.flatMap((section) =>
|
|
6250
|
+
return group.sections.flatMap((section) => {
|
|
6251
|
+
const found = sectionAt(section, blocks);
|
|
6252
|
+
if (found === void 0) return [];
|
|
6253
|
+
return [headerRow(`${paneLabel(found.block, found.part)} · turn ${String(found.block.turn)}`, palette, width, sameCursor(section, cursor)), ...sectionBody(section, blocks, width)];
|
|
6254
|
+
});
|
|
6206
6255
|
}
|
|
6207
6256
|
/**
|
|
6208
6257
|
* Assemble one body row from the columns that are drawn.
|
|
@@ -6222,24 +6271,22 @@ function bodyRow(columns, row, palette, width) {
|
|
|
6222
6271
|
return truncateToWidth(line, Math.max(1, width), ELLIPSIS$1);
|
|
6223
6272
|
}
|
|
6224
6273
|
/**
|
|
6225
|
-
* What the legend rule says on its left: the query line while one is open,
|
|
6226
|
-
* the
|
|
6274
|
+
* What the legend rule says on its left: the query line while one is open, or
|
|
6275
|
+
* the keys the panel holding the keyboard answers.
|
|
6227
6276
|
* @param state - where the reader is.
|
|
6228
|
-
* @param geometry - the reader's geometry.
|
|
6229
6277
|
* @param palette - the palette the text is styled with.
|
|
6230
6278
|
* @param room - the columns the rule leaves its legend.
|
|
6231
6279
|
* @returns the styled text.
|
|
6232
6280
|
*/
|
|
6233
|
-
function legendText(state,
|
|
6281
|
+
function legendText(state, palette, room) {
|
|
6234
6282
|
if (state.column === "filter") return palette.accent(truncateToWidth(`/ ${state.query ?? ""}`, Math.max(1, room), ELLIPSIS$1));
|
|
6235
|
-
|
|
6236
|
-
return palette.dim(fitLegend(READER_HINTS[state.column === "rail" ? "rail" : "pane"], room));
|
|
6283
|
+
return palette.dim(fitLegend(READER_HINTS[state.column], room));
|
|
6237
6284
|
}
|
|
6238
6285
|
/**
|
|
6239
6286
|
* Where one entry sits in the list it belongs to, as both the top rule and
|
|
6240
6287
|
* the legend readout state it: the 1-based position, and 0 for a list with no
|
|
6241
6288
|
* entry to be at. A turn's own number is not its position — the blocks before
|
|
6242
|
-
* the first prompt are a turn of the
|
|
6289
|
+
* the first prompt are a turn of the list too — so the position is what every
|
|
6243
6290
|
* count in the frame is built from.
|
|
6244
6291
|
* @param index - the entry's index into the list.
|
|
6245
6292
|
* @param count - how many entries the list has.
|
|
@@ -6249,10 +6296,10 @@ function place(index, count) {
|
|
|
6249
6296
|
return Math.min(index + 1, count);
|
|
6250
6297
|
}
|
|
6251
6298
|
/**
|
|
6252
|
-
* What the legend rule reports on its right: how far the
|
|
6299
|
+
* What the legend rule reports on its right: how far the read has come, or
|
|
6253
6300
|
* how much of the transcript a query still holds.
|
|
6254
6301
|
* @param state - where the reader is.
|
|
6255
|
-
* @param groups - the turns the
|
|
6302
|
+
* @param groups - the turns the list names.
|
|
6256
6303
|
* @param geometry - the reader's geometry.
|
|
6257
6304
|
* @param totalTurns - the turns the transcript has before the query.
|
|
6258
6305
|
* @returns the readout.
|
|
@@ -6260,20 +6307,13 @@ function place(index, count) {
|
|
|
6260
6307
|
function readout(state, groups, geometry, totalTurns) {
|
|
6261
6308
|
if (state.query !== void 0 && state.query !== "") return `${String(groups.length)}/${String(totalTurns)} turns`;
|
|
6262
6309
|
const index = groupIndex(state, groups);
|
|
6263
|
-
const
|
|
6264
|
-
|
|
6265
|
-
const sections = group?.sections.length ?? 0;
|
|
6266
|
-
const rowsShown = Math.min(state.offset + 1, geometry.pane.total);
|
|
6267
|
-
return [
|
|
6268
|
-
`turn ${String(place(index, groups.length))}/${String(groups.length)}`,
|
|
6269
|
-
`section ${String(place(section, sections))}/${String(sections)}`,
|
|
6270
|
-
`row ${String(rowsShown)}/${String(geometry.pane.total)}`
|
|
6271
|
-
].join(" · ");
|
|
6310
|
+
const rowsShown = Math.min(state.offset + 1, geometry.measure.total);
|
|
6311
|
+
return [`turn ${String(place(index, groups.length))}/${String(groups.length)}`, `row ${String(rowsShown)}/${String(geometry.measure.total)}`].join(" · ");
|
|
6272
6312
|
}
|
|
6273
6313
|
/**
|
|
6274
6314
|
* Draw the reader.
|
|
6275
6315
|
* @param state - where the reader is.
|
|
6276
|
-
* @param groups - the turns the
|
|
6316
|
+
* @param groups - the turns the list names, already narrowed by the query.
|
|
6277
6317
|
* @param render - the palette, the blocks, the geometry inputs, and the turn total.
|
|
6278
6318
|
* @returns exactly `render.rows` lines, none wider than `render.width`.
|
|
6279
6319
|
*/
|
|
@@ -6289,39 +6329,29 @@ function readerRows(state, groups, render) {
|
|
|
6289
6329
|
const selected = groupIndex(state, groups);
|
|
6290
6330
|
const group = groups[selected];
|
|
6291
6331
|
const columns = [];
|
|
6292
|
-
if (geometry.
|
|
6293
|
-
width: geometry.
|
|
6294
|
-
rows: groups.length === 0 ? [palette.dim(`no turn matches "${state.query ?? ""}"`)] :
|
|
6295
|
-
});
|
|
6296
|
-
const [pinnedWidth, comparedWidth] = geometry.panes;
|
|
6297
|
-
const pinned = state.pinned;
|
|
6298
|
-
if (pinned !== void 0 && comparedWidth !== void 0 && pinnedWidth !== void 0) columns.push({
|
|
6299
|
-
width: pinnedWidth,
|
|
6300
|
-
rows: sectionRows(pinned, blocks, palette, pinnedWidth, false)
|
|
6332
|
+
if (geometry.list > 0) columns.push({
|
|
6333
|
+
width: geometry.list,
|
|
6334
|
+
rows: groups.length === 0 ? [palette.dim(`no turn matches "${state.query ?? ""}"`)] : listColumn(readerOutline(state, groups), blocks, state.column !== "pane", palette, geometry.list, geometry.body)
|
|
6301
6335
|
});
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
rows: group === void 0 ? [] : paneColumn(group, blocks, state.cursor, palette, paneWidth).slice(state.offset)
|
|
6336
|
+
if (geometry.pane > 0) columns.push({
|
|
6337
|
+
width: geometry.pane,
|
|
6338
|
+
rows: group === void 0 ? [] : paneColumn(group, blocks, state.cursor, palette, geometry.pane).slice(state.offset)
|
|
6306
6339
|
});
|
|
6307
6340
|
const body = [];
|
|
6308
6341
|
for (let row = 0; row < geometry.body; row += 1) body.push(bodyRow(columns, row, palette, width));
|
|
6309
|
-
const badge = chip(palette, READER_CHIP);
|
|
6310
|
-
const position = `${String(state.cursor.block + 1)}/${String(blocks.length)}`;
|
|
6311
6342
|
const report = readout(state, groups, geometry, totalTurns);
|
|
6312
6343
|
const legendRoom = ruleRoom(width) - visibleWidth(report) - 1;
|
|
6313
6344
|
return [
|
|
6314
6345
|
topRule({
|
|
6315
|
-
chip:
|
|
6346
|
+
chip: chip(palette, READER_CHIP),
|
|
6316
6347
|
title: palette.bold(palette.accent(`turn ${String(place(selected, groups.length))} of ${String(groups.length)}`)),
|
|
6317
|
-
right: palette.dim(position),
|
|
6318
6348
|
width,
|
|
6319
6349
|
palette,
|
|
6320
6350
|
tone: "focus"
|
|
6321
6351
|
}),
|
|
6322
6352
|
...body,
|
|
6323
6353
|
legendRule({
|
|
6324
|
-
left: legendText(state,
|
|
6354
|
+
left: legendText(state, palette, legendRoom),
|
|
6325
6355
|
right: palette.dim(report),
|
|
6326
6356
|
width,
|
|
6327
6357
|
palette,
|
|
@@ -6355,12 +6385,10 @@ function readerRows(state, groups, render) {
|
|
|
6355
6385
|
*
|
|
6356
6386
|
* The pane holds no copy of the transcript: it re-reads the blocks and their
|
|
6357
6387
|
* turns on every render, so a reply that is still streaming grows inside it,
|
|
6358
|
-
* a tool result that lands appears, and a new turn joins the
|
|
6388
|
+
* a tool result that lands appears, and a new turn joins the list, all with
|
|
6359
6389
|
* no push and no second clock.
|
|
6360
6390
|
* @module @deepseek-ai/dsh-tui-app/reader-overlay
|
|
6361
6391
|
*/
|
|
6362
|
-
/** Which digits select a section of the held turn directly. */
|
|
6363
|
-
const SECTION_DIGIT = /^[1-9]$/u;
|
|
6364
6392
|
/** The key that opens the query line. */
|
|
6365
6393
|
const FILTER_KEY = "/";
|
|
6366
6394
|
/**
|
|
@@ -6369,7 +6397,7 @@ const FILTER_KEY = "/";
|
|
|
6369
6397
|
*/
|
|
6370
6398
|
var ReaderPane = class {
|
|
6371
6399
|
options;
|
|
6372
|
-
/** Where the reader left the keyboard and the
|
|
6400
|
+
/** Where the reader left the keyboard and the reading. */
|
|
6373
6401
|
settled;
|
|
6374
6402
|
resolve;
|
|
6375
6403
|
/** Whether the reader is still open; a second close is ignored. */
|
|
@@ -6418,10 +6446,10 @@ var ReaderPane = class {
|
|
|
6418
6446
|
const groups = turnGroups(blocks);
|
|
6419
6447
|
const visible = filterTurns(groups, blocks, this.state.query);
|
|
6420
6448
|
const geometry = this.geometryFor(visible, blocks, rows);
|
|
6421
|
-
const layout = `${geometry.
|
|
6449
|
+
const layout = `${String(geometry.pane)}x${String(geometry.body)}`;
|
|
6422
6450
|
if (this.layout !== layout) {
|
|
6423
6451
|
this.layout = layout;
|
|
6424
|
-
this.state = reduceReader(this.state, { kind: "anchor" }, visible, geometry);
|
|
6452
|
+
this.state = reduceReader(this.state, { kind: "anchor" }, visible, geometry, blocks);
|
|
6425
6453
|
}
|
|
6426
6454
|
return readerRows(this.state, visible, {
|
|
6427
6455
|
palette: this.options.palette,
|
|
@@ -6464,13 +6492,13 @@ var ReaderPane = class {
|
|
|
6464
6492
|
if (matchesKey(data, "escape")) this.close("transcript");
|
|
6465
6493
|
return;
|
|
6466
6494
|
}
|
|
6467
|
-
if (matchesKey(data, "escape") && readerClosesOnEscape(this.state
|
|
6495
|
+
if (matchesKey(data, "escape") && readerClosesOnEscape(this.state)) {
|
|
6468
6496
|
this.close("transcript");
|
|
6469
6497
|
return;
|
|
6470
6498
|
}
|
|
6471
6499
|
const intent = this.intentOf(data);
|
|
6472
6500
|
if (intent === void 0) return;
|
|
6473
|
-
this.state = reduceReader(this.state, intent, visible, geometry);
|
|
6501
|
+
this.state = reduceReader(this.state, intent, visible, geometry, blocks);
|
|
6474
6502
|
}
|
|
6475
6503
|
/** Close the reader from outside, which is what quitting and `Ctrl+C` do. */
|
|
6476
6504
|
withdraw() {
|
|
@@ -6506,7 +6534,7 @@ var ReaderPane = class {
|
|
|
6506
6534
|
intentOf(data) {
|
|
6507
6535
|
switch (this.state.column) {
|
|
6508
6536
|
case "filter": return filterIntent(data);
|
|
6509
|
-
case "
|
|
6537
|
+
case "list": return listIntent(data);
|
|
6510
6538
|
case "pane": return paneIntent(data);
|
|
6511
6539
|
/* v8 ignore next 2 -- closed-union exhaustiveness guard */
|
|
6512
6540
|
default: return assertNever(this.state.column, "tui reader column");
|
|
@@ -6536,63 +6564,64 @@ function filterIntent(data) {
|
|
|
6536
6564
|
};
|
|
6537
6565
|
}
|
|
6538
6566
|
/**
|
|
6539
|
-
* What one key means while the turn
|
|
6567
|
+
* What one key means while the turn list owns the keyboard. `Escape` is not
|
|
6568
|
+
* among them: it leaves the reader, which {@link ReaderPane.handleInput}
|
|
6569
|
+
* answers before a key reaches this map.
|
|
6540
6570
|
* @param data - the raw key bytes.
|
|
6541
|
-
* @returns the intent, or undefined for a key the
|
|
6571
|
+
* @returns the intent, or undefined for a key the list ignores.
|
|
6542
6572
|
*/
|
|
6543
|
-
function
|
|
6573
|
+
function listIntent(data) {
|
|
6544
6574
|
if (matchesKey(data, "up")) return {
|
|
6545
|
-
kind: "
|
|
6575
|
+
kind: "section",
|
|
6546
6576
|
to: "previous"
|
|
6547
6577
|
};
|
|
6548
6578
|
if (matchesKey(data, "down")) return {
|
|
6549
|
-
kind: "
|
|
6579
|
+
kind: "section",
|
|
6550
6580
|
to: "next"
|
|
6551
6581
|
};
|
|
6552
6582
|
if (matchesKey(data, "home")) return {
|
|
6553
|
-
kind: "
|
|
6583
|
+
kind: "section",
|
|
6554
6584
|
to: "first"
|
|
6555
6585
|
};
|
|
6556
6586
|
if (matchesKey(data, "end")) return {
|
|
6557
|
-
kind: "
|
|
6587
|
+
kind: "section",
|
|
6558
6588
|
to: "last"
|
|
6559
6589
|
};
|
|
6560
6590
|
if (matchesKey(data, "pageUp")) return {
|
|
6561
|
-
kind: "
|
|
6591
|
+
kind: "turn",
|
|
6562
6592
|
step: -1
|
|
6563
6593
|
};
|
|
6564
6594
|
if (matchesKey(data, "pageDown")) return {
|
|
6565
|
-
kind: "
|
|
6595
|
+
kind: "turn",
|
|
6566
6596
|
step: 1
|
|
6567
6597
|
};
|
|
6568
6598
|
if (matchesKey(data, "right") || matchesKey(data, "tab") || matchesKey(data, "enter")) return {
|
|
6569
6599
|
kind: "column",
|
|
6570
6600
|
to: "pane"
|
|
6571
6601
|
};
|
|
6572
|
-
if (matchesKey(data, "escape")) return { kind: "escape" };
|
|
6573
6602
|
return typedText(data) === FILTER_KEY ? { kind: "filter" } : void 0;
|
|
6574
6603
|
}
|
|
6575
6604
|
/**
|
|
6576
|
-
* What one key means while the
|
|
6605
|
+
* What one key means while the turn panel owns the keyboard.
|
|
6577
6606
|
* @param data - the raw key bytes.
|
|
6578
|
-
* @returns the intent, or undefined for a key the
|
|
6607
|
+
* @returns the intent, or undefined for a key the panel ignores.
|
|
6579
6608
|
*/
|
|
6580
6609
|
function paneIntent(data) {
|
|
6581
|
-
if (matchesKey(data, "
|
|
6610
|
+
if (matchesKey(data, "up")) return {
|
|
6582
6611
|
kind: "scroll",
|
|
6583
|
-
|
|
6612
|
+
to: "previous"
|
|
6584
6613
|
};
|
|
6585
|
-
if (matchesKey(data, "
|
|
6614
|
+
if (matchesKey(data, "down")) return {
|
|
6586
6615
|
kind: "scroll",
|
|
6587
|
-
|
|
6616
|
+
to: "next"
|
|
6588
6617
|
};
|
|
6589
|
-
if (matchesKey(data, "
|
|
6590
|
-
kind: "
|
|
6591
|
-
to: "
|
|
6618
|
+
if (matchesKey(data, "home")) return {
|
|
6619
|
+
kind: "scroll",
|
|
6620
|
+
to: "first"
|
|
6592
6621
|
};
|
|
6593
|
-
if (matchesKey(data, "
|
|
6594
|
-
kind: "
|
|
6595
|
-
to: "
|
|
6622
|
+
if (matchesKey(data, "end")) return {
|
|
6623
|
+
kind: "scroll",
|
|
6624
|
+
to: "last"
|
|
6596
6625
|
};
|
|
6597
6626
|
if (matchesKey(data, "pageUp")) return {
|
|
6598
6627
|
kind: "page",
|
|
@@ -6602,26 +6631,348 @@ function paneIntent(data) {
|
|
|
6602
6631
|
kind: "page",
|
|
6603
6632
|
step: 1
|
|
6604
6633
|
};
|
|
6605
|
-
if (matchesKey(data, "home")) return {
|
|
6606
|
-
kind: "section",
|
|
6607
|
-
to: "first"
|
|
6608
|
-
};
|
|
6609
|
-
if (matchesKey(data, "end")) return {
|
|
6610
|
-
kind: "section",
|
|
6611
|
-
to: "last"
|
|
6612
|
-
};
|
|
6613
6634
|
if (matchesKey(data, "left") || matchesKey(data, "tab") || matchesKey(data, "shift+tab")) return {
|
|
6614
6635
|
kind: "column",
|
|
6615
|
-
to: "
|
|
6636
|
+
to: "list"
|
|
6637
|
+
};
|
|
6638
|
+
}
|
|
6639
|
+
//#endregion
|
|
6640
|
+
//#region lib/types/highlight.js
|
|
6641
|
+
/**
|
|
6642
|
+
* Syntax colour for fenced code in the transcript: the grammars a fence may
|
|
6643
|
+
* ask for, the theme its colours come from, and the SGR one token is drawn
|
|
6644
|
+
* with.
|
|
6645
|
+
*
|
|
6646
|
+
* Nothing loads at start. A grammar is a few hundred kilobytes of TextMate
|
|
6647
|
+
* patterns and the first tokenisation of one compiles them, so a session that
|
|
6648
|
+
* never renders a fenced block pays neither. The first block of a language
|
|
6649
|
+
* draws plain, its grammar is imported and warmed off the render path, and
|
|
6650
|
+
* the application is told to draw the frame again - the same "render what you
|
|
6651
|
+
* have, correct it when it lands" the rest of this surface uses.
|
|
6652
|
+
*
|
|
6653
|
+
* Colours come from a shiki theme rather than the palette: a theme
|
|
6654
|
+
* distinguishes a keyword from a type from a number, which the nine palette
|
|
6655
|
+
* roles cannot, and the transcript is where the model's code is read. The
|
|
6656
|
+
* theme is chosen from the terminal's own background, so a light terminal is
|
|
6657
|
+
* not given dark-theme colours, and a terminal that answers neither a colour
|
|
6658
|
+
* depth nor a background gets no colour at all.
|
|
6659
|
+
* @module @deepseek-ai/dsh-tui-app/highlight
|
|
6660
|
+
*/
|
|
6661
|
+
/**
|
|
6662
|
+
* The grammars a fence may name, each behind its own import so a language is
|
|
6663
|
+
* paid for only where it is rendered. Exported so one spec can prove every
|
|
6664
|
+
* entry resolves to a module that is really installed. The list is what a coding session
|
|
6665
|
+
* actually shows: the languages of this repository, the shells it runs, the
|
|
6666
|
+
* formats it configures with, and the languages a model most often answers a
|
|
6667
|
+
* question in.
|
|
6668
|
+
*/
|
|
6669
|
+
const GRAMMARS = new Map([
|
|
6670
|
+
["typescript", () => import("@shikijs/langs/typescript")],
|
|
6671
|
+
["shellscript", () => import("@shikijs/langs/shellscript")],
|
|
6672
|
+
["json", () => import("@shikijs/langs/json")],
|
|
6673
|
+
["python", () => import("@shikijs/langs/python")],
|
|
6674
|
+
["yaml", () => import("@shikijs/langs/yaml")],
|
|
6675
|
+
["rust", () => import("@shikijs/langs/rust")],
|
|
6676
|
+
["go", () => import("@shikijs/langs/go")],
|
|
6677
|
+
["java", () => import("@shikijs/langs/java")],
|
|
6678
|
+
["c", () => import("@shikijs/langs/c")],
|
|
6679
|
+
["cpp", () => import("@shikijs/langs/cpp")],
|
|
6680
|
+
["ruby", () => import("@shikijs/langs/ruby")],
|
|
6681
|
+
["sql", () => import("@shikijs/langs/sql")],
|
|
6682
|
+
["html", () => import("@shikijs/langs/html")],
|
|
6683
|
+
["css", () => import("@shikijs/langs/css")],
|
|
6684
|
+
["markdown", () => import("@shikijs/langs/markdown")],
|
|
6685
|
+
["toml", () => import("@shikijs/langs/toml")],
|
|
6686
|
+
["diff", () => import("@shikijs/langs/diff")]
|
|
6687
|
+
]);
|
|
6688
|
+
/**
|
|
6689
|
+
* What a fence's info string resolves to. A `Map`, not an object: the string
|
|
6690
|
+
* comes from the model, so `constructor` or `__proto__` must miss rather than
|
|
6691
|
+
* resolve an inherited property. The JavaScript family resolves to the
|
|
6692
|
+
* TypeScript grammar, which tokenises plain JavaScript exactly and JSX
|
|
6693
|
+
* approximately - one grammar instead of two for the same colours.
|
|
6694
|
+
*/
|
|
6695
|
+
const ALIASES = new Map([
|
|
6696
|
+
["typescript", "typescript"],
|
|
6697
|
+
["ts", "typescript"],
|
|
6698
|
+
["tsx", "typescript"],
|
|
6699
|
+
["javascript", "typescript"],
|
|
6700
|
+
["js", "typescript"],
|
|
6701
|
+
["jsx", "typescript"],
|
|
6702
|
+
["mjs", "typescript"],
|
|
6703
|
+
["shell", "shellscript"],
|
|
6704
|
+
["sh", "shellscript"],
|
|
6705
|
+
["bash", "shellscript"],
|
|
6706
|
+
["zsh", "shellscript"],
|
|
6707
|
+
["console", "shellscript"],
|
|
6708
|
+
["shellscript", "shellscript"],
|
|
6709
|
+
["json", "json"],
|
|
6710
|
+
["jsonc", "json"],
|
|
6711
|
+
["python", "python"],
|
|
6712
|
+
["py", "python"],
|
|
6713
|
+
["yaml", "yaml"],
|
|
6714
|
+
["yml", "yaml"],
|
|
6715
|
+
["rust", "rust"],
|
|
6716
|
+
["rs", "rust"],
|
|
6717
|
+
["go", "go"],
|
|
6718
|
+
["golang", "go"],
|
|
6719
|
+
["java", "java"],
|
|
6720
|
+
["c", "c"],
|
|
6721
|
+
["h", "c"],
|
|
6722
|
+
["cpp", "cpp"],
|
|
6723
|
+
["c++", "cpp"],
|
|
6724
|
+
["cc", "cpp"],
|
|
6725
|
+
["ruby", "ruby"],
|
|
6726
|
+
["rb", "ruby"],
|
|
6727
|
+
["sql", "sql"],
|
|
6728
|
+
["html", "html"],
|
|
6729
|
+
["xml", "html"],
|
|
6730
|
+
["css", "css"],
|
|
6731
|
+
["markdown", "markdown"],
|
|
6732
|
+
["md", "markdown"],
|
|
6733
|
+
["toml", "toml"],
|
|
6734
|
+
["diff", "diff"],
|
|
6735
|
+
["patch", "diff"]
|
|
6736
|
+
]);
|
|
6737
|
+
/** The theme a dark terminal takes, and the one a light terminal takes. */
|
|
6738
|
+
const THEMES = {
|
|
6739
|
+
dark: () => import("@shikijs/themes/github-dark-default"),
|
|
6740
|
+
light: () => import("@shikijs/themes/github-light-default")
|
|
6741
|
+
};
|
|
6742
|
+
/** Relative-luminance weights, as {@link backgroundIsLight} reads a background. */
|
|
6743
|
+
const LUMINANCE = {
|
|
6744
|
+
r: .2126,
|
|
6745
|
+
g: .7152,
|
|
6746
|
+
b: .0722
|
|
6747
|
+
};
|
|
6748
|
+
/** Luminance above which a background counts as light. */
|
|
6749
|
+
const LIGHT_ABOVE = 128;
|
|
6750
|
+
/** Control Sequence Introducer. */
|
|
6751
|
+
const CSI = "\x1B[";
|
|
6752
|
+
/** Ends the foreground a token was drawn with; other styling is left alone. */
|
|
6753
|
+
const RESET_FOREGROUND = `${CSI}39m`;
|
|
6754
|
+
/** Opens bold, for a theme's bold token styles. */
|
|
6755
|
+
const BOLD = `${CSI}1m`;
|
|
6756
|
+
/** Opens italic, for a theme's italic token styles. */
|
|
6757
|
+
const ITALIC = `${CSI}3m`;
|
|
6758
|
+
/** Ends bold. */
|
|
6759
|
+
const RESET_BOLD = `${CSI}22m`;
|
|
6760
|
+
/** Ends italic. */
|
|
6761
|
+
const RESET_ITALIC = `${CSI}23m`;
|
|
6762
|
+
/** shiki's `FontStyle` bits, which its themed tokens carry as a number. */
|
|
6763
|
+
const FONT_STYLE = {
|
|
6764
|
+
italic: 1,
|
|
6765
|
+
bold: 2,
|
|
6766
|
+
underline: 4
|
|
6767
|
+
};
|
|
6768
|
+
/**
|
|
6769
|
+
* Which theme one terminal takes.
|
|
6770
|
+
* @param background - the terminal's background, or undefined when it answered none.
|
|
6771
|
+
* @returns true for a light terminal; a terminal that answered nothing is
|
|
6772
|
+
* treated as dark, which is what a terminal that answers nothing usually is.
|
|
6773
|
+
*/
|
|
6774
|
+
function backgroundIsLight(background) {
|
|
6775
|
+
if (background === void 0) return false;
|
|
6776
|
+
return LUMINANCE.r * background.r + LUMINANCE.g * background.g + LUMINANCE.b * background.b > LIGHT_ABOVE;
|
|
6777
|
+
}
|
|
6778
|
+
/**
|
|
6779
|
+
* Decide how far the terminal encodes a token colour.
|
|
6780
|
+
*
|
|
6781
|
+
* This is the colour depth alone: a user who asked for reduced motion still
|
|
6782
|
+
* gets coloured code, because colour is not motion.
|
|
6783
|
+
* @param input - whether the palette emits SGR at all, and the environment.
|
|
6784
|
+
* @returns the depth {@link tokenSgr} encodes under.
|
|
6785
|
+
*/
|
|
6786
|
+
function resolveColorDepth(input) {
|
|
6787
|
+
if (!input.paletteEnabled) return "none";
|
|
6788
|
+
const term = input.env.TERM ?? "";
|
|
6789
|
+
if (term === "dumb") return "none";
|
|
6790
|
+
const colorterm = (input.env.COLORTERM ?? "").toLowerCase();
|
|
6791
|
+
if (colorterm === "truecolor" || colorterm === "24bit") return "truecolor";
|
|
6792
|
+
return term.includes("256color") ? "ansi256" : "none";
|
|
6793
|
+
}
|
|
6794
|
+
/**
|
|
6795
|
+
* The sequence one token's colour opens with.
|
|
6796
|
+
* @param color - the theme's colour for the token, e.g. `#79c0ff`.
|
|
6797
|
+
* @param depth - how far the terminal encodes it.
|
|
6798
|
+
* @returns the sequence, or the empty string when the colour cannot be read
|
|
6799
|
+
* or the terminal encodes none.
|
|
6800
|
+
*/
|
|
6801
|
+
function tokenSgr(color, depth) {
|
|
6802
|
+
if (depth === "none") return "";
|
|
6803
|
+
const rgb = parseHexColor(color);
|
|
6804
|
+
if (rgb === void 0) return "";
|
|
6805
|
+
return depth === "truecolor" ? `${CSI}38;2;${String(rgb.r)};${String(rgb.g)};${String(rgb.b)}m` : `${CSI}38;5;${String(nearestAnsi256(rgb))}m`;
|
|
6806
|
+
}
|
|
6807
|
+
/**
|
|
6808
|
+
* The grammar registration one module carries.
|
|
6809
|
+
* @param module - the imported grammar module.
|
|
6810
|
+
* @returns the registration array, unwrapped through however many `default`
|
|
6811
|
+
* layers the module system put around it.
|
|
6812
|
+
*/
|
|
6813
|
+
function grammarOf(module) {
|
|
6814
|
+
const first = module.default;
|
|
6815
|
+
if (Array.isArray(first) || typeof first !== "object" || first === null) return first;
|
|
6816
|
+
return first.default ?? first;
|
|
6817
|
+
}
|
|
6818
|
+
/**
|
|
6819
|
+
* Read one `#rgb` or `#rrggbb` colour.
|
|
6820
|
+
* @param color - the theme's colour string.
|
|
6821
|
+
* @returns the channels, or undefined for anything else, which is what a
|
|
6822
|
+
* theme naming a colour this module cannot read yields.
|
|
6823
|
+
*/
|
|
6824
|
+
function parseHexColor(color) {
|
|
6825
|
+
if (color === void 0) return void 0;
|
|
6826
|
+
const body = /^#([0-9a-f]{3}|[0-9a-f]{6})$/iu.exec(color)?.[1];
|
|
6827
|
+
if (body === void 0) return void 0;
|
|
6828
|
+
const wide = body.length === 6 ? body : body.replace(/./gu, (part) => `${part}${part}`);
|
|
6829
|
+
return {
|
|
6830
|
+
r: Number.parseInt(wide.slice(0, 2), 16),
|
|
6831
|
+
g: Number.parseInt(wide.slice(2, 4), 16),
|
|
6832
|
+
b: Number.parseInt(wide.slice(4, 6), 16)
|
|
6616
6833
|
};
|
|
6617
|
-
if (matchesKey(data, "enter")) return { kind: "pin" };
|
|
6618
|
-
if (matchesKey(data, "escape")) return { kind: "escape" };
|
|
6619
|
-
const digit = typedText(data);
|
|
6620
|
-
return digit !== void 0 && SECTION_DIGIT.test(digit) ? {
|
|
6621
|
-
kind: "section-at",
|
|
6622
|
-
index: Number(digit) - 1
|
|
6623
|
-
} : void 0;
|
|
6624
6834
|
}
|
|
6835
|
+
/**
|
|
6836
|
+
* The transcript's syntax highlighter: one shiki core, built when the first
|
|
6837
|
+
* fence resolves a grammar and grown as further languages are asked for.
|
|
6838
|
+
*/
|
|
6839
|
+
var SyntaxHighlighter = class {
|
|
6840
|
+
options;
|
|
6841
|
+
/** The shiki core, once a theme and one grammar have landed. */
|
|
6842
|
+
core;
|
|
6843
|
+
/**
|
|
6844
|
+
* The core being built, so two fences of different languages on one frame
|
|
6845
|
+
* share it: each would otherwise build a core of its own, and the one that
|
|
6846
|
+
* finished last would be the only one holding a grammar.
|
|
6847
|
+
*/
|
|
6848
|
+
building;
|
|
6849
|
+
/** The theme's own name, which `codeToTokens` resolves it by. */
|
|
6850
|
+
theme = "";
|
|
6851
|
+
/** Grammar ids already registered on the core. */
|
|
6852
|
+
loaded = /* @__PURE__ */ new Set();
|
|
6853
|
+
/** Grammar ids whose import is in flight, so each is asked for once. */
|
|
6854
|
+
pending = /* @__PURE__ */ new Set();
|
|
6855
|
+
/**
|
|
6856
|
+
* @param options - the colour depth, the terminal background, and the redraw request.
|
|
6857
|
+
*/
|
|
6858
|
+
constructor(options) {
|
|
6859
|
+
this.options = options;
|
|
6860
|
+
}
|
|
6861
|
+
/**
|
|
6862
|
+
* Colour one fenced block.
|
|
6863
|
+
* @param code - the block's source, newline separated.
|
|
6864
|
+
* @param lang - the fence's info string, or undefined for a bare fence.
|
|
6865
|
+
* @returns one styled line per source line, or undefined while the language
|
|
6866
|
+
* has no grammar here, its grammar is still loading, or the terminal takes
|
|
6867
|
+
* no colour - all of which the Markdown renderer draws plain.
|
|
6868
|
+
*/
|
|
6869
|
+
lines(code, lang) {
|
|
6870
|
+
if (this.options.depth === "none") return void 0;
|
|
6871
|
+
const resolved = ALIASES.get((lang ?? "").toLowerCase());
|
|
6872
|
+
if (resolved === void 0) return void 0;
|
|
6873
|
+
if (!this.loaded.has(resolved)) {
|
|
6874
|
+
this.load(resolved);
|
|
6875
|
+
return;
|
|
6876
|
+
}
|
|
6877
|
+
const core = this.core;
|
|
6878
|
+
/* v8 ignore next -- a loaded grammar means the core is built */
|
|
6879
|
+
if (core === void 0) return void 0;
|
|
6880
|
+
try {
|
|
6881
|
+
const { tokens } = core.codeToTokens(code, {
|
|
6882
|
+
lang: resolved,
|
|
6883
|
+
theme: this.theme
|
|
6884
|
+
});
|
|
6885
|
+
return tokens.map((line) => line.map((token) => this.paint(token)).join("") + RESET_FOREGROUND);
|
|
6886
|
+
} catch {
|
|
6887
|
+
this.loaded.delete(resolved);
|
|
6888
|
+
return;
|
|
6889
|
+
}
|
|
6890
|
+
}
|
|
6891
|
+
/**
|
|
6892
|
+
* Draw one token with the theme's colour and font style.
|
|
6893
|
+
* @param token - the themed token.
|
|
6894
|
+
* @returns the token's text, wrapped in the sequences it is drawn with.
|
|
6895
|
+
*/
|
|
6896
|
+
paint(token) {
|
|
6897
|
+
const color = tokenSgr(token.color, this.options.depth);
|
|
6898
|
+
/* v8 ignore next -- shiki writes a style of 0 rather than leaving it out */
|
|
6899
|
+
const style = token.fontStyle ?? 0;
|
|
6900
|
+
const bold = (style & FONT_STYLE.bold) === 0 ? "" : BOLD;
|
|
6901
|
+
const italic = (style & FONT_STYLE.italic) === 0 ? "" : ITALIC;
|
|
6902
|
+
const closeBold = bold === "" ? "" : RESET_BOLD;
|
|
6903
|
+
const closeItalic = italic === "" ? "" : RESET_ITALIC;
|
|
6904
|
+
return `${color}${bold}${italic}${token.content}${closeItalic}${closeBold}`;
|
|
6905
|
+
}
|
|
6906
|
+
/**
|
|
6907
|
+
* Bring up the core for one grammar, then ask for the frame again.
|
|
6908
|
+
* @param id - the grammar to register.
|
|
6909
|
+
*/
|
|
6910
|
+
async load(id) {
|
|
6911
|
+
if (this.pending.has(id)) return;
|
|
6912
|
+
const grammar = GRAMMARS.get(id);
|
|
6913
|
+
/* v8 ignore next -- every alias resolves to a grammar in the same table */
|
|
6914
|
+
if (grammar === void 0) return;
|
|
6915
|
+
this.pending.add(id);
|
|
6916
|
+
try {
|
|
6917
|
+
const module = await (this.options.import ?? ((load) => load()))(grammar);
|
|
6918
|
+
if (!await this.register(id, module)) return;
|
|
6919
|
+
} catch {
|
|
6920
|
+
this.loaded.delete(id);
|
|
6921
|
+
return;
|
|
6922
|
+
} finally {
|
|
6923
|
+
this.pending.delete(id);
|
|
6924
|
+
}
|
|
6925
|
+
this.options.changed();
|
|
6926
|
+
}
|
|
6927
|
+
/**
|
|
6928
|
+
* Put one grammar on the core, building the core and its theme first.
|
|
6929
|
+
* @param id - the grammar's id.
|
|
6930
|
+
* @param module - the grammar module.
|
|
6931
|
+
* @returns whether the core now resolves that id.
|
|
6932
|
+
*/
|
|
6933
|
+
async register(id, module) {
|
|
6934
|
+
const core = await this.ensureCore();
|
|
6935
|
+
await core.loadLanguage(grammarOf(module));
|
|
6936
|
+
if (!core.getLoadedLanguages().includes(id)) return false;
|
|
6937
|
+
this.loaded.add(id);
|
|
6938
|
+
core.codeToTokens("", {
|
|
6939
|
+
lang: id,
|
|
6940
|
+
theme: this.theme
|
|
6941
|
+
});
|
|
6942
|
+
return true;
|
|
6943
|
+
}
|
|
6944
|
+
/**
|
|
6945
|
+
* The core, built once however many languages ask for it at the same time.
|
|
6946
|
+
* @returns the core.
|
|
6947
|
+
*/
|
|
6948
|
+
async ensureCore() {
|
|
6949
|
+
const built = this.core;
|
|
6950
|
+
if (built !== void 0) return built;
|
|
6951
|
+
this.building ??= this.buildCore();
|
|
6952
|
+
return this.building;
|
|
6953
|
+
}
|
|
6954
|
+
/**
|
|
6955
|
+
* Build the core with the theme the terminal's background asks for.
|
|
6956
|
+
* @returns the core, which every later grammar registers on.
|
|
6957
|
+
*/
|
|
6958
|
+
async buildCore() {
|
|
6959
|
+
const run = this.options.import ?? ((load) => load());
|
|
6960
|
+
const [{ createHighlighterCoreSync }, { createJavaScriptRegexEngine }, theme] = await Promise.all([
|
|
6961
|
+
import("shiki/core"),
|
|
6962
|
+
import("shiki/engine/javascript"),
|
|
6963
|
+
run(THEMES[backgroundIsLight(this.options.background()) ? "light" : "dark"])
|
|
6964
|
+
]);
|
|
6965
|
+
/* v8 ignore next -- every bundled theme carries its own name */
|
|
6966
|
+
this.theme = theme.default.name ?? "";
|
|
6967
|
+
const core = createHighlighterCoreSync({
|
|
6968
|
+
themes: [theme.default],
|
|
6969
|
+
langs: [],
|
|
6970
|
+
engine: createJavaScriptRegexEngine({ forgiving: true })
|
|
6971
|
+
});
|
|
6972
|
+
this.core = core;
|
|
6973
|
+
return core;
|
|
6974
|
+
}
|
|
6975
|
+
};
|
|
6625
6976
|
//#endregion
|
|
6626
6977
|
//#region lib/types/screen.js
|
|
6627
6978
|
/**
|
|
@@ -6664,6 +7015,40 @@ function repaintFloor(start, viewportTop) {
|
|
|
6664
7015
|
return Math.max(0, viewportTop - start);
|
|
6665
7016
|
}
|
|
6666
7017
|
/**
|
|
7018
|
+
* Blank rows at the foot of the frame, which a surface mounts while it needs
|
|
7019
|
+
* the whole viewport.
|
|
7020
|
+
*
|
|
7021
|
+
* The renderer repaints a line only at or after {@link repaintFloor}'s own
|
|
7022
|
+
* `viewportTop`, a high-water mark a taller frame raises for good. A frame
|
|
7023
|
+
* that has since shrunk therefore leaves the top of the viewport out of
|
|
7024
|
+
* reach, and an overlay that may not draw there stops short of the screen.
|
|
7025
|
+
* These rows push the frame back up to that mark: the terminal scrolls by
|
|
7026
|
+
* exactly the shortfall, every line of the viewport becomes repaintable
|
|
7027
|
+
* again, and an overlay composited into the frame's last `terminal.rows`
|
|
7028
|
+
* lines covers all of them. They are never seen - the overlay is drawn over
|
|
7029
|
+
* them, and they are gone before it is.
|
|
7030
|
+
*
|
|
7031
|
+
* pi-tui's `Text` drops blank lines, so the rows are a component of their own.
|
|
7032
|
+
*/
|
|
7033
|
+
var ViewportPad = class {
|
|
7034
|
+
rows;
|
|
7035
|
+
/**
|
|
7036
|
+
* @param rows - how many blank lines to draw, read on every render.
|
|
7037
|
+
*/
|
|
7038
|
+
constructor(rows) {
|
|
7039
|
+
this.rows = rows;
|
|
7040
|
+
}
|
|
7041
|
+
invalidate() {}
|
|
7042
|
+
/**
|
|
7043
|
+
* Draw the pad.
|
|
7044
|
+
* @returns that many empty lines, and none at all where the frame already
|
|
7045
|
+
* reaches the mark.
|
|
7046
|
+
*/
|
|
7047
|
+
render() {
|
|
7048
|
+
return Array.from({ length: Math.max(0, this.rows()) }, () => "");
|
|
7049
|
+
}
|
|
7050
|
+
};
|
|
7051
|
+
/**
|
|
6667
7052
|
* The main screen that settles each frame between building it and writing it.
|
|
6668
7053
|
*
|
|
6669
7054
|
* The guard is handed the frame's first repaintable line: the higher of the
|
|
@@ -7173,7 +7558,7 @@ const HELP_LABEL_GAP = 2;
|
|
|
7173
7558
|
* @returns the lines, unstyled.
|
|
7174
7559
|
*/
|
|
7175
7560
|
function helpKeyLines() {
|
|
7176
|
-
const states = [...FOCUS_REGIONS.map((region) => [REGION_LABELS[region], KEY_LINES[region]]), [READER_LABEL, [READER_HINTS.
|
|
7561
|
+
const states = [...FOCUS_REGIONS.map((region) => [REGION_LABELS[region], KEY_LINES[region]]), [READER_LABEL, [READER_HINTS.list[0], READER_HINTS.pane[0]]]];
|
|
7177
7562
|
const column = Math.max(...states.map(([label]) => visibleWidth(label))) + HELP_LABEL_GAP;
|
|
7178
7563
|
return states.flatMap(([label, lines]) => lines.map((line, index) => `${(index === 0 ? label : "").padEnd(column)}${line}`));
|
|
7179
7564
|
}
|
|
@@ -7302,6 +7687,12 @@ var TuiApp = class {
|
|
|
7302
7687
|
editor;
|
|
7303
7688
|
/** Holds {@link panel} exactly while the bound session has subagent rows. */
|
|
7304
7689
|
panelSlot = new Container();
|
|
7690
|
+
/** Blank rows that give the mounted reader the whole viewport; see {@link ViewportPad}. */
|
|
7691
|
+
pad = new ViewportPad(() => this.readerPad);
|
|
7692
|
+
/** Colours fenced code in replies; see {@link SyntaxHighlighter}. */
|
|
7693
|
+
codeHighlight;
|
|
7694
|
+
/** The terminal's background once it answered; undefined until then, and on a terminal that answers none. */
|
|
7695
|
+
background;
|
|
7305
7696
|
panel;
|
|
7306
7697
|
footer;
|
|
7307
7698
|
modals;
|
|
@@ -7371,6 +7762,8 @@ var TuiApp = class {
|
|
|
7371
7762
|
panelLift = 0;
|
|
7372
7763
|
/** The reader on screen right now, while one is open. */
|
|
7373
7764
|
reader;
|
|
7765
|
+
/** Blank rows {@link ViewportPad} draws so the mounted reader covers the whole viewport. */
|
|
7766
|
+
readerPad = 0;
|
|
7374
7767
|
/** The motion growing the open reader into place; settled or absent draws it whole. */
|
|
7375
7768
|
readerOpening;
|
|
7376
7769
|
/** The reader shrinking away, still mounted until its motion settles. */
|
|
@@ -7410,10 +7803,22 @@ var TuiApp = class {
|
|
|
7410
7803
|
this.deps = deps;
|
|
7411
7804
|
const palette = deps.palette;
|
|
7412
7805
|
this.bound = deps.initial;
|
|
7806
|
+
this.codeHighlight = new SyntaxHighlighter({
|
|
7807
|
+
depth: deps.codeHighlight ? resolveColorDepth({
|
|
7808
|
+
paletteEnabled: palette.enabled,
|
|
7809
|
+
env: deps.env
|
|
7810
|
+
}) : "none",
|
|
7811
|
+
background: () => this.background,
|
|
7812
|
+
changed: () => {
|
|
7813
|
+
this.chat.invalidate();
|
|
7814
|
+
this.tui.requestRender();
|
|
7815
|
+
}
|
|
7816
|
+
});
|
|
7413
7817
|
this.theme = {
|
|
7414
7818
|
palette,
|
|
7415
7819
|
toolPreviewLines: deps.toolPreviewLines,
|
|
7416
|
-
contextPreviewLines: deps.contextPreviewLines
|
|
7820
|
+
contextPreviewLines: deps.contextPreviewLines,
|
|
7821
|
+
codeHighlight: this.codeHighlight
|
|
7417
7822
|
};
|
|
7418
7823
|
this.tui = new GuardedMainScreen(deps.terminal, true, (viewportTop, width, frameLines) => {
|
|
7419
7824
|
return this.settleFrame(viewportTop, width, frameLines);
|
|
@@ -7457,7 +7862,8 @@ var TuiApp = class {
|
|
|
7457
7862
|
this.inspector,
|
|
7458
7863
|
this.editor,
|
|
7459
7864
|
this.panelSlot,
|
|
7460
|
-
this.footer
|
|
7865
|
+
this.footer,
|
|
7866
|
+
this.pad
|
|
7461
7867
|
];
|
|
7462
7868
|
for (const child of tree) this.tui.addChild(child);
|
|
7463
7869
|
}
|
|
@@ -7534,6 +7940,7 @@ var TuiApp = class {
|
|
|
7534
7940
|
async resolveFadeRamp(capability) {
|
|
7535
7941
|
const background = await this.tui.queryTerminalBackgroundColor({ timeoutMs: BACKGROUND_QUERY_TIMEOUT_MS });
|
|
7536
7942
|
if (this.stopped) return;
|
|
7943
|
+
this.background = background;
|
|
7537
7944
|
this.fadeStyle = background === void 0 ? {
|
|
7538
7945
|
capability: "dim",
|
|
7539
7946
|
ramp: []
|
|
@@ -9566,7 +9973,13 @@ var TuiApp = class {
|
|
|
9566
9973
|
*/
|
|
9567
9974
|
settleFrame(viewportTop, width, frameLines) {
|
|
9568
9975
|
const rows = this.deps.terminal.rows;
|
|
9569
|
-
|
|
9976
|
+
const floor = repaintFloor(Math.max(frameLines - this.readerPad, rows) - rows, viewportTop);
|
|
9977
|
+
const pad = this.reader === void 0 && this.readerClosing === void 0 ? 0 : floor;
|
|
9978
|
+
this.viewportFloor = floor - pad;
|
|
9979
|
+
if (pad !== this.readerPad) {
|
|
9980
|
+
this.readerPad = pad;
|
|
9981
|
+
return true;
|
|
9982
|
+
}
|
|
9570
9983
|
const section = this.focusedSection();
|
|
9571
9984
|
const wanted = section !== void 0 && this.focus === "transcript" ? {
|
|
9572
9985
|
block: section.block,
|
|
@@ -9903,10 +10316,11 @@ const Config = z.object({
|
|
|
9903
10316
|
toolPreviewLines: z.natural().min(1).default(8),
|
|
9904
10317
|
contextPreviewLines: z.natural().min(1).default(4),
|
|
9905
10318
|
focusPreviewLines: z.natural().min(1).default(12),
|
|
9906
|
-
readerMinColumns: z.natural().min(40).default(
|
|
10319
|
+
readerMinColumns: z.natural().min(40).default(60),
|
|
10320
|
+
codeHighlight: z.boolean().default(true),
|
|
9907
10321
|
toastMs: z.natural().min(500).default(TOAST_MS),
|
|
9908
10322
|
liveRefreshMs: z.natural().min(100).default(1e3),
|
|
9909
|
-
streamFadeSteps: z.natural().min(2).default(
|
|
10323
|
+
streamFadeSteps: z.natural().min(2).default(12),
|
|
9910
10324
|
streamFadeStepMs: z.natural().min(16).default(33),
|
|
9911
10325
|
reducedMotion: z.boolean().default(false),
|
|
9912
10326
|
openBrowser: z.boolean().default(true)
|
|
@@ -10083,6 +10497,7 @@ async function run(ctx, config, host) {
|
|
|
10083
10497
|
contextPreviewLines: config.contextPreviewLines,
|
|
10084
10498
|
focusPreviewLines: config.focusPreviewLines,
|
|
10085
10499
|
readerMinColumns: config.readerMinColumns,
|
|
10500
|
+
codeHighlight: config.codeHighlight,
|
|
10086
10501
|
toastMs: config.toastMs,
|
|
10087
10502
|
liveRefreshMs: config.liveRefreshMs,
|
|
10088
10503
|
fadeSteps: config.streamFadeSteps,
|