@legendapp/spark 0.0.1-next.10
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/LICENSE +21 -0
- package/README.md +27 -0
- package/ai-codex.ts +1 -0
- package/ai.ts +1 -0
- package/app-documents.ts +1 -0
- package/app.ts +1 -0
- package/audio.ts +1 -0
- package/auth-session.ts +1 -0
- package/bin/spark.cjs +5 -0
- package/camera.ts +13 -0
- package/clipboard.ts +1 -0
- package/config-plugin.cjs +1 -0
- package/config-plugin.d.cts +2 -0
- package/config.cjs +1 -0
- package/config.d.cts +1 -0
- package/context-menu.ts +1 -0
- package/contracts.ts +2 -0
- package/customize.ts +2 -0
- package/diagnostics.ts +1 -0
- package/dialogs.ts +2 -0
- package/drag-drop.ts +1 -0
- package/expo-config.cjs +1 -0
- package/expo-config.d.cts +1 -0
- package/files.ts +1 -0
- package/global-shortcuts.ts +1 -0
- package/html.ts +1 -0
- package/init-template.cjs +2 -0
- package/links.ts +1 -0
- package/markdown.ts +1 -0
- package/menus.ts +1 -0
- package/metro-gate.cjs +1 -0
- package/metro.cjs +4 -0
- package/metro.d.cts +12 -0
- package/native.cjs +3 -0
- package/native.d.cts +6 -0
- package/notifications.ts +1 -0
- package/package.json +248 -0
- package/patches/camera/react-native-nitro-image.patch +320 -0
- package/patches/camera/react-native-nitro-modules.patch +50 -0
- package/patches/camera/react-native-vision-camera.patch +2662 -0
- package/patches/camera/upstream.json +22 -0
- package/patches/dependencies.json +14 -0
- package/patches/react-native-enriched-html@1.1.1.patch +854 -0
- package/patches/react-native-enriched-markdown@1.1.1.patch +7751 -0
- package/postinstall.cjs +1 -0
- package/processes.ts +1 -0
- package/runtime-entry.cjs +1 -0
- package/schema.json +636 -0
- package/secure-storage.ts +1 -0
- package/settings-observable.ts +1 -0
- package/settings-window.ts +1 -0
- package/settings.ts +1 -0
- package/shortcuts-commands.ts +1 -0
- package/shortcuts-keyboard.ts +3 -0
- package/shortcuts.ts +1 -0
- package/skills/spark/SKILL.md +56 -0
- package/skills/spark/UPGRADING.md +322 -0
- package/sqlite.ts +1 -0
- package/system.ts +1 -0
- package/tray.ts +1 -0
- package/ui-classnames.ts +1 -0
- package/ui-glass.ts +1 -0
- package/ui-search.ts +1 -0
- package/ui-sidebar.ts +1 -0
- package/ui-split-view.ts +1 -0
- package/ui-swipe.ts +1 -0
- package/ui-symbol.ts +1 -0
- package/ui-uniwind.ts +1 -0
- package/ui.ts +1 -0
- package/updates.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-ai/package.json +19 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/availability.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/index.ts +15 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocation-command.cjs +11 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocation-command.d.cts +2 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocations.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/output.ts +62 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/run.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/types.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-audio/RNSparkAudio.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-audio/macos/RNSparkAudio.h +5 -0
- package/vendor/node_modules/@legendapp/spark-audio/macos/RNSparkAudio.mm +256 -0
- package/vendor/node_modules/@legendapp/spark-audio/package.json +52 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/NativeSparkAudio.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/desktop.ts +43 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/events.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/hooks.ts +65 -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 +101 -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 +7 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session.ts +58 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session.web.ts +43 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-types.ts +59 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/mobile.ts +46 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/player.ts +97 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/status-listeners.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/types.ts +26 -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 +193 -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 +42 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/core.ts +86 -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 +38 -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 +108 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/types.ts +49 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/add-desktop.js +207 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/build-mode.js +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +379 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/cli-arguments.js +61 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/commands.js +113 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/create.js +160 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/credentials.js +130 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-ai.cjs +108 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-artifacts.js +315 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-cli.cjs +75 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-github.cjs +133 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-policy.cjs +102 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-provider.cjs +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-worker.cjs +273 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dependency-pins.js +157 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev-command.js +92 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +415 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/enriched-html-pins.js +128 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/errors.js +100 -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 +69 -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 +14 -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 +280 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/init-template.cjs +26 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/init-template.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/js-runtime.cjs +96 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/json.js +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/local.js +124 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/macos-release.js +11 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro-gate.cjs +33 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.cjs +84 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.js +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.cjs +152 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.d.cts +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +184 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.d.cts +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-metadata.js +26 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-patch-preflight.js +88 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-preparation.js +88 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/notary-profiles.js +75 -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-config.js +43 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package-manager.js +58 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package.js +201 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/platform.js +48 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/process.js +64 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project-version.js +12 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +419 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release-driver.js +35 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.js +123 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +42 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runner-install.js +254 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-bootstrap.ps1 +87 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-bootstrap.sh +107 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-downloads.tsv +13 -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 +71 -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 +26 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/signing.js +176 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/universal.cjs +29 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/updates.js +157 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/upgrade.js +102 -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 +137 -0
- package/vendor/node_modules/@legendapp/spark-cli/package.json +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/App.tsx +23 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/app.json +15 -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 +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/gitignore +9 -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 +102 -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 +59 -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 +59 -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 +27 -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 +25 -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 +23 -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 +27 -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 +47 -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 +15 -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 +63 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/App.tsx +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/app.json +19 -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 +64 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/gitignore +11 -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 +116 -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/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/App.tsx +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/app.json +15 -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 +9 -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 +103 -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 +81 -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 +63 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/expo.ts +22 -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/src/options.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/types.ts +10 -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 +142 -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 +145 -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-codex/RNCodex.podspec +22 -0
- package/vendor/node_modules/@legendapp/spark-codex/cpp/HybridCodexAppServer.hpp +23 -0
- package/vendor/node_modules/@legendapp/spark-codex/cpp/HybridCodexAppServer.mm +1541 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitro.json +21 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/.gitattributes +1 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex+autolinking.rb +62 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex-Swift-Cxx-Bridge.cpp +17 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex-Swift-Cxx-Bridge.hpp +27 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex-Swift-Cxx-Umbrella.hpp +38 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodexAutolinking.mm +35 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodexAutolinking.swift +16 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/CodexAvailability.hpp +95 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/CodexRunResult.hpp +99 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/HybridCodexAppServerSpec.cpp +24 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/HybridCodexAppServerSpec.hpp +71 -0
- package/vendor/node_modules/@legendapp/spark-codex/package.json +35 -0
- package/vendor/node_modules/@legendapp/spark-codex/react-native.config.js +11 -0
- package/vendor/node_modules/@legendapp/spark-codex/src/Codex.nitro.ts +30 -0
- package/vendor/node_modules/@legendapp/spark-codex/src/index.ts +65 -0
- package/vendor/node_modules/@legendapp/spark-codex/src/native.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-commands/package.json +21 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/bindings.ts +90 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/index.tsx +400 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/router.ts +138 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/storage.ts +20 -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 +159 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +47 -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 +113 -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 +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/cpp/SparkBinaryJSI.hpp +89 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/cpp/SparkBinaryWindows.hpp +22 -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 +60 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkBinaryJSI.h +48 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.h +35 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.mm +198 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktopError.h +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkInstance.h +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkInstance.mm +207 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkLifecycle.h +26 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkLifecycle.mm +49 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkQuitCoordinator.h +9 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkQuitCoordinator.mm +70 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.h +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.mm +349 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkWindow.mm +86 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/recent-documents/RNRecentDocumentController.mm +55 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +41 -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 +121 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/accelerator.ts +40 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/index.ts +56 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/menu.ts +130 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/native-buffer.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/path.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/customize-hooks.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/customize.ts +117 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/events.ts +75 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/index.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/index.windows.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/open-requests.ts +43 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/restoration.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/transport.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/accessibility-state.cjs +50 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +107 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.d.cts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/autolinking.cjs +42 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.cjs +177 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.d.cts +113 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/customize-provider.cjs +16 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/customize.cjs +16 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/entitlements.cjs +23 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/expo.cjs +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/expo.d.cts +3 -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 +29 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/keyboard-events.cjs +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/lifecycle.cjs +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +106 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +21 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-scroll-view.cjs +144 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-alignment.cjs +60 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-input-alignment.cjs +112 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/schema.json +636 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/test-driver.cjs +11 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/test-driver.d.cts +2 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/text-input-accessibility.cjs +47 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/updates.cjs +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/validation.cjs +36 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/windows.plugin.cjs +73 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/AppDelegate.mm +209 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/SparkCustomize.mm +517 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +14 -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 +849 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/launch.inc +67 -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 +119 -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 +80 -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 +31 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/expo.ts +4 -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/src/native.ts +9 -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 +17 -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 +58 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/keyboard-manager/RNKeyboardManager.h +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/keyboard-manager/RNKeyboardManager.mm +307 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/NativeDesktopShortcuts.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/api.ts +45 -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-shortcuts/src/keyboard-manager/NativeKeyboardManager.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/keyboard-manager/codes.ts +108 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/keyboard-manager/index.ts +99 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/RNDesktopWindows.podspec +22 -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 +339 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/SparkWindowGeometry.h +63 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/LegendWindowRegistry.h +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/LegendWindowRegistry.mm +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.h +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.mm +3189 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManagerStartup.mm +31 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/SidebarStartupFallbacks.mm +14 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +48 -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 +192 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/diagnostics.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/index.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/index.windows.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos-adapter.ts +55 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos.ts +51 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/transport.ts +41 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/types.ts +140 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/validation.ts +162 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/window-manager/NativeWindowManager.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/WindowProvider.tsx +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/createWindowsNavigator.tsx +78 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/index.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/primaryWindowLifecycle.ts +34 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/types.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/usePrimaryWindowLifecycle.ts +18 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/useWindowFocusEffect.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-documents/package.json +22 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/controller.ts +97 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/documentTransition.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/hooks.ts +139 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/index.tsx +50 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/reload.ts +39 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/requests.ts +15 -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 +45 -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 +83 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/src/index.tsx +60 -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 +215 -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 +18 -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 +261 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +50 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/NativeFileDialog.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/index.ts +36 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/native.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/options.ts +74 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/types.ts +42 -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 +112 -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 +18 -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 +222 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/SparkFileMutations.h +25 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/SparkFileMutations.mm +216 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScanner.h +9 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScanner.mm +82 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScannerCore.h +47 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScannerCore.mm +306 -0
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +49 -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/file-scanner/NativeFileScanner.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/file-scanner/index.ts +93 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/handles.ts +79 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/index.ts +150 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/path.ts +1 -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 +371 -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 +146 -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 +18 -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 +68 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +47 -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/index.ts +45 -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 +81 -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-html/package.json +24 -0
- package/vendor/node_modules/@legendapp/spark-html/src/Html.tsx +22 -0
- package/vendor/node_modules/@legendapp/spark-html/src/HtmlInput.tsx +102 -0
- package/vendor/node_modules/@legendapp/spark-html/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-html/src/types.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +24 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/Markdown.tsx +25 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/MarkdownInput.tsx +111 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/index.ts +4 -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 +137 -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 +146 -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 +272 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/NativeMenu.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/api.ts +128 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/hooks.ts +103 -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 +49 -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 +156 -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 +141 -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 +175 -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 +226 -0
- package/vendor/node_modules/@legendapp/spark-processes/package.json +47 -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 +135 -0
- package/vendor/node_modules/@legendapp/spark-processes/src/types.ts +34 -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 +220 -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 +145 -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-rich-text/package.json +18 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/components.tsx +52 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/types.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputShortcuts.macos.ts +55 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputShortcuts.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputValue.ts +14 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/value.ts +16 -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 +62 -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 +26 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/expo.ts +13 -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 +7 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/unavailable.ts +8 -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 +20 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/fileStorage.ts +11 -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 +17 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/storage/index.ts +142 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/store.ts +79 -0
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +20 -0
- package/vendor/node_modules/@legendapp/spark-settings-ui/src/index.tsx +439 -0
- package/vendor/node_modules/@legendapp/spark-settings-ui/src/options.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +16 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/src/database.ts +182 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/src/index.ts +20 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/src/types.ts +22 -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 +143 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkAppearancePreferences.h +9 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkAppearancePreferences.mm +31 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkDockTile.h +24 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkDockTile.mm +101 -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 +158 -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 +158 -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 +75 -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 +103 -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 +163 -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 +54 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkLayoutDirection.h +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkTextInput.h +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkTextInput.mm +58 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.mm +1554 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/glass-effect-view/RNGlassEffectView.mm +76 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSegmentedControl.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSegmentedControl.mm +198 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSelect.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSelect.mm +184 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sf-symbol/RNSFSymbol.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sf-symbol/RNSFSymbol.mm +159 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sidebar/RNSidebar.h +18 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sidebar/RNSidebar.mm +708 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/swipe-actions/RNSwipeActions.h +10 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/swipe-actions/RNSwipeActions.mm +446 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/text-input-search/RNTextInputSearch.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/text-input-search/RNTextInputSearch.mm +188 -0
- package/vendor/node_modules/@legendapp/spark-ui/package.json +74 -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 +12 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/SparkTextInputNativeComponent.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/SidebarSplitViewNativeComponent.ts +42 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/index.tsx +94 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/availability.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/classnames/index.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/control.ts +42 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/desktop.tsx +56 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/glass-effect-view/index.tsx +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.android.tsx +39 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.ios.tsx +59 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.web.tsx +54 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/mobile-input.tsx +11 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/native-select/NativeSegmentedControlNativeComponent.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/native-select/NativeSelectNativeComponent.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/select.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sf-symbol/SFSymbolNativeComponent.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sf-symbol/index.tsx +27 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sidebar/SidebarItemNativeComponent.ts +25 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sidebar/SidebarNativeComponent.ts +29 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sidebar/index.tsx +115 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/specialized.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/swipe-actions/SwipeActionsNativeComponent.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/swipe-actions/index.tsx +41 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/text-input-search/TextInputSearchNativeComponent.ts +33 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/text-input-search/index.tsx +34 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/types.ts +39 -0
- package/vendor/node_modules/@legendapp/spark-ui/uniwind.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-ui/uniwind.web.ts +19 -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 +186 -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 +97 -0
- package/vendor/node_modules/@legendapp/spark-updates/macos/SparkUpdateState.h +39 -0
- package/vendor/node_modules/@legendapp/spark-updates/package.json +44 -0
- package/vendor/node_modules/@legendapp/spark-updates/src/NativeDesktopUpdates.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-updates/src/index.ts +115 -0
- package/vendor/node_modules/@legendapp/spark-webview/package.json +15 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/WebView.tsx +11 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/adapter.ts +55 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/index.ts +2 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/types.ts +32 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/view-props.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-window-options/index.cjs +62 -0
- package/vendor/node_modules/@legendapp/spark-window-options/index.d.ts +25 -0
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +12 -0
- package/webview.ts +1 -0
- package/windows-macos.ts +1 -0
- package/windows.ts +1 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { NativeEventEmitter, Platform } from "react-native";
|
|
2
|
+
import Native from "./NativeKeyboardManager";
|
|
3
|
+
import { SparkError, asyncRegistration, invokeNative, type AsyncRegistration, type Availability, type Subscription } from "@legendapp/spark-desktop-app/src/contracts";
|
|
4
|
+
export type { AsyncRegistration } from "@legendapp/spark-desktop-app/src/contracts";
|
|
5
|
+
export { KeyCodes, KeyText } from "./codes";
|
|
6
|
+
export type KeyboardEvent = Readonly<{ repeated: boolean; consumed: boolean; captured: boolean; windowId: string | null; key: string; keyCode: number; modifiers: number }>;
|
|
7
|
+
export type KeyboardEventListener = (event: KeyboardEvent) => void;
|
|
8
|
+
export type KeyboardListenerOptions = { windowIds?: readonly string[] };
|
|
9
|
+
type Entry = { type: "down" | "up"; listener: KeyboardEventListener; windowIds?: readonly string[] };
|
|
10
|
+
const entries = new Set<Entry>(), consumers = new Set<string>();
|
|
11
|
+
let sequence = 0;
|
|
12
|
+
let subscriptions: Subscription[] = [], monitoring = false, transitions = Promise.resolve();
|
|
13
|
+
export function getKeyboardAvailability(): Availability {
|
|
14
|
+
if (Platform.OS !== "macos") return { available: false, reason: "unsupported-platform" };
|
|
15
|
+
return Native ? { available: true } : { available: false, reason: "missing-module" };
|
|
16
|
+
}
|
|
17
|
+
function native() {
|
|
18
|
+
const availability = getKeyboardAvailability();
|
|
19
|
+
if (!availability.available) throw new SparkError(availability.reason === "missing-module" ? "E_MODULE_UNAVAILABLE" : "E_UNSUPPORTED_PLATFORM", "Low-level keyboard monitoring requires a macOS host");
|
|
20
|
+
return Native!;
|
|
21
|
+
}
|
|
22
|
+
function notify(type: Entry["type"], value: unknown) {
|
|
23
|
+
if (!value || typeof value !== "object") return;
|
|
24
|
+
const event = value as KeyboardEvent;
|
|
25
|
+
if (typeof event.key !== "string" || !Number.isInteger(event.keyCode) || !Number.isInteger(event.modifiers) || typeof event.repeated !== "boolean" || typeof event.consumed !== "boolean" || typeof event.captured !== "boolean" || !(event.windowId === null || typeof event.windowId === "string")) return;
|
|
26
|
+
for (const entry of entries) {
|
|
27
|
+
if (entry.type !== type || (entry.windowIds && !(event.windowId !== null && entry.windowIds.includes(event.windowId)))) continue;
|
|
28
|
+
try { entry.listener(event); } catch (cause) { console.error(new SparkError("E_NATIVE", "Keyboard listener failed", { cause })); }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function synchronize(): Promise<void> {
|
|
32
|
+
const pending = transitions.then(async () => {
|
|
33
|
+
if ((entries.size || consumers.size) && !monitoring) {
|
|
34
|
+
const module = native(), emitter = new NativeEventEmitter(module);
|
|
35
|
+
subscriptions = [emitter.addListener("onKeyDown", event => notify("down", event)), emitter.addListener("onKeyUp", event => notify("up", event))];
|
|
36
|
+
try {
|
|
37
|
+
const started = await invokeNative(() => module.startMonitoringKeyboard());
|
|
38
|
+
if (started !== true) throw new SparkError("E_INVALID_DATA", "Keyboard monitor did not start");
|
|
39
|
+
monitoring = true;
|
|
40
|
+
} catch (error) { for (const subscription of subscriptions) subscription.remove(); subscriptions = []; throw error; }
|
|
41
|
+
} else if (!entries.size && !consumers.size && monitoring) {
|
|
42
|
+
const stopped = await invokeNative(() => native().stopMonitoringKeyboard());
|
|
43
|
+
if (stopped !== true) throw new SparkError("E_INVALID_DATA", "Keyboard monitor did not stop");
|
|
44
|
+
monitoring = false;
|
|
45
|
+
for (const subscription of subscriptions) subscription.remove(); subscriptions = [];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
transitions = pending.catch(() => {}); return pending;
|
|
49
|
+
}
|
|
50
|
+
/** Nonblocking app-scoped observation. Return values never control native propagation. */
|
|
51
|
+
export async function addKeyboardListener(type: "down" | "up", listener: KeyboardEventListener, options: KeyboardListenerOptions = {}): Promise<AsyncRegistration> {
|
|
52
|
+
if ((type !== "down" && type !== "up") || typeof listener !== "function" || !options || typeof options !== "object" || Array.isArray(options)) throw new SparkError("E_INVALID_ARGUMENT", "Expected keyboard event type, listener and options");
|
|
53
|
+
for (const key of Object.keys(options)) if (key !== "windowIds") throw new SparkError("E_UNSUPPORTED_OPTION", `Unknown keyboard option: ${key}`);
|
|
54
|
+
if (options.windowIds !== undefined && (!Array.isArray(options.windowIds) || options.windowIds.some(id => typeof id !== "string" || !id))) throw new SparkError("E_INVALID_ARGUMENT", "Expected window IDs");
|
|
55
|
+
native();
|
|
56
|
+
const entry = { type, listener, windowIds: options.windowIds ? [...options.windowIds] : undefined };
|
|
57
|
+
entries.add(entry);
|
|
58
|
+
try { await synchronize(); } catch (error) { entries.delete(entry); throw error; }
|
|
59
|
+
return asyncRegistration(() => { entries.delete(entry); }, synchronize);
|
|
60
|
+
}
|
|
61
|
+
export function hasModifier(event: Pick<KeyboardEvent, "modifiers">, modifier: number): boolean { return (event.modifiers & modifier) === modifier; }
|
|
62
|
+
export function createModifierMask(...modifiers: number[]): number { return modifiers.reduce((mask, modifier) => mask | modifier, 0); }
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/** Internal compiled rules, shared by command routing and keyboard capture. */
|
|
66
|
+
export interface KeyboardConsumptionRule {
|
|
67
|
+
key: string; modifiers: number; allowExtraModifiers: boolean; repeat: boolean;
|
|
68
|
+
windowIds?: readonly string[]; excludedWindowIds?: readonly string[];
|
|
69
|
+
}
|
|
70
|
+
export interface KeyboardConsumption extends AsyncRegistration { update(rules: readonly KeyboardConsumptionRule[]): Promise<void> }
|
|
71
|
+
export async function createKeyboardConsumption(rules: readonly KeyboardConsumptionRule[], capture = false): Promise<KeyboardConsumption> {
|
|
72
|
+
const module = native(), id = `keyboard-${++sequence}`;
|
|
73
|
+
const publish = async (value: readonly KeyboardConsumptionRule[], capturing = capture) => {
|
|
74
|
+
const json = JSON.stringify(value);
|
|
75
|
+
const result = await invokeNative(() => module.setConsumption(id, json, capturing));
|
|
76
|
+
if (result !== true) throw new SparkError("E_INVALID_DATA", "Keyboard consumption update was not acknowledged");
|
|
77
|
+
};
|
|
78
|
+
consumers.add(id);
|
|
79
|
+
try { await synchronize(); await publish(rules); }
|
|
80
|
+
catch (error) {
|
|
81
|
+
consumers.delete(id);
|
|
82
|
+
try { await publish([], false); await synchronize(); }
|
|
83
|
+
catch (cleanupError) { throw new AggregateError([error, cleanupError], "Keyboard consumption setup and cleanup failed"); }
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
let closed = false, pending: Promise<unknown> = Promise.resolve();
|
|
87
|
+
const removal = asyncRegistration(() => { closed = true; }, async () => {
|
|
88
|
+
await pending.catch(() => {});
|
|
89
|
+
await publish([], false); consumers.delete(id); await synchronize();
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
remove: removal.remove,
|
|
93
|
+
update(value) {
|
|
94
|
+
if (closed) return Promise.reject(new SparkError("E_CLOSED", "Keyboard consumption has been removed"));
|
|
95
|
+
// Submit now: the module's main queue owns update ordering and snapshots.
|
|
96
|
+
const result = publish(value); pending = result; return result;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
3
|
+
Pod::Spec.new do |s|
|
|
4
|
+
s.name = "RNDesktopWindows"
|
|
5
|
+
s.version = package["version"]
|
|
6
|
+
s.summary = "Desktop desktop-windows"
|
|
7
|
+
s.license = { :type => "MIT" }
|
|
8
|
+
s.author = "Legend"
|
|
9
|
+
s.homepage = "https://legendapp.com"
|
|
10
|
+
s.source = { :path => "." }
|
|
11
|
+
s.platforms = { :osx => "14.0" }
|
|
12
|
+
s.source_files = "macos/**/*.{h,m,mm}"
|
|
13
|
+
# The in-app test driver compiles in Debug builds, and in other builds only for apps that set macos.testDriverInRelease
|
|
14
|
+
# (the Spark config plugin exports SPARK_TEST_DRIVER_RELEASE to the Podfile; docs/test-driver.md#builds).
|
|
15
|
+
s.pod_target_xcconfig = { "SPARK_TEST_DRIVER" => ENV["SPARK_TEST_DRIVER_RELEASE"] == "1" ? "1" : "0", "SPARK_TEST_DRIVER[config=Debug]" => "1", "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) SPARK_TEST_DRIVER=$(SPARK_TEST_DRIVER)" }
|
|
16
|
+
s.dependency "React-Core"
|
|
17
|
+
s.dependency "ReactCodegen"
|
|
18
|
+
s.dependency "RNDesktopApp"
|
|
19
|
+
s.dependency "React-RCTAppDelegate"
|
|
20
|
+
s.osx.frameworks = "AppKit", "CoreImage", "QuartzCore"
|
|
21
|
+
s.dependency "React-cxxreact"
|
|
22
|
+
end
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
#import "RNDesktopWindows.h"
|
|
2
|
+
#import "window-manager/LegendWindowRegistry.h"
|
|
3
|
+
#import "SparkWindowGeometry.h"
|
|
4
|
+
#import <objc/runtime.h>
|
|
5
|
+
#import <RNDesktopApp/SparkDesktop.h>
|
|
6
|
+
#import <RNDesktopApp/SparkTestDriver.h>
|
|
7
|
+
#import <React-RCTAppDelegate/RCTRootViewFactory.h>
|
|
8
|
+
#import <React/RCTSurfaceHostingView.h>
|
|
9
|
+
|
|
10
|
+
static void Show(NSWindow *window) {
|
|
11
|
+
if ([window isKindOfClass:NSPanel.class] && (window.styleMask & NSWindowStyleMaskNonactivatingPanel)) [window orderFrontRegardless];
|
|
12
|
+
else [window makeKeyAndOrderFront:nil];
|
|
13
|
+
}
|
|
14
|
+
@interface SparkWindowDelegate : NSObject <NSWindowDelegate>
|
|
15
|
+
@property NSString *windowID;
|
|
16
|
+
@property (nonatomic, weak) NSWindow *window;
|
|
17
|
+
@property (nonatomic, weak) id<NSWindowDelegate> previousDelegate;
|
|
18
|
+
@property BOOL guarded;
|
|
19
|
+
@property BOOL allowingClose;
|
|
20
|
+
@property NSUInteger request;
|
|
21
|
+
@property BOOL pending;
|
|
22
|
+
@property NSString *instanceId;
|
|
23
|
+
@property NSString *guardId;
|
|
24
|
+
@property NSMutableArray *closeWaiters;
|
|
25
|
+
@property NSMutableArray *fullscreenWaiters;
|
|
26
|
+
@property NSNumber *fullscreenTarget;
|
|
27
|
+
@property BOOL restoreBounds;
|
|
28
|
+
- (void)finishClose:(BOOL)closed;
|
|
29
|
+
- (void)finishFullscreen:(BOOL)success;
|
|
30
|
+
|
|
31
|
+
- (void)requestClose;
|
|
32
|
+
@end
|
|
33
|
+
static NSMutableDictionary<NSString *, NSWindow *> *windows;
|
|
34
|
+
static NSMutableDictionary<NSString *, SparkWindowDelegate *> *delegates;
|
|
35
|
+
static NSWindow *Window(NSString *key) {
|
|
36
|
+
if (!windows) windows = LegendWindowRegistry.sharedRegistry.windows;
|
|
37
|
+
NSWindow *window = windows[key];
|
|
38
|
+
if (!window && [key isEqual:@"main"]) {
|
|
39
|
+
for (NSWindow *candidate in NSApp.windows) {
|
|
40
|
+
if ([candidate.identifier isEqual:@"spark.main"]) { window = candidate; break; }
|
|
41
|
+
}
|
|
42
|
+
if (window) windows[key] = window;
|
|
43
|
+
}
|
|
44
|
+
return window;
|
|
45
|
+
}
|
|
46
|
+
static void Event(NSString *type, NSString *key) {
|
|
47
|
+
NSWindow *window = Window(key);
|
|
48
|
+
NSMutableDictionary *event = [@{ @"type": type, @"windowId": key, @"instanceId": delegates[key].instanceId ?: @"" } mutableCopy];
|
|
49
|
+
if ([type isEqual:@"move"] || [type isEqual:@"resize"] || [type isEqual:@"screenChanged"]) {
|
|
50
|
+
event[@"type"] = @"boundsChanged"; event[@"bounds"] = SparkBoundsForWindow(window);
|
|
51
|
+
if (delegates[key].restoreBounds && !window.miniaturized && !(window.styleMask & NSWindowStyleMaskFullScreen)) {
|
|
52
|
+
NSScreen *screen = SparkOwningScreen(window.frame);
|
|
53
|
+
[NSUserDefaults.standardUserDefaults setObject:@{ @"version": @1, @"bounds": event[@"bounds"], @"persistentId": SparkPersistentScreenId(screen) ?: @"" }
|
|
54
|
+
forKey:[NSString stringWithFormat:@"%@.bounds.%@", SparkNamespace(), key]];
|
|
55
|
+
}
|
|
56
|
+
} else if ([type isEqual:@"focus"] || [type isEqual:@"blur"]) { event[@"type"] = @"focusChanged"; event[@"focused"] = @([type isEqual:@"focus"]); }
|
|
57
|
+
else if ([type isEqual:@"enterFullscreen"] || [type isEqual:@"leaveFullscreen"]) { event[@"type"] = @"fullscreenChanged"; event[@"fullscreen"] = @([type isEqual:@"enterFullscreen"]); }
|
|
58
|
+
else if ([type isEqual:@"visibilityChanged"]) event[@"visible"] = @(window.visible && !NSApp.hidden);
|
|
59
|
+
SparkEmit(event);
|
|
60
|
+
}
|
|
61
|
+
@implementation SparkWindowDelegate
|
|
62
|
+
- (void)finishClose:(BOOL)closed {
|
|
63
|
+
NSArray *waiters = [self.closeWaiters copy]; [self.closeWaiters removeAllObjects];
|
|
64
|
+
for (RCTPromiseResolveBlock waiter in waiters) waiter(closed ? @"{\"closed\":true}" : @"{\"closed\":false,\"reason\":\"vetoed\"}");
|
|
65
|
+
}
|
|
66
|
+
- (void)finishFullscreen:(BOOL)success {
|
|
67
|
+
NSArray *waiters = [self.fullscreenWaiters copy]; [self.fullscreenWaiters removeAllObjects]; self.fullscreenTarget = nil;
|
|
68
|
+
for (NSDictionary *waiter in waiters) {
|
|
69
|
+
if (success) ((RCTPromiseResolveBlock)waiter[@"resolve"])(@"null");
|
|
70
|
+
else ((RCTPromiseRejectBlock)waiter[@"reject"])(@"E_NATIVE", @"Fullscreen transition failed", nil);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
- (BOOL)respondsToSelector:(SEL)selector { return [super respondsToSelector:selector] || [self.previousDelegate respondsToSelector:selector]; }
|
|
75
|
+
- (id)forwardingTargetForSelector:(SEL)selector { return [self.previousDelegate respondsToSelector:selector] ? self.previousDelegate : [super forwardingTargetForSelector:selector]; }
|
|
76
|
+
- (void)requestClose {
|
|
77
|
+
if (self.pending) return;
|
|
78
|
+
self.pending = YES; NSUInteger request = ++self.request;
|
|
79
|
+
SparkEmit(@{ @"type": @"beforeClose", @"windowId": self.windowID, @"instanceId": self.instanceId, @"guardId": self.guardId ?: @"", @"requestId": @(request) });
|
|
80
|
+
__weak SparkWindowDelegate *weakSelf = self;
|
|
81
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 30 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
|
82
|
+
SparkWindowDelegate *delegate = weakSelf;
|
|
83
|
+
if (delegate.pending && delegate.request == request) { delegate.pending = NO; [delegate finishClose:NO]; SparkEmit(@{ @"type": @"closeGuardTimeout", @"windowId": delegate.windowID, @"instanceId": delegate.instanceId, @"guardId": delegate.guardId ?: @"" }); }
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
- (BOOL)windowShouldClose:(NSWindow *)sender {
|
|
87
|
+
if (self.guarded && !self.allowingClose) { [self requestClose]; return NO; }
|
|
88
|
+
return [self.previousDelegate respondsToSelector:@selector(windowShouldClose:)] ? [self.previousDelegate windowShouldClose:sender] : YES;
|
|
89
|
+
}
|
|
90
|
+
- (void)windowWillClose:(NSNotification *)note {
|
|
91
|
+
[self finishClose:YES]; [self finishFullscreen:NO];
|
|
92
|
+
BOOL managed = LegendWindowRegistry.sharedRegistry.moduleNames[self.windowID] != nil;
|
|
93
|
+
if ([self.previousDelegate respondsToSelector:@selector(windowWillClose:)]) [self.previousDelegate windowWillClose:note];
|
|
94
|
+
NSWindow *closing = note.object;
|
|
95
|
+
if (closing.sheetParent) [closing.sheetParent endSheet:closing];
|
|
96
|
+
if (closing.parentWindow) [closing.parentWindow removeChildWindow:closing];
|
|
97
|
+
Event(@"closed", self.windowID);
|
|
98
|
+
if (![self.windowID isEqual:@"main"] && !managed) {
|
|
99
|
+
NSWindow *window = note.object;
|
|
100
|
+
NSView *root = [window.contentView isKindOfClass:NSVisualEffectView.class] ? window.contentView.subviews.firstObject : window.contentView;
|
|
101
|
+
if ([root isKindOfClass:RCTSurfaceHostingView.class]) [((RCTSurfaceHostingView *)root).surface stop];
|
|
102
|
+
[root removeFromSuperview];
|
|
103
|
+
window.contentView = [[NSView alloc] initWithFrame:root.frame];
|
|
104
|
+
[windows removeObjectForKey:self.windowID];
|
|
105
|
+
[LegendWindowRegistry.sharedRegistry.rootViews removeObjectForKey:self.windowID];
|
|
106
|
+
}
|
|
107
|
+
[windows removeObjectForKey:self.windowID];
|
|
108
|
+
{
|
|
109
|
+
// Retain the proxy until its delegate callback returns.
|
|
110
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
111
|
+
if (delegates[self.windowID] == self) [delegates removeObjectForKey:self.windowID];
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
- (void)windowDidMove:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:@selector(windowDidMove:)]) [self.previousDelegate windowDidMove:note]; Event(@"move", self.windowID); }
|
|
116
|
+
- (void)windowDidResize:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:@selector(windowDidResize:)]) [self.previousDelegate windowDidResize:note]; Event(@"resize", self.windowID); }
|
|
117
|
+
- (void)windowDidChangeScreen:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:@selector(windowDidChangeScreen:)]) [self.previousDelegate windowDidChangeScreen:note]; Event(@"screenChanged", self.windowID); }
|
|
118
|
+
- (void)windowDidEnterFullScreen:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:@selector(windowDidEnterFullScreen:)]) [self.previousDelegate windowDidEnterFullScreen:note]; Event(@"enterFullscreen", self.windowID); [self finishFullscreen:YES]; }
|
|
119
|
+
- (void)windowDidExitFullScreen:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:@selector(windowDidExitFullScreen:)]) [self.previousDelegate windowDidExitFullScreen:note]; Event(@"leaveFullscreen", self.windowID); [self finishFullscreen:YES]; }
|
|
120
|
+
- (void)windowDidFailToEnterFullScreen:(NSWindow *)window { [self finishFullscreen:NO]; }
|
|
121
|
+
- (void)windowDidFailToExitFullScreen:(NSWindow *)window { [self finishFullscreen:NO]; }
|
|
122
|
+
- (void)windowDidMiniaturize:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:_cmd]) [self.previousDelegate windowDidMiniaturize:note]; Event(@"visibilityChanged", self.windowID); }
|
|
123
|
+
- (void)windowDidDeminiaturize:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:_cmd]) [self.previousDelegate windowDidDeminiaturize:note]; Event(@"visibilityChanged", self.windowID); }
|
|
124
|
+
- (void)windowDidBecomeKey:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:@selector(windowDidBecomeKey:)]) [self.previousDelegate windowDidBecomeKey:note]; Event(@"focus", self.windowID); }
|
|
125
|
+
- (void)windowDidResignKey:(NSNotification *)note { if ([self.previousDelegate respondsToSelector:@selector(windowDidResignKey:)]) [self.previousDelegate windowDidResignKey:note]; Event(@"blur", self.windowID); }
|
|
126
|
+
@end
|
|
127
|
+
static void InstallDelegate(NSWindow *window, NSString *key) {
|
|
128
|
+
if (!delegates) delegates = [NSMutableDictionary new];
|
|
129
|
+
if (delegates[key] && delegates[key].window == window) return;
|
|
130
|
+
SparkWindowDelegate *delegate = [SparkWindowDelegate new];
|
|
131
|
+
delegate.window = window; delegate.windowID = key; delegate.instanceId = objc_getAssociatedObject(window, NSSelectorFromString(@"sparkWindowInstanceId")) ?: NSUUID.UUID.UUIDString;
|
|
132
|
+
objc_setAssociatedObject(window, NSSelectorFromString(@"sparkWindowInstanceId"), delegate.instanceId, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
133
|
+
delegate.closeWaiters = [NSMutableArray new]; delegate.fullscreenWaiters = [NSMutableArray new];
|
|
134
|
+
delegates[key] = delegate;
|
|
135
|
+
delegate.previousDelegate = window.delegate;
|
|
136
|
+
window.delegate = delegate;
|
|
137
|
+
}
|
|
138
|
+
extern "C" void SparkRebindWindowDelegate(NSWindow *window, NSString *key, id<NSWindowDelegate> delegate) {
|
|
139
|
+
SparkWindowDelegate *guard = delegates[key];
|
|
140
|
+
if (guard && guard.window == window) { guard.previousDelegate = delegate; window.delegate = guard; }
|
|
141
|
+
else window.delegate = delegate;
|
|
142
|
+
}
|
|
143
|
+
static void RequestClose(NSWindow *window, NSString *key) {
|
|
144
|
+
SparkWindowDelegate *delegate = delegates[key];
|
|
145
|
+
if (delegate.guarded && !delegate.allowingClose) { [delegate requestClose]; return; }
|
|
146
|
+
BOOL allow = ![delegate.previousDelegate respondsToSelector:@selector(windowShouldClose:)] || [delegate.previousDelegate windowShouldClose:window];
|
|
147
|
+
if (!allow) { [delegate finishClose:NO]; return; }
|
|
148
|
+
if (window.sheetParent) [window.sheetParent endSheet:window];
|
|
149
|
+
[window close];
|
|
150
|
+
}
|
|
151
|
+
static NSDictionary *Info(NSString *key, NSWindow *window) {
|
|
152
|
+
InstallDelegate(window, key);
|
|
153
|
+
NSDictionary *opening = objc_getAssociatedObject(window, @selector(call:args:resolve:reject:));
|
|
154
|
+
NSString *parentId = opening[@"parentId"];
|
|
155
|
+
NSWindow *parent = window.sheetParent ?: window.parentWindow;
|
|
156
|
+
for (NSString *candidate in windows) if (windows[candidate] == parent) { parentId = candidate; break; }
|
|
157
|
+
return @{ @"id": key, @"instanceId": delegates[key].instanceId, @"kind": opening[@"kind"] ?: @"window",
|
|
158
|
+
@"title": window.title, @"parentId": parentId ?: NSNull.null, @"modal": @([opening[@"modal"] boolValue]), @"visible": @(window.visible && !NSApp.hidden), @"focused": @(window.keyWindow),
|
|
159
|
+
@"minimized": @(window.miniaturized), @"maximized": @(window.zoomed), @"fullscreen": @((window.styleMask & NSWindowStyleMaskFullScreen) != 0), @"bounds": SparkBoundsForWindow(window) };
|
|
160
|
+
}
|
|
161
|
+
static BOOL ApplyCommon(NSWindow *window, NSDictionary *options, RCTPromiseRejectBlock reject) {
|
|
162
|
+
NSSize minimum = options[@"minSize"] ? (options[@"minSize"] == NSNull.null ? NSMakeSize(100, 100) : NSMakeSize([options[@"minSize"][@"width"] doubleValue], [options[@"minSize"][@"height"] doubleValue])) : window.minSize;
|
|
163
|
+
NSSize maximum = options[@"maxSize"] ? (options[@"maxSize"] == NSNull.null ? NSMakeSize(20000, 20000) : NSMakeSize([options[@"maxSize"][@"width"] doubleValue], [options[@"maxSize"][@"height"] doubleValue])) : window.maxSize;
|
|
164
|
+
if (minimum.width > maximum.width || minimum.height > maximum.height) { reject(@"E_INVALID_ARGUMENT", @"Conflicting window constraints", nil); return NO; }
|
|
165
|
+
if (options[@"title"]) window.title = options[@"title"];
|
|
166
|
+
if (options[@"appearance"]) {
|
|
167
|
+
NSString *appearance = options[@"appearance"];
|
|
168
|
+
window.appearance = [appearance isEqual:@"dark"] ? [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua] : [appearance isEqual:@"light"] ? [NSAppearance appearanceNamed:NSAppearanceNameAqua] : nil;
|
|
169
|
+
}
|
|
170
|
+
NSWindowStyleMask mask = window.styleMask;
|
|
171
|
+
if (options[@"titleBarStyle"]) {
|
|
172
|
+
NSString *style = options[@"titleBarStyle"];
|
|
173
|
+
mask &= ~(NSWindowStyleMaskTitled | NSWindowStyleMaskFullSizeContentView);
|
|
174
|
+
if (![style isEqual:@"borderless"]) mask |= NSWindowStyleMaskTitled;
|
|
175
|
+
if ([style isEqual:@"overlay"] || [style isEqual:@"hidden"]) mask |= NSWindowStyleMaskFullSizeContentView;
|
|
176
|
+
window.titlebarAppearsTransparent = ![style isEqual:@"default"];
|
|
177
|
+
window.titleVisibility = [style isEqual:@"default"] ? NSWindowTitleVisible : NSWindowTitleHidden;
|
|
178
|
+
}
|
|
179
|
+
for (NSString *key in @[@"resizable", @"closable", @"minimizable"]) if (options[key]) {
|
|
180
|
+
NSWindowStyleMask bit = [key isEqual:@"resizable"] ? NSWindowStyleMaskResizable : [key isEqual:@"closable"] ? NSWindowStyleMaskClosable : NSWindowStyleMaskMiniaturizable;
|
|
181
|
+
mask = [options[key] boolValue] ? mask | bit : mask & ~bit;
|
|
182
|
+
}
|
|
183
|
+
window.styleMask = mask;
|
|
184
|
+
if (options[@"titleBarStyle"]) for (NSNumber *button in @[@(NSWindowCloseButton), @(NSWindowMiniaturizeButton), @(NSWindowZoomButton)]) [window standardWindowButton:(NSWindowButton)button.integerValue].hidden = [options[@"titleBarStyle"] isEqual:@"hidden"];
|
|
185
|
+
if (options[@"alwaysOnTop"]) window.level = [options[@"alwaysOnTop"] boolValue] ? NSFloatingWindowLevel : NSNormalWindowLevel;
|
|
186
|
+
if (options[@"hasShadow"]) window.hasShadow = [options[@"hasShadow"] boolValue];
|
|
187
|
+
if (options[@"transparent"]) { window.opaque = ![options[@"transparent"] boolValue]; window.backgroundColor = window.opaque ? NSColor.windowBackgroundColor : NSColor.clearColor; }
|
|
188
|
+
if (options[@"backgroundColor"]) {
|
|
189
|
+
NSString *color = options[@"backgroundColor"]; unsigned long long rgba = 0;
|
|
190
|
+
[[NSScanner scannerWithString:[color substringFromIndex:1]] scanHexLongLong:&rgba]; if (color.length == 7) rgba = (rgba << 8) | 255;
|
|
191
|
+
window.backgroundColor = [NSColor colorWithSRGBRed:((rgba >> 24) & 255) / 255.0 green:((rgba >> 16) & 255) / 255.0 blue:((rgba >> 8) & 255) / 255.0 alpha:(rgba & 255) / 255.0];
|
|
192
|
+
window.opaque = (rgba & 255) == 255;
|
|
193
|
+
}
|
|
194
|
+
window.minSize = minimum; window.maxSize = maximum;
|
|
195
|
+
NSRect frame = window.frame;
|
|
196
|
+
frame.size.width = MIN(MAX(frame.size.width, minimum.width), maximum.width);
|
|
197
|
+
frame.size.height = MIN(MAX(frame.size.height, minimum.height), maximum.height);
|
|
198
|
+
[window setFrame:frame display:YES];
|
|
199
|
+
return YES;
|
|
200
|
+
}
|
|
201
|
+
static BOOL SetBounds(NSWindow *window, NSDictionary *bounds, double durationMs, RCTPromiseResolveBlock resolve, RCTPromiseRejectBlock reject) {
|
|
202
|
+
NSScreen *screen = SparkScreenWithId(bounds[@"displayId"]);
|
|
203
|
+
if (!screen) { reject(@"E_NOT_FOUND", @"Display is disconnected", nil); return NO; }
|
|
204
|
+
NSRect frame = SparkAppKitFrame(bounds, screen.frame);
|
|
205
|
+
if (frame.size.width < window.minSize.width || frame.size.height < window.minSize.height || frame.size.width > window.maxSize.width || frame.size.height > window.maxSize.height) { reject(@"E_INVALID_ARGUMENT", @"Bounds are outside window constraints", nil); return NO; }
|
|
206
|
+
if (durationMs > 0) [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { context.duration = durationMs / 1000.0; [[window animator] setFrame:frame display:YES]; } completionHandler:^{ resolve(@"null"); }];
|
|
207
|
+
else { [window setFrame:frame display:YES]; resolve(@"null"); }
|
|
208
|
+
return YES;
|
|
209
|
+
}
|
|
210
|
+
@implementation RNDesktopWindows
|
|
211
|
+
RCT_EXPORT_MODULE(NativeDesktopWindowManager)
|
|
212
|
+
- (instancetype)init {
|
|
213
|
+
if ((self = [super init])) {
|
|
214
|
+
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(applicationVisibilityChanged:) name:NSApplicationDidHideNotification object:nil];
|
|
215
|
+
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(applicationVisibilityChanged:) name:NSApplicationDidUnhideNotification object:nil];
|
|
216
|
+
}
|
|
217
|
+
return self;
|
|
218
|
+
}
|
|
219
|
+
- (void)applicationVisibilityChanged:(NSNotification *)notification {
|
|
220
|
+
for (NSString *key in windows.allKeys) Event(@"visibilityChanged", key);
|
|
221
|
+
}
|
|
222
|
+
+ (BOOL)requiresMainQueueSetup { return YES; }
|
|
223
|
+
- (void)call:(NSString *)method args:(NSString *)json resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
224
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
225
|
+
NSDictionary *args = SparkArgs(json);
|
|
226
|
+
NSString *key = [args[@"id"] isKindOfClass:NSString.class] ? args[@"id"] : @"main";
|
|
227
|
+
NSWindow *main = Window(@"main");
|
|
228
|
+
if (main) InstallDelegate(main, @"main");
|
|
229
|
+
if ([method isEqual:@"displays"]) { resolve(SparkJSON(SparkDisplayInfo())); return; }
|
|
230
|
+
if ([method isEqual:@"cursorPoint"]) {
|
|
231
|
+
resolve(SparkJSON(SparkCursorPoint()));
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if ([method isEqual:@"list"]) {
|
|
235
|
+
NSMutableArray *result = [NSMutableArray new];
|
|
236
|
+
for (NSString *windowID in windows) [result addObject:Info(windowID, windows[windowID])];
|
|
237
|
+
resolve(SparkJSON(result)); return;
|
|
238
|
+
}
|
|
239
|
+
NSWindow *window = Window(key);
|
|
240
|
+
if (!window) { reject(@"E_NOT_FOUND", @"Window does not exist", nil); return; }
|
|
241
|
+
InstallDelegate(window, key);
|
|
242
|
+
SparkWindowDelegate *delegate = delegates[key];
|
|
243
|
+
if (args[@"instanceId"] && ![args[@"instanceId"] isEqual:delegate.instanceId]) { reject(@"E_NOT_FOUND", @"Window instance has closed", nil); return; }
|
|
244
|
+
if ([method isEqual:@"info"] || [method isEqual:@"observe"]) { resolve(SparkJSON(Info(key, window))); return; }
|
|
245
|
+
if ([method isEqual:@"completeOpen"]) {
|
|
246
|
+
NSWindow *parent = args[@"parentId"] ? Window(args[@"parentId"]) : nil;
|
|
247
|
+
if (args[@"parentId"] && !parent) { reject(@"E_NOT_FOUND", @"Parent window not found", nil); return; }
|
|
248
|
+
if ([args[@"modal"] boolValue] && parent.attachedSheet) { reject(@"E_BUSY", @"Parent already has a sheet", nil); return; }
|
|
249
|
+
window.minSize = NSMakeSize(100, 100); window.maxSize = NSMakeSize(20000, 20000);
|
|
250
|
+
if (!ApplyCommon(window, args, reject)) return;
|
|
251
|
+
// Safe and driver modes neither read nor save bounds.
|
|
252
|
+
BOOL restoreBounds = [args[@"restoreBounds"] boolValue] && !SparkSafeMode() && !SparkTestDriverActive();
|
|
253
|
+
NSDictionary *saved = restoreBounds ? [NSUserDefaults.standardUserDefaults dictionaryForKey:[NSString stringWithFormat:@"%@.bounds.%@", SparkNamespace(), key]] : nil;
|
|
254
|
+
if (![saved[@"version"] isEqual:@1]) saved = nil;
|
|
255
|
+
BOOL restoredShell = [objc_getAssociatedObject(window, NSSelectorFromString(@"sparkRestoredShell")) boolValue];
|
|
256
|
+
if (!saved && restoredShell) {
|
|
257
|
+
NSScreen *restoredScreen = SparkOwningScreen(window.frame);
|
|
258
|
+
saved = @{ @"bounds": SparkLogicalBounds(window.frame, restoredScreen.frame, SparkScreenId(restoredScreen)), @"persistentId": SparkPersistentScreenId(restoredScreen) ?: @"" };
|
|
259
|
+
}
|
|
260
|
+
NSScreen *screen = args[@"position"] ? SparkScreenWithId(args[@"position"][@"displayId"]) : nil;
|
|
261
|
+
if (args[@"position"] && !screen) { reject(@"E_NOT_FOUND", @"Display is disconnected", nil); return; }
|
|
262
|
+
if (!screen && saved) for (NSScreen *candidate in NSScreen.screens) if ([SparkPersistentScreenId(candidate) isEqual:saved[@"persistentId"]]) { screen = candidate; break; }
|
|
263
|
+
if (!screen) screen = parent ? SparkOwningScreen(parent.frame) : SparkPrimaryScreen();
|
|
264
|
+
NSDictionary *size = args[@"size"] ?: saved[@"bounds"];
|
|
265
|
+
CGFloat width = size ? [size[@"width"] doubleValue] : 640, height = size ? [size[@"height"] doubleValue] : 480;
|
|
266
|
+
width = MIN(MAX(width, window.minSize.width), window.maxSize.width); height = MIN(MAX(height, window.minSize.height), window.maxSize.height);
|
|
267
|
+
NSRect frame = NSMakeRect(NSMidX(screen.visibleFrame) - width / 2, NSMidY(screen.visibleFrame) - height / 2, width, height);
|
|
268
|
+
if (args[@"position"] || saved) {
|
|
269
|
+
NSMutableDictionary *bounds = [(args[@"position"] ?: saved[@"bounds"]) mutableCopy]; bounds[@"width"] = @(width); bounds[@"height"] = @(height);
|
|
270
|
+
frame = SparkAppKitFrame(bounds, screen.frame);
|
|
271
|
+
if (!args[@"position"]) frame = [window constrainFrameRect:frame toScreen:screen];
|
|
272
|
+
}
|
|
273
|
+
[window setFrame:frame display:NO]; delegate.restoreBounds = restoreBounds;
|
|
274
|
+
if (parent && ![args[@"modal"] boolValue]) [parent addChildWindow:window ordered:NSWindowAbove];
|
|
275
|
+
objc_setAssociatedObject(window, @selector(call:args:resolve:reject:), [args copy], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
276
|
+
if (![args[@"show"] isEqual:@NO]) {
|
|
277
|
+
if ([args[@"modal"] boolValue]) [parent beginSheet:window completionHandler:nil]; else Show(window);
|
|
278
|
+
} else [window orderOut:nil];
|
|
279
|
+
Event(@"opened", key); Event(@"visibilityChanged", key); resolve(SparkJSON(Info(key, window))); return;
|
|
280
|
+
}
|
|
281
|
+
if ([method isEqual:@"discard"]) { delegate.guarded = NO; [window close]; return resolve(@"null"); }
|
|
282
|
+
if ([method isEqual:@"close"]) { [delegate.closeWaiters addObject:[resolve copy]]; RequestClose(window, key); return; }
|
|
283
|
+
if ([method isEqual:@"closeGuard"]) {
|
|
284
|
+
BOOL enable = [args[@"enabled"] boolValue];
|
|
285
|
+
if (enable && delegate.guarded && ![delegate.guardId isEqual:args[@"guardId"]]) { reject(@"E_BUSY", @"Window already has a close guard", nil); return; }
|
|
286
|
+
if (!enable && ![delegate.guardId isEqual:args[@"guardId"]]) return resolve(@"null");
|
|
287
|
+
delegate.guarded = enable; delegate.guardId = enable ? args[@"guardId"] : nil; delegate.pending = NO; delegate.request++; [delegate finishClose:NO];
|
|
288
|
+
} else if ([method isEqual:@"replyClose"]) {
|
|
289
|
+
if (delegate.pending && delegate.request == [args[@"requestId"] unsignedIntegerValue] && [delegate.guardId isEqual:args[@"guardId"]]) {
|
|
290
|
+
delegate.pending = NO;
|
|
291
|
+
if ([args[@"allow"] boolValue]) { delegate.allowingClose = YES; RequestClose(window, key); delegate.allowingClose = NO; }
|
|
292
|
+
else [delegate finishClose:NO];
|
|
293
|
+
}
|
|
294
|
+
} else if ([method isEqual:@"show"]) {
|
|
295
|
+
[window deminiaturize:nil]; NSDictionary *opening = objc_getAssociatedObject(window, @selector(call:args:resolve:reject:));
|
|
296
|
+
if ([opening[@"modal"] boolValue] && !window.sheetParent) {
|
|
297
|
+
NSWindow *parent = Window(opening[@"parentId"]);
|
|
298
|
+
if (!parent) { reject(@"E_NOT_FOUND", @"Parent window has closed", nil); return; }
|
|
299
|
+
if (parent.attachedSheet) { reject(@"E_BUSY", @"Parent already has a sheet", nil); return; }
|
|
300
|
+
[parent beginSheet:window completionHandler:nil];
|
|
301
|
+
} else if ([args[@"focus"] isEqual:@NO]) [window orderFront:nil]; else Show(window);
|
|
302
|
+
Event(@"visibilityChanged", key);
|
|
303
|
+
} else if ([method isEqual:@"options"]) { if (!ApplyCommon(window, args[@"options"], reject)) return; }
|
|
304
|
+
else if ([method isEqual:@"maximize"]) { if (!window.zoomed) [window zoom:nil]; }
|
|
305
|
+
else if ([method isEqual:@"unmaximize"]) { if (window.zoomed) [window zoom:nil]; }
|
|
306
|
+
else if ([method isEqual:@"center"]) {
|
|
307
|
+
NSScreen *screen = args[@"displayId"] ? SparkScreenWithId(args[@"displayId"]) : SparkOwningScreen(window.frame);
|
|
308
|
+
if (!screen) { reject(@"E_NOT_FOUND", @"Display is disconnected", nil); return; }
|
|
309
|
+
NSRect frame = window.frame; frame.origin = NSMakePoint(NSMidX(screen.visibleFrame) - NSWidth(frame)/2, NSMidY(screen.visibleFrame) - NSHeight(frame)/2); [window setFrame:frame display:YES];
|
|
310
|
+
} else if ([method isEqual:@"hide"]) {
|
|
311
|
+
if (window.sheetParent) [window.sheetParent endSheet:window]; [window orderOut:nil]; Event(@"visibilityChanged", key);
|
|
312
|
+
} else if ([method isEqual:@"minimize"]) [window miniaturize:nil];
|
|
313
|
+
else if ([method isEqual:@"fullscreen"]) {
|
|
314
|
+
BOOL target = [args[@"enabled"] boolValue];
|
|
315
|
+
if (delegate.fullscreenTarget && delegate.fullscreenTarget.boolValue != target) { reject(@"E_BUSY", @"Another fullscreen transition is pending", nil); return; }
|
|
316
|
+
if (delegate.fullscreenTarget || ((window.styleMask & NSWindowStyleMaskFullScreen) != 0) != target) {
|
|
317
|
+
[delegate.fullscreenWaiters addObject:@{ @"resolve": [resolve copy], @"reject": [reject copy] }];
|
|
318
|
+
if (!delegate.fullscreenTarget) { delegate.fullscreenTarget = @(target); [window toggleFullScreen:nil]; }
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
} else if ([method isEqual:@"bounds"]) { SetBounds(window, args[@"bounds"], [args[@"durationMs"] doubleValue], resolve, reject); return; }
|
|
322
|
+
else { SparkInvalid(reject, @"Unknown window operation"); return; }
|
|
323
|
+
resolve(@"null");
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
- (void)invalidate {
|
|
327
|
+
[NSNotificationCenter.defaultCenter removeObserver:self];
|
|
328
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
329
|
+
// Windows and Fabric surfaces belong to the application. Retire only guards
|
|
330
|
+
// whose JavaScript handlers went away; the next runtime may register again.
|
|
331
|
+
for (SparkWindowDelegate *delegate in delegates.allValues) {
|
|
332
|
+
delegate.guarded = NO; delegate.pending = NO; delegate.request++; [delegate finishClose:NO]; [delegate finishFullscreen:NO];
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
337
|
+
return std::make_shared<facebook::react::NativeDesktopWindowManagerSpecJSI>(params);
|
|
338
|
+
}
|
|
339
|
+
@end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#import <AppKit/AppKit.h>
|
|
3
|
+
#import <CoreGraphics/CoreGraphics.h>
|
|
4
|
+
|
|
5
|
+
// AppKit screen frames are already logical units, with an upward-positive Y axis.
|
|
6
|
+
static inline NSDictionary *SparkLogicalBounds(NSRect frame, NSRect screen, NSString *displayId) {
|
|
7
|
+
return @{ @"displayId": displayId, @"x": @(NSMinX(frame) - NSMinX(screen)), @"y": @(NSMaxY(screen) - NSMaxY(frame)), @"width": @(NSWidth(frame)), @"height": @(NSHeight(frame)) };
|
|
8
|
+
}
|
|
9
|
+
static inline NSRect SparkAppKitFrame(NSDictionary *bounds, NSRect screen) {
|
|
10
|
+
const CGFloat height = [bounds[@"height"] doubleValue];
|
|
11
|
+
return NSMakeRect(NSMinX(screen) + [bounds[@"x"] doubleValue], NSMaxY(screen) - [bounds[@"y"] doubleValue] - height, [bounds[@"width"] doubleValue], height);
|
|
12
|
+
}
|
|
13
|
+
static inline NSString *SparkScreenId(NSScreen *screen) { return [screen.deviceDescription[@"NSScreenNumber"] stringValue]; }
|
|
14
|
+
static inline NSScreen *SparkPrimaryScreen(void) {
|
|
15
|
+
for (NSScreen *screen in NSScreen.screens) if ([screen.deviceDescription[@"NSScreenNumber"] unsignedIntValue] == CGMainDisplayID()) return screen;
|
|
16
|
+
return NSScreen.screens.firstObject;
|
|
17
|
+
}
|
|
18
|
+
static inline NSScreen *SparkScreenWithId(NSString *identifier) {
|
|
19
|
+
for (NSScreen *screen in NSScreen.screens) if ([SparkScreenId(screen) isEqual:identifier]) return screen;
|
|
20
|
+
return nil;
|
|
21
|
+
}
|
|
22
|
+
static inline NSScreen *SparkOwningScreen(NSRect frame) {
|
|
23
|
+
NSScreen *best = SparkPrimaryScreen(); CGFloat area = -1;
|
|
24
|
+
for (NSScreen *screen in NSScreen.screens) {
|
|
25
|
+
NSRect intersection = NSIntersectionRect(frame, screen.frame);
|
|
26
|
+
CGFloat next = NSWidth(intersection) * NSHeight(intersection);
|
|
27
|
+
if (next > area || (next == area && screen == SparkPrimaryScreen())) { best = screen; area = next; }
|
|
28
|
+
}
|
|
29
|
+
return best;
|
|
30
|
+
}
|
|
31
|
+
static inline NSDictionary *SparkBoundsForWindow(NSWindow *window) {
|
|
32
|
+
NSScreen *screen = SparkOwningScreen(window.frame);
|
|
33
|
+
return SparkLogicalBounds(window.frame, screen.frame, SparkScreenId(screen) ?: @"");
|
|
34
|
+
}
|
|
35
|
+
static inline NSString *SparkPersistentScreenId(NSScreen *screen) {
|
|
36
|
+
CFUUIDRef uuid = CGDisplayCreateUUIDFromDisplayID([screen.deviceDescription[@"NSScreenNumber"] unsignedIntValue]);
|
|
37
|
+
NSString *value = uuid ? CFBridgingRelease(CFUUIDCreateString(kCFAllocatorDefault, uuid)) : nil;
|
|
38
|
+
if (uuid) CFRelease(uuid);
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
// The pointer in Spark's coordinate vocabulary: the display containing the
|
|
42
|
+
// point, with display-relative logical units (top-left origin, Y downward).
|
|
43
|
+
static inline NSDictionary *SparkCursorPoint(void) {
|
|
44
|
+
NSPoint point = NSEvent.mouseLocation;
|
|
45
|
+
for (NSScreen *screen in NSScreen.screens) {
|
|
46
|
+
NSRect frame = screen.frame;
|
|
47
|
+
if (point.x >= NSMinX(frame) && point.x < NSMaxX(frame) && point.y >= NSMinY(frame) && point.y < NSMaxY(frame))
|
|
48
|
+
return @{ @"displayId": SparkScreenId(screen) ?: @"", @"x": @(point.x - NSMinX(frame)), @"y": @(NSMaxY(frame) - point.y) };
|
|
49
|
+
}
|
|
50
|
+
NSScreen *primary = SparkPrimaryScreen();
|
|
51
|
+
return @{ @"displayId": SparkScreenId(primary) ?: @"", @"x": @(point.x - NSMinX(primary.frame)), @"y": @(NSMaxY(primary.frame) - point.y) };
|
|
52
|
+
}
|
|
53
|
+
static inline NSArray<NSDictionary *> *SparkDisplayInfo(void) {
|
|
54
|
+
NSMutableArray *result = [NSMutableArray new];
|
|
55
|
+
for (NSScreen *screen in NSScreen.screens) {
|
|
56
|
+
NSMutableDictionary *workArea = [SparkLogicalBounds(screen.visibleFrame, screen.frame, SparkScreenId(screen)) mutableCopy];
|
|
57
|
+
[workArea removeObjectForKey:@"displayId"];
|
|
58
|
+
[result addObject:@{ @"id": SparkScreenId(screen), @"persistentId": SparkPersistentScreenId(screen) ?: NSNull.null,
|
|
59
|
+
@"name": screen.localizedName, @"primary": @(screen == SparkPrimaryScreen()),
|
|
60
|
+
@"size": @{ @"width": @(NSWidth(screen.frame)), @"height": @(NSHeight(screen.frame)) }, @"workArea": workArea, @"scaleFactor": @(screen.backingScaleFactor) }];
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#import <TargetConditionals.h>
|
|
2
|
+
#if TARGET_OS_OSX
|
|
3
|
+
#import <AppKit/AppKit.h>
|
|
4
|
+
#import <CoreImage/CoreImage.h>
|
|
5
|
+
|
|
6
|
+
// Windows and their React surfaces outlive an individual TurboModule on reload.
|
|
7
|
+
// Runtime-specific listeners and delegates remain owned by RNWindowManager.
|
|
8
|
+
@interface LegendWindowRegistry : NSObject
|
|
9
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, NSWindow *> *windows;
|
|
10
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, id> *rootViews;
|
|
11
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, NSString *> *moduleNames;
|
|
12
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, NSArray<NSTitlebarAccessoryViewController *> *> *titlebarAccessoryControllers;
|
|
13
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, NSView *> *titlebarMaterialViews;
|
|
14
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, NSArray<NSDictionary *> *> *toolbarItemConfigs;
|
|
15
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, CIFilter *> *windowBlurFilters;
|
|
16
|
+
@property (nonatomic, readonly) NSMutableDictionary<NSString *, NSDictionary *> *windowOptions;
|
|
17
|
+
@property (nonatomic, readonly) NSMutableSet<NSString *> *closeRequestIdentifiers;
|
|
18
|
+
+ (instancetype)sharedRegistry;
|
|
19
|
+
@end
|
|
20
|
+
#endif
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#import "LegendWindowRegistry.h"
|
|
2
|
+
#if TARGET_OS_OSX
|
|
3
|
+
@implementation LegendWindowRegistry
|
|
4
|
+
+ (instancetype)sharedRegistry
|
|
5
|
+
{
|
|
6
|
+
static LegendWindowRegistry *registry;
|
|
7
|
+
static dispatch_once_t once;
|
|
8
|
+
dispatch_once(&once, ^{ registry = [self new]; });
|
|
9
|
+
return registry;
|
|
10
|
+
}
|
|
11
|
+
- (instancetype)init
|
|
12
|
+
{
|
|
13
|
+
if (self = [super init]) {
|
|
14
|
+
_windows = [NSMutableDictionary new];
|
|
15
|
+
_rootViews = [NSMutableDictionary new];
|
|
16
|
+
_moduleNames = [NSMutableDictionary new];
|
|
17
|
+
_titlebarAccessoryControllers = [NSMutableDictionary new];
|
|
18
|
+
_titlebarMaterialViews = [NSMutableDictionary new];
|
|
19
|
+
_toolbarItemConfigs = [NSMutableDictionary new];
|
|
20
|
+
_windowBlurFilters = [NSMutableDictionary new];
|
|
21
|
+
_windowOptions = [NSMutableDictionary new];
|
|
22
|
+
_closeRequestIdentifiers = [NSMutableSet new];
|
|
23
|
+
}
|
|
24
|
+
return self;
|
|
25
|
+
}
|
|
26
|
+
@end
|
|
27
|
+
#endif
|
package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.h
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#import <React/RCTEventEmitter.h>
|
|
2
|
+
#import <RNDesktopWindowsSpec/RNDesktopWindowsSpec.h>
|
|
3
|
+
|
|
4
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
+
|
|
6
|
+
@class NSWindow;
|
|
7
|
+
|
|
8
|
+
@interface RNWindowManager : RCTEventEmitter <NativeWindowManagerSpec>
|
|
9
|
+
+ (nullable NSWindow *)getMainWindow;
|
|
10
|
+
@end
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_END
|