@funkit/connect-rn 8.3.0 → 9.0.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/CHANGELOG.md +38 -0
- package/README.md +16 -12
- package/dist/{chunk-Z6IQFV5E.js → chunk-3ZNAGQHD.js} +3 -3
- package/dist/{chunk-KDRCHYXB.js → chunk-MVQH4YFI.js} +18 -9
- package/dist/chunk-MVQH4YFI.js.map +7 -0
- package/dist/{chunk-ZIT24GW5.js → chunk-ZE77GVDW.js} +94 -10
- package/dist/chunk-ZE77GVDW.js.map +7 -0
- package/dist/clients/lighter.js +2 -2
- package/dist/clients/nado.js +3 -3
- package/dist/clients/solana.js +1 -1
- package/dist/index.js +1694 -1261
- package/dist/index.js.map +4 -4
- package/dist/preview.js +1 -1
- package/dist/src/fiat/FiatContactScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatFormScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatKycOptionsScreen.d.ts +1 -1
- package/dist/src/fiat/FiatKycOptionsScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatUnsupportedStep.d.ts +11 -0
- package/dist/src/fiat/FiatUnsupportedStep.d.ts.map +1 -0
- package/dist/src/fiat/SurfaceSlot.d.ts +3 -1
- package/dist/src/fiat/SurfaceSlot.d.ts.map +1 -1
- package/dist/src/fiat/closeFailure.d.ts +19 -0
- package/dist/src/fiat/closeFailure.d.ts.map +1 -0
- package/dist/src/fiat/depositOutcome.d.ts +18 -1
- package/dist/src/fiat/depositOutcome.d.ts.map +1 -1
- package/dist/src/fiat/kycFormTheme.d.ts +1 -0
- package/dist/src/fiat/kycFormTheme.d.ts.map +1 -1
- package/dist/src/fiat/otpScreenProps.d.ts.map +1 -1
- package/dist/src/fiat/providers/CoinbaseCheckoutSurface.d.ts.map +1 -1
- package/dist/src/fiat/providers/SumsubKycSurface.d.ts.map +1 -1
- package/dist/src/fiat/providers/TransakApplePaySurface.d.ts.map +1 -1
- package/dist/src/fiat/providers/applePayButtonMetrics.d.ts +1 -2
- package/dist/src/fiat/providers/applePayButtonMetrics.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbaseFailureCopy.d.ts +1 -0
- package/dist/src/fiat/providers/coinbaseFailureCopy.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpayApplePayStyle.d.ts +5 -10
- package/dist/src/fiat/providers/moonpayApplePayStyle.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripeRoundPush.d.ts +6 -0
- package/dist/src/fiat/providers/stripeRoundPush.d.ts.map +1 -1
- package/dist/src/fiat/providers/useStripeOnrampClient.d.ts.map +1 -1
- package/dist/src/fiat/providers/useWebViewTermination.d.ts +15 -0
- package/dist/src/fiat/providers/useWebViewTermination.d.ts.map +1 -0
- package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
- package/dist/src/flow/DepositReceivedToast.d.ts.map +1 -1
- package/dist/src/flow/FiatDepositAmountStep.d.ts +7 -1
- package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
- package/dist/src/flow/FlowSheet.d.ts.map +1 -1
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/SheetMaterial.d.ts +7 -6
- package/dist/src/flow/SheetMaterial.d.ts.map +1 -1
- package/dist/src/flow/depositFlowConfig.d.ts +13 -6
- package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
- package/dist/src/flow/flowError.d.ts +3 -1
- package/dist/src/flow/flowError.d.ts.map +1 -1
- package/dist/src/flow/guardHostCallbacks.d.ts +8 -1
- package/dist/src/flow/guardHostCallbacks.d.ts.map +1 -1
- package/dist/src/flow/useKeyboardHeight.d.ts.map +1 -1
- package/dist/src/flow/validateClientMetadata.d.ts.map +1 -1
- package/dist/src/identity/IdentityContext.d.ts +8 -0
- package/dist/src/identity/IdentityContext.d.ts.map +1 -1
- package/dist/src/logging/datadogHttpLogTransport.d.ts +10 -3
- package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
- package/dist/src/logging/logger.d.ts.map +1 -1
- package/dist/src/native/glassEffect.d.ts +19 -0
- package/dist/src/native/glassEffect.d.ts.map +1 -1
- package/ios/FrostedGlassView.swift +207 -0
- package/ios/FunkitGlassEffect.podspec +1 -1
- package/ios/FunkitGlassEffectModule.swift +42 -0
- package/package.json +6 -5
- package/dist/chunk-KDRCHYXB.js.map +0 -7
- package/dist/chunk-ZIT24GW5.js.map +0 -7
- /package/dist/{chunk-Z6IQFV5E.js.map → chunk-3ZNAGQHD.js.map} +0 -0
|
@@ -5,8 +5,9 @@ import type { LogRecord, LogTransport, TrackingConsent } from '@funkit/connect-c
|
|
|
5
5
|
* pulls in native modules (autolinking, pods, no Expo Go); a plain `fetch` to
|
|
6
6
|
* the logs intake needs none, so this works in Expo Go and any RN runtime.
|
|
7
7
|
*
|
|
8
|
-
* Records are batched and flushed
|
|
9
|
-
*
|
|
8
|
+
* Records are batched and flushed on a timer (or when the batch fills). Each
|
|
9
|
+
* batch retries with backoff, then waits for the next flush if the intake is
|
|
10
|
+
* still unreachable; nothing a send does can throw back into a user flow.
|
|
10
11
|
* Authenticates with the public Datadog **client token** via `dd-api-key`
|
|
11
12
|
* (the same credential the browser SDK uses — safe to embed), so no server-side
|
|
12
13
|
* API key is needed.
|
|
@@ -32,13 +33,19 @@ export declare class DatadogHttpLogTransport implements LogTransport {
|
|
|
32
33
|
private readonly maxBatchSize;
|
|
33
34
|
private env;
|
|
34
35
|
private consent;
|
|
36
|
+
private consentGeneration;
|
|
35
37
|
private queue;
|
|
36
38
|
private flushTimer;
|
|
39
|
+
private isSending;
|
|
37
40
|
constructor(options: DatadogHttpLogTransportOptions);
|
|
38
41
|
setEnv(environment: string): void;
|
|
39
42
|
setTrackingConsent(consent: TrackingConsent): void;
|
|
40
43
|
log({ level, title, context, error }: LogRecord): void;
|
|
41
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Send the oldest batch, then the next once it lands. One send at a time:
|
|
46
|
+
* a failed batch goes back to the front of the queue, so the cap always
|
|
47
|
+
* drops the oldest records.
|
|
48
|
+
*/
|
|
42
49
|
flush(): void;
|
|
43
50
|
private scheduleFlush;
|
|
44
51
|
private clearTimer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datadogHttpLogTransport.d.ts","sourceRoot":"","sources":["../../../src/logging/datadogHttpLogTransport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"datadogHttpLogTransport.d.ts","sourceRoot":"","sources":["../../../src/logging/datadogHttpLogTransport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAI7B;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,8BAA8B;IAC7C,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAoCD,qBAAa,uBAAwB,YAAW,YAAY;IAC1D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAQ;IACxC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAQ;IAErC,OAAO,CAAC,GAAG,CAAoB;IAC/B,OAAO,CAAC,OAAO,CAA6B;IAE5C,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,UAAU,CAA6C;IAC/D,OAAO,CAAC,SAAS,CAAQ;gBAEb,OAAO,EAAE,8BAA8B;IAanD,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIjC,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAUlD,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,GAAG,IAAI;IAyCtD;;;;OAIG;IACH,KAAK,IAAI,IAAI;IAyEb,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;CAMnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/logging/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/logging/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAShD;;;;;GAKG;AACH,eAAO,MAAM,MAAM,WAKlB,CAAA"}
|
|
@@ -14,6 +14,25 @@ export interface GlassViewProps extends ViewProps {
|
|
|
14
14
|
concentricCorners?: boolean;
|
|
15
15
|
concentricMinimumRadius?: number;
|
|
16
16
|
}
|
|
17
|
+
export type FrostStyle = 'regular' | 'light' | 'dark' | 'systemUltraThinMaterialLight' | 'systemUltraThinMaterialDark';
|
|
18
|
+
export interface FrostedGlassViewProps extends ViewProps {
|
|
19
|
+
blurStyle?: FrostStyle;
|
|
20
|
+
/** 0–100, on expo-blur's scale. */
|
|
21
|
+
blurIntensity?: number;
|
|
22
|
+
/** Painted over the blur, under the glass. */
|
|
23
|
+
fillColor?: ColorValue;
|
|
24
|
+
/** Left out, the view draws no glass. Ignored below iOS 26. */
|
|
25
|
+
glassStyle?: Exclude<GlassStyle, 'none'>;
|
|
26
|
+
glassTint?: ColorValue;
|
|
27
|
+
colorScheme?: 'auto' | 'light' | 'dark';
|
|
28
|
+
/** Every layer's corner, and below iOS 26 the corner of a concentric view too. */
|
|
29
|
+
cornerRadius?: number;
|
|
30
|
+
/** Every layer follows the enclosing container's corner (iOS 26 `containerConcentric`). */
|
|
31
|
+
concentricCorners?: boolean;
|
|
32
|
+
concentricMinimumRadius?: number;
|
|
33
|
+
}
|
|
17
34
|
export declare const isLiquidGlassAvailable: boolean;
|
|
18
35
|
export declare const GlassView: ComponentType<GlassViewProps> | null;
|
|
36
|
+
/** Linked on every iOS version the pod supports; draws glass only where {@link isLiquidGlassAvailable}. */
|
|
37
|
+
export declare const FrostedGlassView: ComponentType<FrostedGlassViewProps> | null;
|
|
19
38
|
//# sourceMappingURL=glassEffect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glassEffect.d.ts","sourceRoot":"","sources":["../../../src/native/glassEffect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIzD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAErD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,gBAAgB,CAAC,EAAE,UAAU,CAAA;IAC7B,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IACvC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAA;CACjC;
|
|
1
|
+
{"version":3,"file":"glassEffect.d.ts","sourceRoot":"","sources":["../../../src/native/glassEffect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIzD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAErD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,gBAAgB,CAAC,EAAE,UAAU,CAAA;IAC7B,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IACvC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAA;CACjC;AAED,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,OAAO,GACP,MAAM,GACN,8BAA8B,GAC9B,6BAA6B,CAAA;AAEjC,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IACxC,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IACvC,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAA;CACjC;AAaD,eAAO,MAAM,sBAAsB,SAEW,CAAA;AAE9C,eAAO,MAAM,SAAS,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,IAG9C,CAAA;AAEV,2GAA2G;AAC3G,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,qBAAqB,CAAC,GAAG,IAG5D,CAAA"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
import UIKit
|
|
3
|
+
|
|
4
|
+
internal enum FrostStyle: String, Enumerable {
|
|
5
|
+
case regular
|
|
6
|
+
case light
|
|
7
|
+
case dark
|
|
8
|
+
case systemUltraThinMaterialLight
|
|
9
|
+
case systemUltraThinMaterialDark
|
|
10
|
+
|
|
11
|
+
func toUIBlurEffectStyle() -> UIBlurEffect.Style {
|
|
12
|
+
switch self {
|
|
13
|
+
case .regular:
|
|
14
|
+
return .regular
|
|
15
|
+
case .light:
|
|
16
|
+
return .light
|
|
17
|
+
case .dark:
|
|
18
|
+
return .dark
|
|
19
|
+
#if os(tvOS)
|
|
20
|
+
case .systemUltraThinMaterialLight:
|
|
21
|
+
return .light
|
|
22
|
+
case .systemUltraThinMaterialDark:
|
|
23
|
+
return .dark
|
|
24
|
+
#else
|
|
25
|
+
case .systemUltraThinMaterialLight:
|
|
26
|
+
return .systemUltraThinMaterialLight
|
|
27
|
+
case .systemUltraThinMaterialDark:
|
|
28
|
+
return .systemUltraThinMaterialDark
|
|
29
|
+
#endif
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
A blur of what lies behind, an optional fill over it, and optional Liquid Glass on top, drawn as one
|
|
36
|
+
view so every layer shares a single corner.
|
|
37
|
+
|
|
38
|
+
- The blur and fill are clipped to the corner; the glass is not, so it keeps its rim.
|
|
39
|
+
- Below iOS 26 the glass is left out and the corner is `cornerRadius` throughout.
|
|
40
|
+
*/
|
|
41
|
+
public final class FrostedGlassView: ExpoView {
|
|
42
|
+
private let frostView = UIView()
|
|
43
|
+
private let blurView = UIVisualEffectView()
|
|
44
|
+
private let fillView = UIView()
|
|
45
|
+
private let glassView = UIVisualEffectView()
|
|
46
|
+
// Partial blur strength is a paused animation from no effect to the blur; the system drops it when
|
|
47
|
+
// the view leaves its window, so it is rebuilt on every entry.
|
|
48
|
+
private var blurAnimator: UIViewPropertyAnimator?
|
|
49
|
+
// UIGlassEffect renders nothing when applied before the view is laid out in a window.
|
|
50
|
+
private var isGlassMounted = false
|
|
51
|
+
|
|
52
|
+
private var frostStyle: FrostStyle = .regular
|
|
53
|
+
private var blurIntensity: CGFloat = 1
|
|
54
|
+
private var glassStyle: GlassStyle = .none
|
|
55
|
+
private var glassTint: UIColor?
|
|
56
|
+
private var glassColorScheme: GlassColorScheme = .auto
|
|
57
|
+
private var cornerRadius: CGFloat = 0
|
|
58
|
+
private var concentricCorners = false
|
|
59
|
+
private var concentricMinimumRadius: CGFloat?
|
|
60
|
+
|
|
61
|
+
public required init(appContext: AppContext? = nil) {
|
|
62
|
+
super.init(appContext: appContext)
|
|
63
|
+
isUserInteractionEnabled = false
|
|
64
|
+
|
|
65
|
+
frostView.clipsToBounds = true
|
|
66
|
+
frostView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
67
|
+
for frostLayer in [blurView, fillView] {
|
|
68
|
+
frostLayer.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
69
|
+
frostView.addSubview(frostLayer)
|
|
70
|
+
}
|
|
71
|
+
glassView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
72
|
+
addSubview(frostView)
|
|
73
|
+
addSubview(glassView)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
deinit {
|
|
77
|
+
blurAnimator?.stopAnimation(true)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public override func layoutSubviews() {
|
|
81
|
+
super.layoutSubviews()
|
|
82
|
+
frostView.frame = bounds
|
|
83
|
+
glassView.frame = bounds
|
|
84
|
+
if window != nil && !isGlassMounted {
|
|
85
|
+
isGlassMounted = true
|
|
86
|
+
applyGlass()
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public override func didMoveToWindow() {
|
|
91
|
+
super.didMoveToWindow()
|
|
92
|
+
if window == nil {
|
|
93
|
+
isGlassMounted = false
|
|
94
|
+
blurAnimator?.stopAnimation(true)
|
|
95
|
+
blurAnimator = nil
|
|
96
|
+
} else {
|
|
97
|
+
applyBlur()
|
|
98
|
+
setNeedsLayout()
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
func setFrostStyle(_ style: FrostStyle) {
|
|
103
|
+
guard style != frostStyle else { return }
|
|
104
|
+
frostStyle = style
|
|
105
|
+
applyBlur()
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
func setBlurIntensity(_ intensity: Double) {
|
|
109
|
+
let clamped = CGFloat(min(max(intensity / 100, 0), 1))
|
|
110
|
+
guard clamped != blurIntensity else { return }
|
|
111
|
+
blurIntensity = clamped
|
|
112
|
+
applyBlur()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
func setFillColor(_ color: UIColor?) {
|
|
116
|
+
fillView.backgroundColor = color
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
func setGlassStyle(_ style: GlassStyle) {
|
|
120
|
+
guard style != glassStyle else { return }
|
|
121
|
+
glassStyle = style
|
|
122
|
+
applyGlass()
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
func setGlassTint(_ color: UIColor?) {
|
|
126
|
+
guard color != glassTint else { return }
|
|
127
|
+
glassTint = color
|
|
128
|
+
applyGlass()
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
func setColorScheme(_ scheme: GlassColorScheme) {
|
|
132
|
+
guard scheme != glassColorScheme else { return }
|
|
133
|
+
glassColorScheme = scheme
|
|
134
|
+
glassView.overrideUserInterfaceStyle = scheme.toUIUserInterfaceStyle()
|
|
135
|
+
applyGlass()
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
func setCornerRadius(_ radius: CGFloat?) {
|
|
139
|
+
cornerRadius = radius ?? 0
|
|
140
|
+
applyCorners()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
func setConcentricCorners(_ concentric: Bool) {
|
|
144
|
+
concentricCorners = concentric
|
|
145
|
+
applyCorners()
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
func setConcentricMinimumRadius(_ minimum: CGFloat?) {
|
|
149
|
+
concentricMinimumRadius = minimum
|
|
150
|
+
applyCorners()
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private func applyBlur() {
|
|
154
|
+
blurAnimator?.stopAnimation(true)
|
|
155
|
+
blurAnimator = nil
|
|
156
|
+
let effect = UIBlurEffect(style: frostStyle.toUIBlurEffectStyle())
|
|
157
|
+
guard blurIntensity < 1 else {
|
|
158
|
+
blurView.effect = effect
|
|
159
|
+
return
|
|
160
|
+
}
|
|
161
|
+
blurView.effect = nil
|
|
162
|
+
guard window != nil, blurIntensity > 0 else { return }
|
|
163
|
+
let animator = UIViewPropertyAnimator(duration: 1, curve: .linear) { [weak self] in
|
|
164
|
+
self?.blurView.effect = effect
|
|
165
|
+
}
|
|
166
|
+
animator.fractionComplete = blurIntensity
|
|
167
|
+
blurAnimator = animator
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
private func applyGlass() {
|
|
171
|
+
guard isGlassMounted else { return }
|
|
172
|
+
#if compiler(>=6.2) // Xcode 26
|
|
173
|
+
if #available(iOS 26.0, tvOS 26.0, *), isGlassEffectAPIAvailable() {
|
|
174
|
+
// A glass effect assigned over another is not redrawn until the old one is torn down.
|
|
175
|
+
glassView.effect = UIVisualEffect()
|
|
176
|
+
guard let style = glassStyle.toUIGlassEffectStyle() else { return }
|
|
177
|
+
let effect = UIGlassEffect(style: style)
|
|
178
|
+
effect.tintColor = glassTint
|
|
179
|
+
glassView.effect = effect
|
|
180
|
+
applyCorners()
|
|
181
|
+
}
|
|
182
|
+
#endif
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
private func applyCorners() {
|
|
186
|
+
#if compiler(>=6.2) // Xcode 26
|
|
187
|
+
if #available(iOS 26.0, tvOS 26.0, *) {
|
|
188
|
+
let configuration: UICornerConfiguration = concentricCorners
|
|
189
|
+
? .uniformCorners(radius: .containerConcentric(minimum: concentricMinimumRadius))
|
|
190
|
+
: .uniformCorners(radius: UICornerRadius(floatLiteral: cornerRadius))
|
|
191
|
+
frostView.cornerConfiguration = configuration
|
|
192
|
+
glassView.cornerConfiguration = configuration
|
|
193
|
+
return
|
|
194
|
+
}
|
|
195
|
+
#endif
|
|
196
|
+
frostView.layer.cornerRadius = cornerRadius
|
|
197
|
+
frostView.layer.cornerCurve = .continuous
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// UIGlassEffect crashes on the iOS 26 betas that shipped the class without its factory.
|
|
202
|
+
private func isGlassEffectAPIAvailable() -> Bool {
|
|
203
|
+
guard let glassEffectClass = NSClassFromString("UIGlassEffect") as? NSObject.Type else {
|
|
204
|
+
return false
|
|
205
|
+
}
|
|
206
|
+
return glassEffectClass.responds(to: Selector(("effectWithStyle:")))
|
|
207
|
+
}
|
|
@@ -6,7 +6,7 @@ Pod::Spec.new do |s|
|
|
|
6
6
|
s.name = 'FunkitGlassEffect'
|
|
7
7
|
s.version = package['version']
|
|
8
8
|
s.summary = 'Liquid Glass sheet material for @funkit/connect-rn'
|
|
9
|
-
s.description = 'iOS 26 UIGlassEffect view with container-concentric corners
|
|
9
|
+
s.description = 'A blur + Liquid Glass material view, and an iOS 26 UIGlassEffect view with container-concentric corners forked from expo-glass-effect.'
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
@@ -109,6 +109,48 @@ public final class FunkitGlassEffectModule: Module {
|
|
|
109
109
|
view.setConcentricMinimumRadius(minimum)
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
|
|
113
|
+
Constant("isFrostedGlassViewAvailable") {
|
|
114
|
+
true
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
View(FrostedGlassView.self) {
|
|
118
|
+
Prop("blurStyle", .regular) { (view, style: FrostStyle) in
|
|
119
|
+
view.setFrostStyle(style)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
Prop("blurIntensity", 100.0) { (view, intensity: Double) in
|
|
123
|
+
view.setBlurIntensity(intensity)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Prop("fillColor") { (view, color: UIColor?) in
|
|
127
|
+
view.setFillColor(color)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
Prop("glassStyle", .none) { (view, style: GlassStyle) in
|
|
131
|
+
view.setGlassStyle(style)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
Prop("glassTint") { (view, color: UIColor?) in
|
|
135
|
+
view.setGlassTint(color)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
Prop("colorScheme", .auto) { (view, scheme: GlassColorScheme) in
|
|
139
|
+
view.setColorScheme(scheme)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
Prop("cornerRadius") { (view, radius: CGFloat?) in
|
|
143
|
+
view.setCornerRadius(radius)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
Prop("concentricCorners", false) { (view, concentric: Bool) in
|
|
147
|
+
view.setConcentricCorners(concentric)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
Prop("concentricMinimumRadius") { (view, minimum: CGFloat?) in
|
|
151
|
+
view.setConcentricMinimumRadius(minimum)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
112
154
|
}
|
|
113
155
|
}
|
|
114
156
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect-rn",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "React Native bindings for @funkit/connect. Re-exports the headless @funkit/connect-core logic; the RN platform halves (Restyle theme, WebView Swapped transport, Transfer/Swapped screens, logging) land in later releases.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"author": "https://fun.xyz/",
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@
|
|
44
|
+
"@lifeomic/attempt": "3.1.0",
|
|
45
|
+
"@moonpay/platform-sdk-react-native": "1.21.0",
|
|
45
46
|
"@shopify/restyle": "^2.4.5",
|
|
46
47
|
"@tanstack/react-form": "1.33.5",
|
|
47
48
|
"@transak/ui-components-core": "0.5.0",
|
|
@@ -49,10 +50,10 @@
|
|
|
49
50
|
"iso-3166-2": "1.0.0",
|
|
50
51
|
"libphonenumber-js": "1.13.6",
|
|
51
52
|
"react-i18next": "12.3.1",
|
|
53
|
+
"@funkit/api-base": "8.5.3",
|
|
52
54
|
"@funkit/chains": "2.4.2",
|
|
53
55
|
"@funkit/utils": "5.0.2",
|
|
54
|
-
"@funkit/
|
|
55
|
-
"@funkit/connect-core": "8.5.0"
|
|
56
|
+
"@funkit/connect-core": "8.5.1"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
59
|
"@gorhom/bottom-sheet": ">=5",
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
"react-native-reanimated": ">=3.0.0",
|
|
75
76
|
"react-native-safe-area-context": ">=4.0.0",
|
|
76
77
|
"react-native-svg": ">=15.0.0",
|
|
77
|
-
"react-native-webview": ">=13.
|
|
78
|
+
"react-native-webview": ">=13.15.0",
|
|
78
79
|
"viem": ">=2.22.14"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|