@net-vim/core 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -0
  3. package/package.json +4 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Net-Vim Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # Net-Vim
2
+
3
+ Net-Vim is a web-based Vim-compatible editor engine and component library. It provides a terminal-like editing experience within web applications using a custom TUI engine and WebGL renderer.
4
+
5
+ ## Features
6
+
7
+ - Vim-compatible modal editing.
8
+ - Framework-agnostic initialization.
9
+ - WebGL-accelerated rendering.
10
+ - Plugin system with TypeScript support.
11
+ - File system abstraction using OPFS (Origin Private File System).
12
+ - Integrated virtual keyboard for mobile devices.
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @net-vim/core
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ### Framework-Agnostic Initialization
23
+
24
+ The editor can be initialized into any HTML element without requiring a specific frontend framework.
25
+
26
+ ```javascript
27
+ import { initNetVim } from '@net-vim/core';
28
+
29
+ const container = document.getElementById('editor-container');
30
+ const { vim, dispose } = initNetVim(container);
31
+
32
+ // Access the Vim API
33
+ vim.getAPI().registerCommand('hello', () => {
34
+ console.log('Hello from Net-Vim');
35
+ });
36
+ ```
37
+
38
+ ### Solid.js Component
39
+
40
+ For applications using Solid.js, the editor is available as a component.
41
+
42
+ ```tsx
43
+ import { VimEditor } from '@net-vim/core';
44
+
45
+ function App() {
46
+ return (
47
+ <div style={{ width: '100vw', height: '100vh' }}>
48
+ <VimEditor ref={(vim) => console.log('Editor initialized')} />
49
+ </div>
50
+ );
51
+ }
52
+ ```
53
+
54
+ ## Configuration
55
+
56
+ Net-Vim looks for an initialization script at `.config/net-vim/init.ts` within the OPFS. You can use this to load plugins and configure the editor on startup.
57
+
58
+ ## License
59
+
60
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@net-vim/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "files": [
6
- "dist"
6
+ "dist",
7
+ "README.md",
8
+ "LICENSE"
7
9
  ],
8
10
  "main": "./dist/index.js",
9
11
  "module": "./dist/index.js",