@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/LICENSE +202 -0
- package/NOTICE +12 -0
- package/RAVEN_VERSION +1 -0
- package/README.md +394 -2
- package/package.json +56 -4
- package/src/core/errors.ts +20 -0
- package/src/core/events.ts +869 -0
- package/src/core/frame.ts +76 -0
- package/src/core/index.ts +28 -0
- package/src/core/library-check.ts +89 -0
- package/src/core/native.ts +82 -0
- package/src/core/plot.ts +179 -0
- package/src/core/props.generated.ts +172 -0
- package/src/core/props.ts +158 -0
- package/src/core/raven.ts +10 -0
- package/src/core/subscriptions.ts +76 -0
- package/src/core/tags.ts +307 -0
- package/src/core/theme.ts +207 -0
- package/src/core/web.ts +84 -0
- package/src/core/widget-instance.ts +748 -0
- package/src/core/window-instance.ts +256 -0
- package/src/react/components.generated.ts +179 -0
- package/src/react/hooks.ts +51 -0
- package/src/react/host-config.ts +138 -0
- package/src/react/index.ts +26 -0
- package/src/react/root.ts +119 -0
- package/src/react/tags.ts +50 -0
- package/src/react/web.ts +5 -0
- package/src/vendor/raven.ts +12652 -0
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decky.fx/raven-tsx",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
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
|
+
}
|