@burnt-labs/expo-satya-attest 3.14.1 → 3.14.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/PUBLISHING.md +5 -5
  3. package/README.md +6 -4
  4. package/android/build.gradle +2 -2
  5. package/android/src/main/java/expo/modules/satyaattest/SatyaAttestModule.kt +8 -0
  6. package/build/SatyaAttestModule.d.ts +1 -0
  7. package/build/SatyaAttestModule.d.ts.map +1 -1
  8. package/build/SatyaAttestModule.js.map +1 -1
  9. package/build/SatyaProviderAttestButton.js +2 -2
  10. package/build/SatyaProviderAttestButton.js.map +1 -1
  11. package/build/components/providerAttest/BrowserConfirmation.d.ts.map +1 -1
  12. package/build/components/providerAttest/BrowserConfirmation.js +25 -7
  13. package/build/components/providerAttest/BrowserConfirmation.js.map +1 -1
  14. package/build/components/providerAttest/FlowStatus.d.ts.map +1 -1
  15. package/build/components/providerAttest/FlowStatus.js +74 -37
  16. package/build/components/providerAttest/FlowStatus.js.map +1 -1
  17. package/build/components/providerAttest/ProviderAttestModal.js +1 -1
  18. package/build/components/providerAttest/ProviderAttestModal.js.map +1 -1
  19. package/build/components/providerAttest/SessionIdRow.d.ts +3 -3
  20. package/build/components/providerAttest/SessionIdRow.d.ts.map +1 -1
  21. package/build/components/providerAttest/SessionIdRow.js +49 -48
  22. package/build/components/providerAttest/SessionIdRow.js.map +1 -1
  23. package/build/components/providerAttest/clipboardSupport.d.ts +0 -15
  24. package/build/components/providerAttest/clipboardSupport.d.ts.map +1 -1
  25. package/build/components/providerAttest/clipboardSupport.js +12 -16
  26. package/build/components/providerAttest/clipboardSupport.js.map +1 -1
  27. package/build/components/providerAttest/copy.js +9 -7
  28. package/build/components/providerAttest/copy.js.map +1 -1
  29. package/build/components/providerAttest/styles.d.ts +61 -58
  30. package/build/components/providerAttest/styles.d.ts.map +1 -1
  31. package/build/components/providerAttest/styles.js +54 -78
  32. package/build/components/providerAttest/styles.js.map +1 -1
  33. package/build/components/providerAttest/teels/useTeelsProviderFlow.js +2 -2
  34. package/build/components/providerAttest/teels/useTeelsProviderFlow.js.map +1 -1
  35. package/build/components/providerAttest/theme.d.ts +22 -1
  36. package/build/components/providerAttest/theme.d.ts.map +1 -1
  37. package/build/components/providerAttest/theme.js +73 -22
  38. package/build/components/providerAttest/theme.js.map +1 -1
  39. package/build/components/providerAttest/types.d.ts +1 -1
  40. package/build/components/providerAttest/types.js.map +1 -1
  41. package/build/components/providerAttest/useProviderAttestFlow.js +2 -2
  42. package/build/components/providerAttest/useProviderAttestFlow.js.map +1 -1
  43. package/build/sdkMetadata.generated.d.ts +1 -1
  44. package/build/sdkMetadata.generated.js +1 -1
  45. package/build/sdkMetadata.generated.js.map +1 -1
  46. package/build/tee/client.d.ts +1 -1
  47. package/ios/Frameworks/libsatya_ffi-rs.xcframework/Info.plist +5 -5
  48. package/ios/Frameworks/libsatya_ffi-rs.xcframework/ios-arm64/libsatya_ffi.a +1 -1
  49. package/ios/Frameworks/libsatya_ffi-rs.xcframework/ios-arm64_x86_64-simulator/libsatya_ffi.a +1 -1
  50. package/ios/SatyaAttest.podspec +1 -1
  51. package/ios/SatyaAttestModule.swift +4 -0
  52. package/package.json +1 -1
  53. package/src/SatyaAttestModule.ts +1 -0
  54. package/src/SatyaProviderAttestButton.tsx +6 -2
  55. package/src/components/providerAttest/BrowserConfirmation.tsx +27 -7
  56. package/src/components/providerAttest/FlowStatus.tsx +93 -53
  57. package/src/components/providerAttest/ProviderAttestModal.tsx +1 -1
  58. package/src/components/providerAttest/SessionIdRow.tsx +75 -62
  59. package/src/components/providerAttest/clipboardSupport.ts +13 -16
  60. package/src/components/providerAttest/copy.ts +9 -9
  61. package/src/components/providerAttest/styles.ts +54 -79
  62. package/src/components/providerAttest/teels/useTeelsProviderFlow.ts +2 -2
  63. package/src/components/providerAttest/theme.ts +78 -23
  64. package/src/components/providerAttest/types.ts +1 -1
  65. package/src/components/providerAttest/useProviderAttestFlow.ts +2 -2
  66. package/src/sdkMetadata.generated.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.14.2 - 2026-11-06
4
+
5
+ ### Changed
6
+
7
+ - SDK messages, loaders, and the three-step progress indicator are centered in light and dark appearances. Opening, verification, and waiting screens use shorter provider-specific messages.
8
+ - After **Not now**, the light-theme **Review consent** button matches Dossier’s consent button. **Leave session** remains a separate action.
9
+ - Tap the session ID row on an error screen to copy the full ID and see confirmation in place. Host clipboard handlers still take precedence. Rebuild the native app for direct clipboard support, or use the existing share fallback on older binaries.
10
+
3
11
  ## 3.14.1 - 2026-11-05
4
12
 
5
13
  ### Fixed
package/PUBLISHING.md CHANGED
@@ -12,8 +12,8 @@ for a plug-and-play Expo SDK.
12
12
 
13
13
  ## Release preparation
14
14
 
15
- The prepared version is **3.14.1**. This patch improves dark-theme contrast for
16
- the connection sheet controls and Dossier consent confirmation. See the [consumer changelog](./CHANGELOG.md).
15
+ The prepared version is **3.14.2**. This patch updates the connection sheet,
16
+ Dossier consent confirmation and session ID copy feedback. See the [consumer changelog](./CHANGELOG.md).
17
17
 
18
18
  Before tagging a stable release, validate the candidate in a consuming app:
19
19
 
@@ -271,7 +271,7 @@ internal/module_scripts/
271
271
  After the release gates pass and publication is authorized, use the consolidated
272
272
  `publish-expo-satya-attest.yml` workflow. A stable tag must match the committed
273
273
  package version and point to a commit on `main`; for this prepared release the
274
- package-specific tag is `expo-satya-attest-v3.14.1`. Creating/pushing that tag starts
274
+ package-specific tag is `expo-satya-attest-v3.14.2`. Creating/pushing that tag starts
275
275
  publication. Manual workflow dispatch is a dry-run.
276
276
 
277
277
  The workflow builds native artifacts, runs the release checks, and publishes
@@ -284,11 +284,11 @@ After publication, check the npm version and dist-tag before updating the exampl
284
284
  ## npm Snapshots
285
285
 
286
286
  The snapshot workflow increments the committed patch version in CI and appends
287
- the run, attempt and source commit. For a package at `3.14.1`, the resulting
287
+ the run, attempt and source commit. For a package at `3.14.2`, the resulting
288
288
  version has this form:
289
289
 
290
290
  ```text
291
- 3.14.2-snapshot.<run>.<attempt>.sha-<commit>
291
+ 3.14.3-snapshot.<run>.<attempt>.sha-<commit>
292
292
  ```
293
293
 
294
294
  Snapshots use the `snapshot` dist-tag so test apps do not need to know the generated
