@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,217 @@
|
|
|
1
|
+
import { githubCli } from './github-cli'
|
|
2
|
+
import { createGitHubReleaseCutProvider } from './github-release-cut'
|
|
3
|
+
import { parseReleaseConfig, platformPayloads, workflowFile } from './release-config'
|
|
4
|
+
import { planReleaseAssets, releasePlanGitHubEnvironment } from './release-assets-plan'
|
|
5
|
+
import { lookupRelease } from './github-release-lookup'
|
|
6
|
+
import type { InstallerPlatform } from '../installer/installer-layout'
|
|
7
|
+
|
|
8
|
+
type Selection =
|
|
9
|
+
| { reuse: false }
|
|
10
|
+
| { reuse: true; artifactId: string; runId: string; runAttempt: number; digest: string }
|
|
11
|
+
const record = (value: unknown): value is Record<string, unknown> =>
|
|
12
|
+
typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
13
|
+
const id = (value: unknown): string => {
|
|
14
|
+
if (typeof value === 'number' && !Number.isSafeInteger(value))
|
|
15
|
+
throw new Error('Invalid GitHub identity')
|
|
16
|
+
const text = String(value)
|
|
17
|
+
if (!/^[1-9]\d{0,19}$/.test(text)) throw new Error('Invalid GitHub identity')
|
|
18
|
+
return text
|
|
19
|
+
}
|
|
20
|
+
/** Find the first trusted retained platform build, or refuse rebuilding published bytes. */
|
|
21
|
+
export async function selectRetainedReleaseBuild(options: {
|
|
22
|
+
env: Record<string, string | undefined>
|
|
23
|
+
config: unknown
|
|
24
|
+
tag: string
|
|
25
|
+
platform: InstallerPlatform
|
|
26
|
+
run?: (args: string[], input?: string) => Promise<string>
|
|
27
|
+
}): Promise<Selection> {
|
|
28
|
+
const { env, config, tag, platform } = options
|
|
29
|
+
if (
|
|
30
|
+
!['macos-arm64', 'windows-x64', 'linux-x64'].includes(platform) ||
|
|
31
|
+
!record(config) ||
|
|
32
|
+
typeof config.appName !== 'string' ||
|
|
33
|
+
env.RELEASE_TAG !== tag
|
|
34
|
+
)
|
|
35
|
+
throw new Error('Invalid retained build context')
|
|
36
|
+
const run = options.run ?? githubCli(releasePlanGitHubEnvironment(env))
|
|
37
|
+
const plan = await planReleaseAssets({ env, config, tag, run })
|
|
38
|
+
if (env.SOURCE_SHA !== plan.sourceSha) throw new Error('Retained build source mismatch')
|
|
39
|
+
const parsed = parseReleaseConfig(config),
|
|
40
|
+
assetsWorkflow = parsed.releaseWorkflows.assets,
|
|
41
|
+
requirements = parsed.requirements(tag)
|
|
42
|
+
if (requirements.platforms[platform]?.length !== 2)
|
|
43
|
+
throw new Error('Invalid platform requirements')
|
|
44
|
+
const expected = platformPayloads(requirements, platform)
|
|
45
|
+
const repository = env.GITHUB_REPOSITORY!,
|
|
46
|
+
base = `repos/${repository}`
|
|
47
|
+
const read = async (path: string): Promise<unknown> => JSON.parse(await run(['api', path]))
|
|
48
|
+
const release = await lookupRelease({
|
|
49
|
+
tag,
|
|
50
|
+
base,
|
|
51
|
+
read,
|
|
52
|
+
includeDraft: true,
|
|
53
|
+
})
|
|
54
|
+
// The build job's token cannot list drafts; planning already admitted this tag as the
|
|
55
|
+
// hidden Release Please draft, which holds no published payload yet.
|
|
56
|
+
const hiddenDraft = release === null
|
|
57
|
+
if (!hiddenDraft && (!record(release) || release.tag_name !== tag))
|
|
58
|
+
throw new Error('Invalid release assets')
|
|
59
|
+
const releaseAssets: unknown[] = []
|
|
60
|
+
if (!hiddenDraft) {
|
|
61
|
+
const releaseId = id((release as { id?: unknown }).id)
|
|
62
|
+
for (let page = 1; page <= 10; page++) {
|
|
63
|
+
const assets = await read(`${base}/releases/${releaseId}/assets?per_page=100&page=${page}`)
|
|
64
|
+
if (!Array.isArray(assets) || assets.length > 100) throw new Error('Invalid release assets')
|
|
65
|
+
releaseAssets.push(...assets)
|
|
66
|
+
if (assets.length < 100) break
|
|
67
|
+
if (page === 10) throw new Error('Too many release assets')
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (
|
|
71
|
+
releaseAssets.some((asset) => !record(asset) || typeof asset.name !== 'string') ||
|
|
72
|
+
new Set(releaseAssets.map((asset) => (asset as { name: string }).name)).size !==
|
|
73
|
+
releaseAssets.length
|
|
74
|
+
)
|
|
75
|
+
throw new Error('Invalid release assets')
|
|
76
|
+
const published = expected.some((name) =>
|
|
77
|
+
releaseAssets.some((asset) => (asset as { name: string }).name === name)
|
|
78
|
+
)
|
|
79
|
+
const provider = createGitHubReleaseCutProvider({
|
|
80
|
+
repository,
|
|
81
|
+
appName: config.appName,
|
|
82
|
+
requirements: parsed.requirements,
|
|
83
|
+
assetsWorkflow,
|
|
84
|
+
releasePleaseManifestPath: parsed.releasePleaseManifestPath,
|
|
85
|
+
run,
|
|
86
|
+
})
|
|
87
|
+
const candidates: Selection[] = [],
|
|
88
|
+
seenArtifacts = new Set<string>(),
|
|
89
|
+
seenRuns = new Set<string>()
|
|
90
|
+
for (let page = 1; page <= 10; page++) {
|
|
91
|
+
const response = await read(
|
|
92
|
+
`${base}/actions/workflows/${workflowFile(assetsWorkflow)}/runs?event=workflow_dispatch&per_page=100&page=${page}`
|
|
93
|
+
)
|
|
94
|
+
if (
|
|
95
|
+
!record(response) ||
|
|
96
|
+
!Array.isArray(response.workflow_runs) ||
|
|
97
|
+
response.workflow_runs.length > 100
|
|
98
|
+
)
|
|
99
|
+
throw new Error('Invalid release workflow listing')
|
|
100
|
+
for (const value of response.workflow_runs) {
|
|
101
|
+
if (
|
|
102
|
+
!record(value) ||
|
|
103
|
+
value.display_title !== `framework-release-assets:${tag}` ||
|
|
104
|
+
value.head_branch !== 'main' ||
|
|
105
|
+
value.event !== 'workflow_dispatch' ||
|
|
106
|
+
value.path !== assetsWorkflow
|
|
107
|
+
)
|
|
108
|
+
continue
|
|
109
|
+
const runId = id(value.id)
|
|
110
|
+
if (seenRuns.has(runId)) throw new Error('Duplicate workflow run')
|
|
111
|
+
seenRuns.add(runId)
|
|
112
|
+
if (value.status !== 'completed' && runId !== env.GITHUB_RUN_ID) continue
|
|
113
|
+
if (
|
|
114
|
+
typeof value.head_sha !== 'string' ||
|
|
115
|
+
!/^[a-f0-9]{40}$/.test(value.head_sha) ||
|
|
116
|
+
!(await provider.isMainAncestor(value.head_sha))
|
|
117
|
+
)
|
|
118
|
+
throw new Error('Untrusted retained workflow')
|
|
119
|
+
for (let artifactPage = 1; artifactPage <= 10; artifactPage++) {
|
|
120
|
+
const listing = await read(
|
|
121
|
+
`${base}/actions/runs/${runId}/artifacts?per_page=100&page=${artifactPage}`
|
|
122
|
+
)
|
|
123
|
+
if (!record(listing) || !Array.isArray(listing.artifacts) || listing.artifacts.length > 100)
|
|
124
|
+
throw new Error('Invalid retained artifact listing')
|
|
125
|
+
for (const artifact of listing.artifacts) {
|
|
126
|
+
if (!record(artifact) || typeof artifact.name !== 'string')
|
|
127
|
+
throw new Error('Invalid retained artifact')
|
|
128
|
+
const prefix = `framework-build-${tag}-${platform}-${plan.sourceSha}-r${runId}-a`
|
|
129
|
+
if (!artifact.name.startsWith(prefix)) continue
|
|
130
|
+
const attemptText = artifact.name.slice(prefix.length)
|
|
131
|
+
if (artifact.expired === true) continue
|
|
132
|
+
if (
|
|
133
|
+
!/^[1-9]\d{0,8}$/.test(attemptText) ||
|
|
134
|
+
artifact.expired !== false ||
|
|
135
|
+
typeof artifact.digest !== 'string' ||
|
|
136
|
+
!/^sha256:[a-f0-9]{64}$/.test(artifact.digest) ||
|
|
137
|
+
!Number.isSafeInteger(artifact.size_in_bytes) ||
|
|
138
|
+
Number(artifact.size_in_bytes) < 1 ||
|
|
139
|
+
!record(artifact.workflow_run) ||
|
|
140
|
+
id(artifact.workflow_run.id) !== runId ||
|
|
141
|
+
artifact.workflow_run.head_sha !== value.head_sha ||
|
|
142
|
+
artifact.workflow_run.head_branch !== 'main'
|
|
143
|
+
)
|
|
144
|
+
throw new Error('Invalid retained artifact provenance')
|
|
145
|
+
const artifactId = id(artifact.id)
|
|
146
|
+
if (seenArtifacts.has(artifactId)) throw new Error('Duplicate retained artifact')
|
|
147
|
+
seenArtifacts.add(artifactId)
|
|
148
|
+
const attempt = Number(attemptText)
|
|
149
|
+
if (runId === env.GITHUB_RUN_ID && attempt >= Number(env.GITHUB_RUN_ATTEMPT)) continue
|
|
150
|
+
const attemptRun = await read(`${base}/actions/runs/${runId}/attempts/${attempt}`)
|
|
151
|
+
if (
|
|
152
|
+
!record(attemptRun) ||
|
|
153
|
+
id(attemptRun.id) !== runId ||
|
|
154
|
+
attemptRun.run_attempt !== attempt ||
|
|
155
|
+
attemptRun.head_sha !== value.head_sha ||
|
|
156
|
+
attemptRun.head_branch !== 'main' ||
|
|
157
|
+
attemptRun.event !== 'workflow_dispatch' ||
|
|
158
|
+
attemptRun.path !== assetsWorkflow ||
|
|
159
|
+
attemptRun.display_title !== `framework-release-assets:${tag}` ||
|
|
160
|
+
!record(attemptRun.repository) ||
|
|
161
|
+
attemptRun.repository.full_name !== repository ||
|
|
162
|
+
attemptRun.status !== 'completed'
|
|
163
|
+
)
|
|
164
|
+
throw new Error('Retained attempt provenance mismatch')
|
|
165
|
+
const jobs: Record<string, unknown>[] = []
|
|
166
|
+
for (let jobPage = 1; jobPage <= 10; jobPage++) {
|
|
167
|
+
const data = await read(
|
|
168
|
+
`${base}/actions/runs/${runId}/attempts/${attempt}/jobs?per_page=100&page=${jobPage}`
|
|
169
|
+
)
|
|
170
|
+
if (
|
|
171
|
+
!record(data) ||
|
|
172
|
+
!Array.isArray(data.jobs) ||
|
|
173
|
+
data.jobs.length > 100 ||
|
|
174
|
+
data.jobs.some((job) => !record(job))
|
|
175
|
+
)
|
|
176
|
+
throw new Error('Invalid retained job listing')
|
|
177
|
+
jobs.push(...(data.jobs as Record<string, unknown>[]))
|
|
178
|
+
if (data.jobs.length < 100) break
|
|
179
|
+
if (jobPage === 10) throw new Error('Too many retained jobs')
|
|
180
|
+
}
|
|
181
|
+
const build = jobs.filter((job) => job.name === `Build / ${platform}`)
|
|
182
|
+
if (
|
|
183
|
+
build.length !== 1 ||
|
|
184
|
+
build[0]!.status !== 'completed' ||
|
|
185
|
+
build[0]!.conclusion !== 'success'
|
|
186
|
+
)
|
|
187
|
+
throw new Error('Retained build job is not successful')
|
|
188
|
+
candidates.push({
|
|
189
|
+
reuse: true,
|
|
190
|
+
artifactId,
|
|
191
|
+
runId,
|
|
192
|
+
runAttempt: attempt,
|
|
193
|
+
digest: artifact.digest,
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
if (listing.artifacts.length < 100) break
|
|
197
|
+
if (artifactPage === 10) throw new Error('Too many retained artifacts')
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (response.workflow_runs.length < 100) break
|
|
201
|
+
if (page === 10) throw new Error('Too many release workflow runs')
|
|
202
|
+
}
|
|
203
|
+
const sorted = candidates
|
|
204
|
+
.filter((value): value is Extract<Selection, { reuse: true }> => value.reuse)
|
|
205
|
+
// The filter creates a new array; keep ES2022 runtime compatibility.
|
|
206
|
+
// oxlint-disable-next-line unicorn/no-array-sort
|
|
207
|
+
.sort((left, right) =>
|
|
208
|
+
BigInt(left.runId) < BigInt(right.runId)
|
|
209
|
+
? -1
|
|
210
|
+
: BigInt(left.runId) > BigInt(right.runId)
|
|
211
|
+
? 1
|
|
212
|
+
: left.runAttempt - right.runAttempt
|
|
213
|
+
)
|
|
214
|
+
if (sorted.length) return sorted[0]!
|
|
215
|
+
if (published) throw new Error('Published payload has no retained build; refusing to rebuild')
|
|
216
|
+
return { reuse: false }
|
|
217
|
+
}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppShell,
|
|
3
|
+
AppShellBody,
|
|
4
|
+
AppShellContent,
|
|
5
|
+
AppShellMain,
|
|
6
|
+
SkipLink,
|
|
7
|
+
} from '@adea-ai/ui/components/layout/app-shell'
|
|
8
|
+
import {
|
|
9
|
+
ContextualSidebar,
|
|
10
|
+
type ContextualSidebarProps,
|
|
11
|
+
} from '@adea-ai/ui/components/layout/contextual-sidebar'
|
|
12
|
+
import { PixelPane } from '@adea-ai/ui/components/layout/pixel-pane'
|
|
13
|
+
import { ShellRail } from '@adea-ai/ui/components/layout/shell-rail'
|
|
14
|
+
import { ShellTopBar } from '@adea-ai/ui/components/layout/shell-top-bar'
|
|
15
|
+
import { SideRailItem, SideRailSection } from '@adea-ai/ui/components/layout/side-rail'
|
|
16
|
+
import { ActionButton } from '@adea-ai/ui/components/composites/action-button'
|
|
17
|
+
import { Sheet, SheetContent, SheetHeader, SheetTitle } from '@adea-ai/ui/components/ui/sheet'
|
|
18
|
+
import { TooltipProvider } from '@adea-ai/ui/components/ui/tooltip'
|
|
19
|
+
import { PanelLeftClose, PanelLeftIcon, PanelLeftOpen } from 'lucide-solid'
|
|
20
|
+
import { For, Show, createEffect, createSignal, onCleanup, onMount, type JSX } from 'solid-js'
|
|
21
|
+
|
|
22
|
+
export type ApplicationDestination = Readonly<{ id: string; label: string; icon: JSX.Element }>
|
|
23
|
+
export type ApplicationShellProps = {
|
|
24
|
+
name: string
|
|
25
|
+
mark: JSX.Element
|
|
26
|
+
destinations: readonly ApplicationDestination[]
|
|
27
|
+
activeDestination: string
|
|
28
|
+
onNavigate(id: string): void
|
|
29
|
+
title: JSX.Element
|
|
30
|
+
content: JSX.Element
|
|
31
|
+
sidebar?: ContextualSidebarProps
|
|
32
|
+
onSearch?: () => void
|
|
33
|
+
searchLabel?: string
|
|
34
|
+
searchKeys?: readonly string[]
|
|
35
|
+
footer?: JSX.Element
|
|
36
|
+
navigation?: JSX.Element
|
|
37
|
+
workspace?: JSX.Element
|
|
38
|
+
search?: JSX.Element
|
|
39
|
+
actions?: JSX.Element
|
|
40
|
+
status?: JSX.Element
|
|
41
|
+
draggable?: boolean
|
|
42
|
+
macosInset?: boolean
|
|
43
|
+
windowsInset?: boolean
|
|
44
|
+
/** Replaces the rail's destination list, for apps that compose their own sections. */
|
|
45
|
+
rail?: JSX.Element
|
|
46
|
+
/**
|
|
47
|
+
* Navigation for narrow windows, where the rail is hidden and the toolbar toggle opens
|
|
48
|
+
* this in a drawer. `close` dismisses the drawer, e.g. after a destination is chosen.
|
|
49
|
+
*/
|
|
50
|
+
drawer?(close: () => void): JSX.Element
|
|
51
|
+
/** When the window counts as narrow; defaults to `(max-width: 799px)`. */
|
|
52
|
+
narrowQuery?: string
|
|
53
|
+
/**
|
|
54
|
+
* A leading pane the app renders inside its own content (a multi-pane workspace), which
|
|
55
|
+
* the toolbar toggle and chord control in place of a contextual sidebar. `id` names the
|
|
56
|
+
* pane's element so the toggle can point at it.
|
|
57
|
+
*/
|
|
58
|
+
pane?: Readonly<{
|
|
59
|
+
open: boolean
|
|
60
|
+
onOpenChange(open: boolean): void
|
|
61
|
+
width?: number
|
|
62
|
+
id?: string
|
|
63
|
+
/** What the toggle names the pane, as in "Collapse sidebar"; defaults to `sidebar`. */
|
|
64
|
+
label?: string
|
|
65
|
+
}>
|
|
66
|
+
/**
|
|
67
|
+
* For apps whose views render their own `<main>`: the id of the active view's main
|
|
68
|
+
* landmark. The shell then wraps content in a plain container and the skip link targets
|
|
69
|
+
* this id instead of the shell's own main.
|
|
70
|
+
*/
|
|
71
|
+
viewLandmark?: string
|
|
72
|
+
/** Classes for the shell's root element. */
|
|
73
|
+
class?: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function createNarrow(query: () => string | undefined) {
|
|
77
|
+
const [narrow, setNarrow] = createSignal(false)
|
|
78
|
+
createEffect(() => {
|
|
79
|
+
const value = query()
|
|
80
|
+
if (!value || typeof window === 'undefined' || !window.matchMedia) return setNarrow(false)
|
|
81
|
+
const media = window.matchMedia(value)
|
|
82
|
+
const update = () => setNarrow(media.matches)
|
|
83
|
+
update()
|
|
84
|
+
media.addEventListener('change', update)
|
|
85
|
+
onCleanup(() => media.removeEventListener('change', update))
|
|
86
|
+
})
|
|
87
|
+
return narrow
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** Shared chrome and navigation composition; applications own routes and services. */
|
|
91
|
+
export function ApplicationShell(props: ApplicationShellProps) {
|
|
92
|
+
let sidebarToggle: HTMLButtonElement | undefined
|
|
93
|
+
const narrow = createNarrow(() =>
|
|
94
|
+
props.drawer ? (props.narrowQuery ?? '(max-width: 799px)') : undefined
|
|
95
|
+
)
|
|
96
|
+
const [drawerOpen, setDrawerOpen] = createSignal(false)
|
|
97
|
+
createEffect(() => {
|
|
98
|
+
if (!narrow()) setDrawerOpen(false)
|
|
99
|
+
})
|
|
100
|
+
const leading = () => props.sidebar ?? props.pane
|
|
101
|
+
const toggleVisible = () => narrow() || Boolean(leading())
|
|
102
|
+
const expanded = () => (narrow() ? drawerOpen() : Boolean(leading()?.open))
|
|
103
|
+
const toggleLabel = () => {
|
|
104
|
+
if (narrow()) return 'Toggle navigation'
|
|
105
|
+
const noun = props.sidebar ? 'contextual sidebar' : (props.pane?.label ?? 'sidebar')
|
|
106
|
+
return leading()?.open ? `Collapse ${noun}` : `Expand ${noun}`
|
|
107
|
+
}
|
|
108
|
+
const toggle = () => {
|
|
109
|
+
if (narrow()) return setDrawerOpen(!drawerOpen())
|
|
110
|
+
const current = leading()
|
|
111
|
+
current?.onOpenChange(!current.open)
|
|
112
|
+
}
|
|
113
|
+
const handleToggle = (event: KeyboardEvent) => {
|
|
114
|
+
if (
|
|
115
|
+
event.defaultPrevented ||
|
|
116
|
+
!toggleVisible() ||
|
|
117
|
+
!(event.metaKey || event.ctrlKey) ||
|
|
118
|
+
event.altKey ||
|
|
119
|
+
event.shiftKey ||
|
|
120
|
+
event.key.toLowerCase() !== 'b'
|
|
121
|
+
)
|
|
122
|
+
return
|
|
123
|
+
event.preventDefault()
|
|
124
|
+
toggle()
|
|
125
|
+
}
|
|
126
|
+
const handleSearch = (event: KeyboardEvent) => {
|
|
127
|
+
if (
|
|
128
|
+
!props.onSearch ||
|
|
129
|
+
event.defaultPrevented ||
|
|
130
|
+
!(event.metaKey || event.ctrlKey) ||
|
|
131
|
+
event.altKey ||
|
|
132
|
+
event.shiftKey ||
|
|
133
|
+
event.key.toLowerCase() !== 'k'
|
|
134
|
+
)
|
|
135
|
+
return
|
|
136
|
+
event.preventDefault()
|
|
137
|
+
props.onSearch()
|
|
138
|
+
}
|
|
139
|
+
onMount(() => {
|
|
140
|
+
window.addEventListener('keydown', handleSearch, { capture: true })
|
|
141
|
+
window.addEventListener('keydown', handleToggle)
|
|
142
|
+
onCleanup(() => {
|
|
143
|
+
window.removeEventListener('keydown', handleSearch, { capture: true })
|
|
144
|
+
window.removeEventListener('keydown', handleToggle)
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
return (
|
|
148
|
+
<TooltipProvider openDelay={150}>
|
|
149
|
+
<div class={`flex h-screen w-screen flex-col overflow-hidden ${props.class ?? ''}`}>
|
|
150
|
+
<SkipLink href={`#${props.viewLandmark ?? 'app-main'}`}>Skip to content</SkipLink>
|
|
151
|
+
<ShellTopBar
|
|
152
|
+
aria-label={`${props.name} toolbar`}
|
|
153
|
+
navigation={props.navigation}
|
|
154
|
+
workspace={props.workspace}
|
|
155
|
+
sidebarOpen={!narrow() && leading()?.open}
|
|
156
|
+
sidebarWidth={leading()?.width}
|
|
157
|
+
breadcrumb={props.title}
|
|
158
|
+
search={props.search}
|
|
159
|
+
actions={props.actions}
|
|
160
|
+
draggable={props.draggable}
|
|
161
|
+
macosInset={props.macosInset}
|
|
162
|
+
windowsInset={props.windowsInset}
|
|
163
|
+
sidebarToggle={
|
|
164
|
+
<Show when={toggleVisible()}>
|
|
165
|
+
<ActionButton
|
|
166
|
+
ref={(element) => (sidebarToggle = element)}
|
|
167
|
+
size="icon-sm"
|
|
168
|
+
variant="toolbar"
|
|
169
|
+
tooltip={toggleLabel()}
|
|
170
|
+
aria-label={toggleLabel()}
|
|
171
|
+
aria-expanded={expanded()}
|
|
172
|
+
aria-controls={narrow() || props.sidebar ? undefined : props.pane?.id}
|
|
173
|
+
onClick={toggle}
|
|
174
|
+
>
|
|
175
|
+
<Show
|
|
176
|
+
when={narrow()}
|
|
177
|
+
fallback={
|
|
178
|
+
<Show when={leading()?.open} fallback={<PanelLeftOpen aria-hidden="true" />}>
|
|
179
|
+
<PanelLeftClose aria-hidden="true" />
|
|
180
|
+
</Show>
|
|
181
|
+
}
|
|
182
|
+
>
|
|
183
|
+
<PanelLeftIcon aria-hidden="true" />
|
|
184
|
+
</Show>
|
|
185
|
+
</ActionButton>
|
|
186
|
+
</Show>
|
|
187
|
+
}
|
|
188
|
+
/>
|
|
189
|
+
<AppShell class="min-h-0 h-full flex-1">
|
|
190
|
+
<Show when={!narrow()}>
|
|
191
|
+
<ShellRail
|
|
192
|
+
aria-label={`${props.name} navigation`}
|
|
193
|
+
mark={props.mark}
|
|
194
|
+
onSearch={props.onSearch}
|
|
195
|
+
searchLabel={props.searchLabel}
|
|
196
|
+
searchKeyshortcuts={props.onSearch ? 'Meta+K Control+K' : undefined}
|
|
197
|
+
searchKeys={props.searchKeys}
|
|
198
|
+
footer={props.footer}
|
|
199
|
+
>
|
|
200
|
+
<Show
|
|
201
|
+
when={props.rail}
|
|
202
|
+
fallback={
|
|
203
|
+
<SideRailSection label="Views">
|
|
204
|
+
<For each={props.destinations}>
|
|
205
|
+
{(item) => (
|
|
206
|
+
<SideRailItem
|
|
207
|
+
as="button"
|
|
208
|
+
type="button"
|
|
209
|
+
label={item.label}
|
|
210
|
+
aria-label={item.label}
|
|
211
|
+
active={props.activeDestination === item.id}
|
|
212
|
+
aria-pressed={props.activeDestination === item.id}
|
|
213
|
+
onClick={() => props.onNavigate(item.id)}
|
|
214
|
+
>
|
|
215
|
+
{item.icon}
|
|
216
|
+
</SideRailItem>
|
|
217
|
+
)}
|
|
218
|
+
</For>
|
|
219
|
+
</SideRailSection>
|
|
220
|
+
}
|
|
221
|
+
>
|
|
222
|
+
{props.rail}
|
|
223
|
+
</Show>
|
|
224
|
+
</ShellRail>
|
|
225
|
+
</Show>
|
|
226
|
+
<AppShellBody>
|
|
227
|
+
<AppShellContent>
|
|
228
|
+
<Show when={props.sidebar}>
|
|
229
|
+
{(sidebar) => (
|
|
230
|
+
<PixelPane
|
|
231
|
+
class="hidden overflow-visible md:block"
|
|
232
|
+
width={sidebar().open ? sidebar().width : 0}
|
|
233
|
+
>
|
|
234
|
+
<ContextualSidebar
|
|
235
|
+
{...sidebar()}
|
|
236
|
+
restoreFocusRef={sidebar().restoreFocusRef ?? (() => sidebarToggle)}
|
|
237
|
+
/>
|
|
238
|
+
</PixelPane>
|
|
239
|
+
)}
|
|
240
|
+
</Show>
|
|
241
|
+
<Show
|
|
242
|
+
when={!props.viewLandmark}
|
|
243
|
+
fallback={
|
|
244
|
+
<div
|
|
245
|
+
data-slot="app-shell-main"
|
|
246
|
+
class="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden"
|
|
247
|
+
>
|
|
248
|
+
{props.content}
|
|
249
|
+
</div>
|
|
250
|
+
}
|
|
251
|
+
>
|
|
252
|
+
<AppShellMain id="app-main" tabindex="-1">
|
|
253
|
+
{props.content}
|
|
254
|
+
</AppShellMain>
|
|
255
|
+
</Show>
|
|
256
|
+
</AppShellContent>
|
|
257
|
+
{props.status}
|
|
258
|
+
</AppShellBody>
|
|
259
|
+
</AppShell>
|
|
260
|
+
<Show when={props.drawer}>
|
|
261
|
+
{(drawer) => (
|
|
262
|
+
<Sheet open={narrow() && drawerOpen()} onOpenChange={setDrawerOpen}>
|
|
263
|
+
<SheetContent
|
|
264
|
+
data-mobile="true"
|
|
265
|
+
side="start"
|
|
266
|
+
closeButton={false}
|
|
267
|
+
class="w-72 max-w-full"
|
|
268
|
+
onCloseAutoFocus={(event: Event) => {
|
|
269
|
+
if (!sidebarToggle) return
|
|
270
|
+
event.preventDefault()
|
|
271
|
+
sidebarToggle.focus()
|
|
272
|
+
}}
|
|
273
|
+
>
|
|
274
|
+
<SheetHeader class="sr-only">
|
|
275
|
+
<SheetTitle>{`${props.name} navigation`}</SheetTitle>
|
|
276
|
+
</SheetHeader>
|
|
277
|
+
{drawer()(() => setDrawerOpen(false))}
|
|
278
|
+
</SheetContent>
|
|
279
|
+
</Sheet>
|
|
280
|
+
)}
|
|
281
|
+
</Show>
|
|
282
|
+
</div>
|
|
283
|
+
</TooltipProvider>
|
|
284
|
+
)
|
|
285
|
+
}
|