@alien_org/contract 1.0.0-alpha.3 → 1.0.0-alpha.4

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
@@ -120,6 +120,18 @@ interface LaunchParams {
120
120
  }
121
121
  ```
122
122
 
123
+ ### DisplayMode
124
+
125
+ Controls how the host app renders the miniapp webview.
126
+
127
+ | Mode | Header | Close / Options | WebView area | Use case |
128
+ | ---- | ------ | --------------- | ------------ | -------- |
129
+ | `standard` | Visible (title, close, options) | In header | Below header | Default for most miniapps |
130
+ | `fullscreen` | Hidden | Floating overlay | Entire screen | Games, media, maps |
131
+ | `immersive` | Hidden | **None** | Entire screen | Custom UIs that provide their own exit (must call `app:close`) |
132
+
133
+ In all modes the miniapp receives `safeAreaInsets` and should respect them for system UI (status bar, notch, home indicator).
134
+
123
135
  ## Adding New Methods/Events
124
136
 
125
137
  1. Define in `src/methods/definitions/methods.ts` or `src/events/definitions/events.ts`
package/dist/index.cjs CHANGED
@@ -6,9 +6,20 @@
6
6
  const PLATFORMS = ["ios", "android"];
7
7
  /**
8
8
  * Supported display modes for miniapps.
9
- * - `standard` — standard webview with native chrome
10
- * - `fullscreen` — fullscreen webview, native controls still visible
11
- * - `immersive` no native UI elements at all (no close button, options, etc.)
9
+ *
10
+ * - `standard` — Default. Native header with close button, options menu, and
11
+ * miniapp title is visible. WebView is inset below the header. Safe area
12
+ * insets account for the header height.
13
+ *
14
+ * - `fullscreen` — WebView occupies the entire screen. The native close button
15
+ * and options menu remain as floating overlays so the user can always exit.
16
+ * The miniapp must respect safe area insets for system UI (status bar, notch,
17
+ * home indicator).
18
+ *
19
+ * - `immersive` — WebView occupies the entire screen with zero native UI.
20
+ * No close button, no options menu, no header — the miniapp owns the full
21
+ * viewport. The miniapp is responsible for providing its own exit mechanism
22
+ * (e.g. calling `app:close`). Safe area insets still apply for system UI.
12
23
  */
13
24
  const DISPLAY_MODES = [
14
25
  "standard",
package/dist/index.d.cts CHANGED
@@ -322,9 +322,20 @@ declare const PLATFORMS: readonly ["ios", "android"];
322
322
  type Platform = (typeof PLATFORMS)[number];
323
323
  /**
324
324
  * Supported display modes for miniapps.
325
- * - `standard` — standard webview with native chrome
326
- * - `fullscreen` — fullscreen webview, native controls still visible
327
- * - `immersive` no native UI elements at all (no close button, options, etc.)
325
+ *
326
+ * - `standard` — Default. Native header with close button, options menu, and
327
+ * miniapp title is visible. WebView is inset below the header. Safe area
328
+ * insets account for the header height.
329
+ *
330
+ * - `fullscreen` — WebView occupies the entire screen. The native close button
331
+ * and options menu remain as floating overlays so the user can always exit.
332
+ * The miniapp must respect safe area insets for system UI (status bar, notch,
333
+ * home indicator).
334
+ *
335
+ * - `immersive` — WebView occupies the entire screen with zero native UI.
336
+ * No close button, no options menu, no header — the miniapp owns the full
337
+ * viewport. The miniapp is responsible for providing its own exit mechanism
338
+ * (e.g. calling `app:close`). Safe area insets still apply for system UI.
328
339
  */
329
340
  declare const DISPLAY_MODES: readonly ["standard", "fullscreen", "immersive"];
330
341
  /**
package/dist/index.d.mts CHANGED
@@ -322,9 +322,20 @@ declare const PLATFORMS: readonly ["ios", "android"];
322
322
  type Platform = (typeof PLATFORMS)[number];
323
323
  /**
324
324
  * Supported display modes for miniapps.
325
- * - `standard` — standard webview with native chrome
326
- * - `fullscreen` — fullscreen webview, native controls still visible
327
- * - `immersive` no native UI elements at all (no close button, options, etc.)
325
+ *
326
+ * - `standard` — Default. Native header with close button, options menu, and
327
+ * miniapp title is visible. WebView is inset below the header. Safe area
328
+ * insets account for the header height.
329
+ *
330
+ * - `fullscreen` — WebView occupies the entire screen. The native close button
331
+ * and options menu remain as floating overlays so the user can always exit.
332
+ * The miniapp must respect safe area insets for system UI (status bar, notch,
333
+ * home indicator).
334
+ *
335
+ * - `immersive` — WebView occupies the entire screen with zero native UI.
336
+ * No close button, no options menu, no header — the miniapp owns the full
337
+ * viewport. The miniapp is responsible for providing its own exit mechanism
338
+ * (e.g. calling `app:close`). Safe area insets still apply for system UI.
328
339
  */
329
340
  declare const DISPLAY_MODES: readonly ["standard", "fullscreen", "immersive"];
330
341
  /**
package/dist/index.mjs CHANGED
@@ -5,9 +5,20 @@
5
5
  const PLATFORMS = ["ios", "android"];
6
6
  /**
7
7
  * Supported display modes for miniapps.
8
- * - `standard` — standard webview with native chrome
9
- * - `fullscreen` — fullscreen webview, native controls still visible
10
- * - `immersive` no native UI elements at all (no close button, options, etc.)
8
+ *
9
+ * - `standard` — Default. Native header with close button, options menu, and
10
+ * miniapp title is visible. WebView is inset below the header. Safe area
11
+ * insets account for the header height.
12
+ *
13
+ * - `fullscreen` — WebView occupies the entire screen. The native close button
14
+ * and options menu remain as floating overlays so the user can always exit.
15
+ * The miniapp must respect safe area insets for system UI (status bar, notch,
16
+ * home indicator).
17
+ *
18
+ * - `immersive` — WebView occupies the entire screen with zero native UI.
19
+ * No close button, no options menu, no header — the miniapp owns the full
20
+ * viewport. The miniapp is responsible for providing its own exit mechanism
21
+ * (e.g. calling `app:close`). Safe area insets still apply for system UI.
11
22
  */
12
23
  const DISPLAY_MODES = [
13
24
  "standard",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alien_org/contract",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",