package/README.md CHANGED
@@ -759,11 +759,13 @@ content, text selection and scrolling.
759
759
  Android native `window.open()` popups also stay within this sheet and share its
760
760
  navigation controls. Rebuild the Android app to adopt the native popup changes.
761
761
 
762
- Opening, connecting, and verification use the Android-style circular loader on both
763
- platforms. Status messages scroll within the sheet and distinguish opening, connecting, verification,
762
+ SDK messages and the progress tracker are centered and adapt to the sheet’s light or dark surface.
763
+ Opening, connecting, and verification use the same circular loader on both platforms.
764
+ Status messages scroll within the sheet and distinguish opening, connecting, verification,
764
765
  finishing, delayed responses and recoverable or permanent errors. Every error includes
765
- a selectable session-ID card and copy control (using `onCopySessionId` when supplied,
766
- with the existing system-share fallback). “Try again” remains subject to the verifier’s
766
+ a tappable session ID. A successful copy shows a checkmark and “Session ID copied”.
767
+ The SDK tries `onCopySessionId` first, then the native clipboard on rebuilt apps.
768
+ When copying is unavailable it offers system sharing and manual selection. “Try again” remains subject to the verifier’s
767
769
  retry policy. The default `autoCloseOnComplete: true` is unchanged; set it to `false` to
768
770
  keep the completion screen with “Return to app”. Hosted result receipt is labelled
769
771
  “Account connected” until independently verified. Completion callbacks are not delayed.
@@ -4,14 +4,14 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'expo.modules.satyaattest'
7
- version = '3.14.1'
7
+ version = '3.14.2'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.satyaattest"
11
11
  defaultConfig {
12
12
  consumerProguardFiles 'consumer-rules.pro'
13
13
  versionCode 1
14
- versionName "3.14.1"
14
+ versionName "3.14.2"
15
15
  // StrongBox key attestation needs API 28+; basic Keystore attestation API 24+.
16
16
  minSdkVersion 24
17
17
  }
@@ -1,5 +1,7 @@
1
1
  package expo.modules.satyaattest
2
2
 
3
+ import android.content.ClipData
4
+ import android.content.ClipboardManager
3
5
  import android.security.keystore.KeyGenParameterSpec
4
6
  import android.security.keystore.KeyProperties
5
7
  import android.security.keystore.StrongBoxUnavailableException
@@ -128,6 +130,12 @@ class SatyaAttestModule : Module() {
128
130
  SatyaProviderSessions.releaseOwner(providerSessionOwner)
129
131
  }
130
132
 
133
+ AsyncFunction("copySessionId") { sessionId: String ->
134
+ val clipboard = appContext.reactContext?.getSystemService(ClipboardManager::class.java)
135
+ ?: throw IllegalStateException("Clipboard unavailable")
136
+ clipboard.setPrimaryClip(ClipData.newPlainText("Session ID", sessionId))
137
+ }.runOnQueue(Queues.MAIN)
138
+
131
139
  Function("satyaCoreVersion") { satyaCoreVersion() }
132
140
 
133
141
  Function("createWebViewBridgeCapability") {
@@ -8,6 +8,7 @@ type SatyaAttestEvents = {
8
8
  }) => void;
9
9
  };
10
10
  declare class SatyaAttestModule extends NativeModule<SatyaAttestEvents> {
11
+ copySessionId?(sessionId: string): Promise<void>;
11
12
  sizeConnectionSheet?(viewTag: number): Promise<void>;
12
13
  providerSessionCapabilitiesV1?(): Promise<import('./providerSessions').SatyaProviderSessionCapabilities>;
13
14
  openProviderSessionV1?(configJson: string): Promise<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"SatyaAttestModule.d.ts","sourceRoot":"","sources":["../src/SatyaAttestModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,KAAK,iBAAiB,GAAG;IACvB,mBAAmB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAC7F,CAAC;AAEF,OAAO,OAAO,iBAAkB,SAAQ,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,MAAM,CAAC;AA2EzD,eAAe,mBAAmB,CAAoB,aAAa,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\n\nimport { VerifyResult } from './types';\n\ntype SatyaAttestEvents = {\n onPopupWindowChange: (event: { viewTag: number; count: number; loading?: boolean }) => void;\n};\n\ndeclare class SatyaAttestModule extends NativeModule<SatyaAttestEvents> {\n sizeConnectionSheet?(viewTag: number): Promise<void>;\n providerSessionCapabilitiesV1?(): Promise<\n import('./providerSessions').SatyaProviderSessionCapabilities\n >;\n openProviderSessionV1?(configJson: string): Promise<string>;\n releaseProviderSessionV1?(handle: string): Promise<void>;\n readProviderSessionCookiesV1?(handle: string, providerId: string, url: string): Promise<string>;\n attestNativeReplayWithSessionV1?(\n providerTemplateJson: string,\n capturedRequestJson: string | null,\n handle: string\n ): Promise<string>;\n attestNativeReplayBundleWithSessionV1?(\n providerTemplateJson: string,\n capturedRequestsJson: string,\n partialEndpointSelectionJson: string | null,\n handle: string\n ): Promise<string>;\n satyaCoreVersion(): string;\n createWebViewBridgeCapability(): string;\n /**\n * OS entropy as unpadded base64url. Optional so a JS bundle running against a\n * native binary built before 3.8.0 still type-checks; `tee/secureRandom.ts`\n * falls back to `createWebViewBridgeCapability` in that case.\n */\n secureRandomBytes?(count: number): string;\n getTelemetryDeviceIdHashV2?(appId: string, environment: string): Promise<string>;\n readWebViewCookies(url: string): Promise<string>;\n\n // Every parameter below is required, including the nullable ones. Whether iOS\n // tolerates an omitted trailing optional depends on the host app's\n // expo-modules-core (older 3.0.x cores and the optimized JSI path require all\n // of them; 56.x relaxes trailing optionals), and `peerDependencies.expo` is\n // `*`, so this package must satisfy the strictest of them. Marking these `?`\n // would let TypeScript accept a call that crashes on device. See\n // `nativeReplayArgs.ts` for the full mechanism.\n attestNativeReplay(\n providerTemplateJson: string,\n capturedRequestJson: string | null\n ): Promise<string>;\n\n attestNativeReplayBundle(\n providerTemplateJson: string,\n capturedRequestsJson: string,\n partialEndpointSelectionJson: string | null\n ): Promise<string>;\n\n verifyArtifact(artifactJson: string): Promise<boolean>;\n verifyArtifactDetailed(artifactJson: string): Promise<VerifyResult>;\n\n initialize(configJson: string): Promise<void>;\n dispose(): Promise<void>;\n installWebViewDocumentStartScript(viewTag: number, script: string): Promise<boolean | null>;\n setPopupWindowsEnabled(\n viewTag: number,\n enabled: boolean,\n geolocationEnabled: boolean\n ): Promise<boolean>;\n /** Optional for compatibility with native binaries predating privacy concealment. */\n setPopupWindowsConcealed?(concealed: boolean): Promise<boolean>;\n closePopupWindows(): Promise<boolean>;\n closePopupWindowsForHost?(viewTag: number): Promise<boolean>;\n closePopupWindow?(viewTag: number): Promise<boolean>;\n reloadPopupWindow?(viewTag: number): Promise<boolean>;\n}\n\nexport default requireNativeModule<SatyaAttestModule>('SatyaAttest');\n"]}
