@legendapp/spark 0.0.1 → 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.
Files changed (141) hide show
  1. package/native.d.cts +6 -3
  2. package/package.json +36 -28
  3. package/patches/dependencies.json +252 -0
  4. package/patches/expo-application@55.0.19.patch +54 -0
  5. package/patches/expo-blur@55.0.18.patch +130 -0
  6. package/patches/expo-device@55.0.21.patch +149 -0
  7. package/patches/expo-font@55.0.8.patch +55 -0
  8. package/patches/expo-glass-effect@55.0.11.patch +304 -0
  9. package/patches/expo-haptics@55.0.18.patch +54 -0
  10. package/patches/expo-image-manipulator@55.0.21.patch +312 -0
  11. package/patches/expo-image-picker@55.0.24.patch +327 -0
  12. package/patches/expo-image@55.0.11.patch +158 -0
  13. package/patches/expo-keep-awake@55.0.8.patch +41 -0
  14. package/patches/expo-localization@55.0.19.patch +32 -0
  15. package/patches/expo-location@55.1.15.patch +190 -0
  16. package/patches/expo-symbols@55.0.9.patch +286 -0
  17. package/patches/expo-system-ui@55.0.22.patch +61 -0
  18. package/patches/expo-web-browser@55.0.20.patch +13 -0
  19. package/patches/react-native-app-logs@0.3.1.patch +20 -0
  20. package/patches/react-native-blurhash@2.1.3.patch +318 -0
  21. package/patches/react-native-community-blur@4.4.1.patch +415 -0
  22. package/patches/react-native-community-datetimepicker@9.2.2.patch +320 -0
  23. package/patches/react-native-enriched-markdown@1.1.1.patch +141 -10
  24. package/patches/react-native-fast-image@10.9.9.patch +131 -0
  25. package/patches/react-native-graph@1.4.0.patch +157 -0
  26. package/patches/react-native-keyboard-controller@1.22.9.patch +16 -0
  27. package/patches/react-native-masked-view-masked-view@0.3.2.patch +140 -0
  28. package/patches/react-native-mmkv@4.3.2.patch +40 -0
  29. package/patches/react-native-nitro-fetch@1.9.0.patch +130 -0
  30. package/patches/react-native-nitro-zxing@0.3.0.patch +13 -0
  31. package/patches/react-native-quick-base64@3.0.1.patch +13 -0
  32. package/patches/react-native-quick-crypto@1.1.9.patch +31 -0
  33. package/patches/react-native-release-profiler@0.4.5.patch +37 -0
  34. package/patches/react-native-screen-corner-radius@0.2.3.patch +13 -0
  35. package/patches/react-native-screens@4.23.0.patch +160 -0
  36. package/patches/react-native-svg@15.15.3.patch +31 -0
  37. package/patches/react-native-unistyles@3.6.0.patch +203 -0
  38. package/patches/react-native-worklets-core@1.6.3.patch +13 -0
  39. package/patches/react-navigation-native-stack@7.21.0.patch +16 -0
  40. package/patches/sentry-react-native@8.32.0.patch +76 -0
  41. package/skills/spark/UPGRADING.md +122 -3
  42. package/vendor/node_modules/@legendapp/spark-ai/package.json +5 -5
  43. package/vendor/node_modules/@legendapp/spark-audio/package.json +5 -5
  44. package/vendor/node_modules/@legendapp/spark-audio/src/index.macos.ts +1 -0
  45. package/vendor/node_modules/@legendapp/spark-auth-session/package.json +6 -6
  46. package/vendor/node_modules/@legendapp/spark-auth-session/src/index.macos.ts +1 -0
  47. package/vendor/node_modules/@legendapp/spark-cli/dist/add-desktop.js +2 -2
  48. package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +17 -5
  49. package/vendor/node_modules/@legendapp/spark-cli/dist/cli-arguments.js +4 -2
  50. package/vendor/node_modules/@legendapp/spark-cli/dist/create.js +8 -4
  51. package/vendor/node_modules/@legendapp/spark-cli/dist/dependency-pins.js +45 -1
  52. package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +15 -3
  53. package/vendor/node_modules/@legendapp/spark-cli/dist/examples.js +2 -2
  54. package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-patch.cjs +3 -3
  55. package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-preload.cjs +3 -0
  56. package/vendor/node_modules/@legendapp/spark-cli/dist/index.js +26 -7
  57. package/vendor/node_modules/@legendapp/spark-cli/dist/metro.cjs +3 -1
  58. package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.cjs +20 -5
  59. package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.d.cts +1 -0
  60. package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +10 -2
  61. package/vendor/node_modules/@legendapp/spark-cli/dist/native-patch-preflight.js +3 -3
  62. package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +28 -10
  63. package/vendor/node_modules/@legendapp/spark-cli/dist/release-runner-root.js +108 -0
  64. package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +13 -13
  65. package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-input-cache.js +140 -0
  66. package/vendor/node_modules/@legendapp/spark-cli/dist/watchman.js +12 -0
  67. package/vendor/node_modules/@legendapp/spark-cli/dist/windows-geometry.js +2 -2
  68. package/vendor/node_modules/@legendapp/spark-cli/dist/windows.js +1 -1
  69. package/vendor/node_modules/@legendapp/spark-cli/package.json +3 -3
  70. package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/desktop.config.json +1 -1
  71. package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +27 -25
  72. package/vendor/node_modules/@legendapp/spark-cli/templates/universal/desktop.config.json +1 -1
  73. package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +35 -33
  74. package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +29 -27
  75. package/vendor/node_modules/@legendapp/spark-clipboard/package.json +5 -5
  76. package/vendor/node_modules/@legendapp/spark-clipboard/src/index.macos.ts +1 -0
  77. package/vendor/node_modules/@legendapp/spark-codex/package.json +4 -4
  78. package/vendor/node_modules/@legendapp/spark-commands/package.json +7 -7
  79. package/vendor/node_modules/@legendapp/spark-context-menu/package.json +4 -4
  80. package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.mm +7 -2
  81. package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.mm +64 -2
  82. package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +3 -3
  83. package/vendor/node_modules/@legendapp/spark-desktop-config/accessibility-state.cjs +2 -2
  84. package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +12 -0
  85. package/vendor/node_modules/@legendapp/spark-desktop-config/autolinking.cjs +7 -6
  86. package/vendor/node_modules/@legendapp/spark-desktop-config/config.d.cts +1 -1
  87. package/vendor/node_modules/@legendapp/spark-desktop-config/fabric-lifecycle.cjs +1 -1
  88. package/vendor/node_modules/@legendapp/spark-desktop-config/keyboard-events.cjs +2 -2
  89. package/vendor/node_modules/@legendapp/spark-desktop-config/macos-host.cjs +39 -0
  90. package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +73 -20
  91. package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.d.cts +2 -1
  92. package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +8 -6
  93. package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-scroll-view.cjs +2 -2
  94. package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-alignment.cjs +2 -2
  95. package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-input-alignment.cjs +2 -2
  96. package/vendor/node_modules/@legendapp/spark-desktop-config/text-input-accessibility.cjs +2 -2
  97. package/vendor/node_modules/@legendapp/spark-desktop-host/macos/AppDelegate.h +6 -0
  98. package/vendor/node_modules/@legendapp/spark-desktop-host/macos/Main.storyboard +684 -0
  99. package/vendor/node_modules/@legendapp/spark-desktop-host/macos/main.m +5 -0
  100. package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +3 -2
  101. package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +5 -5
  102. package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.macos.ts +1 -0
  103. package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +4 -4
  104. package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.mm +68 -17
  105. package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +5 -5
  106. package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos-adapter.ts +2 -1
  107. package/vendor/node_modules/@legendapp/spark-documents/package.json +9 -9
  108. package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +4 -4
  109. package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +4 -4
  110. package/vendor/node_modules/@legendapp/spark-file-system/macos/RNDesktopFileSystem.mm +14 -5
  111. package/vendor/node_modules/@legendapp/spark-file-system/package.json +4 -4
  112. package/vendor/node_modules/@legendapp/spark-file-system/src/index.ts +1 -1
  113. package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +4 -4
  114. package/vendor/node_modules/@legendapp/spark-html/package.json +4 -4
  115. package/vendor/node_modules/@legendapp/spark-markdown/package.json +4 -4
  116. package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +4 -4
  117. package/vendor/node_modules/@legendapp/spark-native-menu/package.json +4 -4
  118. package/vendor/node_modules/@legendapp/spark-notifications/package.json +4 -4
  119. package/vendor/node_modules/@legendapp/spark-processes/macos/RNDesktopProcesses.mm +110 -19
  120. package/vendor/node_modules/@legendapp/spark-processes/package.json +4 -4
  121. package/vendor/node_modules/@legendapp/spark-processes/src/index.ts +17 -3
  122. package/vendor/node_modules/@legendapp/spark-processes/src/types.ts +6 -0
  123. package/vendor/node_modules/@legendapp/spark-rich-text/package.json +4 -4
  124. package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +5 -5
  125. package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.macos.ts +1 -0
  126. package/vendor/node_modules/@legendapp/spark-settings/package.json +3 -3
  127. package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +6 -6
  128. package/vendor/node_modules/@legendapp/spark-sqlite/package.json +12 -5
  129. package/vendor/node_modules/@legendapp/spark-system/package.json +4 -4
  130. package/vendor/node_modules/@legendapp/spark-tray/package.json +4 -4
  131. package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.mm +82 -18
  132. package/vendor/node_modules/@legendapp/spark-ui/package.json +6 -6
  133. package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/SidebarSplitViewNativeComponent.ts +4 -0
  134. package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/index.tsx +11 -9
  135. package/vendor/node_modules/@legendapp/spark-ui/src/index.android.tsx +20 -10
  136. package/vendor/node_modules/@legendapp/spark-ui/src/index.ios.tsx +15 -10
  137. package/vendor/node_modules/@legendapp/spark-ui/src/index.macos.tsx +1 -0
  138. package/vendor/node_modules/@legendapp/spark-updates/package.json +4 -4
  139. package/vendor/node_modules/@legendapp/spark-webview/package.json +11 -4
  140. package/vendor/node_modules/@legendapp/spark-window-options/package.json +1 -1
  141. package/camera.ts +0 -13
