@domicile-desktop/sdk 0.0.0-alpha-5e57e17f7c8e → 0.0.0-alpha-e8cb518f13e3

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 (2) hide show
  1. package/README.md +20 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,8 +6,12 @@ Types and helpers for a Domicile shell: the desktop it is handed, the
6
6
  - Published to npm. To write a shell, start with
7
7
  [WRITING-A-SHELL.md](/docs/WRITING-A-SHELL.md); this README is the package
8
8
  reference.
9
- - Ships built JavaScript and `.d.ts` from `dist/`. Run `bun run build` before
10
- anything outside the workspace imports it.
9
+ - Every call's full signature and docs ship in the package's `.d.ts`, so
10
+ your editor shows them. Each namespace's source is
11
+ `src/desktop/<namespace>.ts`, such as
12
+ [`windows.ts`](src/desktop/windows.ts).
13
+ - How far a shell's trust reaches:
14
+ [Security](/docs/SHELL-SYSTEM-ACCESS.md#security).
11
15
 
12
16
  ## Usage
13
17
 
@@ -37,8 +41,7 @@ export const Shell: ShellModule = (root, domicile) => {
37
41
  events too. The engine holds each until its first listener exists.
38
42
  - A call the compositor answers resolves a `Result`. A newer `files.search`
39
43
  rejects the older with an `AbortError`.
40
- - Only Domicile calls a shell. Develop against the real desktop with
41
- `packages/dev-shell/bin/dev-shell.sh <shell>`.
44
+ - Only Domicile calls a shell. Run yours with `domicile ./src/index.ts`.
42
45
  - Render `<app app-id="…">` and `<webview window="…">` as normal DOM. CSS
43
46
  (rounding, blur, transforms, z-index) applies to the live surface.
44
47
  - The engine sends the pointer, wheel and keys over an `<app>` to its client,
@@ -99,7 +102,16 @@ speaks it.
99
102
  - **The SDK is the desktop's types, the layer that builds it, and pure
100
103
  helpers.** The host types under it are generated from the IDL, below.
101
104
 
102
- ## The desktop layer
105
+ ## Working on this package
106
+
107
+ For contributors to this repository. Shell authors don't need it.
108
+
109
+ - Ships built JavaScript and `.d.ts` from `dist/`. Run `bun run build` before
110
+ anything outside the workspace imports it.
111
+ - Develop a shell against the real desktop with
112
+ `packages/dev-shell/bin/dev-shell.sh <shell>`.
113
+
114
+ ### The desktop layer
103
115
 
104
116
  The engine hands a shell the `Domicile` that `src/desktop/desktop.ts`'s
105
117
  `desktop(host)` builds, and an app the `AppDomicile` of `appDesktop(host)`.
@@ -117,7 +129,7 @@ bun run generate # after changing anything under src/desktop/
117
129
  - The engine's guards export `HostShell` instead of `Shell` to be handed the
118
130
  host itself; see [GUARDS.md](/packages/domicile-engine/docs/GUARDS.md).
119
131
 
120
- ## Generated types
132
+ ### Generated types
121
133
 
122
134
  `src/domicile-host.ts` is generated from the engine's WebIDL in
123
135
  `packages/domicile-engine/src/third_party/blink/renderer/modules/domicile/`,
@@ -143,13 +155,13 @@ the Rust doc comments as its docs. `bun run generate` writes both and needs
143
155
  - `scripts/test-config-types-match-the-schema.sh` fails when either file is
144
156
  stale.
145
157
 
146
- ## Dependencies
158
+ ### Dependencies
147
159
 
148
160
  - `zod` only. Its schemas parse the keywords and rows a newer engine may send
149
161
  unknown values for, such as `./cursor-shape`.
150
162
  - `@cprussin/option-result` gives `./system`'s calls their `Result`.
151
163
 
152
- ## Test
164
+ ### Test
153
165
 
154
166
  ```sh
155
167
  bun run turbo test --filter @domicile-desktop/sdk
package/package.json CHANGED
@@ -236,7 +236,7 @@
236
236
  "test:unit": "bun test"
237
237
  },
238
238
  "type": "module",
239
- "version": "0.0.0-alpha-5e57e17f7c8e",
239
+ "version": "0.0.0-alpha-e8cb518f13e3",
240
240
  "repository": {
241
241
  "type": "git",
242
242
  "url": "git+https://github.com/cprussin/domicile.git",