@cloudparse/up-miniapps-sdk 0.9.0 → 0.11.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/dist/index.d.cts CHANGED
@@ -157,6 +157,27 @@ interface INetworkOptions {
157
157
  body?: unknown;
158
158
  /** Custom HTTP headers. */
159
159
  headers?: Record<string, string>;
160
+ /**
161
+ * Real production bug, found live: the shell's NETWORK_REQUEST handler
162
+ * (`up/shell`'s `use-miniapp-bridge.ts`) hard-caps every proxied request
163
+ * at a fixed 5s timeout (`fetch-with-timeout.ts`'s `DEFAULT_TIMEOUT_MS`)
164
+ * with no way for a mini-app to ask for more — a genuinely slow-but-legit
165
+ * backend call (e.g. an LLM chat turn routinely taking 3-7s+) gets
166
+ * silently aborted mid-flight ("context canceled" server-side) well
167
+ * before its own, longer server-side timeout would ever fire. Optional
168
+ * override, in milliseconds — omit for the shell's existing 5s default.
169
+ * Only meaningful for `sdk.network.request()`/host-proxied calls; has no
170
+ * effect on any other bridge message type. Governs TWO independent
171
+ * ceilings that must move together, not just the shell's own fetch: the
172
+ * shell's `fetchWithTimeout` call (the actual HTTP request) AND this
173
+ * bridge's own client-side promise wait for the native reply
174
+ * (`Bridge.send`'s own `timeoutMs`, default 30s — see `sdk.ts`'s
175
+ * `network.request`, which forwards this same value there too). Setting
176
+ * this only high enough for the first would still let the second time out
177
+ * first on anything over ~30s and silently reject with a generic "Bridge
178
+ * request timeout" instead of ever reaching the real HTTP response.
179
+ */
180
+ timeoutMs?: number;
160
181
  }
161
182
  /**
162
183
  * Response from a network proxy request.
@@ -377,6 +398,20 @@ interface ScrollConfig {
377
398
  loadingMore?: boolean;
378
399
  };
379
400
  }
401
+ /**
402
+ * Which system bars (status bar / navigation bar) to hide while this
403
+ * Mini-App is active. Any key omitted leaves that bar's current
404
+ * (host-driven) state untouched — pass only the bar(s) you want to
405
+ * override. The host resets to its own default the moment this Mini-App
406
+ * is no longer the active screen (exit, or the app being backgrounded/
407
+ * locked) — an override never outlives this Mini-App's own session.
408
+ */
409
+ interface SystemBarsHiddenConfig {
410
+ /** Hide/show the physical status bar. */
411
+ statusBar?: boolean;
412
+ /** Hide/show the physical navigation bar (3-button or gesture bar). */
413
+ navigationBar?: boolean;
414
+ }
380
415
  /**
381
416
  * Result of a `sdk.media.saveImage` call.
382
417
  */
