@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,139 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import type { AsyncRegistration, Subscription } from "@legendapp/spark-desktop-app/src/contracts";
|
|
3
|
+
import { createDocumentAppController, type DocumentAppController, type DocumentAppControllerOptions } from "./controller";
|
|
4
|
+
import { watchDocumentReload, type DocumentReloadOptions } from "./reload";
|
|
5
|
+
|
|
6
|
+
export interface UseWatchedDocumentReloadOptions extends Omit<DocumentReloadOptions, "path"> {
|
|
7
|
+
path: string | null | undefined;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
onCleanupError?: (error: unknown, registration: AsyncRegistration) => void;
|
|
10
|
+
}
|
|
11
|
+
type ReloadOwner = { registration: AsyncRegistration; removing?: Promise<void> };
|
|
12
|
+
type ReloadLifecycle = { tail: Promise<void>; owner?: ReloadOwner };
|
|
13
|
+
export function useWatchedDocumentReload(options: UseWatchedDocumentReloadOptions): void {
|
|
14
|
+
const latest = useRef(options);
|
|
15
|
+
const lifecycleRef = useRef<ReloadLifecycle | null>(null);
|
|
16
|
+
if (!lifecycleRef.current) lifecycleRef.current = { tail: Promise.resolve() };
|
|
17
|
+
const lifecycle = lifecycleRef.current;
|
|
18
|
+
useLayoutEffect(() => { latest.current = options; });
|
|
19
|
+
const { path, enabled = true, delayMs } = options;
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!enabled || !path) return;
|
|
22
|
+
let active = true, owned: ReloadOwner | undefined;
|
|
23
|
+
const report = (error: unknown) => {
|
|
24
|
+
try { latest.current.onError(error); }
|
|
25
|
+
catch (callbackError) { console.error(callbackError); }
|
|
26
|
+
};
|
|
27
|
+
const remove = (owner: ReloadOwner) => {
|
|
28
|
+
if (!owner.removing) owner.removing = owner.registration.remove().then(() => {
|
|
29
|
+
if (lifecycle.owner === owner) lifecycle.owner = undefined;
|
|
30
|
+
}).catch(error => {
|
|
31
|
+
try {
|
|
32
|
+
if (latest.current.onCleanupError) latest.current.onCleanupError(error, owner.registration);
|
|
33
|
+
else {
|
|
34
|
+
console.error("Document reload watch cleanup failed; registration remains retryable", error, owner.registration);
|
|
35
|
+
report(error);
|
|
36
|
+
}
|
|
37
|
+
} catch (callbackError) { console.error(callbackError); }
|
|
38
|
+
throw error;
|
|
39
|
+
}).finally(() => { owner.removing = undefined; });
|
|
40
|
+
return owner.removing;
|
|
41
|
+
};
|
|
42
|
+
const creation = lifecycle.tail.then(async () => {
|
|
43
|
+
if (!active) return;
|
|
44
|
+
try {
|
|
45
|
+
if (lifecycle.owner) await remove(lifecycle.owner);
|
|
46
|
+
} catch { return; }
|
|
47
|
+
if (!active) return;
|
|
48
|
+
try {
|
|
49
|
+
const registration = await watchDocumentReload({
|
|
50
|
+
path, delayMs,
|
|
51
|
+
onReload: () => { if (active) return latest.current.onReload(); },
|
|
52
|
+
shouldReload: () => active && (latest.current.shouldReload?.() ?? true),
|
|
53
|
+
onError: error => { if (active) report(error); },
|
|
54
|
+
});
|
|
55
|
+
owned = { registration };
|
|
56
|
+
lifecycle.owner = owned;
|
|
57
|
+
} catch (error) { if (active) report(error); }
|
|
58
|
+
});
|
|
59
|
+
lifecycle.tail = creation;
|
|
60
|
+
return () => {
|
|
61
|
+
active = false;
|
|
62
|
+
const cleanup = creation.then(async () => { if (owned) await remove(owned).catch(() => {}); });
|
|
63
|
+
lifecycle.tail = cleanup;
|
|
64
|
+
};
|
|
65
|
+
}, [path, enabled, delayMs]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface UseDocumentAppControllerOptions extends DocumentAppControllerOptions {
|
|
69
|
+
onCleanupError?: (error: unknown, controller: DocumentAppController) => void;
|
|
70
|
+
}
|
|
71
|
+
export type DocumentAppControllerState =
|
|
72
|
+
| { status: "loading" }
|
|
73
|
+
| { status: "ready"; controller: DocumentAppController }
|
|
74
|
+
| { status: "error"; error: unknown };
|
|
75
|
+
|
|
76
|
+
/** Component-owned convenience. Use the factory for an application-owned lifetime. */
|
|
77
|
+
export function useDocumentAppController(options: UseDocumentAppControllerOptions): DocumentAppControllerState {
|
|
78
|
+
const latest = useRef(options);
|
|
79
|
+
useLayoutEffect(() => { latest.current = options; });
|
|
80
|
+
const [state, setState] = useState<DocumentAppControllerState>({ status: "loading" });
|
|
81
|
+
const current = useRef<{ controller?: DocumentAppController; items: DocumentAppControllerOptions["menus"]; active: boolean; ready: boolean } | undefined>(undefined);
|
|
82
|
+
const cleanup = useRef<{ promise: Promise<void>; controller?: DocumentAppController }>({ promise: Promise.resolve() });
|
|
83
|
+
const handlesDocuments = !!options.onOpenDocument;
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
const owner: NonNullable<typeof current.current> = { items: options.menus, active: true, ready: false };
|
|
86
|
+
current.current = owner;
|
|
87
|
+
let subscription: Subscription | undefined;
|
|
88
|
+
setState({ status: "loading" });
|
|
89
|
+
const report = (error: unknown) => { if (owner.active) setState({ status: "error", error }); latest.current.reportError(error); };
|
|
90
|
+
const previous = cleanup.current;
|
|
91
|
+
const setup = previous.promise.catch(() => previous.controller?.remove()).then(async () => {
|
|
92
|
+
if (!owner.active) return;
|
|
93
|
+
const initialItems = owner.items;
|
|
94
|
+
const controller = createDocumentAppController({
|
|
95
|
+
ownerId: options.ownerId, windowId: options.windowId, menus: initialItems,
|
|
96
|
+
launchArguments: options.launchArguments,
|
|
97
|
+
onMenuAction: (action, value) => { if (owner.active) return latest.current.onMenuAction?.(action, value); },
|
|
98
|
+
onInitialOpen: (args, value) => { if (owner.active) return latest.current.onInitialOpen(args, value); },
|
|
99
|
+
onOpenDocument: handlesDocuments ? (path, value) => { if (owner.active) return latest.current.onOpenDocument?.(path, value); } : undefined,
|
|
100
|
+
onReopenRequested: value => {
|
|
101
|
+
if (owner.active) return latest.current.onReopenRequested ? latest.current.onReopenRequested(value) : latest.current.onInitialOpen(undefined, value);
|
|
102
|
+
},
|
|
103
|
+
reportError: error => latest.current.reportError(error),
|
|
104
|
+
});
|
|
105
|
+
owner.controller = controller;
|
|
106
|
+
await controller.ready;
|
|
107
|
+
if (owner.active) {
|
|
108
|
+
owner.ready = true;
|
|
109
|
+
if (owner.items !== initialItems) await controller.updateMenus(owner.items).catch(error => latest.current.reportError(error));
|
|
110
|
+
if (!owner.active) return;
|
|
111
|
+
subscription = controller.subscribe(() => setState({ status: "ready", controller }));
|
|
112
|
+
setState({ status: "ready", controller });
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
void setup.catch(report);
|
|
116
|
+
return () => {
|
|
117
|
+
owner.active = false; subscription?.remove();
|
|
118
|
+
// Stop callbacks immediately, even if setup is waiting on a native registration.
|
|
119
|
+
if (owner.controller) {
|
|
120
|
+
const controller = owner.controller;
|
|
121
|
+
const promise = controller.remove();
|
|
122
|
+
cleanup.current = { promise, controller };
|
|
123
|
+
void promise.catch(error => {
|
|
124
|
+
if (latest.current.onCleanupError) latest.current.onCleanupError(error, controller);
|
|
125
|
+
else latest.current.reportError(error);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}, [options.ownerId, options.windowId, handlesDocuments]);
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
const owner = current.current;
|
|
132
|
+
if (!owner?.active || owner.items === options.menus) return;
|
|
133
|
+
owner.items = options.menus;
|
|
134
|
+
if (owner.ready && owner.controller) void owner.controller.updateMenus(options.menus).catch(error => {
|
|
135
|
+
if (owner.active) latest.current.reportError(error);
|
|
136
|
+
});
|
|
137
|
+
}, [options.menus]);
|
|
138
|
+
return state;
|
|
139
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { openFileDialog } from "@legendapp/spark-file-dialog";
|
|
2
|
+
export type { AsyncRegistration, Subscription } from "@legendapp/spark-desktop-app/src/contracts";
|
|
3
|
+
export * from "./requests";
|
|
4
|
+
export { createDocumentTransitionGuard } from "./documentTransition";
|
|
5
|
+
export * from "./controller";
|
|
6
|
+
export * from "./reload";
|
|
7
|
+
export * from "./hooks";
|
|
8
|
+
|
|
9
|
+
export interface OpenSelectedDocumentPathOptions {
|
|
10
|
+
allowedFileTypes: readonly string[];
|
|
11
|
+
invalidSelectionMessage?: string;
|
|
12
|
+
isDocumentPath: (path: string) => boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface GetLaunchDocumentPathOptions {
|
|
15
|
+
isDocumentPath: (path: string) => boolean;
|
|
16
|
+
launchArguments?: string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function getLaunchDocumentPath({
|
|
20
|
+
isDocumentPath,
|
|
21
|
+
launchArguments,
|
|
22
|
+
}: GetLaunchDocumentPathOptions) {
|
|
23
|
+
const argv = typeof process !== "undefined" && Array.isArray(process.argv) ? process.argv : [];
|
|
24
|
+
return launchArguments?.find(isDocumentPath) ?? argv.find(isDocumentPath) ?? null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export async function openSelectedDocumentPath({
|
|
28
|
+
allowedFileTypes,
|
|
29
|
+
invalidSelectionMessage,
|
|
30
|
+
isDocumentPath,
|
|
31
|
+
}: OpenSelectedDocumentPathOptions) {
|
|
32
|
+
const result = await openFileDialog({
|
|
33
|
+
filters: [{ extensions: allowedFileTypes }],
|
|
34
|
+
selection: "files",
|
|
35
|
+
});
|
|
36
|
+
const paths = result.canceled ? [] : result.paths;
|
|
37
|
+
const path = paths.find(isDocumentPath) ?? null;
|
|
38
|
+
|
|
39
|
+
if (path) {
|
|
40
|
+
return path;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (paths && paths.length > 0) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
invalidSelectionMessage ?? `Choose a supported file (${allowedFileTypes.map((type) => `.${type}`).join(", ")}).`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { watch } from "@legendapp/spark-file-system";
|
|
2
|
+
import { SparkError, asyncRegistration, type AsyncRegistration } from "@legendapp/spark-desktop-app/src/contracts";
|
|
3
|
+
|
|
4
|
+
export interface DocumentReloadOptions {
|
|
5
|
+
path: string;
|
|
6
|
+
delayMs?: number;
|
|
7
|
+
onReload: () => void | Promise<void>;
|
|
8
|
+
onError: (error: unknown) => void;
|
|
9
|
+
shouldReload?: () => boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Debounces file invalidations. Removal stops queued reloads and awaits any running reload. */
|
|
13
|
+
export async function watchDocumentReload(options: DocumentReloadOptions): Promise<AsyncRegistration> {
|
|
14
|
+
const { path, delayMs = 100, onReload, onError, shouldReload } = options;
|
|
15
|
+
if (!Number.isFinite(delayMs) || delayMs < 0 || delayMs > 2147483647) {
|
|
16
|
+
throw new SparkError("E_INVALID_ARGUMENT", "Expected a nonnegative timer delay");
|
|
17
|
+
}
|
|
18
|
+
let active = true, ready = false, invalidated = false, timeout: ReturnType<typeof setTimeout> | undefined;
|
|
19
|
+
let pending = Promise.resolve();
|
|
20
|
+
const invalidate = () => {
|
|
21
|
+
if (!active) return;
|
|
22
|
+
if (!ready) { invalidated = true; return; }
|
|
23
|
+
clearTimeout(timeout);
|
|
24
|
+
timeout = setTimeout(() => {
|
|
25
|
+
pending = pending.then(async () => {
|
|
26
|
+
if (active && (!shouldReload || shouldReload())) await onReload();
|
|
27
|
+
}).catch(onError);
|
|
28
|
+
}, delayMs);
|
|
29
|
+
};
|
|
30
|
+
// Native backends can report an invalidation before registration is acknowledged.
|
|
31
|
+
// Do not run application work until creation succeeds.
|
|
32
|
+
const subscription = await watch(path, invalidate);
|
|
33
|
+
ready = true;
|
|
34
|
+
if (invalidated) invalidate();
|
|
35
|
+
return asyncRegistration(() => { active = false; clearTimeout(timeout); }, async () => {
|
|
36
|
+
await subscription.remove();
|
|
37
|
+
await pending;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Platform } from "react-native";
|
|
2
|
+
import { callLinks, linksCommand } from "@legendapp/spark-desktop-links/src/native";
|
|
3
|
+
import { nativePath } from "@legendapp/spark-desktop-app/src/contracts/path";
|
|
4
|
+
import { SparkError } from "@legendapp/spark-desktop-app/src/contracts";
|
|
5
|
+
export { subscribeToOpenRequests, type OpenRequest } from "@legendapp/spark-desktop-app/src/open-requests";
|
|
6
|
+
export interface RecentDocument { path: string; name: string }
|
|
7
|
+
export async function noteRecentDocument(path: string): Promise<void> { await linksCommand("noteRecent", { path: nativePath(path, Platform.OS) }); }
|
|
8
|
+
export function clearRecentDocuments(): Promise<void> { return linksCommand("clearRecent"); }
|
|
9
|
+
export async function getRecentDocuments(): Promise<RecentDocument[]> {
|
|
10
|
+
const paths = await callLinks("recent", {}, (value): value is string[] => Array.isArray(value) && value.every(item => typeof item === "string"));
|
|
11
|
+
return paths.map(value => {
|
|
12
|
+
try { const path = nativePath(value, Platform.OS); return { path, name: (Platform.OS === "windows" ? path.replaceAll("\\", "/") : path).split("/").filter(Boolean).at(-1) ?? path }; }
|
|
13
|
+
catch (cause) { throw new SparkError("E_INVALID_DATA", "Recent document contains an invalid path", { cause }); }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
3
|
+
Pod::Spec.new do |s|
|
|
4
|
+
s.name = "RNDesktopDrag"
|
|
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.frameworks = "UniformTypeIdentifiers"
|
|
11
|
+
s.source = { :path => "." }
|
|
12
|
+
s.platforms = { :osx => "14.0" }
|
|
13
|
+
s.source_files = "macos/**/*.{h,m,mm}"
|
|
14
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/Yoga\"" }
|
|
15
|
+
s.dependency "React-RCTFabric"
|
|
16
|
+
s.dependency "React-Core"
|
|
17
|
+
s.dependency "ReactCodegen"
|
|
18
|
+
s.dependency "RNDesktopApp"
|
|
19
|
+
s.dependency "React-RCTAppDelegate"
|
|
20
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#import "RNDesktopDragView.h"
|
|
2
|
+
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
|
|
3
|
+
#import <react/renderer/components/RNDesktopDragSpec/ComponentDescriptors.h>
|
|
4
|
+
#import <react/renderer/components/RNDesktopDragSpec/EventEmitters.h>
|
|
5
|
+
#import <react/renderer/components/RNDesktopDragSpec/Props.h>
|
|
6
|
+
#import <react/renderer/components/RNDesktopDragSpec/RCTComponentViewHelpers.h>
|
|
7
|
+
using namespace facebook::react;
|
|
8
|
+
static std::string JSON(id value) { NSData *data = [NSJSONSerialization dataWithJSONObject:value options:0 error:nil]; NSString *json = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; return json.UTF8String ?: "{}"; }
|
|
9
|
+
static NSDragOperation Operation(NSString *value) { return [value isEqual:@"move"] ? NSDragOperationMove : [value isEqual:@"link"] ? NSDragOperationLink : [value isEqual:@"copy"] ? NSDragOperationCopy : NSDragOperationNone; }
|
|
10
|
+
static NSString *OperationName(NSDragOperation value) { return value == NSDragOperationMove ? @"move" : value == NSDragOperationLink ? @"link" : value == NSDragOperationCopy ? @"copy" : @"none"; }
|
|
11
|
+
static NSPasteboardType CustomType(NSString *mime) { return [UTType typeWithMIMEType:mime].identifier; }
|
|
12
|
+
static NSArray *PasteboardTypes(NSArray *types) {
|
|
13
|
+
NSMutableArray *result = [NSMutableArray new];
|
|
14
|
+
for (NSString *type in types) [result addObject:[type isEqual:@"files"] ? NSPasteboardTypeFileURL : [type isEqual:@"text"] ? NSPasteboardTypeString : [type isEqual:@"urls"] ? NSPasteboardTypeURL : CustomType(type)];
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
@implementation RNDesktopDragView {
|
|
18
|
+
NSDictionary *_source;
|
|
19
|
+
NSDictionary *_options;
|
|
20
|
+
BOOL _disabled;
|
|
21
|
+
BOOL _dragging;
|
|
22
|
+
BOOL _mouseDown;
|
|
23
|
+
NSPoint _start;
|
|
24
|
+
}
|
|
25
|
+
- (instancetype)init { if (self = [super init]) { _props = std::make_shared<const DesktopDragViewProps>(); [self registerForDraggedTypes:@[NSPasteboardTypeFileURL, NSPasteboardTypeURL, NSPasteboardTypeString]]; } return self; }
|
|
26
|
+
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps {
|
|
27
|
+
const auto &value = *std::static_pointer_cast<DesktopDragViewProps const>(props);
|
|
28
|
+
NSString *json = [NSString stringWithUTF8String:value.sourceJson.c_str()];
|
|
29
|
+
_source = json.length ? [NSJSONSerialization JSONObjectWithData:[json dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil] : nil;
|
|
30
|
+
NSString *options = [NSString stringWithUTF8String:value.optionsJson.c_str()];
|
|
31
|
+
_options = options.length ? [NSJSONSerialization JSONObjectWithData:[options dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil] : nil;
|
|
32
|
+
[self unregisterDraggedTypes]; [self registerForDraggedTypes:PasteboardTypes(_options[@"acceptedTypes"] ?: @[@"files", @"text", @"urls"])];
|
|
33
|
+
_disabled = value.disabled; [super updateProps:props oldProps:oldProps];
|
|
34
|
+
}
|
|
35
|
+
- (BOOL)isFlipped { return YES; }
|
|
36
|
+
// Fabric parents call the UIKit-compatible overload directly when traversing children.
|
|
37
|
+
- (NSView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { NSView *hit = [super hitTest:point withEvent:event]; return hit && _source.count && !_disabled ? self : hit; }
|
|
38
|
+
- (BOOL)mouseDownCanMoveWindow { return _source.count && !_disabled ? NO : [super mouseDownCanMoveWindow]; }
|
|
39
|
+
- (NSDragOperation)operation:(id<NSDraggingInfo>)sender {
|
|
40
|
+
if (_disabled || ![sender.draggingPasteboard availableTypeFromArray:PasteboardTypes(_options[@"acceptedTypes"] ?: @[@"files", @"text", @"urls"])]) return NSDragOperationNone;
|
|
41
|
+
for (NSString *name in _options[@"acceptedOperations"] ?: @[@"copy"]) { NSDragOperation operation = Operation(name); if (sender.draggingSourceOperationMask & operation) return operation; }
|
|
42
|
+
return NSDragOperationNone;
|
|
43
|
+
}
|
|
44
|
+
- (NSDictionary *)position:(id<NSDraggingInfo>)sender {
|
|
45
|
+
NSPoint point = [self convertPoint:sender.draggingLocation fromView:nil];
|
|
46
|
+
return @{ @"x": @(point.x), @"y": @(point.y), @"operation": OperationName([self operation:sender]) };
|
|
47
|
+
}
|
|
48
|
+
- (NSDictionary *)payload:(id<NSDraggingInfo>)sender {
|
|
49
|
+
NSMutableArray *files = [NSMutableArray new], *urls = [NSMutableArray new]; NSPasteboard *board = sender.draggingPasteboard;
|
|
50
|
+
for (NSURL *url in [board readObjectsForClasses:@[NSURL.class] options:nil]) { if (url.fileURL) [files addObject:url.path]; else [urls addObject:url.absoluteString]; }
|
|
51
|
+
NSMutableDictionary *data = [NSMutableDictionary new];
|
|
52
|
+
for (NSString *type in _options[@"acceptedTypes"]) if ([type containsString:@"/"]) { NSString *value = [board stringForType:CustomType(type)]; if (value) data[type] = value; }
|
|
53
|
+
NSMutableDictionary *result = [[self position:sender] mutableCopy];
|
|
54
|
+
[result addEntriesFromDictionary:@{ @"files": files, @"urls": urls, @"text": [board stringForType:NSPasteboardTypeString] ?: @"", @"data": data }]; return result;
|
|
55
|
+
}
|
|
56
|
+
- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender {
|
|
57
|
+
NSDragOperation operation = [self operation:sender]; if (!operation) return operation;
|
|
58
|
+
auto emitter = std::static_pointer_cast<const DesktopDragViewEventEmitter>(_eventEmitter); if (emitter) emitter->onDragEnter({ JSON([self payload:sender]) }); return operation;
|
|
59
|
+
}
|
|
60
|
+
- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender {
|
|
61
|
+
NSDragOperation operation = [self operation:sender];
|
|
62
|
+
auto emitter = std::static_pointer_cast<const DesktopDragViewEventEmitter>(_eventEmitter); if (emitter && operation) emitter->onDragOver({ JSON([self position:sender]) }); return operation;
|
|
63
|
+
}
|
|
64
|
+
- (void)draggingExited:(id<NSDraggingInfo>)sender { auto emitter = std::static_pointer_cast<const DesktopDragViewEventEmitter>(_eventEmitter); if (emitter) emitter->onDragLeave({ "{}" }); }
|
|
65
|
+
- (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { if (![self operation:sender]) return NO; auto emitter = std::static_pointer_cast<const DesktopDragViewEventEmitter>(_eventEmitter); if (!emitter) return NO; emitter->onDrop({ JSON([self payload:sender]) }); return YES; }
|
|
66
|
+
- (void)mouseDown:(NSEvent *)event { _mouseDown = YES; _start = event.locationInWindow; if (!_source.count || _disabled) [super mouseDown:event]; }
|
|
67
|
+
- (void)mouseUp:(NSEvent *)event { _mouseDown = NO; [super mouseUp:event]; }
|
|
68
|
+
- (void)mouseDragged:(NSEvent *)event {
|
|
69
|
+
if (!_mouseDown || _dragging || _disabled || !_source.count || hypot(event.locationInWindow.x - _start.x, event.locationInWindow.y - _start.y) < 6) { [super mouseDragged:event]; return; }
|
|
70
|
+
NSMutableArray *writers = [NSMutableArray new];
|
|
71
|
+
for (NSString *file in _source[@"files"]) if ([file hasPrefix:@"/"]) [writers addObject:[NSURL fileURLWithPath:file]];
|
|
72
|
+
for (NSString *value in _source[@"urls"]) { NSURL *url = [NSURL URLWithString:value]; if (url) [writers addObject:url]; }
|
|
73
|
+
if (_source[@"text"]) [writers addObject:_source[@"text"]];
|
|
74
|
+
if ([_source[@"data"] count]) {
|
|
75
|
+
NSPasteboardItem *custom = [NSPasteboardItem new];
|
|
76
|
+
for (NSString *type in _source[@"data"]) [custom setString:_source[@"data"][type] forType:CustomType(type)];
|
|
77
|
+
[writers addObject:custom];
|
|
78
|
+
}
|
|
79
|
+
if (!writers.count) return;
|
|
80
|
+
NSMutableArray *items = [NSMutableArray new];
|
|
81
|
+
for (id<NSPasteboardWriting> writer in writers) {
|
|
82
|
+
NSDraggingItem *item = [[NSDraggingItem alloc] initWithPasteboardWriter:writer];
|
|
83
|
+
NSImage *image = [NSImage imageWithSystemSymbolName:@"doc" accessibilityDescription:@"Dragged item"];
|
|
84
|
+
[item setDraggingFrame:NSMakeRect(0, 0, 32, 32) contents:image]; [items addObject:item];
|
|
85
|
+
}
|
|
86
|
+
_dragging = YES; [self beginDraggingSessionWithItems:items event:event source:self];
|
|
87
|
+
}
|
|
88
|
+
- (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context { NSDragOperation mask = NSDragOperationNone; for (NSString *name in _options[@"sourceOperations"] ?: @[@"copy"]) mask |= Operation(name); return mask; }
|
|
89
|
+
- (void)draggingSession:(NSDraggingSession *)session endedAtPoint:(NSPoint)point operation:(NSDragOperation)operation {
|
|
90
|
+
_dragging = NO; _mouseDown = NO; auto emitter = std::static_pointer_cast<const DesktopDragViewEventEmitter>(_eventEmitter); if (emitter) emitter->onDragEnd({ JSON(@{ @"accepted": @(operation != NSDragOperationNone), @"operation": OperationName(operation) }) });
|
|
91
|
+
}
|
|
92
|
+
- (void)prepareForRecycle { [super prepareForRecycle]; _source = nil; _options = nil; [self unregisterDraggedTypes]; [self registerForDraggedTypes:PasteboardTypes(@[@"files", @"text", @"urls"])]; _disabled = NO; _dragging = NO; _mouseDown = NO; _start = NSZeroPoint; }
|
|
93
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider { return concreteComponentDescriptorProvider<DesktopDragViewComponentDescriptor>(); }
|
|
94
|
+
@end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@legendapp/spark-drag-drop",
|
|
3
|
+
"version": "0.0.1-next.10",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "src/index.tsx",
|
|
6
|
+
"react-native": "src/index.tsx",
|
|
7
|
+
"files": [
|
|
8
|
+
"src",
|
|
9
|
+
"macos",
|
|
10
|
+
"*.podspec",
|
|
11
|
+
"windows",
|
|
12
|
+
"react-native.config.js"
|
|
13
|
+
],
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"react": "^19.1.0",
|
|
16
|
+
"react-native": "0.81.6"
|
|
17
|
+
},
|
|
18
|
+
"codegenConfig": {
|
|
19
|
+
"name": "RNDesktopDragSpec",
|
|
20
|
+
"type": "components",
|
|
21
|
+
"jsSrcsDir": "src",
|
|
22
|
+
"ios": {
|
|
23
|
+
"componentProvider": {
|
|
24
|
+
"DesktopDragView": "RNDesktopDragView"
|
|
25
|
+
},
|
|
26
|
+
"modulesProvider": {}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"spark": {
|
|
30
|
+
"sdk": true,
|
|
31
|
+
"nativeModules": [],
|
|
32
|
+
"pod": "RNDesktopDrag",
|
|
33
|
+
"platforms": [
|
|
34
|
+
"macos",
|
|
35
|
+
"windows"
|
|
36
|
+
],
|
|
37
|
+
"requires": [
|
|
38
|
+
"@legendapp/spark-desktop-app"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@legendapp/spark-desktop-app": "0.0.1-next.10"
|
|
43
|
+
},
|
|
44
|
+
"private": true
|
|
45
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Expo Desktop currently invokes the Apple autolinker with --platform ios.
|
|
2
|
+
// Its generated Podfile identifies macOS explicitly; ordinary iOS apps use Expo backends.
|
|
3
|
+
module.exports = { dependency: { platforms: {
|
|
4
|
+
ios: process.env.SPARK_DESKTOP_AUTOLINK === "macos" ? {} : null,
|
|
5
|
+
android: null,
|
|
6
|
+
} } };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from "react-native";
|
|
2
|
+
import type { DirectEventHandler, WithDefault } from "react-native/Libraries/Types/CodegenTypes";
|
|
3
|
+
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
|
|
4
|
+
type Payload = Readonly<{ json: string }>;
|
|
5
|
+
export interface NativeProps extends ViewProps {
|
|
6
|
+
sourceJson?: string;
|
|
7
|
+
optionsJson?: string;
|
|
8
|
+
disabled?: WithDefault<boolean, false>;
|
|
9
|
+
onError?: DirectEventHandler<Payload>;
|
|
10
|
+
onDrop?: DirectEventHandler<Payload>;
|
|
11
|
+
onDragEnter?: DirectEventHandler<Payload>;
|
|
12
|
+
onDragOver?: DirectEventHandler<Payload>;
|
|
13
|
+
onDragLeave?: DirectEventHandler<Payload>;
|
|
14
|
+
onDragEnd?: DirectEventHandler<Payload>;
|
|
15
|
+
}
|
|
16
|
+
export default codegenNativeComponent<NativeProps>("DesktopDragView") as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { SparkError, parseNativeResult } from "@legendapp/spark-desktop-app/src/contracts";
|
|
2
|
+
import { nativePath } from "@legendapp/spark-desktop-app/src/contracts/path";
|
|
3
|
+
export type DragOperation = "copy" | "move" | "link";
|
|
4
|
+
/** Custom values are UTF-8 strings keyed by MIME type. JSON schemas belong to the app. */
|
|
5
|
+
export interface DragPayload { files?: readonly string[]; text?: string; urls?: readonly string[]; data?: Readonly<Record<string, string>> }
|
|
6
|
+
/** Logical coordinates from the target's top-left corner, positive downward. */
|
|
7
|
+
export interface DragOverEvent { x: number; y: number; operation: DragOperation }
|
|
8
|
+
export interface DropEvent extends DragPayload, DragOverEvent {}
|
|
9
|
+
export type DragEndEvent = { accepted: true; operation: DragOperation } | { accepted: false; operation: "none" };
|
|
10
|
+
export interface DragOptions {
|
|
11
|
+
sourceOperations?: readonly DragOperation[];
|
|
12
|
+
acceptedOperations?: readonly DragOperation[];
|
|
13
|
+
/** Built-ins: files, text, urls. Custom types use MIME names. Default: built-ins. */
|
|
14
|
+
acceptedTypes?: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
const operations = ["copy", "move", "link"];
|
|
17
|
+
const builtins = ["files", "text", "urls"];
|
|
18
|
+
const customType = (type: string) => /^[a-z0-9][a-z0-9!#$&^_.+-]*\/[a-z0-9][a-z0-9!#$&^_.+-]*$/.test(type) && !["application/x-spark-drag", "text/plain", "text/uri-list"].includes(type);
|
|
19
|
+
const record = (value: unknown): value is Record<string, unknown> => !!value && typeof value === "object" && !Array.isArray(value);
|
|
20
|
+
const strings = (value: unknown): value is string[] => Array.isArray(value) && Array.from(value).every(item => typeof item === "string");
|
|
21
|
+
const url = (value: string) => /^[a-z][a-z0-9+.-]*:\S+$/i.test(value) && !/[\u0000-\u0020\u007f]/.test(value);
|
|
22
|
+
function invalid(message: string): never { throw new SparkError("E_INVALID_ARGUMENT", message); }
|
|
23
|
+
/** Snapshot and normalize file URLs before passing the source to native. */
|
|
24
|
+
export function dragSource(source: DragPayload | undefined, platform: string, incoming = false): DragPayload | undefined {
|
|
25
|
+
if (source === undefined) return undefined;
|
|
26
|
+
if (!record(source)) invalid("Expected a drag payload");
|
|
27
|
+
for (const key of Object.keys(source)) if (![...builtins, "data"].includes(key)) throw new SparkError("E_UNSUPPORTED_OPTION", `Unknown drag payload field: ${key}`);
|
|
28
|
+
const result: DragPayload = {};
|
|
29
|
+
if (source.files !== undefined) {
|
|
30
|
+
if (!strings(source.files)) invalid("Drag files must be an array of absolute paths or file URLs");
|
|
31
|
+
result.files = source.files.map(file => nativePath(file, platform));
|
|
32
|
+
}
|
|
33
|
+
if (source.text !== undefined) {
|
|
34
|
+
if (typeof source.text !== "string") invalid("Drag text must be a string");
|
|
35
|
+
result.text = source.text;
|
|
36
|
+
}
|
|
37
|
+
if (source.urls !== undefined) {
|
|
38
|
+
if (!strings(source.urls) || !source.urls.every(url)) invalid("Drag URLs must be absolute URLs without whitespace");
|
|
39
|
+
if (!incoming && platform === "windows" && source.urls.length > 1) throw new SparkError("E_UNSUPPORTED_OPTION", "Windows supports one URL per drag source");
|
|
40
|
+
result.urls = [...source.urls];
|
|
41
|
+
}
|
|
42
|
+
if (source.data !== undefined) {
|
|
43
|
+
if (!record(source.data) || Object.entries(source.data).some(([type, value]) => !customType(type) || typeof value !== "string")) invalid("Custom drag data must map MIME types to strings");
|
|
44
|
+
result.data = { ...source.data } as Record<string, string>;
|
|
45
|
+
}
|
|
46
|
+
if (!incoming && !result.files?.length && result.text === undefined && !result.urls?.length && !Object.keys(result.data ?? {}).length) invalid("Drag source must contain at least one representation");
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
export function dragConfiguration(source: DragPayload | undefined, options: DragOptions, platform: string): string {
|
|
50
|
+
dragSource(source, platform);
|
|
51
|
+
return dragOptions(options);
|
|
52
|
+
}
|
|
53
|
+
export function dragOptions(options: DragOptions): string {
|
|
54
|
+
if (!record(options)) invalid("Expected drag options");
|
|
55
|
+
for (const key of Object.keys(options)) if (!["sourceOperations", "acceptedOperations", "acceptedTypes"].includes(key)) throw new SparkError("E_UNSUPPORTED_OPTION", `Unknown drag option: ${key}`);
|
|
56
|
+
for (const values of [options.sourceOperations, options.acceptedOperations]) {
|
|
57
|
+
if (values !== undefined && (!strings(values) || values.some(value => !operations.includes(value)) || new Set(values).size !== values.length)) invalid("Drag operations must be unique copy, move or link values");
|
|
58
|
+
}
|
|
59
|
+
const types = options.acceptedTypes ?? builtins;
|
|
60
|
+
if (!strings(types) || new Set(types).size !== types.length || types.some(type => !builtins.includes(type) && !customType(type))) invalid("Invalid or duplicate accepted drag type");
|
|
61
|
+
return JSON.stringify({ sourceOperations: options.sourceOperations ?? ["copy"], acceptedOperations: options.acceptedOperations ?? ["copy"], acceptedTypes: types });
|
|
62
|
+
}
|
|
63
|
+
function position(value: unknown): value is DragOverEvent {
|
|
64
|
+
return record(value) && typeof value.x === "number" && Number.isFinite(value.x) && typeof value.y === "number" && Number.isFinite(value.y) && operations.includes(value.operation as string);
|
|
65
|
+
}
|
|
66
|
+
export function dragPosition(json: string): DragOverEvent {
|
|
67
|
+
const { x, y, operation } = parseNativeResult(json, position); return { x, y, operation };
|
|
68
|
+
}
|
|
69
|
+
export function dragEnd(json: string): DragEndEvent {
|
|
70
|
+
const value = parseNativeResult(json, (value): value is DragEndEvent => record(value) && (value.accepted === true ? operations.includes(value.operation as string) : value.accepted === false && value.operation === "none"));
|
|
71
|
+
return { accepted: value.accepted, operation: value.operation } as DragEndEvent;
|
|
72
|
+
}
|
|
73
|
+
export function dragDrop(json: string, platform: string): DropEvent {
|
|
74
|
+
const value = parseNativeResult(json, (value): value is DropEvent => position(value) && record(value));
|
|
75
|
+
// Native drops may contain no text/custom representation, unlike a requested source.
|
|
76
|
+
const { x, y, operation } = value;
|
|
77
|
+
const payload: DragPayload = {};
|
|
78
|
+
for (const key of [...builtins, "data"] as const) if (Object.hasOwn(value, key)) (payload as Record<string, unknown>)[key] = (value as unknown as Record<string, unknown>)[key];
|
|
79
|
+
try {
|
|
80
|
+
const normalized = dragSource(payload, platform, true);
|
|
81
|
+
return { ...normalized, x, y, operation };
|
|
82
|
+
} catch (cause) { throw new SparkError("E_INVALID_DATA", "Invalid native drag payload", { cause }); }
|
|
83
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import { Platform, UIManager, View, type NativeSyntheticEvent, type ViewProps } from "react-native";
|
|
3
|
+
import NativeView from "./DesktopDragViewNativeComponent";
|
|
4
|
+
import { SparkError, parseNativeResult, type Availability } from "@legendapp/spark-desktop-app/src/contracts";
|
|
5
|
+
import { dragOptions, dragSource, dragDrop, dragEnd, dragPosition, type DragPayload, type DragOptions, type DragOverEvent, type DropEvent, type DragEndEvent } from "./contracts";
|
|
6
|
+
export type { DragPayload, DragOptions, DragOperation, DragOverEvent, DropEvent, DragEndEvent } from "./contracts";
|
|
7
|
+
export interface DragDropViewProps extends ViewProps, DragOptions {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
source?: DragPayload;
|
|
10
|
+
onDrop?: (event: DropEvent) => void;
|
|
11
|
+
onDragEnter?: (event: DropEvent) => void;
|
|
12
|
+
onDragOver?: (event: DragOverEvent) => void;
|
|
13
|
+
onDragLeave?: () => void;
|
|
14
|
+
onDragEnd?: (event: DragEndEvent) => void;
|
|
15
|
+
onError?: (error: SparkError) => void;
|
|
16
|
+
}
|
|
17
|
+
export function getDragDropAvailability(): Availability {
|
|
18
|
+
if (Platform.OS !== "macos" && Platform.OS !== "windows") return { available: false, reason: "unsupported-platform" };
|
|
19
|
+
return UIManager.hasViewManagerConfig("DesktopDragView") ? { available: true } : { available: false, reason: "missing-module" };
|
|
20
|
+
}
|
|
21
|
+
type Event = NativeSyntheticEvent<{ json: string }>;
|
|
22
|
+
export function DragDropView({ source, sourceOperations, acceptedOperations, acceptedTypes, disabled = false, onDrop, onDragEnter, onDragOver, onDragLeave, onDragEnd, onError = console.error, ...props }: DragDropViewProps) {
|
|
23
|
+
const optionsJson = dragOptions({ sourceOperations, acceptedOperations, acceptedTypes });
|
|
24
|
+
const sourceJson = source === undefined ? "" : JSON.stringify(dragSource(source, Platform.OS));
|
|
25
|
+
if (typeof disabled !== "boolean") throw new SparkError("E_INVALID_ARGUMENT", "Expected disabled to be a boolean");
|
|
26
|
+
for (const handler of [onDrop, onDragEnter, onDragOver, onDragLeave, onDragEnd, onError]) if (handler !== undefined && typeof handler !== "function") throw new SparkError("E_INVALID_ARGUMENT", "Expected a drag event callback");
|
|
27
|
+
const availability = getDragDropAvailability();
|
|
28
|
+
const [failed, setFailed] = useState(false);
|
|
29
|
+
const mounted = useRef(false), reported = useRef<string | undefined>(undefined);
|
|
30
|
+
useLayoutEffect(() => { mounted.current = true; return () => { mounted.current = false; }; }, []);
|
|
31
|
+
const unavailable = !availability.available ? availability.reason : undefined;
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (unavailable && reported.current !== unavailable) {
|
|
34
|
+
reported.current = unavailable;
|
|
35
|
+
onError(new SparkError(unavailable === "unsupported-platform" ? "E_UNSUPPORTED_PLATFORM" : "E_MODULE_UNAVAILABLE", "Drag and drop is unavailable"));
|
|
36
|
+
}
|
|
37
|
+
}, [unavailable, onError]);
|
|
38
|
+
function receive<T>(event: Event, parse: (json: string) => T, handler?: (value: T) => void) {
|
|
39
|
+
if (!mounted.current || disabled || failed) return;
|
|
40
|
+
let value: T;
|
|
41
|
+
try { value = parse(event?.nativeEvent?.json); }
|
|
42
|
+
catch (cause) { onError(cause instanceof SparkError ? cause : new SparkError("E_INVALID_DATA", "Invalid native drag event", { cause })); return; }
|
|
43
|
+
handler?.(value);
|
|
44
|
+
}
|
|
45
|
+
function error(event: Event) {
|
|
46
|
+
if (!mounted.current || failed) return;
|
|
47
|
+
let value: { message: string; unavailable: boolean };
|
|
48
|
+
try { value = parseNativeResult(event?.nativeEvent?.json, (value): value is { message: string; unavailable: boolean } => !!value && typeof value === "object" && "message" in value && typeof value.message === "string" && "unavailable" in value && typeof value.unavailable === "boolean"); }
|
|
49
|
+
catch (cause) { onError(cause as SparkError); return; }
|
|
50
|
+
if (value.unavailable) setFailed(true);
|
|
51
|
+
onError(new SparkError(value.unavailable ? "E_UNAVAILABLE" : "E_NATIVE", value.message));
|
|
52
|
+
}
|
|
53
|
+
if (!availability.available || failed) return <View {...props} />;
|
|
54
|
+
return <NativeView {...props} disabled={disabled} sourceJson={sourceJson} optionsJson={optionsJson} onError={error}
|
|
55
|
+
onDrop={event => receive(event, json => dragDrop(json, Platform.OS), onDrop)}
|
|
56
|
+
onDragEnter={event => receive(event, json => dragDrop(json, Platform.OS), onDragEnter)}
|
|
57
|
+
onDragOver={onDragOver ? event => receive(event, dragPosition, onDragOver) : undefined}
|
|
58
|
+
onDragLeave={() => { if (mounted.current && !disabled && !failed) onDragLeave?.(); }}
|
|
59
|
+
onDragEnd={event => receive(event, dragEnd, onDragEnd)} />;
|
|
60
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
|
|
4
|
+
<PropertyGroup Label="Microsoft.ReactNative Experimental Features">
|
|
5
|
+
<!--
|
|
6
|
+
Required for building a New Architecture project.
|
|
7
|
+
|
|
8
|
+
Library projects can change this value to test against Old and New
|
|
9
|
+
Architectures when building the library project's local sln file.
|
|
10
|
+
|
|
11
|
+
Otherwise this value will be decided by the consuming RNW app.
|
|
12
|
+
|
|
13
|
+
See https://microsoft.github.io/react-native-windows/docs/new-architecture
|
|
14
|
+
-->
|
|
15
|
+
<RnwNewArch>true</RnwNewArch>
|
|
16
|
+
|
|
17
|
+
<!--
|
|
18
|
+
Changes compilation to assume use of Microsoft.ReactNative NuGet packages
|
|
19
|
+
instead of building the framework from source. Defaults to true.
|
|
20
|
+
|
|
21
|
+
This is set during library project creation and is used when building
|
|
22
|
+
the library project's local sln file.
|
|
23
|
+
|
|
24
|
+
Otherwise this value will be decided by the consuming RNW app.
|
|
25
|
+
|
|
26
|
+
See https://microsoft.github.io/react-native-windows/docs/nuget
|
|
27
|
+
-->
|
|
28
|
+
<UseExperimentalNuget>true</UseExperimentalNuget>
|
|
29
|
+
|
|
30
|
+
<ReactExperimentalFeaturesSet>true</ReactExperimentalFeaturesSet>
|
|
31
|
+
</PropertyGroup>
|
|
32
|
+
|
|
33
|
+
</Project>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Portions derived from React Native:
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|