@theaiplatform/miniapp-sdk 0.0.1 → 0.0.2

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 CHANGED
@@ -20,6 +20,7 @@ Start with the [Miniapp SDK documentation](https://docs.theaiplatform.app/miniap
20
20
  - `@theaiplatform/miniapp-sdk/sdk`
21
21
  - `@theaiplatform/miniapp-sdk/web`
22
22
  - `@theaiplatform/miniapp-sdk/ui`
23
+ - `@theaiplatform/miniapp-sdk/ui/wasm`
23
24
  - `@theaiplatform/miniapp-sdk/ui/styles.css`
24
25
  - `@theaiplatform/miniapp-sdk/ui/tailwind.css`
25
26
  - `@theaiplatform/miniapp-sdk/ui-components.json`
@@ -33,7 +34,23 @@ tools and tests; host-backed calls fail when used outside a supported runtime.
33
34
  `sdk.storage` provides revisioned non-secret JSON scoped by the host to the
34
35
  active workspace and exact package. `sdk.presence` provides host-stamped,
35
36
  ephemeral room membership and state; package code never supplies participant
36
- identity.
37
+ identity. On supported desktop surfaces, `sdk.http` sends bounded HTTP(S)
38
+ requests through host consent instead of browser `fetch`, and
39
+ `sdk.credentials` lists metadata-only HTTP credential references. Credential
40
+ secrets remain in the host vault and are injected only by the native request
41
+ authority.
42
+
43
+ ## Discovery metadata
44
+
45
+ Descriptor-backed packages may assign up to three unique
46
+ `presentation.categories`. Import the `MiniAppCategory` type from the package
47
+ root or `/config`; accepted values are `productivity`, `developer-tools`,
48
+ `creativity`, `communication`, `data-and-analytics`, `business`, `education`,
49
+ `media-and-entertainment`, `utilities`, and `other`.
50
+
51
+ Do not add an authored `includes` field. The host derives the package's stable,
52
+ counted capability summary from its verified `contributions`, so Marketplace
53
+ details cannot drift from the code the descriptor is allowed to expose.
37
54
 
38
55
  ## Portable UI
39
56
 
@@ -82,6 +99,33 @@ light/dark theme and bounded UI scale. Tools and agents can read the exported
82
99
  `ui-components.json` catalog to discover the supported component families and
83
100
  style entry points without importing application-private packages.
84
101
 
102
+ ### Rust/WASM UI
103
+
104
+ Rust/WASM miniapps can render the same public component library through the
105
+ imperative `/ui/wasm` entry. It accepts a bounded serializable model, owns its
106
+ React root and providers, and emits serializable actions with stable control
107
+ IDs, entity IDs, model revisions, and unique event IDs.
108
+
109
+ ```ts
110
+ import '@theaiplatform/miniapp-sdk/ui/styles.css';
111
+ import { createMiniAppUiRoot } from '@theaiplatform/miniapp-sdk/ui/wasm';
112
+
113
+ const ui = createMiniAppUiRoot(element, model, (action) => {
114
+ wasm.onUiAction(action);
115
+ });
116
+
117
+ ui.update(nextModel);
118
+ ui.focus('project-name');
119
+ ui.unmount();
120
+ ```
121
+
122
+ The bridge synchronizes theme and UI scale, restores focus for controlled
123
+ dialogs, exposes a live-announcement method, rejects malformed or stale models,
124
+ reports render and dispatch failures explicitly, and makes teardown idempotent.
125
+ See [`examples/wasm-ui`](./examples/wasm-ui) for a clean wasm-bindgen consumer
126
+ that maps JavaScript exceptions to Rust `Result` values and rejects stale or
127
+ replayed actions.
128
+
85
129
  ## License and public policies
86
130
 
87
131
  By downloading, installing, copying, accessing, or using this SDK, you accept
@@ -9,7 +9,7 @@ distributed as source. Optional peer dependencies are not distributed with
9
9
  this package and remain subject to their own licenses.
10
10
 
11
11
  The inventory below records the direct and transitive runtime dependency
12
- versions resolved by the release workspace lockfile on July 16, 2026. A
12
+ versions resolved by the release workspace lockfile on July 18, 2026. A
13
13
  downstream application may resolve a different compatible transitive version
14
14
  and is responsible for reviewing the notices required by its own lockfile and
15
15
  distribution artifact.
@@ -17,6 +17,7 @@ distribution artifact.
17
17
  | Relationship | Package | Version | License |
18
18
  | ---------------- | ------------------------------ | ------: | ------------ |
19
19
  | Direct UI | `@radix-ui/react-alert-dialog` | 1.1.15 | MIT |
20
+ | Direct UI | `@radix-ui/react-avatar` | 1.1.11 | MIT |
20
21
  | Direct UI | `@radix-ui/react-checkbox` | 1.3.3 | MIT |
21
22
  | Direct UI | `@radix-ui/react-compose-refs` | 1.1.2 | MIT |
22
23
  | Direct UI | `@radix-ui/react-dialog` | 1.1.15 | MIT |
@@ -47,6 +48,7 @@ distribution artifact.
47
48
  | Ajv transitive | `json-schema-traverse` | 1.0.0 | MIT |
48
49
  | Ajv transitive | `require-from-string` | 2.0.2 | MIT |
49
50
  | Direct | `saxes` | 6.0.0 | ISC |
51
+ | Direct | `zod` | 4.4.3 | MIT |
50
52
  | Saxes transitive | `xmlchars` | 2.2.0 | MIT |
51
53
 
52
54
  ## License texts