@legendapp/spark 0.0.1-next.9 → 0.0.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.
- package/native.d.cts +6 -3
- package/package.json +36 -28
- package/patches/react-native-enriched-markdown@1.1.1.patch +2000 -3379
- package/skills/spark/UPGRADING.md +106 -3
- package/vendor/node_modules/@legendapp/spark-ai/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-audio/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-audio/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +6 -6
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/add-desktop.js +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +11 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/cli-arguments.js +4 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/create.js +8 -4
- package/vendor/node_modules/@legendapp/spark-cli/dist/dependency-pins.js +45 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +13 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/examples.js +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-patch.cjs +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-preload.cjs +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/index.js +26 -7
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.cjs +3 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.cjs +20 -5
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +7 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-patch-preflight.js +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +16 -10
- package/vendor/node_modules/@legendapp/spark-cli/dist/release-runner-root.js +108 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +13 -13
- package/vendor/node_modules/@legendapp/spark-cli/dist/runner-install.js +4 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/session-status.js +7 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/watchman.js +12 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-geometry.js +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows.js +1 -1
- package/vendor/node_modules/@legendapp/spark-cli/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/desktop.config.json +1 -1
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +27 -25
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/desktop.config.json +1 -1
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +35 -33
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +29 -27
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-codex/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-commands/package.json +7 -7
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.mm +7 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-config/accessibility-state.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/autolinking.cjs +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.d.cts +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/fabric-lifecycle.cjs +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/keyboard-events.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/macos-host.cjs +39 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +47 -12
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.d.cts +2 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +8 -6
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-scroll-view.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-alignment.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-input-alignment.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/text-input-accessibility.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-host/macos/AppDelegate.h +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/macos/Main.storyboard +684 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/macos/main.m +5 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +3 -2
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.mm +68 -17
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos-adapter.ts +2 -1
- package/vendor/node_modules/@legendapp/spark-documents/package.json +9 -9
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-file-system/macos/RNDesktopFileSystem.mm +14 -5
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-file-system/src/index.ts +1 -1
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-html/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-processes/macos/RNDesktopProcesses.mm +110 -19
- package/vendor/node_modules/@legendapp/spark-processes/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-processes/src/index.ts +17 -3
- package/vendor/node_modules/@legendapp/spark-processes/src/types.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-settings/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +6 -6
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +12 -5
- package/vendor/node_modules/@legendapp/spark-system/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-tray/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.mm +82 -18
- package/vendor/node_modules/@legendapp/spark-ui/package.json +6 -6
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/SidebarSplitViewNativeComponent.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/index.tsx +11 -9
- package/vendor/node_modules/@legendapp/spark-ui/src/index.android.tsx +20 -10
- package/vendor/node_modules/@legendapp/spark-ui/src/index.ios.tsx +15 -10
- package/vendor/node_modules/@legendapp/spark-ui/src/index.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-updates/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-webview/package.json +11 -4
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +1 -1
- package/camera.ts +0 -13
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-desktop-host",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"AppDelegate.mm",
|
|
7
|
+
"macos",
|
|
7
8
|
"windows",
|
|
8
9
|
"SparkCustomize.mm"
|
|
9
10
|
],
|
|
10
11
|
"dependencies": {
|
|
11
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
12
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
12
13
|
},
|
|
13
14
|
"private": true
|
|
14
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-desktop-links",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"common"
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"react": "^19.
|
|
17
|
-
"react-native": "0.
|
|
18
|
-
"expo-linking": "~
|
|
16
|
+
"react": "^19.2.0",
|
|
17
|
+
"react-native": "0.83.10",
|
|
18
|
+
"expo-linking": "~55.0.17"
|
|
19
19
|
},
|
|
20
20
|
"codegenConfig": {
|
|
21
21
|
"name": "RNDesktopLinksSpec",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
45
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"expo-linking": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-desktop-shortcuts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"*.podspec"
|
|
11
11
|
],
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"react": "^19.
|
|
14
|
-
"react-native": "0.
|
|
13
|
+
"react": "^19.2.0",
|
|
14
|
+
"react-native": "0.83.10"
|
|
15
15
|
},
|
|
16
16
|
"codegenConfig": {
|
|
17
17
|
"name": "RNDesktopShortcutsSpec",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
43
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
44
44
|
},
|
|
45
45
|
"private": true
|
|
46
46
|
}
|
package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.mm
CHANGED
|
@@ -821,6 +821,7 @@ extern "C" void LegendPrecreateRestorableWindows(void)
|
|
|
821
821
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSArray<NSTitlebarAccessoryViewController *> *> *titlebarAccessoryControllers;
|
|
822
822
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSView *> *titlebarMaterialViews;
|
|
823
823
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSArray<NSDictionary *> *> *toolbarItemConfigs;
|
|
824
|
+
@property (nonatomic, strong, nullable) NSToolbarItem *movingToolbarItem;
|
|
824
825
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, CIFilter *> *windowBlurFilters;
|
|
825
826
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSDictionary *> *windowOptions;
|
|
826
827
|
@property (nonatomic, strong) NSMutableSet<NSString *> *closeRequestIdentifiers;
|
|
@@ -1267,13 +1268,52 @@ RCT_EXPORT_MODULE(NativeWindowManager)
|
|
|
1267
1268
|
}
|
|
1268
1269
|
if (menuUpdate) return;
|
|
1269
1270
|
}
|
|
1271
|
+
// Moving an item takes its control out of the window, which ends editing in a focused text field (ignored while
|
|
1272
|
+
// movingToolbarItem is set), so focus and selection are restored afterwards.
|
|
1273
|
+
NSText *editor = [window.firstResponder isKindOfClass:NSText.class] ? (NSText *)window.firstResponder : nil;
|
|
1274
|
+
NSControl *focused = [editor.delegate isKindOfClass:NSControl.class] ? (NSControl *)editor.delegate : nil;
|
|
1275
|
+
NSRange selection = editor.selectedRange;
|
|
1276
|
+
[self updateToolbar:toolbar previousConfigs:previousConfigs ?: @[]];
|
|
1277
|
+
if (focused && !focused.currentEditor) {
|
|
1278
|
+
[window layoutIfNeeded];
|
|
1279
|
+
if (focused.window == window && [window makeFirstResponder:focused]) focused.currentEditor.selectedRange = selection;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1270
1282
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1283
|
+
// Recreating an item resets its control (a search field loses its text and focus), so only changed items are replaced
|
|
1284
|
+
// and kept items that change position are moved: removed and inserted again as the same item.
|
|
1285
|
+
- (void)updateToolbar:(NSToolbar *)toolbar previousConfigs:(NSArray<NSDictionary *> *)previousConfigs
|
|
1286
|
+
{
|
|
1287
|
+
NSMutableDictionary<NSString *, NSDictionary *> *previousByIdentifier = [NSMutableDictionary new];
|
|
1288
|
+
for (NSDictionary *config in previousConfigs) {
|
|
1289
|
+
NSString *itemIdentifier = [self toolbarItemIdentifierForConfig:config];
|
|
1290
|
+
if (itemIdentifier.length > 0) previousByIdentifier[itemIdentifier] = config;
|
|
1273
1291
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1292
|
+
NSMutableDictionary<NSString *, NSDictionary *> *nextByIdentifier = [NSMutableDictionary new];
|
|
1293
|
+
for (NSDictionary *config in self.toolbarItemConfigs[toolbar.identifier] ?: @[]) {
|
|
1294
|
+
NSString *itemIdentifier = [self toolbarItemIdentifierForConfig:config];
|
|
1295
|
+
if (itemIdentifier.length > 0) nextByIdentifier[itemIdentifier] = config;
|
|
1296
|
+
}
|
|
1297
|
+
NSArray<NSToolbarItemIdentifier> *identifiers = [self toolbarDefaultItemIdentifiers:toolbar];
|
|
1298
|
+
for (NSInteger index = (NSInteger)toolbar.items.count - 1; index >= 0; index--) {
|
|
1299
|
+
NSToolbarItemIdentifier itemIdentifier = toolbar.items[index].itemIdentifier;
|
|
1300
|
+
NSDictionary *previous = previousByIdentifier[itemIdentifier];
|
|
1301
|
+
NSDictionary *next = nextByIdentifier[itemIdentifier];
|
|
1302
|
+
BOOL unchanged = previous || next ? [previous isEqualToDictionary:next] : YES;
|
|
1303
|
+
if (![identifiers containsObject:itemIdentifier] || !unchanged) [toolbar removeItemAtIndex:index];
|
|
1304
|
+
}
|
|
1305
|
+
for (NSUInteger index = 0; index < identifiers.count; index++) {
|
|
1306
|
+
if (index < toolbar.items.count && [toolbar.items[index].itemIdentifier isEqual:identifiers[index]]) continue;
|
|
1307
|
+
for (NSUInteger later = index + 1; later < toolbar.items.count; later++) {
|
|
1308
|
+
if (![toolbar.items[later].itemIdentifier isEqual:identifiers[index]]) continue;
|
|
1309
|
+
self.movingToolbarItem = toolbar.items[later];
|
|
1310
|
+
[toolbar removeItemAtIndex:later];
|
|
1311
|
+
break;
|
|
1312
|
+
}
|
|
1313
|
+
[toolbar insertItemWithItemIdentifier:identifiers[index] atIndex:index];
|
|
1314
|
+
self.movingToolbarItem = nil;
|
|
1276
1315
|
}
|
|
1316
|
+
while (toolbar.items.count > identifiers.count) [toolbar removeItemAtIndex:toolbar.items.count - 1];
|
|
1277
1317
|
}
|
|
1278
1318
|
|
|
1279
1319
|
- (NSArray<NSToolbarItemIdentifier> *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar
|
|
@@ -1310,7 +1350,7 @@ RCT_EXPORT_MODULE(NativeWindowManager)
|
|
|
1310
1350
|
NSString *identifier = [representedObject[@"windowIdentifier"] isKindOfClass:NSString.class]
|
|
1311
1351
|
? representedObject[@"windowIdentifier"]
|
|
1312
1352
|
: @"";
|
|
1313
|
-
NSWindow *window =
|
|
1353
|
+
NSWindow *window = [self windowForIdentifier:identifier];
|
|
1314
1354
|
[window makeKeyAndOrderFront:nil];
|
|
1315
1355
|
[window makeFirstResponder:searchField];
|
|
1316
1356
|
}
|
|
@@ -1414,6 +1454,9 @@ RCT_EXPORT_MODULE(NativeWindowManager)
|
|
|
1414
1454
|
itemForItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier
|
|
1415
1455
|
willBeInsertedIntoToolbar:(BOOL)flag
|
|
1416
1456
|
{
|
|
1457
|
+
if ([self.movingToolbarItem.itemIdentifier isEqual:itemIdentifier]) {
|
|
1458
|
+
return self.movingToolbarItem;
|
|
1459
|
+
}
|
|
1417
1460
|
NSDictionary *config = [self toolbarItemConfigForIdentifier:itemIdentifier toolbar:toolbar];
|
|
1418
1461
|
if (!config) {
|
|
1419
1462
|
return nil;
|
|
@@ -1905,7 +1948,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
1905
1948
|
|
|
1906
1949
|
- (void)controlTextDidEndEditing:(NSNotification *)notification
|
|
1907
1950
|
{
|
|
1908
|
-
if ([notification.object isKindOfClass:NSSearchField.class]) {
|
|
1951
|
+
if (!self.movingToolbarItem && [notification.object isKindOfClass:NSSearchField.class]) {
|
|
1909
1952
|
NSSearchField *searchField = (NSSearchField *)notification.object;
|
|
1910
1953
|
if (searchField.stringValue.length == 0) {
|
|
1911
1954
|
id associatedItem = objc_getAssociatedObject(searchField, &LegendToolbarSearchItemKey);
|
|
@@ -1918,6 +1961,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
1918
1961
|
|
|
1919
1962
|
- (void)toolbarSearchSubmitted:(NSSearchField *)sender
|
|
1920
1963
|
{
|
|
1964
|
+
if (self.movingToolbarItem) return;
|
|
1921
1965
|
NSEvent *currentEvent = NSApp.currentEvent;
|
|
1922
1966
|
BOOL shiftKey = currentEvent && ((currentEvent.modifierFlags & NSEventModifierFlagShift) != 0);
|
|
1923
1967
|
[self sendToolbarSearchEventForField:sender submitted:YES shiftKey:shiftKey];
|
|
@@ -2410,9 +2454,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
2410
2454
|
#if TARGET_OS_OSX
|
|
2411
2455
|
RCTExecuteOnMainQueue(^{
|
|
2412
2456
|
NSString *targetIdentifier = [self normalizeIdentifier:identifier];
|
|
2413
|
-
NSWindow *window = [targetIdentifier
|
|
2414
|
-
? [RNWindowManager getMainWindow]
|
|
2415
|
-
: (NSWindow *)self.windows[targetIdentifier];
|
|
2457
|
+
NSWindow *window = [self windowForIdentifier:targetIdentifier];
|
|
2416
2458
|
if (!window) {
|
|
2417
2459
|
reject(@"E_NOT_FOUND", @"Window not found", nil);
|
|
2418
2460
|
return;
|
|
@@ -2434,7 +2476,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
2434
2476
|
#if TARGET_OS_OSX
|
|
2435
2477
|
RCTExecuteOnMainQueue(^{
|
|
2436
2478
|
NSString *targetIdentifier = [self normalizeIdentifier:identifier];
|
|
2437
|
-
NSWindow *window =
|
|
2479
|
+
NSWindow *window = [self windowForIdentifier:targetIdentifier];
|
|
2438
2480
|
if (!window) {
|
|
2439
2481
|
resolve([self failureJson:@"Window not found"]);
|
|
2440
2482
|
return;
|
|
@@ -2509,9 +2551,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
2509
2551
|
#if TARGET_OS_OSX
|
|
2510
2552
|
RCTExecuteOnMainQueue(^{
|
|
2511
2553
|
NSString *targetIdentifier = [self normalizeIdentifier:identifier];
|
|
2512
|
-
NSWindow *window = [targetIdentifier
|
|
2513
|
-
? [RNWindowManager getMainWindow]
|
|
2514
|
-
: (NSWindow *)self.windows[targetIdentifier];
|
|
2554
|
+
NSWindow *window = [self windowForIdentifier:targetIdentifier];
|
|
2515
2555
|
if (!window) {
|
|
2516
2556
|
reject(@"E_NOT_FOUND", @"Window not found", nil);
|
|
2517
2557
|
return;
|
|
@@ -2648,7 +2688,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
2648
2688
|
#if TARGET_OS_OSX
|
|
2649
2689
|
RCTExecuteOnMainQueue(^{
|
|
2650
2690
|
NSString *targetIdentifier = [self normalizeIdentifier:identifier];
|
|
2651
|
-
NSWindow *window =
|
|
2691
|
+
NSWindow *window = [self windowForIdentifier:targetIdentifier];
|
|
2652
2692
|
if (!window) {
|
|
2653
2693
|
reject(@"E_NOT_FOUND", @"Window not found", nil);
|
|
2654
2694
|
return;
|
|
@@ -2704,7 +2744,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
2704
2744
|
RCTExecuteOnMainQueue(^{
|
|
2705
2745
|
NSString *targetIdentifier = [self normalizeIdentifier:identifier];
|
|
2706
2746
|
NSDictionary *options = [self parseObjectJSON:optionsJson];
|
|
2707
|
-
NSWindow *window =
|
|
2747
|
+
NSWindow *window = [self windowForIdentifier:targetIdentifier];
|
|
2708
2748
|
if (!window) {
|
|
2709
2749
|
reject(@"E_NOT_FOUND", @"Window not found", nil);
|
|
2710
2750
|
return;
|
|
@@ -2772,7 +2812,7 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
2772
2812
|
#if TARGET_OS_OSX
|
|
2773
2813
|
RCTExecuteOnMainQueue(^{
|
|
2774
2814
|
NSString *targetIdentifier = [self normalizeIdentifier:identifier];
|
|
2775
|
-
NSWindow *window =
|
|
2815
|
+
NSWindow *window = [self windowForIdentifier:targetIdentifier];
|
|
2776
2816
|
if (!window) {
|
|
2777
2817
|
reject(@"E_NOT_FOUND", @"Target window not found for blur animation", nil);
|
|
2778
2818
|
return;
|
|
@@ -2862,7 +2902,11 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
2862
2902
|
// AppKit's window list includes precreated/restored document windows and has
|
|
2863
2903
|
// no stable ordering. Both supported hosts own the main window on the delegate.
|
|
2864
2904
|
id<RNWindowManagerRootViewFactoryProvider> delegate = (id)NSApplication.sharedApplication.delegate;
|
|
2865
|
-
|
|
2905
|
+
NSWindow *window = [delegate respondsToSelector:@selector(window)] ? delegate.window : nil;
|
|
2906
|
+
if (window && !objc_getAssociatedObject(window, NSSelectorFromString(@"sparkWindowInstanceId"))) {
|
|
2907
|
+
objc_setAssociatedObject(window, NSSelectorFromString(@"sparkWindowInstanceId"), NSUUID.UUID.UUIDString, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
2908
|
+
}
|
|
2909
|
+
return window;
|
|
2866
2910
|
}
|
|
2867
2911
|
|
|
2868
2912
|
- (void)setupMainWindowObservers
|
|
@@ -3162,6 +3206,13 @@ willBeInsertedIntoToolbar:(BOOL)flag
|
|
|
3162
3206
|
{
|
|
3163
3207
|
return [identifier isKindOfClass:NSString.class] && identifier.length > 0 ? identifier : @"default";
|
|
3164
3208
|
}
|
|
3209
|
+
|
|
3210
|
+
// The host owns "main", which reaches the registry only once RNDesktopWindows looks it up.
|
|
3211
|
+
- (NSWindow *)windowForIdentifier:(NSString *)identifier
|
|
3212
|
+
{
|
|
3213
|
+
NSWindow *window = (NSWindow *)self.windows[identifier];
|
|
3214
|
+
return window ?: ([identifier isEqualToString:@"main"] ? [RNWindowManager getMainWindow] : nil);
|
|
3215
|
+
}
|
|
3165
3216
|
#endif
|
|
3166
3217
|
|
|
3167
3218
|
- (void)invalidate
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-desktop-windows",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"*.podspec"
|
|
11
11
|
],
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"react": "^19.
|
|
14
|
-
"react-native": "0.
|
|
13
|
+
"react": "^19.2.0",
|
|
14
|
+
"react-native": "0.83.10"
|
|
15
15
|
},
|
|
16
16
|
"codegenConfig": {
|
|
17
17
|
"name": "RNDesktopWindowsSpec",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
44
|
-
"@legendapp/spark-window-options": "0.0.
|
|
43
|
+
"@legendapp/spark-desktop-app": "0.0.2",
|
|
44
|
+
"@legendapp/spark-window-options": "0.0.2",
|
|
45
45
|
"@legendapp/state": "^3.0.0-beta.42"
|
|
46
46
|
},
|
|
47
47
|
"private": true
|
|
@@ -51,5 +51,6 @@ export async function createMacOSWindow(options: WindowOpenOptions): Promise<voi
|
|
|
51
51
|
await macosCommand(() => macosNative().openWindow(JSON.stringify({ ...macosOptions(options), identifier: options.id, moduleName: options.component, initialProperties: options.props ?? {}, title: options.title, deferOrderFront: true, sparkOverlay: options.kind === "overlay" })));
|
|
52
52
|
}
|
|
53
53
|
export async function updateMacOSWindow(id: string, options: WindowUpdateOptions): Promise<void> {
|
|
54
|
-
|
|
54
|
+
const native = macosNative(), json = JSON.stringify(macosOptions(options));
|
|
55
|
+
await macosCommand(() => id === "main" ? native.setMainWindowOptions(json) : native.setWindowOptions(id, json));
|
|
55
56
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-documents",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.tsx",
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"src"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@legendapp/spark-file-dialog": "0.0.
|
|
12
|
-
"@legendapp/spark-file-system": "0.0.
|
|
13
|
-
"@legendapp/spark-native-menu": "0.0.
|
|
14
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
15
|
-
"@legendapp/spark-desktop-windows": "0.0.
|
|
16
|
-
"@legendapp/spark-desktop-links": "0.0.
|
|
11
|
+
"@legendapp/spark-file-dialog": "0.0.2",
|
|
12
|
+
"@legendapp/spark-file-system": "0.0.2",
|
|
13
|
+
"@legendapp/spark-native-menu": "0.0.2",
|
|
14
|
+
"@legendapp/spark-desktop-app": "0.0.2",
|
|
15
|
+
"@legendapp/spark-desktop-windows": "0.0.2",
|
|
16
|
+
"@legendapp/spark-desktop-links": "0.0.2"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"react": "^19.
|
|
20
|
-
"react-native": "0.
|
|
19
|
+
"react": "^19.2.0",
|
|
20
|
+
"react-native": "0.83.10"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-drag-drop",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"react-native": "src/index.tsx",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"react-native.config.js"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "^19.
|
|
16
|
-
"react-native": "0.
|
|
15
|
+
"react": "^19.2.0",
|
|
16
|
+
"react-native": "0.83.10"
|
|
17
17
|
},
|
|
18
18
|
"codegenConfig": {
|
|
19
19
|
"name": "RNDesktopDragSpec",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
42
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
43
43
|
},
|
|
44
44
|
"private": true
|
|
45
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-file-dialog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"main": "src/index",
|
|
5
5
|
"react-native": "src/index",
|
|
6
6
|
"codegenConfig": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"react": "^19.
|
|
22
|
-
"react-native": "0.
|
|
21
|
+
"react": "^19.2.0",
|
|
22
|
+
"react-native": "0.83.10"
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"files": [
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"private": true,
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
48
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -170,19 +170,28 @@ RCT_EXPORT_MODULE(NativeDesktopFileSystem)
|
|
|
170
170
|
NSString *watchID = args[@"id"];
|
|
171
171
|
if (self.watches[watchID] || self.recursiveWatches[watchID]) { SparkInvalid(reject, @"Watch id already exists"); return; }
|
|
172
172
|
if ([args[@"recursive"] boolValue]) {
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
NSString *existing = url.path;
|
|
174
|
+
NSMutableArray<NSString *> *missing = [NSMutableArray new];
|
|
175
|
+
struct stat info;
|
|
176
|
+
while (stat(existing.fileSystemRepresentation, &info) != 0) {
|
|
177
|
+
if (errno != ENOENT) { SparkReject(reject, [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:nil]); return; }
|
|
178
|
+
[missing insertObject:existing.lastPathComponent atIndex:0];
|
|
179
|
+
existing = existing.stringByDeletingLastPathComponent;
|
|
180
|
+
}
|
|
181
|
+
if (!S_ISDIR(info.st_mode)) { SparkReject(reject, [NSError errorWithDomain:NSPOSIXErrorDomain code:ENOTDIR userInfo:nil]); return; }
|
|
175
182
|
SparkRecursiveWatch *watch = [SparkRecursiveWatch new];
|
|
176
183
|
// Keep real filesystem paths: Foundation can strip /private while a path
|
|
177
184
|
// exists, then preserve it after deletion, breaking event comparisons.
|
|
178
|
-
char *resolved = realpath(
|
|
185
|
+
char *resolved = realpath(existing.fileSystemRepresentation, NULL);
|
|
179
186
|
if (!resolved) { SparkReject(reject, [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:nil]); return; }
|
|
180
|
-
|
|
187
|
+
NSString *ancestor = [NSString stringWithUTF8String:resolved]; free(resolved);
|
|
188
|
+
watch.path = ancestor;
|
|
189
|
+
for (NSString *component in missing) watch.path = [watch.path stringByAppendingPathComponent:component];
|
|
181
190
|
__weak RNDesktopFileSystem *weakSelf = self;
|
|
182
191
|
watch.changed = ^{ [weakSelf sendEventWithName:@"change" body:@{ @"id": watchID, @"path": url.path }]; };
|
|
183
192
|
FSEventStreamContext context = {0, (__bridge void *)watch, NULL, NULL, NULL};
|
|
184
193
|
// Observe the parent too, keeping deletion/replacement of the root visible.
|
|
185
|
-
NSArray *roots = @[[
|
|
194
|
+
NSArray *roots = @[[ancestor stringByDeletingLastPathComponent]];
|
|
186
195
|
watch.stream = FSEventStreamCreate(NULL, RecursiveChanges, &context, (__bridge CFArrayRef)roots, kFSEventStreamEventIdSinceNow, 0.05,
|
|
187
196
|
kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagWatchRoot | kFSEventStreamCreateFlagNoDefer);
|
|
188
197
|
if (!watch.stream) { reject(@"E_WATCH", @"Could not create directory watcher", nil); return; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-file-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"react-native.config.js"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "^19.
|
|
16
|
-
"react-native": "0.
|
|
15
|
+
"react": "^19.2.0",
|
|
16
|
+
"react-native": "0.83.10"
|
|
17
17
|
},
|
|
18
18
|
"codegenConfig": {
|
|
19
19
|
"name": "RNDesktopFileSystemSpec",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
46
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
47
47
|
},
|
|
48
48
|
"private": true
|
|
49
49
|
}
|
|
@@ -105,7 +105,7 @@ export async function move(source: string, destination: string, options: CopyMov
|
|
|
105
105
|
await call("move", { path: absolute(source), to: absolute(destination), overwrite: overwriteOption(options) });
|
|
106
106
|
}
|
|
107
107
|
let nextWatch = 0;
|
|
108
|
-
/** Invalidation, not an exact change log.
|
|
108
|
+
/** Invalidation, not an exact change log. On macOS, recursive watches also observe directories created after registration. */
|
|
109
109
|
export async function watch(path: string, listener: (path: string) => void, options: WatchOptions = {}): Promise<AsyncRegistration> {
|
|
110
110
|
const location = absolute(path), recursive = recursiveOption(options, false);
|
|
111
111
|
if (typeof listener !== "function") throw new SparkError("E_INVALID_ARGUMENT", "Expected a watch listener");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-global-shortcuts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"react-native.config.js"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "^19.
|
|
16
|
-
"react-native": "0.
|
|
15
|
+
"react": "^19.2.0",
|
|
16
|
+
"react-native": "0.83.10"
|
|
17
17
|
},
|
|
18
18
|
"codegenConfig": {
|
|
19
19
|
"name": "RNDesktopGlobalShortcutsSpec",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
44
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
45
45
|
},
|
|
46
46
|
"private": true
|
|
47
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-html",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"src"
|
|
10
10
|
],
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"react": "^19.
|
|
13
|
-
"react-native": "0.
|
|
12
|
+
"react": "^19.2.0",
|
|
13
|
+
"react-native": "0.83.10",
|
|
14
14
|
"react-native-enriched-html": "1.1.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@legendapp/spark-rich-text": "0.0.
|
|
17
|
+
"@legendapp/spark-rich-text": "0.0.2"
|
|
18
18
|
},
|
|
19
19
|
"peerDependenciesMeta": {
|
|
20
20
|
"react-native-enriched-html": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-markdown",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"src"
|
|
10
10
|
],
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"react": "^19.
|
|
13
|
-
"react-native": "0.
|
|
12
|
+
"react": "^19.2.0",
|
|
13
|
+
"react-native": "0.83.10",
|
|
14
14
|
"react-native-enriched-markdown": "1.1.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@legendapp/spark-rich-text": "0.0.
|
|
17
|
+
"@legendapp/spark-rich-text": "0.0.2"
|
|
18
18
|
},
|
|
19
19
|
"peerDependenciesMeta": {
|
|
20
20
|
"react-native-enriched-markdown": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-message-dialog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"react-native.config.js"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "^19.
|
|
16
|
-
"react-native": "0.
|
|
15
|
+
"react": "^19.2.0",
|
|
16
|
+
"react-native": "0.83.10"
|
|
17
17
|
},
|
|
18
18
|
"codegenConfig": {
|
|
19
19
|
"name": "RNDesktopMessageDialogSpec",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
43
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
44
44
|
},
|
|
45
45
|
"private": true
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-native-menu",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"main": "src/index",
|
|
5
5
|
"react-native": "src/index",
|
|
6
6
|
"codegenConfig": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"react": "^19.
|
|
22
|
-
"react-native": "0.
|
|
21
|
+
"react": "^19.2.0",
|
|
22
|
+
"react-native": "0.83.10"
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"files": [
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
},
|
|
42
42
|
"private": true,
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
44
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-notifications",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"react-native.config.js"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "^19.
|
|
16
|
-
"react-native": "0.
|
|
15
|
+
"react": "^19.2.0",
|
|
16
|
+
"react-native": "0.83.10"
|
|
17
17
|
},
|
|
18
18
|
"codegenConfig": {
|
|
19
19
|
"name": "RNDesktopNotificationsSpec",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
43
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
44
44
|
},
|
|
45
45
|
"private": true
|
|
46
46
|
}
|