@stacksjs/mobile 0.75.519 → 0.75.522

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.
@@ -2,15 +2,6 @@ import { BugHQClient } from '@bughq/sdk';
2
2
  import type { Breadcrumb, BugHQConfig } from '@bughq/sdk';
3
3
  /** Whether a breadcrumb is worth keeping: a failed request, or anything not a request. */
4
4
  export declare function keepBreadcrumb(crumb: Breadcrumb): boolean;
5
- /** The native reporter, when this page runs in an app built with it. */
6
- declare function nativeReporter(): boolean;
7
- /**
8
- * The transport inside the app. Without the native reporter (an app built
9
- * without crash reporting, or a bridge that is gone) the event goes over HTTP
10
- * when the page was given a key of its own, and is dropped when it was not:
11
- * there is nowhere to send it.
12
- */
13
- declare function handOver(hasOwnKey: boolean): NonNullable<BugHQConfig['transport']>;
14
5
  declare let client: BugHQClient | null;
15
6
  /**
16
7
  * @defaultValue
@@ -46,3 +37,4 @@ export declare const crashReporting: {
46
37
  stop: () => void
47
38
  };
48
39
  export declare interface CrashReportingOptions extends Omit<BugHQConfig, 'transport'> {}
40
+ export {};
package/dist/index.d.ts CHANGED
@@ -7,15 +7,7 @@ import { BugHQClient, Breadcrumb, BugHQConfig } from '@bughq/sdk';
7
7
  import { NativeTab } from 'craft-native/mobile';
8
8
 
9
9
  // From: src/index.ts
10
- declare function locationRecordingOwnership(): boolean;
11
- declare function locationRecordingPowerMode(): boolean;
12
- declare function heartRateRecordingOwnership(): boolean;
13
- declare function locationRecordingIntentIdentity(): boolean;
14
- declare function heartRateRecordingIntentIdentity(): boolean;
15
- declare function recordingStartCall<T extends { id: string | null }>(options: { recordingId?: string } | undefined, supported: () => boolean, call: () => Promise<T>): Promise<T>;
16
- declare function recordingCall<T>(options: { expectedId?: string } | undefined, supported: () => boolean, call: () => Promise<T>): Promise<T>;
17
10
  declare function normalizeDeepLinkURL(value: unknown): string | null;
18
- declare function host(): CraftHost | undefined;
19
11
  /** Reads the current host, including a bridge injected after this module loaded. */
20
12
  declare function getNativeMobileBridge(): CraftMobileBridge | null;
21
13
  declare function isNativeMobile(): boolean;