1
+ {"version":3,"file":"SatyaAttestModule.js","sourceRoot":"","sources":["../src/SatyaAttestModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AA4EzD,eAAe,mBAAmB,CAAoB,aAAa,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\n\nimport { VerifyResult } from './types';\n\ntype SatyaAttestEvents = {\n onPopupWindowChange: (event: { viewTag: number; count: number; loading?: boolean }) => void;\n};\n\ndeclare class SatyaAttestModule extends NativeModule<SatyaAttestEvents> {\n copySessionId?(sessionId: string): Promise<void>;\n sizeConnectionSheet?(viewTag: number): Promise<void>;\n providerSessionCapabilitiesV1?(): Promise<\n import('./providerSessions').SatyaProviderSessionCapabilities\n >;\n openProviderSessionV1?(configJson: string): Promise<string>;\n releaseProviderSessionV1?(handle: string): Promise<void>;\n readProviderSessionCookiesV1?(handle: string, providerId: string, url: string): Promise<string>;\n attestNativeReplayWithSessionV1?(\n providerTemplateJson: string,\n capturedRequestJson: string | null,\n handle: string\n ): Promise<string>;\n attestNativeReplayBundleWithSessionV1?(\n providerTemplateJson: string,\n capturedRequestsJson: string,\n partialEndpointSelectionJson: string | null,\n handle: string\n ): Promise<string>;\n satyaCoreVersion(): string;\n createWebViewBridgeCapability(): string;\n /**\n * OS entropy as unpadded base64url. Optional so a JS bundle running against a\n * native binary built before 3.8.0 still type-checks; `tee/secureRandom.ts`\n * falls back to `createWebViewBridgeCapability` in that case.\n */\n secureRandomBytes?(count: number): string;\n getTelemetryDeviceIdHashV2?(appId: string, environment: string): Promise<string>;\n readWebViewCookies(url: string): Promise<string>;\n\n // Every parameter below is required, including the nullable ones. Whether iOS\n // tolerates an omitted trailing optional depends on the host app's\n // expo-modules-core (older 3.0.x cores and the optimized JSI path require all\n // of them; 56.x relaxes trailing optionals), and `peerDependencies.expo` is\n // `*`, so this package must satisfy the strictest of them. Marking these `?`\n // would let TypeScript accept a call that crashes on device. See\n // `nativeReplayArgs.ts` for the full mechanism.\n attestNativeReplay(\n providerTemplateJson: string,\n capturedRequestJson: string | null\n ): Promise<string>;\n\n attestNativeReplayBundle(\n providerTemplateJson: string,\n capturedRequestsJson: string,\n partialEndpointSelectionJson: string | null\n ): Promise<string>;\n\n verifyArtifact(artifactJson: string): Promise<boolean>;\n verifyArtifactDetailed(artifactJson: string): Promise<VerifyResult>;\n\n initialize(configJson: string): Promise<void>;\n dispose(): Promise<void>;\n installWebViewDocumentStartScript(viewTag: number, script: string): Promise<boolean | null>;\n setPopupWindowsEnabled(\n viewTag: number,\n enabled: boolean,\n geolocationEnabled: boolean\n ): Promise<boolean>;\n /** Optional for compatibility with native binaries predating privacy concealment. */\n setPopupWindowsConcealed?(concealed: boolean): Promise<boolean>;\n closePopupWindows(): Promise<boolean>;\n closePopupWindowsForHost?(viewTag: number): Promise<boolean>;\n closePopupWindow?(viewTag: number): Promise<boolean>;\n reloadPopupWindow?(viewTag: number): Promise<boolean>;\n}\n\nexport default requireNativeModule<SatyaAttestModule>('SatyaAttest');\n"]}
@@ -59,8 +59,8 @@ function ProviderAttestButtonView({ props, flow, }) {
59
59
  { backgroundColor: flow.theme.accentColor },
60
60
  isDisabled && styles.buttonDisabled,
61
61
  ]} disabled={isDisabled} onPress={flow.openFlow}>
62
- {flow.running ? (<LoadingSpinner color="#ffffff" size={20} style={styles.buttonSpinner}/>) : null}
63
- <Text style={styles.buttonText}>
62
+ {flow.running ? (<LoadingSpinner color={flow.theme.onAccentColor} size={20} style={styles.buttonSpinner}/>) : null}
63
+ <Text style={[styles.buttonText, { color: flow.theme.onAccentColor }]}>
64
64
  {flow.running ? 'Generating Attestation' : flow.buttonLabel}
65
65
  </Text>
66
66
  </Pressable>) : null}
