@mentra/jspolyfill 0.1.0-beta.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/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # @mentra/jspolyfill
2
+
3
+ The MentraJS polyfill bundle. MentraOS runs each miniapp in its own bare JS
4
+ context (JavaScriptCore on iOS, QuickJS on Android); this package provides the
5
+ browser-like standard library those contexts lack — `console`, timers,
6
+ `fetch`, `WebSocket`, `localStorage`, `crypto.subtle` — implemented over a
7
+ single `__dispatch` native bridge, plus the `__deliver` / `signalReady`
8
+ plumbing the host runtime relies on.
9
+
10
+ You don't import this package from app code: it's a **peer of the runtime
11
+ stack**. [`@mentra/crust`](https://www.npmjs.com/package/@mentra/crust)'s
12
+ Android build reads the bundle from this package's `assets/` at build time,
13
+ and the engine injects it into each miniapp context at spawn.
14
+
15
+ ## Install
16
+
17
+ Installed automatically alongside
18
+ [`@mentra/engine`](https://www.npmjs.com/package/@mentra/engine) /
19
+ `@mentra/crust`. For direct use:
20
+
21
+ ```sh
22
+ npm install @mentra/jspolyfill@dev
23
+ ```
24
+
25
+ > Currently published on the `dev` dist-tag (prerelease channel).
26
+
27
+ ## Part of MentraOS
28
+
29
+ Source lives in the [MentraOS monorepo](https://github.com/Mentra-Community/MentraOS)
30
+ under `mobile/modules/jspolyfill`. Issues and contributions welcome there.