@decky.fx/raven-tsx 0.0.0-stage → 0.1.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/package.json CHANGED
@@ -1,6 +1,58 @@
1
1
  {
2
2
  "name": "@decky.fx/raven-tsx",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Raven's native widgets from TSX, for Bun: a core that knows only Raven and an adapter for React, with typed components made from Raven's schema",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "module": "src/core/index.ts",
8
+ "exports": {
9
+ ".": "./src/core/index.ts",
10
+ "./react": "./src/react/index.ts"
11
+ },
12
+ "engines": {
13
+ "bun": ">=1.4.4"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/deckyfx/raven-tsx.git"
18
+ },
19
+ "keywords": [
20
+ "raven",
21
+ "tsx",
22
+ "bun",
23
+ "gui",
24
+ "desktop",
25
+ "native",
26
+ "widgets",
27
+ "react",
28
+ "vulkan"
29
+ ],
30
+ "dependencies": {
31
+ "@types/react": "^19",
32
+ "@types/react-reconciler": "^0.34"
33
+ },
34
+ "peerDependencies": {
35
+ "react": "^19.3.0",
36
+ "react-reconciler": "^0.34.0"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "react": {
40
+ "optional": true
41
+ },
42
+ "react-reconciler": {
43
+ "optional": true
44
+ }
45
+ },
46
+ "files": [
47
+ "src",
48
+ "RAVEN_VERSION",
49
+ "NOTICE"
50
+ ],
51
+ "optionalDependencies": {
52
+ "@decky.fx/raven-tsx-linux-x64": "0.1.0",
53
+ "@decky.fx/raven-tsx-linux-arm64": "0.1.0",
54
+ "@decky.fx/raven-tsx-darwin-arm64": "0.1.0",
55
+ "@decky.fx/raven-tsx-darwin-x64": "0.1.0",
56
+ "@decky.fx/raven-tsx-win32-x64": "0.1.0"
57
+ }
58
+ }
@@ -0,0 +1,20 @@
1
+ import * as r from "./raven";
2
+
3
+ /** An error of the renderer or of Raven under it. */
4
+ export class RavenError extends Error {
5
+ constructor(message: string) {
6
+ super(message);
7
+ this.name = "RavenError";
8
+ }
9
+
10
+ /** Throws an error with this message. */
11
+ static throw(message: string): never {
12
+ throw new RavenError(message);
13
+ }
14
+
15
+ /** Throws with the message of the last error of the library added. */
16
+ static fromLibrary(context: string): never {
17
+ const [code, detail] = r.Rerror_get_last();
18
+ throw new RavenError(`${context}: ${r.Rerror_to_string(code)}: ${detail}`);
19
+ }
20
+ }