ink-sdl 0.1.0 → 0.2.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 CHANGED
@@ -55,6 +55,27 @@ pnpm install
55
55
  pnpm exec tsx examples/hello.tsx
56
56
  ```
57
57
 
58
+ The example supports CLI flags for testing different display settings:
59
+
60
+ ```bash
61
+ # Custom font size
62
+ pnpm exec tsx examples/hello.tsx --font-size 20
63
+
64
+ # Override scale factor (useful for HiDPI testing)
65
+ pnpm exec tsx examples/hello.tsx --scale-factor 2.0
66
+
67
+ # All options
68
+ pnpm exec tsx examples/hello.tsx --title "Test" --width 800 --height 600 --font-size 18 --scale-factor 1.5
69
+ ```
70
+
71
+ | Flag | Description |
72
+ | ---------------- | ----------------------------------- |
73
+ | `--title` | Window title |
74
+ | `--width` | Window width in pixels |
75
+ | `--height` | Window height in pixels |
76
+ | `--font-size` | Font size in points |
77
+ | `--scale-factor` | Scale factor (omit for auto-detect) |
78
+
58
79
  > **Note:** This project uses [pnpm](https://pnpm.io/) for development. You can install and use ink-sdl in your own project with npm or pnpm, but if you're contributing to the library itself, use pnpm.
59
80
 
60
81
  ## Usage
@@ -114,7 +135,7 @@ Creates stdin/stdout streams and a window for use with Ink.
114
135
  | `width` | `number` | `800` | Window width in pixels |
115
136
  | `height` | `number` | `600` | Window height in pixels |
116
137
  | `vsync` | `boolean` | `true` | Enable vertical sync |
117
- | `fontSize` | `number` | `11` | Font size in points |
138
+ | `fontSize` | `number` | `16` | Font size in points |
118
139
  | `scaleFactor` | `number \| null` | `null` | Override scale factor (null = auto-detect) |
119
140
 
120
141
  #### Returns
@@ -124,6 +145,7 @@ Creates stdin/stdout streams and a window for use with Ink.
124
145
  stdin: SdlInputStream; // Readable stream for keyboard input
125
146
  stdout: SdlOutputStream; // Writable stream for ANSI output
126
147
  window: SdlWindow; // Window wrapper with events
148
+ renderer: SdlUiRenderer; // UI renderer (for advanced use)
127
149
  }
128
150
  ```
129
151
 
@@ -168,8 +190,8 @@ import {
168
190
  AnsiParser,
169
191
  TextRenderer,
170
192
  InputBridge,
171
- getSDL2,
172
- getSDL_ttf,
193
+ getSdl2,
194
+ getSdlTtf,
173
195
  } from "ink-sdl";
174
196
  ```
175
197
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ink-sdl",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Render Ink terminal apps in native SDL windows",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,7 +40,8 @@
40
40
  "node": ">=24.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "koffi": "^2.9.3"
43
+ "koffi": "^2.9.3",
44
+ "remeda": "^2.33.4"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "ink": "^5.0.0 || ^6.0.0",
Binary file