@@ -637,6 +672,10 @@ type BridgeMessageType = {
637
672
  type: "SET_SCROLL_CONFIG";
638
673
  payload: ScrollConfig;
639
674
  callbackId: string;
675
+ } | {
676
+ type: "SET_SYSTEM_BARS_HIDDEN";
677
+ payload: SystemBarsHiddenConfig;
678
+ callbackId: string;
640
679
  } | {
641
680
  type: "SDK_ROUTING_GETROUTE";
642
681
  payload: {
@@ -1550,6 +1589,19 @@ declare class MiniAppSDK {
1550
1589
  /**
1551
1590
  * Performs a network request via the host shell.
1552
1591
  * @param options Request method, URL, headers, and body.
1592
+ *
1593
+ * Real bug, caught by reviewer-strict: `options.timeoutMs` only ever
1594
+ * reached the shell's own `fetchWithTimeout` call — this `bridge.send`
1595
+ * has an entirely separate client-side promise timeout (its own
1596
+ * `timeoutMs` param, default 30000ms) waiting for the native reply,
1597
+ * previously left at that default regardless of what `options.timeoutMs`
1598
+ * said. A slow-but-legitimate call given a longer `options.timeoutMs`
1599
+ * (e.g. 50000ms for an LLM-backed endpoint) would still get this
1600
+ * bridge-level promise rejected ("Bridge request timeout") at 30s,
1601
+ * reintroducing the exact same "aborted before it could finish" bug
1602
+ * this field exists to fix, one layer up. Forwarding it here means both
1603
+ * ceilings move together; omitted (`undefined`, every other caller)
1604
+ * falls through to `send`'s own unchanged 30000ms default.
1553
1605
  */
1554
1606
  request: <T = unknown>(options: INetworkOptions) => Promise<INetworkResponse<T>>;
1555
1607
  }>;
@@ -1624,6 +1676,18 @@ declare class MiniAppSDK {
1624
1676
  * @param config Scroll configuration for top/bottom detection.
1625
1677
  */
1626
1678
  setScrollConfig: (config: ScrollConfig) => Promise<void>;
1679
+ /**
1680
+ * Shows or hides the host's status bar / navigation bar while this
1681
+ * Mini-App is active — e.g. an immersive full-bleed map or video view.
1682
+ * Merges into any existing override: a key you omit keeps its current
1683
+ * value, pass `false` explicitly to un-hide a bar you'd previously
1684
+ * hidden. The host resets any override back to its own default the
1685
+ * moment this Mini-App stops being the active screen (exit, or the
1686
+ * app backgrounding/locking) — it never outlives this session and can
1687
+ * never keep a bar visible during an actual lock/security screen.
1688
+ * @param config Which bars to hide (`true`) or explicitly show (`false`).
1689
+ */
1690
+ setSystemBarsHidden: (config: SystemBarsHiddenConfig) => Promise<void>;
1627
1691
  }>;
1628
1692
  /**
1629
1693
  * Debug controls
@@ -1732,7 +1796,13 @@ interface ApiServiceClient {
1732
1796
  /** Current WebSocket backend URL, same resolution order as `baseUrl` but reading the dedicated ws fields instead. `undefined` if neither the shell nor `defaultWsBackendUrl` ever supplied one. */
1733
1797
  readonly wsUrl: string | undefined;
1734
1798
  get<T = unknown>(path: string): Promise<INetworkResponse<T>>;
1735
- post<T = unknown>(path: string, body?: unknown): Promise<INetworkResponse<T>>;
1799
+ /**
1800
+ * `timeoutMs` overrides the shell's default NETWORK_REQUEST timeout (5s,
1801
+ * see `INetworkOptions.timeoutMs`'s own doc comment) — pass it for a call
1802
+ * to a backend route that's legitimately slower than a typical REST call
1803
+ * (e.g. an LLM-backed endpoint), never as a blanket "just in case" bump.
1804
+ */
1805
+ post<T = unknown>(path: string, body?: unknown, timeoutMs?: number): Promise<INetworkResponse<T>>;
1736
1806
  patch<T = unknown>(path: string, body?: unknown): Promise<INetworkResponse<T>>;
1737
1807
  delete(path: string): Promise<INetworkResponse<void>>;
1738
1808
  graphqlQuery<T = unknown>(query: string, variables?: Record<string, unknown>): Promise<INetworkResponse<{
@@ -1953,4 +2023,4 @@ interface BroadcastWsServiceClient<TMessage extends WsMessage = WsMessage> {
1953
2023
  declare function createWsService<TMessage extends WsMessage = WsMessage>(options: CreateChannelWsServiceOptions<TMessage>): WsServiceClient<TMessage>;
1954
2024
  declare function createWsService<TMessage extends WsMessage = WsMessage>(options: CreateBroadcastWsServiceOptions<TMessage>): BroadcastWsServiceClient<TMessage>;
1955
2025
 
1956
- export { type ApiServiceClient, type BridgeMessageType, BridgeMocker, type BridgeMockerProps, type BroadcastWsServiceClient, type CenterCallbackParams, type CreateApiServiceOptions, type CreateBroadcastWsServiceOptions, type CreateChannelWsServiceOptions, type CreateWsServiceOptions, type CustomControl, DebugConsole, type DebugConsoleProps, type DeclarativeJourneyOptions, type DrawerState, type EtaData, type FidelityTransactionTypeType, type FlyToParams, GeolocationEvent, GlobalEvent, type HapticStyleType, type IAchievement, type IBridgeEnvelope, type IContextState, type IEdgeInsets, type IFidelityBalance, type IFidelityHistoryParams, type IFidelityTransaction, type IGenerateQrCodeOptions, type IInitializationOptions, type IInitializationResponse, type ILocationData, type INetworkOptions, type INetworkResponse, type IPaymentRequest, type IPickImageResult, type ISaveImageResult, type IUserProfile, type LiveRoutingOptions, type LiveRoutingResult, type LocationStreamConfig, Map, MapControls, MapControlsContext, type MapControlsProps, type MapControlsState, type MapInsets, MapMenu, MapMenuDivider, type MapMenuDividerProps, MapMenuFooter, type MapMenuFooterProps, MapMenuItem, type MapMenuItemProps, type MapMenuProps, MapMenuTitle, type MapMenuTitleProps, type MapProps, type MenuItem, MiniAppSDK, MockLocationContext, type MockLocationContextType, type NetworkMethodType, type POI, PullToRefresh, type PullToRefreshIndicatorState, type PullToRefreshProps, QRScanner, type QRScannerProps, RouteLayer, type RouteLayerProps, RouteRequest, RouteResponse, RouteStep, type SDKEvent, SDKMapProvider, SDKProvider, type SDKProviderProps, type ScrollConfig, type StreamAccelerometerData, type StreamHeadingData, type StreamLocationData, type StreamUpdatePayload, type SwipeAxisPriority, SwipeCarousel, type SwipeCarouselItem, type SwipeCarouselProps, type SwipeCarouselVerticalDragConfig, UIEvent, type UseJourneyOptions, type UseJourneyResult, type UserLocationState, type WsConnectionStatus, type WsMessage, type WsServiceClient, createApiService, createWsService, sdk as default, renderMap, sdk, useIsMocked, useJourney, useLiveRouting, useMapControls, useMockLocation, useRoute, useTapAction, useTrimmedRoute, useUserLocation };
2026
+ export { type ApiServiceClient, type BridgeMessageType, BridgeMocker, type BridgeMockerProps, type BroadcastWsServiceClient, type CenterCallbackParams, type CreateApiServiceOptions, type CreateBroadcastWsServiceOptions, type CreateChannelWsServiceOptions, type CreateWsServiceOptions, type CustomControl, DebugConsole, type DebugConsoleProps, type DeclarativeJourneyOptions, type DrawerState, type EtaData, type FidelityTransactionTypeType, type FlyToParams, GeolocationEvent, GlobalEvent, type HapticStyleType, type IAchievement, type IBridgeEnvelope, type IContextState, type IEdgeInsets, type IFidelityBalance, type IFidelityHistoryParams, type IFidelityTransaction, type IGenerateQrCodeOptions, type IInitializationOptions, type IInitializationResponse, type ILocationData, type INetworkOptions, type INetworkResponse, type IPaymentRequest, type IPickImageResult, type ISaveImageResult, type IUserProfile, type LiveRoutingOptions, type LiveRoutingResult, type LocationStreamConfig, Map, MapControls, MapControlsContext, type MapControlsProps, type MapControlsState, type MapInsets, MapMenu, MapMenuDivider, type MapMenuDividerProps, MapMenuFooter, type MapMenuFooterProps, MapMenuItem, type MapMenuItemProps, type MapMenuProps, MapMenuTitle, type MapMenuTitleProps, type MapProps, type MenuItem, MiniAppSDK, MockLocationContext, type MockLocationContextType, type NetworkMethodType, type POI, PullToRefresh, type PullToRefreshIndicatorState, type PullToRefreshProps, QRScanner, type QRScannerProps, RouteLayer, type RouteLayerProps, RouteRequest, RouteResponse, RouteStep, type SDKEvent, SDKMapProvider, SDKProvider, type SDKProviderProps, type ScrollConfig, type StreamAccelerometerData, type StreamHeadingData, type StreamLocationData, type StreamUpdatePayload, type SwipeAxisPriority, SwipeCarousel, type SwipeCarouselItem, type SwipeCarouselProps, type SwipeCarouselVerticalDragConfig, type SystemBarsHiddenConfig, UIEvent, type UseJourneyOptions, type UseJourneyResult, type UserLocationState, type WsConnectionStatus, type WsMessage, type WsServiceClient, createApiService, createWsService, sdk as default, renderMap, sdk, useIsMocked, useJourney, useLiveRouting, useMapControls, useMockLocation, useRoute, useTapAction, useTrimmedRoute, useUserLocation };
package/dist/index.d.ts CHANGED
@@ -157,6 +157,27 @@ interface INetworkOptions {
157
157
  body?: unknown;
158
158
  /** Custom HTTP headers. */
159
159
  headers?: Record<string, string>;
160
+ /**
161
+ * Real production bug, found live: the shell's NETWORK_REQUEST handler
162
+ * (`up/shell`'s `use-miniapp-bridge.ts`) hard-caps every proxied request
163
+ * at a fixed 5s timeout (`fetch-with-timeout.ts`'s `DEFAULT_TIMEOUT_MS`)
164
+ * with no way for a mini-app to ask for more — a genuinely slow-but-legit
165
+ * backend call (e.g. an LLM chat turn routinely taking 3-7s+) gets
166
+ * silently aborted mid-flight ("context canceled" server-side) well
167
+ * before its own, longer server-side timeout would ever fire. Optional
168
+ * override, in milliseconds — omit for the shell's existing 5s default.
169
+ * Only meaningful for `sdk.network.request()`/host-proxied calls; has no
170
+ * effect on any other bridge message type. Governs TWO independent
171
+ * ceilings that must move together, not just the shell's own fetch: the
172
+ * shell's `fetchWithTimeout` call (the actual HTTP request) AND this
173
+ * bridge's own client-side promise wait for the native reply
174
+ * (`Bridge.send`'s own `timeoutMs`, default 30s — see `sdk.ts`'s
175
+ * `network.request`, which forwards this same value there too). Setting
176
+ * this only high enough for the first would still let the second time out
177
+ * first on anything over ~30s and silently reject with a generic "Bridge
178
+ * request timeout" instead of ever reaching the real HTTP response.
179
+ */
180
+ timeoutMs?: number;
160
181
  }
161
182
  /**
162
183
  * Response from a network proxy request.
@@ -377,6 +398,20 @@ interface ScrollConfig {
377
398
  loadingMore?: boolean;
378
399
  };
379
400
  }
401
+ /**
402
+ * Which system bars (status bar / navigation bar) to hide while this
403
+ * Mini-App is active. Any key omitted leaves that bar's current
404
+ * (host-driven) state untouched — pass only the bar(s) you want to
405
+ * override. The host resets to its own default the moment this Mini-App
406
+ * is no longer the active screen (exit, or the app being backgrounded/
407
+ * locked) — an override never outlives this Mini-App's own session.
408
+ */
409
+ interface SystemBarsHiddenConfig {
410
+ /** Hide/show the physical status bar. */
411
+ statusBar?: boolean;
412
+ /** Hide/show the physical navigation bar (3-button or gesture bar). */
413
+ navigationBar?: boolean;
414
+ }
380
415
  /**
381
416
  * Result of a `sdk.media.saveImage` call.
382
417
  */
@@ -637,6 +672,10 @@ type BridgeMessageType = {
637
672
  type: "SET_SCROLL_CONFIG";
638
673
  payload: ScrollConfig;
639
674
  callbackId: string;
675
+ } | {
676
+ type: "SET_SYSTEM_BARS_HIDDEN";
677
+ payload: SystemBarsHiddenConfig;
678
+ callbackId: string;
640
679
  } | {
641
680
  type: "SDK_ROUTING_GETROUTE";
642
681
  payload: {
@@ -1550,6 +1589,19 @@ declare class MiniAppSDK {
1550
1589
  /**
1551
1590
  * Performs a network request via the host shell.
1552
1591
  * @param options Request method, URL, headers, and body.
1592
+ *
1593
+ * Real bug, caught by reviewer-strict: `options.timeoutMs` only ever
1594
+ * reached the shell's own `fetchWithTimeout` call — this `bridge.send`
1595
+ * has an entirely separate client-side promise timeout (its own
1596
+ * `timeoutMs` param, default 30000ms) waiting for the native reply,
1597
+ * previously left at that default regardless of what `options.timeoutMs`
1598
+ * said. A slow-but-legitimate call given a longer `options.timeoutMs`
1599
+ * (e.g. 50000ms for an LLM-backed endpoint) would still get this
1600
+ * bridge-level promise rejected ("Bridge request timeout") at 30s,
1601
+ * reintroducing the exact same "aborted before it could finish" bug
1602
+ * this field exists to fix, one layer up. Forwarding it here means both
1603
+ * ceilings move together; omitted (`undefined`, every other caller)
1604
+ * falls through to `send`'s own unchanged 30000ms default.
1553
1605
  */
1554
1606
  request: <T = unknown>(options: INetworkOptions) => Promise<INetworkResponse<T>>;
1555
1607
  }>;
@@ -1624,6 +1676,18 @@ declare class MiniAppSDK {
1624
1676
  * @param config Scroll configuration for top/bottom detection.
1625
1677
  */
1626
1678
  setScrollConfig: (config: ScrollConfig) => Promise<void>;
1679
+ /**
1680
+ * Shows or hides the host's status bar / navigation bar while this
1681
+ * Mini-App is active — e.g. an immersive full-bleed map or video view.
1682
+ * Merges into any existing override: a key you omit keeps its current
1683
+ * value, pass `false` explicitly to un-hide a bar you'd previously
1684
+ * hidden. The host resets any override back to its own default the
1685
+ * moment this Mini-App stops being the active screen (exit, or the
1686
+ * app backgrounding/locking) — it never outlives this session and can
1687
+ * never keep a bar visible during an actual lock/security screen.
1688
+ * @param config Which bars to hide (`true`) or explicitly show (`false`).
1689
+ */
1690
+ setSystemBarsHidden: (config: SystemBarsHiddenConfig) => Promise<void>;
1627
1691
  }>;
1628
1692
  /**
1629
1693
  * Debug controls
@@ -1732,7 +1796,13 @@ interface ApiServiceClient {
1732
1796
  /** Current WebSocket backend URL, same resolution order as `baseUrl` but reading the dedicated ws fields instead. `undefined` if neither the shell nor `defaultWsBackendUrl` ever supplied one. */
1733
1797
  readonly wsUrl: string | undefined;
1734
1798
  get<T = unknown>(path: string): Promise<INetworkResponse<T>>;
1735
- post<T = unknown>(path: string, body?: unknown): Promise<INetworkResponse<T>>;
1799
+ /**
1800
+ * `timeoutMs` overrides the shell's default NETWORK_REQUEST timeout (5s,
1801
+ * see `INetworkOptions.timeoutMs`'s own doc comment) — pass it for a call
1802
+ * to a backend route that's legitimately slower than a typical REST call
1803
+ * (e.g. an LLM-backed endpoint), never as a blanket "just in case" bump.
1804
+ */
1805
+ post<T = unknown>(path: string, body?: unknown, timeoutMs?: number): Promise<INetworkResponse<T>>;
1736
1806
  patch<T = unknown>(path: string, body?: unknown): Promise<INetworkResponse<T>>;
1737
1807
  delete(path: string): Promise<INetworkResponse<void>>;
1738
1808
  graphqlQuery<T = unknown>(query: string, variables?: Record<string, unknown>): Promise<INetworkResponse<{
@@ -1953,4 +2023,4 @@ interface BroadcastWsServiceClient<TMessage extends WsMessage = WsMessage> {
1953
2023
  declare function createWsService<TMessage extends WsMessage = WsMessage>(options: CreateChannelWsServiceOptions<TMessage>): WsServiceClient<TMessage>;
1954
2024
  declare function createWsService<TMessage extends WsMessage = WsMessage>(options: CreateBroadcastWsServiceOptions<TMessage>): BroadcastWsServiceClient<TMessage>;
1955
2025
 
1956
- export { type ApiServiceClient, type BridgeMessageType, BridgeMocker, type BridgeMockerProps, type BroadcastWsServiceClient, type CenterCallbackParams, type CreateApiServiceOptions, type CreateBroadcastWsServiceOptions, type CreateChannelWsServiceOptions, type CreateWsServiceOptions, type CustomControl, DebugConsole, type DebugConsoleProps, type DeclarativeJourneyOptions, type DrawerState, type EtaData, type FidelityTransactionTypeType, type FlyToParams, GeolocationEvent, GlobalEvent, type HapticStyleType, type IAchievement, type IBridgeEnvelope, type IContextState, type IEdgeInsets, type IFidelityBalance, type IFidelityHistoryParams, type IFidelityTransaction, type IGenerateQrCodeOptions, type IInitializationOptions, type IInitializationResponse, type ILocationData, type INetworkOptions, type INetworkResponse, type IPaymentRequest, type IPickImageResult, type ISaveImageResult, type IUserProfile, type LiveRoutingOptions, type LiveRoutingResult, type LocationStreamConfig, Map, MapControls, MapControlsContext, type MapControlsProps, type MapControlsState, type MapInsets, MapMenu, MapMenuDivider, type MapMenuDividerProps, MapMenuFooter, type MapMenuFooterProps, MapMenuItem, type MapMenuItemProps, type MapMenuProps, MapMenuTitle, type MapMenuTitleProps, type MapProps, type MenuItem, MiniAppSDK, MockLocationContext, type MockLocationContextType, type NetworkMethodType, type POI, PullToRefresh, type PullToRefreshIndicatorState, type PullToRefreshProps, QRScanner, type QRScannerProps, RouteLayer, type RouteLayerProps, RouteRequest, RouteResponse, RouteStep, type SDKEvent, SDKMapProvider, SDKProvider, type SDKProviderProps, type ScrollConfig, type StreamAccelerometerData, type StreamHeadingData, type StreamLocationData, type StreamUpdatePayload, type SwipeAxisPriority, SwipeCarousel, type SwipeCarouselItem, type SwipeCarouselProps, type SwipeCarouselVerticalDragConfig, UIEvent, type UseJourneyOptions, type UseJourneyResult, type UserLocationState, type WsConnectionStatus, type WsMessage, type WsServiceClient, createApiService, createWsService, sdk as default, renderMap, sdk, useIsMocked, useJourney, useLiveRouting, useMapControls, useMockLocation, useRoute, useTapAction, useTrimmedRoute, useUserLocation };
2026
+ export { type ApiServiceClient, type BridgeMessageType, BridgeMocker, type BridgeMockerProps, type BroadcastWsServiceClient, type CenterCallbackParams, type CreateApiServiceOptions, type CreateBroadcastWsServiceOptions, type CreateChannelWsServiceOptions, type CreateWsServiceOptions, type CustomControl, DebugConsole, type DebugConsoleProps, type DeclarativeJourneyOptions, type DrawerState, type EtaData, type FidelityTransactionTypeType, type FlyToParams, GeolocationEvent, GlobalEvent, type HapticStyleType, type IAchievement, type IBridgeEnvelope, type IContextState, type IEdgeInsets, type IFidelityBalance, type IFidelityHistoryParams, type IFidelityTransaction, type IGenerateQrCodeOptions, type IInitializationOptions, type IInitializationResponse, type ILocationData, type INetworkOptions, type INetworkResponse, type IPaymentRequest, type IPickImageResult, type ISaveImageResult, type IUserProfile, type LiveRoutingOptions, type LiveRoutingResult, type LocationStreamConfig, Map, MapControls, MapControlsContext, type MapControlsProps, type MapControlsState, type MapInsets, MapMenu, MapMenuDivider, type MapMenuDividerProps, MapMenuFooter, type MapMenuFooterProps, MapMenuItem, type MapMenuItemProps, type MapMenuProps, MapMenuTitle, type MapMenuTitleProps, type MapProps, type MenuItem, MiniAppSDK, MockLocationContext, type MockLocationContextType, type NetworkMethodType, type POI, PullToRefresh, type PullToRefreshIndicatorState, type PullToRefreshProps, QRScanner, type QRScannerProps, RouteLayer, type RouteLayerProps, RouteRequest, RouteResponse, RouteStep, type SDKEvent, SDKMapProvider, SDKProvider, type SDKProviderProps, type ScrollConfig, type StreamAccelerometerData, type StreamHeadingData, type StreamLocationData, type StreamUpdatePayload, type SwipeAxisPriority, SwipeCarousel, type SwipeCarouselItem, type SwipeCarouselProps, type SwipeCarouselVerticalDragConfig, type SystemBarsHiddenConfig, UIEvent, type UseJourneyOptions, type UseJourneyResult, type UserLocationState, type WsConnectionStatus, type WsMessage, type WsServiceClient, createApiService, createWsService, sdk as default, renderMap, sdk, useIsMocked, useJourney, useLiveRouting, useMapControls, useMockLocation, useRoute, useTapAction, useTrimmedRoute, useUserLocation };
package/dist/index.js CHANGED
@@ -3441,7 +3441,7 @@ var loadImage2 = (src) => new Promise((resolve, reject) => {
3441
3441
  });
3442
3442
 
3443
3443
  // package.json
3444
- var version = "0.9.0";
3444
+ var version = "0.11.0";
3445
3445
 
3446
3446
  // src/sdk.ts
3447
3447
  function deepFreeze(obj) {
@@ -3635,9 +3635,22 @@ var MiniAppSDK = class {
3635
3635
  /**
3636
3636
  * Performs a network request via the host shell.
3637
3637
  * @param options Request method, URL, headers, and body.
3638
+ *
3639
+ * Real bug, caught by reviewer-strict: `options.timeoutMs` only ever
3640
+ * reached the shell's own `fetchWithTimeout` call — this `bridge.send`
3641
+ * has an entirely separate client-side promise timeout (its own
3642
+ * `timeoutMs` param, default 30000ms) waiting for the native reply,
3643
+ * previously left at that default regardless of what `options.timeoutMs`
3644
+ * said. A slow-but-legitimate call given a longer `options.timeoutMs`
3645
+ * (e.g. 50000ms for an LLM-backed endpoint) would still get this
3646
+ * bridge-level promise rejected ("Bridge request timeout") at 30s,
3647
+ * reintroducing the exact same "aborted before it could finish" bug
3648
+ * this field exists to fix, one layer up. Forwarding it here means both
3649
+ * ceilings move together; omitted (`undefined`, every other caller)
3650
+ * falls through to `send`'s own unchanged 30000ms default.
3638
3651
  */
3639
3652
  request: async (options) => {
3640
- return this.bridge.send("NETWORK_REQUEST", options);
3653
+ return this.bridge.send("NETWORK_REQUEST", options, options.timeoutMs);
3641
3654
  }
3642
3655
  });
3643
3656
  /**
@@ -3709,7 +3722,19 @@ var MiniAppSDK = class {
3709
3722
  * Configures native scroll behaviors like Pull-to-Refresh and Infinite Scroll.
3710
3723
  * @param config Scroll configuration for top/bottom detection.
3711
3724
  */
3712
- setScrollConfig: (config) => this.bridge.send("SET_SCROLL_CONFIG", config)
3725
+ setScrollConfig: (config) => this.bridge.send("SET_SCROLL_CONFIG", config),
3726
+ /**
3727
+ * Shows or hides the host's status bar / navigation bar while this
3728
+ * Mini-App is active — e.g. an immersive full-bleed map or video view.
3729
+ * Merges into any existing override: a key you omit keeps its current
3730
+ * value, pass `false` explicitly to un-hide a bar you'd previously
3731
+ * hidden. The host resets any override back to its own default the
3732
+ * moment this Mini-App stops being the active screen (exit, or the
3733
+ * app backgrounding/locking) — it never outlives this session and can
3734
+ * never keep a bar visible during an actual lock/security screen.
3735
+ * @param config Which bars to hide (`true`) or explicitly show (`false`).
3736
+ */
3737
+ setSystemBarsHidden: (config) => this.bridge.send("SET_SYSTEM_BARS_HIDDEN", config)
3713
3738
  });
3714
3739
  /**
3715
3740
  * Debug controls
@@ -4279,7 +4304,7 @@ var BridgeMocker = ({
4279
4304
  transactionId: `tx_${Math.random().toString(36).slice(2)}`
4280
4305
  });
4281
4306
  }
4282
- if (type === "TRIGGER_HAPTIC" || type === "EXIT" || type === "UPDATE_CONTEXT") {
4307
+ if (type === "TRIGGER_HAPTIC" || type === "EXIT" || type === "UPDATE_CONTEXT" || type === "SET_SYSTEM_BARS_HIDDEN") {
4283
4308
  return Promise.resolve({ success: true });
4284
4309
  }
4285
4310
  return originalSend(type, payload);
@@ -5406,10 +5431,11 @@ function createApiService(options) {
5406
5431
  method: "PATCH",
5407
5432
  url: buildUrl(getBaseUrl(), path)
5408
5433
  }),
5409
- post: (path, body) => sdk.network.request({
5434
+ post: (path, body, timeoutMs) => sdk.network.request({
5410
5435
  body,
5411
5436
  headers: { "Content-Type": "application/json" },
5412
5437
  method: "POST",
5438
+ timeoutMs,
5413
5439
  url: buildUrl(getBaseUrl(), path)
5414
5440
  }),
5415
5441
  get wsUrl() {