@legendapp/spark 0.0.1-next.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/README.md +21 -0
- package/app.ts +1 -0
- package/audio.ts +1 -0
- package/auth-session.ts +1 -0
- package/bin/spark.cjs +5 -0
- package/clipboard.ts +1 -0
- package/config-plugin.cjs +1 -0
- package/config.cjs +1 -0
- package/config.d.cts +1 -0
- package/context-menu.ts +1 -0
- package/dialogs.ts +2 -0
- package/drag-drop.ts +1 -0
- package/expo-config.cjs +1 -0
- package/expo-metro.cjs +1 -0
- package/files.ts +1 -0
- package/global-shortcuts.ts +1 -0
- package/init-template.cjs +2 -0
- package/links.ts +1 -0
- package/menus.ts +1 -0
- package/message-dialog.ts +1 -0
- package/metro-gate.cjs +1 -0
- package/metro.cjs +1 -0
- package/native.cjs +1 -0
- package/notifications.ts +1 -0
- package/package.json +161 -0
- package/processes.ts +1 -0
- package/runtime-entry.cjs +1 -0
- package/schema.json +305 -0
- package/secure-storage.ts +1 -0
- package/settings.ts +1 -0
- package/shortcuts.ts +1 -0
- package/sqlite.ts +1 -0
- package/system.ts +1 -0
- package/tray.ts +1 -0
- package/ui-uniwind.ts +1 -0
- package/ui.ts +1 -0
- package/universal.cjs +1 -0
- package/updates.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/RNSparkAudio.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-audio/macos/RNSparkAudio.h +4 -0
- package/vendor/node_modules/@legendapp/spark-audio/macos/RNSparkAudio.mm +154 -0
- package/vendor/node_modules/@legendapp/spark-audio/package.json +49 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/NativeSparkAudio.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/desktop.ts +39 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.web.ts +42 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session-unavailable.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session.ts +25 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session.web.ts +35 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-types.ts +32 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/mobile.ts +38 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/status-listeners.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/types.ts +21 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.def +3 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.h +146 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +41 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/core.ts +68 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/mobile.ts +52 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/types.ts +38 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/add-desktop.js +164 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/build-mode.js +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +278 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/commands.js +107 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/create.js +99 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/credentials.js +69 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev-command.js +81 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +408 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/examples.js +43 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/executable.js +19 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-extension.cjs +51 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-patch.cjs +38 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-preload.cjs +19 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-metro.cjs +41 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-native.cjs +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-node.js +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/go-profile.js +20 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/helpers.js +79 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/index.js +263 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/init-template.cjs +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/local.js +124 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/macos-release.js +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro-gate.cjs +33 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.cjs +63 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.js +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/npm-bin/npm +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/npm-bin/npm.cmd +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/pack-archive.js +23 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package-manager.js +45 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package.js +199 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/platform.js +34 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/process.js +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +324 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.js +42 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +37 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runner-install.js +138 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-entry.cjs +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/sdk-install.js +66 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/sdk-transfer.js +113 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/session-status.js +22 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/signing.js +175 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/universal.cjs +28 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/updates.js +110 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-associations.js +45 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-associations.ps1 +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-geometry.js +33 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-metro.js +112 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows.js +141 -0
- package/vendor/node_modules/@legendapp/spark-cli/package.json +22 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/App.tsx +29 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/app.json +11 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/assets/icon.png +0 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/desktop.config.json +19 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/gitignore +8 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/index.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/metro.config.js +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +55 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/tsconfig.json +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/App.tsx +34 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/Git.macos.tsx +13 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/Git.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/compare.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/App.tsx +34 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.macos.tsx +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.tsx +13 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.web.tsx +14 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.windows.tsx +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/document.ts +58 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.desktop.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.macos.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.ts +31 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.web.ts +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/sessions.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/useDocument.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.desktop.tsx +31 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.tsx +14 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.web.tsx +20 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.desktop.tsx +28 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.tsx +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/document.ts +58 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.desktop.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.macos.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.ts +31 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.web.ts +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/lifecycle-types.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/lifetime.ts +23 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/records.ts +51 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/storage.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/useModel.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.desktop.tsx +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/App.tsx +38 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.desktop.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.ts +18 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.web.ts +37 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/model.ts +91 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/store.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.desktop.tsx +5 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/App.tsx +92 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.desktop.ts +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Theme.tsx +17 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/model.ts +61 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/search.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/session.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/store.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/window-session.ts +62 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/App.tsx +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/app.json +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/assets/icon.png +0 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/desktop.config.json +62 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/gitignore +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/global.css +31 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/metro.config.js +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +70 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/react-native.config.js +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/tsconfig.json +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/uniwind-types.d.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/App.tsx +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/app.json +11 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/assets/icon.png +0 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/desktop.config.json +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/gitignore +8 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/index.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/metro.config.js +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +56 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/react-native.config.js +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/tsconfig.json +10 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/RNDesktopClipboard.podspec +16 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/macos/RNDesktopClipboard.h +4 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/macos/RNDesktopClipboard.mm +87 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +52 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/NativeDesktopClipboard.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/desktop.ts +39 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/expo.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/formats.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.def +3 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.h +119 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/RNContextMenu.podspec +16 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/macos/RNContextMenu.h +9 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/macos/RNContextMenu.mm +160 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/src/NativeContextMenu.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/src/index.ts +29 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.def +3 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.h +112 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/RNDesktopApp.podspec +15 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/RNDesktopApp.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/RNDesktopApp.mm +34 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.h +23 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.mm +135 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkWindow.mm +81 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +39 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/NativeDesktopApp.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/api.ts +42 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +75 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.cjs +161 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.d.cts +13 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/entitlements.cjs +23 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/expo.cjs +26 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/fabric-lifecycle.cjs +125 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/helpers.cjs +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/identity.cjs +28 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/keyboard-events.cjs +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +19 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/schema.json +305 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/updates.cjs +24 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/windows.plugin.cjs +72 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/AppDelegate.mm +79 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +13 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/SparkComponentGeometry.h +9 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/application.inc +647 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/notifications.inc +60 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/runtime.inc +63 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/runtimes.inc +162 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/RNDesktopLinks.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/common/AuthLoopback.h +121 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/macos/RNDesktopLinks.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/macos/RNDesktopLinks.mm +79 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +53 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/NativeDesktopLinks.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/api.ts +37 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/expo.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.def +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.h +128 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/RNDesktopShortcuts.podspec +16 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/RNDesktopShortcuts.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/RNDesktopShortcuts.mm +56 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +43 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/NativeDesktopShortcuts.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/accelerator.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/api.ts +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/RNDesktopWindows.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/RNDesktopWindows.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/RNDesktopWindows.mm +210 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/NativeDesktopWindowManager.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/api.ts +79 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows-options.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/RNDesktopDrag.podspec +20 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/macos/RNDesktopDragView.h +4 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/macos/RNDesktopDragView.mm +94 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +44 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/src/DesktopDragViewNativeComponent.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/src/contracts.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/src/index.tsx +17 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/ReactPackageProvider.cpp +21 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.def +3 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.h +209 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/RNFileDialog.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/ios/RNFileDialog.h +9 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/ios/RNFileDialog.mm +259 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +43 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/NativeFileDialog.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/index.ts +89 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/index.windows.ts +15 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/options.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.def +3 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.h +128 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-file-system/RNDesktopFileSystem.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/RNDesktopFileSystem.h +4 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/RNDesktopFileSystem.mm +211 -0
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +47 -0
- package/vendor/node_modules/@legendapp/spark-file-system/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/NativeDesktopFileSystem.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/handles.ts +45 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/index.ts +61 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/path.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.def +3 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.h +295 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.vcxproj +144 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.vcxproj.filters +45 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/Trash.h +52 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/RNDesktopGlobalShortcuts.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/macos/RNDesktopGlobalShortcuts.h +3 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/macos/RNDesktopGlobalShortcuts.mm +65 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/src/NativeDesktopGlobalShortcuts.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/src/accelerator.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/src/index.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.def +3 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.h +80 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/RNDesktopMessageDialog.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/macos/RNDesktopMessageDialog.h +3 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/macos/RNDesktopMessageDialog.mm +36 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/src/NativeDesktopMessageDialog.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/src/index.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.def +3 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.h +145 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/RNNativeMenu.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/ios/RNNativeMenu.h +10 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/ios/RNNativeMenu.mm +632 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +41 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/NativeMenu.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/api.ts +128 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/windows-menus.ts +43 -0
- package/vendor/node_modules/@legendapp/spark-notifications/RNDesktopNotifications.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-notifications/macos/RNDesktopNotifications.h +4 -0
- package/vendor/node_modules/@legendapp/spark-notifications/macos/RNDesktopNotifications.mm +111 -0
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-notifications/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-notifications/src/NativeDesktopNotifications.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-notifications/src/index.ts +53 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.def +3 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.h +132 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-processes/RNDesktopProcesses.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-processes/macos/RNDesktopProcesses.h +3 -0
- package/vendor/node_modules/@legendapp/spark-processes/macos/RNDesktopProcesses.mm +153 -0
- package/vendor/node_modules/@legendapp/spark-processes/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-processes/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-processes/src/NativeDesktopProcesses.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-processes/src/index.ts +39 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.def +3 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.h +171 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/RNDesktopSecureStorage.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/macos/RNDesktopSecureStorage.h +4 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/macos/RNDesktopSecureStorage.mm +53 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +52 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/NativeDesktopSecureStorage.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/desktop.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/expo.ts +14 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.windows.ts +2 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/options.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/unavailable.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.def +3 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.h +48 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-settings/package.json +13 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/filename.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/filename.windows.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/index.ts +19 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/store.ts +37 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +16 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/src/index.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-system/RNDesktopSystem.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/RNDesktopSystem.h +3 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/RNDesktopSystem.mm +108 -0
- package/vendor/node_modules/@legendapp/spark-system/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-system/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-system/src/NativeDesktopSystem.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-system/src/index.ts +35 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.def +3 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.h +154 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-tray/RNDesktopTray.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-tray/macos/RNDesktopTray.h +4 -0
- package/vendor/node_modules/@legendapp/spark-tray/macos/RNDesktopTray.mm +63 -0
- package/vendor/node_modules/@legendapp/spark-tray/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-tray/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-tray/src/NativeDesktopTray.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-tray/src/index.ts +46 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.def +3 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.h +133 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-ui/RNSparkUI.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkButton.h +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkButton.mm +51 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkSelect.h +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkSelect.mm +53 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkTextInput.h +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkTextInput.mm +45 -0
- package/vendor/node_modules/@legendapp/spark-ui/package.json +61 -0
- package/vendor/node_modules/@legendapp/spark-ui/react-native.config.js +5 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/SparkButtonNativeComponent.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/SparkSelectNativeComponent.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/SparkTextInputNativeComponent.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.android.tsx +25 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.ios.tsx +30 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.tsx +27 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.web.tsx +23 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.windows.tsx +42 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/select.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/types.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-ui/uniwind.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-ui/uniwind.web.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/ReactPackageProvider.cpp +21 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkAppearance.h +61 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.def +3 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.h +181 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.vcxproj +144 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-updates/RNDesktopUpdates.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-updates/Sparkle.podspec.json +39 -0
- package/vendor/node_modules/@legendapp/spark-updates/macos/RNDesktopUpdates.h +4 -0
- package/vendor/node_modules/@legendapp/spark-updates/macos/RNDesktopUpdates.mm +72 -0
- package/vendor/node_modules/@legendapp/spark-updates/package.json +44 -0
- package/vendor/node_modules/@legendapp/spark-updates/src/NativeDesktopUpdates.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-updates/src/index.ts +23 -0
- package/vendor/node_modules/@legendapp/spark-webview/package.json +15 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/index.ts +2 -0
- package/vendor/node_modules/@legendapp/spark-window-options/index.cjs +25 -0
- package/vendor/node_modules/@legendapp/spark-window-options/index.d.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +12 -0
- package/webview.ts +1 -0
- package/windows.ts +1 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
const fs = require("node:fs");
|
|
2
|
+
const path = require("node:path");
|
|
3
|
+
const { createHash } = require("node:crypto");
|
|
4
|
+
const { validateWindow } = require("@legendapp/spark-window-options");
|
|
5
|
+
const { identity } = require("./identity.cjs");
|
|
6
|
+
const filename = "desktop.config.json";
|
|
7
|
+
const managedConfig = "// Generated by spark: universal Expo configuration";
|
|
8
|
+
function isExpoProject(root) {
|
|
9
|
+
const file = path.join(root, filename);
|
|
10
|
+
return fs.existsSync(file) && JSON.parse(fs.readFileSync(file, "utf8")).extends === "expo";
|
|
11
|
+
}
|
|
12
|
+
function isUniversal(root) {
|
|
13
|
+
const file = path.join(root, filename);
|
|
14
|
+
return fs.existsSync(file) && (JSON.parse(fs.readFileSync(file, "utf8")).platforms?.length ?? 1) > 1;
|
|
15
|
+
}
|
|
16
|
+
function statePath(root, name, target = process.env.SPARK_PLATFORM) {
|
|
17
|
+
if (!isUniversal(root)) return path.join(root, ".spark", name);
|
|
18
|
+
const value = JSON.parse(fs.readFileSync(path.join(root, filename), "utf8"));
|
|
19
|
+
target = selectTarget(value.platforms, target);
|
|
20
|
+
return path.join(root, ".spark", "platforms", target, name);
|
|
21
|
+
}
|
|
22
|
+
function selectTarget(platforms, target) {
|
|
23
|
+
const selected = target ?? (platforms.includes(process.platform === "win32" ? "windows" : "macos") ? (process.platform === "win32" ? "windows" : "macos") : platforms[0]);
|
|
24
|
+
if (!platforms.includes(selected)) throw new Error(`Platform ${selected} is not supported by this project`);
|
|
25
|
+
return selected;
|
|
26
|
+
}
|
|
27
|
+
function readConfig(root, target = process.env.SPARK_PLATFORM) {
|
|
28
|
+
const file = path.join(root, filename);
|
|
29
|
+
if (isExpoProject(root)) {
|
|
30
|
+
const value = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
31
|
+
const selected = selectTarget(value.platforms, target);
|
|
32
|
+
const previous = process.env.SPARK_PLATFORM;
|
|
33
|
+
try {
|
|
34
|
+
process.env.SPARK_PLATFORM = selected;
|
|
35
|
+
// Resolve Expo's own reader from the application's installed Expo version.
|
|
36
|
+
const { createRequire } = require("node:module");
|
|
37
|
+
const appRequire = createRequire(path.join(root, "package.json"));
|
|
38
|
+
const expoRequire = createRequire(appRequire.resolve("expo/package.json"));
|
|
39
|
+
const { getConfig } = expoRequire("@expo/config");
|
|
40
|
+
// Expo's reader metadata contains absolute config paths, not app settings.
|
|
41
|
+
// Keep it out of native compatibility signatures (e.g. /tmp vs /private/tmp).
|
|
42
|
+
const { _internal, ...expo } = getConfig(root, { skipPlugins: true }).exp;
|
|
43
|
+
if (["macos", "windows"].includes(selected) && expo.extra?.spark?.projectId !== value.projectId) throw new Error("Compose app.config with withSparkExpo before running desktop commands");
|
|
44
|
+
return { expo: { ...expo, platforms: [selected] } };
|
|
45
|
+
} finally {
|
|
46
|
+
if (previous === undefined) delete process.env.SPARK_PLATFORM; else process.env.SPARK_PLATFORM = previous;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (!fs.existsSync(file)) return JSON.parse(fs.readFileSync(path.join(root, "app.json"), "utf8"));
|
|
50
|
+
const result = toExpo(JSON.parse(fs.readFileSync(file, "utf8")), target);
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
function supportedPlatforms(root) {
|
|
54
|
+
const file = path.join(root, filename);
|
|
55
|
+
if (fs.existsSync(file)) return JSON.parse(fs.readFileSync(file, "utf8")).platforms ?? ["macos"];
|
|
56
|
+
return readConfig(root).expo.platforms ?? ["ios", "android", "web"];
|
|
57
|
+
}
|
|
58
|
+
// A live server has no single build target. Platform build overlays (notably
|
|
59
|
+
// native autolinking exclusions) must not leak into other platforms' JS graphs.
|
|
60
|
+
function developmentConfig(value, target) {
|
|
61
|
+
const result = toExpo({ ...value, expoByPlatform: {} }, target).expo;
|
|
62
|
+
result.platforms = value.platforms ?? ["macos"];
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
function expoConfig(root) {
|
|
66
|
+
if (process.env.SPARK_DEV_SESSION === "1") {
|
|
67
|
+
return developmentConfig(JSON.parse(fs.readFileSync(path.join(root, filename), "utf8")), process.env.SPARK_PLATFORM);
|
|
68
|
+
}
|
|
69
|
+
const result = readConfig(root);
|
|
70
|
+
return applySelection(root, result.expo);
|
|
71
|
+
}
|
|
72
|
+
function applySelection(root, expo) {
|
|
73
|
+
if (isUniversal(root)) {
|
|
74
|
+
const selection = statePath(root, "native-selection.json", expo.platforms[0]);
|
|
75
|
+
if (expo.platforms[0] === "macos" && fs.existsSync(selection)) {
|
|
76
|
+
const excluded = JSON.parse(fs.readFileSync(selection, "utf8")).excluded ?? [];
|
|
77
|
+
expo.autolinking = { ...expo.autolinking, exclude: [...new Set([...(expo.autolinking?.exclude ?? []), ...excluded])] };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return expo;
|
|
81
|
+
}
|
|
82
|
+
function toExpo(value, target) {
|
|
83
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Desktop config must be an object");
|
|
84
|
+
const allowed = ["$schema", "name", "projectId", "version", "window", "macos", "platforms", "scheme", "documentTypes", "menuBarOnly", "updates", "include", "signing", "helpers", "expo", "expoByPlatform"];
|
|
85
|
+
for (const key of Object.keys(value)) if (!allowed.includes(key)) throw new Error(`Unknown desktop configuration field: ${key}`);
|
|
86
|
+
for (const key of ["name", "projectId", "version"]) if (typeof value[key] !== "string" || !value[key].trim()) throw new Error(`Desktop config needs ${key}`);
|
|
87
|
+
const platforms = value.platforms ?? ["macos"];
|
|
88
|
+
if (!Array.isArray(platforms) || !platforms.length || new Set(platforms).size !== platforms.length || platforms.some(p => !["macos", "windows", "ios", "android", "web"].includes(p))) throw new Error("platforms must list unique supported targets: macos, windows, ios, android, web");
|
|
89
|
+
const selected = selectTarget(platforms, target);
|
|
90
|
+
if (platforms.includes("macos") && (!value.macos || typeof value.macos.bundleIdentifier !== "string" || !/^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/.test(value.macos.bundleIdentifier))) throw new Error("macos.bundleIdentifier must be a reverse-DNS identifier");
|
|
91
|
+
validateWindow(value.window ?? {});
|
|
92
|
+
if (value.include !== undefined && (!Array.isArray(value.include) || value.include.some(x => typeof x !== "string"))) throw new Error("include must be a list of package names");
|
|
93
|
+
require("./helpers.cjs").validateHelpers(value.helpers);
|
|
94
|
+
const extra = { projectId: value.projectId };
|
|
95
|
+
for (const key of ["window", "documentTypes", "menuBarOnly", "updates", "include", "signing", "helpers"]) if (value[key] !== undefined) extra[key] = value[key];
|
|
96
|
+
const overrides = value.expoByPlatform ?? {};
|
|
97
|
+
if (!overrides || typeof overrides !== "object" || Array.isArray(overrides) || Object.keys(overrides).some(p => !platforms.includes(p))) throw new Error("expoByPlatform keys must be supported platforms");
|
|
98
|
+
const backend = merge(value.expo ?? {}, overrides[selected] ?? {});
|
|
99
|
+
if (!backend || typeof backend !== "object" || Array.isArray(backend)) throw new Error("expo overrides must be an object");
|
|
100
|
+
const hex = createHash("sha256").update(value.projectId).digest("hex");
|
|
101
|
+
const guid = `${hex.slice(0,8)}-${hex.slice(8,12)}-5${hex.slice(13,16)}-a${hex.slice(17,20)}-${hex.slice(20,32)}`;
|
|
102
|
+
const config = {
|
|
103
|
+
...backend,
|
|
104
|
+
name: value.name, slug: backend.slug ?? value.name.toLowerCase().replace(/[^a-z0-9-]/g, "-"), version: value.version,
|
|
105
|
+
platforms: [selected], newArchEnabled: true,
|
|
106
|
+
...(value.macos ? { macos: { ...value.macos, infoPlist: { CFBundleName: value.name, ...value.macos.infoPlist } } } : {}),
|
|
107
|
+
...(value.scheme !== undefined ? { scheme: value.scheme } : {}),
|
|
108
|
+
extra: { ...backend.extra, spark: { ...extra, ...(platforms.length > 1 ? { supportedPlatforms: platforms } : {}) } },
|
|
109
|
+
experiments: { ...backend.experiments, outOfTreePlatforms: true },
|
|
110
|
+
windows: backend.windows ?? { namespace: "DesktopApp", displayName: value.name, packageGuid: guid, projectGuid: guid },
|
|
111
|
+
plugins: [...(["macos", "windows"].includes(selected) ? ["@legendapp/spark/config-plugin"] : []), ...(backend.plugins ?? []).filter(p => (Array.isArray(p) ? p[0] : p) !== "@legendapp/spark-desktop-config" && (Array.isArray(p) ? p[0] : p) !== "@legendapp/spark/config-plugin")],
|
|
112
|
+
};
|
|
113
|
+
identity(config);
|
|
114
|
+
return { expo: config };
|
|
115
|
+
}
|
|
116
|
+
function merge(base, override) {
|
|
117
|
+
if (!base || typeof base !== "object" || Array.isArray(base) || !override || typeof override !== "object" || Array.isArray(override)) throw new Error("Expo overrides must be objects");
|
|
118
|
+
const result = { ...base };
|
|
119
|
+
for (const [key, value] of Object.entries(override)) {
|
|
120
|
+
if (["__proto__", "constructor", "prototype"].includes(key)) throw new Error("Invalid Expo override key");
|
|
121
|
+
result[key] = value && typeof value === "object" && !Array.isArray(value) && result[key] && typeof result[key] === "object" && !Array.isArray(result[key]) ? merge(result[key], value) : value;
|
|
122
|
+
}
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
// Expo tools read this generated transport file. All framework consumers resolve
|
|
126
|
+
// the canonical source; the generated file is never edited by SDK commands.
|
|
127
|
+
function prepareConfig(root) {
|
|
128
|
+
if (isExpoProject(root)) return readConfig(root);
|
|
129
|
+
if (isUniversal(root)) {
|
|
130
|
+
const file = path.join(root, "app.config.js");
|
|
131
|
+
if (fs.existsSync(path.join(root, "app.config.ts")) || (fs.existsSync(file) && !fs.readFileSync(file, "utf8").startsWith(managedConfig))) throw new Error("Universal configuration needs a spark-managed app.config.js; preserve custom configuration under expo or expoByPlatform");
|
|
132
|
+
const result = readConfig(root);
|
|
133
|
+
if (!fs.existsSync(file)) fs.writeFileSync(file, `${managedConfig}\nmodule.exports = () => require("@legendapp/spark/config").expoConfig(__dirname);\n`);
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
if (fs.existsSync(path.join(root, filename)) && ["app.config.js", "app.config.ts"].some(name => fs.existsSync(path.join(root, name)))) throw new Error("desktop.config.json cannot be combined with an Expo app.config file; put backend overrides under expo in desktop.config.json");
|
|
137
|
+
const result = readConfig(root);
|
|
138
|
+
if (fs.existsSync(path.join(root, filename))) {
|
|
139
|
+
const file = path.join(root, "app.json");
|
|
140
|
+
const content = JSON.stringify(result, null, 2) + "\n";
|
|
141
|
+
if (!fs.existsSync(file) || fs.readFileSync(file, "utf8") !== content) {
|
|
142
|
+
const temporary = `${file}.${process.pid}.tmp`;
|
|
143
|
+
fs.writeFileSync(temporary, content); fs.renameSync(temporary, file);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
function writeUpdates(root, updates) {
|
|
149
|
+
const file = path.join(root, filename);
|
|
150
|
+
if (fs.existsSync(file)) {
|
|
151
|
+
const value = JSON.parse(fs.readFileSync(file, "utf8")); value.updates = updates;
|
|
152
|
+
if (value.extends !== "expo") toExpo(value);
|
|
153
|
+
const temporary = `${file}.${process.pid}.tmp`;
|
|
154
|
+
fs.writeFileSync(temporary, JSON.stringify(value, null, 2) + "\n"); fs.renameSync(temporary, file);
|
|
155
|
+
} else {
|
|
156
|
+
const value = readConfig(root); value.expo.extra ??= {}; value.expo.extra.spark ??= {}; value.expo.extra.spark.updates = updates;
|
|
157
|
+
const target = path.join(root, "app.json"); const temporary = `${target}.${process.pid}.tmp`;
|
|
158
|
+
fs.writeFileSync(temporary, JSON.stringify(value, null, 2) + "\n"); fs.renameSync(temporary, target);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
module.exports = { readConfig, toExpo, prepareConfig, writeUpdates, statePath, isUniversal, isExpoProject, selectTarget, expoConfig, applySelection, supportedPlatforms, developmentConfig };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function readConfig(root: string, target?: string): any;
|
|
2
|
+
export function prepareConfig(root: string): any;
|
|
3
|
+
export function toExpo(value: unknown, target?: string): any;
|
|
4
|
+
export function writeUpdates(root: string, updates: unknown): void;
|
|
5
|
+
|
|
6
|
+
export function isUniversal(root: string): boolean;
|
|
7
|
+
export function isExpoProject(root: string): boolean;
|
|
8
|
+
export function statePath(root: string, name: string, target?: string): string;
|
|
9
|
+
export function selectTarget(platforms: string[], target?: string): string;
|
|
10
|
+
export function expoConfig(root: string): any;
|
|
11
|
+
|
|
12
|
+
export function supportedPlatforms(root: string): string[];
|
|
13
|
+
export function developmentConfig(value: any, target?: string): any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function mergeEntitlements(...sources) {
|
|
2
|
+
const result = {};
|
|
3
|
+
for (const source of sources) {
|
|
4
|
+
if (!source || typeof source !== "object" || Array.isArray(source)) throw new Error("Entitlements must be an object.");
|
|
5
|
+
for (const [key, value] of Object.entries(source)) {
|
|
6
|
+
if (value === null || !["boolean", "string", "number", "object"].includes(typeof value)) throw new Error(`Invalid entitlement: ${key}`);
|
|
7
|
+
if (key in result && JSON.stringify(result[key]) !== JSON.stringify(value)) {
|
|
8
|
+
if (Array.isArray(result[key]) && Array.isArray(value)) result[key] = [...new Set([...result[key], ...value])];
|
|
9
|
+
else throw new Error(`Conflicting entitlement requirements: ${key}`);
|
|
10
|
+
} else result[key] = value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function resolveEntitlements(config, packages) {
|
|
17
|
+
const expo = config.expo ?? config;
|
|
18
|
+
return mergeEntitlements(
|
|
19
|
+
...packages.map((pkg) => pkg.spark?.entitlements?.macos ?? {}),
|
|
20
|
+
expo.macos?.entitlements ?? {},
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
module.exports = { mergeEntitlements, resolveEntitlements };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
|
|
4
|
+
// Existing Expo projects keep their Expo configuration as the source of truth.
|
|
5
|
+
// Only an explicitly selected desktop command applies the Spark overlay.
|
|
6
|
+
function withSparkExpo(original, root) {
|
|
7
|
+
return context => {
|
|
8
|
+
const base = typeof original === 'function' ? original(context) : original;
|
|
9
|
+
const target = process.env.SPARK_PLATFORM;
|
|
10
|
+
const development = process.env.SPARK_DEV_SESSION === '1';
|
|
11
|
+
if (!development && target !== 'macos' && target !== 'windows') return base;
|
|
12
|
+
const { extends: source, ...desktop } = JSON.parse(fs.readFileSync(path.join(root, 'desktop.config.json'), 'utf8'));
|
|
13
|
+
if (source !== 'expo') throw new Error('Expected an Expo-owned desktop configuration');
|
|
14
|
+
const { toExpo, applySelection, developmentConfig } = require('./config.cjs');
|
|
15
|
+
const value = {
|
|
16
|
+
...desktop,
|
|
17
|
+
name: base.name,
|
|
18
|
+
version: base.version ?? '1.0.0',
|
|
19
|
+
expo: { ...base, ...desktop.expo },
|
|
20
|
+
macos: { ...base.macos, ...desktop.macos },
|
|
21
|
+
};
|
|
22
|
+
if (development) return developmentConfig(value, target);
|
|
23
|
+
return applySelection(root, toExpo(value, target).expo);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
module.exports = { withSparkExpo };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// Compatibility fix for the pinned RN macOS Fabric start/stop race.
|
|
2
|
+
// Keep the native lifecycle replacement explicit and fail on changed upstream code.
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
const originalLifecycle = `- (void)start
|
|
6
|
+
{
|
|
7
|
+
std::lock_guard<std::mutex> lock(_surfaceMutex);
|
|
8
|
+
|
|
9
|
+
if (_surfaceHandler->getStatus() != SurfaceHandler::Status::Registered) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// We need to register a root view component here synchronously because right after
|
|
14
|
+
// we start a surface, it can initiate an update that can query the root component.
|
|
15
|
+
RCTExecuteOnMainQueue(^{
|
|
16
|
+
[self->_surfacePresenter.mountingManager attachSurfaceToView:self.view
|
|
17
|
+
surfaceId:self->_surfaceHandler->getSurfaceId()];
|
|
18
|
+
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
|
|
19
|
+
self->_surfaceHandler->start();
|
|
20
|
+
[self _propagateStageChange];
|
|
21
|
+
|
|
22
|
+
[self->_surfacePresenter setupAnimationDriverWithSurfaceHandler:*self->_surfaceHandler];
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
- (void)stop
|
|
28
|
+
{
|
|
29
|
+
std::lock_guard<std::mutex> lock(_surfaceMutex);
|
|
30
|
+
|
|
31
|
+
if (_surfaceHandler->getStatus() != SurfaceHandler::Status::Running) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_surfaceHandler->stop();
|
|
36
|
+
[self _propagateStageChange];
|
|
37
|
+
|
|
38
|
+
RCTExecuteOnMainQueue(^{
|
|
39
|
+
[self->_surfacePresenter.mountingManager detachSurfaceFromView:self.view
|
|
40
|
+
surfaceId:self->_surfaceHandler->getSurfaceId()];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
const fixedLifecycle = `- (void)start
|
|
45
|
+
{
|
|
46
|
+
NSUInteger generation;
|
|
47
|
+
{
|
|
48
|
+
std::lock_guard<std::mutex> lock(_surfaceMutex);
|
|
49
|
+
if (_surfaceHandler->getStatus() != SurfaceHandler::Status::Registered) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
generation = ++_surfaceLifecycleGeneration;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
RCTExecuteOnMainQueue(^{
|
|
56
|
+
std::lock_guard<std::mutex> lock(self->_surfaceMutex);
|
|
57
|
+
if (generation != self->_surfaceLifecycleGeneration) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!self->_surfaceViewAttached) {
|
|
61
|
+
[self->_surfacePresenter.mountingManager attachSurfaceToView:self.view
|
|
62
|
+
surfaceId:self->_surfaceHandler->getSurfaceId()];
|
|
63
|
+
self->_surfaceViewAttached = YES;
|
|
64
|
+
}
|
|
65
|
+
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
|
|
66
|
+
std::lock_guard<std::mutex> lock(self->_surfaceMutex);
|
|
67
|
+
if (generation != self->_surfaceLifecycleGeneration ||
|
|
68
|
+
self->_surfaceHandler->getStatus() != SurfaceHandler::Status::Registered) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
self->_surfaceHandler->start();
|
|
72
|
+
// Stop must not destroy the shadow tree before the animation driver uses it.
|
|
73
|
+
[self->_surfacePresenter setupAnimationDriverWithSurfaceHandler:*self->_surfaceHandler];
|
|
74
|
+
[self _propagateStageChange];
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
- (void)stop
|
|
80
|
+
{
|
|
81
|
+
NSUInteger generation;
|
|
82
|
+
{
|
|
83
|
+
std::lock_guard<std::mutex> lock(_surfaceMutex);
|
|
84
|
+
// Cancel queued starts even if the surface has not reached Running yet.
|
|
85
|
+
generation = ++_surfaceLifecycleGeneration;
|
|
86
|
+
if (_surfaceHandler->getStatus() == SurfaceHandler::Status::Running) {
|
|
87
|
+
_surfaceHandler->stop();
|
|
88
|
+
[self _propagateStageChange];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
RCTExecuteOnMainQueue(^{
|
|
93
|
+
std::lock_guard<std::mutex> lock(self->_surfaceMutex);
|
|
94
|
+
// A later start owns the view now; an older stop must not detach it.
|
|
95
|
+
if (generation != self->_surfaceLifecycleGeneration || !self->_surfaceViewAttached) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
self->_surfaceViewAttached = NO;
|
|
99
|
+
[self->_surfacePresenter.mountingManager detachSurfaceFromView:self->_view
|
|
100
|
+
surfaceId:self->_surfaceHandler->getSurfaceId()];
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
const originalMutex = " std::mutex _surfaceMutex;";
|
|
105
|
+
const fixedMutex = originalMutex + "\n NSUInteger _surfaceLifecycleGeneration;\n BOOL _surfaceViewAttached;";
|
|
106
|
+
function patchSurface(source) {
|
|
107
|
+
if (source.includes(fixedLifecycle) && source.includes(fixedMutex)) return source;
|
|
108
|
+
if (!source.includes(originalLifecycle) || !source.includes(originalMutex) || source.includes("_surfaceLifecycleGeneration"))
|
|
109
|
+
throw new Error("React Native macOS Fabric source changed; review the Spark surface lifecycle patch before building.");
|
|
110
|
+
return source.replace(originalLifecycle, fixedLifecycle).replace(originalMutex, fixedMutex);
|
|
111
|
+
}
|
|
112
|
+
function installSurfaceLifecyclePatch(root) {
|
|
113
|
+
const manifest = require.resolve("react-native-macos/package.json", { paths: [root] });
|
|
114
|
+
const version = JSON.parse(fs.readFileSync(manifest, "utf8")).version;
|
|
115
|
+
if (version !== "0.81.7") throw new Error(`spark's Fabric lifecycle patch requires react-native-macos@0.81.7; found ${version}.`);
|
|
116
|
+
const file = path.join(path.dirname(manifest), "React/Fabric/Surface/RCTFabricSurface.mm");
|
|
117
|
+
const before = fs.readFileSync(file, "utf8"), after = patchSurface(before);
|
|
118
|
+
if (before !== after) {
|
|
119
|
+
// Never mutate a package-manager cache through a hardlinked installed file.
|
|
120
|
+
const temporary = `${file}.spark-${process.pid}.tmp`;
|
|
121
|
+
fs.writeFileSync(temporary, after);
|
|
122
|
+
fs.renameSync(temporary, file);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
module.exports = { patchSurface, installSurfaceLifecyclePatch };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Shared by Expo configuration and the CLI; filesystem checks happen at build time.
|
|
2
|
+
const targets = ["macos-arm64", "macos-x64", "windows-arm64", "windows-x64"];
|
|
3
|
+
function relative(value) {
|
|
4
|
+
return typeof value === "string" && value.length > 0 && !/[\\\0:]/.test(value) && !value.startsWith("/") && value.split("/").every(part => part && part !== "." && part !== "..");
|
|
5
|
+
}
|
|
6
|
+
function validateHelpers(helpers = {}) {
|
|
7
|
+
if (!helpers || typeof helpers !== "object" || Array.isArray(helpers)) throw new Error("helpers must be an object");
|
|
8
|
+
const names = Object.keys(helpers).map(name => name.toLowerCase());
|
|
9
|
+
if (new Set(names).size !== names.length) throw new Error("Helper names must be unique ignoring case");
|
|
10
|
+
for (const [name, value] of Object.entries(helpers)) {
|
|
11
|
+
if (!/^[A-Za-z0-9_-]+$/.test(name)) throw new Error("Helpers need simple names");
|
|
12
|
+
if (typeof value === "string") { if (!relative(value)) throw new Error(`Helper ${name} needs a project-relative file`); continue; }
|
|
13
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || !Object.keys(value).length) throw new Error(`Helper ${name} needs target bundles`);
|
|
14
|
+
for (const [target, bundle] of Object.entries(value)) {
|
|
15
|
+
if (!targets.includes(target) || !bundle || typeof bundle !== "object" || Array.isArray(bundle) || Object.keys(bundle).some(key => !["directory", "executable"].includes(key)) || !relative(bundle.directory) || !relative(bundle.executable)) throw new Error(`Invalid helper bundle: ${name}/${target}; expected directory and executable relative paths`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return helpers;
|
|
19
|
+
}
|
|
20
|
+
module.exports = { validateHelpers };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const { validateWindow } = require("@legendapp/spark-window-options");
|
|
2
|
+
const { updatePlist } = require("./updates.cjs");
|
|
3
|
+
function identity(config) {
|
|
4
|
+
const projectId = config.extra?.spark?.projectId ?? config.macos?.bundleIdentifier;
|
|
5
|
+
if (typeof projectId !== "string" || !projectId.length || projectId.length > 200) throw new Error("Set extra.spark.projectId to a stable project identifier");
|
|
6
|
+
const schemes = config.scheme === undefined ? [] : Array.isArray(config.scheme) ? config.scheme : [config.scheme];
|
|
7
|
+
if (schemes.some(value => typeof value !== "string" || !/^[a-zA-Z][a-zA-Z0-9+.-]*$/.test(value))) throw new Error("URL schemes must be valid scheme names without a colon");
|
|
8
|
+
const documents = config.extra?.spark?.documentTypes ?? [];
|
|
9
|
+
const types = documents.map(document => {
|
|
10
|
+
if (typeof document.name !== "string" || !document.name.length || !Array.isArray(document.contentTypes) || !document.contentTypes.length || document.contentTypes.some(type => typeof type !== "string" || !type.includes("."))) throw new Error("Document types need a name and contentTypes containing UTIs");
|
|
11
|
+
if (document.role && !["Editor", "Viewer"].includes(document.role)) throw new Error("Document role must be Editor or Viewer");
|
|
12
|
+
return { CFBundleTypeName: document.name, CFBundleTypeRole: document.role ?? "Editor", LSItemContentTypes: document.contentTypes, LSHandlerRank: "Alternate" };
|
|
13
|
+
});
|
|
14
|
+
if (config.extra?.spark?.menuBarOnly !== undefined && typeof config.extra.spark.menuBarOnly !== "boolean") throw new Error("menuBarOnly must be a boolean");
|
|
15
|
+
return {
|
|
16
|
+
LSUIElement: config.extra?.spark?.menuBarOnly === true,
|
|
17
|
+
SparkMenuBarOnly: config.extra?.spark?.menuBarOnly === true,
|
|
18
|
+
SparkProjectIdentifier: projectId,
|
|
19
|
+
SparkWindowConfiguration: validateWindow(config.extra?.spark?.window ?? {}),
|
|
20
|
+
...updatePlist(config),
|
|
21
|
+
// The app may need JS to save edits before accepting a quit request.
|
|
22
|
+
NSSupportsAutomaticTermination: false,
|
|
23
|
+
NSSupportsSuddenTermination: false,
|
|
24
|
+
...(schemes.length ? { CFBundleURLTypes: [{ CFBundleURLName: projectId, CFBundleURLSchemes: [...new Set(schemes)] }] } : {}),
|
|
25
|
+
...(types.length ? { CFBundleDocumentTypes: types } : {}),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
module.exports = { identity };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// RN macOS 0.81.7 legacy views embedded in Fabric can have no React tag.
|
|
2
|
+
const fs = require("node:fs");
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const replacements = {
|
|
5
|
+
"React/Views/RCTViewKeyboardEvent.m": [
|
|
6
|
+
` // Ignore "dead keys" (key press that waits for another key to make a character)
|
|
7
|
+
if (!event.charactersIgnoringModifiers.length) {`,
|
|
8
|
+
` // Untagged native subviews cannot emit React events. Ignore dead keys too.
|
|
9
|
+
if (reactTag == nil || !event.charactersIgnoringModifiers.length) {`,
|
|
10
|
+
],
|
|
11
|
+
"React/Views/RCTView.m": [
|
|
12
|
+
` if (!alreadyEmitted) {
|
|
13
|
+
[_eventDispatcher sendEvent:keyboardEvent];`,
|
|
14
|
+
` // Do not consume JS delivery when a native subview has no React target/dispatcher.
|
|
15
|
+
if (keyboardEvent != nil && _eventDispatcher != nil && !alreadyEmitted) {
|
|
16
|
+
[_eventDispatcher sendEvent:keyboardEvent];`,
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
function patchKeyboardSource(file, source) {
|
|
20
|
+
const pair = replacements[file];
|
|
21
|
+
if (!pair) throw new Error(`Unknown keyboard patch target: ${file}`);
|
|
22
|
+
const [before, after] = pair;
|
|
23
|
+
if (source.includes(after) && !source.includes(before)) return source;
|
|
24
|
+
if (source.split(before).length !== 2 || source.includes(after))
|
|
25
|
+
throw new Error(`React Native macOS keyboard source changed (${file}); review the compatibility patch before building.`);
|
|
26
|
+
return source.replace(before, after);
|
|
27
|
+
}
|
|
28
|
+
function installKeyboardEventsPatch(root) {
|
|
29
|
+
const manifest = require.resolve("react-native-macos/package.json", { paths: [root] });
|
|
30
|
+
const version = JSON.parse(fs.readFileSync(manifest, "utf8")).version;
|
|
31
|
+
if (version !== "0.81.7") throw new Error(`spark's keyboard patch requires react-native-macos@0.81.7; found ${version}.`);
|
|
32
|
+
// Validate all targets before changing either file.
|
|
33
|
+
const changes = Object.keys(replacements).map(relative => {
|
|
34
|
+
const file = path.join(path.dirname(manifest), relative);
|
|
35
|
+
const before = fs.readFileSync(file, "utf8");
|
|
36
|
+
return {file, before, after: patchKeyboardSource(relative, before)};
|
|
37
|
+
});
|
|
38
|
+
for (const {file, before, after} of changes) if (before !== after) {
|
|
39
|
+
const temporary = `${file}.spark-${process.pid}.tmp`;
|
|
40
|
+
fs.writeFileSync(temporary, after);
|
|
41
|
+
fs.renameSync(temporary, file); // Preserve package-manager cache hardlinks.
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
module.exports = {patchKeyboardSource, installKeyboardEventsPatch};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@legendapp/spark-desktop-config",
|
|
3
|
+
"version": "0.0.1-next.2",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "app.plugin.cjs",
|
|
6
|
+
"files": [
|
|
7
|
+
"*.cjs",
|
|
8
|
+
"*.json",
|
|
9
|
+
"*.d.ts",
|
|
10
|
+
"*.d.cts"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"expo-desktop-config-plugins": "1.2.0-beta.1",
|
|
14
|
+
"@legendapp/spark-desktop-host": "0.0.1-next.2",
|
|
15
|
+
"@legendapp/spark-window-options": "0.0.1-next.2",
|
|
16
|
+
"@expo/config-plugins": "54.0.5"
|
|
17
|
+
},
|
|
18
|
+
"private": true
|
|
19
|
+
}
|