@legendapp/spark 0.0.2 → 0.0.3
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/package.json +2 -2
- package/patches/dependencies.json +252 -0
- package/patches/expo-application@55.0.19.patch +54 -0
- package/patches/expo-blur@55.0.18.patch +130 -0
- package/patches/expo-device@55.0.21.patch +149 -0
- package/patches/expo-font@55.0.8.patch +55 -0
- package/patches/expo-glass-effect@55.0.11.patch +304 -0
- package/patches/expo-haptics@55.0.18.patch +54 -0
- package/patches/expo-image-manipulator@55.0.21.patch +312 -0
- package/patches/expo-image-picker@55.0.24.patch +327 -0
- package/patches/expo-image@55.0.11.patch +158 -0
- package/patches/expo-keep-awake@55.0.8.patch +41 -0
- package/patches/expo-localization@55.0.19.patch +32 -0
- package/patches/expo-location@55.1.15.patch +190 -0
- package/patches/expo-symbols@55.0.9.patch +286 -0
- package/patches/expo-system-ui@55.0.22.patch +61 -0
- package/patches/expo-web-browser@55.0.20.patch +13 -0
- package/patches/react-native-app-logs@0.3.1.patch +20 -0
- package/patches/react-native-blurhash@2.1.3.patch +318 -0
- package/patches/react-native-community-blur@4.4.1.patch +415 -0
- package/patches/react-native-community-datetimepicker@9.2.2.patch +320 -0
- package/patches/react-native-fast-image@10.9.9.patch +131 -0
- package/patches/react-native-graph@1.4.0.patch +157 -0
- package/patches/react-native-keyboard-controller@1.22.9.patch +16 -0
- package/patches/react-native-masked-view-masked-view@0.3.2.patch +140 -0
- package/patches/react-native-mmkv@4.3.2.patch +40 -0
- package/patches/react-native-nitro-fetch@1.9.0.patch +130 -0
- package/patches/react-native-nitro-zxing@0.3.0.patch +13 -0
- package/patches/react-native-quick-base64@3.0.1.patch +13 -0
- package/patches/react-native-quick-crypto@1.1.9.patch +31 -0
- package/patches/react-native-release-profiler@0.4.5.patch +37 -0
- package/patches/react-native-screen-corner-radius@0.2.3.patch +13 -0
- package/patches/react-native-screens@4.23.0.patch +160 -0
- package/patches/react-native-svg@15.15.3.patch +31 -0
- package/patches/react-native-unistyles@3.6.0.patch +203 -0
- package/patches/react-native-worklets-core@1.6.3.patch +13 -0
- package/patches/react-navigation-native-stack@7.21.0.patch +16 -0
- package/patches/sentry-react-native@8.32.0.patch +76 -0
- package/skills/spark/UPGRADING.md +34 -0
- package/vendor/node_modules/@legendapp/spark-ai/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-audio/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +6 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +7 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +13 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +11 -11
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-input-cache.js +140 -0
- package/vendor/node_modules/@legendapp/spark-cli/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-codex/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-commands/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.mm +64 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/autolinking.cjs +3 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +28 -10
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-documents/package.json +7 -7
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-html/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-processes/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-rich-text/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-settings/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-system/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-tray/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-ui/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-updates/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-webview/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +1 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
diff --git a/Unistyles.podspec b/Unistyles.podspec
|
|
2
|
+
index adf83bf..ba3ba7f 100644
|
|
3
|
+
--- a/Unistyles.podspec
|
|
4
|
+
+++ b/Unistyles.podspec
|
|
5
|
+
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
6
|
+
s.license = package["license"]
|
|
7
|
+
s.authors = package["author"]
|
|
8
|
+
|
|
9
|
+
- s.platforms = { :ios => min_ios_version_supported }
|
|
10
|
+
+ s.platforms = { :ios => min_ios_version_supported, :osx => "14.0" }
|
|
11
|
+
s.source = { :git => package["repository"], :tag => "#{s.version}" }
|
|
12
|
+
|
|
13
|
+
s.source_files = [
|
|
14
|
+
diff --git a/ios/Extensions.swift b/ios/Extensions.swift
|
|
15
|
+
index 9b38a32..a707de7 100644
|
|
16
|
+
--- a/ios/Extensions.swift
|
|
17
|
+
+++ b/ios/Extensions.swift
|
|
18
|
+
@@ -1,5 +1,7 @@
|
|
19
|
+
import Foundation
|
|
20
|
+
|
|
21
|
+
+#if os(iOS)
|
|
22
|
+
+
|
|
23
|
+
extension UIColor {
|
|
24
|
+
// int is universal way of color representation
|
|
25
|
+
// iOS API expects UIColor, so we need to translate it
|
|
26
|
+
@@ -11,3 +13,4 @@ extension UIColor {
|
|
27
|
+
return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
+#endif
|
|
31
|
+
diff --git a/ios/NativePlatform+keyboard.swift b/ios/NativePlatform+keyboard.swift
|
|
32
|
+
index 0237e76..b95f651 100644
|
|
33
|
+
--- a/ios/NativePlatform+keyboard.swift
|
|
34
|
+
+++ b/ios/NativePlatform+keyboard.swift
|
|
35
|
+
@@ -1,3 +1,4 @@
|
|
36
|
+
+#if os(iOS)
|
|
37
|
+
import Foundation
|
|
38
|
+
|
|
39
|
+
struct KeyboardAnimation {
|
|
40
|
+
@@ -103,3 +104,5 @@ extension NativeIOSPlatform {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
+
|
|
45
|
+
+#endif
|
|
46
|
+
diff --git a/ios/NativePlatform+macos.swift b/ios/NativePlatform+macos.swift
|
|
47
|
+
new file mode 100644
|
|
48
|
+
index 0000000..ac219cf
|
|
49
|
+
--- /dev/null
|
|
50
|
+
+++ b/ios/NativePlatform+macos.swift
|
|
51
|
+
@@ -0,0 +1,124 @@
|
|
52
|
+
+#if os(macOS)
|
|
53
|
+
+
|
|
54
|
+
+import AppKit
|
|
55
|
+
+import NitroModules
|
|
56
|
+
+
|
|
57
|
+
+// AppKit counterpart of NativeIOSPlatform: a desktop window has no safe-area, status bar,
|
|
58
|
+
+// navigation bar or software keyboard, so those report zero; the window is the "screen".
|
|
59
|
+
+class NativeMacOSPlatform: HybridNativePlatformSpec {
|
|
60
|
+
+ var miniRuntime: UnistylesNativeMiniRuntime?
|
|
61
|
+
+ var dependencyListeners: Array<(Array<UnistyleDependency>, UnistylesNativeMiniRuntime) -> Void> = []
|
|
62
|
+
+ var observers: [NSObjectProtocol] = []
|
|
63
|
+
+ var appearanceObservation: NSKeyValueObservation?
|
|
64
|
+
+
|
|
65
|
+
+ override init() {
|
|
66
|
+
+ super.init()
|
|
67
|
+
+ self.miniRuntime = onMain { self.buildMiniRuntime() }
|
|
68
|
+
+ let center = NotificationCenter.default
|
|
69
|
+
+ for name in [NSWindow.didResizeNotification, NSWindow.didBecomeMainNotification, NSWindow.didChangeBackingPropertiesNotification] {
|
|
70
|
+
+ observers.append(center.addObserver(forName: name, object: nil, queue: .main) { [weak self] _ in self?.onNativePlatformChange() })
|
|
71
|
+
+ }
|
|
72
|
+
+ appearanceObservation = NSApplication.shared.observe(\.effectiveAppearance) { [weak self] _, _ in
|
|
73
|
+
+ DispatchQueue.main.async { self?.onNativePlatformChange() }
|
|
74
|
+
+ }
|
|
75
|
+
+ }
|
|
76
|
+
+
|
|
77
|
+
+ deinit {
|
|
78
|
+
+ observers.forEach { NotificationCenter.default.removeObserver($0) }
|
|
79
|
+
+ }
|
|
80
|
+
+
|
|
81
|
+
+ func onMain<T>(_ body: () -> T) -> T {
|
|
82
|
+
+ Thread.isMainThread ? body() : DispatchQueue.main.sync(execute: body)
|
|
83
|
+
+ }
|
|
84
|
+
+
|
|
85
|
+
+ var mainWindow: NSWindow? { NSApplication.shared.mainWindow ?? NSApplication.shared.keyWindow ?? NSApplication.shared.windows.first { $0.isVisible } }
|
|
86
|
+
+
|
|
87
|
+
+ func buildMiniRuntime() -> UnistylesNativeMiniRuntime {
|
|
88
|
+
+ let screen = getScreenDimensions()
|
|
89
|
+
+ return UnistylesNativeMiniRuntime(
|
|
90
|
+
+ colorScheme: getColorScheme(),
|
|
91
|
+
+ screen: screen,
|
|
92
|
+
+ contentSizeCategory: getContentSizeCategory(),
|
|
93
|
+
+ insets: getInsets(),
|
|
94
|
+
+ pixelRatio: getPixelRatio(),
|
|
95
|
+
+ fontScale: getFontScale(),
|
|
96
|
+
+ rtl: getPrefersRtlDirection(),
|
|
97
|
+
+ statusBar: getStatusBarDimensions(),
|
|
98
|
+
+ navigationBar: getNavigationBarDimensions(),
|
|
99
|
+
+ isPortrait: screen.height >= screen.width,
|
|
100
|
+
+ isLandscape: screen.width > screen.height
|
|
101
|
+
+ )
|
|
102
|
+
+ }
|
|
103
|
+
+
|
|
104
|
+
+ func getMiniRuntime() -> UnistylesNativeMiniRuntime { miniRuntime! }
|
|
105
|
+
+
|
|
106
|
+
+ func getColorScheme() -> ColorScheme {
|
|
107
|
+
+ onMain { NSApplication.shared.effectiveAppearance.bestMatch(from: [.darkAqua, .aqua]) == .darkAqua ? .dark : .light }
|
|
108
|
+
+ }
|
|
109
|
+
+
|
|
110
|
+
+ func getFontScale() -> Double { 1 }
|
|
111
|
+
+
|
|
112
|
+
+ func getContentSizeCategory() -> String { "unspecified" }
|
|
113
|
+
+
|
|
114
|
+
+ func getScreenDimensions() -> Dimensions {
|
|
115
|
+
+ onMain {
|
|
116
|
+
+ let size = mainWindow?.contentView?.bounds.size ?? NSScreen.main?.frame.size ?? .zero
|
|
117
|
+
+ return Dimensions(width: size.width, height: size.height)
|
|
118
|
+
+ }
|
|
119
|
+
+ }
|
|
120
|
+
+
|
|
121
|
+
+ func getOrientation() -> Orientation {
|
|
122
|
+
+ let screen = getScreenDimensions()
|
|
123
|
+
+ return screen.width > screen.height ? .landscape : .portrait
|
|
124
|
+
+ }
|
|
125
|
+
+
|
|
126
|
+
+ func getInsets() -> Insets { Insets(top: 0, bottom: 0, left: 0, right: 0, ime: 0) }
|
|
127
|
+
+
|
|
128
|
+
+ func getPrefersRtlDirection() -> Bool {
|
|
129
|
+
+ onMain { UserDefaults.standard.bool(forKey: "RCTI18nUtil_forceRTL") || NSApplication.shared.userInterfaceLayoutDirection == .rightToLeft }
|
|
130
|
+
+ }
|
|
131
|
+
+
|
|
132
|
+
+ func getStatusBarDimensions() -> Dimensions { Dimensions(width: 0, height: 0) }
|
|
133
|
+
+
|
|
134
|
+
+ func getNavigationBarDimensions() -> Dimensions { Dimensions(width: 0, height: 0) }
|
|
135
|
+
+
|
|
136
|
+
+ func getPixelRatio() -> Double {
|
|
137
|
+
+ onMain { Double(mainWindow?.backingScaleFactor ?? NSScreen.main?.backingScaleFactor ?? 1) }
|
|
138
|
+
+ }
|
|
139
|
+
+
|
|
140
|
+
+ func setRootViewBackgroundColor(color: Double) throws {
|
|
141
|
+
+ let value = Int(color)
|
|
142
|
+
+ DispatchQueue.main.async {
|
|
143
|
+
+ self.mainWindow?.backgroundColor = NSColor(red: CGFloat((value >> 16) & 0xFF) / 255, green: CGFloat((value >> 8) & 0xFF) / 255, blue: CGFloat(value & 0xFF) / 255, alpha: 1)
|
|
144
|
+
+ }
|
|
145
|
+
+ }
|
|
146
|
+
+
|
|
147
|
+
+ func setStatusBarHidden(isHidden: Bool) throws {}
|
|
148
|
+
+
|
|
149
|
+
+ func setNavigationBarHidden(isHidden: Bool) throws {}
|
|
150
|
+
+
|
|
151
|
+
+ func setImmersiveMode(isEnabled: Bool) throws {}
|
|
152
|
+
+
|
|
153
|
+
+ func registerPlatformListener(callback: @escaping (Array<UnistyleDependency>, UnistylesNativeMiniRuntime) -> Void) throws {
|
|
154
|
+
+ dependencyListeners.append(callback)
|
|
155
|
+
+ }
|
|
156
|
+
+
|
|
157
|
+
+ // Desktop windows have no software keyboard, so the IME inset never changes.
|
|
158
|
+
+ func registerImeListener(callback: @escaping (UnistylesNativeMiniRuntime) -> Void) throws {}
|
|
159
|
+
+
|
|
160
|
+
+ func unregisterPlatformListeners() throws {
|
|
161
|
+
+ dependencyListeners.removeAll()
|
|
162
|
+
+ }
|
|
163
|
+
+
|
|
164
|
+
+ func onNativePlatformChange() {
|
|
165
|
+
+ guard let current = miniRuntime else { return }
|
|
166
|
+
+ let next = buildMiniRuntime()
|
|
167
|
+
+ let changed = UnistylesNativeMiniRuntime.diff(lhs: current, rhs: next)
|
|
168
|
+
+ if !changed.isEmpty {
|
|
169
|
+
+ miniRuntime = next
|
|
170
|
+
+ dependencyListeners.forEach { $0(changed, next) }
|
|
171
|
+
+ }
|
|
172
|
+
+ }
|
|
173
|
+
+}
|
|
174
|
+
+
|
|
175
|
+
+#endif
|
|
176
|
+
diff --git a/ios/NativePlatform.swift b/ios/NativePlatform.swift
|
|
177
|
+
index d8b86a1..90288a2 100644
|
|
178
|
+
--- a/ios/NativePlatform.swift
|
|
179
|
+
+++ b/ios/NativePlatform.swift
|
|
180
|
+
@@ -8,6 +8,8 @@ public class NativePlatform {
|
|
181
|
+
public static func create() -> HybridNativePlatformSpec_cxx {
|
|
182
|
+
#if os(iOS)
|
|
183
|
+
let nativePlatform = NativeIOSPlatform()
|
|
184
|
+
+ #elseif os(macOS)
|
|
185
|
+
+ let nativePlatform = NativeMacOSPlatform()
|
|
186
|
+
#else
|
|
187
|
+
throw PlatformError.UnsupportedPlatform
|
|
188
|
+
#endif
|
|
189
|
+
diff --git a/ios/NativePlatformListener+ios.swift b/ios/NativePlatformListener+ios.swift
|
|
190
|
+
index ac7db8f..8968117 100644
|
|
191
|
+
--- a/ios/NativePlatformListener+ios.swift
|
|
192
|
+
+++ b/ios/NativePlatformListener+ios.swift
|
|
193
|
+
@@ -1,3 +1,4 @@
|
|
194
|
+
+#if os(iOS)
|
|
195
|
+
import Foundation
|
|
196
|
+
import Combine
|
|
197
|
+
|
|
198
|
+
@@ -65,3 +66,5 @@ extension NativeIOSPlatform {
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
+
|
|
203
|
+
+#endif
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/react-native-worklets-core.podspec b/react-native-worklets-core.podspec
|
|
2
|
+
index f5b58d7..c9bcfea 100644
|
|
3
|
+
--- a/react-native-worklets-core.podspec
|
|
4
|
+
+++ b/react-native-worklets-core.podspec
|
|
5
|
+
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
6
|
+
s.license = package["license"]
|
|
7
|
+
s.authors = package["author"]
|
|
8
|
+
|
|
9
|
+
- s.platforms = { :ios => "11.0" }
|
|
10
|
+
+ s.platforms = { :ios => "11.0", :osx => "14.0" }
|
|
11
|
+
s.source = { :git => "https://github.com/margelo/react-native-worklets-core.git", :tag => "#{s.version}" }
|
|
12
|
+
|
|
13
|
+
s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{h,cpp}"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
diff --git a/lib/module/views/NativeStackView.macos.js b/lib/module/views/NativeStackView.macos.js
|
|
2
|
+
new file mode 100644
|
|
3
|
+
index 0000000..c42b5d6
|
|
4
|
+
--- /dev/null
|
|
5
|
+
+++ b/lib/module/views/NativeStackView.macos.js
|
|
6
|
+
@@ -0,0 +1,2 @@
|
|
7
|
+
+// macOS has no native stack: use the JavaScript stack view, which draws headers with @react-navigation/elements.
|
|
8
|
+
+export * from "./NativeStackView.js";
|
|
9
|
+
diff --git a/src/views/NativeStackView.macos.tsx b/src/views/NativeStackView.macos.tsx
|
|
10
|
+
new file mode 100644
|
|
11
|
+
index 0000000..82511c8
|
|
12
|
+
--- /dev/null
|
|
13
|
+
+++ b/src/views/NativeStackView.macos.tsx
|
|
14
|
+
@@ -0,0 +1,2 @@
|
|
15
|
+
+// macOS has no native stack: use the JavaScript stack view, which draws headers with @react-navigation/elements.
|
|
16
|
+
+export * from './NativeStackView.tsx';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
diff --git a/ios/Replay/RNSentryReplayMask.h b/ios/Replay/RNSentryReplayMask.h
|
|
2
|
+
index 3903d41..61dd169 100644
|
|
3
|
+
--- a/ios/Replay/RNSentryReplayMask.h
|
|
4
|
+
+++ b/ios/Replay/RNSentryReplayMask.h
|
|
5
|
+
@@ -1,6 +1,8 @@
|
|
6
|
+
#import <Sentry/SentryDefines.h>
|
|
7
|
+
|
|
8
|
+
-#if SENTRY_HAS_UIKIT
|
|
9
|
+
+// macOS has no replay, but codegen's component provider still names this view: without the class, its
|
|
10
|
+
+// registry gets a nil entry and the app aborts at launch. On macOS it is a plain container.
|
|
11
|
+
+#if SENTRY_HAS_UIKIT || TARGET_OS_OSX
|
|
12
|
+
|
|
13
|
+
# import <React/RCTViewManager.h>
|
|
14
|
+
|
|
15
|
+
diff --git a/ios/Replay/RNSentryReplayMask.mm b/ios/Replay/RNSentryReplayMask.mm
|
|
16
|
+
index 3dad47a..de9bd40 100644
|
|
17
|
+
--- a/ios/Replay/RNSentryReplayMask.mm
|
|
18
|
+
+++ b/ios/Replay/RNSentryReplayMask.mm
|
|
19
|
+
@@ -1,6 +1,6 @@
|
|
20
|
+
#import <Sentry/SentryDefines.h>
|
|
21
|
+
|
|
22
|
+
-#if SENTRY_HAS_UIKIT
|
|
23
|
+
+#if SENTRY_HAS_UIKIT || TARGET_OS_OSX
|
|
24
|
+
|
|
25
|
+
# import "RNSentryReplayMask.h"
|
|
26
|
+
|
|
27
|
+
@@ -16,7 +16,11 @@ @implementation RNSentryReplayMaskManager
|
|
28
|
+
|
|
29
|
+
RCT_EXPORT_MODULE(RNSentryReplayMask)
|
|
30
|
+
|
|
31
|
+
+# if TARGET_OS_OSX
|
|
32
|
+
+- (RCTPlatformView *)view
|
|
33
|
+
+# else
|
|
34
|
+
- (UIView *)view
|
|
35
|
+
+# endif
|
|
36
|
+
{
|
|
37
|
+
return [RNSentryReplayMask new];
|
|
38
|
+
}
|
|
39
|
+
diff --git a/ios/Replay/RNSentryReplayUnmask.h b/ios/Replay/RNSentryReplayUnmask.h
|
|
40
|
+
index c1dc8a3..d28497e 100644
|
|
41
|
+
--- a/ios/Replay/RNSentryReplayUnmask.h
|
|
42
|
+
+++ b/ios/Replay/RNSentryReplayUnmask.h
|
|
43
|
+
@@ -1,6 +1,8 @@
|
|
44
|
+
#import <Sentry/SentryDefines.h>
|
|
45
|
+
|
|
46
|
+
-#if SENTRY_HAS_UIKIT
|
|
47
|
+
+// macOS has no replay, but codegen's component provider still names this view: without the class, its
|
|
48
|
+
+// registry gets a nil entry and the app aborts at launch. On macOS it is a plain container.
|
|
49
|
+
+#if SENTRY_HAS_UIKIT || TARGET_OS_OSX
|
|
50
|
+
|
|
51
|
+
# import <React/RCTViewManager.h>
|
|
52
|
+
|
|
53
|
+
diff --git a/ios/Replay/RNSentryReplayUnmask.mm b/ios/Replay/RNSentryReplayUnmask.mm
|
|
54
|
+
index 0fc0248..c445a78 100644
|
|
55
|
+
--- a/ios/Replay/RNSentryReplayUnmask.mm
|
|
56
|
+
+++ b/ios/Replay/RNSentryReplayUnmask.mm
|
|
57
|
+
@@ -1,6 +1,6 @@
|
|
58
|
+
#import <Sentry/SentryDefines.h>
|
|
59
|
+
|
|
60
|
+
-#if SENTRY_HAS_UIKIT
|
|
61
|
+
+#if SENTRY_HAS_UIKIT || TARGET_OS_OSX
|
|
62
|
+
|
|
63
|
+
# import "RNSentryReplayUnmask.h"
|
|
64
|
+
|
|
65
|
+
@@ -16,7 +16,11 @@ @implementation RNSentryReplayUnmaskManager
|
|
66
|
+
|
|
67
|
+
RCT_EXPORT_MODULE(RNSentryReplayUnmask)
|
|
68
|
+
|
|
69
|
+
+# if TARGET_OS_OSX
|
|
70
|
+
+- (RCTPlatformView *)view
|
|
71
|
+
+# else
|
|
72
|
+
- (UIView *)view
|
|
73
|
+
+# endif
|
|
74
|
+
{
|
|
75
|
+
return [RNSentryReplayUnmask new];
|
|
76
|
+
}
|
|
@@ -405,3 +405,37 @@ starts with `com.example.`. Existing apps keep their ID.
|
|
|
405
405
|
Watchman stops responding. After 10 seconds it starts Metro without Watchman
|
|
406
406
|
for that session and suggests `watchman watch-del-all && watchman shutdown-server`
|
|
407
407
|
to fix it.
|
|
408
|
+
|
|
409
|
+
## 0.0.3
|
|
410
|
+
|
|
411
|
+
Breaking: yes. Spark's macOS patch for app-installed `react-native-mmkv@4.3.2`
|
|
412
|
+
changes its default storage location. Other MMKV versions are not patched.
|
|
413
|
+
|
|
414
|
+
Before: `~/Documents/mmkv` (shared by apps using the upstream default).
|
|
415
|
+
After: `~/Library/Application Support/<Spark namespace>/mmkv` (scoped to the app).
|
|
416
|
+
An explicit custom MMKV path is unaffected. Existing default-store files are not
|
|
417
|
+
moved automatically, so an upgraded app can appear to have empty storage.
|
|
418
|
+
|
|
419
|
+
Before deploying to existing users, back up their store and design an app-owned
|
|
420
|
+
data migration or retain an explicit legacy path until migration is ready. The
|
|
421
|
+
old folder may contain other apps' data: do not blindly move or delete it. Preserve
|
|
422
|
+
store IDs, encryption keys and MMKV companion files, and migrate while the store
|
|
423
|
+
is closed. Validate existing values, writes, relaunch persistence and recovery
|
|
424
|
+
from an interrupted migration on a copy of real data.
|
|
425
|
+
|
|
426
|
+
New version-pinned macOS integrations include MMKV, Unistyles, Quick Crypto,
|
|
427
|
+
Nitro Fetch, Blur, Worklets Core, image libraries, Expo modules, date pickers,
|
|
428
|
+
React Navigation and Expo Router. Declare libraries imported by the app directly
|
|
429
|
+
in its dependencies; Spark applies compatibility patches only at the tested
|
|
430
|
+
versions. Read `docs/external-libraries.md` in the matching release for exact pins,
|
|
431
|
+
setup and limitations. Some integrations use JavaScript stand-ins and do not
|
|
432
|
+
implement every upstream native feature. Location requires
|
|
433
|
+
`NSLocationWhenInUseUsageDescription` in the macOS Info.plist before requesting
|
|
434
|
+
permission. Windows support remains preview and is not yet verified; exclude
|
|
435
|
+
macOS-only dependencies from Windows autolinking as needed.
|
|
436
|
+
|
|
437
|
+
Run `spark upgrade`, `spark doctor`, and the app's typecheck and tests. Rebuild
|
|
438
|
+
custom runtimes with `spark build --dev`, then exercise installed desktop-library
|
|
439
|
+
flows, permissions and storage persistence on each app target. The CLI now caches
|
|
440
|
+
native compatibility inputs between dev refreshes to reduce idle CPU work
|
|
441
|
+
(#535); no app source change is required for that cache.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
9
|
-
"@legendapp/spark-processes": "0.0.
|
|
8
|
+
"@legendapp/spark-desktop-app": "0.0.3",
|
|
9
|
+
"@legendapp/spark-processes": "0.0.3"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
12
|
"react": "^19.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-audio",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
},
|
|
48
48
|
"private": true,
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
50
|
+
"@legendapp/spark-desktop-app": "0.0.3"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-auth-session",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"src"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@legendapp/spark-desktop-links": "0.0.
|
|
11
|
+
"@legendapp/spark-desktop-links": "0.0.3",
|
|
12
12
|
"base64-js": "1.5.1",
|
|
13
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
13
|
+
"@legendapp/spark-desktop-app": "0.0.3"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"react-native": "0.83.10",
|
|
@@ -8,7 +8,7 @@ import { macOSXcodeArchitecture, projectPlatform } from "./platform.js";
|
|
|
8
8
|
import { isUniversal, isExpoProject } from "@legendapp/spark-desktop-config/config.cjs";
|
|
9
9
|
import { buildWindows } from "./windows.js";
|
|
10
10
|
import { copyHelpers } from "./helpers.js";
|
|
11
|
-
import { readAppConfig } from "./project.js";
|
|
11
|
+
import { lacksMacOSPod, readAppConfig } from "./project.js";
|
|
12
12
|
import { cpSync, existsSync, mkdirSync, readFileSync, realpathSync, readdirSync, rmSync, writeFileSync, openSync, closeSync, } from "node:fs";
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
import { registerRuntime } from "./local.js";
|
|
@@ -207,8 +207,11 @@ async function buildUnlocked(root, mode, force) {
|
|
|
207
207
|
...(readAppConfig(root).expo.autolinking?.exclude ?? []),
|
|
208
208
|
...chosen.excluded.map((p) => p.name),
|
|
209
209
|
])];
|
|
210
|
+
// Only the macOS Podfile drops these; iOS and Android builds reading the shared config keep them.
|
|
211
|
+
const withoutMacOSPod = chosen.included.filter(lacksMacOSPod).map((p) => p.name).filter((name) => !excludedNames.includes(name));
|
|
210
212
|
writeJson(stateFile(root, "native-selection.json"), {
|
|
211
|
-
excluded: excludedNames,
|
|
213
|
+
excluded: [...excludedNames, ...withoutMacOSPod],
|
|
214
|
+
withoutMacOSPod,
|
|
212
215
|
included: chosen.included.map((p) => ({ name: p.name, root: p.root })),
|
|
213
216
|
});
|
|
214
217
|
const rnConfig = path.join(root, "react-native.config.js");
|
|
@@ -218,7 +221,7 @@ async function buildUnlocked(root, mode, force) {
|
|
|
218
221
|
!(isExpoProject(root) && readFileSync(rnConfig, "utf8").includes("// spark: existing Expo project"))))
|
|
219
222
|
throw new Error("Existing react-native.config.js is not spark-managed. Compose the native selection explicitly before building.");
|
|
220
223
|
if (!isUniversal(root))
|
|
221
|
-
writeFileSync(rnConfig, `${marker}\nconst selection = require('./.spark/native-selection.json');\nmodule.exports = { dependencies: Object.fromEntries([\n...selection.included.map(p => [p.name, { root: p.root }]),\n...selection.excluded.map(name => [name, { platforms: { ios: null, macos: null, android: null } }])\n]) };\n`);
|
|
224
|
+
writeFileSync(rnConfig, `${marker}\nconst selection = require('./.spark/native-selection.json');\nmodule.exports = { dependencies: Object.fromEntries([\n...selection.included.map(p => [p.name, { root: p.root }]),\n...selection.excluded.map(name => [name, { platforms: selection.withoutMacOSPod.includes(name) ? { macos: null } : { ios: null, macos: null, android: null } }])\n]) };\n`);
|
|
222
225
|
const pkg = readJson(path.join(root, "package.json"));
|
|
223
226
|
if (!isUniversal(root)) {
|
|
224
227
|
pkg.expo ??= {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { installedRelease } from "./release.js";
|
|
2
|
+
import { createRuntimeInputCache } from "./runtime-input-cache.js";
|
|
2
3
|
import { acquireRunner } from "./runner-install.js";
|
|
3
4
|
import { spawnProcess } from "./process.js";
|
|
4
5
|
import { windowsMetroPort, stopWindowsMetro } from "./windows-metro.js";
|
|
@@ -79,6 +80,7 @@ export async function dev(root, goApp, expoArgs = [], noOpen = false, appArgs =
|
|
|
79
80
|
let restartPending = false;
|
|
80
81
|
let reopenPending = false;
|
|
81
82
|
let closing = false;
|
|
83
|
+
const runtimeInputs = createRuntimeInputCache(root);
|
|
82
84
|
// Without --no-open the session opens the desktop app itself, so a missing Runner downloads without a keypress.
|
|
83
85
|
let autoOpen = !noOpen;
|
|
84
86
|
let metro;
|
|
@@ -178,7 +180,8 @@ export async function dev(root, goApp, expoArgs = [], noOpen = false, appArgs =
|
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
async function inspectRuntime(report) {
|
|
181
|
-
const
|
|
183
|
+
const inputs = runtimeInputs.read();
|
|
184
|
+
const native = inputs.native;
|
|
182
185
|
current = undefined;
|
|
183
186
|
if (target === "go") {
|
|
184
187
|
if (explicitGo) {
|
|
@@ -200,7 +203,7 @@ export async function dev(root, goApp, expoArgs = [], noOpen = false, appArgs =
|
|
|
200
203
|
}
|
|
201
204
|
const issues = current ? incompatible(current.runtime, native, platform) : [];
|
|
202
205
|
if (current && target === "dev" &&
|
|
203
|
-
current.runtime.fingerprint !== runtimeFor(root, native, "dev").fingerprint)
|
|
206
|
+
current.runtime.fingerprint !== (inputs.development ??= runtimeFor(root, native, "dev")).fingerprint)
|
|
204
207
|
issues.push("Native configuration or host changed.");
|
|
205
208
|
if (target === "go") {
|
|
206
209
|
for (let i = 0; i < issues.length; i++) {
|
|
@@ -326,6 +329,7 @@ export async function dev(root, goApp, expoArgs = [], noOpen = false, appArgs =
|
|
|
326
329
|
if (closing)
|
|
327
330
|
return;
|
|
328
331
|
closing = true;
|
|
332
|
+
runtimeInputs.close();
|
|
329
333
|
clearInterval(timer);
|
|
330
334
|
clearTimeout(debounce);
|
|
331
335
|
watcher.close();
|
|
@@ -373,6 +377,7 @@ export async function dev(root, goApp, expoArgs = [], noOpen = false, appArgs =
|
|
|
373
377
|
try {
|
|
374
378
|
const next = dependencyStamp(root);
|
|
375
379
|
if (next !== stamp) {
|
|
380
|
+
runtimeInputs.invalidate();
|
|
376
381
|
restartPending = true;
|
|
377
382
|
stamp = next;
|
|
378
383
|
}
|
|
@@ -100,6 +100,9 @@ const migrations = [
|
|
|
100
100
|
context.manualStep('Apps importing @legendapp/spark/markdown, /html, /webview or /sqlite must add the corresponding optional backend to app dependencies. See the linked upgrade notes for library names and version pins; run spark doctor and rebuild custom runtimes.');
|
|
101
101
|
context.manualStep('@legendapp/spark/camera was removed. Install the camera libraries in your app; see the linked upgrade notes for exact version pins. Import camera APIs directly from react-native-vision-camera, and NitroImage / Image from react-native-nitro-image. Spark still applies its version-pinned native patches automatically when your app depends on these libraries. Rebuild custom runtimes.');
|
|
102
102
|
} },
|
|
103
|
+
{ version: '0.0.3', automatic: false, breaking: true, apply(context) {
|
|
104
|
+
context.manualStep('Apps using the default macOS react-native-mmkv@4.3.2 store must plan data migration from ~/Documents/mmkv to ~/Library/Application Support/<Spark namespace>/mmkv before deployment. Existing files are not moved automatically and the old folder can contain other apps\' data. Back up the store, preserve IDs and encryption keys, and validate values and relaunch persistence; see the linked upgrade notes.');
|
|
105
|
+
} },
|
|
103
106
|
];
|
|
104
107
|
|
|
105
108
|
/** @param {string} root */
|
|
@@ -12,7 +12,7 @@ import { existsSync, readFileSync, readdirSync, realpathSync, } from "node:fs";
|
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { readJson, writeJson } from "./json.js";
|
|
14
14
|
export { readJson, writeJson };
|
|
15
|
-
export const VERSION = "0.0.
|
|
15
|
+
export const VERSION = "0.0.3";
|
|
16
16
|
export function digest(value) {
|
|
17
17
|
return createHash("sha256").update(value).digest("hex");
|
|
18
18
|
}
|
|
@@ -211,6 +211,18 @@ export function dependencyStamp(root) {
|
|
|
211
211
|
"react-native.config.js",
|
|
212
212
|
]);
|
|
213
213
|
}
|
|
214
|
+
// CocoaPods skips a pod whose podspec lists platforms without macOS, but codegen still registers
|
|
215
|
+
// the library's components and modules, mapping them to classes that were never built.
|
|
216
|
+
export function lacksMacOSPod(pkg) {
|
|
217
|
+
if (!pkg.json.codegenConfig || ["react-native", "react-native-macos"].includes(pkg.name))
|
|
218
|
+
return false;
|
|
219
|
+
const specs = readdirSync(pkg.root).filter(name => name.endsWith(".podspec")).map(name => readFileSync(path.join(pkg.root, name), "utf8"));
|
|
220
|
+
return specs.length > 0 && specs.every(spec => {
|
|
221
|
+
// `s.platform = :ios, '13.4'` or `s.platforms = { :ios => ..., osx: ... }`; a computed value proves nothing.
|
|
222
|
+
const platforms = spec.match(/\.platforms?\s*=\s*(\{[^}]*\}|.*)/)?.[1] ?? "";
|
|
223
|
+
return /\b(ios|tvos|visionos)\b/.test(platforms) && !/\b(osx|macos)\b/.test(platforms) && !/\.(osx|macos)\./.test(spec);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
214
226
|
export function selection(packages, used, include = [], excluded = []) {
|
|
215
227
|
const selected = new Set([
|
|
216
228
|
...packages.filter((p) => !p.sdk).map((p) => p.name),
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"revision": "
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"revision": "82a56a0a0b3363ecfddde675a2caf4d04976d482",
|
|
5
5
|
"packages": {
|
|
6
6
|
"@react-native-runtimes/core": {
|
|
7
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
7
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.3/runtimes-4df45cb5ea74.tgz",
|
|
8
8
|
"size": 54050,
|
|
9
9
|
"sha256": "3a04e0455ac44b0bc11cfa315943ad84509c445111a2b3974ca85c8ed489827c"
|
|
10
10
|
},
|
|
11
11
|
"react-native-nitro-modules": {
|
|
12
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
12
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.3/react-native-nitro-modules-0.37.0-5df8774796c4.tgz",
|
|
13
13
|
"size": 145600,
|
|
14
14
|
"sha256": "5df8774796c48ed54d238f3fada01b64d710b14077983c37f639607eb805e066"
|
|
15
15
|
},
|
|
16
16
|
"@op-engineering/op-sqlite": {
|
|
17
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
17
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.3/op-engineering-op-sqlite-18.2.1-a14b99ecf491.tgz",
|
|
18
18
|
"size": 5847607,
|
|
19
19
|
"sha256": "a14b99ecf4911b55f586b2c5d1f58ac48b0a9d8fe4b84fa6edef1a167630646b"
|
|
20
20
|
},
|
|
21
21
|
"react-native-webview": {
|
|
22
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
22
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.3/react-native-webview-16.0.0-333e421ad38b.tgz",
|
|
23
23
|
"size": 116285,
|
|
24
24
|
"sha256": "333e421ad38b0da2b1dc7b3306de019f257e31bfd6cdb0272d97b1bb2b129354"
|
|
25
25
|
},
|
|
26
26
|
"expo-audio": {
|
|
27
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
27
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.3/expo-audio-55.0.18-a8d70b5b39bd.tgz",
|
|
28
28
|
"size": 610139,
|
|
29
29
|
"sha256": "a8d70b5b39bd3b69d95528011f14aa93a0fdf7ff1e6c89e0f7489329230be060"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"runners": {
|
|
33
33
|
"macos-arm64": {
|
|
34
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
35
|
-
"size":
|
|
36
|
-
"sha256": "
|
|
34
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.3/spark-runner-macos-arm64.zip",
|
|
35
|
+
"size": 13253060,
|
|
36
|
+
"sha256": "eea17937911cde7c1bce3a4058b828082e2b3d9fa28a9a4820896537ba9f5829",
|
|
37
37
|
"app": "SparkRunner.app",
|
|
38
38
|
"teamId": "56DD97VT22",
|
|
39
|
-
"fingerprint": "
|
|
39
|
+
"fingerprint": "10cf4425571758e09fa4217d514d4d2c62c54f1ab4466323b7de58915065f3c7"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|