buninu 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bashrc +11 -0
- package/ARCHITECTURE.md +452 -0
- package/LICENSE +21 -0
- package/README.md +121 -0
- package/apps/bun/make-bunBin.sh +84 -0
- package/apps/jsgotty/LICENSE +23 -0
- package/apps/jsgotty/LICENSES/Apache-2.0-zmodem.js.txt +201 -0
- package/apps/jsgotty/NOTICE +21 -0
- package/apps/jsgotty/README.en.md +290 -0
- package/apps/jsgotty/README.md +292 -0
- package/apps/jsgotty/client.mjs +700 -0
- package/apps/jsgotty/env.sh +2 -0
- package/apps/jsgotty/gotty.js +3325 -0
- package/apps/jsgotty/node_modules/.package-lock.json +35 -0
- package/apps/jsgotty/node_modules/node-addon-api/LICENSE.md +9 -0
- package/apps/jsgotty/node_modules/node-addon-api/README.md +319 -0
- package/apps/jsgotty/node_modules/node-addon-api/common.gypi +20 -0
- package/apps/jsgotty/node_modules/node-addon-api/except.gypi +25 -0
- package/apps/jsgotty/node_modules/node-addon-api/index.js +12 -0
- package/apps/jsgotty/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/apps/jsgotty/node_modules/node-addon-api/napi-inl.h +6607 -0
- package/apps/jsgotty/node_modules/node-addon-api/napi.h +3201 -0
- package/apps/jsgotty/node_modules/node-addon-api/node_addon_api.gyp +32 -0
- package/apps/jsgotty/node_modules/node-addon-api/node_api.gyp +9 -0
- package/apps/jsgotty/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/apps/jsgotty/node_modules/node-addon-api/nothing.c +0 -0
- package/apps/jsgotty/node_modules/node-addon-api/package-support.json +21 -0
- package/apps/jsgotty/node_modules/node-addon-api/package.json +480 -0
- package/apps/jsgotty/node_modules/node-addon-api/tools/README.md +73 -0
- package/apps/jsgotty/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/apps/jsgotty/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/apps/jsgotty/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/apps/jsgotty/node_modules/node-addon-api/tools/eslint-format.js +79 -0
- package/apps/jsgotty/node_modules/ws/LICENSE +20 -0
- package/apps/jsgotty/node_modules/ws/README.md +548 -0
- package/apps/jsgotty/node_modules/ws/browser.js +8 -0
- package/apps/jsgotty/node_modules/ws/index.js +22 -0
- package/apps/jsgotty/node_modules/ws/lib/buffer-util.js +131 -0
- package/apps/jsgotty/node_modules/ws/lib/constants.js +19 -0
- package/apps/jsgotty/node_modules/ws/lib/event-target.js +292 -0
- package/apps/jsgotty/node_modules/ws/lib/extension.js +203 -0
- package/apps/jsgotty/node_modules/ws/lib/limiter.js +55 -0
- package/apps/jsgotty/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/apps/jsgotty/node_modules/ws/lib/receiver.js +760 -0
- package/apps/jsgotty/node_modules/ws/lib/sender.js +607 -0
- package/apps/jsgotty/node_modules/ws/lib/stream.js +161 -0
- package/apps/jsgotty/node_modules/ws/lib/subprotocol.js +62 -0
- package/apps/jsgotty/node_modules/ws/lib/validation.js +152 -0
- package/apps/jsgotty/node_modules/ws/lib/websocket-server.js +562 -0
- package/apps/jsgotty/node_modules/ws/lib/websocket.js +1407 -0
- package/apps/jsgotty/node_modules/ws/package.json +70 -0
- package/apps/jsgotty/node_modules/ws/wrapper.mjs +21 -0
- package/apps/jsgotty/package-lock.json +46 -0
- package/apps/jsgotty/package.json +13 -0
- package/apps/jsgotty/patches/windowsPtyAgent.js +326 -0
- package/apps/jsgotty/patches/windowsTerminal.js +204 -0
- package/apps/jsgotty/rz.js +199 -0
- package/apps/jsgotty/single-exe/README.md +80 -0
- package/apps/jsgotty/single-exe/assetsHelper.js +90 -0
- package/apps/jsgotty/single-exe/assetsLoader.mjs +85 -0
- package/apps/jsgotty/single-exe/compiled.js +138 -0
- package/apps/jsgotty/single-exe/entry.mjs +9 -0
- package/apps/jsgotty/single-exe/packAssets.sh +7 -0
- package/apps/jsgotty/static/css/index.css +13 -0
- package/apps/jsgotty/static/css/kitty.css +61 -0
- package/apps/jsgotty/static/css/xterm.css +218 -0
- package/apps/jsgotty/static/css/xterm_customize.css +32 -0
- package/apps/jsgotty/static/favicon.ico +0 -0
- package/apps/jsgotty/static/help.md +125 -0
- package/apps/jsgotty/static/icon.svg +66 -0
- package/apps/jsgotty/static/icon_192.png +0 -0
- package/apps/jsgotty/static/index.html +164 -0
- package/apps/jsgotty/static/js/gotty.js +31537 -0
- package/apps/jsgotty/static/js/gotty.js.LICENSE.txt +7 -0
- package/apps/jsgotty/static/js/gotty.js.map +1 -0
- package/apps/jsgotty/static/js/gotty.licenses.txt +650 -0
- package/apps/jsgotty/static/js/kitty.js +1045 -0
- package/apps/jsgotty/static/js/windows_bridge.js +194 -0
- package/apps/jsgotty/static/js/xterm-addon-unicode11.js +2 -0
- package/apps/jsgotty/static/js/zmodem.js +1 -0
- package/apps/jsgotty/static/manifest.json +15 -0
- package/apps/jsgotty/sz.js +273 -0
- package/apps/jsgotty/tests/kitty-order.test.js +58 -0
- package/apps/jsgotty/viu.mjs +393 -0
- package/apps/jsgotty/wgotty +62 -0
- package/apps/jsgotty/windows-bridge-node.js +60 -0
- package/apps/jsgotty/zmodem-node.js +260 -0
- package/apps/jsmdcui/CHANGELOG.md +1048 -0
- package/apps/jsmdcui/LICENSE +22 -0
- package/apps/jsmdcui/README.md +1269 -0
- package/apps/jsmdcui/cdp-maze.js +141 -0
- package/apps/jsmdcui/clean.sh +9 -0
- package/apps/jsmdcui/demos/basic.jpg +0 -0
- package/apps/jsmdcui/demos/chinese.md +32 -0
- package/apps/jsmdcui/demos/event.md +170 -0
- package/apps/jsmdcui/demos/good.jpg +0 -0
- package/apps/jsmdcui/demos/image-processor.md +366 -0
- package/apps/jsmdcui/demos/image-processor.zh-TW.md +366 -0
- package/apps/jsmdcui/demos/img-change.md +73 -0
- package/apps/jsmdcui/demos/imgtool-zh.md +298 -0
- package/apps/jsmdcui/demos/imgtool.md +298 -0
- package/apps/jsmdcui/demos/maze.md +149 -0
- package/apps/jsmdcui/demos/reactive.md +40 -0
- package/apps/jsmdcui/demos/reader.md +513 -0
- package/apps/jsmdcui/demos/select.md +63 -0
- package/apps/jsmdcui/demos/todo-zh.md +190 -0
- package/apps/jsmdcui/demos/todo.md +191 -0
- package/apps/jsmdcui/edit +9 -0
- package/apps/jsmdcui/jsmdcui.sh +5 -0
- package/apps/jsmdcui/llm-maze.txt +94 -0
- package/apps/jsmdcui/package.json +19 -0
- package/apps/jsmdcui/project_structure.txt +35 -0
- package/apps/jsmdcui/runmd.mjs +1140 -0
- package/apps/jsmdcui/runtime/colorschemes/atom-dark.micro +33 -0
- package/apps/jsmdcui/runtime/colorschemes/bubblegum.micro +31 -0
- package/apps/jsmdcui/runtime/colorschemes/cmc-16.micro +47 -0
- package/apps/jsmdcui/runtime/colorschemes/cmc-tc.micro +43 -0
- package/apps/jsmdcui/runtime/colorschemes/darcula.micro +34 -0
- package/apps/jsmdcui/runtime/colorschemes/default.micro +1 -0
- package/apps/jsmdcui/runtime/colorschemes/dracula-tc.micro +49 -0
- package/apps/jsmdcui/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/apps/jsmdcui/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/apps/jsmdcui/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/apps/jsmdcui/runtime/colorschemes/geany.micro +29 -0
- package/apps/jsmdcui/runtime/colorschemes/gotham.micro +29 -0
- package/apps/jsmdcui/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/apps/jsmdcui/runtime/colorschemes/gruvbox.micro +26 -0
- package/apps/jsmdcui/runtime/colorschemes/material-tc.micro +36 -0
- package/apps/jsmdcui/runtime/colorschemes/monokai-dark.micro +28 -0
- package/apps/jsmdcui/runtime/colorschemes/monokai.micro +34 -0
- package/apps/jsmdcui/runtime/colorschemes/one-dark.micro +39 -0
- package/apps/jsmdcui/runtime/colorschemes/railscast.micro +37 -0
- package/apps/jsmdcui/runtime/colorschemes/simple.micro +33 -0
- package/apps/jsmdcui/runtime/colorschemes/solarized-tc.micro +31 -0
- package/apps/jsmdcui/runtime/colorschemes/solarized.micro +30 -0
- package/apps/jsmdcui/runtime/colorschemes/sunny-day.micro +29 -0
- package/apps/jsmdcui/runtime/colorschemes/twilight.micro +40 -0
- package/apps/jsmdcui/runtime/colorschemes/zenburn.micro +30 -0
- package/apps/jsmdcui/runtime/help/actions.md +161 -0
- package/apps/jsmdcui/runtime/help/cdp.md +124 -0
- package/apps/jsmdcui/runtime/help/colors.md +421 -0
- package/apps/jsmdcui/runtime/help/commands.md +161 -0
- package/apps/jsmdcui/runtime/help/copypaste.md +149 -0
- package/apps/jsmdcui/runtime/help/defaultkeys.md +148 -0
- package/apps/jsmdcui/runtime/help/help.md +1269 -0
- package/apps/jsmdcui/runtime/help/keybindings.md +355 -0
- package/apps/jsmdcui/runtime/help/linter.md +90 -0
- package/apps/jsmdcui/runtime/help/options.md +709 -0
- package/apps/jsmdcui/runtime/help/plugins.md +544 -0
- package/apps/jsmdcui/runtime/help/tutorial.md +112 -0
- package/apps/jsmdcui/runtime/jsplugins/cdp/cdp-server.js +1185 -0
- package/apps/jsmdcui/runtime/jsplugins/cdp/cdp.js +201 -0
- package/apps/jsmdcui/runtime/jsplugins/chapter/chapter.js +111 -0
- package/apps/jsmdcui/runtime/jsplugins/diff/diff.js +46 -0
- package/apps/jsmdcui/runtime/jsplugins/example/example.js +117 -0
- package/apps/jsmdcui/runtime/jsplugins/linter/linter.js +281 -0
- package/apps/jsmdcui/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/apps/jsmdcui/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/apps/jsmdcui/runtime/plugins/literate/README.md +5 -0
- package/apps/jsmdcui/runtime/plugins/literate/literate.lua +55 -0
- package/apps/jsmdcui/runtime/plugins/status/help/status.md +21 -0
- package/apps/jsmdcui/runtime/plugins/status/status.lua +62 -0
- package/apps/jsmdcui/runtime/syntax/LICENSE +22 -0
- package/apps/jsmdcui/runtime/syntax/PowerShell.yaml +128 -0
- package/apps/jsmdcui/runtime/syntax/README.md +63 -0
- package/apps/jsmdcui/runtime/syntax/ada.yaml +43 -0
- package/apps/jsmdcui/runtime/syntax/apacheconf.yaml +59 -0
- package/apps/jsmdcui/runtime/syntax/arduino.yaml +101 -0
- package/apps/jsmdcui/runtime/syntax/asciidoc.yaml +51 -0
- package/apps/jsmdcui/runtime/syntax/asm.yaml +123 -0
- package/apps/jsmdcui/runtime/syntax/ats.yaml +99 -0
- package/apps/jsmdcui/runtime/syntax/awk.yaml +44 -0
- package/apps/jsmdcui/runtime/syntax/b.yaml +87 -0
- package/apps/jsmdcui/runtime/syntax/bat.yaml +57 -0
- package/apps/jsmdcui/runtime/syntax/c.yaml +60 -0
- package/apps/jsmdcui/runtime/syntax/caddyfile.yaml +23 -0
- package/apps/jsmdcui/runtime/syntax/cake.yaml +7 -0
- package/apps/jsmdcui/runtime/syntax/clojure.yaml +38 -0
- package/apps/jsmdcui/runtime/syntax/cmake.yaml +42 -0
- package/apps/jsmdcui/runtime/syntax/coffeescript.yaml +56 -0
- package/apps/jsmdcui/runtime/syntax/colortest.yaml +19 -0
- package/apps/jsmdcui/runtime/syntax/conky.yaml +17 -0
- package/apps/jsmdcui/runtime/syntax/cpp.yaml +91 -0
- package/apps/jsmdcui/runtime/syntax/crontab.yaml +36 -0
- package/apps/jsmdcui/runtime/syntax/crystal.yaml +72 -0
- package/apps/jsmdcui/runtime/syntax/csharp.yaml +52 -0
- package/apps/jsmdcui/runtime/syntax/css.yaml +44 -0
- package/apps/jsmdcui/runtime/syntax/csx.yaml +8 -0
- package/apps/jsmdcui/runtime/syntax/cuda.yaml +68 -0
- package/apps/jsmdcui/runtime/syntax/cython.yaml +52 -0
- package/apps/jsmdcui/runtime/syntax/d.yaml +121 -0
- package/apps/jsmdcui/runtime/syntax/dart.yaml +46 -0
- package/apps/jsmdcui/runtime/syntax/default.yaml +10 -0
- package/apps/jsmdcui/runtime/syntax/dockerfile.yaml +36 -0
- package/apps/jsmdcui/runtime/syntax/dot.yaml +29 -0
- package/apps/jsmdcui/runtime/syntax/elixir.yaml +30 -0
- package/apps/jsmdcui/runtime/syntax/elm.yaml +38 -0
- package/apps/jsmdcui/runtime/syntax/erb.yaml +42 -0
- package/apps/jsmdcui/runtime/syntax/erlang.yaml +45 -0
- package/apps/jsmdcui/runtime/syntax/fish.yaml +48 -0
- package/apps/jsmdcui/runtime/syntax/forth.yaml +34 -0
- package/apps/jsmdcui/runtime/syntax/fortran.yaml +64 -0
- package/apps/jsmdcui/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/apps/jsmdcui/runtime/syntax/fsharp.yaml +48 -0
- package/apps/jsmdcui/runtime/syntax/gdscript.yaml +61 -0
- package/apps/jsmdcui/runtime/syntax/gemini.yaml +19 -0
- package/apps/jsmdcui/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/apps/jsmdcui/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/apps/jsmdcui/runtime/syntax/git-commit.yaml +35 -0
- package/apps/jsmdcui/runtime/syntax/git-config.yaml +14 -0
- package/apps/jsmdcui/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/apps/jsmdcui/runtime/syntax/gleam.yaml +69 -0
- package/apps/jsmdcui/runtime/syntax/glsl.yaml +26 -0
- package/apps/jsmdcui/runtime/syntax/gnuplot.yaml +15 -0
- package/apps/jsmdcui/runtime/syntax/go.yaml +62 -0
- package/apps/jsmdcui/runtime/syntax/godoc.yaml +17 -0
- package/apps/jsmdcui/runtime/syntax/golo.yaml +73 -0
- package/apps/jsmdcui/runtime/syntax/gomod.yaml +31 -0
- package/apps/jsmdcui/runtime/syntax/graphql.yaml +47 -0
- package/apps/jsmdcui/runtime/syntax/groff.yaml +30 -0
- package/apps/jsmdcui/runtime/syntax/groovy.yaml +111 -0
- package/apps/jsmdcui/runtime/syntax/haml.yaml +16 -0
- package/apps/jsmdcui/runtime/syntax/hare.yaml +52 -0
- package/apps/jsmdcui/runtime/syntax/haskell.yaml +52 -0
- package/apps/jsmdcui/runtime/syntax/hc.yaml +52 -0
- package/apps/jsmdcui/runtime/syntax/html.yaml +70 -0
- package/apps/jsmdcui/runtime/syntax/html4.yaml +25 -0
- package/apps/jsmdcui/runtime/syntax/html5.yaml +25 -0
- package/apps/jsmdcui/runtime/syntax/ini.yaml +23 -0
- package/apps/jsmdcui/runtime/syntax/inputrc.yaml +14 -0
- package/apps/jsmdcui/runtime/syntax/java.yaml +37 -0
- package/apps/jsmdcui/runtime/syntax/javascript.yaml +124 -0
- package/apps/jsmdcui/runtime/syntax/jinja2.yaml +19 -0
- package/apps/jsmdcui/runtime/syntax/json.yaml +39 -0
- package/apps/jsmdcui/runtime/syntax/jsonnet.yaml +92 -0
- package/apps/jsmdcui/runtime/syntax/julia.yaml +57 -0
- package/apps/jsmdcui/runtime/syntax/justfile.yaml +40 -0
- package/apps/jsmdcui/runtime/syntax/keymap.yaml +27 -0
- package/apps/jsmdcui/runtime/syntax/kickstart.yaml +16 -0
- package/apps/jsmdcui/runtime/syntax/kotlin.yaml +66 -0
- package/apps/jsmdcui/runtime/syntax/kvlang.yaml +67 -0
- package/apps/jsmdcui/runtime/syntax/ledger.yaml +14 -0
- package/apps/jsmdcui/runtime/syntax/lfe.yaml +17 -0
- package/apps/jsmdcui/runtime/syntax/lilypond.yaml +26 -0
- package/apps/jsmdcui/runtime/syntax/lisp.yaml +17 -0
- package/apps/jsmdcui/runtime/syntax/log.yaml +92 -0
- package/apps/jsmdcui/runtime/syntax/lua.yaml +111 -0
- package/apps/jsmdcui/runtime/syntax/mail.yaml +25 -0
- package/apps/jsmdcui/runtime/syntax/makefile.yaml +38 -0
- package/apps/jsmdcui/runtime/syntax/man.yaml +12 -0
- package/apps/jsmdcui/runtime/syntax/markdown.yaml +64 -0
- package/apps/jsmdcui/runtime/syntax/mc.yaml +23 -0
- package/apps/jsmdcui/runtime/syntax/meson.yaml +51 -0
- package/apps/jsmdcui/runtime/syntax/micro.yaml +34 -0
- package/apps/jsmdcui/runtime/syntax/mpdconf.yaml +13 -0
- package/apps/jsmdcui/runtime/syntax/msbuild.yaml +6 -0
- package/apps/jsmdcui/runtime/syntax/nanorc.yaml +16 -0
- package/apps/jsmdcui/runtime/syntax/nftables.yaml +30 -0
- package/apps/jsmdcui/runtime/syntax/nginx.yaml +22 -0
- package/apps/jsmdcui/runtime/syntax/nim.yaml +27 -0
- package/apps/jsmdcui/runtime/syntax/nix.yaml +32 -0
- package/apps/jsmdcui/runtime/syntax/nu.yaml +114 -0
- package/apps/jsmdcui/runtime/syntax/objc.yaml +60 -0
- package/apps/jsmdcui/runtime/syntax/ocaml.yaml +43 -0
- package/apps/jsmdcui/runtime/syntax/octave.yaml +83 -0
- package/apps/jsmdcui/runtime/syntax/odin.yaml +64 -0
- package/apps/jsmdcui/runtime/syntax/pascal.yaml +45 -0
- package/apps/jsmdcui/runtime/syntax/patch.yaml +14 -0
- package/apps/jsmdcui/runtime/syntax/peg.yaml +16 -0
- package/apps/jsmdcui/runtime/syntax/perl.yaml +58 -0
- package/apps/jsmdcui/runtime/syntax/php.yaml +60 -0
- package/apps/jsmdcui/runtime/syntax/pkg-config.yaml +12 -0
- package/apps/jsmdcui/runtime/syntax/po.yaml +12 -0
- package/apps/jsmdcui/runtime/syntax/pony.yaml +37 -0
- package/apps/jsmdcui/runtime/syntax/pov.yaml +21 -0
- package/apps/jsmdcui/runtime/syntax/privoxy-action.yaml +14 -0
- package/apps/jsmdcui/runtime/syntax/privoxy-config.yaml +10 -0
- package/apps/jsmdcui/runtime/syntax/privoxy-filter.yaml +12 -0
- package/apps/jsmdcui/runtime/syntax/proto.yaml +40 -0
- package/apps/jsmdcui/runtime/syntax/prql.yaml +84 -0
- package/apps/jsmdcui/runtime/syntax/puppet.yaml +22 -0
- package/apps/jsmdcui/runtime/syntax/python2.yaml +60 -0
- package/apps/jsmdcui/runtime/syntax/python3.yaml +80 -0
- package/apps/jsmdcui/runtime/syntax/r.yaml +32 -0
- package/apps/jsmdcui/runtime/syntax/raku.yaml +42 -0
- package/apps/jsmdcui/runtime/syntax/reST.yaml +18 -0
- package/apps/jsmdcui/runtime/syntax/renpy.yaml +15 -0
- package/apps/jsmdcui/runtime/syntax/rpmspec.yaml +43 -0
- package/apps/jsmdcui/runtime/syntax/ruby.yaml +73 -0
- package/apps/jsmdcui/runtime/syntax/rust.yaml +78 -0
- package/apps/jsmdcui/runtime/syntax/sage.yaml +60 -0
- package/apps/jsmdcui/runtime/syntax/scad.yaml +53 -0
- package/apps/jsmdcui/runtime/syntax/scala.yaml +33 -0
- package/apps/jsmdcui/runtime/syntax/sed.yaml +13 -0
- package/apps/jsmdcui/runtime/syntax/sh.yaml +69 -0
- package/apps/jsmdcui/runtime/syntax/sls.yaml +15 -0
- package/apps/jsmdcui/runtime/syntax/smalltalk.yaml +55 -0
- package/apps/jsmdcui/runtime/syntax/solidity.yaml +41 -0
- package/apps/jsmdcui/runtime/syntax/sql.yaml +35 -0
- package/apps/jsmdcui/runtime/syntax/stata.yaml +67 -0
- package/apps/jsmdcui/runtime/syntax/svelte.yaml +27 -0
- package/apps/jsmdcui/runtime/syntax/swift.yaml +103 -0
- package/apps/jsmdcui/runtime/syntax/systemd.yaml +16 -0
- package/apps/jsmdcui/runtime/syntax/tcl.yaml +18 -0
- package/apps/jsmdcui/runtime/syntax/terraform.yaml +87 -0
- package/apps/jsmdcui/runtime/syntax/tex.yaml +32 -0
- package/apps/jsmdcui/runtime/syntax/toml.yaml +56 -0
- package/apps/jsmdcui/runtime/syntax/twig.yaml +55 -0
- package/apps/jsmdcui/runtime/syntax/typescript.yaml +49 -0
- package/apps/jsmdcui/runtime/syntax/v.yaml +80 -0
- package/apps/jsmdcui/runtime/syntax/vala.yaml +26 -0
- package/apps/jsmdcui/runtime/syntax/verilog.yaml +60 -0
- package/apps/jsmdcui/runtime/syntax/vhdl.yaml +37 -0
- package/apps/jsmdcui/runtime/syntax/vi.yaml +31 -0
- package/apps/jsmdcui/runtime/syntax/vue.yaml +64 -0
- package/apps/jsmdcui/runtime/syntax/xml.yaml +37 -0
- package/apps/jsmdcui/runtime/syntax/xresources.yaml +14 -0
- package/apps/jsmdcui/runtime/syntax/yaml.yaml +34 -0
- package/apps/jsmdcui/runtime/syntax/yum.yaml +12 -0
- package/apps/jsmdcui/runtime/syntax/zig.yaml +52 -0
- package/apps/jsmdcui/runtime/syntax/zscript.yaml +72 -0
- package/apps/jsmdcui/runtime/syntax/zsh.yaml +52 -0
- package/apps/jsmdcui/single-exe/README.md +473 -0
- package/apps/jsmdcui/single-exe/assetsHelper.js +191 -0
- package/apps/jsmdcui/single-exe/assetsLoader.mjs +85 -0
- package/apps/jsmdcui/single-exe/compiled.js +212 -0
- package/apps/jsmdcui/single-exe/entry.mjs +10 -0
- package/apps/jsmdcui/single-exe/packAssets.sh +7 -0
- package/apps/jsmdcui/src/MDCUI_DEFAULT_EDIT +0 -0
- package/apps/jsmdcui/src/buffer/backup.js +165 -0
- package/apps/jsmdcui/src/buffer/buffer.js +126 -0
- package/apps/jsmdcui/src/buffer/fixed3-codec.js +140 -0
- package/apps/jsmdcui/src/buffer/loc.js +38 -0
- package/apps/jsmdcui/src/buffer/message.js +29 -0
- package/apps/jsmdcui/src/build-args.js +40 -0
- package/apps/jsmdcui/src/config/clean.js +172 -0
- package/apps/jsmdcui/src/config/colorscheme.js +99 -0
- package/apps/jsmdcui/src/config/config.js +125 -0
- package/apps/jsmdcui/src/config/defaults.js +109 -0
- package/apps/jsmdcui/src/cui/fence-events.mjs +144 -0
- package/apps/jsmdcui/src/cui/heading-ids.mjs +1568 -0
- package/apps/jsmdcui/src/cui/id-collision.mjs +111 -0
- package/apps/jsmdcui/src/cui/identity.mjs +26 -0
- package/apps/jsmdcui/src/cui/kitty-debug.mjs +25 -0
- package/apps/jsmdcui/src/cui/kitty-images.mjs +280 -0
- package/apps/jsmdcui/src/cui/kitty-mode.mjs +6 -0
- package/apps/jsmdcui/src/cui/rerender-queue.mjs +66 -0
- package/apps/jsmdcui/src/cui/rpc.mjs +1525 -0
- package/apps/jsmdcui/src/cui/server.mjs +128 -0
- package/apps/jsmdcui/src/cui/table-render.mjs +286 -0
- package/apps/jsmdcui/src/cui/table-row-edit.mjs +226 -0
- package/apps/jsmdcui/src/cui/task-checkbox.mjs +60 -0
- package/apps/jsmdcui/src/cui/template-components.mjs +253 -0
- package/apps/jsmdcui/src/cui/text-block-resize.mjs +177 -0
- package/apps/jsmdcui/src/cui/tui-links.mjs +560 -0
- package/apps/jsmdcui/src/display/ansi-style.js +60 -0
- package/apps/jsmdcui/src/highlight/highlighter.js +243 -0
- package/apps/jsmdcui/src/highlight/parser.js +225 -0
- package/apps/jsmdcui/src/index.js +9573 -0
- package/apps/jsmdcui/src/lua/engine.js +68 -0
- package/apps/jsmdcui/src/platform/archive.js +50 -0
- package/apps/jsmdcui/src/platform/clipboard.js +278 -0
- package/apps/jsmdcui/src/platform/commands.js +221 -0
- package/apps/jsmdcui/src/platform/terminal.js +5 -0
- package/apps/jsmdcui/src/plugins/js-bridge.js +3377 -0
- package/apps/jsmdcui/src/plugins/manager.js +674 -0
- package/apps/jsmdcui/src/runtime/encodings.js +10 -0
- package/apps/jsmdcui/src/runtime/registry.js +134 -0
- package/apps/jsmdcui/src/screen/cell-buffer.js +81 -0
- package/apps/jsmdcui/src/screen/events.js +263 -0
- package/apps/jsmdcui/src/screen/screen.js +249 -0
- package/apps/jsmdcui/src/screen/vt100.js +571 -0
- package/apps/jsmdcui/src/shell/shell.js +70 -0
- package/apps/jsmdcui/testapp.md +78 -0
- package/apps/jsmdcui/tests/assets-helper.test.js +150 -0
- package/apps/jsmdcui/tests/backup.test.js +158 -0
- package/apps/jsmdcui/tests/cat-markdown.test.js +139 -0
- package/apps/jsmdcui/tests/cmphex3b64.js +95 -0
- package/apps/jsmdcui/tests/compiled-runtime.test.js +139 -0
- package/apps/jsmdcui/tests/config-settings.test.js +52 -0
- package/apps/jsmdcui/tests/demo.test.js +447 -0
- package/apps/jsmdcui/tests/docs-sync.test.js +14 -0
- package/apps/jsmdcui/tests/fence-events.test.js +1293 -0
- package/apps/jsmdcui/tests/heading-ids.test.js +559 -0
- package/apps/jsmdcui/tests/heading-list-selector.test.js +2393 -0
- package/apps/jsmdcui/tests/id-collision.test.js +514 -0
- package/apps/jsmdcui/tests/js-plugin-prompts.test.js +110 -0
- package/apps/jsmdcui/tests/key-event.md +10 -0
- package/apps/jsmdcui/tests/kitty-demo.md +184 -0
- package/apps/jsmdcui/tests/kitty-images.test.js +288 -0
- package/apps/jsmdcui/tests/kitty-mode.test.js +14 -0
- package/apps/jsmdcui/tests/platform-commands.test.js +18 -0
- package/apps/jsmdcui/tests/platform-terminal.test.js +8 -0
- package/apps/jsmdcui/tests/pty-demo.js +492 -0
- package/apps/jsmdcui/tests/rerender-queue.test.js +130 -0
- package/apps/jsmdcui/tests/table-render.test.js +150 -0
- package/apps/jsmdcui/tests/table-row-edit.test.js +138 -0
- package/apps/jsmdcui/tests/task-checkbox.test.js +33 -0
- package/apps/jsmdcui/tests/template-components.test.js +422 -0
- package/apps/jsmdcui/tests/text-block-resize.test.js +222 -0
- package/apps/jsmdcui/tests/textarea.md +8 -0
- package/apps/jsmdcui/tests/tui-links.test.js +298 -0
- package/apps/jsmdcui/tests/wui-responsive-images.test.js +60 -0
- package/apps/jsmdcui/tests/wui.test.js +108 -0
- package/apps/jsmdcui/tests/wv-client.js +96 -0
- package/apps/jsmdcui/tui +7 -0
- package/apps/jsmdcui/wui +9 -0
- package/apps/musl-la/LICENSES/Apache-2.0_LLVM_Exceptions_license.txt +311 -0
- package/apps/musl-la/LICENSES/Apache-2.0_license.txt +177 -0
- package/apps/musl-la/LICENSES/BSD-3-Clause_license.txt +43 -0
- package/apps/musl-la/LICENSES/GPL-3.0.txt +674 -0
- package/apps/musl-la/LICENSES/LGPL-3.0.txt +165 -0
- package/apps/musl-la/LICENSES/MIT.txt +21 -0
- package/apps/musl-la/LICENSES/curl_license.txt +22 -0
- package/apps/musl-la/LICENSES/gcc_runtime_exception.txt +73 -0
- package/apps/musl-la/LICENSES/zlib_license.txt +22 -0
- package/apps/musl-la/LICENSE_musl.txt +193 -0
- package/apps/musl-la/NOTICE +56 -0
- package/apps/musl-la/ldmusl +0 -0
- package/apps/musl-la/libgcc_s.so.1 +0 -0
- package/apps/musl-la/libstdc++.so.6 +0 -0
- package/apps/musl-la/musl-la.sh +5 -0
- package/bin/bun.sh +57 -0
- package/bin/glow.sh +5 -0
- package/bin/init.js +395 -0
- package/bin/jmi.sh +5 -0
- package/bin/jsgotty.sh +5 -0
- package/bin/libsh-loader.c +135 -0
- package/bin/libsh-loader.so +0 -0
- package/bin/multicall.sh +90 -0
- package/bin/shc.js +5 -0
- package/bin/switch_to_android.sh +9 -0
- package/bin/switch_to_linux.sh +7 -0
- package/icon.png +0 -0
- package/package.json +31 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
+
* https://github.com/chjj/term.js
|
|
5
|
+
* @license MIT
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
* THE SOFTWARE.
|
|
24
|
+
*
|
|
25
|
+
* Originally forked from (with the author's permission):
|
|
26
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
+
* http://bellard.org/jslinux/
|
|
28
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
+
* The original design remains. The terminal itself
|
|
30
|
+
* has been extended to include xterm CSI codes, among
|
|
31
|
+
* other features.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Default styles for xterm.js
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
.xterm {
|
|
39
|
+
cursor: text;
|
|
40
|
+
position: relative;
|
|
41
|
+
user-select: none;
|
|
42
|
+
-ms-user-select: none;
|
|
43
|
+
-webkit-user-select: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.xterm.focus,
|
|
47
|
+
.xterm:focus {
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.xterm .xterm-helpers {
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 0;
|
|
54
|
+
/**
|
|
55
|
+
* The z-index of the helpers must be higher than the canvases in order for
|
|
56
|
+
* IMEs to appear on top.
|
|
57
|
+
*/
|
|
58
|
+
z-index: 5;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.xterm .xterm-helper-textarea {
|
|
62
|
+
padding: 0;
|
|
63
|
+
border: 0;
|
|
64
|
+
margin: 0;
|
|
65
|
+
/* Move textarea out of the screen to the far left, so that the cursor is not visible */
|
|
66
|
+
position: absolute;
|
|
67
|
+
opacity: 0;
|
|
68
|
+
left: -9999em;
|
|
69
|
+
top: 0;
|
|
70
|
+
width: 0;
|
|
71
|
+
height: 0;
|
|
72
|
+
z-index: -5;
|
|
73
|
+
/** Prevent wrapping so the IME appears against the textarea at the correct position */
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
resize: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.xterm .composition-view {
|
|
80
|
+
/* TODO: Composition position got messed up somewhere */
|
|
81
|
+
background: #000;
|
|
82
|
+
color: #FFF;
|
|
83
|
+
display: none;
|
|
84
|
+
position: absolute;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
z-index: 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.xterm .composition-view.active {
|
|
90
|
+
display: block;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.xterm .xterm-viewport {
|
|
94
|
+
/* On OS X this is required in order for the scroll bar to appear fully opaque */
|
|
95
|
+
background-color: #000;
|
|
96
|
+
overflow-y: scroll;
|
|
97
|
+
cursor: default;
|
|
98
|
+
position: absolute;
|
|
99
|
+
right: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
top: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.xterm .xterm-screen {
|
|
106
|
+
position: relative;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.xterm .xterm-screen canvas {
|
|
110
|
+
position: absolute;
|
|
111
|
+
left: 0;
|
|
112
|
+
top: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.xterm .xterm-scroll-area {
|
|
116
|
+
visibility: hidden;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.xterm-char-measure-element {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
visibility: hidden;
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 0;
|
|
124
|
+
left: -9999em;
|
|
125
|
+
line-height: normal;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.xterm.enable-mouse-events {
|
|
129
|
+
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
|
|
130
|
+
cursor: default;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.xterm.xterm-cursor-pointer,
|
|
134
|
+
.xterm .xterm-cursor-pointer {
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.xterm.column-select.focus {
|
|
139
|
+
/* Column selection mode */
|
|
140
|
+
cursor: crosshair;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.xterm .xterm-accessibility:not(.debug),
|
|
144
|
+
.xterm .xterm-message {
|
|
145
|
+
position: absolute;
|
|
146
|
+
left: 0;
|
|
147
|
+
top: 0;
|
|
148
|
+
bottom: 0;
|
|
149
|
+
right: 0;
|
|
150
|
+
z-index: 10;
|
|
151
|
+
color: transparent;
|
|
152
|
+
pointer-events: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.xterm .xterm-accessibility-tree:not(.debug) *::selection {
|
|
156
|
+
color: transparent;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.xterm .xterm-accessibility-tree {
|
|
160
|
+
user-select: text;
|
|
161
|
+
white-space: pre;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.xterm .live-region {
|
|
165
|
+
position: absolute;
|
|
166
|
+
left: -9999px;
|
|
167
|
+
width: 1px;
|
|
168
|
+
height: 1px;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.xterm-dim {
|
|
173
|
+
/* Dim should not apply to background, so the opacity of the foreground color is applied
|
|
174
|
+
* explicitly in the generated class and reset to 1 here */
|
|
175
|
+
opacity: 1 !important;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.xterm-underline-1 { text-decoration: underline; }
|
|
179
|
+
.xterm-underline-2 { text-decoration: double underline; }
|
|
180
|
+
.xterm-underline-3 { text-decoration: wavy underline; }
|
|
181
|
+
.xterm-underline-4 { text-decoration: dotted underline; }
|
|
182
|
+
.xterm-underline-5 { text-decoration: dashed underline; }
|
|
183
|
+
|
|
184
|
+
.xterm-overline {
|
|
185
|
+
text-decoration: overline;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
|
|
189
|
+
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
|
|
190
|
+
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
|
|
191
|
+
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
|
|
192
|
+
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }
|
|
193
|
+
|
|
194
|
+
.xterm-strikethrough {
|
|
195
|
+
text-decoration: line-through;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.xterm-screen .xterm-decoration-container .xterm-decoration {
|
|
199
|
+
z-index: 6;
|
|
200
|
+
position: absolute;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
|
|
204
|
+
z-index: 7;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.xterm-decoration-overview-ruler {
|
|
208
|
+
z-index: 8;
|
|
209
|
+
position: absolute;
|
|
210
|
+
top: 0;
|
|
211
|
+
right: 0;
|
|
212
|
+
pointer-events: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.xterm-decoration-top {
|
|
216
|
+
z-index: 2;
|
|
217
|
+
position: relative;
|
|
218
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.terminal {
|
|
2
|
+
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace, "Apple Symbols";
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.xterm-overlay {
|
|
6
|
+
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace, "Apple Symbols";
|
|
7
|
+
border-radius: 15px;
|
|
8
|
+
font-size: xx-large;
|
|
9
|
+
color: black;
|
|
10
|
+
background: white;
|
|
11
|
+
opacity: 0.75;
|
|
12
|
+
padding: 0.2em 0.5em 0.2em 0.5em;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 50%;
|
|
15
|
+
left: 50%;
|
|
16
|
+
transform: translate(-50%, -50%);
|
|
17
|
+
user-select: none;
|
|
18
|
+
transition: opacity 180ms ease-in;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.xterm-overlay-button {
|
|
23
|
+
display: block;
|
|
24
|
+
margin: 0.6em auto 0;
|
|
25
|
+
padding: 0.35em 0.8em;
|
|
26
|
+
border: 1px solid black;
|
|
27
|
+
border-radius: 999px;
|
|
28
|
+
background: black;
|
|
29
|
+
color: white;
|
|
30
|
+
font: inherit;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Static Frontend Notes
|
|
2
|
+
|
|
3
|
+
## Script Load Order
|
|
4
|
+
|
|
5
|
+
- `kitty.js` and `windows_bridge.js` install page-local helpers that inspect the terminal runtime.
|
|
6
|
+
- `xterm-addon-unicode11.js` must load before `gotty.js` so the terminal constructor can register Unicode 11 width tables when the addon is available.
|
|
7
|
+
|
|
8
|
+
## Internal Page Hooks
|
|
9
|
+
|
|
10
|
+
`gotty.js` exposes internal handles on `window` for this page's helper scripts.
|
|
11
|
+
|
|
12
|
+
## `window.__gottyTerminal`
|
|
13
|
+
|
|
14
|
+
High-level terminal wrapper used by the page.
|
|
15
|
+
|
|
16
|
+
Useful methods:
|
|
17
|
+
|
|
18
|
+
- `info()` -> `{ columns, rows }`
|
|
19
|
+
- `output(bytes)` -> feed remote output into the terminal/ZMODEM pipeline
|
|
20
|
+
- `getMessage()` -> overlay DOM node
|
|
21
|
+
- `showMessage(text, timeout)`
|
|
22
|
+
- `showReconnectMessage()`
|
|
23
|
+
- `removeMessage()`
|
|
24
|
+
- `setWindowTitle(title)`
|
|
25
|
+
- `setPreferences({ "font-size", "font-family", "EnableWebGL" })`
|
|
26
|
+
- `sendInput(data)`
|
|
27
|
+
- `onInput(callback)`
|
|
28
|
+
- `onResize(callback)`
|
|
29
|
+
- `deactivate()`
|
|
30
|
+
- `reset()`
|
|
31
|
+
- `close()`
|
|
32
|
+
- `disableStdin()`
|
|
33
|
+
- `enableStdin()`
|
|
34
|
+
- `focus()`
|
|
35
|
+
|
|
36
|
+
## `window.__gottyWebTTY`
|
|
37
|
+
|
|
38
|
+
Protocol/controller layer that owns the websocket session.
|
|
39
|
+
|
|
40
|
+
Useful methods:
|
|
41
|
+
|
|
42
|
+
- `open()` -> opens the session and returns a cleanup function
|
|
43
|
+
- `initializeConnection(arguments, authToken)`
|
|
44
|
+
- `sendInput(data)`
|
|
45
|
+
- `sendPing()`
|
|
46
|
+
- `sendResizeTerminal(columns, rows)`
|
|
47
|
+
- `sendSetEncoding(encoding)`
|
|
48
|
+
|
|
49
|
+
Properties commonly read by helpers:
|
|
50
|
+
|
|
51
|
+
- `reconnectToken`
|
|
52
|
+
- `reconnect`
|
|
53
|
+
- `bufSize`
|
|
54
|
+
- `disconnected`
|
|
55
|
+
|
|
56
|
+
## `window.__gottyConnection`
|
|
57
|
+
|
|
58
|
+
Lowest-level websocket wrapper for the active connection.
|
|
59
|
+
|
|
60
|
+
Useful methods:
|
|
61
|
+
|
|
62
|
+
- `send(data)`
|
|
63
|
+
- `close()`
|
|
64
|
+
- `isOpen()`
|
|
65
|
+
- `onOpen(callback)`
|
|
66
|
+
- `onReceive(callback)`
|
|
67
|
+
- `onClose(callback)`
|
|
68
|
+
|
|
69
|
+
## `window.__gottyXterm`
|
|
70
|
+
|
|
71
|
+
The raw xterm.js `Terminal` instance.
|
|
72
|
+
|
|
73
|
+
Useful methods/properties:
|
|
74
|
+
|
|
75
|
+
- `write(data)`
|
|
76
|
+
- `clear()`
|
|
77
|
+
- `reset()`
|
|
78
|
+
- `resize(columns, rows)`
|
|
79
|
+
- `focus()`
|
|
80
|
+
- `blur()`
|
|
81
|
+
- `loadAddon(addon)`
|
|
82
|
+
- `dispose()`
|
|
83
|
+
- `onData(callback)`
|
|
84
|
+
- `onResize(callback)`
|
|
85
|
+
- `options`
|
|
86
|
+
- `unicode.activeVersion`
|
|
87
|
+
|
|
88
|
+
## Other Globals
|
|
89
|
+
|
|
90
|
+
- `window.getTerminalText`: helper exposed by `GoTTYXterm` for debugging/copying the full visible buffer as plain text.
|
|
91
|
+
- `window.Zmodem`: ZMODEM helper namespace exposed by `zmodem.js`. Useful methods are used by the file-transfer addon, especially `Browser.send_files(...)` and `Browser.save_to_disk(...)`.
|
|
92
|
+
- `window.gotty_kitty_trace`: boolean trace flag consumed by `kitty.js`. It is enabled by starting jsgotty with `JSGOTTY_KITTY_DEBUG=1`.
|
|
93
|
+
- `window.touchScrollThreshold`: mobile touch-scroll threshold in pixels used by `kitty.js` to convert finger movement into synthetic wheel ticks. Default: 24 px. Lower means faster scrolling.
|
|
94
|
+
- `alert_advanced(text, asHtml, closeOnClick)`: page-local modal helper used by custom UI scripts.
|
|
95
|
+
- `noWinOpenUseFetch()`: intentional monkey patch for link handling.
|
|
96
|
+
|
|
97
|
+
## `noWinOpenUseFetch()`
|
|
98
|
+
|
|
99
|
+
When enabled, the page stores:
|
|
100
|
+
|
|
101
|
+
- `realConfirm` -> original `confirm()`
|
|
102
|
+
- `realWinOpen` -> original `window.open()`
|
|
103
|
+
- `fetchText(url)` -> `fetch(url).text()` helper
|
|
104
|
+
|
|
105
|
+
It then replaces `window.open()` with a fetch-and-alert flow for terminal links.
|
|
106
|
+
|
|
107
|
+
## Server-Injected Globals
|
|
108
|
+
|
|
109
|
+
These exist before `gotty.js` runs:
|
|
110
|
+
|
|
111
|
+
- `gotty_auth_token`
|
|
112
|
+
- `gotty_ws_query_args`
|
|
113
|
+
- `gotty_themes`
|
|
114
|
+
- `gotty_enable_webgl`
|
|
115
|
+
|
|
116
|
+
## Frontend-Only Query Args
|
|
117
|
+
|
|
118
|
+
- `font-family`: overrides the terminal font family before xterm is created. If omitted, GoTTY uses the built-in monospace stack from `gotty.js`. Default: `DejaVu Sans Mono, Everson Mono, FreeMono, Menlo, Terminal, monospace, Apple Symbols`.
|
|
119
|
+
- `font-size`: overrides the terminal font size in pixels. Only positive numbers are accepted. If omitted, GoTTY uses the built-in default size. Default: `15`.
|
|
120
|
+
- `webgl`: overrides whether the terminal should enable the xterm WebGL addon. Accepted values: `on`, `true`, `1`, `off`, `false`, `0`. If omitted, GoTTY uses the server-side `gotty_enable_webgl` value, which is `false` unless the server starts with `--webgl`. Default: server value.
|
|
121
|
+
- `touch-scroll-threshold`: overrides the touch gesture distance, in pixels, that kitty.js uses before converting finger movement into scroll ticks. Only positive numbers are accepted. If omitted, kitty.js uses its built-in default. Default: `24`.
|
|
122
|
+
|
|
123
|
+
These are consumed by `gotty.js` for terminal setup and are stripped from the args forwarded to the backend session.
|
|
124
|
+
|
|
125
|
+
These hooks are internal, not a stable public API.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
viewBox="0 0 708.4149 708.41411"
|
|
9
|
+
height="708.41412"
|
|
10
|
+
width="708.41492"
|
|
11
|
+
xml:space="preserve"
|
|
12
|
+
id="svg2"
|
|
13
|
+
version="1.1"><metadata
|
|
14
|
+
id="metadata8"><rdf:RDF><cc:Work
|
|
15
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
16
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
|
17
|
+
id="defs6"><clipPath
|
|
18
|
+
id="clipPath18"
|
|
19
|
+
clipPathUnits="userSpaceOnUse"><path
|
|
20
|
+
id="path16"
|
|
21
|
+
d="M 0,2000 H 2000 V 0 H 0 Z" /></clipPath></defs><g
|
|
22
|
+
transform="matrix(1.3333333,0,0,-1.3333333,-979.12558,1687.5405)"
|
|
23
|
+
id="g10"><g
|
|
24
|
+
id="g12"><g
|
|
25
|
+
clip-path="url(#clipPath18)"
|
|
26
|
+
id="g14"><g
|
|
27
|
+
transform="translate(772.1414,1265.6554)"
|
|
28
|
+
id="g20"><path
|
|
29
|
+
id="path22"
|
|
30
|
+
style="fill:#de3c28;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
31
|
+
d="m 0,0 c -20.875,0 -37.797,-16.922 -37.797,-37.797 v -126.348 -25.917 -212.342 L 345.882,0 Z" /></g><g
|
|
32
|
+
transform="translate(956.8504,734.3448)"
|
|
33
|
+
id="g24"><path
|
|
34
|
+
id="path26"
|
|
35
|
+
style="fill:#af1419;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
36
|
+
d="m 0,0 h 260.209 c 26.839,0 48.596,21.757 48.596,48.596 v 275.281 z" /></g><g
|
|
37
|
+
transform="translate(1265.6552,1075.5929)"
|
|
38
|
+
id="g28"><path
|
|
39
|
+
id="path30"
|
|
40
|
+
style="fill:#db0918;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
41
|
+
d="m 0,0 v 25.918 126.348 c 0,20.875 -16.922,37.796 -37.796,37.796 h -109.836 l -383.679,-402.404 v -80.31 c 0,-26.839 21.757,-48.596 48.596,-48.596 h 173.91 L 0,-17.371 Z" /></g><g
|
|
42
|
+
transform="translate(1169.2147,909.6954)"
|
|
43
|
+
id="g32"><path
|
|
44
|
+
id="path34"
|
|
45
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
46
|
+
d="m 0,0 h -138.227 c -9.129,0 -16.528,7.4 -16.528,16.529 0,9.128 7.399,16.529 16.528,16.529 H 0 c 9.129,0 16.528,-7.401 16.528,-16.529 C 16.528,7.4 9.129,0 0,0" /></g><g
|
|
47
|
+
transform="translate(898.8318,1033.5314)"
|
|
48
|
+
id="g36"><path
|
|
49
|
+
id="path38"
|
|
50
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
51
|
+
d="m 0,0 c 2.86,-0.72 5.65,-1.45 8.37,-2.2 -0.63,-8.56 -7.76,-15.3 -16.479,-15.3 -9.13,0 -16.531,7.4 -16.531,16.53 v 8.54 c 1.861,-0.83 3.72,-1.549 5.601,-2.15 C -15.199,4.18 -8.85,2.37 0,0" /></g><g
|
|
52
|
+
transform="translate(907.2527,1150.7814)"
|
|
53
|
+
id="g40"><path
|
|
54
|
+
id="path42"
|
|
55
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
56
|
+
d="m 0,0 v -65.81 c -4.45,1.59 -9.98,2.38 -16.601,2.38 -6.21,0 -11.7,-0.88 -16.46,-2.64 V 0 c 0,9.13 7.401,16.53 16.531,16.53 C -7.4,16.53 0,9.13 0,0" /></g><g
|
|
57
|
+
transform="translate(874.1922,868.8272)"
|
|
58
|
+
id="g44"><path
|
|
59
|
+
id="path46"
|
|
60
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
61
|
+
d="m 0,0 v 65.811 c 4.45,-1.59 9.98,-2.38 16.601,-2.38 6.21,0 11.699,0.88 16.46,2.639 V 0 C 33.061,-9.13 25.66,-16.529 16.53,-16.529 7.4,-16.529 0,-9.13 0,0" /></g><g
|
|
62
|
+
transform="translate(966.6326,994.1915)"
|
|
63
|
+
id="g48"><path
|
|
64
|
+
id="path50"
|
|
65
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
66
|
+
d="m 0,0 c -3.53,7.28 -8.45,13.3 -14.75,18.06 -6.301,4.76 -13.95,8.8 -22.94,12.14 -6.661,2.47 -13.911,4.78 -21.741,6.94 -2.719,0.75 -5.509,1.48 -8.37,2.2 -8.849,2.37 -15.199,4.18 -19.039,5.42 -1.881,0.6 -3.74,1.32 -5.6,2.15 -1.951,0.87 -3.88,1.87 -5.8,2.99 -3.76,2.19 -6.71,4.81 -8.861,7.85 -2.139,3.05 -3.219,6.67 -3.219,10.86 0,6.75 3.16,12.54 9.46,17.34 2.49,1.9 5.299,3.43 8.42,4.57 4.759,1.76 10.25,2.64 16.46,2.64 6.62,0 12.15,-0.79 16.6,-2.38 3.01,-1.05 5.52,-2.48 7.54,-4.26 5.01,-4.42 9.3,-10.59 12.88,-18.49 2.77,-5.52 5.34,-9.49 7.71,-11.92 2.37,-2.43 5.84,-3.64 10.399,-3.64 5.011,0 9.191,2.02 12.54,6.07 3.351,4.04 5.031,8.59 5.031,13.63 0,5.52 -1.34,11.19 -4.021,17 -2.689,5.8 -6.939,11.35 -12.75,16.63 -5.809,5.28 -13.119,9.52 -21.929,12.71 -5.23,1.89 -11.031,3.22 -17.4,3.99 -4.37,0.53 -9.011,0.79 -13.921,0.79 -6.779,0 -13.159,-0.48 -19.139,-1.45 -7.361,-1.19 -14.121,-3.11 -20.29,-5.76 -11.18,-4.81 -19.72,-11.69 -25.621,-20.63 -5.899,-8.95 -8.849,-19.18 -8.849,-30.7 0,-12.09 2.79,-22.2 8.38,-30.34 5.59,-8.14 13.15,-14.56 22.67,-19.28 9.52,-4.71 21.349,-8.83 35.48,-12.35 10.55,-2.57 18.98,-4.99 25.279,-7.28 6.301,-2.28 11.441,-5.59 15.42,-9.92 3.981,-4.33 5.971,-9.97 5.971,-16.92 0,-8.76 -3.69,-16.06 -11.061,-21.92 -7.379,-5.85 -16.969,-8.78 -28.769,-8.78 -8.59,0 -15.521,1.45 -20.79,4.36 -5.28,2.9 -9.37,6.59 -12.28,11.06 -2.901,4.47 -5.611,10.04 -8.111,16.71 -2.059,5.61 -4.54,9.85 -7.449,12.7 -2.9,2.86 -6.46,4.29 -10.66,4.29 -5.181,0 -9.45,-1.84 -12.811,-5.5 -3.349,-3.66 -5.029,-8.07 -5.029,-13.21 0,-8.85 2.8,-17.96 8.39,-27.34 5.58,-9.38 12.849,-16.87 21.79,-22.49 12.61,-7.8 28.61,-11.7 48.019,-11.7 16.181,0 30.181,2.85 41.981,8.56 11.809,5.71 20.769,13.61 26.9,23.7 6.119,10.09 9.18,21.47 9.18,34.129 C 5.3,-16.21 3.54,-7.28 0,0" /></g></g></g></g></svg>
|
|
Binary file
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
|
|
6
|
+
<style>
|
|
7
|
+
html, body {
|
|
8
|
+
overscroll-behavior-y: none;
|
|
9
|
+
}
|
|
10
|
+
</style>
|
|
11
|
+
|
|
12
|
+
<title>{{ .title }}</title>
|
|
13
|
+
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
|
|
14
|
+
<link rel="icon" href="favicon.ico">
|
|
15
|
+
<link rel="icon" href="icon.svg" type="image/svg+xml">
|
|
16
|
+
<link rel="stylesheet" href="./css/index.css" />
|
|
17
|
+
<link rel="stylesheet" href="./css/xterm.css" />
|
|
18
|
+
<link rel="stylesheet" href="./css/xterm_customize.css" />
|
|
19
|
+
<link rel="stylesheet" href="./css/kitty.css" />
|
|
20
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body>
|
|
24
|
+
<div id="terminal"></div>
|
|
25
|
+
<div id="kitty-overlay"></div>
|
|
26
|
+
<!-- See static/help.md for script load order and internal page hooks. -->
|
|
27
|
+
<script src="./auth_token.js"></script>
|
|
28
|
+
<script src="./config.js"></script>
|
|
29
|
+
<script src="./js/kitty.js"></script>
|
|
30
|
+
<script src="./js/windows_bridge.js"></script>
|
|
31
|
+
<script src="./js/zmodem.js"></script>
|
|
32
|
+
<script src="./js/xterm-addon-unicode11.js"></script>
|
|
33
|
+
<script src="./js/gotty.js"></script>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
// Page-local helpers below use the same window-scoped hooks created by gotty.js.
|
|
38
|
+
// Keep them here so the terminal page can show dialogs and redirect link handling
|
|
39
|
+
// without pulling in another framework layer.
|
|
40
|
+
// The declarations below intentionally leak a few globals for other scripts on this page:
|
|
41
|
+
// alert_advanced, noWinOpenUseFetch, realConfirm, realWinOpen, fetchText, and the
|
|
42
|
+
// window.open override installed by noWinOpenUseFetch().
|
|
43
|
+
|
|
44
|
+
function alert_advanced(text,asHtml,closeOnClick) {
|
|
45
|
+
// 若已有舊 dialog,先移除
|
|
46
|
+
const old = document.getElementById("alert-advanced-dialog");
|
|
47
|
+
if (old) old.remove();
|
|
48
|
+
|
|
49
|
+
// 建立外層遮罩(透明 + 可點擊關閉)
|
|
50
|
+
const overlay = document.createElement("div");
|
|
51
|
+
overlay.id = "alert-advanced-dialog";
|
|
52
|
+
overlay.style.position = "fixed";
|
|
53
|
+
overlay.style.top = "0";
|
|
54
|
+
overlay.style.left = "0";
|
|
55
|
+
overlay.style.width = "100vw";
|
|
56
|
+
overlay.style.height = "100vh";
|
|
57
|
+
overlay.style.background = "rgba(0,0,0,0.35)";
|
|
58
|
+
overlay.style.backdropFilter = "blur(2px)";
|
|
59
|
+
overlay.style.display = "flex";
|
|
60
|
+
overlay.style.alignItems = "center";
|
|
61
|
+
overlay.style.justifyContent = "center";
|
|
62
|
+
overlay.style.zIndex = "99999";
|
|
63
|
+
|
|
64
|
+
// 建立對話框內容
|
|
65
|
+
const box = document.createElement("div");
|
|
66
|
+
box.style.maxWidth = "80vw"; // 隨螢幕自適應
|
|
67
|
+
box.style.maxHeight = "70vh"; // 可捲動高度
|
|
68
|
+
box.style.padding = "2vh 2vw";
|
|
69
|
+
box.style.background = "#fff";
|
|
70
|
+
box.style.borderRadius = "1.5vh";
|
|
71
|
+
box.style.boxShadow = "0 0 2vh rgba(0,0,0,0.3)";
|
|
72
|
+
box.style.overflowY = "auto"; // 內容可捲動
|
|
73
|
+
//box.style.fontSize = "14px";
|
|
74
|
+
|
|
75
|
+
box.style.wordBreak = "break-all";
|
|
76
|
+
box.style.whiteSpace = "pre-wrap";
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if(asHtml)
|
|
80
|
+
box.innerHTML = text ;
|
|
81
|
+
else
|
|
82
|
+
box.innerText = text;
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
// 點擊任意區域關閉
|
|
86
|
+
overlay.addEventListener("click", () => overlay.remove());
|
|
87
|
+
|
|
88
|
+
// Default: no close on clicking content
|
|
89
|
+
if(!closeOnClick)
|
|
90
|
+
box.addEventListener("click", (e) => e.stopPropagation());
|
|
91
|
+
|
|
92
|
+
overlay.appendChild(box);
|
|
93
|
+
document.body.appendChild(overlay);
|
|
94
|
+
} // alert_advanced
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
function noWinOpenUseFetch(){
|
|
99
|
+
|
|
100
|
+
let lang = (navigator.language||"")+""
|
|
101
|
+
|
|
102
|
+
let chi = lang.toLowerCase().includes("zh")
|
|
103
|
+
|
|
104
|
+
if(chi)
|
|
105
|
+
alert("從現在起,按下終端機內的連結會直接觸發fetch(url)。請小心別誤點可疑連結,重新整理頁面即可回復");
|
|
106
|
+
else
|
|
107
|
+
alert("From now on, clicking on links in the terminal directly fetch(url). Please be careful not to click on suspicious links. Refreshing the page reverts this effect.");
|
|
108
|
+
|
|
109
|
+
if(confirm.toString().includes("native"))
|
|
110
|
+
{
|
|
111
|
+
window.realConfirm = confirm ;
|
|
112
|
+
confirm = ()=>true ;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if(window.open.toString().includes("native"))
|
|
116
|
+
{
|
|
117
|
+
window.realWinOpen=window.open;
|
|
118
|
+
|
|
119
|
+
window.fetchText = async (url)=>{
|
|
120
|
+
let txt = await new Promise(res=>{
|
|
121
|
+
fetch(url).then(r=>r.text())
|
|
122
|
+
.then(res).catch(res)
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
return txt ;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
window.open = (url)=>{
|
|
129
|
+
|
|
130
|
+
if(url)
|
|
131
|
+
{
|
|
132
|
+
(async ()=>{
|
|
133
|
+
|
|
134
|
+
let txt = await window.fetchText(url);
|
|
135
|
+
if(txt) alert(txt);
|
|
136
|
+
|
|
137
|
+
return {location:{}};
|
|
138
|
+
})()
|
|
139
|
+
|
|
140
|
+
return null
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return {location:{
|
|
144
|
+
set href(url){
|
|
145
|
+
(async ()=>{
|
|
146
|
+
|
|
147
|
+
let txt = await window.fetchText(url);
|
|
148
|
+
if(txt) alert(txt);
|
|
149
|
+
|
|
150
|
+
})()
|
|
151
|
+
}
|
|
152
|
+
}}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
} // noWinOpenUseFetch
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
</script>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
</body>
|
|
163
|
+
|
|
164
|
+
</html>
|