restty 0.1.17 → 0.1.18
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 +4 -9
- package/dist/{app/index.js → chunk-53vdvhe3.js} +23781 -23698
- package/dist/fonts/manager.d.ts +1 -2
- package/dist/internal.js +105 -56357
- package/dist/renderer/shapes.d.ts +1 -3
- package/dist/restty.js +20 -0
- package/dist/unicode/ghostty-symbol-ranges.d.ts +1 -0
- package/dist/unicode/symbols.d.ts +6 -0
- package/package.json +8 -61
- package/dist/fonts/index.js +0 -5333
- package/dist/grid/index.js +0 -71
- package/dist/ime/index.js +0 -84
- package/dist/index.js +0 -56354
- package/dist/input/index.js +0 -1051
- package/dist/pty/index.js +0 -338
- package/dist/renderer/index.js +0 -1715
- package/dist/selection/index.js +0 -226
- package/dist/theme/index.js +0 -11218
- package/dist/wasm/index.js +0 -6003
|
@@ -51,8 +51,6 @@ export declare function isLegacyComputing(cp: number): boolean;
|
|
|
51
51
|
export declare function isPowerline(cp: number): boolean;
|
|
52
52
|
/** Test whether a codepoint is in the Braille Patterns block (U+2800-U+28FF). */
|
|
53
53
|
export declare function isBraille(cp: number): boolean;
|
|
54
|
-
/** Test whether a codepoint is a transport-control symbol commonly used in prompts. */
|
|
55
|
-
export declare function isTransportControlSymbol(cp: number): boolean;
|
|
56
54
|
/** Test whether a codepoint is any GPU-drawable graphics element (box, block, legacy, powerline). */
|
|
57
55
|
export declare function isGraphicsElement(cp: number): boolean;
|
|
58
56
|
/** Test whether a codepoint is a symbol that may need special rendering (PUA or graphics). */
|
|
@@ -71,7 +69,7 @@ export declare function drawBlockElement(cp: number, x: number, y: number, cellW
|
|
|
71
69
|
* Rasterize a Unicode Box Drawing character (U+2500-U+257F) into rect instances.
|
|
72
70
|
* Handles straight segments, dashed lines, rounded corners, and diagonal lines.
|
|
73
71
|
*/
|
|
74
|
-
export declare function drawBoxDrawing(cp: number, x: number, y: number, cellW: number, cellH: number, color: Color, out: RectData): boolean;
|
|
72
|
+
export declare function drawBoxDrawing(cp: number, x: number, y: number, cellW: number, cellH: number, color: Color, out: RectData, boxThicknessPx?: number): boolean;
|
|
75
73
|
/** Rasterize a Unicode Braille Pattern (U+2800-U+28FF) into rect dot instances. */
|
|
76
74
|
export declare function drawBraille(cp: number, x: number, y: number, cellW: number, cellH: number, color: Color, out: RectData): boolean;
|
|
77
75
|
/** Rasterize a Powerline glyph (U+E0B0-U+E0D7) into rect scanline instances. */
|
package/dist/restty.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Restty,
|
|
3
|
+
ResttyPaneHandle,
|
|
4
|
+
createRestty,
|
|
5
|
+
getBuiltinTheme,
|
|
6
|
+
getBuiltinThemeSource,
|
|
7
|
+
isBuiltinThemeName,
|
|
8
|
+
listBuiltinThemeNames,
|
|
9
|
+
parseGhosttyTheme
|
|
10
|
+
} from "./chunk-53vdvhe3.js";
|
|
11
|
+
export {
|
|
12
|
+
parseGhosttyTheme,
|
|
13
|
+
listBuiltinThemeNames,
|
|
14
|
+
isBuiltinThemeName,
|
|
15
|
+
getBuiltinThemeSource,
|
|
16
|
+
getBuiltinTheme,
|
|
17
|
+
createRestty,
|
|
18
|
+
ResttyPaneHandle,
|
|
19
|
+
Restty
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GHOSTTY_SYMBOL_RANGES: ReadonlyArray<readonly [number, number]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** True when cp is a Ghostty "graphics element" handled specially in renderer logic. */
|
|
2
|
+
export declare function isGraphicsElementCodepoint(cp: number): boolean;
|
|
3
|
+
/** True when cp is in Ghostty's generated is_symbol lookup table. */
|
|
4
|
+
export declare function isGhosttySymbolCodepoint(cp: number): boolean;
|
|
5
|
+
/** Symbol-like codepoint for renderer constraint/fit behavior. */
|
|
6
|
+
export declare function isSymbolLikeCodepoint(cp: number): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "restty",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "Browser terminal rendering library powered by WASM, WebGPU/WebGL2, and TypeScript text shaping.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"terminal",
|
|
@@ -33,83 +33,30 @@
|
|
|
33
33
|
"LICENSE"
|
|
34
34
|
],
|
|
35
35
|
"type": "module",
|
|
36
|
-
"main": "./dist/
|
|
37
|
-
"module": "./dist/
|
|
36
|
+
"main": "./dist/restty.js",
|
|
37
|
+
"module": "./dist/restty.js",
|
|
38
38
|
"types": "./dist/index.d.ts",
|
|
39
39
|
"exports": {
|
|
40
40
|
".": {
|
|
41
41
|
"types": "./dist/index.d.ts",
|
|
42
|
-
"import": "./dist/
|
|
43
|
-
"default": "./dist/
|
|
42
|
+
"import": "./dist/restty.js",
|
|
43
|
+
"default": "./dist/restty.js"
|
|
44
44
|
},
|
|
45
45
|
"./internal": {
|
|
46
46
|
"types": "./dist/internal.d.ts",
|
|
47
47
|
"import": "./dist/internal.js",
|
|
48
48
|
"default": "./dist/internal.js"
|
|
49
|
-
},
|
|
50
|
-
"./app": {
|
|
51
|
-
"types": "./dist/app/index.d.ts",
|
|
52
|
-
"import": "./dist/app/index.js",
|
|
53
|
-
"default": "./dist/app/index.js"
|
|
54
|
-
},
|
|
55
|
-
"./pty": {
|
|
56
|
-
"types": "./dist/pty/index.d.ts",
|
|
57
|
-
"import": "./dist/pty/index.js",
|
|
58
|
-
"default": "./dist/pty/index.js"
|
|
59
|
-
},
|
|
60
|
-
"./input": {
|
|
61
|
-
"types": "./dist/input/index.d.ts",
|
|
62
|
-
"import": "./dist/input/index.js",
|
|
63
|
-
"default": "./dist/input/index.js"
|
|
64
|
-
},
|
|
65
|
-
"./theme": {
|
|
66
|
-
"types": "./dist/theme/index.d.ts",
|
|
67
|
-
"import": "./dist/theme/index.js",
|
|
68
|
-
"default": "./dist/theme/index.js"
|
|
69
|
-
},
|
|
70
|
-
"./wasm": {
|
|
71
|
-
"types": "./dist/wasm/index.d.ts",
|
|
72
|
-
"import": "./dist/wasm/index.js",
|
|
73
|
-
"default": "./dist/wasm/index.js"
|
|
74
|
-
},
|
|
75
|
-
"./fonts": {
|
|
76
|
-
"types": "./dist/fonts/index.d.ts",
|
|
77
|
-
"import": "./dist/fonts/index.js",
|
|
78
|
-
"default": "./dist/fonts/index.js"
|
|
79
|
-
},
|
|
80
|
-
"./renderer": {
|
|
81
|
-
"types": "./dist/renderer/index.d.ts",
|
|
82
|
-
"import": "./dist/renderer/index.js",
|
|
83
|
-
"default": "./dist/renderer/index.js"
|
|
84
|
-
},
|
|
85
|
-
"./grid": {
|
|
86
|
-
"types": "./dist/grid/index.d.ts",
|
|
87
|
-
"import": "./dist/grid/index.js",
|
|
88
|
-
"default": "./dist/grid/index.js"
|
|
89
|
-
},
|
|
90
|
-
"./selection": {
|
|
91
|
-
"types": "./dist/selection/index.d.ts",
|
|
92
|
-
"import": "./dist/selection/index.js",
|
|
93
|
-
"default": "./dist/selection/index.js"
|
|
94
|
-
},
|
|
95
|
-
"./ime": {
|
|
96
|
-
"types": "./dist/ime/index.d.ts",
|
|
97
|
-
"import": "./dist/ime/index.js",
|
|
98
|
-
"default": "./dist/ime/index.js"
|
|
99
49
|
}
|
|
100
50
|
},
|
|
101
51
|
"scripts": {
|
|
102
52
|
"setup:wgpu-polyfill": "bun run scripts/setup-wgpu-polyfill.ts",
|
|
103
53
|
"clean:dist": "rm -rf dist && mkdir -p dist",
|
|
104
54
|
"build:themes": "bun run scripts/generate-builtin-themes.ts",
|
|
105
|
-
"build:lib": "bun
|
|
55
|
+
"build:lib": "bun run scripts/build-lib.ts",
|
|
106
56
|
"build:types": "tsc -p tsconfig.build.json",
|
|
107
57
|
"build": "bun run build:themes && bun run clean:dist && bun run build:lib && bun run build:types",
|
|
108
|
-
"build:text-shaper": "bun run playground/build-text-shaper.ts",
|
|
109
|
-
"build:restty-input": "bun run playground/build-restty-input.ts",
|
|
110
|
-
"build:restty-wasm": "bun run playground/build-restty-wasm.ts",
|
|
111
58
|
"build:playground-app": "bun run playground/build-playground-app.ts",
|
|
112
|
-
"build:assets": "bun run build:
|
|
59
|
+
"build:assets": "bun run build:playground-app",
|
|
113
60
|
"check:themes": "bun run build:themes && git diff --exit-code -- src/theme/builtin-themes.ts",
|
|
114
61
|
"lint": "oxlint src playground scripts tests",
|
|
115
62
|
"format:base": "oxfmt src --config .oxfmtrc.json --ignore-path .gitignore --ignore-path .oxfmtignore",
|
|
@@ -119,7 +66,7 @@
|
|
|
119
66
|
"test": "bun test ./tests",
|
|
120
67
|
"test:ci": "bun test $(find tests -name '*.test.ts' ! -name 'webgpu-glyph.test.ts' | sort)",
|
|
121
68
|
"pty": "bun run playground/pty-server.ts",
|
|
122
|
-
"playground": "bun run playground
|
|
69
|
+
"playground": "bun run scripts/playground-dev.ts",
|
|
123
70
|
"playground:static": "bun run playground/server.ts"
|
|
124
71
|
},
|
|
125
72
|
"dependencies": {
|