@rse/ink-editor 0.0.0-stage → 0.9.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/.claude/CLAUDE.md +1 -0
- package/AGENTS.md +99 -0
- package/CHANGELOG.md +9 -0
- package/README.md +116 -2
- package/dst-stage1/ink-editor-cli.d.ts +2 -0
- package/dst-stage1/ink-editor-cli.js +174 -0
- package/dst-stage1/ink-editor-engine-emacs.d.ts +103 -0
- package/dst-stage1/ink-editor-engine-emacs.js +1530 -0
- package/dst-stage1/ink-editor-engine-nano.d.ts +78 -0
- package/dst-stage1/ink-editor-engine-nano.js +884 -0
- package/dst-stage1/ink-editor-engine-vim.d.ts +124 -0
- package/dst-stage1/ink-editor-engine-vim.js +2220 -0
- package/dst-stage1/ink-editor-engine-vscode.d.ts +79 -0
- package/dst-stage1/ink-editor-engine-vscode.js +850 -0
- package/dst-stage1/ink-editor-mode-emacs.d.ts +12 -0
- package/dst-stage1/ink-editor-mode-emacs.js +143 -0
- package/dst-stage1/ink-editor-mode-nano.d.ts +12 -0
- package/dst-stage1/ink-editor-mode-nano.js +140 -0
- package/dst-stage1/ink-editor-mode-vim.d.ts +12 -0
- package/dst-stage1/ink-editor-mode-vim.js +230 -0
- package/dst-stage1/ink-editor-mode-vscode.d.ts +12 -0
- package/dst-stage1/ink-editor-mode-vscode.js +133 -0
- package/dst-stage1/ink-editor-mode.d.ts +72 -0
- package/dst-stage1/ink-editor-mode.js +24 -0
- package/dst-stage1/ink-editor-syntax.d.ts +14 -0
- package/dst-stage1/ink-editor-syntax.js +149 -0
- package/dst-stage1/ink-editor-text.d.ts +38 -0
- package/dst-stage1/ink-editor-text.js +177 -0
- package/dst-stage1/ink-editor-widget.d.ts +15 -0
- package/dst-stage1/ink-editor-widget.js +132 -0
- package/dst-stage1/ink-editor.d.ts +13 -0
- package/dst-stage1/ink-editor.js +37 -0
- package/dst-stage1/tsc.tsbuildinfo +1 -0
- package/dst-stage2/ink-editor-cli.esm.js +177 -0
- package/dst-stage2/ink-editor.esm.js +5972 -0
- package/etc/c8.json +17 -0
- package/etc/eslint.mts +84 -0
- package/etc/knip.jsonc +51 -0
- package/etc/stx.conf +103 -0
- package/etc/tsc.json +29 -0
- package/etc/vite.mts +79 -0
- package/package.d/@typescript-eslint+typescript-estree+8.74.0.patch +12 -0
- package/package.d/vite+8.4.1.patch +12 -0
- package/package.json +79 -5
- package/src/ink-editor-cli.ts +200 -0
- package/src/ink-editor-engine-emacs.ts +1648 -0
- package/src/ink-editor-engine-nano.ts +978 -0
- package/src/ink-editor-engine-vim.ts +2203 -0
- package/src/ink-editor-engine-vscode.ts +938 -0
- package/src/ink-editor-mode-emacs.ts +137 -0
- package/src/ink-editor-mode-nano.ts +135 -0
- package/src/ink-editor-mode-vim.ts +223 -0
- package/src/ink-editor-mode-vscode.ts +129 -0
- package/src/ink-editor-mode.ts +137 -0
- package/src/ink-editor-syntax.ts +176 -0
- package/src/ink-editor-text.ts +205 -0
- package/src/ink-editor-widget.ts +182 -0
- package/src/ink-editor.ts +48 -0
- package/tst/ink-editor-1-vim.spec.ts +177 -0
- package/tst/ink-editor-2-emacs.spec.ts +211 -0
- package/tst/ink-editor-3-nano.spec.ts +187 -0
- package/tst/ink-editor-4-vscode.spec.ts +187 -0
- package/tst/tsc.json +27 -0
package/etc/c8.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"all": false,
|
|
3
|
+
"reports-dir": "tst/.c8",
|
|
4
|
+
"extension": [ ".ts", ".js" ],
|
|
5
|
+
"src": [ "." ],
|
|
6
|
+
"include": [ "src/ink-editor-engine-*.ts", "src/ink-editor-text.ts" ],
|
|
7
|
+
"exclude": [ "node_modules/**/*" ],
|
|
8
|
+
"exclude-after-remap": true,
|
|
9
|
+
"check-coverage": true,
|
|
10
|
+
"statements": 80,
|
|
11
|
+
"branches": 70,
|
|
12
|
+
"functions": 80,
|
|
13
|
+
"lines": 80,
|
|
14
|
+
"reporter": [ "text", "html" ],
|
|
15
|
+
"clean": true
|
|
16
|
+
}
|
|
17
|
+
|
package/etc/eslint.mts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
** Ink-Editor -- Text Editor with Exchangeable Editing Modes for Ink
|
|
3
|
+
** Copyright (c) 2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
|
+
**
|
|
5
|
+
** Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
** a copy of this software and associated documentation files (the
|
|
7
|
+
** "Software"), to deal in the Software without restriction, including
|
|
8
|
+
** without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
** distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
** permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
** the following conditions:
|
|
12
|
+
**
|
|
13
|
+
** The above copyright notice and this permission notice shall be included
|
|
14
|
+
** in all copies or substantial portions of the Software.
|
|
15
|
+
**
|
|
16
|
+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import globals from "globals"
|
|
26
|
+
import js from "@eslint/js"
|
|
27
|
+
import pluginTS from "typescript-eslint"
|
|
28
|
+
import parserTS from "@typescript-eslint/parser"
|
|
29
|
+
|
|
30
|
+
export default [
|
|
31
|
+
js.configs.recommended,
|
|
32
|
+
...pluginTS.configs.strict,
|
|
33
|
+
...pluginTS.configs.stylistic,
|
|
34
|
+
{
|
|
35
|
+
files: [ "**/*.ts" ],
|
|
36
|
+
languageOptions: {
|
|
37
|
+
ecmaVersion: 2022,
|
|
38
|
+
sourceType: "module",
|
|
39
|
+
parser: parserTS,
|
|
40
|
+
parserOptions: {
|
|
41
|
+
ecmaFeatures: { jsx: false }
|
|
42
|
+
},
|
|
43
|
+
globals: {
|
|
44
|
+
...globals.node
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
rules: {
|
|
48
|
+
"indent": [ "error", 4, { SwitchCase: 1, flatTernaryExpressions: true } ],
|
|
49
|
+
"linebreak-style": [ "error", "unix" ],
|
|
50
|
+
"semi": [ "error", "never" ],
|
|
51
|
+
"operator-linebreak": [ "error", "after", { overrides: { "&&": "before", "||": "before", "?": "before", ":": "before" } } ],
|
|
52
|
+
"brace-style": [ "error", "stroustrup", { allowSingleLine: true } ],
|
|
53
|
+
"quotes": [ "error", "double" ],
|
|
54
|
+
"no-multi-spaces": "off",
|
|
55
|
+
"no-multiple-empty-lines": "off",
|
|
56
|
+
"key-spacing": "off",
|
|
57
|
+
"object-property-newline": "off",
|
|
58
|
+
"curly": "off",
|
|
59
|
+
"space-in-parens": "off",
|
|
60
|
+
"no-console": "off",
|
|
61
|
+
"lines-between-class-members": "off",
|
|
62
|
+
"array-bracket-spacing": "off",
|
|
63
|
+
|
|
64
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
65
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
66
|
+
"@typescript-eslint/no-unused-vars": [ "error", {
|
|
67
|
+
argsIgnorePattern: "^_",
|
|
68
|
+
varsIgnorePattern: "^_",
|
|
69
|
+
caughtErrorsIgnorePattern: "^_"
|
|
70
|
+
} ],
|
|
71
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
72
|
+
"@typescript-eslint/consistent-type-definitions": "off",
|
|
73
|
+
"@typescript-eslint/array-type": "off",
|
|
74
|
+
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
75
|
+
"@typescript-eslint/no-dynamic-delete": "off",
|
|
76
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
77
|
+
"@typescript-eslint/consistent-generic-constructors": "off",
|
|
78
|
+
"@typescript-eslint/no-this-alias": "off",
|
|
79
|
+
"@typescript-eslint/unified-signatures": "off",
|
|
80
|
+
"@typescript-eslint/no-empty-object-type": "off",
|
|
81
|
+
"@typescript-eslint/no-extraneous-class": "off"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
package/etc/knip.jsonc
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
** Ink-Editor -- Text Editor with Exchangeable Editing Modes for Ink
|
|
3
|
+
** Copyright (c) 2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
|
+
**
|
|
5
|
+
** Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
** a copy of this software and associated documentation files (the
|
|
7
|
+
** "Software"), to deal in the Software without restriction, including
|
|
8
|
+
** without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
** distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
** permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
** the following conditions:
|
|
12
|
+
**
|
|
13
|
+
** The above copyright notice and this permission notice shall be included
|
|
14
|
+
** in all copies or substantial portions of the Software.
|
|
15
|
+
**
|
|
16
|
+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
"$schema": "https://unpkg.com/knip@5/schema.json",
|
|
27
|
+
"entry": [
|
|
28
|
+
"src/ink-editor.ts",
|
|
29
|
+
"src/ink-editor-cli.ts",
|
|
30
|
+
"etc/eslint.mts",
|
|
31
|
+
"etc/vite.mts",
|
|
32
|
+
"tst/ink-editor-1-vim.spec.ts",
|
|
33
|
+
"tst/ink-editor-2-emacs.spec.ts",
|
|
34
|
+
"tst/ink-editor-3-nano.spec.ts",
|
|
35
|
+
"tst/ink-editor-4-vscode.spec.ts"
|
|
36
|
+
],
|
|
37
|
+
"project": [
|
|
38
|
+
"src/**/*.ts",
|
|
39
|
+
"tst/**/*.spec.ts"
|
|
40
|
+
],
|
|
41
|
+
"ignoreDependencies": [
|
|
42
|
+
"shx",
|
|
43
|
+
"chokidar-cli",
|
|
44
|
+
"patch-package",
|
|
45
|
+
"c8",
|
|
46
|
+
"source-map-support",
|
|
47
|
+
"open-cli",
|
|
48
|
+
"cross-env"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
|
package/etc/stx.conf
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
##
|
|
2
|
+
## Ink-Editor -- Text Editor with Exchangeable Editing Modes for Ink
|
|
3
|
+
## Copyright (c) 2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
|
+
##
|
|
5
|
+
## Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
## a copy of this software and associated documentation files (the
|
|
7
|
+
## "Software"), to deal in the Software without restriction, including
|
|
8
|
+
## without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
## distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
## permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
## the following conditions:
|
|
12
|
+
##
|
|
13
|
+
## The above copyright notice and this permission notice shall be included
|
|
14
|
+
## in all copies or substantial portions of the Software.
|
|
15
|
+
##
|
|
16
|
+
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
## EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
## MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
## IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
## CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
## TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
## SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
##
|
|
24
|
+
|
|
25
|
+
# make patches
|
|
26
|
+
patch-make
|
|
27
|
+
npm install --package-lock-only --save && \
|
|
28
|
+
cross-env npm_config_allow_remote=all \
|
|
29
|
+
patch-package --patch-dir package.d \
|
|
30
|
+
"vite" "@typescript-eslint/typescript-estree" && \
|
|
31
|
+
shx rm -f package-lock.json
|
|
32
|
+
|
|
33
|
+
# (internal) apply patches
|
|
34
|
+
patch-apply
|
|
35
|
+
patch-package --patch-dir package.d
|
|
36
|
+
|
|
37
|
+
# static code analysis (linting)
|
|
38
|
+
lint
|
|
39
|
+
tsc --project etc/tsc.json --noEmit && \
|
|
40
|
+
eslint --config etc/eslint.mts src/*.ts && \
|
|
41
|
+
npx knip -n -c etc/knip.jsonc
|
|
42
|
+
|
|
43
|
+
# code compilation/transpiling (building)
|
|
44
|
+
build : lint
|
|
45
|
+
shx rm -rf dst-stage2 && \
|
|
46
|
+
vite --config etc/vite.mts build --mode production
|
|
47
|
+
|
|
48
|
+
# code compilation/transpiling (building, development)
|
|
49
|
+
build-dev : lint
|
|
50
|
+
shx rm -rf dst-stage2 && \
|
|
51
|
+
vite --config etc/vite.mts build --mode development
|
|
52
|
+
|
|
53
|
+
# development loop
|
|
54
|
+
dev
|
|
55
|
+
chokidar \
|
|
56
|
+
"etc/*" "src/*.ts" "tst/*.ts" \
|
|
57
|
+
-c "npm start build-dev" \
|
|
58
|
+
--debounce 1000 --throttle 1000 \
|
|
59
|
+
--initial --verbose
|
|
60
|
+
|
|
61
|
+
# run test suite
|
|
62
|
+
test
|
|
63
|
+
tsc --project tst/tsc.json --noEmit && \
|
|
64
|
+
eslint --config etc/eslint.mts tst/*.spec.ts && \
|
|
65
|
+
cross-env TSX_TSCONFIG_PATH="tst/tsc.json" \
|
|
66
|
+
NODE_OPTIONS="--import=tsx --trace-warnings -r source-map-support/register" \
|
|
67
|
+
mocha tst/*.spec.ts
|
|
68
|
+
test-cov
|
|
69
|
+
tsc --project tst/tsc.json --noEmit && \
|
|
70
|
+
eslint --config etc/eslint.mts tst/*.spec.ts && \
|
|
71
|
+
cross-env TSX_TSCONFIG_PATH="tst/tsc.json" \
|
|
72
|
+
NODE_OPTIONS="--import=tsx --trace-warnings -r source-map-support/register" \
|
|
73
|
+
c8 --config etc/c8.json \
|
|
74
|
+
mocha tst/*.spec.ts
|
|
75
|
+
|
|
76
|
+
# open code coverage report
|
|
77
|
+
open-cov
|
|
78
|
+
open-cli tst/.c8/index.html
|
|
79
|
+
|
|
80
|
+
# execute editor application from source tree for testing
|
|
81
|
+
run
|
|
82
|
+
npx tsx src/ink-editor-cli.ts $*
|
|
83
|
+
|
|
84
|
+
# publish to github.com and npmjs.com
|
|
85
|
+
publish [hostname=en4.*]
|
|
86
|
+
increment="patch"; \
|
|
87
|
+
case "$*" in -i* ) increment=`echo "$*" | sed -e 's;^-i;;'` ;; esac; \
|
|
88
|
+
kickout "$increment" && \
|
|
89
|
+
VERSION=`sed -n '/"version":/ s/.*: *"\(.*\)".*/\1/p' package.json` && \
|
|
90
|
+
V=`echo "$VERSION" | sed -e 's;\.;\\.;g'` && \
|
|
91
|
+
sed -n -e "/^${V} /, /^[0-9]\\./ { /^${V} /p; /^[0-9]\\./!p; }" <CHANGELOG.md >.notes.md && \
|
|
92
|
+
gh release create --title "Ink-Editor $VERSION" --notes-file .notes.md --verify-tag $VERSION && \
|
|
93
|
+
rm -f .notes.md
|
|
94
|
+
|
|
95
|
+
# cleanup (built artifacts)
|
|
96
|
+
clean
|
|
97
|
+
shx rm -rf dst-stage1 dst-stage2
|
|
98
|
+
|
|
99
|
+
# cleanup (bootstrap artifacts)
|
|
100
|
+
distclean : clean
|
|
101
|
+
shx rm -f package-lock.json
|
|
102
|
+
shx rm -rf node_modules
|
|
103
|
+
|
package/etc/tsc.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "../dst-stage1",
|
|
4
|
+
"tsBuildInfoFile": "../dst-stage1/tsc.tsbuildinfo",
|
|
5
|
+
"target": "es2023",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "Bundler",
|
|
8
|
+
"useDefineForClassFields": false,
|
|
9
|
+
"composite": false,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"strictFunctionTypes": true,
|
|
12
|
+
"resolveJsonModule": false,
|
|
13
|
+
"isolatedModules": false,
|
|
14
|
+
"lib": [ "es2023" ],
|
|
15
|
+
"types": [ "node" ],
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"noEmit": false,
|
|
19
|
+
"rootDir": "../src"
|
|
20
|
+
},
|
|
21
|
+
"include": [
|
|
22
|
+
"../src/**/*.ts",
|
|
23
|
+
"../src/**/*.d.ts"
|
|
24
|
+
],
|
|
25
|
+
"exclude": [
|
|
26
|
+
"../node_modules"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
|
package/etc/vite.mts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
** Ink-Editor -- Text Editor with Exchangeable Editing Modes for Ink
|
|
3
|
+
** Copyright (c) 2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
|
+
**
|
|
5
|
+
** Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
** a copy of this software and associated documentation files (the
|
|
7
|
+
** "Software"), to deal in the Software without restriction, including
|
|
8
|
+
** without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
** distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
** permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
** the following conditions:
|
|
12
|
+
**
|
|
13
|
+
** The above copyright notice and this permission notice shall be included
|
|
14
|
+
** in all copies or substantial portions of the Software.
|
|
15
|
+
**
|
|
16
|
+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import path from "node:path"
|
|
26
|
+
import * as Vite from "vite"
|
|
27
|
+
import { tscPlugin } from "@wroud/vite-plugin-tsc"
|
|
28
|
+
|
|
29
|
+
export default Vite.defineConfig(({ mode }) => ({
|
|
30
|
+
logLevel: "info",
|
|
31
|
+
appType: "custom",
|
|
32
|
+
base: "",
|
|
33
|
+
root: "",
|
|
34
|
+
plugins: [
|
|
35
|
+
tscPlugin({
|
|
36
|
+
tscArgs: [
|
|
37
|
+
"--build", "etc/tsc.json",
|
|
38
|
+
...(mode === "development" ? [ "--sourceMap" ] : [])
|
|
39
|
+
],
|
|
40
|
+
packageManager: "npx",
|
|
41
|
+
prebuild: true
|
|
42
|
+
}),
|
|
43
|
+
|
|
44
|
+
/* let the CLI import the library bundle instead of sharing a hashed chunk with it */
|
|
45
|
+
{
|
|
46
|
+
name: "ink-editor-cli",
|
|
47
|
+
enforce: "pre" as const,
|
|
48
|
+
resolveId (id: string, importer?: string) {
|
|
49
|
+
if (id === "./ink-editor" && importer?.endsWith("ink-editor-cli.js"))
|
|
50
|
+
return { id: "./ink-editor.esm.js", external: "relative" as const }
|
|
51
|
+
return null
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
build: {
|
|
56
|
+
rollupOptions: {
|
|
57
|
+
/* all non-relative imports (Node.js built-ins and NPM packages) stay external */
|
|
58
|
+
external: (id: string) => !id.startsWith(".") && !path.isAbsolute(id)
|
|
59
|
+
},
|
|
60
|
+
lib: {
|
|
61
|
+
entry: {
|
|
62
|
+
"ink-editor": "dst-stage1/ink-editor.js",
|
|
63
|
+
"ink-editor-cli": "dst-stage1/ink-editor-cli.js"
|
|
64
|
+
},
|
|
65
|
+
formats: [ "es" ],
|
|
66
|
+
fileName: (_format, entryName) => `${entryName}.esm.js`
|
|
67
|
+
},
|
|
68
|
+
target: "node22",
|
|
69
|
+
outDir: "dst-stage2",
|
|
70
|
+
assetsDir: "",
|
|
71
|
+
emptyOutDir: false,
|
|
72
|
+
chunkSizeWarningLimit: 750,
|
|
73
|
+
assetsInlineLimit: 0,
|
|
74
|
+
sourcemap: (mode === "development"),
|
|
75
|
+
minify: false,
|
|
76
|
+
reportCompressedSize: (mode === "production")
|
|
77
|
+
}
|
|
78
|
+
}))
|
|
79
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js b/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js
|
|
2
|
+
index 3314fd7..dceace7 100644
|
|
3
|
+
--- a/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js
|
|
4
|
+
+++ b/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js
|
|
5
|
+
@@ -84,7 +84,6 @@ function handleUnsupportedTSVersion(parseSettings, behavior, passedLoggerFn) {
|
|
6
|
+
// See https://github.com/typescript-eslint/typescript-eslint/issues/7896
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
8
|
+
(typeof process === 'undefined' ? false : process.stdout?.isTTY)) {
|
|
9
|
+
- parseSettings.log(buildUnsupportedTSVersionMessage('warn'));
|
|
10
|
+
}
|
|
11
|
+
warnedAboutTSVersion = true;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
diff --git a/node_modules/vite/dist/node/chunks/node.js b/node_modules/vite/dist/node/chunks/node.js
|
|
2
|
+
index e4a001f..71f855f 100644
|
|
3
|
+
--- a/node_modules/vite/dist/node/chunks/node.js
|
|
4
|
+
+++ b/node_modules/vite/dist/node/chunks/node.js
|
|
5
|
+
@@ -38835,7 +38835,6 @@ async function runConfigHook(config, plugins, configEnv) {
|
|
6
|
+
const res = await getPluginHookHandler(p, "config").call(context, conf, configEnv);
|
|
7
|
+
if (res && res !== conf) {
|
|
8
|
+
if (hasBothRollupOptionsAndRolldownOptions(res)) context.warn(`Both \`rollupOptions\` and \`rolldownOptions\` were specified by ${JSON.stringify(p.name)} plugin. \`rollupOptions\` specified by that plugin will be ignored.`);
|
|
9
|
+
- if (res.esbuild) context.warn(`\`esbuild\` option was specified by ${JSON.stringify(p.name)} plugin. This option is deprecated, please use \`oxc\` instead.`);
|
|
10
|
+
if (res.optimizeDeps?.esbuildOptions) context.warn(`\`optimizeDeps.esbuildOptions\` option was specified by ${JSON.stringify(p.name)} plugin. This option is deprecated, please use \`optimizeDeps.rolldownOptions\` instead.`);
|
|
11
|
+
conf = mergeConfig(conf, res);
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@rse/ink-editor",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "Text Editor with Exchangeable Editing Modes for Ink",
|
|
5
|
+
"publishConfig": { "access": "public" },
|
|
6
|
+
"keywords": [ "ink", "react", "terminal", "tui",
|
|
7
|
+
"text", "editor", "textarea", "widget",
|
|
8
|
+
"vim", "emacs", "nano", "vscode" ],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": { "type": "git", "url": "git+https://github.com/rse/ink-editor.git" },
|
|
11
|
+
"homepage": "https://github.com/rse/ink-editor",
|
|
12
|
+
"bugs": "https://github.com/rse/ink-editor/issues",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Dr. Ralf S. Engelschall",
|
|
15
|
+
"email": "rse@engelschall.com",
|
|
16
|
+
"url": "http://engelschall.com"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"types": "./dst-stage1/ink-editor.d.ts",
|
|
20
|
+
"module": "./dst-stage2/ink-editor.esm.js",
|
|
21
|
+
"main": "./dst-stage2/ink-editor.esm.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": { "types": "./dst-stage1/ink-editor.d.ts", "default": "./dst-stage2/ink-editor.esm.js" }
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"ink-editor": "./dst-stage2/ink-editor-cli.esm.js"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"patch-package": "8.0.1",
|
|
30
|
+
"@rse/stx": "1.1.7",
|
|
31
|
+
"shx": "0.4.0",
|
|
32
|
+
"eslint": "10.16.0",
|
|
33
|
+
"globals": "17.15.0",
|
|
34
|
+
"@eslint/js": "10.0.1",
|
|
35
|
+
"knip": "6.51.0",
|
|
36
|
+
"jiti": "2.7.0",
|
|
37
|
+
"tsx": "4.23.15",
|
|
38
|
+
"mocha": "12.0.3",
|
|
39
|
+
"chai": "6.3.0",
|
|
40
|
+
"c8": "12.0.0",
|
|
41
|
+
"source-map-support": "0.5.21",
|
|
42
|
+
"typescript": "6.0.3",
|
|
43
|
+
"typescript-eslint": "8.74.0",
|
|
44
|
+
"@typescript-eslint/parser": "8.74.0",
|
|
45
|
+
"ink": "8.0.0",
|
|
46
|
+
"react": "19.3.1",
|
|
47
|
+
"vite": "8.4.1",
|
|
48
|
+
"@wroud/vite-plugin-tsc": "1.0.1",
|
|
49
|
+
"chokidar-cli": "3.0.0",
|
|
50
|
+
"open-cli": "9.0.0",
|
|
51
|
+
"cross-env": "10.1.0",
|
|
52
|
+
|
|
53
|
+
"@types/node": "26.6.11",
|
|
54
|
+
"@types/react": "19.3.3",
|
|
55
|
+
"@types/mocha": "10.0.10",
|
|
56
|
+
"@types/chai": "5.2.3"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"ink": ">=8.0.0",
|
|
60
|
+
"react": ">=19.0.0"
|
|
61
|
+
},
|
|
62
|
+
"allowScripts": {
|
|
63
|
+
"fsevents": true,
|
|
64
|
+
"esbuild": true
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"better-ink-ui": "0.1.4",
|
|
68
|
+
"shiki": "4.6.0"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=22.18.0"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"prepare": "npm start patch-apply",
|
|
75
|
+
"prepublishOnly": "npm start build",
|
|
76
|
+
"start": "stx -v4 -c etc/stx.conf",
|
|
77
|
+
"test": "npm start test"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|