@@ -3,23 +3,44 @@ const fs = require("node:fs");
3
3
  const path = require("node:path");
4
4
  const { createRequire } = require("node:module");
5
5
 
6
+ const optionalBackends = ["react-native-enriched-markdown", "react-native-enriched-html", "react-native-webview", "@op-engineering/op-sqlite"];
6
7
  const cameraPackages = ["react-native-nitro-image", "react-native-vision-camera"];
7
8
 
8
- function prepareNativePatches(root) {
9
+ function readManifest(file) {
10
+ return JSON.parse(fs.readFileSync(file, "utf8"));
11
+ }
12
+
13
+ // Find a package's manifest even when its exports map hides package.json, as Node finds the package.
14
+ function resolveManifest(req, name) {
15
+ try { return req.resolve(`${name}/package.json`); }
16
+ catch (error) {
17
+ if (error.code !== "ERR_PACKAGE_PATH_NOT_EXPORTED") throw error;
18
+ const file = (req.resolve.paths(name) ?? []).map(directory => path.join(directory, name, "package.json")).find(fs.existsSync);
19
+ if (!file) throw error;
20
+ return file;
21
+ }
22
+ }
23
+
24
+ function prepareNativePatches(root, installed = []) {
9
25
  const manifestFile = path.join(root, "package.json");
10
26
  if (!fs.existsSync(manifestFile)) return {};
11
- const app = JSON.parse(fs.readFileSync(manifestFile, "utf8"));
27
+ const app = readManifest(manifestFile);
12
28
  if (app.name !== "@legendapp/spark" && !app.dependencies?.["@legendapp/spark"] && !app.devDependencies?.["@legendapp/spark"]) return {};
13
29
  const appRequire = createRequire(manifestFile);
14
30
  let sparkFile;
15
31
  try { sparkFile = appRequire.resolve("@legendapp/spark/package.json"); }
16
32
  catch (error) { if (error.code === "MODULE_NOT_FOUND") return {}; throw error; }
17
- const spark = JSON.parse(fs.readFileSync(sparkFile, "utf8"));
33
+ const spark = readManifest(sparkFile);
18
34
  const directory = path.dirname(sparkFile);
19
35
  const patchesRoot = spark.spark?.bundledModuleRoot
20
36
  ? path.join(directory, "patches") : path.resolve(__dirname, "../../patches");
37
+ const dependencies = { ...spark.dependencies, ...app.dependencies, ...app.devDependencies };
38
+ for (const name of [...cameraPackages, ...optionalBackends]) {
39
+ if (app.optionalDependencies?.[name] || installed.some(pkg => pkg.name === name)) dependencies[name] = true;
40
+ }
41
+ const hasCamera = cameraPackages.some(name => dependencies[name]);
21
42
  const pins = {};
22
- if (cameraPackages.some(name => spark.dependencies?.[name])) {
43
+ if (hasCamera) {
23
44
  const cameraPins = JSON.parse(fs.readFileSync(path.join(patchesRoot, "camera/upstream.json"), "utf8"));
24
45
  for (const name of ["react-native-nitro-modules", ...cameraPackages]) {
25
46
  pins[name] = { ...cameraPins[name], patch: `camera/${name}.patch`,
@@ -28,30 +49,40 @@ function prepareNativePatches(root) {
28
49
  }
29
50
  const integrations = path.join(patchesRoot, "dependencies.json");
30
51
  if (fs.existsSync(integrations)) Object.assign(pins, JSON.parse(fs.readFileSync(integrations, "utf8")));
31
- const active = Object.keys(pins).filter(name => spark.dependencies?.[name]);
52
+ const active = Object.keys(pins).filter(name => dependencies[name] ||
53
+ (hasCamera && name === "react-native-nitro-modules") ||
54
+ (dependencies["react-native-vision-camera"] && name === "react-native-nitro-image"));
32
55
  if (!active.length) return {};
33
56
  const { parsePatch, applyPatch, reversePatch } = require("diff");
34
- const queue = [appRequire, createRequire(sparkFile)];
57
+ const queue = [appRequire, createRequire(sparkFile)].map(req => ({ req, optionalOnly: false }));
58
+ if (hasCamera || optionalBackends.some(name => dependencies[name])) queue.push(...installed.map(pkg => ({ req: createRequire(path.join(pkg.root, "package.json")), optionalOnly: true })));
35
59
  const visited = new Set();
36
60
  const packages = {};
37
- for (const req of queue) {
61
+ for (const { req, optionalOnly } of queue) {
38
62
  for (const name of active) {
63
+ if (optionalOnly && name !== "react-native-nitro-modules" && !cameraPackages.includes(name) && !optionalBackends.includes(name)) continue;
39
64
  let file;
40
- try { file = req.resolve(`${name}/package.json`); }
65
+ try { file = resolveManifest(req, name); }
41
66
  catch (error) {
42
67
  if (error.code !== "MODULE_NOT_FOUND") throw error;
43
- if (req === appRequire) continue;
44
- throw new Error(`Spark needs ${name}@${pins[name].version}. Finish installing dependencies before native preparation.`);
68
+ continue;
45
69
  }
46
70
  if (!fs.existsSync(file)) throw new Error(`Spark needs ${name}@${pins[name].version}. Finish installing dependencies before native preparation.`);
47
71
  const packageRoot = fs.realpathSync(path.dirname(file));
48
72
  if (visited.has(packageRoot)) continue;
49
73
  visited.add(packageRoot);
50
- packages[name] = { root: packageRoot };
51
- queue.push(createRequire(file));
52
74
  const manifest = JSON.parse(fs.readFileSync(file, "utf8"));
53
75
  const pin = pins[name];
54
- if (manifest.version !== pin.version) throw new Error(`Spark needs ${name}@${pin.version}; found ${manifest.version}. Use the SDK's pinned dependency version.`);
76
+ if (pin.optional && manifest.version !== pin.version) {
77
+ console.warn(`Spark's desktop patch for ${name} needs ${pin.version}; found ${manifest.version}, so it stays unpatched.`);
78
+ continue;
79
+ }
80
+ packages[name] = { root: packageRoot };
81
+ queue.push({ req: createRequire(file), optionalOnly });
82
+ if (manifest.version !== pin.version) {
83
+ const owner = readManifest(req.resolve("./package.json"));
84
+ throw new Error(`Spark needs ${name}@${pin.version}; found ${manifest.version} at ${packageRoot}, required by ${owner.name ?? root}. Add an override/resolution for the pinned version.`);
85
+ }
55
86
  const bytes = fs.readFileSync(path.join(patchesRoot, pin.patch));
56
87
  const writes = [];
57
88
  for (const patch of parsePatch(bytes.toString("utf8"))) {
@@ -66,12 +97,15 @@ function prepareNativePatches(root) {
66
97
  writes.push([target, next]);
67
98
  continue;
68
99
  }
69
- if (relative === "package.json" && manifest.spark?.dependencyPatch) {
100
+ // The receipt rewrites package.json with two-space JSON, so its patch hunks target that form.
101
+ if (relative === "package.json") {
70
102
  const original = JSON.parse(current);
71
- delete original.spark.dependencyPatch;
72
- delete original.spark.sdk;
73
- delete original.spark.requires;
74
- if (!Object.keys(original.spark).length) delete original.spark;
103
+ if (manifest.spark?.dependencyPatch) {
104
+ delete original.spark.dependencyPatch;
105
+ delete original.spark.sdk;
106
+ delete original.spark.requires;
107
+ if (!Object.keys(original.spark).length) delete original.spark;
108
+ }
75
109
  current = JSON.stringify(original, null, 2) + "\n";
76
110
  }
77
111
  if (applyPatch(current, reversePatch(patch)) !== false) continue;
@@ -87,12 +121,14 @@ function prepareNativePatches(root) {
87
121
  }
88
122
  const patched = JSON.parse(fs.readFileSync(file, "utf8"));
89
123
  patched.spark ??= {};
90
- if (name !== "react-native-nitro-modules") {
124
+ if (name !== "react-native-nitro-modules" && !pin.optional) {
91
125
  patched.spark.sdk = true;
92
126
  patched.spark.requires = pin.requires ?? [];
93
127
  }
94
128
  patched.spark.dependencyPatch = { schema: 1, version: pin.version,
95
129
  patchHash: createHash("sha256").update(bytes).digest("hex"), upstreamIntegrity: pin.integrity };
130
+ const pkg = installed.find(pkg => pkg.root === packageRoot);
131
+ if (pkg) pkg.json = patched;
96
132
  const serialized = JSON.stringify(patched, null, 2) + "\n";
97
133
  if (fs.readFileSync(file, "utf8") !== serialized) {
98
134
  const temporary = `${file}.spark-${process.pid}.tmp`;
@@ -100,7 +136,24 @@ function prepareNativePatches(root) {
100
136
  }
101
137
  }
102
138
  }
139
+ for (const name of active) {
140
+ if (!packages[name] && !pins[name].optional) throw new Error(`Spark needs ${name}@${pins[name].version}. Finish installing dependencies before native preparation.`);
141
+ }
103
142
  return packages;
104
143
  }
105
144
 
106
- module.exports = { prepareNativePatches };
145
+ // RN macOS 0.83 declares UIApplication itself, so Expo's guarded duplicate breaks the build.
146
+ // The 55 template's Podfile removes it during pod install, after Spark fingerprints
147
+ // expo-modules-core; remove it first so the native fingerprint stays stable.
148
+ const applicationAlias = "#ifndef UIApplication\n@compatibility_alias UIApplication NSApplication;\n#endif";
149
+ function removeExpoApplicationAlias(rn, expo) {
150
+ const file = path.join(expo, "ios/Platform/Platform.h"), compat = path.join(rn, "ReactApple/Libraries/RCTUIKit/RCTUIKitCompat.h");
151
+ if (!fs.existsSync(file) || !fs.existsSync(compat) || !fs.readFileSync(compat, "utf8").includes("@compatibility_alias UIApplication NSApplication;")) return;
152
+ const source = fs.readFileSync(file, "utf8");
153
+ if (!source.includes(applicationAlias)) return;
154
+ const temporary = `${file}.spark-${process.pid}.tmp`;
155
+ fs.writeFileSync(temporary, source.replace(applicationAlias, ""));
156
+ fs.renameSync(temporary, file); // Preserve package-manager cache hardlinks.
157
+ }
158
+
159
+ module.exports = { prepareNativePatches, removeExpoApplicationAlias };
@@ -1 +1,2 @@
1
- export function prepareNativePatches(root: string): Record<string, { root: string }>;
1
+ export function prepareNativePatches(root: string, installed?: { name: string; root: string; json: any }[]): Record<string, { root: string }>;
2
+ export function removeExpoApplicationAlias(reactNativeMacOSRoot: string, expoModulesCoreRoot: string): void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/spark-desktop-config",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "license": "MIT",
5
5
  "main": "app.plugin.cjs",
6
6
  "files": [
@@ -11,11 +11,13 @@
11
11
  ],
12
12
  "dependencies": {
13
13
  "expo-desktop-config-plugins": "1.3.2",
14
- "@legendapp/spark-desktop-host": "0.0.1",
15
- "@legendapp/spark-window-options": "0.0.1",
16
- "@expo/config-plugins": "54.0.5",
17
- "@expo/config-types": "54.0.10",
14
+ "@legendapp/spark-desktop-host": "0.0.3",
15
+ "@legendapp/spark-window-options": "0.0.3",
16
+ "@expo/config-plugins": "55.0.12",
18
17
  "diff": "8.0.4"
19
18
  },
20
- "private": true
19
+ "private": true,
20
+ "devDependencies": {
21
+ "@expo/config-types": "55.0.6"
22
+ }
21
23
  }
@@ -1,4 +1,4 @@
1
- // RN macOS 0.81.7 Fabric mirrors ScrollView content in RTL: it flips the content container with a
1
+ // RN macOS 0.83.0 Fabric mirrors ScrollView content in RTL: it flips the content container with a
2
2
  // layer transform, but the scroll view flip that cancels it on iOS is iOS-only. AppKit ignores layer
3
3
  // transforms when it scrolls NSClipView and routes events, so macOS flips nothing (Yoga already
4
4
  // places RTL content), reports offsets unconverted, and anchors RTL content to its right end.
@@ -132,7 +132,7 @@ function patchScrollViewSource(source) {
132
132
  function installRTLScrollViewPatch(root) {
133
133
  const manifest = require.resolve("react-native-macos/package.json", { paths: [root] });
134
134
  const version = JSON.parse(fs.readFileSync(manifest, "utf8")).version;
135
- if (version !== "0.81.7") throw new Error(`spark's RTL scroll patch requires react-native-macos@0.81.7; found ${version}.`);
135
+ if (version !== "0.83.0") throw new Error(`spark's RTL scroll patch requires react-native-macos@0.83.0; found ${version}.`);
136
136
  const target = path.join(path.dirname(manifest), file);
137
137
  const before = fs.readFileSync(target, "utf8"), after = patchScrollViewSource(before);
138
138
  if (before !== after) {
@@ -1,4 +1,4 @@
1
- // RN macOS 0.81.7 Fabric leaves natural ("auto" or unset) textAlign as NSTextAlignmentNatural. TextKit resolves that
1
+ // RN macOS 0.83.0 Fabric leaves natural ("auto" or unset) textAlign as NSTextAlignmentNatural. TextKit resolves that
2
2
  // from the user's language, not the Yoga layout direction, so text in an RTL subtree of an LTR-localized app aligns
3
3
  // left. The patch resolves natural alignment from the layout direction. "left" and "right" keep the upstream
4
4
  // behavior, shared with iOS: they swap in RTL.
@@ -48,7 +48,7 @@ function patchTextAlignmentSource(source) {
48
48
  function installRTLTextAlignmentPatch(root) {
49
49
  const manifest = require.resolve("react-native-macos/package.json", { paths: [root] });
50
50
  const version = JSON.parse(fs.readFileSync(manifest, "utf8")).version;
51
- if (version !== "0.81.7") throw new Error(`spark's RTL text alignment patch requires react-native-macos@0.81.7; found ${version}.`);
51
+ if (version !== "0.83.0") throw new Error(`spark's RTL text alignment patch requires react-native-macos@0.83.0; found ${version}.`);
52
52
  const target = path.join(path.dirname(manifest), file);
53
53
  const source = fs.readFileSync(target, "utf8"), patched = patchTextAlignmentSource(source);
54
54
  if (source !== patched) {
@@ -1,4 +1,4 @@
1
- // RN macOS 0.81.7 Fabric gives a TextInput no layout direction: its text attributes have none, and the iOS
1
+ // RN macOS 0.83.0 Fabric gives a TextInput no layout direction: its text attributes have none, and the iOS
2
2
  // semanticContentAttribute that makes UIKit's natural alignment follow it isn't set on macOS. TextKit resolves
3
3
  // NSTextAlignmentNatural from the user's language, so in an RTL layout a TextInput with natural ("auto" or unset)
4
4
  // textAlign draws its text and placeholder from the left. The patch aligns them to the leading edge of the input's
@@ -100,7 +100,7 @@ function patchTextInputAlignmentSource(source) {
100
100
  function installRTLTextInputAlignmentPatch(root) {
101
101
  const manifest = require.resolve("react-native-macos/package.json", { paths: [root] });
102
102
  const version = JSON.parse(fs.readFileSync(manifest, "utf8")).version;
103
- if (version !== "0.81.7") throw new Error(`spark's RTL TextInput alignment patch requires react-native-macos@0.81.7; found ${version}.`);
103
+ if (version !== "0.83.0") throw new Error(`spark's RTL TextInput alignment patch requires react-native-macos@0.83.0; found ${version}.`);
104
104
  const target = path.join(path.dirname(manifest), file);
105
105
  const source = fs.readFileSync(target, "utf8"), patched = patchTextInputAlignmentSource(source);
106
106
  if (source !== patched) {
@@ -1,4 +1,4 @@
1
- // RN macOS 0.81.7 Fabric sets a TextInput's accessibilityLabel on its accessibilityElement, the backed text input view.
1
+ // RN macOS 0.83.0 Fabric sets a TextInput's accessibilityLabel on its accessibilityElement, the backed text input view.
2
2
  // A multiline input's backed view is RCTWrappedTextView, a plain view around a scroll view, while the NSTextView inside
3
3
  // it is the accessibility element, so VoiceOver announces a labelled multiline input without its label. The patch
4
4
  // keeps the label on that text view.
@@ -35,7 +35,7 @@ function patchTextInputAccessibilitySource(source) {
35
35
  function installTextInputAccessibilityPatch(root) {
36
36
  const manifest = require.resolve("react-native-macos/package.json", { paths: [root] });
37
37
  const version = JSON.parse(fs.readFileSync(manifest, "utf8")).version;
38
- if (version !== "0.81.7") throw new Error(`spark's TextInput accessibility patch requires react-native-macos@0.81.7; found ${version}.`);
38
+ if (version !== "0.83.0") throw new Error(`spark's TextInput accessibility patch requires react-native-macos@0.83.0; found ${version}.`);
39
39
  const target = path.join(path.dirname(manifest), file);
40
40
  const source = fs.readFileSync(target, "utf8"), patched = patchTextInputAccessibilitySource(source);
41
41
  if (source !== patched) {
@@ -0,0 +1,6 @@
1
+ #import <RCTAppDelegate.h>
2
+ #import <Cocoa/Cocoa.h>
3
+
4
+ @interface AppDelegate : RCTAppDelegate
5
+
6
+ @end