@adea-ai/app-framework 0.0.0-stage → 0.24.0
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 +201 -0
- package/NOTICE +30 -0
- package/README.md +967 -2
- package/dist/app/application.d.ts +47 -0
- package/dist/app/application.js +115 -0
- package/dist/app/create-application.d.ts +13 -0
- package/dist/app/create-application.js +178 -0
- package/dist/app/service-registry.d.ts +44 -0
- package/dist/app/service-registry.js +116 -0
- package/dist/appearance/appearance-host.d.ts +62 -0
- package/dist/appearance/appearance-host.js +115 -0
- package/dist/appearance/appearance-preferences.d.ts +106 -0
- package/dist/appearance/appearance-preferences.js +175 -0
- package/dist/appearance/composition.d.ts +11 -0
- package/dist/appearance/composition.js +16 -0
- package/dist/appearance/custom-theme-import.d.ts +14 -0
- package/dist/appearance/custom-theme-import.js +315 -0
- package/dist/appearance/custom-theme-library.d.ts +146 -0
- package/dist/appearance/custom-theme-library.js +378 -0
- package/dist/appearance/editor.d.ts +20 -0
- package/dist/appearance/editor.js +47 -0
- package/dist/appearance/theme-file-importer.d.ts +23 -0
- package/dist/appearance/theme-file-importer.js +66 -0
- package/dist/appearance/theme-record-adapter.d.ts +26 -0
- package/dist/appearance/theme-record-adapter.js +64 -0
- package/dist/appearance/theme-registry.d.ts +10 -0
- package/dist/appearance/theme-registry.js +16 -0
- package/dist/appearance/window-surface.d.ts +5 -0
- package/dist/appearance/window-surface.js +9 -0
- package/dist/ci/toolchain-identity.d.ts +39 -0
- package/dist/ci/toolchain-identity.js +196 -0
- package/dist/cli/cef-helper-cli.d.ts +2 -0
- package/dist/cli/cef-helper-cli.js +18 -0
- package/dist/cli/cli-runner.d.ts +8 -0
- package/dist/cli/cli-runner.js +23 -0
- package/dist/cli/create-application-cli.d.ts +2 -0
- package/dist/cli/create-application-cli.js +40 -0
- package/dist/cli/electrobun-shortcut-patch-cli.d.ts +2 -0
- package/dist/cli/electrobun-shortcut-patch-cli.js +17 -0
- package/dist/cli/framework-update-cli.d.ts +2 -0
- package/dist/cli/framework-update-cli.js +40 -0
- package/dist/cli/release-assets-plan-cli.d.ts +2 -0
- package/dist/cli/release-assets-plan-cli.js +14 -0
- package/dist/cli/release-cut-cli.d.ts +2 -0
- package/dist/cli/release-cut-cli.js +27 -0
- package/dist/cli/release-descriptor-staging-cli.d.ts +2 -0
- package/dist/cli/release-descriptor-staging-cli.js +45 -0
- package/dist/cli/release-finalize-cli.d.ts +1 -0
- package/dist/cli/release-finalize-cli.js +30 -0
- package/dist/cli/release-promote-cli.d.ts +2 -0
- package/dist/cli/release-promote-cli.js +32 -0
- package/dist/cli/release-publish-cli.d.ts +2 -0
- package/dist/cli/release-publish-cli.js +48 -0
- package/dist/cli/release-sign-cli.d.ts +2 -0
- package/dist/cli/release-sign-cli.js +13 -0
- package/dist/cli/release-step-cli.d.ts +2 -0
- package/dist/cli/release-step-cli.js +44 -0
- package/dist/cli/toolchain-identity-cli.d.ts +2 -0
- package/dist/cli/toolchain-identity-cli.js +10 -0
- package/dist/cli/update-helper-cli.d.ts +1 -0
- package/dist/cli/update-helper-cli.js +10 -0
- package/dist/cli/windows-runtime-patch-cli.d.ts +2 -0
- package/dist/cli/windows-runtime-patch-cli.js +17 -0
- package/dist/desktop/application-command-client.d.ts +15 -0
- package/dist/desktop/application-command-client.js +21 -0
- package/dist/desktop/channel-handshake.d.ts +32 -0
- package/dist/desktop/channel-handshake.js +111 -0
- package/dist/desktop/channel-proof.d.ts +43 -0
- package/dist/desktop/channel-proof.js +85 -0
- package/dist/desktop/client-assets.d.ts +7 -0
- package/dist/desktop/client-assets.js +59 -0
- package/dist/desktop/desktop-client.d.ts +23 -0
- package/dist/desktop/desktop-client.js +231 -0
- package/dist/desktop/desktop-gateway.d.ts +18 -0
- package/dist/desktop/desktop-gateway.js +146 -0
- package/dist/desktop/desktop-host.d.ts +48 -0
- package/dist/desktop/desktop-host.js +208 -0
- package/dist/desktop/desktop-stream.d.ts +36 -0
- package/dist/desktop/desktop-stream.js +231 -0
- package/dist/desktop/loopback-policy.d.ts +19 -0
- package/dist/desktop/loopback-policy.js +23 -0
- package/dist/desktop/open-url-channel.d.ts +15 -0
- package/dist/desktop/open-url-channel.js +55 -0
- package/dist/desktop/string-policy.d.ts +2 -0
- package/dist/desktop/string-policy.js +11 -0
- package/dist/framework-source.json +1 -0
- package/dist/installer/archive-entry.d.ts +6 -0
- package/dist/installer/archive-entry.js +14 -0
- package/dist/installer/command-artifact.d.ts +47 -0
- package/dist/installer/command-artifact.js +261 -0
- package/dist/installer/command-qualification-command.d.ts +12 -0
- package/dist/installer/command-qualification-command.js +71 -0
- package/dist/installer/hosted-runner.d.ts +4 -0
- package/dist/installer/hosted-runner.js +10 -0
- package/dist/installer/installed-payload.d.ts +29 -0
- package/dist/installer/installed-payload.js +312 -0
- package/dist/installer/installer-ci-bootstrap.d.ts +26 -0
- package/dist/installer/installer-ci-bootstrap.js +160 -0
- package/dist/installer/installer-ci-preflight.d.ts +1 -0
- package/dist/installer/installer-ci-preflight.js +49 -0
- package/dist/installer/installer-ci-worker.d.ts +1 -0
- package/dist/installer/installer-ci-worker.js +105 -0
- package/dist/installer/installer-extraction.d.ts +14 -0
- package/dist/installer/installer-extraction.js +289 -0
- package/dist/installer/installer-fetch-guard.d.ts +15 -0
- package/dist/installer/installer-fetch-guard.js +50 -0
- package/dist/installer/installer-identity.d.ts +23 -0
- package/dist/installer/installer-identity.js +286 -0
- package/dist/installer/installer-layout.d.ts +21 -0
- package/dist/installer/installer-layout.js +89 -0
- package/dist/installer/installer-observation.d.ts +64 -0
- package/dist/installer/installer-observation.js +473 -0
- package/dist/installer/installer-process-cleanup.d.ts +18 -0
- package/dist/installer/installer-process-cleanup.js +158 -0
- package/dist/installer/installer-qualification-command.d.ts +11 -0
- package/dist/installer/installer-qualification-command.js +71 -0
- package/dist/installer/installer-renderer-evidence.d.ts +43 -0
- package/dist/installer/installer-renderer-evidence.js +136 -0
- package/dist/installer/installer-upgrade-command.d.ts +37 -0
- package/dist/installer/installer-upgrade-command.js +172 -0
- package/dist/installer/installer-worker-guard.d.ts +21 -0
- package/dist/installer/installer-worker-guard.js +72 -0
- package/dist/installer/native-executable.d.ts +5 -0
- package/dist/installer/native-executable.js +21 -0
- package/dist/installer/upgrade-asset-download.d.ts +13 -0
- package/dist/installer/upgrade-asset-download.js +41 -0
- package/dist/installer/write-all.d.ts +6 -0
- package/dist/installer/write-all.js +11 -0
- package/dist/native/app-bundle.d.ts +28 -0
- package/dist/native/app-bundle.js +60 -0
- package/dist/native/cef-helper.d.ts +28 -0
- package/dist/native/cef-helper.js +402 -0
- package/dist/native/desktop-build-hook.d.ts +7 -0
- package/dist/native/desktop-build-hook.js +20 -0
- package/dist/native/electrobun-source-patch.d.ts +25 -0
- package/dist/native/electrobun-source-patch.js +93 -0
- package/dist/native/linux-cef-links.d.ts +2 -0
- package/dist/native/linux-cef-links.js +15 -0
- package/dist/native/native-secret-store.d.ts +27 -0
- package/dist/native/native-secret-store.js +70 -0
- package/dist/native/native-utilities.d.ts +24 -0
- package/dist/native/native-utilities.js +85 -0
- package/dist/native/partitioned-window.d.ts +34 -0
- package/dist/native/partitioned-window.js +44 -0
- package/dist/native/renderer-profile.d.ts +53 -0
- package/dist/native/renderer-profile.js +30 -0
- package/dist/native/secure-window.d.ts +38 -0
- package/dist/native/secure-window.js +77 -0
- package/dist/native/sidecar-services.d.ts +23 -0
- package/dist/native/sidecar-services.js +46 -0
- package/dist/native/sidecar.d.ts +81 -0
- package/dist/native/sidecar.js +250 -0
- package/dist/native/window-bootstrap.d.ts +24 -0
- package/dist/native/window-bootstrap.js +63 -0
- package/dist/native/window-options.d.ts +32 -0
- package/dist/native/window-options.js +23 -0
- package/dist/native/windows-build-hook-internal.d.ts +2 -0
- package/dist/native/windows-build-hook-internal.js +32 -0
- package/dist/native/windows-build-hook.d.ts +2 -0
- package/dist/native/windows-build-hook.js +12 -0
- package/dist/native/windows-runtime-patch-internal.d.ts +3 -0
- package/dist/native/windows-runtime-patch-internal.js +20 -0
- package/dist/native/windows-runtime-patch.d.ts +4 -0
- package/dist/native/windows-runtime-patch.js +12 -0
- package/dist/release/feed-release-cut.d.ts +23 -0
- package/dist/release/feed-release-cut.js +93 -0
- package/dist/release/feed-state.d.ts +25 -0
- package/dist/release/feed-state.js +81 -0
- package/dist/release/framework-package-publish.d.ts +21 -0
- package/dist/release/framework-package-publish.js +125 -0
- package/dist/release/framework-update.d.ts +30 -0
- package/dist/release/framework-update.js +139 -0
- package/dist/release/github-cli.d.ts +6 -0
- package/dist/release/github-cli.js +16 -0
- package/dist/release/github-release-assets.d.ts +3 -0
- package/dist/release/github-release-assets.js +24 -0
- package/dist/release/github-release-cut.d.ts +14 -0
- package/dist/release/github-release-cut.js +174 -0
- package/dist/release/github-release-lookup.d.ts +7 -0
- package/dist/release/github-release-lookup.js +29 -0
- package/dist/release/github-release-promotion.d.ts +10 -0
- package/dist/release/github-release-promotion.js +78 -0
- package/dist/release/github-release-provenance.d.ts +9 -0
- package/dist/release/github-release-provenance.js +27 -0
- package/dist/release/github-release-publisher.d.ts +9 -0
- package/dist/release/github-release-publisher.js +63 -0
- package/dist/release/github-release-qualification.d.ts +12 -0
- package/dist/release/github-release-qualification.js +80 -0
- package/dist/release/local-provenance.d.ts +24 -0
- package/dist/release/local-provenance.js +72 -0
- package/dist/release/local-release.d.ts +133 -0
- package/dist/release/local-release.js +387 -0
- package/dist/release/macos-dmg.d.ts +22 -0
- package/dist/release/macos-dmg.js +91 -0
- package/dist/release/release-artifact.d.ts +6 -0
- package/dist/release/release-artifact.js +38 -0
- package/dist/release/release-assets-plan.d.ts +14 -0
- package/dist/release/release-assets-plan.js +65 -0
- package/dist/release/release-config.d.ts +76 -0
- package/dist/release/release-config.js +180 -0
- package/dist/release/release-cut-command.d.ts +13 -0
- package/dist/release/release-cut-command.js +39 -0
- package/dist/release/release-cut.d.ts +54 -0
- package/dist/release/release-cut.js +76 -0
- package/dist/release/release-descriptor-staging.d.ts +34 -0
- package/dist/release/release-descriptor-staging.js +147 -0
- package/dist/release/release-finalize.d.ts +16 -0
- package/dist/release/release-finalize.js +104 -0
- package/dist/release/release-promotion-command.d.ts +12 -0
- package/dist/release/release-promotion-command.js +28 -0
- package/dist/release/release-promotion.d.ts +29 -0
- package/dist/release/release-promotion.js +57 -0
- package/dist/release/release-publication.d.ts +33 -0
- package/dist/release/release-publication.js +138 -0
- package/dist/release/release-publish-command.d.ts +7 -0
- package/dist/release/release-publish-command.js +91 -0
- package/dist/release/release-qualification.d.ts +106 -0
- package/dist/release/release-qualification.js +135 -0
- package/dist/release/release-staging.d.ts +9 -0
- package/dist/release/release-staging.js +61 -0
- package/dist/release/release-steps.d.ts +38 -0
- package/dist/release/release-steps.js +147 -0
- package/dist/release/retained-release-build.d.ts +19 -0
- package/dist/release/retained-release-build.js +122 -0
- package/dist/shell/app-shell.d.ts +61 -0
- package/dist/shell/app-shell.js +318 -0
- package/dist/shell/app-utilities.d.ts +122 -0
- package/dist/shell/app-utilities.js +334 -0
- package/dist/shell/application-menu-commands.d.ts +5 -0
- package/dist/shell/application-menu-commands.js +11 -0
- package/dist/shell/application-menu.d.ts +61 -0
- package/dist/shell/application-menu.js +208 -0
- package/dist/shell/help-shortcuts.d.ts +12 -0
- package/dist/shell/help-shortcuts.js +22 -0
- package/dist/shell/settings-sections.d.ts +31 -0
- package/dist/shell/settings-sections.js +50 -0
- package/dist/shell/shortcut-platform.d.ts +17 -0
- package/dist/shell/shortcut-platform.js +25 -0
- package/dist/update-helper.bundle.js +260 -0
- package/dist/updates/channel-update-manager.d.ts +46 -0
- package/dist/updates/channel-update-manager.js +114 -0
- package/dist/updates/desktop-updater.d.ts +104 -0
- package/dist/updates/desktop-updater.js +345 -0
- package/dist/updates/release-feed.d.ts +61 -0
- package/dist/updates/release-feed.js +111 -0
- package/dist/updates/release-location.d.ts +9 -0
- package/dist/updates/release-location.js +80 -0
- package/dist/updates/release-version.d.ts +12 -0
- package/dist/updates/release-version.js +43 -0
- package/dist/updates/signed-release.d.ts +63 -0
- package/dist/updates/signed-release.js +162 -0
- package/dist/updates/stable-file.d.ts +10 -0
- package/dist/updates/stable-file.js +22 -0
- package/dist/updates/update-adapter.d.ts +57 -0
- package/dist/updates/update-adapter.js +72 -0
- package/dist/updates/update-arm.d.ts +24 -0
- package/dist/updates/update-arm.js +95 -0
- package/dist/updates/update-channel-store.d.ts +8 -0
- package/dist/updates/update-channel-store.js +72 -0
- package/dist/updates/update-discovery.d.ts +13 -0
- package/dist/updates/update-discovery.js +56 -0
- package/dist/updates/update-download.d.ts +14 -0
- package/dist/updates/update-download.js +67 -0
- package/dist/updates/update-exclusive-rename.d.ts +2 -0
- package/dist/updates/update-exclusive-rename.js +52 -0
- package/dist/updates/update-extraction.d.ts +18 -0
- package/dist/updates/update-extraction.js +183 -0
- package/dist/updates/update-handoff-plan.d.ts +22 -0
- package/dist/updates/update-handoff-plan.js +28 -0
- package/dist/updates/update-helper.d.ts +24 -0
- package/dist/updates/update-helper.js +56 -0
- package/dist/updates/update-launch.d.ts +5 -0
- package/dist/updates/update-launch.js +27 -0
- package/dist/updates/update-manager.d.ts +40 -0
- package/dist/updates/update-manager.js +83 -0
- package/dist/updates/update-process-fence.d.ts +10 -0
- package/dist/updates/update-process-fence.js +114 -0
- package/dist/updates/update-resume.d.ts +13 -0
- package/dist/updates/update-resume.js +34 -0
- package/dist/updates/update-shutdown.d.ts +15 -0
- package/dist/updates/update-shutdown.js +29 -0
- package/dist/updates/update-state.d.ts +30 -0
- package/dist/updates/update-state.js +18 -0
- package/dist/updates/update-swap-stage.d.ts +27 -0
- package/dist/updates/update-swap-stage.js +58 -0
- package/dist/updates/update-swap.d.ts +10 -0
- package/dist/updates/update-swap.js +30 -0
- package/dist/views/app-about.d.ts +22 -0
- package/dist/views/app-about.js +43 -0
- package/dist/views/app-appearance.d.ts +11 -0
- package/dist/views/app-appearance.js +42 -0
- package/dist/views/app-help.d.ts +17 -0
- package/dist/views/app-help.js +42 -0
- package/dist/views/app-settings.d.ts +26 -0
- package/dist/views/app-settings.js +97 -0
- package/dist/views/appearance-surface.d.ts +9 -0
- package/dist/views/appearance-surface.js +334 -0
- package/dist/views/update-surface.d.ts +34 -0
- package/dist/views/update-surface.js +64 -0
- package/package.json +363 -4
- package/src/app/application.tsx +138 -0
- package/src/app/create-application.ts +245 -0
- package/src/app/service-registry.ts +124 -0
- package/src/appearance/appearance-host.tsx +205 -0
- package/src/appearance/appearance-preferences.ts +287 -0
- package/src/appearance/composition.ts +29 -0
- package/src/appearance/custom-theme-import.ts +424 -0
- package/src/appearance/custom-theme-library.ts +600 -0
- package/src/appearance/editor.ts +94 -0
- package/src/appearance/theme-file-importer.ts +103 -0
- package/src/appearance/theme-record-adapter.ts +106 -0
- package/src/appearance/theme-registry.ts +20 -0
- package/src/appearance/window-surface.ts +18 -0
- package/src/ci/toolchain-identity.ts +244 -0
- package/src/cli/cef-helper-cli.ts +21 -0
- package/src/cli/cli-runner.ts +29 -0
- package/src/cli/create-application-cli.ts +62 -0
- package/src/cli/electrobun-shortcut-patch-cli.ts +24 -0
- package/src/cli/framework-update-cli.ts +41 -0
- package/src/cli/release-assets-plan-cli.ts +14 -0
- package/src/cli/release-cut-cli.ts +41 -0
- package/src/cli/release-descriptor-staging-cli.ts +57 -0
- package/src/cli/release-finalize-cli.ts +34 -0
- package/src/cli/release-promote-cli.ts +31 -0
- package/src/cli/release-publish-cli.ts +46 -0
- package/src/cli/release-sign-cli.ts +24 -0
- package/src/cli/release-step-cli.ts +71 -0
- package/src/cli/toolchain-identity-cli.ts +12 -0
- package/src/cli/update-helper-cli.ts +12 -0
- package/src/cli/windows-runtime-patch-cli.ts +17 -0
- package/src/desktop/application-command-client.ts +43 -0
- package/src/desktop/channel-handshake.ts +136 -0
- package/src/desktop/channel-proof.ts +122 -0
- package/src/desktop/client-assets.ts +75 -0
- package/src/desktop/desktop-client.ts +303 -0
- package/src/desktop/desktop-gateway.ts +189 -0
- package/src/desktop/desktop-host.ts +335 -0
- package/src/desktop/desktop-stream.ts +324 -0
- package/src/desktop/loopback-policy.ts +41 -0
- package/src/desktop/open-url-channel.ts +79 -0
- package/src/desktop/string-policy.ts +9 -0
- package/src/installer/archive-entry.ts +32 -0
- package/src/installer/command-artifact.ts +307 -0
- package/src/installer/command-qualification-command.ts +75 -0
- package/src/installer/hosted-runner.ts +11 -0
- package/src/installer/installed-payload.ts +408 -0
- package/src/installer/installer-ci-bootstrap.ts +199 -0
- package/src/installer/installer-ci-preflight.ts +61 -0
- package/src/installer/installer-ci-worker.ts +105 -0
- package/src/installer/installer-extraction.ts +367 -0
- package/src/installer/installer-fetch-guard.ts +75 -0
- package/src/installer/installer-identity.ts +331 -0
- package/src/installer/installer-layout.ts +167 -0
- package/src/installer/installer-observation.ts +671 -0
- package/src/installer/installer-process-cleanup.ts +167 -0
- package/src/installer/installer-qualification-command.ts +81 -0
- package/src/installer/installer-renderer-evidence.ts +268 -0
- package/src/installer/installer-upgrade-command.ts +226 -0
- package/src/installer/installer-worker-guard.ts +112 -0
- package/src/installer/native-executable.ts +37 -0
- package/src/installer/upgrade-asset-download.ts +72 -0
- package/src/installer/write-all.ts +19 -0
- package/src/native/app-bundle.ts +86 -0
- package/src/native/cef-helper.ts +471 -0
- package/src/native/desktop-build-hook.ts +21 -0
- package/src/native/electrobun-cef-main-frame-bridges.patch +63 -0
- package/src/native/electrobun-source-patch.ts +107 -0
- package/src/native/electrobun-windows-shortcut-com.patch +923 -0
- package/src/native/linux-cef-links.ts +14 -0
- package/src/native/native-secret-store.ts +99 -0
- package/src/native/native-utilities.ts +166 -0
- package/src/native/partitioned-window.ts +62 -0
- package/src/native/renderer-profile.ts +27 -0
- package/src/native/secure-window.ts +115 -0
- package/src/native/sidecar-services.ts +71 -0
- package/src/native/sidecar.ts +387 -0
- package/src/native/window-bootstrap.ts +77 -0
- package/src/native/window-options.ts +24 -0
- package/src/native/windows-build-hook-internal.ts +49 -0
- package/src/native/windows-build-hook.ts +12 -0
- package/src/native/windows-runtime-patch-internal.ts +48 -0
- package/src/native/windows-runtime-patch.ts +15 -0
- package/src/release/feed-release-cut.ts +110 -0
- package/src/release/feed-state.ts +135 -0
- package/src/release/framework-package-publish.ts +163 -0
- package/src/release/framework-update.ts +196 -0
- package/src/release/github-cli.ts +27 -0
- package/src/release/github-release-assets.ts +36 -0
- package/src/release/github-release-cut.ts +237 -0
- package/src/release/github-release-lookup.ts +39 -0
- package/src/release/github-release-promotion.ts +112 -0
- package/src/release/github-release-provenance.ts +65 -0
- package/src/release/github-release-publisher.ts +90 -0
- package/src/release/github-release-qualification.ts +144 -0
- package/src/release/local-provenance.ts +92 -0
- package/src/release/local-release.ts +525 -0
- package/src/release/macos-dmg.ts +113 -0
- package/src/release/release-artifact.ts +53 -0
- package/src/release/release-assets-plan.ts +118 -0
- package/src/release/release-config.ts +420 -0
- package/src/release/release-cut-command.ts +80 -0
- package/src/release/release-cut.ts +133 -0
- package/src/release/release-descriptor-staging.ts +242 -0
- package/src/release/release-finalize.ts +191 -0
- package/src/release/release-promotion-command.ts +36 -0
- package/src/release/release-promotion.ts +132 -0
- package/src/release/release-publication.ts +213 -0
- package/src/release/release-publish-command.ts +163 -0
- package/src/release/release-qualification.ts +397 -0
- package/src/release/release-staging.ts +87 -0
- package/src/release/release-steps.ts +173 -0
- package/src/release/retained-release-build.ts +217 -0
- package/src/shell/app-shell.tsx +285 -0
- package/src/shell/app-utilities.tsx +437 -0
- package/src/shell/application-menu-commands.ts +6 -0
- package/src/shell/application-menu.ts +250 -0
- package/src/shell/help-shortcuts.ts +24 -0
- package/src/shell/settings-sections.ts +74 -0
- package/src/shell/shortcut-platform.ts +35 -0
- package/src/updates/channel-update-manager.ts +127 -0
- package/src/updates/desktop-updater.ts +440 -0
- package/src/updates/release-feed.ts +187 -0
- package/src/updates/release-location.ts +101 -0
- package/src/updates/release-version.ts +57 -0
- package/src/updates/signed-release.ts +311 -0
- package/src/updates/stable-file.ts +32 -0
- package/src/updates/update-adapter.ts +129 -0
- package/src/updates/update-arm.ts +107 -0
- package/src/updates/update-channel-store.ts +86 -0
- package/src/updates/update-discovery.ts +113 -0
- package/src/updates/update-download.ts +82 -0
- package/src/updates/update-exclusive-rename.ts +58 -0
- package/src/updates/update-extraction.ts +261 -0
- package/src/updates/update-handoff-plan.ts +75 -0
- package/src/updates/update-helper.ts +87 -0
- package/src/updates/update-launch.ts +33 -0
- package/src/updates/update-manager.ts +130 -0
- package/src/updates/update-process-fence.ts +125 -0
- package/src/updates/update-resume.ts +34 -0
- package/src/updates/update-shutdown.ts +37 -0
- package/src/updates/update-state.ts +34 -0
- package/src/updates/update-swap-stage.ts +75 -0
- package/src/updates/update-swap.ts +30 -0
- package/src/views/app-about.tsx +44 -0
- package/src/views/app-appearance.tsx +32 -0
- package/src/views/app-help.tsx +43 -0
- package/src/views/app-settings.tsx +88 -0
- package/src/views/appearance-surface.tsx +427 -0
- package/src/views/update-surface.tsx +85 -0
- package/templates/application/.gitattributes +1 -0
- package/templates/application/.github/workflows/release-assets.yml +29 -0
- package/templates/application/.github/workflows/release-finalize.yml +29 -0
- package/templates/application/.github/workflows/release-please.yml +19 -0
- package/templates/application/.github/workflows/release.yml +29 -0
- package/templates/application/.github/workflows/validation.yml +28 -0
- package/templates/application/.oxfmtrc.json +6 -0
- package/templates/application/.oxlintrc.json +48 -0
- package/templates/application/.release-please-manifest.json +3 -0
- package/templates/application/README.md +47 -0
- package/templates/application/electrobun.config.ts +22 -0
- package/templates/application/release-please-config.json +12 -0
- package/templates/application/scripts/app-version.ts +9 -0
- package/templates/application/scripts/build-desktop.ts +34 -0
- package/templates/application/scripts/secure-build.ts +1 -0
- package/templates/application/scripts/stage-release.ts +21 -0
- package/templates/application/src/bun/index.ts +80 -0
- package/templates/application/src/electrobun.d.ts +27 -0
- package/templates/application/src/web/index.html +12 -0
- package/templates/application/src/web/main.tsx +97 -0
- package/templates/application/src/web/public/icon.svg +1 -0
- package/templates/application/src/web/style.css +3 -0
- package/templates/application/tests/app-config.test.ts +9 -0
- package/templates/application/tsconfig.json +15 -0
- package/templates/application/vite.config.ts +10 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineSettingsSections, isSettingsHash, settingsGroups, settingsHash, settingsSectionFromHash } from "../shell/settings-sections.js";
|
|
2
|
+
import { createComponent, insert, memo, template } from "solid-js/web";
|
|
3
|
+
import { For, Show, untrack } from "solid-js";
|
|
4
|
+
import { ModalDialog } from "@adea-ai/ui/components/ui/modal-dialog";
|
|
5
|
+
import { SettingsLayout } from "@adea-ai/ui/components/composites/settings";
|
|
6
|
+
import { TabsContent } from "@adea-ai/ui/components/ui/tabs";
|
|
7
|
+
import { Text } from "@adea-ai/ui/components/ui/typography";
|
|
8
|
+
// src/views/app-settings.tsx
|
|
9
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class="flex min-w-0 flex-col gap-4">`);
|
|
10
|
+
/**
|
|
11
|
+
* Grouped settings navigation beside the selected app-owned panel, for an app that shows
|
|
12
|
+
* settings as a page. `ApplicationSettings` shows the same panel in a dialog.
|
|
13
|
+
*/
|
|
14
|
+
function ApplicationSettingsPanel(props) {
|
|
15
|
+
const active = () => props.sections.find((section) => section.id === props.section) ?? props.sections[0];
|
|
16
|
+
const panels = () => createComponent(For, {
|
|
17
|
+
get each() {
|
|
18
|
+
return props.sections.map((section) => section.id);
|
|
19
|
+
},
|
|
20
|
+
children: (id) => {
|
|
21
|
+
const section = () => props.sections.find((candidate) => candidate.id === id);
|
|
22
|
+
return createComponent(TabsContent, {
|
|
23
|
+
value: id,
|
|
24
|
+
get children() {
|
|
25
|
+
return createComponent(Show, {
|
|
26
|
+
get when() {
|
|
27
|
+
return active()?.id === id;
|
|
28
|
+
},
|
|
29
|
+
get children() {
|
|
30
|
+
var _el$ = _tmpl$();
|
|
31
|
+
insert(_el$, createComponent(Show, {
|
|
32
|
+
get when() {
|
|
33
|
+
return section()?.description;
|
|
34
|
+
},
|
|
35
|
+
children: (description) => createComponent(Text, {
|
|
36
|
+
tone: "muted",
|
|
37
|
+
get children() {
|
|
38
|
+
return description();
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}), null);
|
|
42
|
+
insert(_el$, () => untrack(() => section()?.render()), null);
|
|
43
|
+
return _el$;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return createComponent(SettingsLayout, {
|
|
51
|
+
"aria-label": "Settings sections",
|
|
52
|
+
get groups() {
|
|
53
|
+
return settingsGroups(props.sections);
|
|
54
|
+
},
|
|
55
|
+
get value() {
|
|
56
|
+
return active()?.id ?? "";
|
|
57
|
+
},
|
|
58
|
+
get onChange() {
|
|
59
|
+
return props.onSectionChange;
|
|
60
|
+
},
|
|
61
|
+
get children() {
|
|
62
|
+
return memo(() => !!props.wrap)() ? props.wrap(panels()) : panels();
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/** The shared settings dialog: grouped navigation beside the selected app-owned panel. */
|
|
67
|
+
function ApplicationSettings(props) {
|
|
68
|
+
return createComponent(ModalDialog, {
|
|
69
|
+
get open() {
|
|
70
|
+
return props.open;
|
|
71
|
+
},
|
|
72
|
+
get onClose() {
|
|
73
|
+
return props.onClose;
|
|
74
|
+
},
|
|
75
|
+
get title() {
|
|
76
|
+
return props.title ?? "Settings";
|
|
77
|
+
},
|
|
78
|
+
size: "settings",
|
|
79
|
+
get restoreFocusRef() {
|
|
80
|
+
return props.restoreFocusRef;
|
|
81
|
+
},
|
|
82
|
+
get children() {
|
|
83
|
+
return createComponent(ApplicationSettingsPanel, {
|
|
84
|
+
get sections() {
|
|
85
|
+
return props.sections;
|
|
86
|
+
},
|
|
87
|
+
get section() {
|
|
88
|
+
return props.section;
|
|
89
|
+
},
|
|
90
|
+
get onSectionChange() {
|
|
91
|
+
return props.onSectionChange;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export { ApplicationSettings, ApplicationSettingsPanel, defineSettingsSections, isSettingsHash, settingsGroups, settingsHash, settingsSectionFromHash };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type AppearanceControlProps = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpen(): void;
|
|
4
|
+
onClose(): void;
|
|
5
|
+
};
|
|
6
|
+
export declare function AppearancePanel(): import("solid-js").JSX.Element;
|
|
7
|
+
/** Device-local preview and persistence around the shared live popover. */
|
|
8
|
+
export declare function AppearanceControl(props: AppearanceControlProps): import("solid-js").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { preferencesFromSelection } from "../appearance/appearance-preferences.js";
|
|
2
|
+
import { readCustomThemeLibrary, removeCustomTheme, subscribeCustomThemes } from "../appearance/custom-theme-library.js";
|
|
3
|
+
import { useTheme } from "../appearance/appearance-host.js";
|
|
4
|
+
import { draftVariants } from "../appearance/composition.js";
|
|
5
|
+
import { createAppearanceEditor } from "../appearance/editor.js";
|
|
6
|
+
import { createThemeFileImporter } from "../appearance/theme-file-importer.js";
|
|
7
|
+
import { DEFAULT_CUSTOM_ACCENT, allThemeRecords, appearanceThemeForPreview, normalizeCustomAccent } from "../appearance/theme-record-adapter.js";
|
|
8
|
+
import { mirrorWindowSurface } from "../appearance/window-surface.js";
|
|
9
|
+
import { createComponent, effect, insert, mergeProps, setAttribute, template } from "solid-js/web";
|
|
10
|
+
import { For, Show, createEffect, createMemo, createSignal, onCleanup, onMount, untrack } from "solid-js";
|
|
11
|
+
import { MonitorCog } from "lucide-solid";
|
|
12
|
+
import { isThemeAccentId } from "@adea-ai/ui/lib/themes";
|
|
13
|
+
import { accents, getAccent } from "@adea-ai/ui/lib/accent-presets";
|
|
14
|
+
import { themeAccentsForRecords } from "@adea-ai/ui/lib/theme-projection";
|
|
15
|
+
import { ModalDialog } from "@adea-ai/ui/components/ui/modal-dialog";
|
|
16
|
+
import { Heading } from "@adea-ai/ui/components/ui/typography";
|
|
17
|
+
import { AppearanceEditor, AppearancePopover } from "@adea-ai/ui/components/composites/appearance-editor";
|
|
18
|
+
import { Button } from "@adea-ai/ui/components/ui/button";
|
|
19
|
+
import { Input } from "@adea-ai/ui/components/ui/input";
|
|
20
|
+
// src/views/appearance-surface.tsx
|
|
21
|
+
var _tmpl$ = /*#__PURE__*/ template(`<p class="text-sm text-muted-foreground"role=status>`);
|
|
22
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<ul class="flex flex-col gap-2">`);
|
|
23
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<div class="flex flex-col gap-4">`);
|
|
24
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<footer class="flex justify-end">`);
|
|
25
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<section aria-label=Appearance class="grid gap-4"><header class="flex items-start gap-3"><div><p>Changes preview immediately. Save keeps them; leaving this section without saving restores your previous appearance.`);
|
|
26
|
+
var _tmpl$6 = /*#__PURE__*/ template(`<li class="flex items-center gap-2"><span class=font-medium></span><span class="text-sm text-muted-foreground"> · imported `);
|
|
27
|
+
var appearanceAccentOptions = Object.freeze(accents.map((accent) => ({ ...accent })));
|
|
28
|
+
function customAccentValue(accent) {
|
|
29
|
+
return accent === "theme" || getAccent(accent) || isThemeAccentId(accent) ? "" : accent;
|
|
30
|
+
}
|
|
31
|
+
function AppearancePanel() {
|
|
32
|
+
return createComponent(AppearanceHost, {});
|
|
33
|
+
}
|
|
34
|
+
/** Device-local preview and persistence around the shared live popover. */
|
|
35
|
+
function AppearanceControl(props) {
|
|
36
|
+
return createComponent(AppearanceHost, { popover: props });
|
|
37
|
+
}
|
|
38
|
+
function AppearanceHost(props) {
|
|
39
|
+
const appearance = useTheme();
|
|
40
|
+
const editor = createAppearanceEditor();
|
|
41
|
+
onMount(() => void appearance.loadCatalogue?.());
|
|
42
|
+
createEffect(() => {
|
|
43
|
+
const surface = editor.draft().surface;
|
|
44
|
+
mirrorWindowSurface(surface === "translucent" ? "theme" : surface);
|
|
45
|
+
});
|
|
46
|
+
const [customAccent, setCustomAccent] = createSignal("");
|
|
47
|
+
const [rawCustomAccent, setRawCustomAccent] = createSignal("");
|
|
48
|
+
const [accentStatus, setAccentStatus] = createSignal("");
|
|
49
|
+
const [libraryOpen, setLibraryOpen] = createSignal(false);
|
|
50
|
+
const miniatures = createMemo(() => draftVariants(editor.draft()));
|
|
51
|
+
const [library, setLibrary] = createSignal(readCustomThemeLibrary(typeof window === "undefined" ? void 0 : window.localStorage));
|
|
52
|
+
onMount(() => {
|
|
53
|
+
setLibrary(readCustomThemeLibrary(window.localStorage));
|
|
54
|
+
onCleanup(subscribeCustomThemes(() => setLibrary(readCustomThemeLibrary(window.localStorage))));
|
|
55
|
+
});
|
|
56
|
+
const themes = () => {
|
|
57
|
+
library();
|
|
58
|
+
return allThemeRecords();
|
|
59
|
+
};
|
|
60
|
+
const [importStatus, setImportStatus] = createSignal("");
|
|
61
|
+
const [importPending, setImportPending] = createSignal(false);
|
|
62
|
+
const themeImporter = createThemeFileImporter({
|
|
63
|
+
load: async () => {
|
|
64
|
+
const { importCustomTheme } = await import("../appearance/custom-theme-import.js");
|
|
65
|
+
return (text) => importCustomTheme(text, window.localStorage, readCustomThemeLibrary(window.localStorage));
|
|
66
|
+
},
|
|
67
|
+
onPending: setImportPending,
|
|
68
|
+
onStatus: setImportStatus,
|
|
69
|
+
onImported: (theme) => setDraft(theme.appearance === "dark" ? { darkThemeId: theme.id } : { lightThemeId: theme.id })
|
|
70
|
+
});
|
|
71
|
+
onCleanup(themeImporter.cancel);
|
|
72
|
+
const closeLibrary = () => {
|
|
73
|
+
themeImporter.cancel();
|
|
74
|
+
setLibraryOpen(false);
|
|
75
|
+
};
|
|
76
|
+
const themeAccentOptions = createMemo(() => {
|
|
77
|
+
const draft = editor.draft();
|
|
78
|
+
const records = themes();
|
|
79
|
+
const light = records.find((record) => record.id === draft.lightThemeId);
|
|
80
|
+
const dark = records.find((record) => record.id === draft.darkThemeId);
|
|
81
|
+
return light && dark ? themeAccentsForRecords(light, dark) : [];
|
|
82
|
+
});
|
|
83
|
+
const publishedDraft = createMemo(() => {
|
|
84
|
+
const draft = editor.draft();
|
|
85
|
+
return {
|
|
86
|
+
...draft,
|
|
87
|
+
accent: rawCustomAccent() && !getAccent(draft.accent) && !isThemeAccentId(draft.accent) && draft.accent !== "theme" ? rawCustomAccent() : draft.accent,
|
|
88
|
+
surface: draft.surface === "translucent" ? "theme" : draft.surface
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
const sampleVariant = () => {
|
|
92
|
+
const variants = miniatures();
|
|
93
|
+
const mode = editor.draft().mode;
|
|
94
|
+
if (mode === "light") return variants.light;
|
|
95
|
+
if (mode === "dark") return variants.dark;
|
|
96
|
+
return untrack(() => document.documentElement.classList.contains("dark")) ? variants.dark : variants.light;
|
|
97
|
+
};
|
|
98
|
+
const preview = () => appearance.preview(editor.draft());
|
|
99
|
+
const revertDraft = () => {
|
|
100
|
+
appearance.preview(void 0);
|
|
101
|
+
const reverted = editor.revert();
|
|
102
|
+
setCustomAccent(customAccentValue(reverted.accent));
|
|
103
|
+
setRawCustomAccent(customAccentValue(reverted.accent));
|
|
104
|
+
setAccentStatus("");
|
|
105
|
+
closeLibrary();
|
|
106
|
+
};
|
|
107
|
+
const setDraft = (patch) => {
|
|
108
|
+
editor.set(patch);
|
|
109
|
+
preview();
|
|
110
|
+
};
|
|
111
|
+
const setAccent = (value) => {
|
|
112
|
+
if (value === "theme" || getAccent(value) || isThemeAccentId(value)) {
|
|
113
|
+
setCustomAccent("");
|
|
114
|
+
setRawCustomAccent("");
|
|
115
|
+
setAccentStatus("");
|
|
116
|
+
setDraft({ accent: value });
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const validation = normalizeCustomAccent(value, sampleVariant().colors.background);
|
|
120
|
+
if (validation.value === void 0) {
|
|
121
|
+
setRawCustomAccent(value);
|
|
122
|
+
setAccentStatus(validation.error ?? "Invalid custom accent.");
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
setCustomAccent(validation.value);
|
|
126
|
+
setRawCustomAccent(validation.value);
|
|
127
|
+
setAccentStatus("");
|
|
128
|
+
setDraft({ accent: validation.value });
|
|
129
|
+
};
|
|
130
|
+
const onChange = (patch) => {
|
|
131
|
+
if (patch.accent !== void 0) {
|
|
132
|
+
setAccent(patch.accent);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (patch.surface !== void 0) {
|
|
136
|
+
setDraft({ surface: patch.surface === "theme" ? "translucent" : patch.surface });
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
setDraft(patch);
|
|
140
|
+
};
|
|
141
|
+
const save = () => {
|
|
142
|
+
if (accentStatus()) return;
|
|
143
|
+
if (!editor.dirty()) {
|
|
144
|
+
revertDraft();
|
|
145
|
+
props.popover?.onClose();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const committed = editor.save();
|
|
149
|
+
appearance.update(committed);
|
|
150
|
+
appearance.preview(void 0);
|
|
151
|
+
props.popover?.onClose();
|
|
152
|
+
};
|
|
153
|
+
const reset = () => {
|
|
154
|
+
editor.reset();
|
|
155
|
+
setCustomAccent("");
|
|
156
|
+
setRawCustomAccent("");
|
|
157
|
+
setAccentStatus("");
|
|
158
|
+
preview();
|
|
159
|
+
};
|
|
160
|
+
const openDraft = () => {
|
|
161
|
+
const committed = untrack(() => preferencesFromSelection(appearance.selection()));
|
|
162
|
+
editor.open(committed);
|
|
163
|
+
setCustomAccent(customAccentValue(committed.accent));
|
|
164
|
+
setRawCustomAccent(customAccentValue(committed.accent));
|
|
165
|
+
setAccentStatus("");
|
|
166
|
+
closeLibrary();
|
|
167
|
+
};
|
|
168
|
+
onMount(openDraft);
|
|
169
|
+
onCleanup(revertDraft);
|
|
170
|
+
const editorProps = {
|
|
171
|
+
get draft() {
|
|
172
|
+
return publishedDraft();
|
|
173
|
+
},
|
|
174
|
+
get lightTheme() {
|
|
175
|
+
return appearanceThemeForPreview(miniatures().light, editor.draft().accent, editor.draft());
|
|
176
|
+
},
|
|
177
|
+
get darkTheme() {
|
|
178
|
+
return appearanceThemeForPreview(miniatures().dark, editor.draft().accent, editor.draft());
|
|
179
|
+
},
|
|
180
|
+
get resolvedAppearance() {
|
|
181
|
+
return appearance.resolvedAppearance();
|
|
182
|
+
},
|
|
183
|
+
get themes() {
|
|
184
|
+
return themes();
|
|
185
|
+
},
|
|
186
|
+
fontSettingsPlacement: "end",
|
|
187
|
+
accentEntryStyle: "row",
|
|
188
|
+
showThemeDefaultAccent: false,
|
|
189
|
+
showModeIcons: true,
|
|
190
|
+
accentOptions: appearanceAccentOptions,
|
|
191
|
+
get themeAccentOptions() {
|
|
192
|
+
return themeAccentOptions();
|
|
193
|
+
},
|
|
194
|
+
get customAccentValue() {
|
|
195
|
+
return customAccent() || DEFAULT_CUSTOM_ACCENT;
|
|
196
|
+
},
|
|
197
|
+
get customAccentError() {
|
|
198
|
+
return accentStatus();
|
|
199
|
+
},
|
|
200
|
+
get saveDisabledReason() {
|
|
201
|
+
if (props.popover) return void 0;
|
|
202
|
+
return editor.dirty() ? void 0 : "No changes to save yet.";
|
|
203
|
+
},
|
|
204
|
+
surfaceCapability: {
|
|
205
|
+
frosted: true,
|
|
206
|
+
themeDefaultDescription: "Frosted makes the whole window translucent on macOS (applies after a relaunch)."
|
|
207
|
+
},
|
|
208
|
+
onChange,
|
|
209
|
+
onSave: save,
|
|
210
|
+
onCancel: () => {
|
|
211
|
+
revertDraft();
|
|
212
|
+
props.popover?.onClose();
|
|
213
|
+
},
|
|
214
|
+
onReset: reset,
|
|
215
|
+
onManageThemes: () => setLibraryOpen(true)
|
|
216
|
+
};
|
|
217
|
+
return [createComponent(Show, {
|
|
218
|
+
get when() {
|
|
219
|
+
return props.popover;
|
|
220
|
+
},
|
|
221
|
+
get fallback() {
|
|
222
|
+
return (() => {
|
|
223
|
+
var _el$5 = _tmpl$5(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
|
|
224
|
+
insert(_el$6, createComponent(MonitorCog, { "aria-hidden": "true" }), _el$7);
|
|
225
|
+
insert(_el$7, createComponent(Heading, {
|
|
226
|
+
as: "h3",
|
|
227
|
+
size: "card",
|
|
228
|
+
children: "Appearance"
|
|
229
|
+
}), _el$8);
|
|
230
|
+
insert(_el$5, createComponent(AppearanceEditor, editorProps), null);
|
|
231
|
+
return _el$5;
|
|
232
|
+
})();
|
|
233
|
+
},
|
|
234
|
+
children: (control) => createComponent(AppearancePopover, mergeProps(editorProps, {
|
|
235
|
+
triggerVariant: "toolbar",
|
|
236
|
+
get open() {
|
|
237
|
+
return control().open;
|
|
238
|
+
},
|
|
239
|
+
onOpen: () => {
|
|
240
|
+
openDraft();
|
|
241
|
+
control().onOpen();
|
|
242
|
+
},
|
|
243
|
+
onDismiss: () => {
|
|
244
|
+
revertDraft();
|
|
245
|
+
control().onClose();
|
|
246
|
+
}
|
|
247
|
+
}))
|
|
248
|
+
}), createComponent(ModalDialog, {
|
|
249
|
+
get modal() {
|
|
250
|
+
return props.popover !== void 0;
|
|
251
|
+
},
|
|
252
|
+
get open() {
|
|
253
|
+
return libraryOpen();
|
|
254
|
+
},
|
|
255
|
+
onClose: closeLibrary,
|
|
256
|
+
title: "Manage themes",
|
|
257
|
+
description: "Import a theme file. Imported themes appear in the Light and Dark theme menus and stay on this device.",
|
|
258
|
+
"class": "max-h-full w-full max-w-104 overflow-y-auto",
|
|
259
|
+
get children() {
|
|
260
|
+
return [(() => {
|
|
261
|
+
var _el$ = _tmpl$3();
|
|
262
|
+
insert(_el$, createComponent(Button, {
|
|
263
|
+
as: "label",
|
|
264
|
+
"class": "w-full",
|
|
265
|
+
get children() {
|
|
266
|
+
return [createComponent(Input, {
|
|
267
|
+
type: "file",
|
|
268
|
+
accept: ".json,application/json",
|
|
269
|
+
"class": "sr-only",
|
|
270
|
+
onChange: (event) => {
|
|
271
|
+
const file = event.currentTarget.files?.[0];
|
|
272
|
+
event.currentTarget.value = "";
|
|
273
|
+
if (file) themeImporter.importFile(file);
|
|
274
|
+
}
|
|
275
|
+
}), "Import a theme file (.json)"];
|
|
276
|
+
}
|
|
277
|
+
}), null);
|
|
278
|
+
insert(_el$, createComponent(Show, {
|
|
279
|
+
get when() {
|
|
280
|
+
return importStatus();
|
|
281
|
+
},
|
|
282
|
+
get children() {
|
|
283
|
+
var _el$2 = _tmpl$();
|
|
284
|
+
insert(_el$2, importStatus);
|
|
285
|
+
effect(() => setAttribute(_el$2, "aria-busy", importPending()));
|
|
286
|
+
return _el$2;
|
|
287
|
+
}
|
|
288
|
+
}), null);
|
|
289
|
+
insert(_el$, createComponent(Show, {
|
|
290
|
+
get when() {
|
|
291
|
+
return library().length > 0;
|
|
292
|
+
},
|
|
293
|
+
get children() {
|
|
294
|
+
var _el$3 = _tmpl$2();
|
|
295
|
+
insert(_el$3, createComponent(For, {
|
|
296
|
+
get each() {
|
|
297
|
+
return library();
|
|
298
|
+
},
|
|
299
|
+
children: (theme) => (() => {
|
|
300
|
+
var _el$9 = _tmpl$6(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
|
|
301
|
+
insert(_el$0, () => theme.name);
|
|
302
|
+
insert(_el$1, () => theme.appearance, _el$10);
|
|
303
|
+
insert(_el$1, () => new Date(theme.importedAt).toLocaleDateString(), null);
|
|
304
|
+
insert(_el$9, createComponent(Button, {
|
|
305
|
+
type: "button",
|
|
306
|
+
size: "sm",
|
|
307
|
+
variant: "ghost",
|
|
308
|
+
onClick: () => {
|
|
309
|
+
const removed = removeCustomTheme(theme.id, typeof window === "undefined" ? void 0 : window.localStorage);
|
|
310
|
+
setImportStatus(removed ? "" : "The theme could not be removed. Check your storage and try again.");
|
|
311
|
+
},
|
|
312
|
+
children: "Remove"
|
|
313
|
+
}), null);
|
|
314
|
+
return _el$9;
|
|
315
|
+
})()
|
|
316
|
+
}));
|
|
317
|
+
return _el$3;
|
|
318
|
+
}
|
|
319
|
+
}), null);
|
|
320
|
+
return _el$;
|
|
321
|
+
})(), (() => {
|
|
322
|
+
var _el$4 = _tmpl$4();
|
|
323
|
+
insert(_el$4, createComponent(Button, {
|
|
324
|
+
type: "button",
|
|
325
|
+
variant: "outline",
|
|
326
|
+
onClick: () => closeLibrary(),
|
|
327
|
+
children: "Close"
|
|
328
|
+
}));
|
|
329
|
+
return _el$4;
|
|
330
|
+
})()];
|
|
331
|
+
}
|
|
332
|
+
})];
|
|
333
|
+
}
|
|
334
|
+
export { AppearanceControl, AppearancePanel };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ChannelControlActions, type UpdateAdapter, type UpdateChannel, type UpdateState } from '@adea-ai/ui/components/composites/update-dialog';
|
|
2
|
+
import { type Accessor } from 'solid-js';
|
|
3
|
+
import { type UpdateChannelSource } from '../updates/update-adapter';
|
|
4
|
+
export * from '../updates/update-adapter';
|
|
5
|
+
export type { ChannelControlActions };
|
|
6
|
+
export type ApplicationUpdateSurfaceProps = {
|
|
7
|
+
adapter: UpdateAdapter;
|
|
8
|
+
/** The application's name, icon and build version shown by the dialog. */
|
|
9
|
+
identity: Readonly<{
|
|
10
|
+
name: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
version?: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** Release-channel persistence: `read`/`persist`, or a service with `channel`/`setChannel`. */
|
|
15
|
+
channel?: UpdateChannelSource;
|
|
16
|
+
/** Per-channel option labels, e.g. `{ 'pre-release': 'Daily' }`. */
|
|
17
|
+
channelLabels?: Partial<Record<UpdateChannel, string>>;
|
|
18
|
+
/** Per-channel row descriptions. */
|
|
19
|
+
channelDescriptions?: Partial<Record<UpdateChannel, string>>;
|
|
20
|
+
/** Receives every updater snapshot, for a pending-update badge. */
|
|
21
|
+
onUpdateState?(state: UpdateState): void;
|
|
22
|
+
/** Complete build-time history, shown before the native status arrives. */
|
|
23
|
+
changelog?: string;
|
|
24
|
+
/** Copy for a build without an installer. */
|
|
25
|
+
desktopOnlyMessage?: string;
|
|
26
|
+
open: boolean;
|
|
27
|
+
/** Called when the dialog asks to close. */
|
|
28
|
+
onClose?(): void;
|
|
29
|
+
/** Called with every open-state change the dialog requests. */
|
|
30
|
+
onOpenChange?(open: boolean): void;
|
|
31
|
+
restoreFocusRef?: Accessor<HTMLElement | undefined>;
|
|
32
|
+
};
|
|
33
|
+
/** The shared Version & updates dialog, with an optional release-channel control. */
|
|
34
|
+
export declare function ApplicationUpdateSurface(props: ApplicationUpdateSurfaceProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { browserUpdateAdapter, mirrorUpdateState, nativeUpdateAdapter, updateChannelStore, updateStateFromNative } from "../updates/update-adapter.js";
|
|
2
|
+
import { createComponent } from "solid-js/web";
|
|
3
|
+
import { createMemo } from "solid-js";
|
|
4
|
+
import { UpdateChannelControl, UpdateDialog } from "@adea-ai/ui/components/composites/update-dialog";
|
|
5
|
+
// src/views/update-surface.tsx
|
|
6
|
+
/** Updates only move forward, so leaving a pre-release channel never installs an older
|
|
7
|
+
* build: the app keeps the current one until a newer Stable release is published. */
|
|
8
|
+
var STABLE_DESCRIPTION = "Tested releases after about four days in pre-release. Switching from a newer pre-release keeps your current build until a newer Stable release is published.";
|
|
9
|
+
/** The shared Version & updates dialog, with an optional release-channel control. */
|
|
10
|
+
function ApplicationUpdateSurface(props) {
|
|
11
|
+
const adapter = createMemo(() => {
|
|
12
|
+
const onState = props.onUpdateState;
|
|
13
|
+
return onState ? mirrorUpdateState(props.adapter, (state) => onState(state)) : props.adapter;
|
|
14
|
+
});
|
|
15
|
+
const channel = createMemo(() => props.channel ? updateChannelStore(props.channel) : void 0);
|
|
16
|
+
return createComponent(UpdateDialog, {
|
|
17
|
+
get adapter() {
|
|
18
|
+
return adapter();
|
|
19
|
+
},
|
|
20
|
+
get appName() {
|
|
21
|
+
return props.identity.name;
|
|
22
|
+
},
|
|
23
|
+
get appIcon() {
|
|
24
|
+
return props.identity.icon;
|
|
25
|
+
},
|
|
26
|
+
get fallbackVersion() {
|
|
27
|
+
return props.identity.version;
|
|
28
|
+
},
|
|
29
|
+
get changelog() {
|
|
30
|
+
return props.changelog;
|
|
31
|
+
},
|
|
32
|
+
get desktopOnlyMessage() {
|
|
33
|
+
return props.desktopOnlyMessage;
|
|
34
|
+
},
|
|
35
|
+
get open() {
|
|
36
|
+
return props.open;
|
|
37
|
+
},
|
|
38
|
+
onOpenChange: (open) => {
|
|
39
|
+
props.onOpenChange?.(open);
|
|
40
|
+
if (!open) props.onClose?.();
|
|
41
|
+
},
|
|
42
|
+
get restoreFocusRef() {
|
|
43
|
+
return props.restoreFocusRef;
|
|
44
|
+
},
|
|
45
|
+
get channelControl() {
|
|
46
|
+
return channel() ? (controls) => createComponent(UpdateChannelControl, {
|
|
47
|
+
controls,
|
|
48
|
+
read: () => channel().read(),
|
|
49
|
+
persist: (value) => channel().persist(value),
|
|
50
|
+
get labels() {
|
|
51
|
+
return props.channelLabels;
|
|
52
|
+
},
|
|
53
|
+
get descriptions() {
|
|
54
|
+
return {
|
|
55
|
+
stable: STABLE_DESCRIPTION,
|
|
56
|
+
...props.channelDescriptions
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
reloadOn: () => props.open
|
|
60
|
+
}) : void 0;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export { ApplicationUpdateSurface, browserUpdateAdapter, mirrorUpdateState, nativeUpdateAdapter, updateChannelStore, updateStateFromNative };
|