@alien_org/contract 0.2.1 → 0.2.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/dist/index.d.cts CHANGED
@@ -197,6 +197,16 @@ declare const PLATFORMS: readonly ["ios", "android"];
197
197
  * Platform the miniapp is running on.
198
198
  */
199
199
  type Platform = (typeof PLATFORMS)[number];
200
+ /**
201
+ * Safe area insets in CSS pixels, injected by the host app.
202
+ * Accounts for system UI (status bar, notch, home indicator, nav bar).
203
+ */
204
+ interface SafeAreaInsets {
205
+ top: number;
206
+ right: number;
207
+ bottom: number;
208
+ left: number;
209
+ }
200
210
  /**
201
211
  * Launch parameters injected by the host app.
202
212
  */
@@ -209,6 +219,8 @@ interface LaunchParams {
209
219
  hostAppVersion: string | undefined;
210
220
  /** Platform the miniapp is running on */
211
221
  platform: Platform | undefined;
222
+ /** Safe area insets for the webview in CSS pixels */
223
+ safeAreaInsets: SafeAreaInsets | undefined;
212
224
  /**
213
225
  * Custom start parameter injected by host app.
214
226
  * Used for referral codes, campaign tracking, or custom routing.
@@ -476,4 +488,4 @@ declare function isMethodSupported(method: MethodName, version: Version): boolea
476
488
  */
477
489
  declare function getMethodMinVersion(method: MethodName): Version | undefined;
478
490
  //#endregion
479
- export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
491
+ export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type SafeAreaInsets, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
package/dist/index.d.mts CHANGED
@@ -197,6 +197,16 @@ declare const PLATFORMS: readonly ["ios", "android"];
197
197
  * Platform the miniapp is running on.
198
198
  */
199
199
  type Platform = (typeof PLATFORMS)[number];
200
+ /**
201
+ * Safe area insets in CSS pixels, injected by the host app.
202
+ * Accounts for system UI (status bar, notch, home indicator, nav bar).
203
+ */
204
+ interface SafeAreaInsets {
205
+ top: number;
206
+ right: number;
207
+ bottom: number;
208
+ left: number;
209
+ }
200
210
  /**
201
211
  * Launch parameters injected by the host app.
202
212
  */
@@ -209,6 +219,8 @@ interface LaunchParams {
209
219
  hostAppVersion: string | undefined;
210
220
  /** Platform the miniapp is running on */
211
221
  platform: Platform | undefined;
222
+ /** Safe area insets for the webview in CSS pixels */
223
+ safeAreaInsets: SafeAreaInsets | undefined;
212
224
  /**
213
225
  * Custom start parameter injected by host app.
214
226
  * Used for referral codes, campaign tracking, or custom routing.
@@ -476,4 +488,4 @@ declare function isMethodSupported(method: MethodName, version: Version): boolea
476
488
  */
477
489
  declare function getMethodMinVersion(method: MethodName): Version | undefined;
478
490
  //#endregion
479
- export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
491
+ export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type SafeAreaInsets, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alien_org/contract",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",