@@ -265,15 +257,6 @@ declare interface SegmentScrubOptions {
265
257
  // From: src/crash-reporting.ts
266
258
  /** Whether a breadcrumb is worth keeping: a failed request, or anything not a request. */
267
259
  declare function keepBreadcrumb(crumb: Breadcrumb): boolean;
268
- /** The native reporter, when this page runs in an app built with it. */
269
- declare function nativeReporter(): boolean;
270
- /**
271
- * The transport inside the app. Without the native reporter (an app built
272
- * without crash reporting, or a bridge that is gone) the event goes over HTTP
273
- * when the page was given a key of its own, and is dropped when it was not:
274
- * there is nowhere to send it.
275
- */
276
- declare function handOver(hasOwnKey: boolean): NonNullable<BugHQConfig['transport']>;
277
260
  declare let client: BugHQClient | null;
278
261
  /**
279
262
  * @defaultValue
@@ -610,13 +593,10 @@ declare interface RouteRecorder {
610
593
  }
611
594
 
612
595
  // From: src/scheduled-workouts.ts
613
- declare function native(): Record<string, any> | undefined;
614
596
  /** The rejection every call but `isSupported()` gets where nothing can schedule. */
615
597
  declare function scheduledWorkoutsUnsupported(): Error;
616
- declare function authorizationOf(value: unknown): ScheduledWorkoutsAuthorization;
617
598
  /** A row of `list()`, or null for one that is not a scheduled plan. */
618
599
  declare function normalizeScheduledWorkout(value: unknown): ScheduledWorkout | null;
619
- declare function call<T>(method: ScheduledWorkoutsMethod, normalize: (value: unknown) => T, ...args: unknown[]): Promise<T>;
620
600
  declare const scheduledWorkouts: ScheduledWorkoutsApi;
621
601
  declare interface AppleWorkoutStep {
622
602
  goal: AppleWorkoutGoal
@@ -684,7 +664,6 @@ type AppleWorkoutAlert = | { type: 'heartRate', min: number, max: number }
684
664
  type ScheduledWorkoutsMethod = 'isSupported' | 'authorization' | 'requestAuthorization' | 'list' | 'schedule' | 'remove' | 'removeAll';
685
665
 
686
666
  // From: src/passkeys.ts
687
- declare function unavailable(): never;
688
667
  /** The native system sheet returns JSON credentials for server verification. */
689
668
  declare const passkeys: PasskeysApi;
690
669
  /** JSON WebAuthn options as supplied by the relying party's server. */
@@ -761,7 +740,6 @@ declare interface IndoorFix {
761
740
  type IndoorVerdict = 'indoors' | 'outside' | 'unsure';
762
741
 
763
742
  // From: src/native.ts
764
- declare function hostNavigator(): Navigator | undefined;
765
743
  /** A rectangle the bridge can serialise: getBoundingClientRect() returns a DOMRect, which it cannot. */
766
744
  declare function toNativeRect(rect: { x?: number, y?: number, left?: number, top?: number, width: number, height: number }): NativeRect;
767
745
  /** Shows an action sheet: `useActionSheet()(options)`, for a page that keeps the function. */
@@ -777,11 +755,6 @@ declare function confirmAction(options: ConfirmActionOptions): Promise<boolean>;
777
755
  * Resolves with the chosen item's id, or null.
778
756
  */
779
757
  declare function showContextMenuFor(element: Element, options: Omit<ContextMenuOptions, 'anchor'>): Promise<string | null>;
780
- declare function openOnTheWeb(url: string, options: BrowserOpenOptions): BrowserResult;
781
- declare function symbolKey(name: string, options: SymbolOptions): string;
782
- declare function downloadOnTheWeb(href: string, filename: string): string | null;
783
- declare function pickOnTheWeb(types: string[]): Promise<PickedFile | null>;
784
- declare function screenOrientation(): LockableOrientation | undefined;
785
758
  declare const done: () => true;
786
759
  declare const no: () => false;
787
760
  declare const nothing: () => null;
@@ -939,7 +912,6 @@ declare interface OrientationApi {
939
912
  lock: (orientation: OrientationLock) => Promise<boolean>
940
913
  unlock: () => Promise<boolean>
941
914
  }
942
- declare interface LockableOrientation { lock?: (orientation: string) => Promise<void>, unlock?: () => void }
943
915
  // ---------------------------------------------------------------------------
944
916
  // Sign in with Apple
945
917
  declare interface AppleSignInResult {
@@ -2121,8 +2093,6 @@ type HealthReadMethod = 'getWorkouts' | 'getDailyStatistics' | 'getHeartRateSamp
2121
2093
  | 'startHeartRateUpdates' | 'stopHeartRateUpdates';
2122
2094
 
2123
2095
  // From: src/storage.ts
2124
- declare function supportsCompareAndSet(): boolean;
2125
- declare function supportsSetIfAbsent(): boolean;
2126
2096
  declare const storage: StorageApi;
2127
2097
 
2128
2098
  // From: src/crypto.ts
package/dist/native.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import type { ActionSheetOptions, AlertOptions, ConfirmOptions, ContextMenuOptions, NativeRect } from './sheets';
2
2
  export type { ActionSheetOptions, AlertOptions, ChoiceOptions, ConfirmOptions, ContextMenuItem, ContextMenuOptions, DialogAction, DialogActionStyle, NativeRect } from './sheets';
3
- declare function hostNavigator(): Navigator | undefined;
4
3
  /** A rectangle the bridge can serialise: getBoundingClientRect() returns a DOMRect, which it cannot. */
5
4
  export declare function toNativeRect(rect: { x?: number, y?: number, left?: number, top?: number, width: number, height: number }): NativeRect;
6
5
  /** Shows an action sheet: `useActionSheet()(options)`, for a page that keeps the function. */
@@ -16,11 +15,6 @@ export declare function confirmAction(options: ConfirmActionOptions): Promise<bo
16
15
  * Resolves with the chosen item's id, or null.
17
16
  */
18
17
  export declare function showContextMenuFor(element: Element, options: Omit<ContextMenuOptions, 'anchor'>): Promise<string | null>;
19
- declare function openOnTheWeb(url: string, options: BrowserOpenOptions): BrowserResult;
20
- declare function symbolKey(name: string, options: SymbolOptions): string;
21
- declare function downloadOnTheWeb(href: string, filename: string): string | null;
22
- declare function pickOnTheWeb(types: string[]): Promise<PickedFile | null>;
23
- declare function screenOrientation(): LockableOrientation | undefined;
24
18
  declare const done: () => true;
25
19
  declare const no: () => false;
26
20
  declare const nothing: () => null;
@@ -178,7 +172,6 @@ export declare interface OrientationApi {
178
172
  lock: (orientation: OrientationLock) => Promise<boolean>
179
173
  unlock: () => Promise<boolean>
180
174
  }
181
- declare interface LockableOrientation { lock?: (orientation: string) => Promise<void>, unlock?: () => void }
182
175
  // ---------------------------------------------------------------------------
183
176
  // Sign in with Apple
184
177
  export declare interface AppleSignInResult {
@@ -85,3 +85,4 @@ export declare interface TabRootHost {
85
85
  stxRouter?: { screens?: () => RouterScreen[] }
86
86
  history?: { go: (delta: number) => void }
87
87
  }
88
+ export {};
@@ -1,4 +1,3 @@
1
- declare function unavailable(): never;
2
1
  /** The native system sheet returns JSON credentials for server verification. */
3
2
  export declare const passkeys: PasskeysApi;
4
3
  /** JSON WebAuthn options as supplied by the relying party's server. */
@@ -18,3 +18,4 @@ export declare interface ScheduledWorkoutsFake {
18
18
  authorization: ScheduledWorkoutsAuthorization
19
19
  }
20
20
  declare type ScheduledWorkoutsMethod = 'isSupported' | 'authorization' | 'requestAuthorization' | 'list' | 'schedule' | 'remove' | 'removeAll';
21
+ export {};
@@ -1,10 +1,7 @@
1
- declare function native(): Record<string, any> | undefined;
2
1
  /** The rejection every call but `isSupported()` gets where nothing can schedule. */
3
2
  export declare function scheduledWorkoutsUnsupported(): Error;
4
- declare function authorizationOf(value: unknown): ScheduledWorkoutsAuthorization;
5
3
  /** A row of `list()`, or null for one that is not a scheduled plan. */
6
4
  export declare function normalizeScheduledWorkout(value: unknown): ScheduledWorkout | null;
7
- declare function call<T>(method: ScheduledWorkoutsMethod, normalize: (value: unknown) => T, ...args: unknown[]): Promise<T>;
8
5
  export declare const scheduledWorkouts: ScheduledWorkoutsApi;
9
6
  export declare interface AppleWorkoutStep {
10
7
  goal: AppleWorkoutGoal
package/dist/storage.d.ts CHANGED
@@ -1,4 +1,2 @@
1
1
  import type { StorageApi } from './types';
2
- declare function supportsCompareAndSet(): boolean;
3
- declare function supportsSetIfAbsent(): boolean;
4
2
  export declare const storage: StorageApi;
package/dist/testing.d.ts CHANGED
@@ -31,13 +31,10 @@ declare interface ScheduledWorkoutsFake {
31
31
  declare type ScheduledWorkoutsMethod = 'isSupported' | 'authorization' | 'requestAuthorization' | 'list' | 'schedule' | 'remove' | 'removeAll';
32
32
 
33
33
  // From: src/scheduled-workouts.ts
34
- declare function native(): Record<string, any> | undefined;
35
34
  /** The rejection every call but `isSupported()` gets where nothing can schedule. */
36
35
  declare function scheduledWorkoutsUnsupported(): Error;
37
- declare function authorizationOf(value: unknown): ScheduledWorkoutsAuthorization;
38
36
  /** A row of `list()`, or null for one that is not a scheduled plan. */
39
37
  declare function normalizeScheduledWorkout(value: unknown): ScheduledWorkout | null;
40
- declare function call<T>(method: ScheduledWorkoutsMethod_1, normalize: (value: unknown) => T, ...args: unknown[]): Promise<T>;
41
38
  declare const scheduledWorkouts: ScheduledWorkoutsApi;
42
39
  declare interface AppleWorkoutStep {
43
40
  goal: AppleWorkoutGoal
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.519",
5
+ "version": "0.75.522",
6
6
  "description": "Craft-powered native mobile runtime for Stacks and STX applications",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@bughq/sdk": "^0.3.0",
42
- "@stacksjs/types": "0.75.519",
42
+ "@stacksjs/types": "0.75.522",
43
43
  "craft-native": ">=0.0.443"
44
44
  },
45
45
  "devDependencies": {
46
- "@stacksjs/build": "0.75.519",
46
+ "@stacksjs/build": "0.75.522",
47
47
  "better-dx": "^0.2.24"
48
48
  }
49
49
  }