@domicile-desktop/sdk 0.0.0-alpha-1fe987a54ea1 → 0.0.0-alpha-e040773499e5
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 +17 -1
- package/dist/domicile-host.d.ts +589 -354
- package/dist/domicile-host.js +8 -13
- package/dist/portal.d.ts +27 -1
- package/dist/portal.js +36 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ See [docs/ELEMENTS.md](docs/ELEMENTS.md) for `<app>` input and focus, and the
|
|
|
51
51
|
|
|
52
52
|
| Module | What it is |
|
|
53
53
|
| --- | --- |
|
|
54
|
-
| `./domicile-host` | `DomicileHost`: the type of the desktop `Shell` is handed
|
|
54
|
+
| `./domicile-host` | `DomicileHost`: the type of the desktop `Shell` is handed. Generated from the engine's IDL; see [Generated types](#generated-types). |
|
|
55
55
|
| `./shell` | `Shell`: the export a shell module must provide. Domicile calls it once with the element to draw in. |
|
|
56
56
|
| `./app-element`, `./webview-element` | Types and event names for `<app>` and `<webview>`. |
|
|
57
57
|
| `./bind-keys` | `bindKeys`: grab a shell's own chords by name and handle them by mode. `./key-action` and `./own-keybindings` are its parts. |
|
|
@@ -66,6 +66,22 @@ The compositor's JSON socket protocol lives in
|
|
|
66
66
|
[`@domicile-desktop/e2e-harness`](../e2e-harness/README.md); a page never
|
|
67
67
|
speaks it.
|
|
68
68
|
|
|
69
|
+
## Generated types
|
|
70
|
+
|
|
71
|
+
`src/domicile-host.ts` is generated from the engine's WebIDL in
|
|
72
|
+
`packages/domicile-engine/src/third_party/blink/renderer/modules/domicile/`,
|
|
73
|
+
with the IDL's comments as its docs. Do not edit it.
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
bun run generate # after changing the IDL
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- `codegen/` holds the generator: a parser for the IDL subset the engine uses,
|
|
80
|
+
and the TypeScript it emits. It throws on syntax outside that subset.
|
|
81
|
+
- `EVENT_TYPES` in `codegen/generate-domicile-host.ts` names the event type
|
|
82
|
+
each `on<name>` handler dispatches, which WebIDL cannot express.
|
|
83
|
+
- `scripts/test-host-types-match-the-idl.sh` fails when the file is stale.
|
|
84
|
+
|
|
69
85
|
## Dependencies
|
|
70
86
|
|
|
71
87
|
- `zod` only. Its schemas parse the keywords and rows a newer engine may send
|