silvery 0.4.2 → 0.5.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.
Files changed (3) hide show
  1. package/README.md +10 -9
  2. package/package.json +20 -73
  3. package/src/index.ts +2 -1
package/README.md CHANGED
@@ -33,11 +33,11 @@ await render(<Counter />).run()
33
33
 
34
34
  - **React 18 + 19** — hooks, refs, effects, suspense — all works
35
35
  - **Flexbox layout** — `Box` with `flexDirection`, `padding`, `gap`, `flexGrow`, just like Ink
36
- - **Ink/Chalk compatible** — same component model, `@silvery/ink` compatibility layer for migration
36
+ - **Ink/Chalk compatible** — same component model, [`@silvery/ink`](https://github.com/beorn/silvery/tree/main/packages/ink) compatibility layer for migrating existing Ink applications
37
37
 
38
38
  ### Better
39
39
 
40
- - **Smaller install** — ~177 KB gzipped all included (Ink 6 pulls 16MB into node_modules)
40
+ - **Smaller install** — <500 KB gzipped (Ink 6 pulls 16MB into node_modules)
41
41
  - **Pure TypeScript, zero native deps** — no WASM, no build steps — works on Alpine, CI, Docker, everywhere
42
42
  - **Incremental rendering** — per-node dirty tracking, [~100x faster interactive updates](tests/perf/render.bench.ts)
43
43
  - **Responsive layout** — `useContentRect()` returns actual dimensions synchronously during render
@@ -51,12 +51,12 @@ await render(<Counter />).run()
51
51
 
52
52
  ## Packages
53
53
 
54
- | Package | Description |
55
- | --------------- | ------------------------------------------------------------------------------------------ |
56
- | `silvery` | Components, hooks, renderer — the one package you need |
57
- | `@silvery/test` | Testing utilities and locators |
58
- | `@silvery/ink` | Ink compatibility layer |
59
- | `@silvery/tea` | Optional [TEA](https://guide.elm-lang.org/architecture/) state management for complex apps |
54
+ | Package | Description |
55
+ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
56
+ | [`silvery`](https://github.com/beorn/silvery) | Components, hooks, renderer — the one package you need |
57
+ | [`@silvery/test`](https://github.com/beorn/silvery/tree/main/packages/test) | Testing utilities and locators |
58
+ | [`@silvery/ink`](https://github.com/beorn/silvery/tree/main/packages/ink) | Ink compatibility layer — migrate existing Ink apps with minimal changes |
59
+ | [`@silvery/create`](https://github.com/beorn/silvery/tree/main/packages/create) | App composition, state management, and TEA architecture |
60
60
 
61
61
  ## Ecosystem
62
62
 
@@ -65,12 +65,13 @@ await render(<Counter />).run()
65
65
  | [Termless](https://termless.dev) | Headless terminal testing — like Playwright for terminal apps |
66
66
  | [Flexily](https://beorn.github.io/flexily) | Pure JS flexbox layout engine (Yoga-compatible, zero WASM) |
67
67
  | [Loggily](https://beorn.github.io/loggily) | Debug + structured logging + tracing |
68
+ | [terminfo.dev](https://terminfo.dev) | Terminal feature support database, powered by Termless |
68
69
 
69
70
  ## Coming
70
71
 
71
72
  - **Renderers** — Canvas 2D, Web DOM (experimental today, production later)
72
73
  - **Frameworks** — Svelte, Solid.js, Vue adapters
73
- - **@silvery/tea** — Structured state management with commands, keybindings, effects-as-data
74
+ - **@silvery/create** — Structured state management with commands, keybindings, effects-as-data
74
75
 
75
76
  **Runtimes:** Bun >= 1.0 and Node.js >= 18. CLI (`silvery` command) requires Bun.
76
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silvery",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "React terminal UI renderer for complex interactive apps — layout-aware rendering, flexbox, scrolling, and incremental updates",
5
5
  "keywords": [
6
6
  "ansi",
@@ -31,79 +31,30 @@
31
31
  "url": "https://github.com/beorn/silvery.git"
32
32
  },
33
33
  "workspaces": [
34
- "packages/*"
34
+ "packages/*",
35
+ "!packages/examples"
35
36
  ],
36
37
  "files": [
37
38
  "src"
38
39
  ],
39
40
  "type": "module",
40
- "main": "src/index.ts",
41
- "types": "src/index.ts",
42
41
  "exports": {
43
- ".": {
44
- "types": "./src/index.ts",
45
- "import": "./src/index.ts"
46
- },
47
- "./runtime": {
48
- "types": "./src/runtime.ts",
49
- "import": "./src/runtime.ts"
50
- },
51
- "./theme": {
52
- "types": "./src/theme.ts",
53
- "import": "./src/theme.ts"
54
- },
55
- "./ui": {
56
- "types": "./src/ui.ts",
57
- "import": "./src/ui.ts"
58
- },
59
- "./ui/cli": {
60
- "types": "./src/ui/cli.ts",
61
- "import": "./src/ui/cli.ts"
62
- },
63
- "./ui/react": {
64
- "types": "./src/ui/react.ts",
65
- "import": "./src/ui/react.ts"
66
- },
67
- "./ui/progress": {
68
- "types": "./src/ui/progress.ts",
69
- "import": "./src/ui/progress.ts"
70
- },
71
- "./ui/wrappers": {
72
- "types": "./src/ui/wrappers.ts",
73
- "import": "./src/ui/wrappers.ts"
74
- },
75
- "./ui/ansi": {
76
- "types": "./src/ui/ansi.ts",
77
- "import": "./src/ui/ansi.ts"
78
- },
79
- "./ui/display": {
80
- "types": "./src/ui/display.ts",
81
- "import": "./src/ui/display.ts"
82
- },
83
- "./ui/input": {
84
- "types": "./src/ui/input.ts",
85
- "import": "./src/ui/input.ts"
86
- },
87
- "./ui/animation": {
88
- "types": "./src/ui/animation.ts",
89
- "import": "./src/ui/animation.ts"
90
- },
91
- "./ui/image": {
92
- "types": "./src/ui/image.ts",
93
- "import": "./src/ui/image.ts"
94
- },
95
- "./ui/utils": {
96
- "types": "./src/ui/utils.ts",
97
- "import": "./src/ui/utils.ts"
98
- },
99
- "./ink": {
100
- "types": "./packages/ink/src/ink.ts",
101
- "import": "./packages/ink/src/ink.ts"
102
- },
103
- "./chalk": {
104
- "types": "./packages/ink/src/chalk.ts",
105
- "import": "./packages/ink/src/chalk.ts"
106
- }
42
+ ".": "./src/index.ts",
43
+ "./runtime": "./src/runtime.ts",
44
+ "./theme": "./src/theme.ts",
45
+ "./ui": "./src/ui.ts",
46
+ "./ui/cli": "./src/ui/cli.ts",
47
+ "./ui/react": "./src/ui/react.ts",
48
+ "./ui/progress": "./src/ui/progress.ts",
49
+ "./ui/wrappers": "./src/ui/wrappers.ts",
50
+ "./ui/ansi": "./src/ui/ansi.ts",
51
+ "./ui/display": "./src/ui/display.ts",
52
+ "./ui/input": "./src/ui/input.ts",
53
+ "./ui/animation": "./src/ui/animation.ts",
54
+ "./ui/image": "./src/ui/image.ts",
55
+ "./ui/utils": "./src/ui/utils.ts",
56
+ "./ink": "@silvery/ink",
57
+ "./chalk": "@silvery/ink/chalk"
107
58
  },
108
59
  "publishConfig": {
109
60
  "access": "public"
@@ -118,9 +69,6 @@
118
69
  "docs:dev": "vitepress dev docs",
119
70
  "docs:build": "vitepress build docs",
120
71
  "docs:preview": "vitepress preview docs",
121
- "changeset": "changeset",
122
- "version": "changeset version",
123
- "release": "changeset publish",
124
72
  "theme": "bun packages/theme/src/cli.ts",
125
73
  "demo": "bun examples/cli.ts",
126
74
  "compat": "bun packages/ink/scripts/compat-check.ts",
@@ -136,7 +84,6 @@
136
84
  "zustand": "^5.0.11"
137
85
  },
138
86
  "devDependencies": {
139
- "@changesets/cli": "^2.27.0",
140
87
  "@types/bun": "^1.1.0",
141
88
  "@types/react": "^19.0.0",
142
89
  "@xterm/addon-fit": "^0.11.0",
@@ -159,6 +106,6 @@
159
106
  },
160
107
  "engines": {
161
108
  "bun": ">=1.0",
162
- "node": ">=18"
109
+ "node": ">=23.6.0"
163
110
  }
164
111
  }
package/src/index.ts CHANGED
@@ -7,8 +7,9 @@ export const VERSION = "0.0.1"
7
7
  export * from "@silvery/ag-react"
8
8
 
9
9
  import type { ReactElement } from "react"
10
- import { render as reactRender, type RenderOptions, type TermDef } from "@silvery/ag-react"
10
+ import { render as reactRender, type RenderOptions } from "@silvery/ag-react"
11
11
  import type { Term } from "@silvery/ag-react"
12
+ import type { TermDef } from "@silvery/ag/types"
12
13
 
13
14
  /**
14
15
  * Render a React element to the terminal.