@@ -1 +1 @@
1
- {"version":3,"file":"SatyaProviderAttestButton.js","sourceRoot":"","sources":["../src/SatyaProviderAttestButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EACL,kBAAkB,GAEnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAK9F,OAAO,EACL,qBAAqB,GAEtB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAA2B,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAcjE,MAAM,UAAU,yBAAyB,CAAC,KAAqC;IAC7E,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK,CAAC;IAC7C,OAAO,CACL,CAAC,oBAAoB,CACnB,cAAc,CAAC,CAAC,KAAK,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,GAAG,WAAW;YACd,UAAU,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AK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EAAG,CAC1E,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAC7B;YAAA,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAC7D;UAAA,EAAE,IAAI,CACR;QAAA,EAAE,SAAS,CAAC,CACb,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,WAAW,CAAC,CAAC,CAAC,CACpD,CAAC,WAAW;QACV,uEAAuE;QACvE,sEAAsE;QACtE,iEAAiE;QACjE,mEAAmE;QACnE,mEAAmE;QACnE,kEAAkE;QAClE,kEAAkE;QAClE,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAClC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAC1B,aAAa,CAAC,MAAM,CACpB,iBAAiB,CAAC,CAAC,KAAK,CAAC,CACzB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,EAC/C,CACH,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAClC;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { Pressable, Text } from 'react-native';\n\nimport { LoadingSpinner } from './components/providerAttest/LoadingSpinner';\nimport { ProviderAttestModal } from './components/providerAttest/ProviderAttestModal';\nimport {\n selectProviderFlow,\n type SatyaProviderFlowSelection,\n} from './components/providerAttest/flowSelection';\nimport { styles } from './components/providerAttest/styles';\nimport { useTeelsProviderFlow } from './components/providerAttest/teels/useTeelsProviderFlow';\nimport type {\n SatyaProviderAttestButtonProps,\n SatyaModeAwareProviderAttestButtonProps,\n} from './components/providerAttest/types';\nimport {\n useProviderAttestFlow,\n type ProviderAttestFlow,\n} from './components/providerAttest/useProviderAttestFlow';\nimport { getSatyaRuntimeConfig, type SatyaRuntimeConfig } from './satyaConfig';\nimport { satyaError, SatyaErrorCode } from './types/error.types';\n\nexport type {\n SatyaBackendVerifyResult,\n SatyaProviderAttestButtonProps,\n SatyaProviderAttestationResult,\n SatyaProviderAttestPresentation,\n SatyaProviderAttestTheme,\n SatyaProviderFlowPhase,\n SatyaProviderFlowProgress,\n SatyaTeelsAttestation,\n SatyaTeelsClaimData,\n} from './components/providerAttest/types';\n\nexport function SatyaProviderAttestButton(props: SatyaProviderAttestButtonProps) {\n const { onComplete, ...sharedProps } = props;\n return (\n <ProviderAttestButton\n allowTeeReplay={false}\n props={{\n ...sharedProps,\n onComplete: (result) => {\n if ('artifactBytesB64' in result.artifact) {\n props.onError?.(\n satyaError(\n SatyaErrorCode.TEE_MODE_UNAVAILABLE,\n 'TEE result requires the /tee entry point'\n )\n );\n return;\n }\n onComplete?.({ ...result, artifact: result.artifact });\n },\n }}\n />\n );\n}\n\nexport function SatyaModeAwareProviderAttestButton(props: SatyaModeAwareProviderAttestButtonProps) {\n return <ProviderAttestButton props={props} allowTeeReplay />;\n}\n\nfunction ProviderAttestButton({ props, allowTeeReplay }: ProviderFlowHostProps) {\n // Bind the runtime config once at mount (the init-before-mount contract),\n // but recompute the flow selection from live props so a providerId/template\n // switch cannot leave the button running a stale flow.\n const [runtime] = useState<SatyaRuntimeConfig>(() => getSatyaRuntimeConfig());\n const selection = selectProviderFlow(\n {\n providerId: props.providerId,\n providerTemplateId: props.providerTemplate?.providerId,\n appId: props.transportConfig?.appId,\n allowTeeReplay,\n },\n runtime\n );\n\n if (selection.type === 'teels') {\n return <TeelsProviderFlowHost props={props} selection={selection} />;\n }\n return <NativeProviderFlowHost props={props} allowTeeReplay={allowTeeReplay} />;\n}\n\ninterface ProviderFlowHostProps {\n props: SatyaModeAwareProviderAttestButtonProps;\n allowTeeReplay?: boolean;\n}\n\n// App attestation and TEE share the WebView/capture flow.\nfunction NativeProviderFlowHost({ props, allowTeeReplay }: ProviderFlowHostProps) {\n const flow = useProviderAttestFlow(props, allowTeeReplay);\n return <ProviderAttestButtonView props={props} flow={flow} />;\n}\n\nfunction TeelsProviderFlowHost({\n props,\n selection,\n}: ProviderFlowHostProps & {\n selection: Extract<SatyaProviderFlowSelection, { type: 'teels' }>;\n}) {\n const flow = useTeelsProviderFlow(props, { selection });\n return <ProviderAttestButtonView props={props} flow={flow} />;\n}\n\nfunction ProviderAttestButtonView({\n props,\n flow,\n}: {\n props: SatyaModeAwareProviderAttestButtonProps;\n flow: ProviderAttestFlow;\n}) {\n const isDisabled = props.disabled || flow.running || flow.modalVisible;\n const shouldRenderButton = props.renderButton ?? true;\n const WarmWebView = flow.ResolvedWebView;\n\n return (\n <>\n {shouldRenderButton ? (\n <Pressable\n style={[\n styles.button,\n { backgroundColor: flow.theme.accentColor },\n isDisabled && styles.buttonDisabled,\n ]}\n disabled={isDisabled}\n onPress={flow.openFlow}>\n {flow.running ? (\n <LoadingSpinner color=\"#ffffff\" size={20} style={styles.buttonSpinner} />\n ) : null}\n <Text style={styles.buttonText}>\n {flow.running ? 'Generating Attestation' : flow.buttonLabel}\n </Text>\n </Pressable>\n ) : null}\n {flow.prefetch && !flow.modalVisible && WarmWebView ? (\n <WarmWebView\n // Warms the WebKit process before the real WebView opens. This must be\n // an `html` source rather than a blank-page URI: react-native-webview\n // loads any hostless URI with `-[WKWebView loadFileURL:]`, which\n // raises NSInvalidArgumentException and crashes the app on iOS. An\n // html source takes the `loadHTMLString` branch and warms the same\n // way. This view mounts outside the modal as soon as the provider\n // resolves, so a crash here lands at launch, not during the flow.\n source={{ html: '<html></html>' }}\n style={styles.warmWebView}\n pointerEvents=\"none\"\n javaScriptEnabled={false}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n />\n ) : null}\n <ProviderAttestModal flow={flow} />\n </>\n );\n}\n"]}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;UAAA,EAAE,IAAI,CACR;QAAA,EAAE,SAAS,CAAC,CACb,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,WAAW,CAAC,CAAC,CAAC,CACpD,CAAC,WAAW;QACV,uEAAuE;QACvE,sEAAsE;QACtE,iEAAiE;QACjE,mEAAmE;QACnE,mEAAmE;QACnE,kEAAkE;QAClE,kEAAkE;QAClE,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAClC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAC1B,aAAa,CAAC,MAAM,CACpB,iBAAiB,CAAC,CAAC,KAAK,CAAC,CACzB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,EAC/C,CACH,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAClC;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { Pressable, Text } from 'react-native';\n\nimport { LoadingSpinner } from './components/providerAttest/LoadingSpinner';\nimport { ProviderAttestModal } from './components/providerAttest/ProviderAttestModal';\nimport {\n selectProviderFlow,\n type SatyaProviderFlowSelection,\n} from './components/providerAttest/flowSelection';\nimport { styles } from './components/providerAttest/styles';\nimport { useTeelsProviderFlow } from './components/providerAttest/teels/useTeelsProviderFlow';\nimport type {\n SatyaProviderAttestButtonProps,\n SatyaModeAwareProviderAttestButtonProps,\n} from './components/providerAttest/types';\nimport {\n useProviderAttestFlow,\n type ProviderAttestFlow,\n} from './components/providerAttest/useProviderAttestFlow';\nimport { getSatyaRuntimeConfig, type SatyaRuntimeConfig } from './satyaConfig';\nimport { satyaError, SatyaErrorCode } from './types/error.types';\n\nexport type {\n SatyaBackendVerifyResult,\n SatyaProviderAttestButtonProps,\n SatyaProviderAttestationResult,\n SatyaProviderAttestPresentation,\n SatyaProviderAttestTheme,\n SatyaProviderFlowPhase,\n SatyaProviderFlowProgress,\n SatyaTeelsAttestation,\n SatyaTeelsClaimData,\n} from './components/providerAttest/types';\n\nexport function SatyaProviderAttestButton(props: SatyaProviderAttestButtonProps) {\n const { onComplete, ...sharedProps } = props;\n return (\n <ProviderAttestButton\n allowTeeReplay={false}\n props={{\n ...sharedProps,\n onComplete: (result) => {\n if ('artifactBytesB64' in result.artifact) {\n props.onError?.(\n satyaError(\n SatyaErrorCode.TEE_MODE_UNAVAILABLE,\n 'TEE result requires the /tee entry point'\n )\n );\n return;\n }\n onComplete?.({ ...result, artifact: result.artifact });\n },\n }}\n />\n );\n}\n\nexport function SatyaModeAwareProviderAttestButton(props: SatyaModeAwareProviderAttestButtonProps) {\n return <ProviderAttestButton props={props} allowTeeReplay />;\n}\n\nfunction ProviderAttestButton({ props, allowTeeReplay }: ProviderFlowHostProps) {\n // Bind the runtime config once at mount (the init-before-mount contract),\n // but recompute the flow selection from live props so a providerId/template\n // switch cannot leave the button running a stale flow.\n const [runtime] = useState<SatyaRuntimeConfig>(() => getSatyaRuntimeConfig());\n const selection = selectProviderFlow(\n {\n providerId: props.providerId,\n providerTemplateId: props.providerTemplate?.providerId,\n appId: props.transportConfig?.appId,\n allowTeeReplay,\n },\n runtime\n );\n\n if (selection.type === 'teels') {\n return <TeelsProviderFlowHost props={props} selection={selection} />;\n }\n return <NativeProviderFlowHost props={props} allowTeeReplay={allowTeeReplay} />;\n}\n\ninterface ProviderFlowHostProps {\n props: SatyaModeAwareProviderAttestButtonProps;\n allowTeeReplay?: boolean;\n}\n\n// App attestation and TEE share the WebView/capture flow.\nfunction NativeProviderFlowHost({ props, allowTeeReplay }: ProviderFlowHostProps) {\n const flow = useProviderAttestFlow(props, allowTeeReplay);\n return <ProviderAttestButtonView props={props} flow={flow} />;\n}\n\nfunction TeelsProviderFlowHost({\n props,\n selection,\n}: ProviderFlowHostProps & {\n selection: Extract<SatyaProviderFlowSelection, { type: 'teels' }>;\n}) {\n const flow = useTeelsProviderFlow(props, { selection });\n return <ProviderAttestButtonView props={props} flow={flow} />;\n}\n\nfunction ProviderAttestButtonView({\n props,\n flow,\n}: {\n props: SatyaModeAwareProviderAttestButtonProps;\n flow: ProviderAttestFlow;\n}) {\n const isDisabled = props.disabled || flow.running || flow.modalVisible;\n const shouldRenderButton = props.renderButton ?? true;\n const WarmWebView = flow.ResolvedWebView;\n\n return (\n <>\n {shouldRenderButton ? (\n <Pressable\n style={[\n styles.button,\n { backgroundColor: flow.theme.accentColor },\n isDisabled && styles.buttonDisabled,\n ]}\n disabled={isDisabled}\n onPress={flow.openFlow}>\n {flow.running ? (\n <LoadingSpinner\n color={flow.theme.onAccentColor}\n size={20}\n style={styles.buttonSpinner}\n />\n ) : null}\n <Text style={[styles.buttonText, { color: flow.theme.onAccentColor }]}>\n {flow.running ? 'Generating Attestation' : flow.buttonLabel}\n </Text>\n </Pressable>\n ) : null}\n {flow.prefetch && !flow.modalVisible && WarmWebView ? (\n <WarmWebView\n // Warms the WebKit process before the real WebView opens. This must be\n // an `html` source rather than a blank-page URI: react-native-webview\n // loads any hostless URI with `-[WKWebView loadFileURL:]`, which\n // raises NSInvalidArgumentException and crashes the app on iOS. An\n // html source takes the `loadHTMLString` branch and warms the same\n // way. This view mounts outside the modal as soon as the provider\n // resolves, so a crash here lands at launch, not during the flow.\n source={{ html: '<html></html>' }}\n style={styles.warmWebView}\n pointerEvents=\"none\"\n javaScriptEnabled={false}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n />\n ) : null}\n <ProviderAttestModal flow={flow} />\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserConfirmation.d.ts","sourceRoot":"","sources":["../../../src/components/providerAttest/BrowserConfirmation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAe,EACf,MAAM,EACN,SAAS,GACV,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,qBAwCA"}
1
+ {"version":3,"file":"BrowserConfirmation.d.ts","sourceRoot":"","sources":["../../../src/components/providerAttest/BrowserConfirmation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAe,EACf,MAAM,EACN,SAAS,GACV,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,qBA4DA"}
@@ -3,26 +3,44 @@ import { ScrollView, Text, View, Pressable } from 'react-native';
3
3
  import { UiIcon } from './UiIcon';
4
4
  import { styles } from './styles';
5
5
  export function BrowserConfirmation({ theme, consent = false, onKeep, onConfirm, }) {
6
- const actionColor = consent ? theme.onSurfaceColor : theme.accentColor;
6
+ const dossierLight = consent && !theme.palette.dark;
7
+ const actionColor = dossierLight ? '#0f172a' : consent ? theme.onSurfaceColor : theme.accentColor;
8
+ const actionText = dossierLight ? '#ffffff' : consent ? theme.surfaceColor : theme.onAccentColor;
7
9
  return (<View style={[styles.confirmation, { backgroundColor: theme.surfaceColor }]} accessibilityViewIsModal>
8
10
  <ScrollView contentContainerStyle={styles.statusScroll} keyboardShouldPersistTaps="always">
9
11
  <View style={styles.statusBody}>
10
- <View style={styles.stateIcon}>
12
+ <View style={[styles.stateIcon, { backgroundColor: theme.palette.tile }]}>
11
13
  <UiIcon name="login" color={actionColor}/>
12
14
  </View>
13
- <Text accessibilityRole="header" accessibilityLiveRegion="assertive" style={[styles.confirmationTitle, { color: theme.onSurfaceColor }]}>
15
+ <Text accessibilityRole="header" accessibilityLiveRegion="assertive" style={[styles.statusTitle, { color: theme.onSurfaceColor }]}>
14
16
  Leave this connection?
15
17
  </Text>
16
18
  <Text style={[styles.statusSubtitle, { color: theme.mutedColor }]}>
17
19
  Leaving ends this session and returns you to the app. You can start again later.
18
20
  </Text>
19
- <Pressable accessibilityRole="button" style={[styles.primaryAction, { backgroundColor: actionColor }]} onPress={onKeep}>
20
- <Text style={[styles.primaryActionText, consent && { color: theme.surfaceColor }]}>
21
+ <Pressable accessibilityRole="button" style={[
22
+ styles.primaryAction,
23
+ dossierLight && styles.dossierPrimary,
24
+ { backgroundColor: actionColor },
25
+ ]} onPress={onKeep}>
26
+ <Text style={[
27
+ styles.primaryActionText,
28
+ dossierLight && styles.dossierButtonText,
29
+ { color: actionText },
30
+ ]}>
21
31
  {consent ? 'Review consent' : 'Keep connecting'}
22
32
  </Text>
23
33
  </Pressable>
24
- <Pressable accessibilityRole="button" style={[styles.secondaryAction, styles.leaveAction]} onPress={onConfirm}>
25
- <Text style={[styles.secondaryActionText, { color: theme.mutedColor }]}>
34
+ <Pressable accessibilityRole="button" style={[
35
+ styles.secondaryAction,
36
+ { borderColor: theme.palette.line },
37
+ dossierLight && styles.dossierSecondary,
38
+ ]} onPress={onConfirm}>
39
+ <Text style={[
40
+ styles.secondaryActionText,
41
+ dossierLight && styles.dossierButtonText,
42
+ { color: dossierLight ? actionColor : theme.mutedColor },
43
+ ]}>
26
44
  {consent ? 'Leave session' : 'Leave'}
27
45
  </Text>
28
46
  </Pressable>
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserConfirmation.js","sourceRoot":"","sources":["../../../src/components/providerAttest/BrowserConfirmation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,I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C,SAAS,CACR,iBAAiB,CAAC,QAAQ,CAC1B,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAChE,OAAO,CAAC,CAAC,MAAM,CAAC,CAChB;YAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAChF;cAAA,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CACjD;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,SAAS,CACX;UAAA,CAAC,SAAS,CACR,iBAAiB,CAAC,QAAQ,CAC1B,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CACpD,OAAO,CAAC,CAAC,SAAS,CAAC,CACnB;YAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CACrE;cAAA,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CACtC;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,SAAS,CACb;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { ScrollView, Text, View, Pressable } from 'react-native';\n\nimport { UiIcon } from './UiIcon';\nimport { styles } from './styles';\nimport type { ResolvedTheme } from './theme';\n\nexport function BrowserConfirmation({\n theme,\n consent = false,\n onKeep,\n onConfirm,\n}: {\n theme: ResolvedTheme;\n consent?: boolean;\n onKeep: () => void;\n onConfirm: () => void;\n}) {\n const actionColor = consent ? theme.onSurfaceColor : theme.accentColor;\n return (\n <View\n style={[styles.confirmation, { backgroundColor: theme.surfaceColor }]}\n accessibilityViewIsModal>\n <ScrollView contentContainerStyle={styles.statusScroll} keyboardShouldPersistTaps=\"always\">\n <View style={styles.statusBody}>\n <View style={styles.stateIcon}>\n <UiIcon name=\"login\" color={actionColor} />\n </View>\n <Text\n accessibilityRole=\"header\"\n accessibilityLiveRegion=\"assertive\"\n style={[styles.confirmationTitle, { color: theme.onSurfaceColor }]}>\n Leave this connection?\n </Text>\n <Text style={[styles.statusSubtitle, { color: theme.mutedColor }]}>\n Leaving ends this session and returns you to the app. You can start again later.\n </Text>\n <Pressable\n accessibilityRole=\"button\"\n style={[styles.primaryAction, { backgroundColor: actionColor }]}\n onPress={onKeep}>\n <Text style={[styles.primaryActionText, consent && { color: theme.surfaceColor }]}>\n {consent ? 'Review consent' : 'Keep connecting'}\n </Text>\n </Pressable>\n <Pressable\n accessibilityRole=\"button\"\n style={[styles.secondaryAction, styles.leaveAction]}\n onPress={onConfirm}>\n <Text style={[styles.secondaryActionText, { color: theme.mutedColor }]}>\n {consent ? 'Leave session' : 'Leave'}\n </Text>\n </Pressable>\n </View>\n </ScrollView>\n </View>\n );\n}\n"]}
1
+ {"version":3,"file":"BrowserConfirmation.js","sourceRoot":"","sources":["../../../src/components/providerAttest/BrowserConfirmation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,UAAU,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAO,GAAG,KAAK,EACf,MAAM,EACN,SAAS,GAMV;IACC,MAAM,YAAY,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;IAC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Text, View, Pressable } from 'react-native';\n\nimport { UiIcon } from './UiIcon';\nimport { styles } from './styles';\nimport type { ResolvedTheme } from './theme';\n\nexport function BrowserConfirmation({\n theme,\n consent = false,\n onKeep,\n onConfirm,\n}: {\n theme: ResolvedTheme;\n consent?: boolean;\n onKeep: () => void;\n onConfirm: () => void;\n}) {\n const dossierLight = consent && !theme.palette.dark;\n const actionColor = dossierLight ? '#0f172a' : consent ? theme.onSurfaceColor : theme.accentColor;\n const actionText = dossierLight ? '#ffffff' : consent ? theme.surfaceColor : theme.onAccentColor;\n return (\n <View\n style={[styles.confirmation, { backgroundColor: theme.surfaceColor }]}\n accessibilityViewIsModal>\n <ScrollView contentContainerStyle={styles.statusScroll} keyboardShouldPersistTaps=\"always\">\n <View style={styles.statusBody}>\n <View style={[styles.stateIcon, { backgroundColor: theme.palette.tile }]}>\n <UiIcon name=\"login\" color={actionColor} />\n </View>\n <Text\n accessibilityRole=\"header\"\n accessibilityLiveRegion=\"assertive\"\n style={[styles.statusTitle, { color: theme.onSurfaceColor }]}>\n Leave this connection?\n </Text>\n <Text style={[styles.statusSubtitle, { color: theme.mutedColor }]}>\n Leaving ends this session and returns you to the app. You can start again later.\n </Text>\n <Pressable\n accessibilityRole=\"button\"\n style={[\n styles.primaryAction,\n dossierLight && styles.dossierPrimary,\n { backgroundColor: actionColor },\n ]}\n onPress={onKeep}>\n <Text\n style={[\n styles.primaryActionText,\n dossierLight && styles.dossierButtonText,\n { color: actionText },\n ]}>\n {consent ? 'Review consent' : 'Keep connecting'}\n </Text>\n </Pressable>\n <Pressable\n accessibilityRole=\"button\"\n style={[\n styles.secondaryAction,\n { borderColor: theme.palette.line },\n dossierLight && styles.dossierSecondary,\n ]}\n onPress={onConfirm}>\n <Text\n style={[\n styles.secondaryActionText,\n dossierLight && styles.dossierButtonText,\n { color: dossierLight ? actionColor : theme.mutedColor },\n ]}>\n {consent ? 'Leave session' : 'Leave'}\n </Text>\n </Pressable>\n </View>\n </ScrollView>\n </View>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FlowStatus.d.ts","sourceRoot":"","sources":["../../../src/components/providerAttest/FlowStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,YAAY,EACZ,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,qBA4GA"}
1
+ {"version":3,"file":"FlowStatus.d.ts","sourceRoot":"","sources":["../../../src/components/providerAttest/FlowStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,YAAY,EACZ,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,qBAoJA"}
@@ -1,11 +1,22 @@
1
1
  import React from 'react';
2
- import { Pressable, ScrollView, Text, View } from 'react-native';
2
+ import { Pressable, ScrollView, Text, useWindowDimensions, View } from 'react-native';
3
3
  import { LoadingSpinner } from './LoadingSpinner';
4
4
  import { SessionIdRow } from './SessionIdRow';
5
5
  import { UiIcon } from './UiIcon';
6
6
  import { styles } from './styles';
7
7
  export function FlowStatus({ status, theme, providerName, sessionId, onCopySessionId, onRetry, onReturn, onClose, onDone, }) {
8
- const iconColor = status.tone === 'error' ? '#aa3d42' : status.tone === 'warning' ? '#975a1c' : theme.accentColor;
8
+ const { fontScale } = useWindowDimensions();
9
+ const { palette } = theme;
10
+ const iconColor = status.tone === 'error'
11
+ ? palette.error
12
+ : status.tone === 'warning'
13
+ ? palette.warning
14
+ : theme.accentColor;
15
+ const iconFill = status.tone === 'error'
16
+ ? palette.errorFill
17
+ : status.tone === 'warning'
18
+ ? palette.warningFill
19
+ : palette.tile;
9
20
  const action = status.action;
10
21
  const primary = action === 'retry'
11
22
  ? 'Try again'
@@ -14,46 +25,70 @@ export function FlowStatus({ status, theme, providerName, sessionId, onCopySessi
14
25
  : 'Return to app';
15
26
  return (<ScrollView style={[styles.statusOverlay, { backgroundColor: theme.surfaceColor }]} contentContainerStyle={styles.statusScroll} keyboardShouldPersistTaps="handled" accessibilityViewIsModal>
16
27
  <View style={styles.statusBody}>
17
- {status.icon ? (<View style={[
18
- styles.stateIcon,
19
- status.tone === 'error'
20
- ? styles.stateError
21
- : status.tone === 'warning'
22
- ? styles.stateWarning
23
- : null,
24
- ]}>
25
- <UiIcon name={status.icon} size={23} color={iconColor}/>
26
- </View>) : (<LoadingSpinner color={theme.accentColor}/>)}
27
- <Text accessibilityRole="header" accessibilityLiveRegion="polite" style={[styles.statusTitle, { color: theme.onSurfaceColor }]}>
28
+ {status.icon ? (<View style={[styles.stateIcon, { backgroundColor: iconFill }]}>
29
+ <UiIcon name={status.icon} size={20} color={iconColor}/>
30
+ </View>) : (<LoadingSpinner color={theme.accentColor} style={styles.centered}/>)}
31
+ <Text accessibilityRole="header" accessibilityLiveRegion="polite" adjustsFontSizeToFit={status.error && fontScale <= 1} numberOfLines={status.error && fontScale <= 1 ? 1 : undefined} style={[
32
+ styles.statusTitle,
33
+ status.error && styles.errorTitle,
34
+ { color: theme.onSurfaceColor },
35
+ ]}>
28
36
  {status.title}
29
37
  </Text>
30
38
  <Text style={[styles.statusSubtitle, { color: theme.mutedColor }]}>{status.subtitle}</Text>
31
39
  {status.step !== undefined ? (<View style={styles.steps}>
32
- {['Connect account', 'Verify details', 'Finish'].map((label, index) => (<View key={label} style={styles.step} accessible accessibilityLabel={`${label}, ${index < status.step ? 'complete' : index === status.step ? 'in progress' : 'next'}`}>
33
- <View style={[
34
- styles.stepNode,
35
- index === status.step
36
- ? { backgroundColor: theme.accentColor, borderColor: theme.accentColor }
37
- : null,
38
- index < status.step ? styles.stepDone : null,
39
- ]}>
40
- {index < status.step ? (<UiIcon name="check" size={14} color={theme.accentColor}/>) : (<Text style={[
41
- styles.stepNumber,
42
- { color: index === status.step ? '#ffffff' : theme.mutedColor },
40
+ {['Connect account', 'Verify details', 'Finish'].map((label, index) => {
41
+ const step = status.step;
42
+ const active = index === step;
43
+ const done = index < step;
44
+ return (<View key={label} style={styles.step} accessible accessibilityLabel={`${label}, ${done ? 'complete' : active ? 'in progress' : 'next'}`}>
45
+ <View style={styles.stepTrack}>
46
+ <View style={[
47
+ styles.stepLine,
48
+ {
49
+ backgroundColor: index === 0
50
+ ? 'transparent'
51
+ : index <= step
52
+ ? theme.accentColor
53
+ : palette.line,
54
+ },
55
+ ]}/>
56
+ <View style={[
57
+ styles.stepNode,
58
+ {
59
+ backgroundColor: active
60
+ ? theme.accentColor
61
+ : done
62
+ ? palette.tint
63
+ : theme.surfaceColor,
64
+ borderColor: active ? theme.accentColor : palette.line,
65
+ },
43
66
  ]}>
44
- {index + 1}
45
- </Text>)}
46
- </View>
47
- <Text style={[
48
- styles.stepLabel,
49
- { color: index === status.step ? theme.onSurfaceColor : theme.mutedColor },
50
- index === status.step ? styles.stepActive : null,
51
- ]}>
52
- {label}
53
- </Text>
54
- </View>))}
67
+ {done ? (<UiIcon name="check" size={14} color={theme.accentColor}/>) : (<Text style={[
68
+ styles.stepNumber,
69
+ { color: active ? theme.onAccentColor : theme.mutedColor },
70
+ ]}>
71
+ {index + 1}
72
+ </Text>)}
73
+ </View>
74
+ <View style={[
75
+ styles.stepLine,
76
+ {
77
+ backgroundColor: index === 2 ? 'transparent' : done ? theme.accentColor : palette.line,
78
+ },
79
+ ]}/>
80
+ </View>
81
+ <Text style={[
82
+ styles.stepLabel,
83
+ active && styles.stepActive,
84
+ { color: active ? theme.onSurfaceColor : theme.mutedColor },
85
+ ]}>
86
+ {label.replace(' ', '\n')}
87
+ </Text>
88
+ </View>);
89
+ })}
55
90
  </View>) : null}
56
- {status.error ? (<SessionIdRow sessionId={sessionId} onCopySessionId={onCopySessionId} mutedColor={theme.mutedColor} accentColor={theme.accentColor}/>) : null}
91
+ {status.error ? (<SessionIdRow sessionId={sessionId} onCopySessionId={onCopySessionId} theme={theme}/>) : null}
57
92
  {action ? (<View>
58
93
  <Pressable accessibilityRole="button" style={[styles.primaryAction, { backgroundColor: theme.accentColor }]} onPress={action === 'retry'
59
94
  ? onRetry
@@ -62,7 +97,9 @@ export function FlowStatus({ status, theme, providerName, sessionId, onCopySessi
62
97
  : action === 'done'
63
98
  ? onDone
64
99
  : onClose}>
65
- <Text style={styles.primaryActionText}>{primary}</Text>
100
+ <Text style={[styles.primaryActionText, { color: theme.onAccentColor }]}>
101
+ {primary}
102
+ </Text>
66
103
  </Pressable>
67
104
  </View>) : null}
68
105
  </View>
@@ -1 +1 @@
1
- {"version":3,"file":"FlowStatus.js","sourceRoot":"","sources":["../../../src/components/providerAttest/FlowStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,YAAY,EACZ,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,GAWP;IACC,MAAM,SAAS,GACb,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;IAClG,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,OAAO,GACX,MAAM,KAAK,OAAO;QAChB,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,MAAM,KAAK,QAAQ;YACnB,CAAC,CAAC,aAAa,YAAY,EAAE;YAC7B,CAAC,CAAC,eAAe,CAAC;IACxB,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,eAAe,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC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CAAC,QAAQ;oBACV,CAAC,CAAC,MAAM,KAAK,MAAM;wBACjB,CAAC,CAAC,MAAM;wBACR,CAAC,CAAC,OACV,CAAC,CACD;cAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CACxD;YAAA,EAAE,SAAS,CACb;UAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Pressable, ScrollView, Text, View } from 'react-native';\n\nimport { LoadingSpinner } from './LoadingSpinner';\nimport { SessionIdRow } from './SessionIdRow';\nimport { UiIcon } from './UiIcon';\nimport type { FlowStatusCopy } from './copy';\nimport { styles } from './styles';\nimport type { ResolvedTheme } from './theme';\n\nexport function FlowStatus({\n status,\n theme,\n providerName,\n sessionId,\n onCopySessionId,\n onRetry,\n onReturn,\n onClose,\n onDone,\n}: {\n status: FlowStatusCopy;\n theme: ResolvedTheme;\n providerName: string;\n sessionId?: string;\n onCopySessionId?: (id: string) => void | Promise<void>;\n onRetry: () => void;\n onReturn: () => void;\n onClose: () => void;\n onDone: () => void;\n}) {\n const iconColor =\n status.tone === 'error' ? '#aa3d42' : status.tone === 'warning' ? '#975a1c' : theme.accentColor;\n const action = status.action;\n const primary =\n action === 'retry'\n ? 'Try again'\n : action === 'return'\n ? `Return to ${providerName}`\n : 'Return to app';\n return (\n <ScrollView\n style={[styles.statusOverlay, { backgroundColor: theme.surfaceColor }]}\n contentContainerStyle={styles.statusScroll}\n keyboardShouldPersistTaps=\"handled\"\n accessibilityViewIsModal>\n <View style={styles.statusBody}>\n {status.icon ? (\n <View\n style={[\n styles.stateIcon,\n status.tone === 'error'\n ? styles.stateError\n : status.tone === 'warning'\n ? styles.stateWarning\n : null,\n ]}>\n <UiIcon name={status.icon} size={23} color={iconColor} />\n </View>\n ) : (\n <LoadingSpinner color={theme.accentColor} />\n )}\n <Text\n accessibilityRole=\"header\"\n accessibilityLiveRegion=\"polite\"\n style={[styles.statusTitle, { color: theme.onSurfaceColor }]}>\n {status.title}\n </Text>\n <Text style={[styles.statusSubtitle, { color: theme.mutedColor }]}>{status.subtitle}</Text>\n {status.step !== undefined ? (\n <View style={styles.steps}>\n {['Connect account', 'Verify details', 'Finish'].map((label, index) => (\n <View\n key={label}\n style={styles.step}\n accessible\n accessibilityLabel={`${label}, ${index < status.step! ? 'complete' : index === status.step ? 'in progress' : 'next'}`}>\n <View\n style={[\n styles.stepNode,\n index === status.step\n ? { backgroundColor: theme.accentColor, borderColor: theme.accentColor }\n : null,\n index < status.step! ? styles.stepDone : null,\n ]}>\n {index < status.step! ? (\n <UiIcon name=\"check\" size={14} color={theme.accentColor} />\n ) : (\n <Text\n style={[\n styles.stepNumber,\n { color: index === status.step ? '#ffffff' : theme.mutedColor },\n ]}>\n {index + 1}\n </Text>\n )}\n </View>\n <Text\n style={[\n styles.stepLabel,\n { color: index === status.step ? theme.onSurfaceColor : theme.mutedColor },\n index === status.step ? styles.stepActive : null,\n ]}>\n {label}\n </Text>\n </View>\n ))}\n </View>\n ) : null}\n {status.error ? (\n <SessionIdRow\n sessionId={sessionId}\n onCopySessionId={onCopySessionId}\n mutedColor={theme.mutedColor}\n accentColor={theme.accentColor}\n />\n ) : null}\n {action ? (\n <View>\n <Pressable\n accessibilityRole=\"button\"\n style={[styles.primaryAction, { backgroundColor: theme.accentColor }]}\n onPress={\n action === 'retry'\n ? onRetry\n : action === 'return'\n ? onReturn\n : action === 'done'\n ? onDone\n : onClose\n }>\n <Text style={styles.primaryActionText}>{primary}</Text>\n </Pressable>\n </View>\n ) : null}\n </View>\n </ScrollView>\n );\n}\n"]}
1
+ {"version":3,"file":"FlowStatus.js","sourceRoot":"","sources":["../../../src/components/providerAttest/FlowStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,O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,CAAC,IAAI,CACV;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Pressable, ScrollView, Text, useWindowDimensions, View } from 'react-native';\n\nimport { LoadingSpinner } from './LoadingSpinner';\nimport { SessionIdRow } from './SessionIdRow';\nimport { UiIcon } from './UiIcon';\nimport type { FlowStatusCopy } from './copy';\nimport { styles } from './styles';\nimport type { ResolvedTheme } from './theme';\n\nexport function FlowStatus({\n status,\n theme,\n providerName,\n sessionId,\n onCopySessionId,\n onRetry,\n onReturn,\n onClose,\n onDone,\n}: {\n status: FlowStatusCopy;\n theme: ResolvedTheme;\n providerName: string;\n sessionId?: string;\n onCopySessionId?: (id: string) => void | Promise<void>;\n onRetry: () => void;\n onReturn: () => void;\n onClose: () => void;\n onDone: () => void;\n}) {\n const { fontScale } = useWindowDimensions();\n const { palette } = theme;\n const iconColor =\n status.tone === 'error'\n ? palette.error\n : status.tone === 'warning'\n ? palette.warning\n : theme.accentColor;\n const iconFill =\n status.tone === 'error'\n ? palette.errorFill\n : status.tone === 'warning'\n ? palette.warningFill\n : palette.tile;\n const action = status.action;\n const primary =\n action === 'retry'\n ? 'Try again'\n : action === 'return'\n ? `Return to ${providerName}`\n : 'Return to app';\n return (\n <ScrollView\n style={[styles.statusOverlay, { backgroundColor: theme.surfaceColor }]}\n contentContainerStyle={styles.statusScroll}\n keyboardShouldPersistTaps=\"handled\"\n accessibilityViewIsModal>\n <View style={styles.statusBody}>\n {status.icon ? (\n <View style={[styles.stateIcon, { backgroundColor: iconFill }]}>\n <UiIcon name={status.icon} size={20} color={iconColor} />\n </View>\n ) : (\n <LoadingSpinner color={theme.accentColor} style={styles.centered} />\n )}\n <Text\n accessibilityRole=\"header\"\n accessibilityLiveRegion=\"polite\"\n adjustsFontSizeToFit={status.error && fontScale <= 1}\n numberOfLines={status.error && fontScale <= 1 ? 1 : undefined}\n style={[\n styles.statusTitle,\n status.error && styles.errorTitle,\n { color: theme.onSurfaceColor },\n ]}>\n {status.title}\n </Text>\n <Text style={[styles.statusSubtitle, { color: theme.mutedColor }]}>{status.subtitle}</Text>\n {status.step !== undefined ? (\n <View style={styles.steps}>\n {['Connect account', 'Verify details', 'Finish'].map((label, index) => {\n const step = status.step!;\n const active = index === step;\n const done = index < step;\n return (\n <View\n key={label}\n style={styles.step}\n accessible\n accessibilityLabel={`${label}, ${done ? 'complete' : active ? 'in progress' : 'next'}`}>\n <View style={styles.stepTrack}>\n <View\n style={[\n styles.stepLine,\n {\n backgroundColor:\n index === 0\n ? 'transparent'\n : index <= step\n ? theme.accentColor\n : palette.line,\n },\n ]}\n />\n <View\n style={[\n styles.stepNode,\n {\n backgroundColor: active\n ? theme.accentColor\n : done\n ? palette.tint\n : theme.surfaceColor,\n borderColor: active ? theme.accentColor : palette.line,\n },\n ]}>\n {done ? (\n <UiIcon name=\"check\" size={14} color={theme.accentColor} />\n ) : (\n <Text\n style={[\n styles.stepNumber,\n { color: active ? theme.onAccentColor : theme.mutedColor },\n ]}>\n {index + 1}\n </Text>\n )}\n </View>\n <View\n style={[\n styles.stepLine,\n {\n backgroundColor:\n index === 2 ? 'transparent' : done ? theme.accentColor : palette.line,\n },\n ]}\n />\n </View>\n <Text\n style={[\n styles.stepLabel,\n active && styles.stepActive,\n { color: active ? theme.onSurfaceColor : theme.mutedColor },\n ]}>\n {label.replace(' ', '\\n')}\n </Text>\n </View>\n );\n })}\n </View>\n ) : null}\n {status.error ? (\n <SessionIdRow sessionId={sessionId} onCopySessionId={onCopySessionId} theme={theme} />\n ) : null}\n {action ? (\n <View>\n <Pressable\n accessibilityRole=\"button\"\n style={[styles.primaryAction, { backgroundColor: theme.accentColor }]}\n onPress={\n action === 'retry'\n ? onRetry\n : action === 'return'\n ? onReturn\n : action === 'done'\n ? onDone\n : onClose\n }>\n <Text style={[styles.primaryActionText, { color: theme.onAccentColor }]}>\n {primary}\n </Text>\n </Pressable>\n </View>\n ) : null}\n </View>\n </ScrollView>\n );\n}\n"]}
@@ -284,7 +284,7 @@ function ProviderSheetContent({ flow, insets, backHandlerRef, headerGestures, })
284
284
  <BrowserHeader headerGestures={headerGestures} title={errorCode?.startsWith('SATYA_META_ACCOUNT_') ? 'Dossier' : providerName} theme={theme} pageLoading={!confirmation && (showRefresh || (openingPage && !status?.error && !complete))
285
285
  ? webViewLoading
286
286
  : undefined} onRefresh={showRefresh && !confirmation ? handleReload : undefined} onClose={requestClose} closeLabel={confirmation ? 'Dismiss leave confirmation' : undefined}/>
287
- {popupOpen && !providerContentConcealed && !confirmation ? (<Pressable accessibilityRole="button" accessibilityLabel={`Back to ${providerName}`} style={styles.popupHint} onPress={closeManagedPopup}>
287
+ {popupOpen && !providerContentConcealed && !confirmation ? (<Pressable accessibilityRole="button" accessibilityLabel={`Back to ${providerName}`} style={[styles.popupHint, { backgroundColor: theme.palette.tint }]} onPress={closeManagedPopup}>
288
288
  <UiIcon name="back" color={theme.accentColor} size={18}/>
289
289
  <Text style={[styles.popupHintText, { color: theme.accentColor }]}>
290
290
  Back to {providerName}