Free Motion Capture for Everyone πβ¨
TypeScript
docs/download page init
jonmatthisa4d8dfcd65a6
diff --git a/freemocap-docs/docusaurus.config.ts b/freemocap-docs/docusaurus.config.tsindex 16ba5f4c..63ed741f 100644--- a/freemocap-docs/docusaurus.config.ts+++ b/freemocap-docs/docusaurus.config.ts@@ -82,6 +82,7 @@ const config: Config = {items: [{ type: 'docSidebar', sidebarId: 'docsSidebar', position: 'left', label: 'Docs' },{ to: '/blog', label: 'Blog', position: 'left' },+ { to: '/download', label: 'Download', position: 'left' },{ to: '/roadmap', label: 'Roadmap', position: 'left' },{ href: 'https://github.com/freemocap/freemocap', label: 'Code', position: 'right' },],@@ -104,6 +105,7 @@ const config: Config = {{title: 'More',items: [+ { label: 'Download', to: '/download' },{ label: 'Blog', to: '/blog' },{ label: 'Website', href: 'https://freemocap.org/' },],diff --git a/freemocap-docs/src/components/download/DownloadPage.module.css b/freemocap-docs/src/components/download/DownloadPage.module.cssnew file mode 100644index 00000000..287b09fa--- /dev/null+++ b/freemocap-docs/src/components/download/DownloadPage.module.css@@ -0,0 +1,987 @@+/* ββ Theme variables ββ */+.downloadPage {+ --dl-bg: #0a0a0f;+ --dl-surface: #12121a;+ --dl-surface-hover: #1a1a26;+ --dl-border: #1e1e2e;+ --dl-text: #e2e2ef;+ --dl-text-dim: #7a7a8e;+ --dl-accent: #6ee7b7;+ --dl-accent-dim: #2d6a4f;+ --dl-accent-glow: rgba(110, 231, 183, 0.12);+ --dl-server-accent: #93c5fd;+ --dl-server-accent-dim: #1e3a5f;+ --dl-server-glow: rgba(147, 197, 253, 0.10);+ --dl-warn: #fbbf24;+ --dl-warn-dim: #78350f;+ --dl-mono: 'JetBrains Mono', monospace;+ --dl-sans: 'DM Sans', system-ui, sans-serif;++ font-family: var(--dl-sans);+ background: var(--dl-bg);+ color: var(--dl-text);+ min-height: 100vh;+ overflow-x: hidden;+ position: relative;+}++.downloadPage::before {+ content: '';+ position: fixed;+ inset: 0;+ background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");+ pointer-events: none;+ z-index: 0;+}++/* ββ Glow ββ */+.glow {+ position: fixed;+ width: 600px;+ height: 600px;+ border-radius: 50%;+ background: radial-gradient(circle, var(--dl-accent-glow) 0%, transparent 70%);+ top: -200px;+ right: -100px;+ pointer-events: none;+ animation: drift 20s ease-in-out infinite alternate;+}++@keyframes drift {+ from { transform: translate(0, 0) scale(1); }+ to { transform: translate(-80px, 60px) scale(1.2); }+}++/* ββ Container ββ */+.container {+ max-width: 760px;+ margin: 0 auto;+ padding: 80px 24px 120px;+ position: relative;+ z-index: 1;+}++/* ββ Staggered fade-in ββ */+.container > * {+ opacity: 0;+ transform: translateY(12px);+ animation: fadeUp 0.5s ease forwards;+}++.container > *:nth-child(1) { animation-delay: 0.05s; }+.container > *:nth-child(2) { animation-delay: 0.1s; }+.container > *:nth-child(3) { animation-delay: 0.12s; }+.container > *:nth-child(4) { animation-delay: 0.14s; }+.container > *:nth-child(5) { animation-delay: 0.18s; }+.container > *:nth-child(6) { animation-delay: 0.22s; }+.container > *:nth-child(7) { animation-delay: 0.24s; }+.container > *:nth-child(8) { animation-delay: 0.26s; }+.container > *:nth-child(9) { animation-delay: 0.28s; }+.container > *:nth-child(10) { animation-delay: 0.3s; }+.container > *:nth-child(11) { animation-delay: 0.32s; }+.container > *:nth-child(12) { animation-delay: 0.34s; }+.container > *:nth-child(13) { animation-delay: 0.36s; }+.container > *:nth-child(14) { animation-delay: 0.38s; }+.container > *:nth-child(15) { animation-delay: 0.4s; }+.container > *:nth-child(16) { animation-delay: 0.42s; }+.container > *:nth-child(17) { animation-delay: 0.44s; }+.container > *:nth-child(18) { animation-delay: 0.46s; }+.container > *:nth-child(19) { animation-delay: 0.48s; }++@keyframes fadeUp {+ to { opacity: 1; transform: translateY(0); }+}++/* ββ Header ββ */+.logoRow {+ display: flex;+ align-items: center;+ gap: 16px;+ margin-bottom: 12px;+}++.logoRow a {+ line-height: 0;+ transition: transform 0.2s ease;+}++.logoRow a:hover {+ transform: scale(1.05);+}++.logoImg {+ width: 56px;+ height: 56px;+ object-fit: contain;+ filter: drop-shadow(0 0 16px rgba(110, 231, 183, 0.2));+}++.title {+ font-size: 2rem;+ font-weight: 700;+ letter-spacing: -0.03em;+ margin: 0;+}++.titleAccent {+ color: var(--dl-accent);+}++.tagline {+ color: var(--dl-text-dim);+ font-size: 0.95rem;+ margin-bottom: 10px;+ line-height: 1.6;+ max-width: 520px;+}++.tagline a {+ color: var(--dl-accent);+ text-decoration: none;+}++.tagline a:hover {+ text-decoration: underline;+}++.repoLinks {+ display: flex;+ align-items: center;+ gap: 8px;+ margin-bottom: 48px;+ font-family: var(--dl-mono);+ font-size: 0.72rem;+}++.repoLinks a {+ color: var(--dl-text-dim);+ text-decoration: none;+ transition: color 0.15s;+}++.repoLinks a:hover {+ color: var(--dl-accent);+}++.repoSep {+ color: var(--dl-border);+}++/* ββ Detect row ββ */+.detectRow {+ display: flex;+ align-items: center;+ gap: 12px;+ flex-wrap: wrap;+ margin-bottom: 12px;+}++.detected {+ display: inline-flex;+ align-items: center;+ gap: 8px;+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 8px;+ padding: 10px 16px;+ font-family: var(--dl-mono);+ font-size: 0.8rem;+ color: var(--dl-text-dim);+}++.dot {+ width: 6px;+ height: 6px;+ background: var(--dl-accent);+ border-radius: 50%;+}++.detected strong {+ color: var(--dl-text);+ font-weight: 600;+}++.osPillsWrap {+ display: flex;+ flex-direction: column;+ gap: 4px;+}++.wrongDetect {+ font-family: var(--dl-mono);+ font-size: 0.68rem;+ color: var(--dl-text-dim);+ opacity: 0.7;+}++.osPills {+ display: flex;+ gap: 4px;+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 8px;+ padding: 4px;+ flex-wrap: wrap;+}++.osPill {+ font-family: var(--dl-mono);+ font-size: 0.68rem;+ padding: 6px 10px;+ border-radius: 5px;+ border: none;+ cursor: pointer;+ background: transparent;+ color: var(--dl-text-dim);+ transition: all 0.15s;+ white-space: nowrap;+}++.osPill:hover {+ color: var(--dl-text);+ background: var(--dl-surface-hover);+}++.osPillActive {+ color: var(--dl-accent);+ background: var(--dl-accent-dim);+}++/* ββ System help ββ */+.systemHelp {+ margin-bottom: 40px;+}++.helpSection {+ margin-bottom: 20px;+}++.helpSection:last-child {+ margin-bottom: 0;+}++.helpSectionTitle {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ font-weight: 600;+ margin-bottom: 8px;+ display: flex;+ align-items: center;+ gap: 8px;+}++.helpIcon {+ font-size: 0.95rem;+}++.helpSection p,+.helpSection li {+ color: var(--dl-text-dim);+ font-size: 0.8rem;+ line-height: 1.6;+}++.helpSection p {+ margin-bottom: 6px;+}++.helpSection ul {+ list-style: none;+ padding: 0;+}++.helpSection li {+ padding: 3px 0 3px 16px;+ position: relative;+}++.helpSection li::before {+ content: '\2192';+ position: absolute;+ left: 0;+ color: var(--dl-accent);+ font-size: 0.75rem;+}++.helpSection code {+ font-family: var(--dl-mono);+ font-size: 0.73rem;+ background: #0d0d14;+ padding: 2px 6px;+ border-radius: 4px;+ border: 1px solid var(--dl-border);+}++.helpSection strong {+ color: var(--dl-text);+ font-weight: 500;+}++.helpContent {+ margin-top: 12px;+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 10px;+ padding: 20px 24px;+}++/* ββ Section blocks ββ */+.sectionBlock {+ margin-bottom: 48px;+}++.sectionBlockSecondary {+ margin-bottom: 40px;+}++.sectionHeader {+ margin-bottom: 18px;+}++.sectionTitle {+ font-weight: 700;+ font-size: 1.25rem;+ display: flex;+ align-items: center;+ gap: 10px;+ margin-bottom: 2px;+}++.sectionTitleIcon {+ font-size: 1.1rem;+}++.sectionSubtitle {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ color: var(--dl-text-dim);+ margin-top: 2px;+}++.sectionSubtitle strong {+ color: var(--dl-accent);+ font-weight: 600;+}++.sectionBlockSecondary .sectionTitle {+ font-size: 1rem;+ font-weight: 600;+ color: var(--dl-text-dim);+}++.sectionBlockSecondary .sectionTitleIcon {+ font-size: 0.95rem;+}++.sectionBlockSecondary .sectionSubtitle strong {+ color: var(--dl-server-accent);+}++/* ββ Collapsible toggles ββ */+.toggleBtn {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ color: var(--dl-text-dim);+ background: none;+ border: none;+ cursor: pointer;+ padding: 8px 0;+ margin-bottom: 16px;+ transition: color 0.15s;+ display: flex;+ align-items: center;+ gap: 6px;+}++.toggleBtn:hover {+ color: var(--dl-text);+}++.sectionDetailsToggle {+ font-family: var(--dl-mono);+ font-size: 0.7rem;+ color: var(--dl-text-dim);+ background: none;+ border: none;+ cursor: pointer;+ padding: 4px 0;+ margin-top: 6px;+ transition: color 0.15s;+ display: inline-flex;+ align-items: center;+ gap: 5px;+}++.sectionDetailsToggle:hover {+ color: var(--dl-text);+}++.systemHelpToggle {+ font-family: var(--dl-mono);+ font-size: 0.72rem;+ color: var(--dl-text-dim);+ background: none;+ border: none;+ cursor: pointer;+ padding: 6px 0;+ margin-bottom: 0;+ transition: color 0.15s;+ display: flex;+ align-items: center;+ gap: 6px;+}++.systemHelpToggle:hover {+ color: var(--dl-text);+}++.terminalTipToggle {+ font-family: var(--dl-mono);+ font-size: 0.65rem;+ color: var(--dl-text-dim);+ background: none;+ border: none;+ cursor: pointer;+ padding: 4px 0;+ margin-top: 4px;+ transition: color 0.15s;+ display: inline-flex;+ align-items: center;+ gap: 5px;+ opacity: 0.7;+}++.terminalTipToggle:hover {+ color: var(--dl-text);+ opacity: 1;+}++.arrow {+ display: inline-block;+ transition: transform 0.2s ease;+ font-size: 0.6rem;+}++.arrowSmall {+ font-size: 0.55rem;+}++.arrowTiny {+ font-size: 0.5rem;+}++.arrowMedium {+ font-size: 0.65rem;+}++.arrowOpen {+ transform: rotate(90deg);+}++/* ββ Collapsible content ββ */+.collapsibleContent {+ display: none;+}++.collapsibleContentVisible {+ display: block;+}++.sectionDetailsContent {+ margin-top: 10px;+ color: var(--dl-text-dim);+ font-size: 0.8rem;+ line-height: 1.65;+}++.sectionDetailsContent strong {+ color: var(--dl-text);+ font-weight: 500;+}++.sectionDetailsContent code {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ background: var(--dl-surface);+ padding: 2px 6px;+ border-radius: 4px;+ border: 1px solid var(--dl-border);+}++.terminalTipContent {+ margin-top: 8px;+ padding: 12px 16px;+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 8px;+ font-size: 0.75rem;+ color: var(--dl-text-dim);+ line-height: 1.65;+}++.terminalTipContent strong {+ color: var(--dl-text);+ font-weight: 500;+}++.terminalTipContent code {+ font-family: var(--dl-mono);+ font-size: 0.7rem;+ background: #0d0d14;+ padding: 2px 6px;+ border-radius: 4px;+ border: 1px solid var(--dl-border);+}++.terminalTipContent p {+ margin-bottom: 6px;+}++.terminalTipContent p:last-child {+ margin-bottom: 0;+}++/* ββ Downloads list ββ */+.downloads {+ display: flex;+ flex-direction: column;+ gap: 10px;+ margin-bottom: 12px;+}++/* ββ Alt format ββ */+.altFormatLabel {+ font-family: var(--dl-mono);+ font-size: 0.68rem;+ color: var(--dl-text-dim);+ margin: 12px 0 8px;+ opacity: 0.8;+}++/* ββ Section label ββ */+.sectionLabel {+ font-family: var(--dl-mono);+ font-size: 0.7rem;+ text-transform: uppercase;+ letter-spacing: 0.12em;+ color: var(--dl-text-dim);+ margin-bottom: 16px;+}++/* ββ Download cards ββ */+.dlCard {+ display: flex;+ align-items: center;+ justify-content: space-between;+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 10px;+ padding: 16px 20px;+ transition: all 0.2s ease;+ cursor: default;+ text-decoration: none;+ color: inherit;+}++.dlCard:hover {+ background: var(--dl-surface-hover);+ border-color: var(--dl-accent-dim);+}++.dlCardRecommended {+ border-color: var(--dl-accent-dim);+ background: linear-gradient(135deg, var(--dl-surface) 0%, rgba(110, 231, 183, 0.04) 100%);+}++.dlCardRecommended:hover {+ border-color: var(--dl-accent);+}++.dlCardServer:hover {+ border-color: var(--dl-server-accent-dim);+}++.dlCardServerRec {+ border-color: var(--dl-server-accent-dim);+ background: linear-gradient(135deg, var(--dl-surface) 0%, var(--dl-server-glow) 100%);+}++.dlCardServerRec:hover {+ border-color: var(--dl-server-accent);+}++.dlInfo {+ display: flex;+ flex-direction: column;+ gap: 3px;+}++.dlName {+ font-weight: 500;+ font-size: 0.95rem;+ display: flex;+ align-items: center;+ gap: 10px;+ flex-wrap: wrap;+}++.dlMeta {+ font-family: var(--dl-mono);+ font-size: 0.72rem;+ color: var(--dl-text-dim);+}++.badge {+ font-family: var(--dl-mono);+ font-size: 0.6rem;+ text-transform: uppercase;+ letter-spacing: 0.08em;+ padding: 3px 8px;+ border-radius: 4px;+ font-weight: 600;+}++.badgeRec {+ background: var(--dl-accent-dim);+ color: var(--dl-accent);+}++.badgeServer {+ background: var(--dl-server-accent-dim);+ color: var(--dl-server-accent);+}++.dlRight {+ display: flex;+ align-items: center;+ gap: 14px;+}++.dlSize {+ font-family: var(--dl-mono);+ font-size: 0.7rem;+ color: var(--dl-text-dim);+ white-space: nowrap;+}++.dlBtn {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ font-weight: 600;+ padding: 8px 18px;+ border-radius: 6px;+ border: none;+ cursor: pointer;+ transition: all 0.15s ease;+ white-space: nowrap;+ text-decoration: none;+}++.dlBtnPrimary {+ background: var(--dl-accent);+ color: var(--dl-bg);+}++.dlBtnPrimary:hover {+ background: #86efac;+ box-shadow: 0 0 20px var(--dl-accent-glow);+}++.dlBtnServer {+ background: var(--dl-server-accent-dim);+ color: var(--dl-server-accent);+}++.dlBtnServer:hover {+ background: #2b4d7a;+ box-shadow: 0 0 20px var(--dl-server-glow);+}++.dlBtnSecondary {+ background: var(--dl-surface-hover);+ color: var(--dl-text);+ border: 1px solid var(--dl-border);+}++.dlBtnSecondary:hover {+ border-color: var(--dl-text-dim);+}++/* ββ Install hints ββ */+.installHint {+ color: var(--dl-text-dim);+ font-size: 0.8rem;+ line-height: 1.65;+ margin-bottom: 40px;+ padding: 0 4px;+}++.installHint strong {+ color: var(--dl-text);+ font-weight: 500;+}++.installHint code {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ background: var(--dl-surface);+ padding: 2px 6px;+ border-radius: 4px;+ border: 1px solid var(--dl-border);+}++/* ββ Code blocks ββ */+.codeBlock {+ position: relative;+ background: #0d0d14;+ border: 1px solid var(--dl-border);+ border-radius: 8px;+ padding: 14px 16px;+ margin: 10px 0 6px;+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ line-height: 1.7;+ color: var(--dl-text);+ overflow-x: auto;+ white-space: pre;+}++.prompt {+ color: var(--dl-accent);+ user-select: none;+}++.comment {+ color: #4a4a5e;+}++.copyBtn {+ position: absolute;+ top: 8px;+ right: 8px;+ font-family: var(--dl-mono);+ font-size: 0.65rem;+ background: var(--dl-surface-hover);+ border: 1px solid var(--dl-border);+ color: var(--dl-text-dim);+ padding: 4px 10px;+ border-radius: 4px;+ cursor: pointer;+ transition: all 0.15s;+}++.copyBtn:hover {+ color: var(--dl-text);+ border-color: var(--dl-text-dim);+}++.copyBtnCopied {+ color: var(--dl-accent);+ border-color: var(--dl-accent-dim);+}++/* ββ Section divider ββ */+.sectionDivider {+ border: none;+ border-top: 1px solid var(--dl-border);+ margin: 8px 0 40px;+}++/* ββ Notes / footer ββ */+.note {+ color: var(--dl-text-dim);+ font-size: 0.8rem;+ line-height: 1.7;+ border-top: 1px solid var(--dl-border);+ padding-top: 24px;+ margin-top: 24px;+}++.note a {+ color: var(--dl-accent);+ text-decoration: none;+}++.note a:hover {+ text-decoration: underline;+}++.note code {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ background: var(--dl-surface);+ padding: 2px 6px;+ border-radius: 4px;+ border: 1px solid var(--dl-border);+}++/* ββ OS Note callout ββ */+.osNote {+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 8px;+ padding: 14px 18px;+ margin-bottom: 24px;+ display: flex;+ gap: 10px;+ align-items: flex-start;+}++.osNoteWarning {+ border-color: var(--dl-warn-dim);+}++.osNoteInfo {+ border-color: var(--dl-accent-dim);+}++.osNoteTip {+ border-color: var(--dl-server-accent-dim);+}++.osNoteIcon {+ font-size: 1rem;+ line-height: 1.4;+ flex-shrink: 0;+}++.osNoteContent p {+ color: var(--dl-text-dim);+ font-size: 0.8rem;+ line-height: 1.6;+ margin: 0;+}+++.osNoteContent strong {+ color: var(--dl-text);+ font-weight: 500;+}++.osNoteTitle {+ font-family: var(--dl-mono);+ font-size: 0.75rem;+ font-weight: 600;+ color: var(--dl-text);+ margin-bottom: 4px;+}++/* ββ Version selector ββ */+.versionRow {+ display: flex;+ align-items: center;+ gap: 10px;+ margin-bottom: 8px;+ font-family: var(--dl-mono);+ font-size: 0.72rem;+ color: var(--dl-text-dim);+}++.versionSelect {+ font-family: var(--dl-mono);+ font-size: 0.72rem;+ background: var(--dl-surface);+ color: var(--dl-text);+ border: 1px solid var(--dl-border);+ border-radius: 6px;+ padding: 6px 10px;+ cursor: pointer;+ transition: border-color 0.15s;+}++.versionSelect:hover {+ border-color: var(--dl-accent-dim);+}++.versionSelect:focus {+ outline: none;+ border-color: var(--dl-accent);+}++/* ββ Legacy release view ββ */+.legacyNotice {+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 8px;+ padding: 14px 18px;+ margin-bottom: 24px;+ color: var(--dl-text-dim);+ font-size: 0.8rem;+ line-height: 1.6;+ display: flex;+ gap: 10px;+ align-items: flex-start;+}++.legacyNoticeIcon {+ font-size: 1rem;+ flex-shrink: 0;+}++.legacyAssetList {+ display: flex;+ flex-direction: column;+ gap: 8px;+}++.legacyAsset {+ display: flex;+ align-items: center;+ justify-content: space-between;+ background: var(--dl-surface);+ border: 1px solid var(--dl-border);+ border-radius: 8px;+ padding: 12px 16px;+ text-decoration: none;+ color: inherit;+ transition: all 0.2s ease;+}++.legacyAsset:hover {+ background: var(--dl-surface-hover);+ border-color: var(--dl-accent-dim);+}++.legacyAssetName {+ font-family: var(--dl-mono);+ font-size: 0.78rem;+ color: var(--dl-text);+ word-break: break-all;+}++.legacyAssetSize {+ font-family: var(--dl-mono);+ font-size: 0.7rem;+ color: var(--dl-text-dim);+ white-space: nowrap;+ margin-left: 16px;+}++/* ββ Could not detect message ββ */+.noDetect {+ color: var(--dl-text-dim);+ font-size: 0.85rem;+}++/* ββ Responsive ββ */+@media (max-width: 520px) {+ .dlCard {+ flex-direction: column;+ align-items: flex-start;+ gap: 12px;+ }++ .dlRight {+ align-self: stretch;+ justify-content: space-between;+ }++ .title {+ font-size: 1.6rem;+ }++ .detectRow {+ flex-direction: column;+ align-items: flex-start;+ }+}diff --git a/freemocap-docs/src/components/download/DownloadPage.tsx b/freemocap-docs/src/components/download/DownloadPage.tsxnew file mode 100644index 00000000..63f914ff--- /dev/null+++ b/freemocap-docs/src/components/download/DownloadPage.tsx@@ -0,0 +1,241 @@+import { useState, useMemo, useEffect } from 'react';+import type { OsType, ArchType } from './data/downloads';+import {+ DEFAULT_VERSION,+ getReleaseBaseUrl,+ buildAppDownloads,+ buildServerDownloads,+ enrichDownloadsWithAssets,+ matchesExpectedPattern,+ stripVersionPrefix,+ OS_NOTES,+} from './data/downloads';+import {+ getAppInstallInstructions,+ getServerInstallInstructions,+} from './data/installInstructions';+import { useSystemDetection } from './hooks/useSystemDetection';+import { useReleaseVersions } from './hooks/useReleaseVersions';++import Header from './components/Header';+import SystemDetector from './components/SystemDetector';+import SystemHelpSection from './components/SystemHelpSection';+import VersionSelector from './components/VersionSelector';+import DownloadSection from './components/DownloadSection';+import TerminalInstallSection from './components/TerminalInstallSection';+import AllPlatformsSection from './components/AllPlatformsSection';+import LegacyReleaseView from './components/LegacyReleaseView';+import TerminalTip from './components/TerminalTip';+import Footer from './components/Footer';+import styles from './DownloadPage.module.css';++export default function DownloadPage() {+ const detected = useSystemDetection();+ const { releases, isLoading: releasesLoading } = useReleaseVersions();++ // Selected system (seeded from detection, overridable via pills)+ const [selectedOs, setSelectedOs] = useState<OsType | 'unknown'>('unknown');+ const [selectedArch, setSelectedArch] = useState<ArchType>('x64');+ const [hasManuallySelected, setHasManuallySelected] = useState(false);++ // Sync detected system to selection (only if user hasn't manually picked)+ useEffect(() => {+ if (!hasManuallySelected && detected.os !== 'unknown') {+ setSelectedOs(detected.os);+ setSelectedArch(detected.arch);+ }+ }, [detected.os, detected.arch, hasManuallySelected]);++ const handleSelectSystem = (os: OsType, arch: ArchType) => {+ setSelectedOs(os);+ setSelectedArch(arch);+ setHasManuallySelected(true);+ };++ // Selected version (defaults to latest release or hardcoded)+ const [selectedTag, setSelectedTag] = useState<string>(`v${DEFAULT_VERSION}`);++ // Once releases load, default to the latest+ useEffect(() => {+ if (releases.length > 0 && !hasManualVersionSelection) {+ setSelectedTag(releases[0].tag_name);+ }+ }, [releases]);++ const [hasManualVersionSelection, setHasManualVersionSelection] = useState(false);+ const handleSelectVersion = (tag: string) => {+ setSelectedTag(tag);+ setHasManualVersionSelection(true);+ };++ // Determine current release data+ const selectedRelease = useMemo(+ () => releases.find(r => r.tag_name === selectedTag),+ [releases, selectedTag],+ );++ const version = stripVersionPrefix(selectedTag);+ const baseUrl = getReleaseBaseUrl(version);++ const isLegacy = useMemo(() => {+ if (!selectedRelease) return false;+ return !matchesExpectedPattern(selectedRelease.assets, version);+ }, [selectedRelease, version]);++ // Build download entries for the selected version+ const { appDownloads, serverDownloads } = useMemo(() => {+ let app = buildAppDownloads(version);+ let server = buildServerDownloads(version);++ if (selectedRelease) {+ app = enrichDownloadsWithAssets(app, selectedRelease.assets);+ server = enrichDownloadsWithAssets(server, selectedRelease.assets);+ }++ return { appDownloads: app, serverDownloads: server };+ }, [version, selectedRelease]);++ // Sort into recommended / alternate / other+ const { recApp, altApp, otherApp, recServer, otherServer } = useMemo(() => {+ const rA: typeof appDownloads = [];+ const aA: typeof appDownloads = [];+ const oA: typeof appDownloads = [];++ for (const d of appDownloads) {+ if (d.os === selectedOs && d.arch === selectedArch) {+ (d.recommended ? rA : aA).push(d);+ } else {+ oA.push(d);+ }+ }++ const rS: typeof serverDownloads = [];+ const oS: typeof serverDownloads = [];+ for (const d of serverDownloads) {+ if (d.os === selectedOs && d.arch === selectedArch) {+ rS.push(d);+ } else {+ oS.push(d);+ }+ }++ return { recApp: rA, altApp: aA, otherApp: oA, recServer: rS, otherServer: oS };+ }, [appDownloads, serverDownloads, selectedOs, selectedArch]);++ const osForInstructions = selectedOs === 'unknown' ? undefined : selectedOs;+ const appInstructions = osForInstructions+ ? getAppInstallInstructions(osForInstructions, selectedArch, version)+ : [];+ const serverInstructions = osForInstructions+ ? getServerInstallInstructions(osForInstructions, selectedArch, version)+ : [];++ // Filter OS notes for the selected system+ const activeNotes = OS_NOTES.filter(+ n => n.os === selectedOs && (n.arch === undefined || n.arch === selectedArch),+ );++ const noDetect = selectedOs === 'unknown';++ return (+ <div className={styles.downloadPage}>+ <div className={styles.glow} />+ <div className={styles.container}>+ <Header />++ <SystemDetector+ os={selectedOs}+ arch={selectedArch}+ onSelectSystem={handleSelectSystem}+ />++ <SystemHelpSection />++ <VersionSelector+ releases={releases}+ selectedTag={selectedTag}+ onSelectVersion={handleSelectVersion}+ isLoading={releasesLoading}+ />++ {isLegacy && selectedRelease ? (+ <LegacyReleaseView+ assets={selectedRelease.assets}+ tagName={selectedRelease.tag_name}+ />+ ) : (+ <>+ <DownloadSection+ icon={'\uD83D\uDC80\uD83D\uDCF8'}+ title="FreeMoCap App Installer"+ subtitle={+ <>+ <strong>Recommended</strong> — this is what most people want+ </>+ }+ detailsLabel="What's included?"+ detailsContent="Desktop application with camera preview, recording controls, and settings. The backend server is already bundled inside — you don't need to download it separately."+ recommended={recApp}+ alternates={altApp}+ installInstructions={appInstructions}+ baseUrl={baseUrl}+ variant="primary"+ noDetectMessage={+ noDetect+ ? 'Could not detect your OS. See all downloads below.'+ : undefined+ }+ showTerminalTip={osForInstructions === 'linux'}+ terminalTipContent={+ osForInstructions && osForInstructions !== 'windows' ? (+ <TerminalTip os={osForInstructions} />+ ) : undefined+ }+ notes={activeNotes}+ />++ <TerminalInstallSection+ os={selectedOs}+ arch={selectedArch}+ version={version}+ baseUrl={baseUrl}+ />++ <hr className={styles.sectionDivider} />++ <DownloadSection+ icon={'\u26A1'}+ title="FreeMoCap Backend Server"+ subtitle={+ <>+ <strong>Advanced</strong> — headless machines, Raspberry Pi, API use+ </>+ }+ detailsLabel="When do I need this?"+ detailsContent="Just the camera backend server binary, no GUI. Useful for headless capture rigs, remote systems you connect to over a network, or building a custom client against the FreeMoCap API. <strong>You don't need this if you downloaded the App Installer above.</strong>"+ recommended={recServer}+ installInstructions={serverInstructions}+ baseUrl={baseUrl}+ variant="secondary"+ showTerminalTip={osForInstructions != null && osForInstructions !== 'windows'}+ terminalTipContent={+ osForInstructions && osForInstructions !== 'windows' ? (+ <TerminalTip os={osForInstructions} />+ ) : undefined+ }+ />++ <AllPlatformsSection+ otherApp={otherApp}+ otherServer={otherServer}+ baseUrl={baseUrl}+ defaultOpen={noDetect}+ />+ </>+ )}++ <Footer />+ </div>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/AllPlatformsSection.tsx b/freemocap-docs/src/components/download/components/AllPlatformsSection.tsxnew file mode 100644index 00000000..49a876d5--- /dev/null+++ b/freemocap-docs/src/components/download/components/AllPlatformsSection.tsx@@ -0,0 +1,63 @@+import type { DownloadEntry } from '../data/downloads';+import DownloadCard from './DownloadCard';+import CollapsibleSection from './CollapsibleSection';+import styles from '../DownloadPage.module.css';++interface AllPlatformsSectionProps {+ otherApp: DownloadEntry[];+ otherServer: DownloadEntry[];+ baseUrl: string;+ defaultOpen?: boolean;+}++export default function AllPlatformsSection({+ otherApp,+ otherServer,+ baseUrl,+ defaultOpen = false,+}: AllPlatformsSectionProps) {+ if (otherApp.length === 0 && otherServer.length === 0) return null;++ return (+ <CollapsibleSection+ label="All platforms & formats"+ variant="toggle"+ defaultOpen={defaultOpen}+ >+ {otherApp.length > 0 && (+ <>+ <div className={styles.sectionLabel} style={{ marginTop: 8 }}>+ App Installer — other platforms+ </div>+ <div className={styles.downloads}>+ {otherApp.map(d => (+ <DownloadCard+ key={d.file}+ download={d}+ variant="secondary"+ baseUrl={baseUrl}+ />+ ))}+ </div>+ </>+ )}+ {otherServer.length > 0 && (+ <>+ <div className={styles.sectionLabel} style={{ marginTop: 24 }}>+ Backend Server — other platforms+ </div>+ <div className={styles.downloads}>+ {otherServer.map(d => (+ <DownloadCard+ key={d.file}+ download={d}+ variant="secondary"+ baseUrl={baseUrl}+ />+ ))}+ </div>+ </>+ )}+ </CollapsibleSection>+ );+}diff --git a/freemocap-docs/src/components/download/components/CodeBlock.tsx b/freemocap-docs/src/components/download/components/CodeBlock.tsxnew file mode 100644index 00000000..ec11f1da--- /dev/null+++ b/freemocap-docs/src/components/download/components/CodeBlock.tsx@@ -0,0 +1,55 @@+import { useState, useCallback } from 'react';+import type { CodeLine } from '../data/installInstructions';+import styles from '../DownloadPage.module.css';++interface CodeBlockProps {+ lines: CodeLine[];+}++export default function CodeBlock({ lines }: CodeBlockProps) {+ const [copied, setCopied] = useState(false);++ const handleCopy = useCallback(() => {+ const commands = lines+ .filter(l => l.type === 'prompt')+ .map(l => l.content)+ .join('\n');+ navigator.clipboard.writeText(commands).then(() => {+ setCopied(true);+ setTimeout(() => setCopied(false), 2000);+ });+ }, [lines]);++ return (+ <div className={styles.codeBlock}>+ <button+ className={`${styles.copyBtn} ${copied ? styles.copyBtnCopied : ''}`}+ onClick={handleCopy}+ >+ {copied ? 'Copied!' : 'Copy'}+ </button>+ {lines.map((line, i) => {+ if (line.type === 'comment') {+ return (+ <span key={i}>+ <span className={styles.comment}>{line.content}</span>+ {'\n'}+ </span>+ );+ }+ if (line.type === 'prompt') {+ return (+ <span key={i}>+ <span className={styles.prompt}>{line.promptChar || '$'}</span>+ {' '}+ {line.content}+ {'\n'}+ </span>+ );+ }+ // text (empty line / spacer)+ return <span key={i}>{line.content}{'\n'}</span>;+ })}+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/CollapsibleSection.tsx b/freemocap-docs/src/components/download/components/CollapsibleSection.tsxnew file mode 100644index 00000000..2a10e98e--- /dev/null+++ b/freemocap-docs/src/components/download/components/CollapsibleSection.tsx@@ -0,0 +1,52 @@+import { useState, type ReactNode } from 'react';+import styles from '../DownloadPage.module.css';++type CollapsibleVariant = 'toggle' | 'details' | 'help' | 'terminal-tip';++interface CollapsibleSectionProps {+ label: string;+ children: ReactNode;+ defaultOpen?: boolean;+ variant?: CollapsibleVariant;+}++const TOGGLE_CLASS: Record<CollapsibleVariant, string> = {+ toggle: styles.toggleBtn,+ details: styles.sectionDetailsToggle,+ help: styles.systemHelpToggle,+ 'terminal-tip': styles.terminalTipToggle,+};++const ARROW_SIZE: Record<CollapsibleVariant, string> = {+ toggle: styles.arrowMedium,+ details: styles.arrowSmall,+ help: styles.arrow,+ 'terminal-tip': styles.arrowTiny,+};++export default function CollapsibleSection({+ label,+ children,+ defaultOpen = false,+ variant = 'toggle',+}: CollapsibleSectionProps) {+ const [isOpen, setIsOpen] = useState(defaultOpen);++ const toggleClass = TOGGLE_CLASS[variant];+ const arrowSize = ARROW_SIZE[variant];++ return (+ <>+ <button+ className={toggleClass}+ onClick={() => setIsOpen(prev => !prev)}+ >+ <span className={`${styles.arrow} ${arrowSize} ${isOpen ? styles.arrowOpen : ''}`}>+ ▶+ </span>{' '}+ {label}+ </button>+ {isOpen && children}+ </>+ );+}diff --git a/freemocap-docs/src/components/download/components/DownloadCard.tsx b/freemocap-docs/src/components/download/components/DownloadCard.tsxnew file mode 100644index 00000000..b6f319d3--- /dev/null+++ b/freemocap-docs/src/components/download/components/DownloadCard.tsx@@ -0,0 +1,59 @@+import type { DownloadEntry } from '../data/downloads';+import { formatMeta } from '../data/downloads';+import styles from '../DownloadPage.module.css';++type CardVariant = 'recommended' | 'server-rec' | 'secondary';++interface DownloadCardProps {+ download: DownloadEntry;+ variant: CardVariant;+ baseUrl: string;+}++export default function DownloadCard({ download, variant, baseUrl }: DownloadCardProps) {+ const cardClasses = [styles.dlCard];+ if (variant === 'recommended') cardClasses.push(styles.dlCardRecommended);+ if (variant === 'server-rec') cardClasses.push(styles.dlCardServerRec, styles.dlCardServer);++ const btnClass =+ variant === 'recommended'+ ? styles.dlBtnPrimary+ : variant === 'server-rec'+ ? styles.dlBtnServer+ : styles.dlBtnSecondary;++ const badgeClass =+ variant === 'recommended'+ ? styles.badgeRec+ : variant === 'server-rec'+ ? styles.badgeServer+ : null;++ const badgeText =+ variant === 'recommended'+ ? 'recommended'+ : variant === 'server-rec'+ ? 'your system'+ : null;++ return (+ <a+ href={`${baseUrl}/${download.file}`}+ className={cardClasses.join(' ')}+ >+ <div className={styles.dlInfo}>+ <div className={styles.dlName}>+ {download.label}+ {badgeClass && badgeText && (+ <span className={`${styles.badge} ${badgeClass}`}>{badgeText}</span>+ )}+ </div>+ <div className={styles.dlMeta}>{formatMeta(download)}</div>+ </div>+ <div className={styles.dlRight}>+ {download.size && <span className={styles.dlSize}>{download.size}</span>}+ <span className={`${styles.dlBtn} ${btnClass}`}>Download</span>+ </div>+ </a>+ );+}diff --git a/freemocap-docs/src/components/download/components/DownloadSection.tsx b/freemocap-docs/src/components/download/components/DownloadSection.tsxnew file mode 100644index 00000000..125a0fee--- /dev/null+++ b/freemocap-docs/src/components/download/components/DownloadSection.tsx@@ -0,0 +1,119 @@+import type { ReactNode } from 'react';+import type { DownloadEntry, OsNoteEntry } from '../data/downloads';+import type { InstructionBlock } from '../data/installInstructions';+import DownloadCard from './DownloadCard';+import CollapsibleSection from './CollapsibleSection';+import CodeBlock from './CodeBlock';+import OsNote from './OsNote';+import styles from '../DownloadPage.module.css';++type SectionVariant = 'primary' | 'secondary';++interface DownloadSectionProps {+ icon: string;+ title: string;+ subtitle: ReactNode;+ detailsLabel: string;+ detailsContent: string;+ recommended: DownloadEntry[];+ alternates?: DownloadEntry[];+ installInstructions: InstructionBlock[];+ baseUrl: string;+ variant: SectionVariant;+ noDetectMessage?: string;+ showTerminalTip?: boolean;+ terminalTipContent?: ReactNode;+ notes?: OsNoteEntry[];+}++export default function DownloadSection({+ icon,+ title,+ subtitle,+ detailsLabel,+ detailsContent,+ recommended,+ alternates,+ installInstructions,+ baseUrl,+ variant,+ noDetectMessage,+ showTerminalTip,+ terminalTipContent,+ notes,+}: DownloadSectionProps) {+ const blockClass =+ variant === 'primary' ? styles.sectionBlock : `${styles.sectionBlock} ${styles.sectionBlockSecondary}`;+ const cardVariant = variant === 'primary' ? 'recommended' : 'server-rec';++ return (+ <div className={blockClass}>+ <div className={styles.sectionHeader}>+ <div className={styles.sectionTitle}>+ <span className={styles.sectionTitleIcon}>{icon}</span> {title}+ </div>+ <div className={styles.sectionSubtitle}>{subtitle}</div>+ <CollapsibleSection label={detailsLabel} variant="details">+ <div+ className={styles.sectionDetailsContent}+ dangerouslySetInnerHTML={{ __html: detailsContent }}+ />+ </CollapsibleSection>+ </div>++ {notes && notes.map((note, i) => (+ <OsNote key={i} note={note} />+ ))}++ <div className={styles.downloads}>+ {recommended.length === 0 && noDetectMessage ? (+ <div className={styles.noDetect}>{noDetectMessage}</div>+ ) : (+ recommended.map(d => (+ <DownloadCard+ key={d.file}+ download={d}+ variant={cardVariant}+ baseUrl={baseUrl}+ />+ ))+ )}+ </div>++ {alternates && alternates.length > 0 && (+ <>+ <div className={styles.altFormatLabel}>Also available for your system</div>+ <div className={styles.downloads}>+ {alternates.map(d => (+ <DownloadCard+ key={d.file}+ download={d}+ variant="secondary"+ baseUrl={baseUrl}+ />+ ))}+ </div>+ </>+ )}++ {installInstructions.length > 0 && (+ <CollapsibleSection label="Install instructions" variant="details">+ <div className={styles.sectionDetailsContent}>+ {installInstructions.map((block, i) => {+ if (block.codeLines) {+ return <CodeBlock key={i} lines={block.codeLines} />;+ }+ return (+ <p+ key={i}+ dangerouslySetInnerHTML={{ __html: block.text! }}+ />+ );+ })}+ {showTerminalTip && terminalTipContent}+ </div>+ </CollapsibleSection>+ )}+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/Footer.tsx b/freemocap-docs/src/components/download/components/Footer.tsxnew file mode 100644index 00000000..f799c6be--- /dev/null+++ b/freemocap-docs/src/components/download/components/Footer.tsx@@ -0,0 +1,14 @@+import styles from '../DownloadPage.module.css';++export default function Footer() {+ return (+ <div className={styles.note}>+ Part of the <a href="https://freemocap.org">FreeMoCap</a> project.+ Source code on{' '}+ <a href="https://github.com/freemocap/freemocap">GitHub</a>. Release+ notes and changelogs on the{' '}+ <a href="https://github.com/freemocap/freemocap/releases">Releases</a>{' '}+ page. Licensed under <code>AGPL-3.0</code>.+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/Header.tsx b/freemocap-docs/src/components/download/components/Header.tsxnew file mode 100644index 00000000..d7f308ca--- /dev/null+++ b/freemocap-docs/src/components/download/components/Header.tsx@@ -0,0 +1,39 @@+import styles from '../DownloadPage.module.css';++export default function Header() {+ return (+ <>+ <div className={styles.logoRow}>+ <a href="https://github.com/freemocap/freemocap" title="FreeMoCap on GitHub">+ <img+ className={styles.logoImg}+ src="https://raw.githubusercontent.com/freemocap/freemocap/main/shared/freemocap-logo/freemocap-logo.png"+ alt="FreeMoCap logo"+ />+ </a>+ <h1 className={styles.title}>+ Free<span className={styles.titleAccent}>MoCap</span>+ </h1>+ </div>++ <p className={styles.tagline}>+ Free, open-source markerless motion capture. Record with ordinary+ cameras and reconstruct full-body 3D movement — no suits, no+ markers, no expensive hardware. Learn more at{' '}+ <a href="https://freemocap.org">freemocap.org</a>.+ </p>++ <div className={styles.repoLinks}>+ <a href="https://github.com/freemocap/freemocap">GitHub</a>+ <span className={styles.repoSep}>·</span>+ <a href="https://github.com/freemocap/freemocap/releases">+ Release Notes+ </a>+ <span className={styles.repoSep}>·</span>+ <a href="https://github.com/freemocap/freemocap/blob/main/LICENSE">+ AGPL-3.0+ </a>+ </div>+ </>+ );+}diff --git a/freemocap-docs/src/components/download/components/LegacyReleaseView.tsx b/freemocap-docs/src/components/download/components/LegacyReleaseView.tsxnew file mode 100644index 00000000..613e88d4--- /dev/null+++ b/freemocap-docs/src/components/download/components/LegacyReleaseView.tsx@@ -0,0 +1,42 @@+import type { GitHubAsset } from '../data/downloads';+import { formatBytes } from '../data/downloads';+import styles from '../DownloadPage.module.css';++interface LegacyReleaseViewProps {+ assets: GitHubAsset[];+ tagName: string;+}++export default function LegacyReleaseView({ assets, tagName }: LegacyReleaseViewProps) {+ // Filter out source code archives+ const downloadableAssets = assets.filter(+ a => !a.name.endsWith('.tar.gz') && !a.name.endsWith('.zip') || a.name.includes('freemocap'),+ );++ return (+ <div>+ <div className={styles.legacyNotice}>+ <span className={styles.legacyNoticeIcon}>{'\uD83D\uDCE6'}</span>+ <div>+ This release (<strong>{tagName}</strong>) predates our smart download+ page. Here are all available files — pick the one that matches+ your system.+ </div>+ </div>+ <div className={styles.legacyAssetList}>+ {downloadableAssets.map(asset => (+ <a+ key={asset.name}+ href={asset.browser_download_url}+ className={styles.legacyAsset}+ >+ <span className={styles.legacyAssetName}>{asset.name}</span>+ <span className={styles.legacyAssetSize}>+ {formatBytes(asset.size)}+ </span>+ </a>+ ))}+ </div>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/OsNote.tsx b/freemocap-docs/src/components/download/components/OsNote.tsxnew file mode 100644index 00000000..162804ab--- /dev/null+++ b/freemocap-docs/src/components/download/components/OsNote.tsx@@ -0,0 +1,35 @@+import { LinkedIssues } from '@freemocap/skellydocs';+import type { OsNoteEntry } from '../data/downloads';+import styles from '../DownloadPage.module.css';++const VARIANT_ICONS: Record<OsNoteEntry['variant'], string> = {+ warning: '\u26A0\uFE0F',+ info: '\u2139\uFE0F',+ tip: '\uD83D\uDCA1',+};++interface OsNoteProps {+ note: OsNoteEntry;+}++export default function OsNote({ note }: OsNoteProps) {+ const variantClass =+ note.variant === 'warning'+ ? styles.osNoteWarning+ : note.variant === 'info'+ ? styles.osNoteInfo+ : styles.osNoteTip;++ return (+ <div className={`${styles.osNote} ${variantClass}`}>+ <span className={styles.osNoteIcon}>{VARIANT_ICONS[note.variant]}</span>+ <div className={styles.osNoteContent}>+ <div className={styles.osNoteTitle}>{note.title}</div>+ <p dangerouslySetInnerHTML={{ __html: note.content }} />+ {note.issues && note.issues.length > 0 && (+ <LinkedIssues items={note.issues} defaultOpen />+ )}+ </div>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/SystemDetector.tsx b/freemocap-docs/src/components/download/components/SystemDetector.tsxnew file mode 100644index 00000000..197e320c--- /dev/null+++ b/freemocap-docs/src/components/download/components/SystemDetector.tsx@@ -0,0 +1,36 @@+import type { OsType, ArchType } from '../data/downloads';+import { OS_LABELS, archLabel, OS_PILL_OPTIONS } from '../data/downloads';+import styles from '../DownloadPage.module.css';++interface SystemDetectorProps {+ os: OsType | 'unknown';+ arch: ArchType;+ onSelectSystem: (os: OsType, arch: ArchType) => void;+}++export default function SystemDetector({ os, arch, onSelectSystem }: SystemDetectorProps) {+ return (+ <div className={styles.detectRow}>+ <div className={styles.detected}>+ <span className={styles.dot} />+ Detected: <strong>{OS_LABELS[os] ?? os} · {archLabel(arch)}</strong>+ </div>+ <div className={styles.osPillsWrap}>+ <span className={styles.wrongDetect}>Not right? Select your system:</span>+ <div className={styles.osPills}>+ {OS_PILL_OPTIONS.map(pill => (+ <button+ key={`${pill.os}-${pill.arch}`}+ className={`${styles.osPill} ${+ pill.os === os && pill.arch === arch ? styles.osPillActive : ''+ }`}+ onClick={() => onSelectSystem(pill.os, pill.arch)}+ >+ {pill.label}+ </button>+ ))}+ </div>+ </div>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/SystemHelpSection.tsx b/freemocap-docs/src/components/download/components/SystemHelpSection.tsxnew file mode 100644index 00000000..4aa41910--- /dev/null+++ b/freemocap-docs/src/components/download/components/SystemHelpSection.tsx@@ -0,0 +1,42 @@+import { SYSTEM_HELP_SECTIONS } from '../data/systemHelp';+import CollapsibleSection from './CollapsibleSection';+import styles from '../DownloadPage.module.css';++export default function SystemHelpSection() {+ return (+ <div className={styles.systemHelp}>+ <CollapsibleSection label="Not sure what system you have?" variant="help">+ <div className={styles.helpContent}>+ {SYSTEM_HELP_SECTIONS.map((section, i) => (+ <div key={i} className={styles.helpSection}>+ <div className={styles.helpSectionTitle}>+ <span className={styles.helpIcon}>{section.icon}</span>+ {section.title}+ </div>+ {section.content.map((block, j) => {+ if (block.type === 'paragraph') {+ return (+ <p+ key={j}+ dangerouslySetInnerHTML={{ __html: block.text! }}+ />+ );+ }+ return (+ <ul key={j}>+ {block.items!.map((item, k) => (+ <li+ key={k}+ dangerouslySetInnerHTML={{ __html: item }}+ />+ ))}+ </ul>+ );+ })}+ </div>+ ))}+ </div>+ </CollapsibleSection>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/TerminalInstallSection.tsx b/freemocap-docs/src/components/download/components/TerminalInstallSection.tsxnew file mode 100644index 00000000..f755069d--- /dev/null+++ b/freemocap-docs/src/components/download/components/TerminalInstallSection.tsx@@ -0,0 +1,43 @@+import type { OsType, ArchType } from '../data/downloads';+import { getTerminalInstallBlocks } from '../data/installInstructions';+import CollapsibleSection from './CollapsibleSection';+import CodeBlock from './CodeBlock';+import TerminalTip from './TerminalTip';+import styles from '../DownloadPage.module.css';++interface TerminalInstallSectionProps {+ os: OsType | 'unknown';+ arch: ArchType;+ version: string;+ baseUrl: string;+}++export default function TerminalInstallSection({+ os,+ arch,+ version,+ baseUrl,+}: TerminalInstallSectionProps) {+ if (os === 'windows' || os === 'unknown') return null;++ const blocks = getTerminalInstallBlocks(os, arch, version, baseUrl);+ if (blocks.length === 0) return null;++ return (+ <div>+ <CollapsibleSection label="Install from terminal" variant="toggle">+ <div className={styles.sectionLabel} style={{ marginTop: 8 }}>+ One-liner install from terminal+ </div>+ <p className={styles.installHint}>+ Download and run directly using <code>curl</code>. These pull from the+ GitHub Release.+ </p>+ {blocks.map((block, i) =>+ block.codeLines ? <CodeBlock key={i} lines={block.codeLines} /> : null,+ )}+ <TerminalTip os={os} />+ </CollapsibleSection>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/components/TerminalTip.tsx b/freemocap-docs/src/components/download/components/TerminalTip.tsxnew file mode 100644index 00000000..213abb04--- /dev/null+++ b/freemocap-docs/src/components/download/components/TerminalTip.tsx@@ -0,0 +1,31 @@+import type { OsType } from '../data/downloads';+import { getTerminalTipContent } from '../data/installInstructions';+import CollapsibleSection from './CollapsibleSection';+import styles from '../DownloadPage.module.css';++interface TerminalTipProps {+ os: OsType;+}++export default function TerminalTip({ os }: TerminalTipProps) {+ const { openHow, promptChar } = getTerminalTipContent(os);++ return (+ <CollapsibleSection label="New to the terminal?" variant="terminal-tip">+ <div className={styles.terminalTipContent}>+ <p dangerouslySetInnerHTML={{ __html: openHow }} />+ <p>+ The{' '}+ <span dangerouslySetInnerHTML={{ __html: promptChar }} />{' '}+ symbol shown before each command is the <strong>prompt</strong> —+ it means “type here.” Don’t type it yourself; just+ type the text that comes after it, then press <strong>Enter</strong>.+ </p>+ <p>+ The <strong>Copy</strong> button in the top-right of each code block+ copies only the commands (without the prompt), ready to paste.+ </p>+ </div>+ </CollapsibleSection>+ );+}diff --git a/freemocap-docs/src/components/download/components/VersionSelector.tsx b/freemocap-docs/src/components/download/components/VersionSelector.tsxnew file mode 100644index 00000000..defec161--- /dev/null+++ b/freemocap-docs/src/components/download/components/VersionSelector.tsx@@ -0,0 +1,38 @@+import type { GitHubRelease } from '../data/downloads';+import styles from '../DownloadPage.module.css';++interface VersionSelectorProps {+ releases: GitHubRelease[];+ selectedTag: string;+ onSelectVersion: (tag: string) => void;+ isLoading: boolean;+}++export default function VersionSelector({+ releases,+ selectedTag,+ onSelectVersion,+ isLoading,+}: VersionSelectorProps) {+ if (isLoading || releases.length === 0) return null;++ return (+ <div className={styles.versionRow}>+ <label htmlFor="version-select">Version:</label>+ <select+ id="version-select"+ className={styles.versionSelect}+ value={selectedTag}+ onChange={e => onSelectVersion(e.target.value)}+ >+ {releases.map(r => (+ <option key={r.tag_name} value={r.tag_name}>+ {r.tag_name}+ {r === releases[0] ? ' (latest)' : ''}+ {r.prerelease ? ' Β· pre-release' : ''}+ </option>+ ))}+ </select>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/hooks/useReleaseVersions.ts b/freemocap-docs/src/components/download/hooks/useReleaseVersions.tsnew file mode 100644index 00000000..90a8b850--- /dev/null+++ b/freemocap-docs/src/components/download/hooks/useReleaseVersions.ts@@ -0,0 +1,83 @@+import { useState, useEffect } from 'react';+import type { GitHubRelease } from '../data/downloads';+import { REPO } from '../data/downloads';++const CACHE_KEY = 'freemocap-releases';+const CACHE_TTL_MS = 10 * 60 * 1000; // 10 minutes++interface CacheEntry {+ timestamp: number;+ data: GitHubRelease[];+}++interface UseReleaseVersionsResult {+ releases: GitHubRelease[];+ isLoading: boolean;+ error: string | null;+}++function readCache(): GitHubRelease[] | null {+ try {+ const raw = sessionStorage.getItem(CACHE_KEY);+ if (!raw) return null;+ const entry: CacheEntry = JSON.parse(raw);+ if (Date.now() - entry.timestamp > CACHE_TTL_MS) {+ sessionStorage.removeItem(CACHE_KEY);+ return null;+ }+ return entry.data;+ } catch {+ return null;+ }+}++function writeCache(data: GitHubRelease[]): void {+ try {+ const entry: CacheEntry = { timestamp: Date.now(), data };+ sessionStorage.setItem(CACHE_KEY, JSON.stringify(entry));+ } catch {+ // sessionStorage may be full or unavailable+ }+}++export function useReleaseVersions(): UseReleaseVersionsResult {+ const [releases, setReleases] = useState<GitHubRelease[]>([]);+ const [isLoading, setIsLoading] = useState(true);+ const [error, setError] = useState<string | null>(null);++ useEffect(() => {+ const cached = readCache();+ if (cached) {+ setReleases(cached);+ setIsLoading(false);+ return;+ }++ let cancelled = false;++ fetch(`https://api.github.com/repos/${REPO}/releases?per_page=100`, {+ headers: { Accept: 'application/vnd.github.v3+json' },+ })+ .then(res => {+ if (!res.ok) throw new Error(`GitHub API ${res.status}`);+ return res.json();+ })+ .then((data: GitHubRelease[]) => {+ if (cancelled) return;+ writeCache(data);+ setReleases(data);+ setIsLoading(false);+ })+ .catch(err => {+ if (cancelled) return;+ setError(err.message);+ setIsLoading(false);+ });++ return () => {+ cancelled = true;+ };+ }, []);++ return { releases, isLoading, error };+}diff --git a/freemocap-docs/src/components/download/hooks/useSystemDetection.ts b/freemocap-docs/src/components/download/hooks/useSystemDetection.tsnew file mode 100644index 00000000..cb6f6e68--- /dev/null+++ b/freemocap-docs/src/components/download/hooks/useSystemDetection.ts@@ -0,0 +1,61 @@+import { useState, useEffect } from 'react';+import type { OsType, ArchType } from '../data/downloads';++export interface SystemInfo {+ os: OsType | 'unknown';+ arch: ArchType;+}++export function useSystemDetection(): SystemInfo {+ const [system, setSystem] = useState<SystemInfo>({ os: 'unknown', arch: 'x64' });++ useEffect(() => {+ const ua = navigator.userAgent.toLowerCase();+ const platform = (navigator as any).platform?.toLowerCase() ?? '';++ let os: OsType | 'unknown' = 'unknown';+ if (ua.includes('win')) os = 'windows';+ else if (ua.includes('mac')) os = 'macos';+ else if (ua.includes('linux') || ua.includes('x11')) os = 'linux';++ let arch: ArchType = 'x64';+ if (ua.includes('arm64') || ua.includes('aarch64') || platform.includes('arm')) {+ arch = 'arm64';+ }++ // macOS: try WebGL renderer to detect Apple Silicon+ if (os === 'macos') {+ try {+ const c = document.createElement('canvas');+ const gl = c.getContext('webgl') || c.getContext('experimental-webgl');+ if (gl && gl instanceof WebGLRenderingContext) {+ const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');+ if (debugInfo) {+ const renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);+ if (/Apple\s+(M[1-9]|GPU)/.test(renderer)) {+ arch = 'arm64';+ }+ }+ }+ } catch {+ // ignore+ }+ }++ setSystem({ os, arch });++ // macOS: async High Entropy API for more accurate detection+ if (os === 'macos' && (navigator as any).userAgentData) {+ (navigator as any).userAgentData+ .getHighEntropyValues?.(['architecture'])+ .then((v: { architecture?: string }) => {+ if (v.architecture === 'arm') {+ setSystem({ os, arch: 'arm64' });+ }+ })+ .catch(() => {});+ }+ }, []);++ return system;+}diff --git a/freemocap-docs/src/pages/download.tsx b/freemocap-docs/src/pages/download.tsxnew file mode 100644index 00000000..2829388e--- /dev/null+++ b/freemocap-docs/src/pages/download.tsx@@ -0,0 +1,15 @@+import Layout from '@theme/Layout';+import Head from '@docusaurus/Head';+import DownloadPage from '../components/download/DownloadPage';++export default function Download() {+ return (+ <Layout>+ <Head>+ <title>Download | FreeMoCap</title>+ <meta name="description" content="Download FreeMoCap" />+ </Head>+ <DownloadPage />+ </Layout>+ );+}diff --git a/uv.lock b/uv.lockindex c8cfc369..6045d149 100644--- a/uv.lock+++ b/uv.lock@@ -17,6 +17,7 @@ supported-markers = [[manifest]overrides = [+ { name = "mediapipe", marker = "platform_machine != 'x86_64' or sys_platform != 'darwin'", specifier = "==0.10.33" },{ name = "numpy", specifier = ">=2.3.4,<2.5" },{ name = "pandas", specifier = ">=2.2.2,<3" },]@@ -2018,13 +2019,13 @@ dependencies = [[package.optional-dependencies]all-cpu = [- { name = "mediapipe", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32') or sys_platform == 'darwin'" },+ { name = "mediapipe", marker = "(platform_machine != 'x86_64' and sys_platform == 'darwin') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32')" },{ name = "onnx", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32') or sys_platform == 'darwin'" },{ name = "onnxruntime", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32') or sys_platform == 'darwin'" },{ name = "rtmlib", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32') or sys_platform == 'darwin'" },]all-cuda = [- { name = "mediapipe", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32') or sys_platform == 'darwin'" },+ { name = "mediapipe", marker = "(platform_machine != 'x86_64' and sys_platform == 'darwin') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32')" },{ name = "nvidia-cublas-cu12", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32')" },{ name = "nvidia-cuda-runtime-cu12", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32')" },{ name = "nvidia-cudnn-cu12", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32')" },