gsd-pi 2.8.3 → 2.10.0
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 +2 -1
- package/dist/cli.js +5 -0
- package/dist/loader.js +1 -1
- package/dist/update-check.d.ts +24 -0
- package/dist/update-check.js +93 -0
- package/node_modules/@gsd/native/package.json +59 -0
- package/node_modules/@gsd/native/src/__tests__/clipboard.test.mjs +79 -0
- package/node_modules/@gsd/native/src/__tests__/fd.test.mjs +164 -0
- package/node_modules/@gsd/native/src/__tests__/glob.test.mjs +237 -0
- package/node_modules/@gsd/native/src/__tests__/grep.test.mjs +162 -0
- package/node_modules/@gsd/native/src/__tests__/highlight.test.mjs +156 -0
- package/node_modules/@gsd/native/src/__tests__/html.test.mjs +98 -0
- package/node_modules/@gsd/native/src/__tests__/image.test.mjs +137 -0
- package/node_modules/@gsd/native/src/__tests__/ps.test.mjs +109 -0
- package/node_modules/@gsd/native/src/__tests__/text.test.mjs +262 -0
- package/node_modules/@gsd/native/src/ast/index.ts +12 -0
- package/node_modules/@gsd/native/src/ast/types.ts +75 -0
- package/node_modules/@gsd/native/src/clipboard/index.ts +40 -0
- package/node_modules/@gsd/native/src/clipboard/types.ts +7 -0
- package/node_modules/@gsd/native/src/fd/index.ts +35 -0
- package/node_modules/@gsd/native/src/fd/types.ts +31 -0
- package/node_modules/@gsd/native/src/glob/index.ts +44 -0
- package/node_modules/@gsd/native/src/glob/types.ts +53 -0
- package/node_modules/@gsd/native/src/grep/index.ts +48 -0
- package/node_modules/@gsd/native/src/grep/types.ts +105 -0
- package/node_modules/@gsd/native/src/highlight/index.ts +44 -0
- package/node_modules/@gsd/native/src/highlight/types.ts +25 -0
- package/node_modules/@gsd/native/src/html/index.ts +24 -0
- package/node_modules/@gsd/native/src/html/types.ts +7 -0
- package/node_modules/@gsd/native/src/image/index.ts +28 -0
- package/node_modules/@gsd/native/src/image/types.ts +41 -0
- package/node_modules/@gsd/native/src/index.ts +88 -0
- package/node_modules/@gsd/native/src/native.ts +94 -0
- package/node_modules/@gsd/native/src/ps/index.ts +52 -0
- package/node_modules/@gsd/native/src/ps/types.ts +5 -0
- package/node_modules/@gsd/native/src/text/index.ts +125 -0
- package/node_modules/@gsd/native/src/text/types.ts +29 -0
- package/node_modules/@gsd/native/src/ttsr/index.ts +39 -0
- package/node_modules/@gsd/native/src/ttsr/types.ts +10 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.d.ts +46 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.js +758 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.d.ts +23 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.js +267 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/defaults.json +456 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.d.ts +17 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.js +101 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.d.ts +15 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.js +46 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.d.ts +35 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.js +709 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts +2 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +308 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp.md +33 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.d.ts +34 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.js +136 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.d.ts +262 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.js +64 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.d.ts +50 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.js +574 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.d.ts +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.js +12 -77
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.d.ts +60 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.js +247 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.d.ts +43 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.js +146 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.d.ts +114 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.js +522 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.d.ts +2 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.js +376 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.d.ts +38 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.js +27 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +10 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +2 -2
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +6 -3
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.js +54 -10
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.js +25 -40
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.js +17 -21
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.d.ts +7 -6
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.js +7 -13
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.js +3 -56
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.js +7 -17
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.d.ts +1 -2
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.js +21 -29
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/package.json +2 -5
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/client.ts +880 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/config.ts +325 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/defaults.json +456 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/edits.ts +109 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/helpers.ts +54 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/index.ts +943 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +407 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lsp.md +33 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lspmux.ts +199 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/types.ts +421 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/utils.ts +682 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/slash-commands.ts +1 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/find.ts +13 -88
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline-edit.ts +318 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline-read.ts +196 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline.test.ts +456 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline.ts +594 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/index.ts +63 -0
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +2 -2
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +5 -3
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/interactive-mode.ts +66 -12
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/theme/theme.ts +26 -42
- package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard-image.ts +17 -24
- package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard-native.ts +11 -21
- package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard.ts +3 -51
- package/node_modules/@gsd/pi-coding-agent/src/utils/image-convert.ts +7 -17
- package/node_modules/@gsd/pi-coding-agent/src/utils/image-resize.ts +28 -34
- package/node_modules/@gsd/pi-tui/dist/autocomplete.d.ts +1 -3
- package/node_modules/@gsd/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/autocomplete.js +16 -95
- package/node_modules/@gsd/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/components/image.d.ts +7 -0
- package/node_modules/@gsd/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/components/image.js +20 -1
- package/node_modules/@gsd/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.js +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/terminal-image.d.ts +5 -5
- package/node_modules/@gsd/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/terminal-image.js +9 -120
- package/node_modules/@gsd/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/utils.d.ts +23 -26
- package/node_modules/@gsd/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/utils.js +47 -716
- package/node_modules/@gsd/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@gsd/pi-tui/package.json +1 -0
- package/node_modules/@gsd/pi-tui/src/autocomplete.ts +17 -112
- package/node_modules/@gsd/pi-tui/src/components/image.ts +23 -1
- package/node_modules/@gsd/pi-tui/src/index.ts +0 -4
- package/node_modules/@gsd/pi-tui/src/terminal-image.ts +9 -135
- package/node_modules/@gsd/pi-tui/src/utils.ts +51 -775
- package/package.json +4 -1
- package/packages/native/package.json +59 -0
- package/packages/native/src/__tests__/clipboard.test.mjs +79 -0
- package/packages/native/src/__tests__/fd.test.mjs +164 -0
- package/packages/native/src/__tests__/glob.test.mjs +237 -0
- package/packages/native/src/__tests__/grep.test.mjs +162 -0
- package/packages/native/src/__tests__/highlight.test.mjs +156 -0
- package/packages/native/src/__tests__/html.test.mjs +98 -0
- package/packages/native/src/__tests__/image.test.mjs +137 -0
- package/packages/native/src/__tests__/ps.test.mjs +109 -0
- package/packages/native/src/__tests__/text.test.mjs +262 -0
- package/packages/native/src/ast/index.ts +12 -0
- package/packages/native/src/ast/types.ts +75 -0
- package/packages/native/src/clipboard/index.ts +40 -0
- package/packages/native/src/clipboard/types.ts +7 -0
- package/packages/native/src/fd/index.ts +35 -0
- package/packages/native/src/fd/types.ts +31 -0
- package/packages/native/src/glob/index.ts +44 -0
- package/packages/native/src/glob/types.ts +53 -0
- package/packages/native/src/grep/index.ts +48 -0
- package/packages/native/src/grep/types.ts +105 -0
- package/packages/native/src/highlight/index.ts +44 -0
- package/packages/native/src/highlight/types.ts +25 -0
- package/packages/native/src/html/index.ts +24 -0
- package/packages/native/src/html/types.ts +7 -0
- package/packages/native/src/image/index.ts +28 -0
- package/packages/native/src/image/types.ts +41 -0
- package/packages/native/src/index.ts +88 -0
- package/packages/native/src/native.ts +94 -0
- package/packages/native/src/ps/index.ts +52 -0
- package/packages/native/src/ps/types.ts +5 -0
- package/packages/native/src/text/index.ts +125 -0
- package/packages/native/src/text/types.ts +29 -0
- package/packages/native/src/ttsr/index.ts +39 -0
- package/packages/native/src/ttsr/types.ts +10 -0
- package/packages/native/tsconfig.json +8 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts +46 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js +758 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts +23 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.js +267 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/defaults.json +456 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts +17 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.js +101 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.d.ts +15 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.js +46 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts +35 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.js +709 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +308 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp.md +33 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts +34 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js +136 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts +262 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.js +64 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts +50 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.js +574 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.js +12 -77
- package/packages/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.d.ts +60 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.js +247 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts +43 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.js +146 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.d.ts +114 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.js +522 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.js +376 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts +38 -0
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/index.js +27 -0
- package/packages/pi-coding-agent/dist/core/tools/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +10 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +2 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +6 -3
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +54 -10
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +25 -40
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js +17 -21
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-native.d.ts +7 -6
- package/packages/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-native.js +7 -13
- package/packages/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard.js +3 -56
- package/packages/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-convert.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-convert.js +7 -17
- package/packages/pi-coding-agent/dist/utils/image-convert.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-resize.d.ts +1 -2
- package/packages/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-resize.js +21 -29
- package/packages/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
- package/packages/pi-coding-agent/package.json +2 -5
- package/packages/pi-coding-agent/src/core/lsp/client.ts +880 -0
- package/packages/pi-coding-agent/src/core/lsp/config.ts +325 -0
- package/packages/pi-coding-agent/src/core/lsp/defaults.json +456 -0
- package/packages/pi-coding-agent/src/core/lsp/edits.ts +109 -0
- package/packages/pi-coding-agent/src/core/lsp/helpers.ts +54 -0
- package/packages/pi-coding-agent/src/core/lsp/index.ts +943 -0
- package/packages/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +407 -0
- package/packages/pi-coding-agent/src/core/lsp/lsp.md +33 -0
- package/packages/pi-coding-agent/src/core/lsp/lspmux.ts +199 -0
- package/packages/pi-coding-agent/src/core/lsp/types.ts +421 -0
- package/packages/pi-coding-agent/src/core/lsp/utils.ts +682 -0
- package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
- package/packages/pi-coding-agent/src/core/tools/find.ts +13 -88
- package/packages/pi-coding-agent/src/core/tools/hashline-edit.ts +318 -0
- package/packages/pi-coding-agent/src/core/tools/hashline-read.ts +196 -0
- package/packages/pi-coding-agent/src/core/tools/hashline.test.ts +456 -0
- package/packages/pi-coding-agent/src/core/tools/hashline.ts +594 -0
- package/packages/pi-coding-agent/src/core/tools/index.ts +63 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +5 -3
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +66 -12
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +26 -42
- package/packages/pi-coding-agent/src/utils/clipboard-image.ts +17 -24
- package/packages/pi-coding-agent/src/utils/clipboard-native.ts +11 -21
- package/packages/pi-coding-agent/src/utils/clipboard.ts +3 -51
- package/packages/pi-coding-agent/src/utils/image-convert.ts +7 -17
- package/packages/pi-coding-agent/src/utils/image-resize.ts +28 -34
- package/packages/pi-tui/dist/autocomplete.d.ts +1 -3
- package/packages/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/packages/pi-tui/dist/autocomplete.js +16 -95
- package/packages/pi-tui/dist/autocomplete.js.map +1 -1
- package/packages/pi-tui/dist/components/image.d.ts +7 -0
- package/packages/pi-tui/dist/components/image.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/image.js +20 -1
- package/packages/pi-tui/dist/components/image.js.map +1 -1
- package/packages/pi-tui/dist/index.d.ts +1 -1
- package/packages/pi-tui/dist/index.d.ts.map +1 -1
- package/packages/pi-tui/dist/index.js +1 -1
- package/packages/pi-tui/dist/index.js.map +1 -1
- package/packages/pi-tui/dist/terminal-image.d.ts +5 -5
- package/packages/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/packages/pi-tui/dist/terminal-image.js +9 -120
- package/packages/pi-tui/dist/terminal-image.js.map +1 -1
- package/packages/pi-tui/dist/utils.d.ts +23 -26
- package/packages/pi-tui/dist/utils.d.ts.map +1 -1
- package/packages/pi-tui/dist/utils.js +47 -716
- package/packages/pi-tui/dist/utils.js.map +1 -1
- package/packages/pi-tui/package.json +1 -0
- package/packages/pi-tui/src/autocomplete.ts +17 -112
- package/packages/pi-tui/src/components/image.ts +23 -1
- package/packages/pi-tui/src/index.ts +0 -4
- package/packages/pi-tui/src/terminal-image.ts +9 -135
- package/packages/pi-tui/src/utils.ts +51 -775
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +25 -40
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/src/resources/extensions/ask-user-questions.ts +2 -2
- package/src/resources/extensions/bg-shell/index.ts +377 -51
- package/src/resources/extensions/browser-tools/core.d.ts +205 -0
- package/src/resources/extensions/browser-tools/index.ts +2 -2
- package/src/resources/extensions/browser-tools/refs.ts +1 -1
- package/src/resources/extensions/browser-tools/tools/session.ts +1 -1
- package/src/resources/extensions/context7/index.ts +2 -2
- package/src/resources/extensions/get-secrets-from-user.ts +3 -2
- package/src/resources/extensions/google-search/index.ts +1 -1
- package/src/resources/extensions/gsd/auto.ts +41 -4
- package/src/resources/extensions/gsd/commands.ts +218 -3
- package/src/resources/extensions/gsd/doctor.ts +1 -1
- package/src/resources/extensions/gsd/git-service.ts +129 -5
- package/src/resources/extensions/gsd/guided-flow.ts +19 -9
- package/src/resources/extensions/gsd/index.ts +17 -7
- package/src/resources/extensions/gsd/preferences.ts +1 -1
- package/src/resources/extensions/gsd/tests/git-service.test.ts +226 -0
- package/src/resources/extensions/gsd/tests/migrate-command.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/migrate-transformer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +10 -10
- package/src/resources/extensions/gsd/tests/next-milestone-id.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/worktree.test.ts +352 -0
- package/src/resources/extensions/gsd/types.ts +1 -0
- package/src/resources/extensions/gsd/worktree.ts +20 -1
- package/src/resources/extensions/mac-tools/index.ts +1 -1
- package/src/resources/extensions/search-the-web/format.ts +1 -1
- package/src/resources/extensions/search-the-web/index.ts +5 -5
- package/src/resources/extensions/search-the-web/tool-fetch-page.ts +7 -7
- package/src/resources/extensions/search-the-web/tool-llm-context.ts +11 -11
- package/src/resources/extensions/search-the-web/tool-search.ts +10 -10
- package/src/resources/extensions/shared/interview-ui.ts +2 -2
- package/src/resources/extensions/universal-config/discovery.ts +78 -0
- package/src/resources/extensions/universal-config/format.ts +160 -0
- package/src/resources/extensions/universal-config/index.ts +118 -0
- package/src/resources/extensions/universal-config/package.json +11 -0
- package/src/resources/extensions/universal-config/scanners.ts +579 -0
- package/src/resources/extensions/universal-config/tests/discovery.test.ts +111 -0
- package/src/resources/extensions/universal-config/tests/format.test.ts +111 -0
- package/src/resources/extensions/universal-config/tests/scanners.test.ts +438 -0
- package/src/resources/extensions/universal-config/tools.ts +60 -0
- package/src/resources/extensions/universal-config/types.ts +116 -0
- package/node_modules/@mariozechner/clipboard/.yarnrc.yml +0 -1
- package/node_modules/@mariozechner/clipboard/Cargo.toml +0 -26
- package/node_modules/@mariozechner/clipboard/README.md +0 -58
- package/node_modules/@mariozechner/clipboard/build.rs +0 -5
- package/node_modules/@mariozechner/clipboard/exp.ts +0 -12
- package/node_modules/@mariozechner/clipboard/index.d.ts +0 -23
- package/node_modules/@mariozechner/clipboard/index.js +0 -317
- package/node_modules/@mariozechner/clipboard/package.json +0 -56
- package/node_modules/@mariozechner/clipboard/src/lib.rs +0 -191
- package/node_modules/@mariozechner/clipboard-darwin-arm64/README.md +0 -3
- package/node_modules/@mariozechner/clipboard-darwin-arm64/clipboard.darwin-arm64.node +0 -0
- package/node_modules/@mariozechner/clipboard-darwin-arm64/package.json +0 -22
- package/node_modules/@mariozechner/clipboard-darwin-universal/README.md +0 -3
- package/node_modules/@mariozechner/clipboard-darwin-universal/clipboard.darwin-universal.node +0 -0
- package/node_modules/@mariozechner/clipboard-darwin-universal/package.json +0 -19
- package/node_modules/ansi-styles/index.d.ts +0 -345
- package/node_modules/ansi-styles/index.js +0 -163
- package/node_modules/ansi-styles/license +0 -9
- package/node_modules/ansi-styles/package.json +0 -56
- package/node_modules/ansi-styles/readme.md +0 -152
- package/node_modules/any-promise/.jshintrc +0 -4
- package/node_modules/any-promise/.npmignore +0 -7
- package/node_modules/any-promise/LICENSE +0 -19
- package/node_modules/any-promise/README.md +0 -161
- package/node_modules/any-promise/implementation.d.ts +0 -3
- package/node_modules/any-promise/implementation.js +0 -1
- package/node_modules/any-promise/index.d.ts +0 -73
- package/node_modules/any-promise/index.js +0 -1
- package/node_modules/any-promise/loader.js +0 -78
- package/node_modules/any-promise/optional.js +0 -6
- package/node_modules/any-promise/package.json +0 -45
- package/node_modules/any-promise/register/bluebird.d.ts +0 -1
- package/node_modules/any-promise/register/bluebird.js +0 -2
- package/node_modules/any-promise/register/es6-promise.d.ts +0 -1
- package/node_modules/any-promise/register/es6-promise.js +0 -2
- package/node_modules/any-promise/register/lie.d.ts +0 -1
- package/node_modules/any-promise/register/lie.js +0 -2
- package/node_modules/any-promise/register/native-promise-only.d.ts +0 -1
- package/node_modules/any-promise/register/native-promise-only.js +0 -2
- package/node_modules/any-promise/register/pinkie.d.ts +0 -1
- package/node_modules/any-promise/register/pinkie.js +0 -2
- package/node_modules/any-promise/register/promise.d.ts +0 -1
- package/node_modules/any-promise/register/promise.js +0 -2
- package/node_modules/any-promise/register/q.d.ts +0 -1
- package/node_modules/any-promise/register/q.js +0 -2
- package/node_modules/any-promise/register/rsvp.d.ts +0 -1
- package/node_modules/any-promise/register/rsvp.js +0 -2
- package/node_modules/any-promise/register/vow.d.ts +0 -1
- package/node_modules/any-promise/register/vow.js +0 -2
- package/node_modules/any-promise/register/when.d.ts +0 -1
- package/node_modules/any-promise/register/when.js +0 -2
- package/node_modules/any-promise/register-shim.js +0 -18
- package/node_modules/any-promise/register.d.ts +0 -17
- package/node_modules/any-promise/register.js +0 -94
- package/node_modules/cli-highlight/LICENSE.txt +0 -15
- package/node_modules/cli-highlight/README.md +0 -88
- package/node_modules/cli-highlight/bin/highlight +0 -2
- package/node_modules/cli-highlight/dist/cli.d.ts +0 -1
- package/node_modules/cli-highlight/dist/cli.js +0 -102
- package/node_modules/cli-highlight/dist/cli.js.map +0 -1
- package/node_modules/cli-highlight/dist/index.d.ts +0 -53
- package/node_modules/cli-highlight/dist/index.js +0 -112
- package/node_modules/cli-highlight/dist/index.js.map +0 -1
- package/node_modules/cli-highlight/dist/test/test.d.ts +0 -1
- package/node_modules/cli-highlight/dist/test/test.js +0 -62
- package/node_modules/cli-highlight/dist/test/test.js.map +0 -1
- package/node_modules/cli-highlight/dist/theme.d.ts +0 -270
- package/node_modules/cli-highlight/dist/theme.js +0 -265
- package/node_modules/cli-highlight/dist/theme.js.map +0 -1
- package/node_modules/cli-highlight/node_modules/chalk/index.d.ts +0 -415
- package/node_modules/cli-highlight/node_modules/chalk/license +0 -9
- package/node_modules/cli-highlight/node_modules/chalk/package.json +0 -68
- package/node_modules/cli-highlight/node_modules/chalk/readme.md +0 -341
- package/node_modules/cli-highlight/node_modules/chalk/source/index.js +0 -229
- package/node_modules/cli-highlight/node_modules/chalk/source/templates.js +0 -134
- package/node_modules/cli-highlight/node_modules/chalk/source/util.js +0 -39
- package/node_modules/cli-highlight/package.json +0 -129
- package/node_modules/cliui/CHANGELOG.md +0 -121
- package/node_modules/cliui/LICENSE.txt +0 -14
- package/node_modules/cliui/README.md +0 -141
- package/node_modules/cliui/build/index.cjs +0 -302
- package/node_modules/cliui/build/lib/index.js +0 -287
- package/node_modules/cliui/build/lib/string-utils.js +0 -27
- package/node_modules/cliui/index.mjs +0 -13
- package/node_modules/cliui/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/cliui/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/cliui/node_modules/ansi-regex/license +0 -9
- package/node_modules/cliui/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/cliui/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/cliui/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/cliui/node_modules/strip-ansi/license +0 -9
- package/node_modules/cliui/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/cliui/package.json +0 -83
- package/node_modules/color-convert/CHANGELOG.md +0 -54
- package/node_modules/color-convert/LICENSE +0 -21
- package/node_modules/color-convert/README.md +0 -68
- package/node_modules/color-convert/conversions.js +0 -839
- package/node_modules/color-convert/index.js +0 -81
- package/node_modules/color-convert/package.json +0 -48
- package/node_modules/color-convert/route.js +0 -97
- package/node_modules/color-name/LICENSE +0 -8
- package/node_modules/color-name/README.md +0 -11
- package/node_modules/color-name/index.js +0 -152
- package/node_modules/color-name/package.json +0 -28
- package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/node_modules/emoji-regex/README.md +0 -73
- package/node_modules/emoji-regex/es2015/index.js +0 -6
- package/node_modules/emoji-regex/es2015/text.js +0 -6
- package/node_modules/emoji-regex/index.d.ts +0 -23
- package/node_modules/emoji-regex/index.js +0 -6
- package/node_modules/emoji-regex/package.json +0 -50
- package/node_modules/emoji-regex/text.js +0 -6
- package/node_modules/escalade/dist/index.js +0 -22
- package/node_modules/escalade/dist/index.mjs +0 -22
- package/node_modules/escalade/index.d.mts +0 -11
- package/node_modules/escalade/index.d.ts +0 -15
- package/node_modules/escalade/license +0 -9
- package/node_modules/escalade/package.json +0 -74
- package/node_modules/escalade/readme.md +0 -211
- package/node_modules/escalade/sync/index.d.mts +0 -9
- package/node_modules/escalade/sync/index.d.ts +0 -13
- package/node_modules/escalade/sync/index.js +0 -18
- package/node_modules/escalade/sync/index.mjs +0 -18
- package/node_modules/esprima/ChangeLog +0 -235
- package/node_modules/get-caller-file/LICENSE.md +0 -6
- package/node_modules/get-caller-file/README.md +0 -41
- package/node_modules/get-caller-file/index.d.ts +0 -2
- package/node_modules/get-caller-file/index.js +0 -22
- package/node_modules/get-caller-file/index.js.map +0 -1
- package/node_modules/get-caller-file/package.json +0 -42
- package/node_modules/has-flag/index.d.ts +0 -39
- package/node_modules/has-flag/index.js +0 -8
- package/node_modules/has-flag/license +0 -9
- package/node_modules/has-flag/package.json +0 -46
- package/node_modules/has-flag/readme.md +0 -89
- package/node_modules/highlight.js/LICENSE +0 -29
- package/node_modules/highlight.js/README.md +0 -371
- package/node_modules/highlight.js/lib/core.js +0 -2517
- package/node_modules/highlight.js/lib/highlight.js +0 -2
- package/node_modules/highlight.js/lib/index.js +0 -195
- package/node_modules/highlight.js/lib/languages/1c.js +0 -521
- package/node_modules/highlight.js/lib/languages/abnf.js +0 -103
- package/node_modules/highlight.js/lib/languages/accesslog.js +0 -127
- package/node_modules/highlight.js/lib/languages/actionscript.js +0 -113
- package/node_modules/highlight.js/lib/languages/ada.js +0 -194
- package/node_modules/highlight.js/lib/languages/angelscript.js +0 -123
- package/node_modules/highlight.js/lib/languages/apache.js +0 -89
- package/node_modules/highlight.js/lib/languages/applescript.js +0 -189
- package/node_modules/highlight.js/lib/languages/arcade.js +0 -165
- package/node_modules/highlight.js/lib/languages/arduino.js +0 -576
- package/node_modules/highlight.js/lib/languages/armasm.js +0 -131
- package/node_modules/highlight.js/lib/languages/asciidoc.js +0 -303
- package/node_modules/highlight.js/lib/languages/aspectj.js +0 -186
- package/node_modules/highlight.js/lib/languages/autohotkey.js +0 -84
- package/node_modules/highlight.js/lib/languages/autoit.js +0 -183
- package/node_modules/highlight.js/lib/languages/avrasm.js +0 -80
- package/node_modules/highlight.js/lib/languages/awk.js +0 -73
- package/node_modules/highlight.js/lib/languages/axapta.js +0 -179
- package/node_modules/highlight.js/lib/languages/bash.js +0 -169
- package/node_modules/highlight.js/lib/languages/basic.js +0 -65
- package/node_modules/highlight.js/lib/languages/bnf.js +0 -38
- package/node_modules/highlight.js/lib/languages/brainfuck.js +0 -46
- package/node_modules/highlight.js/lib/languages/c-like.js +0 -501
- package/node_modules/highlight.js/lib/languages/c.js +0 -309
- package/node_modules/highlight.js/lib/languages/cal.js +0 -104
- package/node_modules/highlight.js/lib/languages/capnproto.js +0 -64
- package/node_modules/highlight.js/lib/languages/ceylon.js +0 -82
- package/node_modules/highlight.js/lib/languages/clean.js +0 -40
- package/node_modules/highlight.js/lib/languages/clojure-repl.js +0 -27
- package/node_modules/highlight.js/lib/languages/clojure.js +0 -158
- package/node_modules/highlight.js/lib/languages/cmake.js +0 -64
- package/node_modules/highlight.js/lib/languages/coffeescript.js +0 -356
- package/node_modules/highlight.js/lib/languages/coq.js +0 -79
- package/node_modules/highlight.js/lib/languages/cos.js +0 -138
- package/node_modules/highlight.js/lib/languages/cpp.js +0 -464
- package/node_modules/highlight.js/lib/languages/crmsh.js +0 -102
- package/node_modules/highlight.js/lib/languages/crystal.js +0 -326
- package/node_modules/highlight.js/lib/languages/csharp.js +0 -441
- package/node_modules/highlight.js/lib/languages/csp.js +0 -37
- package/node_modules/highlight.js/lib/languages/css.js +0 -608
- package/node_modules/highlight.js/lib/languages/d.js +0 -271
- package/node_modules/highlight.js/lib/languages/dart.js +0 -199
- package/node_modules/highlight.js/lib/languages/delphi.js +0 -126
- package/node_modules/highlight.js/lib/languages/diff.js +0 -85
- package/node_modules/highlight.js/lib/languages/django.js +0 -77
- package/node_modules/highlight.js/lib/languages/dns.js +0 -46
- package/node_modules/highlight.js/lib/languages/dockerfile.js +0 -34
- package/node_modules/highlight.js/lib/languages/dos.js +0 -70
- package/node_modules/highlight.js/lib/languages/dsconfig.js +0 -66
- package/node_modules/highlight.js/lib/languages/dts.js +0 -153
- package/node_modules/highlight.js/lib/languages/dust.js +0 -45
- package/node_modules/highlight.js/lib/languages/ebnf.js +0 -53
- package/node_modules/highlight.js/lib/languages/elixir.js +0 -259
- package/node_modules/highlight.js/lib/languages/elm.js +0 -129
- package/node_modules/highlight.js/lib/languages/erb.js +0 -29
- package/node_modules/highlight.js/lib/languages/erlang-repl.js +0 -86
- package/node_modules/highlight.js/lib/languages/erlang.js +0 -199
- package/node_modules/highlight.js/lib/languages/excel.js +0 -64
- package/node_modules/highlight.js/lib/languages/fix.js +0 -37
- package/node_modules/highlight.js/lib/languages/flix.js +0 -54
- package/node_modules/highlight.js/lib/languages/fortran.js +0 -159
- package/node_modules/highlight.js/lib/languages/fsharp.js +0 -86
- package/node_modules/highlight.js/lib/languages/gams.js +0 -208
- package/node_modules/highlight.js/lib/languages/gauss.js +0 -316
- package/node_modules/highlight.js/lib/languages/gcode.js +0 -88
- package/node_modules/highlight.js/lib/languages/gherkin.js +0 -49
- package/node_modules/highlight.js/lib/languages/glsl.js +0 -128
- package/node_modules/highlight.js/lib/languages/gml.js +0 -885
- package/node_modules/highlight.js/lib/languages/go.js +0 -74
- package/node_modules/highlight.js/lib/languages/golo.js +0 -33
- package/node_modules/highlight.js/lib/languages/gradle.js +0 -44
- package/node_modules/highlight.js/lib/languages/groovy.js +0 -174
- package/node_modules/highlight.js/lib/languages/haml.js +0 -117
- package/node_modules/highlight.js/lib/languages/handlebars.js +0 -324
- package/node_modules/highlight.js/lib/languages/haskell.js +0 -173
- package/node_modules/highlight.js/lib/languages/haxe.js +0 -157
- package/node_modules/highlight.js/lib/languages/hsp.js +0 -65
- package/node_modules/highlight.js/lib/languages/htmlbars.js +0 -352
- package/node_modules/highlight.js/lib/languages/http.js +0 -121
- package/node_modules/highlight.js/lib/languages/hy.js +0 -109
- package/node_modules/highlight.js/lib/languages/inform7.js +0 -70
- package/node_modules/highlight.js/lib/languages/ini.js +0 -173
- package/node_modules/highlight.js/lib/languages/irpf90.js +0 -141
- package/node_modules/highlight.js/lib/languages/isbl.js +0 -3207
- package/node_modules/highlight.js/lib/languages/java.js +0 -181
- package/node_modules/highlight.js/lib/languages/javascript.js +0 -604
- package/node_modules/highlight.js/lib/languages/jboss-cli.js +0 -63
- package/node_modules/highlight.js/lib/languages/json.js +0 -63
- package/node_modules/highlight.js/lib/languages/julia-repl.js +0 -50
- package/node_modules/highlight.js/lib/languages/julia.js +0 -416
- package/node_modules/highlight.js/lib/languages/kotlin.js +0 -284
- package/node_modules/highlight.js/lib/languages/lasso.js +0 -187
- package/node_modules/highlight.js/lib/languages/latex.js +0 -276
- package/node_modules/highlight.js/lib/languages/ldif.js +0 -42
- package/node_modules/highlight.js/lib/languages/leaf.js +0 -49
- package/node_modules/highlight.js/lib/languages/less.js +0 -666
- package/node_modules/highlight.js/lib/languages/lisp.js +0 -111
- package/node_modules/highlight.js/lib/languages/livecodeserver.js +0 -189
- package/node_modules/highlight.js/lib/languages/livescript.js +0 -374
- package/node_modules/highlight.js/lib/languages/llvm.js +0 -154
- package/node_modules/highlight.js/lib/languages/lsl.js +0 -95
- package/node_modules/highlight.js/lib/languages/lua.js +0 -82
- package/node_modules/highlight.js/lib/languages/makefile.js +0 -92
- package/node_modules/highlight.js/lib/languages/markdown.js +0 -258
- package/node_modules/highlight.js/lib/languages/mathematica.js +0 -6797
- package/node_modules/highlight.js/lib/languages/matlab.js +0 -106
- package/node_modules/highlight.js/lib/languages/maxima.js +0 -417
- package/node_modules/highlight.js/lib/languages/mel.js +0 -236
- package/node_modules/highlight.js/lib/languages/mercury.js +0 -121
- package/node_modules/highlight.js/lib/languages/mipsasm.js +0 -109
- package/node_modules/highlight.js/lib/languages/mizar.js +0 -29
- package/node_modules/highlight.js/lib/languages/mojolicious.js +0 -36
- package/node_modules/highlight.js/lib/languages/monkey.js +0 -89
- package/node_modules/highlight.js/lib/languages/moonscript.js +0 -147
- package/node_modules/highlight.js/lib/languages/n1ql.js +0 -77
- package/node_modules/highlight.js/lib/languages/nginx.js +0 -140
- package/node_modules/highlight.js/lib/languages/nim.js +0 -79
- package/node_modules/highlight.js/lib/languages/nix.js +0 -65
- package/node_modules/highlight.js/lib/languages/node-repl.js +0 -37
- package/node_modules/highlight.js/lib/languages/nsis.js +0 -119
- package/node_modules/highlight.js/lib/languages/objectivec.js +0 -121
- package/node_modules/highlight.js/lib/languages/ocaml.js +0 -82
- package/node_modules/highlight.js/lib/languages/openscad.js +0 -81
- package/node_modules/highlight.js/lib/languages/oxygene.js +0 -101
- package/node_modules/highlight.js/lib/languages/parser3.js +0 -57
- package/node_modules/highlight.js/lib/languages/perl.js +0 -515
- package/node_modules/highlight.js/lib/languages/pf.js +0 -59
- package/node_modules/highlight.js/lib/languages/pgsql.js +0 -630
- package/node_modules/highlight.js/lib/languages/php-template.js +0 -54
- package/node_modules/highlight.js/lib/languages/php.js +0 -204
- package/node_modules/highlight.js/lib/languages/plaintext.js +0 -19
- package/node_modules/highlight.js/lib/languages/pony.js +0 -89
- package/node_modules/highlight.js/lib/languages/powershell.js +0 -331
- package/node_modules/highlight.js/lib/languages/processing.js +0 -58
- package/node_modules/highlight.js/lib/languages/profile.js +0 -43
- package/node_modules/highlight.js/lib/languages/prolog.js +0 -102
- package/node_modules/highlight.js/lib/languages/properties.js +0 -85
- package/node_modules/highlight.js/lib/languages/protobuf.js +0 -47
- package/node_modules/highlight.js/lib/languages/puppet.js +0 -147
- package/node_modules/highlight.js/lib/languages/purebasic.js +0 -101
- package/node_modules/highlight.js/lib/languages/python-repl.js +0 -36
- package/node_modules/highlight.js/lib/languages/python.js +0 -446
- package/node_modules/highlight.js/lib/languages/q.js +0 -37
- package/node_modules/highlight.js/lib/languages/qml.js +0 -225
- package/node_modules/highlight.js/lib/languages/r.js +0 -231
- package/node_modules/highlight.js/lib/languages/reasonml.js +0 -321
- package/node_modules/highlight.js/lib/languages/rib.js +0 -37
- package/node_modules/highlight.js/lib/languages/roboconf.js +0 -82
- package/node_modules/highlight.js/lib/languages/routeros.js +0 -172
- package/node_modules/highlight.js/lib/languages/rsl.js +0 -49
- package/node_modules/highlight.js/lib/languages/ruby.js +0 -387
- package/node_modules/highlight.js/lib/languages/ruleslanguage.js +0 -78
- package/node_modules/highlight.js/lib/languages/rust.js +0 -146
- package/node_modules/highlight.js/lib/languages/sas.js +0 -133
- package/node_modules/highlight.js/lib/languages/scala.js +0 -140
- package/node_modules/highlight.js/lib/languages/scheme.js +0 -207
- package/node_modules/highlight.js/lib/languages/scilab.js +0 -73
- package/node_modules/highlight.js/lib/languages/scss.js +0 -545
- package/node_modules/highlight.js/lib/languages/shell.js +0 -30
- package/node_modules/highlight.js/lib/languages/smali.js +0 -135
- package/node_modules/highlight.js/lib/languages/smalltalk.js +0 -63
- package/node_modules/highlight.js/lib/languages/sml.js +0 -81
- package/node_modules/highlight.js/lib/languages/sqf.js +0 -448
- package/node_modules/highlight.js/lib/languages/sql.js +0 -699
- package/node_modules/highlight.js/lib/languages/sql_more.js +0 -183
- package/node_modules/highlight.js/lib/languages/stan.js +0 -548
- package/node_modules/highlight.js/lib/languages/stata.js +0 -60
- package/node_modules/highlight.js/lib/languages/step21.js +0 -66
- package/node_modules/highlight.js/lib/languages/stylus.js +0 -609
- package/node_modules/highlight.js/lib/languages/subunit.js +0 -51
- package/node_modules/highlight.js/lib/languages/swift.js +0 -873
- package/node_modules/highlight.js/lib/languages/taggerscript.js +0 -52
- package/node_modules/highlight.js/lib/languages/tap.js +0 -55
- package/node_modules/highlight.js/lib/languages/tcl.js +0 -115
- package/node_modules/highlight.js/lib/languages/thrift.js +0 -51
- package/node_modules/highlight.js/lib/languages/tp.js +0 -95
- package/node_modules/highlight.js/lib/languages/twig.js +0 -77
- package/node_modules/highlight.js/lib/languages/typescript.js +0 -697
- package/node_modules/highlight.js/lib/languages/vala.js +0 -61
- package/node_modules/highlight.js/lib/languages/vbnet.js +0 -214
- package/node_modules/highlight.js/lib/languages/vbscript-html.js +0 -24
- package/node_modules/highlight.js/lib/languages/vbscript.js +0 -109
- package/node_modules/highlight.js/lib/languages/verilog.js +0 -131
- package/node_modules/highlight.js/lib/languages/vhdl.js +0 -71
- package/node_modules/highlight.js/lib/languages/vim.js +0 -123
- package/node_modules/highlight.js/lib/languages/x86asm.js +0 -163
- package/node_modules/highlight.js/lib/languages/xl.js +0 -92
- package/node_modules/highlight.js/lib/languages/xml.js +0 -287
- package/node_modules/highlight.js/lib/languages/xquery.js +0 -197
- package/node_modules/highlight.js/lib/languages/yaml.js +0 -176
- package/node_modules/highlight.js/lib/languages/zephir.js +0 -140
- package/node_modules/highlight.js/package.json +0 -86
- package/node_modules/highlight.js/scss/a11y-dark.scss +0 -99
- package/node_modules/highlight.js/scss/a11y-light.scss +0 -99
- package/node_modules/highlight.js/scss/agate.scss +0 -108
- package/node_modules/highlight.js/scss/an-old-hope.scss +0 -89
- package/node_modules/highlight.js/scss/androidstudio.scss +0 -66
- package/node_modules/highlight.js/scss/arduino-light.scss +0 -87
- package/node_modules/highlight.js/scss/arta.scss +0 -73
- package/node_modules/highlight.js/scss/ascetic.scss +0 -45
- package/node_modules/highlight.js/scss/atelier-cave-dark.scss +0 -83
- package/node_modules/highlight.js/scss/atelier-cave-light.scss +0 -85
- package/node_modules/highlight.js/scss/atelier-dune-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-dune-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-estuary-dark.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-estuary-light.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-forest-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-forest-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-heath-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-heath-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-lakeside-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-lakeside-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-plateau-dark.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-plateau-light.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-savanna-dark.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-savanna-light.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-seaside-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-seaside-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-sulphurpool-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-sulphurpool-light.scss +0 -69
- package/node_modules/highlight.js/scss/atom-one-dark-reasonable.scss +0 -75
- package/node_modules/highlight.js/scss/atom-one-dark.scss +0 -96
- package/node_modules/highlight.js/scss/atom-one-light.scss +0 -96
- package/node_modules/highlight.js/scss/brown-paper.scss +0 -64
- package/node_modules/highlight.js/scss/brown-papersq.png +0 -0
- package/node_modules/highlight.js/scss/codepen-embed.scss +0 -60
- package/node_modules/highlight.js/scss/color-brewer.scss +0 -71
- package/node_modules/highlight.js/scss/darcula.scss +0 -74
- package/node_modules/highlight.js/scss/dark.scss +0 -63
- package/node_modules/highlight.js/scss/default.scss +0 -99
- package/node_modules/highlight.js/scss/docco.scss +0 -97
- package/node_modules/highlight.js/scss/dracula.scss +0 -76
- package/node_modules/highlight.js/scss/far.scss +0 -71
- package/node_modules/highlight.js/scss/foundation.scss +0 -89
- package/node_modules/highlight.js/scss/github-gist.scss +0 -79
- package/node_modules/highlight.js/scss/github.scss +0 -99
- package/node_modules/highlight.js/scss/gml.scss +0 -78
- package/node_modules/highlight.js/scss/googlecode.scss +0 -89
- package/node_modules/highlight.js/scss/gradient-dark.scss +0 -122
- package/node_modules/highlight.js/scss/gradient-light.scss +0 -130
- package/node_modules/highlight.js/scss/grayscale.scss +0 -101
- package/node_modules/highlight.js/scss/gruvbox-dark.scss +0 -108
- package/node_modules/highlight.js/scss/gruvbox-light.scss +0 -108
- package/node_modules/highlight.js/scss/hopscotch.scss +0 -84
- package/node_modules/highlight.js/scss/hybrid.scss +0 -102
- package/node_modules/highlight.js/scss/idea.scss +0 -97
- package/node_modules/highlight.js/scss/ir-black.scss +0 -73
- package/node_modules/highlight.js/scss/isbl-editor-dark.scss +0 -112
- package/node_modules/highlight.js/scss/isbl-editor-light.scss +0 -111
- package/node_modules/highlight.js/scss/kimbie.dark.scss +0 -74
- package/node_modules/highlight.js/scss/kimbie.light.scss +0 -74
- package/node_modules/highlight.js/scss/lightfair.scss +0 -88
- package/node_modules/highlight.js/scss/lioshi.scss +0 -88
- package/node_modules/highlight.js/scss/magula.scss +0 -70
- package/node_modules/highlight.js/scss/mono-blue.scss +0 -56
- package/node_modules/highlight.js/scss/monokai-sublime.scss +0 -83
- package/node_modules/highlight.js/scss/monokai.scss +0 -71
- package/node_modules/highlight.js/scss/night-owl.scss +0 -182
- package/node_modules/highlight.js/scss/nnfx-dark.scss +0 -106
- package/node_modules/highlight.js/scss/nnfx.scss +0 -106
- package/node_modules/highlight.js/scss/nord.scss +0 -309
- package/node_modules/highlight.js/scss/obsidian.scss +0 -88
- package/node_modules/highlight.js/scss/ocean.scss +0 -74
- package/node_modules/highlight.js/scss/paraiso-dark.scss +0 -72
- package/node_modules/highlight.js/scss/paraiso-light.scss +0 -72
- package/node_modules/highlight.js/scss/pojoaque.jpg +0 -0
- package/node_modules/highlight.js/scss/pojoaque.scss +0 -83
- package/node_modules/highlight.js/scss/purebasic.scss +0 -96
- package/node_modules/highlight.js/scss/qtcreator_dark.scss +0 -83
- package/node_modules/highlight.js/scss/qtcreator_light.scss +0 -83
- package/node_modules/highlight.js/scss/railscasts.scss +0 -106
- package/node_modules/highlight.js/scss/rainbow.scss +0 -85
- package/node_modules/highlight.js/scss/routeros.scss +0 -108
- package/node_modules/highlight.js/scss/school-book.png +0 -0
- package/node_modules/highlight.js/scss/school-book.scss +0 -69
- package/node_modules/highlight.js/scss/shades-of-purple.scss +0 -96
- package/node_modules/highlight.js/scss/solarized-dark.scss +0 -84
- package/node_modules/highlight.js/scss/solarized-light.scss +0 -84
- package/node_modules/highlight.js/scss/srcery.scss +0 -78
- package/node_modules/highlight.js/scss/stackoverflow-dark.scss +0 -78
- package/node_modules/highlight.js/scss/stackoverflow-light.scss +0 -78
- package/node_modules/highlight.js/scss/sunburst.scss +0 -102
- package/node_modules/highlight.js/scss/tomorrow-night-blue.scss +0 -75
- package/node_modules/highlight.js/scss/tomorrow-night-bright.scss +0 -74
- package/node_modules/highlight.js/scss/tomorrow-night-eighties.scss +0 -74
- package/node_modules/highlight.js/scss/tomorrow-night.scss +0 -75
- package/node_modules/highlight.js/scss/tomorrow.scss +0 -72
- package/node_modules/highlight.js/scss/vs.scss +0 -68
- package/node_modules/highlight.js/scss/vs2015.scss +0 -115
- package/node_modules/highlight.js/scss/xcode.scss +0 -104
- package/node_modules/highlight.js/scss/xt256.scss +0 -92
- package/node_modules/highlight.js/scss/zenburn.scss +0 -80
- package/node_modules/highlight.js/styles/a11y-dark.css +0 -99
- package/node_modules/highlight.js/styles/a11y-light.css +0 -99
- package/node_modules/highlight.js/styles/agate.css +0 -108
- package/node_modules/highlight.js/styles/an-old-hope.css +0 -89
- package/node_modules/highlight.js/styles/androidstudio.css +0 -66
- package/node_modules/highlight.js/styles/arduino-light.css +0 -87
- package/node_modules/highlight.js/styles/arta.css +0 -73
- package/node_modules/highlight.js/styles/ascetic.css +0 -45
- package/node_modules/highlight.js/styles/atelier-cave-dark.css +0 -83
- package/node_modules/highlight.js/styles/atelier-cave-light.css +0 -85
- package/node_modules/highlight.js/styles/atelier-dune-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-dune-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-estuary-dark.css +0 -84
- package/node_modules/highlight.js/styles/atelier-estuary-light.css +0 -84
- package/node_modules/highlight.js/styles/atelier-forest-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-forest-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-heath-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-heath-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-lakeside-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-lakeside-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-plateau-dark.css +0 -84
- package/node_modules/highlight.js/styles/atelier-plateau-light.css +0 -84
- package/node_modules/highlight.js/styles/atelier-savanna-dark.css +0 -84
- package/node_modules/highlight.js/styles/atelier-savanna-light.css +0 -84
- package/node_modules/highlight.js/styles/atelier-seaside-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-seaside-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-sulphurpool-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-sulphurpool-light.css +0 -69
- package/node_modules/highlight.js/styles/atom-one-dark-reasonable.css +0 -75
- package/node_modules/highlight.js/styles/atom-one-dark.css +0 -96
- package/node_modules/highlight.js/styles/atom-one-light.css +0 -96
- package/node_modules/highlight.js/styles/brown-paper.css +0 -64
- package/node_modules/highlight.js/styles/brown-papersq.png +0 -0
- package/node_modules/highlight.js/styles/codepen-embed.css +0 -60
- package/node_modules/highlight.js/styles/color-brewer.css +0 -71
- package/node_modules/highlight.js/styles/darcula.css +0 -74
- package/node_modules/highlight.js/styles/dark.css +0 -63
- package/node_modules/highlight.js/styles/default.css +0 -99
- package/node_modules/highlight.js/styles/docco.css +0 -97
- package/node_modules/highlight.js/styles/dracula.css +0 -76
- package/node_modules/highlight.js/styles/far.css +0 -71
- package/node_modules/highlight.js/styles/foundation.css +0 -89
- package/node_modules/highlight.js/styles/github-gist.css +0 -79
- package/node_modules/highlight.js/styles/github.css +0 -99
- package/node_modules/highlight.js/styles/gml.css +0 -78
- package/node_modules/highlight.js/styles/googlecode.css +0 -89
- package/node_modules/highlight.js/styles/gradient-dark.css +0 -122
- package/node_modules/highlight.js/styles/gradient-light.css +0 -130
- package/node_modules/highlight.js/styles/grayscale.css +0 -101
- package/node_modules/highlight.js/styles/gruvbox-dark.css +0 -108
- package/node_modules/highlight.js/styles/gruvbox-light.css +0 -108
- package/node_modules/highlight.js/styles/hopscotch.css +0 -84
- package/node_modules/highlight.js/styles/hybrid.css +0 -102
- package/node_modules/highlight.js/styles/idea.css +0 -97
- package/node_modules/highlight.js/styles/ir-black.css +0 -73
- package/node_modules/highlight.js/styles/isbl-editor-dark.css +0 -112
- package/node_modules/highlight.js/styles/isbl-editor-light.css +0 -111
- package/node_modules/highlight.js/styles/kimbie.dark.css +0 -74
- package/node_modules/highlight.js/styles/kimbie.light.css +0 -74
- package/node_modules/highlight.js/styles/lightfair.css +0 -88
- package/node_modules/highlight.js/styles/lioshi.css +0 -88
- package/node_modules/highlight.js/styles/magula.css +0 -70
- package/node_modules/highlight.js/styles/mono-blue.css +0 -56
- package/node_modules/highlight.js/styles/monokai-sublime.css +0 -83
- package/node_modules/highlight.js/styles/monokai.css +0 -71
- package/node_modules/highlight.js/styles/night-owl.css +0 -182
- package/node_modules/highlight.js/styles/nnfx-dark.css +0 -106
- package/node_modules/highlight.js/styles/nnfx.css +0 -106
- package/node_modules/highlight.js/styles/nord.css +0 -309
- package/node_modules/highlight.js/styles/obsidian.css +0 -88
- package/node_modules/highlight.js/styles/ocean.css +0 -74
- package/node_modules/highlight.js/styles/paraiso-dark.css +0 -72
- package/node_modules/highlight.js/styles/paraiso-light.css +0 -72
- package/node_modules/highlight.js/styles/pojoaque.css +0 -83
- package/node_modules/highlight.js/styles/pojoaque.jpg +0 -0
- package/node_modules/highlight.js/styles/purebasic.css +0 -96
- package/node_modules/highlight.js/styles/qtcreator_dark.css +0 -83
- package/node_modules/highlight.js/styles/qtcreator_light.css +0 -83
- package/node_modules/highlight.js/styles/railscasts.css +0 -106
- package/node_modules/highlight.js/styles/rainbow.css +0 -85
- package/node_modules/highlight.js/styles/routeros.css +0 -108
- package/node_modules/highlight.js/styles/school-book.css +0 -69
- package/node_modules/highlight.js/styles/school-book.png +0 -0
- package/node_modules/highlight.js/styles/shades-of-purple.css +0 -96
- package/node_modules/highlight.js/styles/solarized-dark.css +0 -84
- package/node_modules/highlight.js/styles/solarized-light.css +0 -84
- package/node_modules/highlight.js/styles/srcery.css +0 -78
- package/node_modules/highlight.js/styles/stackoverflow-dark.css +0 -78
- package/node_modules/highlight.js/styles/stackoverflow-light.css +0 -78
- package/node_modules/highlight.js/styles/sunburst.css +0 -102
- package/node_modules/highlight.js/styles/tomorrow-night-blue.css +0 -75
- package/node_modules/highlight.js/styles/tomorrow-night-bright.css +0 -74
- package/node_modules/highlight.js/styles/tomorrow-night-eighties.css +0 -74
- package/node_modules/highlight.js/styles/tomorrow-night.css +0 -75
- package/node_modules/highlight.js/styles/tomorrow.css +0 -72
- package/node_modules/highlight.js/styles/vs.css +0 -68
- package/node_modules/highlight.js/styles/vs2015.css +0 -115
- package/node_modules/highlight.js/styles/xcode.css +0 -104
- package/node_modules/highlight.js/styles/xt256.css +0 -92
- package/node_modules/highlight.js/styles/zenburn.css +0 -80
- package/node_modules/highlight.js/types/index.d.ts +0 -261
- package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/mz/HISTORY.md +0 -66
- package/node_modules/mz/LICENSE +0 -22
- package/node_modules/mz/README.md +0 -106
- package/node_modules/mz/child_process.js +0 -8
- package/node_modules/mz/crypto.js +0 -9
- package/node_modules/mz/dns.js +0 -16
- package/node_modules/mz/fs.js +0 -62
- package/node_modules/mz/index.js +0 -8
- package/node_modules/mz/package.json +0 -44
- package/node_modules/mz/readline.js +0 -64
- package/node_modules/mz/zlib.js +0 -13
- package/node_modules/object-assign/index.js +0 -90
- package/node_modules/object-assign/license +0 -21
- package/node_modules/object-assign/package.json +0 -42
- package/node_modules/object-assign/readme.md +0 -61
- package/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -222
- package/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5/lib/tree-adapters/default.js +0 -217
- package/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/README.md +0 -34
- package/node_modules/parse5-htmlparser2-tree-adapter/lib/index.js +0 -348
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -223
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tree-adapters/default.js +0 -221
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/package.json +0 -27
- package/node_modules/proper-lockfile/CHANGELOG.md +0 -108
- package/node_modules/require-directory/.jshintrc +0 -67
- package/node_modules/require-directory/.npmignore +0 -1
- package/node_modules/require-directory/.travis.yml +0 -3
- package/node_modules/require-directory/LICENSE +0 -22
- package/node_modules/require-directory/README.markdown +0 -184
- package/node_modules/require-directory/index.js +0 -86
- package/node_modules/require-directory/package.json +0 -40
- package/node_modules/source-map/CHANGELOG.md +0 -301
- package/node_modules/string-width/index.d.ts +0 -29
- package/node_modules/string-width/index.js +0 -47
- package/node_modules/string-width/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/string-width/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/string-width/node_modules/ansi-regex/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/string-width/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/string-width/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/string-width/node_modules/strip-ansi/license +0 -9
- package/node_modules/string-width/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/string-width/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/string-width/package.json +0 -56
- package/node_modules/string-width/readme.md +0 -50
- package/node_modules/supports-color/browser.js +0 -5
- package/node_modules/supports-color/index.js +0 -135
- package/node_modules/supports-color/license +0 -9
- package/node_modules/supports-color/package.json +0 -53
- package/node_modules/supports-color/readme.md +0 -76
- package/node_modules/thenify/History.md +0 -11
- package/node_modules/thenify/LICENSE +0 -22
- package/node_modules/thenify/README.md +0 -120
- package/node_modules/thenify/index.js +0 -77
- package/node_modules/thenify/package.json +0 -31
- package/node_modules/thenify-all/History.md +0 -11
- package/node_modules/thenify-all/LICENSE +0 -22
- package/node_modules/thenify-all/README.md +0 -66
- package/node_modules/thenify-all/index.js +0 -73
- package/node_modules/thenify-all/package.json +0 -34
- package/node_modules/wrap-ansi/index.js +0 -216
- package/node_modules/wrap-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/wrap-ansi/package.json +0 -62
- package/node_modules/wrap-ansi/readme.md +0 -91
- package/node_modules/y18n/CHANGELOG.md +0 -100
- package/node_modules/y18n/LICENSE +0 -13
- package/node_modules/y18n/README.md +0 -127
- package/node_modules/y18n/build/index.cjs +0 -203
- package/node_modules/y18n/build/lib/cjs.js +0 -6
- package/node_modules/y18n/build/lib/index.js +0 -174
- package/node_modules/y18n/build/lib/platform-shims/node.js +0 -19
- package/node_modules/y18n/index.mjs +0 -8
- package/node_modules/y18n/package.json +0 -70
- package/node_modules/yargs/CHANGELOG.md +0 -88
- package/node_modules/yargs/LICENSE +0 -21
- package/node_modules/yargs/README.md +0 -202
- package/node_modules/yargs/browser.mjs +0 -7
- package/node_modules/yargs/build/index.cjs +0 -2920
- package/node_modules/yargs/build/lib/argsert.js +0 -62
- package/node_modules/yargs/build/lib/command.js +0 -382
- package/node_modules/yargs/build/lib/completion-templates.js +0 -47
- package/node_modules/yargs/build/lib/completion.js +0 -128
- package/node_modules/yargs/build/lib/middleware.js +0 -53
- package/node_modules/yargs/build/lib/parse-command.js +0 -32
- package/node_modules/yargs/build/lib/typings/common-types.js +0 -9
- package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +0 -1
- package/node_modules/yargs/build/lib/usage.js +0 -548
- package/node_modules/yargs/build/lib/utils/apply-extends.js +0 -59
- package/node_modules/yargs/build/lib/utils/is-promise.js +0 -5
- package/node_modules/yargs/build/lib/utils/levenshtein.js +0 -26
- package/node_modules/yargs/build/lib/utils/obj-filter.js +0 -10
- package/node_modules/yargs/build/lib/utils/process-argv.js +0 -17
- package/node_modules/yargs/build/lib/utils/set-blocking.js +0 -12
- package/node_modules/yargs/build/lib/utils/which-module.js +0 -10
- package/node_modules/yargs/build/lib/validation.js +0 -308
- package/node_modules/yargs/build/lib/yargs-factory.js +0 -1143
- package/node_modules/yargs/build/lib/yerror.js +0 -7
- package/node_modules/yargs/helpers/helpers.mjs +0 -10
- package/node_modules/yargs/helpers/index.js +0 -14
- package/node_modules/yargs/helpers/package.json +0 -3
- package/node_modules/yargs/index.cjs +0 -39
- package/node_modules/yargs/index.mjs +0 -8
- package/node_modules/yargs/lib/platform-shims/browser.mjs +0 -92
- package/node_modules/yargs/lib/platform-shims/esm.mjs +0 -67
- package/node_modules/yargs/locales/be.json +0 -46
- package/node_modules/yargs/locales/de.json +0 -46
- package/node_modules/yargs/locales/en.json +0 -51
- package/node_modules/yargs/locales/es.json +0 -46
- package/node_modules/yargs/locales/fi.json +0 -49
- package/node_modules/yargs/locales/fr.json +0 -53
- package/node_modules/yargs/locales/hi.json +0 -49
- package/node_modules/yargs/locales/hu.json +0 -46
- package/node_modules/yargs/locales/id.json +0 -50
- package/node_modules/yargs/locales/it.json +0 -46
- package/node_modules/yargs/locales/ja.json +0 -51
- package/node_modules/yargs/locales/ko.json +0 -49
- package/node_modules/yargs/locales/nb.json +0 -44
- package/node_modules/yargs/locales/nl.json +0 -49
- package/node_modules/yargs/locales/nn.json +0 -44
- package/node_modules/yargs/locales/pirate.json +0 -13
- package/node_modules/yargs/locales/pl.json +0 -49
- package/node_modules/yargs/locales/pt.json +0 -45
- package/node_modules/yargs/locales/pt_BR.json +0 -48
- package/node_modules/yargs/locales/ru.json +0 -46
- package/node_modules/yargs/locales/th.json +0 -46
- package/node_modules/yargs/locales/tr.json +0 -48
- package/node_modules/yargs/locales/zh_CN.json +0 -48
- package/node_modules/yargs/locales/zh_TW.json +0 -47
- package/node_modules/yargs/package.json +0 -122
- package/node_modules/yargs/yargs +0 -9
- package/node_modules/yargs-parser/CHANGELOG.md +0 -263
- package/node_modules/yargs-parser/LICENSE.txt +0 -14
- package/node_modules/yargs-parser/README.md +0 -518
- package/node_modules/yargs-parser/browser.js +0 -29
- package/node_modules/yargs-parser/build/index.cjs +0 -1042
- package/node_modules/yargs-parser/build/lib/index.js +0 -59
- package/node_modules/yargs-parser/build/lib/string-utils.js +0 -65
- package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -40
- package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -12
- package/node_modules/yargs-parser/build/lib/yargs-parser.js +0 -1037
- package/node_modules/yargs-parser/package.json +0 -87
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
visibleWidth as nativeVisibleWidth,
|
|
3
|
+
wrapTextWithAnsi as nativeWrapTextWithAnsi,
|
|
4
|
+
truncateToWidth as nativeTruncateToWidth,
|
|
5
|
+
sliceWithWidth as nativeSliceWithWidth,
|
|
6
|
+
extractSegments as nativeExtractSegments,
|
|
7
|
+
EllipsisKind,
|
|
8
|
+
} from "@gsd/native/text";
|
|
2
9
|
|
|
3
10
|
// Grapheme segmenter (shared instance)
|
|
4
11
|
const segmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
@@ -10,144 +17,20 @@ export function getSegmenter(): Intl.Segmenter {
|
|
|
10
17
|
return segmenter;
|
|
11
18
|
}
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
* Check if a grapheme cluster (after segmentation) could possibly be an RGI emoji.
|
|
15
|
-
* This is a fast heuristic to avoid the expensive rgiEmojiRegex test.
|
|
16
|
-
* The tested Unicode blocks are deliberately broad to account for future
|
|
17
|
-
* Unicode additions.
|
|
18
|
-
*/
|
|
19
|
-
function couldBeEmoji(segment: string): boolean {
|
|
20
|
-
const cp = segment.codePointAt(0)!;
|
|
21
|
-
return (
|
|
22
|
-
(cp >= 0x1f000 && cp <= 0x1fbff) || // Emoji and Pictograph
|
|
23
|
-
(cp >= 0x2300 && cp <= 0x23ff) || // Misc technical
|
|
24
|
-
(cp >= 0x2600 && cp <= 0x27bf) || // Misc symbols, dingbats
|
|
25
|
-
(cp >= 0x2b50 && cp <= 0x2b55) || // Specific stars/circles
|
|
26
|
-
segment.includes("\uFE0F") || // Contains VS16 (emoji presentation selector)
|
|
27
|
-
segment.length > 2 // Multi-codepoint sequences (ZWJ, skin tones, etc.)
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Regexes for character classification (same as string-width library)
|
|
32
|
-
const zeroWidthRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Mark}|\p{Surrogate})+$/v;
|
|
33
|
-
const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v;
|
|
34
|
-
const rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
|
|
35
|
-
|
|
36
|
-
// Cache for non-ASCII strings
|
|
37
|
-
const WIDTH_CACHE_SIZE = 512;
|
|
38
|
-
const widthCache = new Map<string, number>();
|
|
20
|
+
const PUNCTUATION_REGEX = /[(){}[\]<>.,;:'"!?+\-=*/\\|&%^$#@~`]/;
|
|
39
21
|
|
|
40
22
|
/**
|
|
41
|
-
*
|
|
42
|
-
* Based on code from the string-width library, but includes a possible-emoji
|
|
43
|
-
* check to avoid running the RGI_Emoji regex unnecessarily.
|
|
23
|
+
* Check if a character is whitespace.
|
|
44
24
|
*/
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
if (zeroWidthRegex.test(segment)) {
|
|
48
|
-
return 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Emoji check with pre-filter
|
|
52
|
-
if (couldBeEmoji(segment) && rgiEmojiRegex.test(segment)) {
|
|
53
|
-
return 2;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Get base visible codepoint
|
|
57
|
-
const base = segment.replace(leadingNonPrintingRegex, "");
|
|
58
|
-
const cp = base.codePointAt(0);
|
|
59
|
-
if (cp === undefined) {
|
|
60
|
-
return 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Regional indicator symbols (U+1F1E6..U+1F1FF) are often rendered as
|
|
64
|
-
// full-width emoji in terminals, even when isolated during streaming.
|
|
65
|
-
// Keep width conservative (2) to avoid terminal auto-wrap drift artifacts.
|
|
66
|
-
if (cp >= 0x1f1e6 && cp <= 0x1f1ff) {
|
|
67
|
-
return 2;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
let width = eastAsianWidth(cp);
|
|
71
|
-
|
|
72
|
-
// Trailing halfwidth/fullwidth forms
|
|
73
|
-
if (segment.length > 1) {
|
|
74
|
-
for (const char of segment.slice(1)) {
|
|
75
|
-
const c = char.codePointAt(0)!;
|
|
76
|
-
if (c >= 0xff00 && c <= 0xffef) {
|
|
77
|
-
width += eastAsianWidth(c);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return width;
|
|
25
|
+
export function isWhitespaceChar(char: string): boolean {
|
|
26
|
+
return /\s/.test(char);
|
|
83
27
|
}
|
|
84
28
|
|
|
85
29
|
/**
|
|
86
|
-
*
|
|
30
|
+
* Check if a character is punctuation.
|
|
87
31
|
*/
|
|
88
|
-
export function
|
|
89
|
-
|
|
90
|
-
return 0;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Fast path: pure ASCII printable
|
|
94
|
-
let isPureAscii = true;
|
|
95
|
-
for (let i = 0; i < str.length; i++) {
|
|
96
|
-
const code = str.charCodeAt(i);
|
|
97
|
-
if (code < 0x20 || code > 0x7e) {
|
|
98
|
-
isPureAscii = false;
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (isPureAscii) {
|
|
103
|
-
return str.length;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// Check cache
|
|
107
|
-
const cached = widthCache.get(str);
|
|
108
|
-
if (cached !== undefined) {
|
|
109
|
-
return cached;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Normalize: tabs to 3 spaces, strip ANSI escape codes
|
|
113
|
-
let clean = str;
|
|
114
|
-
if (str.includes("\t")) {
|
|
115
|
-
clean = clean.replace(/\t/g, " ");
|
|
116
|
-
}
|
|
117
|
-
if (clean.includes("\x1b")) {
|
|
118
|
-
// Strip supported ANSI/OSC/APC escape sequences in one pass.
|
|
119
|
-
// This covers CSI styling/cursor codes, OSC hyperlinks and prompt markers,
|
|
120
|
-
// and APC sequences like CURSOR_MARKER.
|
|
121
|
-
let stripped = "";
|
|
122
|
-
let i = 0;
|
|
123
|
-
while (i < clean.length) {
|
|
124
|
-
const ansi = extractAnsiCode(clean, i);
|
|
125
|
-
if (ansi) {
|
|
126
|
-
i += ansi.length;
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
stripped += clean[i];
|
|
130
|
-
i++;
|
|
131
|
-
}
|
|
132
|
-
clean = stripped;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Calculate width
|
|
136
|
-
let width = 0;
|
|
137
|
-
for (const { segment } of segmenter.segment(clean)) {
|
|
138
|
-
width += graphemeWidth(segment);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Cache result
|
|
142
|
-
if (widthCache.size >= WIDTH_CACHE_SIZE) {
|
|
143
|
-
const firstKey = widthCache.keys().next().value;
|
|
144
|
-
if (firstKey !== undefined) {
|
|
145
|
-
widthCache.delete(firstKey);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
widthCache.set(str, width);
|
|
149
|
-
|
|
150
|
-
return width;
|
|
32
|
+
export function isPunctuationChar(char: string): boolean {
|
|
33
|
+
return PUNCTUATION_REGEX.test(char);
|
|
151
34
|
}
|
|
152
35
|
|
|
153
36
|
/**
|
|
@@ -193,495 +76,45 @@ export function extractAnsiCode(str: string, pos: number): { code: string; lengt
|
|
|
193
76
|
return null;
|
|
194
77
|
}
|
|
195
78
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
class AnsiCodeTracker {
|
|
200
|
-
// Track individual attributes separately so we can reset them specifically
|
|
201
|
-
private bold = false;
|
|
202
|
-
private dim = false;
|
|
203
|
-
private italic = false;
|
|
204
|
-
private underline = false;
|
|
205
|
-
private blink = false;
|
|
206
|
-
private inverse = false;
|
|
207
|
-
private hidden = false;
|
|
208
|
-
private strikethrough = false;
|
|
209
|
-
private fgColor: string | null = null; // Stores the full code like "31" or "38;5;240"
|
|
210
|
-
private bgColor: string | null = null; // Stores the full code like "41" or "48;5;240"
|
|
211
|
-
|
|
212
|
-
process(ansiCode: string): void {
|
|
213
|
-
if (!ansiCode.endsWith("m")) {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Extract the parameters between \x1b[ and m
|
|
218
|
-
const match = ansiCode.match(/\x1b\[([\d;]*)m/);
|
|
219
|
-
if (!match) return;
|
|
220
|
-
|
|
221
|
-
const params = match[1];
|
|
222
|
-
if (params === "" || params === "0") {
|
|
223
|
-
// Full reset
|
|
224
|
-
this.reset();
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// Parse parameters (can be semicolon-separated)
|
|
229
|
-
const parts = params.split(";");
|
|
230
|
-
let i = 0;
|
|
231
|
-
while (i < parts.length) {
|
|
232
|
-
const code = Number.parseInt(parts[i], 10);
|
|
233
|
-
|
|
234
|
-
// Handle 256-color and RGB codes which consume multiple parameters
|
|
235
|
-
if (code === 38 || code === 48) {
|
|
236
|
-
// 38;5;N (256 color fg) or 38;2;R;G;B (RGB fg)
|
|
237
|
-
// 48;5;N (256 color bg) or 48;2;R;G;B (RGB bg)
|
|
238
|
-
if (parts[i + 1] === "5" && parts[i + 2] !== undefined) {
|
|
239
|
-
// 256 color: 38;5;N or 48;5;N
|
|
240
|
-
const colorCode = `${parts[i]};${parts[i + 1]};${parts[i + 2]}`;
|
|
241
|
-
if (code === 38) {
|
|
242
|
-
this.fgColor = colorCode;
|
|
243
|
-
} else {
|
|
244
|
-
this.bgColor = colorCode;
|
|
245
|
-
}
|
|
246
|
-
i += 3;
|
|
247
|
-
continue;
|
|
248
|
-
} else if (parts[i + 1] === "2" && parts[i + 4] !== undefined) {
|
|
249
|
-
// RGB color: 38;2;R;G;B or 48;2;R;G;B
|
|
250
|
-
const colorCode = `${parts[i]};${parts[i + 1]};${parts[i + 2]};${parts[i + 3]};${parts[i + 4]}`;
|
|
251
|
-
if (code === 38) {
|
|
252
|
-
this.fgColor = colorCode;
|
|
253
|
-
} else {
|
|
254
|
-
this.bgColor = colorCode;
|
|
255
|
-
}
|
|
256
|
-
i += 5;
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Standard SGR codes
|
|
262
|
-
switch (code) {
|
|
263
|
-
case 0:
|
|
264
|
-
this.reset();
|
|
265
|
-
break;
|
|
266
|
-
case 1:
|
|
267
|
-
this.bold = true;
|
|
268
|
-
break;
|
|
269
|
-
case 2:
|
|
270
|
-
this.dim = true;
|
|
271
|
-
break;
|
|
272
|
-
case 3:
|
|
273
|
-
this.italic = true;
|
|
274
|
-
break;
|
|
275
|
-
case 4:
|
|
276
|
-
this.underline = true;
|
|
277
|
-
break;
|
|
278
|
-
case 5:
|
|
279
|
-
this.blink = true;
|
|
280
|
-
break;
|
|
281
|
-
case 7:
|
|
282
|
-
this.inverse = true;
|
|
283
|
-
break;
|
|
284
|
-
case 8:
|
|
285
|
-
this.hidden = true;
|
|
286
|
-
break;
|
|
287
|
-
case 9:
|
|
288
|
-
this.strikethrough = true;
|
|
289
|
-
break;
|
|
290
|
-
case 21:
|
|
291
|
-
this.bold = false;
|
|
292
|
-
break; // Some terminals
|
|
293
|
-
case 22:
|
|
294
|
-
this.bold = false;
|
|
295
|
-
this.dim = false;
|
|
296
|
-
break;
|
|
297
|
-
case 23:
|
|
298
|
-
this.italic = false;
|
|
299
|
-
break;
|
|
300
|
-
case 24:
|
|
301
|
-
this.underline = false;
|
|
302
|
-
break;
|
|
303
|
-
case 25:
|
|
304
|
-
this.blink = false;
|
|
305
|
-
break;
|
|
306
|
-
case 27:
|
|
307
|
-
this.inverse = false;
|
|
308
|
-
break;
|
|
309
|
-
case 28:
|
|
310
|
-
this.hidden = false;
|
|
311
|
-
break;
|
|
312
|
-
case 29:
|
|
313
|
-
this.strikethrough = false;
|
|
314
|
-
break;
|
|
315
|
-
case 39:
|
|
316
|
-
this.fgColor = null;
|
|
317
|
-
break; // Default fg
|
|
318
|
-
case 49:
|
|
319
|
-
this.bgColor = null;
|
|
320
|
-
break; // Default bg
|
|
321
|
-
default:
|
|
322
|
-
// Standard foreground colors 30-37, 90-97
|
|
323
|
-
if ((code >= 30 && code <= 37) || (code >= 90 && code <= 97)) {
|
|
324
|
-
this.fgColor = String(code);
|
|
325
|
-
}
|
|
326
|
-
// Standard background colors 40-47, 100-107
|
|
327
|
-
else if ((code >= 40 && code <= 47) || (code >= 100 && code <= 107)) {
|
|
328
|
-
this.bgColor = String(code);
|
|
329
|
-
}
|
|
330
|
-
break;
|
|
331
|
-
}
|
|
332
|
-
i++;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
private reset(): void {
|
|
337
|
-
this.bold = false;
|
|
338
|
-
this.dim = false;
|
|
339
|
-
this.italic = false;
|
|
340
|
-
this.underline = false;
|
|
341
|
-
this.blink = false;
|
|
342
|
-
this.inverse = false;
|
|
343
|
-
this.hidden = false;
|
|
344
|
-
this.strikethrough = false;
|
|
345
|
-
this.fgColor = null;
|
|
346
|
-
this.bgColor = null;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/** Clear all state for reuse. */
|
|
350
|
-
clear(): void {
|
|
351
|
-
this.reset();
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
getActiveCodes(): string {
|
|
355
|
-
const codes: string[] = [];
|
|
356
|
-
if (this.bold) codes.push("1");
|
|
357
|
-
if (this.dim) codes.push("2");
|
|
358
|
-
if (this.italic) codes.push("3");
|
|
359
|
-
if (this.underline) codes.push("4");
|
|
360
|
-
if (this.blink) codes.push("5");
|
|
361
|
-
if (this.inverse) codes.push("7");
|
|
362
|
-
if (this.hidden) codes.push("8");
|
|
363
|
-
if (this.strikethrough) codes.push("9");
|
|
364
|
-
if (this.fgColor) codes.push(this.fgColor);
|
|
365
|
-
if (this.bgColor) codes.push(this.bgColor);
|
|
366
|
-
|
|
367
|
-
if (codes.length === 0) return "";
|
|
368
|
-
return `\x1b[${codes.join(";")}m`;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
hasActiveCodes(): boolean {
|
|
372
|
-
return (
|
|
373
|
-
this.bold ||
|
|
374
|
-
this.dim ||
|
|
375
|
-
this.italic ||
|
|
376
|
-
this.underline ||
|
|
377
|
-
this.blink ||
|
|
378
|
-
this.inverse ||
|
|
379
|
-
this.hidden ||
|
|
380
|
-
this.strikethrough ||
|
|
381
|
-
this.fgColor !== null ||
|
|
382
|
-
this.bgColor !== null
|
|
383
|
-
);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Get reset codes for attributes that need to be turned off at line end,
|
|
388
|
-
* specifically underline which bleeds into padding.
|
|
389
|
-
* Returns empty string if no problematic attributes are active.
|
|
390
|
-
*/
|
|
391
|
-
getLineEndReset(): string {
|
|
392
|
-
// Only underline causes visual bleeding into padding
|
|
393
|
-
// Other attributes like colors don't visually bleed to padding
|
|
394
|
-
if (this.underline) {
|
|
395
|
-
return "\x1b[24m"; // Underline off only
|
|
396
|
-
}
|
|
397
|
-
return "";
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
function updateTrackerFromText(text: string, tracker: AnsiCodeTracker): void {
|
|
402
|
-
let i = 0;
|
|
403
|
-
while (i < text.length) {
|
|
404
|
-
const ansiResult = extractAnsiCode(text, i);
|
|
405
|
-
if (ansiResult) {
|
|
406
|
-
tracker.process(ansiResult.code);
|
|
407
|
-
i += ansiResult.length;
|
|
408
|
-
} else {
|
|
409
|
-
i++;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
// Native text module wrappers
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
413
82
|
|
|
414
83
|
/**
|
|
415
|
-
*
|
|
84
|
+
* Calculate the visible width of a string in terminal columns.
|
|
85
|
+
* Delegates to the native Rust implementation.
|
|
416
86
|
*/
|
|
417
|
-
function
|
|
418
|
-
|
|
419
|
-
let current = "";
|
|
420
|
-
let pendingAnsi = ""; // ANSI codes waiting to be attached to next visible content
|
|
421
|
-
let inWhitespace = false;
|
|
422
|
-
let i = 0;
|
|
423
|
-
|
|
424
|
-
while (i < text.length) {
|
|
425
|
-
const ansiResult = extractAnsiCode(text, i);
|
|
426
|
-
if (ansiResult) {
|
|
427
|
-
// Hold ANSI codes separately - they'll be attached to the next visible char
|
|
428
|
-
pendingAnsi += ansiResult.code;
|
|
429
|
-
i += ansiResult.length;
|
|
430
|
-
continue;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
const char = text[i];
|
|
434
|
-
const charIsSpace = char === " ";
|
|
435
|
-
|
|
436
|
-
if (charIsSpace !== inWhitespace && current) {
|
|
437
|
-
// Switching between whitespace and non-whitespace, push current token
|
|
438
|
-
tokens.push(current);
|
|
439
|
-
current = "";
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// Attach any pending ANSI codes to this visible character
|
|
443
|
-
if (pendingAnsi) {
|
|
444
|
-
current += pendingAnsi;
|
|
445
|
-
pendingAnsi = "";
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
inWhitespace = charIsSpace;
|
|
449
|
-
current += char;
|
|
450
|
-
i++;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// Handle any remaining pending ANSI codes (attach to last token)
|
|
454
|
-
if (pendingAnsi) {
|
|
455
|
-
current += pendingAnsi;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
if (current) {
|
|
459
|
-
tokens.push(current);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
return tokens;
|
|
87
|
+
export function visibleWidth(str: string): number {
|
|
88
|
+
return nativeVisibleWidth(str);
|
|
463
89
|
}
|
|
464
90
|
|
|
465
91
|
/**
|
|
466
92
|
* Wrap text with ANSI codes preserved.
|
|
467
|
-
*
|
|
468
|
-
* ONLY does word wrapping - NO padding, NO background colors.
|
|
469
|
-
* Returns lines where each line is <= width visible chars.
|
|
470
|
-
* Active ANSI codes are preserved across line breaks.
|
|
93
|
+
* Delegates to the native Rust implementation.
|
|
471
94
|
*
|
|
472
95
|
* @param text - Text to wrap (may contain ANSI codes and newlines)
|
|
473
96
|
* @param width - Maximum visible width per line
|
|
474
97
|
* @returns Array of wrapped lines (NOT padded to width)
|
|
475
98
|
*/
|
|
476
99
|
export function wrapTextWithAnsi(text: string, width: number): string[] {
|
|
477
|
-
|
|
478
|
-
return [""];
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// Handle newlines by processing each line separately
|
|
482
|
-
// Track ANSI state across lines so styles carry over after literal newlines
|
|
483
|
-
const inputLines = text.split("\n");
|
|
484
|
-
const result: string[] = [];
|
|
485
|
-
const tracker = new AnsiCodeTracker();
|
|
486
|
-
|
|
487
|
-
for (const inputLine of inputLines) {
|
|
488
|
-
// Prepend active ANSI codes from previous lines (except for first line)
|
|
489
|
-
const prefix = result.length > 0 ? tracker.getActiveCodes() : "";
|
|
490
|
-
result.push(...wrapSingleLine(prefix + inputLine, width));
|
|
491
|
-
// Update tracker with codes from this line for next iteration
|
|
492
|
-
updateTrackerFromText(inputLine, tracker);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
return result.length > 0 ? result : [""];
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
function wrapSingleLine(line: string, width: number): string[] {
|
|
499
|
-
if (!line) {
|
|
500
|
-
return [""];
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
const visibleLength = visibleWidth(line);
|
|
504
|
-
if (visibleLength <= width) {
|
|
505
|
-
return [line];
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
const wrapped: string[] = [];
|
|
509
|
-
const tracker = new AnsiCodeTracker();
|
|
510
|
-
const tokens = splitIntoTokensWithAnsi(line);
|
|
511
|
-
|
|
512
|
-
let currentLine = "";
|
|
513
|
-
let currentVisibleLength = 0;
|
|
514
|
-
|
|
515
|
-
for (const token of tokens) {
|
|
516
|
-
const tokenVisibleLength = visibleWidth(token);
|
|
517
|
-
const isWhitespace = token.trim() === "";
|
|
518
|
-
|
|
519
|
-
// Token itself is too long - break it character by character
|
|
520
|
-
if (tokenVisibleLength > width && !isWhitespace) {
|
|
521
|
-
if (currentLine) {
|
|
522
|
-
// Add specific reset for underline only (preserves background)
|
|
523
|
-
const lineEndReset = tracker.getLineEndReset();
|
|
524
|
-
if (lineEndReset) {
|
|
525
|
-
currentLine += lineEndReset;
|
|
526
|
-
}
|
|
527
|
-
wrapped.push(currentLine);
|
|
528
|
-
currentLine = "";
|
|
529
|
-
currentVisibleLength = 0;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
// Break long token - breakLongWord handles its own resets
|
|
533
|
-
const broken = breakLongWord(token, width, tracker);
|
|
534
|
-
wrapped.push(...broken.slice(0, -1));
|
|
535
|
-
currentLine = broken[broken.length - 1];
|
|
536
|
-
currentVisibleLength = visibleWidth(currentLine);
|
|
537
|
-
continue;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
// Check if adding this token would exceed width
|
|
541
|
-
const totalNeeded = currentVisibleLength + tokenVisibleLength;
|
|
542
|
-
|
|
543
|
-
if (totalNeeded > width && currentVisibleLength > 0) {
|
|
544
|
-
// Trim trailing whitespace, then add underline reset (not full reset, to preserve background)
|
|
545
|
-
let lineToWrap = currentLine.trimEnd();
|
|
546
|
-
const lineEndReset = tracker.getLineEndReset();
|
|
547
|
-
if (lineEndReset) {
|
|
548
|
-
lineToWrap += lineEndReset;
|
|
549
|
-
}
|
|
550
|
-
wrapped.push(lineToWrap);
|
|
551
|
-
if (isWhitespace) {
|
|
552
|
-
// Don't start new line with whitespace
|
|
553
|
-
currentLine = tracker.getActiveCodes();
|
|
554
|
-
currentVisibleLength = 0;
|
|
555
|
-
} else {
|
|
556
|
-
currentLine = tracker.getActiveCodes() + token;
|
|
557
|
-
currentVisibleLength = tokenVisibleLength;
|
|
558
|
-
}
|
|
559
|
-
} else {
|
|
560
|
-
// Add to current line
|
|
561
|
-
currentLine += token;
|
|
562
|
-
currentVisibleLength += tokenVisibleLength;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
updateTrackerFromText(token, tracker);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
if (currentLine) {
|
|
569
|
-
// No reset at end of final line - let caller handle it
|
|
570
|
-
wrapped.push(currentLine);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
// Trailing whitespace can cause lines to exceed the requested width
|
|
574
|
-
return wrapped.length > 0 ? wrapped.map((line) => line.trimEnd()) : [""];
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
const PUNCTUATION_REGEX = /[(){}[\]<>.,;:'"!?+\-=*/\\|&%^$#@~`]/;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Check if a character is whitespace.
|
|
581
|
-
*/
|
|
582
|
-
export function isWhitespaceChar(char: string): boolean {
|
|
583
|
-
return /\s/.test(char);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Check if a character is punctuation.
|
|
588
|
-
*/
|
|
589
|
-
export function isPunctuationChar(char: string): boolean {
|
|
590
|
-
return PUNCTUATION_REGEX.test(char);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
function breakLongWord(word: string, width: number, tracker: AnsiCodeTracker): string[] {
|
|
594
|
-
const lines: string[] = [];
|
|
595
|
-
let currentLine = tracker.getActiveCodes();
|
|
596
|
-
let currentWidth = 0;
|
|
597
|
-
|
|
598
|
-
// First, separate ANSI codes from visible content
|
|
599
|
-
// We need to handle ANSI codes specially since they're not graphemes
|
|
600
|
-
let i = 0;
|
|
601
|
-
const segments: Array<{ type: "ansi" | "grapheme"; value: string }> = [];
|
|
602
|
-
|
|
603
|
-
while (i < word.length) {
|
|
604
|
-
const ansiResult = extractAnsiCode(word, i);
|
|
605
|
-
if (ansiResult) {
|
|
606
|
-
segments.push({ type: "ansi", value: ansiResult.code });
|
|
607
|
-
i += ansiResult.length;
|
|
608
|
-
} else {
|
|
609
|
-
// Find the next ANSI code or end of string
|
|
610
|
-
let end = i;
|
|
611
|
-
while (end < word.length) {
|
|
612
|
-
const nextAnsi = extractAnsiCode(word, end);
|
|
613
|
-
if (nextAnsi) break;
|
|
614
|
-
end++;
|
|
615
|
-
}
|
|
616
|
-
// Segment this non-ANSI portion into graphemes
|
|
617
|
-
const textPortion = word.slice(i, end);
|
|
618
|
-
for (const seg of segmenter.segment(textPortion)) {
|
|
619
|
-
segments.push({ type: "grapheme", value: seg.segment });
|
|
620
|
-
}
|
|
621
|
-
i = end;
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
// Now process segments
|
|
626
|
-
for (const seg of segments) {
|
|
627
|
-
if (seg.type === "ansi") {
|
|
628
|
-
currentLine += seg.value;
|
|
629
|
-
tracker.process(seg.value);
|
|
630
|
-
continue;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
const grapheme = seg.value;
|
|
634
|
-
// Skip empty graphemes to avoid issues with string-width calculation
|
|
635
|
-
if (!grapheme) continue;
|
|
636
|
-
|
|
637
|
-
const graphemeWidth = visibleWidth(grapheme);
|
|
638
|
-
|
|
639
|
-
if (currentWidth + graphemeWidth > width) {
|
|
640
|
-
// Add specific reset for underline only (preserves background)
|
|
641
|
-
const lineEndReset = tracker.getLineEndReset();
|
|
642
|
-
if (lineEndReset) {
|
|
643
|
-
currentLine += lineEndReset;
|
|
644
|
-
}
|
|
645
|
-
lines.push(currentLine);
|
|
646
|
-
currentLine = tracker.getActiveCodes();
|
|
647
|
-
currentWidth = 0;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
currentLine += grapheme;
|
|
651
|
-
currentWidth += graphemeWidth;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
if (currentLine) {
|
|
655
|
-
// No reset at end of final segment - caller handles continuation
|
|
656
|
-
lines.push(currentLine);
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
return lines.length > 0 ? lines : [""];
|
|
100
|
+
return nativeWrapTextWithAnsi(text, width);
|
|
660
101
|
}
|
|
661
102
|
|
|
662
103
|
/**
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
* @param line - Line of text (may contain ANSI codes)
|
|
666
|
-
* @param width - Total width to pad to
|
|
667
|
-
* @param bgFn - Background color function
|
|
668
|
-
* @returns Line with background applied and padded to width
|
|
104
|
+
* Map an ellipsis string to the native EllipsisKind enum value.
|
|
669
105
|
*/
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
// Apply background to content + padding
|
|
677
|
-
const withPadding = line + padding;
|
|
678
|
-
return bgFn(withPadding);
|
|
106
|
+
function ellipsisStringToKind(ellipsis: string): number {
|
|
107
|
+
if (ellipsis === "\u2026") return EllipsisKind.Unicode;
|
|
108
|
+
if (ellipsis === "..." || ellipsis === undefined) return EllipsisKind.Ascii;
|
|
109
|
+
if (ellipsis === "") return EllipsisKind.None;
|
|
110
|
+
// Default: "..." maps to Ascii
|
|
111
|
+
return EllipsisKind.Ascii;
|
|
679
112
|
}
|
|
680
113
|
|
|
681
114
|
/**
|
|
682
115
|
* Truncate text to fit within a maximum visible width, adding ellipsis if needed.
|
|
683
116
|
* Optionally pad with spaces to reach exactly maxWidth.
|
|
684
|
-
*
|
|
117
|
+
* Delegates to the native Rust implementation.
|
|
685
118
|
*
|
|
686
119
|
* @param text - Text to truncate (may contain ANSI codes)
|
|
687
120
|
* @param maxWidth - Maximum visible width
|
|
@@ -695,76 +128,7 @@ export function truncateToWidth(
|
|
|
695
128
|
ellipsis: string = "...",
|
|
696
129
|
pad: boolean = false,
|
|
697
130
|
): string {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
if (textVisibleWidth <= maxWidth) {
|
|
701
|
-
return pad ? text + " ".repeat(maxWidth - textVisibleWidth) : text;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
const ellipsisWidth = visibleWidth(ellipsis);
|
|
705
|
-
const targetWidth = maxWidth - ellipsisWidth;
|
|
706
|
-
|
|
707
|
-
if (targetWidth <= 0) {
|
|
708
|
-
return ellipsis.substring(0, maxWidth);
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
// Separate ANSI codes from visible content using grapheme segmentation
|
|
712
|
-
let i = 0;
|
|
713
|
-
const segments: Array<{ type: "ansi" | "grapheme"; value: string }> = [];
|
|
714
|
-
|
|
715
|
-
while (i < text.length) {
|
|
716
|
-
const ansiResult = extractAnsiCode(text, i);
|
|
717
|
-
if (ansiResult) {
|
|
718
|
-
segments.push({ type: "ansi", value: ansiResult.code });
|
|
719
|
-
i += ansiResult.length;
|
|
720
|
-
} else {
|
|
721
|
-
// Find the next ANSI code or end of string
|
|
722
|
-
let end = i;
|
|
723
|
-
while (end < text.length) {
|
|
724
|
-
const nextAnsi = extractAnsiCode(text, end);
|
|
725
|
-
if (nextAnsi) break;
|
|
726
|
-
end++;
|
|
727
|
-
}
|
|
728
|
-
// Segment this non-ANSI portion into graphemes
|
|
729
|
-
const textPortion = text.slice(i, end);
|
|
730
|
-
for (const seg of segmenter.segment(textPortion)) {
|
|
731
|
-
segments.push({ type: "grapheme", value: seg.segment });
|
|
732
|
-
}
|
|
733
|
-
i = end;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
// Build truncated string from segments
|
|
738
|
-
let result = "";
|
|
739
|
-
let currentWidth = 0;
|
|
740
|
-
|
|
741
|
-
for (const seg of segments) {
|
|
742
|
-
if (seg.type === "ansi") {
|
|
743
|
-
result += seg.value;
|
|
744
|
-
continue;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
const grapheme = seg.value;
|
|
748
|
-
// Skip empty graphemes to avoid issues with string-width calculation
|
|
749
|
-
if (!grapheme) continue;
|
|
750
|
-
|
|
751
|
-
const graphemeWidth = visibleWidth(grapheme);
|
|
752
|
-
|
|
753
|
-
if (currentWidth + graphemeWidth > targetWidth) {
|
|
754
|
-
break;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
result += grapheme;
|
|
758
|
-
currentWidth += graphemeWidth;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
// Add reset code before ellipsis to prevent styling leaking into it
|
|
762
|
-
const truncated = `${result}\x1b[0m${ellipsis}`;
|
|
763
|
-
if (pad) {
|
|
764
|
-
const truncatedWidth = visibleWidth(truncated);
|
|
765
|
-
return truncated + " ".repeat(Math.max(0, maxWidth - truncatedWidth));
|
|
766
|
-
}
|
|
767
|
-
return truncated;
|
|
131
|
+
return nativeTruncateToWidth(text, maxWidth, ellipsisStringToKind(ellipsis), pad);
|
|
768
132
|
}
|
|
769
133
|
|
|
770
134
|
/**
|
|
@@ -782,54 +146,12 @@ export function sliceWithWidth(
|
|
|
782
146
|
length: number,
|
|
783
147
|
strict = false,
|
|
784
148
|
): { text: string; width: number } {
|
|
785
|
-
|
|
786
|
-
const endCol = startCol + length;
|
|
787
|
-
let result = "",
|
|
788
|
-
resultWidth = 0,
|
|
789
|
-
currentCol = 0,
|
|
790
|
-
i = 0,
|
|
791
|
-
pendingAnsi = "";
|
|
792
|
-
|
|
793
|
-
while (i < line.length) {
|
|
794
|
-
const ansi = extractAnsiCode(line, i);
|
|
795
|
-
if (ansi) {
|
|
796
|
-
if (currentCol >= startCol && currentCol < endCol) result += ansi.code;
|
|
797
|
-
else if (currentCol < startCol) pendingAnsi += ansi.code;
|
|
798
|
-
i += ansi.length;
|
|
799
|
-
continue;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
let textEnd = i;
|
|
803
|
-
while (textEnd < line.length && !extractAnsiCode(line, textEnd)) textEnd++;
|
|
804
|
-
|
|
805
|
-
for (const { segment } of segmenter.segment(line.slice(i, textEnd))) {
|
|
806
|
-
const w = graphemeWidth(segment);
|
|
807
|
-
const inRange = currentCol >= startCol && currentCol < endCol;
|
|
808
|
-
const fits = !strict || currentCol + w <= endCol;
|
|
809
|
-
if (inRange && fits) {
|
|
810
|
-
if (pendingAnsi) {
|
|
811
|
-
result += pendingAnsi;
|
|
812
|
-
pendingAnsi = "";
|
|
813
|
-
}
|
|
814
|
-
result += segment;
|
|
815
|
-
resultWidth += w;
|
|
816
|
-
}
|
|
817
|
-
currentCol += w;
|
|
818
|
-
if (currentCol >= endCol) break;
|
|
819
|
-
}
|
|
820
|
-
i = textEnd;
|
|
821
|
-
if (currentCol >= endCol) break;
|
|
822
|
-
}
|
|
823
|
-
return { text: result, width: resultWidth };
|
|
149
|
+
return nativeSliceWithWidth(line, startCol, length, strict);
|
|
824
150
|
}
|
|
825
151
|
|
|
826
|
-
// Pooled tracker instance for extractSegments (avoids allocation per call)
|
|
827
|
-
const pooledStyleTracker = new AnsiCodeTracker();
|
|
828
|
-
|
|
829
152
|
/**
|
|
830
153
|
* Extract "before" and "after" segments from a line in a single pass.
|
|
831
|
-
*
|
|
832
|
-
* Preserves styling from before the overlay that should affect content after it.
|
|
154
|
+
* Delegates to the native Rust implementation.
|
|
833
155
|
*/
|
|
834
156
|
export function extractSegments(
|
|
835
157
|
line: string,
|
|
@@ -838,68 +160,22 @@ export function extractSegments(
|
|
|
838
160
|
afterLen: number,
|
|
839
161
|
strictAfter = false,
|
|
840
162
|
): { before: string; beforeWidth: number; after: string; afterWidth: number } {
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
after = "",
|
|
844
|
-
afterWidth = 0;
|
|
845
|
-
let currentCol = 0,
|
|
846
|
-
i = 0;
|
|
847
|
-
let pendingAnsiBefore = "";
|
|
848
|
-
let afterStarted = false;
|
|
849
|
-
const afterEnd = afterStart + afterLen;
|
|
850
|
-
|
|
851
|
-
// Track styling state so "after" inherits styling from before the overlay
|
|
852
|
-
pooledStyleTracker.clear();
|
|
853
|
-
|
|
854
|
-
while (i < line.length) {
|
|
855
|
-
const ansi = extractAnsiCode(line, i);
|
|
856
|
-
if (ansi) {
|
|
857
|
-
// Track all SGR codes to know styling state at afterStart
|
|
858
|
-
pooledStyleTracker.process(ansi.code);
|
|
859
|
-
// Include ANSI codes in their respective segments
|
|
860
|
-
if (currentCol < beforeEnd) {
|
|
861
|
-
pendingAnsiBefore += ansi.code;
|
|
862
|
-
} else if (currentCol >= afterStart && currentCol < afterEnd && afterStarted) {
|
|
863
|
-
// Only include after we've started "after" (styling already prepended)
|
|
864
|
-
after += ansi.code;
|
|
865
|
-
}
|
|
866
|
-
i += ansi.length;
|
|
867
|
-
continue;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
let textEnd = i;
|
|
871
|
-
while (textEnd < line.length && !extractAnsiCode(line, textEnd)) textEnd++;
|
|
872
|
-
|
|
873
|
-
for (const { segment } of segmenter.segment(line.slice(i, textEnd))) {
|
|
874
|
-
const w = graphemeWidth(segment);
|
|
875
|
-
|
|
876
|
-
if (currentCol < beforeEnd) {
|
|
877
|
-
if (pendingAnsiBefore) {
|
|
878
|
-
before += pendingAnsiBefore;
|
|
879
|
-
pendingAnsiBefore = "";
|
|
880
|
-
}
|
|
881
|
-
before += segment;
|
|
882
|
-
beforeWidth += w;
|
|
883
|
-
} else if (currentCol >= afterStart && currentCol < afterEnd) {
|
|
884
|
-
const fits = !strictAfter || currentCol + w <= afterEnd;
|
|
885
|
-
if (fits) {
|
|
886
|
-
// On first "after" grapheme, prepend inherited styling from before overlay
|
|
887
|
-
if (!afterStarted) {
|
|
888
|
-
after += pooledStyleTracker.getActiveCodes();
|
|
889
|
-
afterStarted = true;
|
|
890
|
-
}
|
|
891
|
-
after += segment;
|
|
892
|
-
afterWidth += w;
|
|
893
|
-
}
|
|
894
|
-
}
|
|
163
|
+
return nativeExtractSegments(line, beforeEnd, afterStart, afterLen, strictAfter);
|
|
164
|
+
}
|
|
895
165
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Apply background color to a line, padding to full width.
|
|
168
|
+
*
|
|
169
|
+
* @param line - Line of text (may contain ANSI codes)
|
|
170
|
+
* @param width - Total width to pad to
|
|
171
|
+
* @param bgFn - Background color function
|
|
172
|
+
* @returns Line with background applied and padded to width
|
|
173
|
+
*/
|
|
174
|
+
export function applyBackgroundToLine(line: string, width: number, bgFn: (text: string) => string): string {
|
|
175
|
+
const visibleLen = visibleWidth(line);
|
|
176
|
+
const paddingNeeded = Math.max(0, width - visibleLen);
|
|
177
|
+
const padding = " ".repeat(paddingNeeded);
|
|
903
178
|
|
|
904
|
-
|
|
179
|
+
const withPadding = line + padding;
|
|
180
|
+
return bgFn(withPadding);
|
|
905
181
|
}
|