@stacksjs/mobile 0.75.96 → 0.75.98

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/tab-bar.d.ts CHANGED
@@ -4,6 +4,18 @@ export type { NativeTab, NativeTabBarOptions } from 'craft-native/mobile';
4
4
  export declare function readTabLinks(nav: ParentNode): TabLink[];
5
5
  /** The native bar's description of those links: the tabs, and which is current. */
6
6
  export declare function nativeTabs(links: TabLink[]): { tabs: NativeTab[], selected?: string };
7
+ /** Whether the stx router runs the tabs itself (`data-stx-nav="tab"`, re-select included). */
8
+ export declare function routerHandlesTabs(): boolean;
9
+ /**
10
+ * Choosing the tab already current scrolls its screen back to the top, as on
11
+ * iOS, and announces `stx:tabreselect` { href } for a screen that wants to do
12
+ * more (a list that resets its filter).
13
+ *
14
+ * The stx router does this itself for `data-stx-nav="tab"` links, popping to
15
+ * the tab's root on a second choice; this covers a router that predates tabs,
16
+ * and stands aside wherever the router has them.
17
+ */
18
+ export declare function handleTabReselect(nav: HTMLElement, options?: TabReselectOptions): () => void;
7
19
  /**
8
20
  * Mirror `nav`'s tabs into the native tab bar, for as long as the returned
9
21
  * function is not called. Answers null when there is no native bar, and the
@@ -26,6 +38,9 @@ export declare interface TabLink {
26
38
  badge: string
27
39
  current: boolean
28
40
  }
41
+ export declare interface TabReselectOptions {
42
+ scrollToTop?: () => void
43
+ }
29
44
  export declare interface MirrorTabBarOptions {
30
45
  hidden?: () => boolean
31
46
  api?: TabBarApi
package/dist/types.d.ts CHANGED
@@ -73,6 +73,22 @@ export declare interface MobileApi {
73
73
  health: HealthApi
74
74
  liveActivities: LiveActivitiesApi
75
75
  watchConnectivity: WatchConnectivityApi
76
+ dialog: import('./native').DialogApi
77
+ contextMenu: import('./native').ContextMenuApi
78
+ browser: import('./native').BrowserApi
79
+ symbols: import('./native').SymbolsApi
80
+ statusBar: import('./native').StatusBarApi
81
+ chrome: import('./native').ChromeApi
82
+ refresh: import('./native').RefreshApi
83
+ background: import('./native').BackgroundApi
84
+ clipboard: import('./native').ClipboardApi
85
+ db: import('./native').DatabaseApi
86
+ files: import('./native').FilesApi
87
+ shortcuts: import('./native').ShortcutsApi
88
+ widgets: import('./native').WidgetsApi
89
+ orientation: import('./native').OrientationApi
90
+ auth: import('./native').AuthApi
91
+ storeKit: import('./native').StoreKitApi
76
92
  isNativeMobile: () => boolean
77
93
  whenNative: (timeoutMs?: number) => Promise<boolean>
78
94
  onReady: (callback: (event: CraftReadyEvent) => void) => () => void
@@ -169,6 +185,7 @@ export declare interface HapticsApi {
169
185
  notification: (type?: HapticNotificationType) => Promise<void>
170
186
  selection: () => Promise<void>
171
187
  vibrate: (pattern: number[]) => Promise<void>
188
+ prepare: (kind?: HapticKind) => Promise<void>
172
189
  }
173
190
  export declare interface PermissionsApi {
174
191
  check: (permission: PermissionType) => Promise<PermissionStatus>
@@ -358,6 +375,7 @@ export type PermissionStatus = 'granted' | 'denied' | 'undetermined' | 'restrict
358
375
  */
359
376
  export type BiometricType = 'faceId' | 'touchId' | 'fingerprint' | 'face' | 'iris' | 'none';
360
377
  export type AppState = 'active' | 'inactive' | 'background';
378
+ export type HapticKind = 'impact' | 'notification' | 'selection';
361
379
  export type HealthDataType = | 'steps'
362
380
  | 'heartRate'
363
381
  | 'activeEnergy'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/mobile",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.96",
5
+ "version": "0.75.98",
6
6
  "description": "Craft-powered native mobile runtime for Stacks and STX applications",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -32,10 +32,10 @@
32
32
  "test": "bun test"
33
33
  },
34
34
  "dependencies": {
35
- "craft-native": ">=0.0.123"
35
+ "craft-native": ">=0.0.124"
36
36
  },
37
37
  "devDependencies": {
38
- "@stacksjs/build": "0.75.96",
38
+ "@stacksjs/build": "0.75.98",
39
39
  "better-dx": "^0.2.24"
40
40
  }
41
41
  }