Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a55281b1aa | ||
|
|
b236d40053 | ||
|
|
ad518ad2a6 | ||
|
|
33626aaf55 | ||
|
|
7481fbf711 | ||
|
|
42735005b1 | ||
|
|
22606e7f79 | ||
|
|
a9d3331044 | ||
|
|
08e3e8f46d | ||
|
|
5c45ac845d | ||
|
|
3bb59d6021 | ||
|
|
aaed0f3548 | ||
|
|
dbbedf9ab3 | ||
|
|
ea98a547c1 | ||
|
|
091e940013 | ||
|
|
493a969ca8 | ||
|
|
3caf21794d | ||
|
|
302128fdbc | ||
|
|
e0c33ca624 | ||
|
|
5497b16ac0 | ||
|
|
eea360600b | ||
|
|
c93e985a47 |
No files matched your search
@@ -10,3 +10,4 @@ ios/App/Pods/
|
|||||||
ios/App/DerivedData/
|
ios/App/DerivedData/
|
||||||
ios/App/*.xcworkspace/xcuserdata/
|
ios/App/*.xcworkspace/xcuserdata/
|
||||||
ios/App/*.xcodeproj/xcuserdata/
|
ios/App/*.xcodeproj/xcuserdata/
|
||||||
|
bug_image/*
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# BeatHound
|
# BeatHound
|
||||||
|
|
||||||
BeatHound is a small, mobile-friendly beat maker. Place beats on labeled category rings, identify them by letter, rename legend categories with a long press, adjust pitch where supported, and play the loop in your browser.
|
BeatHound is a small, mobile-friendly beat maker. Place beats on labeled category rings, identify them by letter, rename legend categories with a long press, adjust pitch where supported, and play the loop in your browser. The current mobile app is an Android/e/OS prototype; iOS is not supported at this time for financial reasons.
|
||||||
|
|
||||||
## Start here
|
## Start here
|
||||||
|
|
||||||
@@ -30,20 +30,19 @@ Open the local web address shown by Vite. Choose a dance template or add a sound
|
|||||||
|
|
||||||
## Mobile downloads
|
## Mobile downloads
|
||||||
|
|
||||||
- [Android / e/OS debug APK](downloads/BeatHound-Android-eOS-1.0.0-debug.apk) — installable on Android API 24 or newer. The same APK is intended for compatible e/OS 4+ devices.
|
- [Android / e/OS debug APK 0.1.0](downloads/BeatHound-Android-eOS-0.1.0-debug.apk) — installable on Android API 24 or newer. The same APK is intended for compatible e/OS 4+ devices.
|
||||||
- **iOS sideload package:** See the [iOS download instructions](downloads/ios/README.md) to build an IPA on macOS. Install it with a sideloading app such as AltStore; the package is not directly installable by tapping it.
|
|
||||||
|
|
||||||
The Android file is a debug-signed build for testing. It is not a Google Play release package.
|
The Android file is a debug-signed build for testing. It is not a Google Play release package. No iOS app or download is currently supported because of financial constraints.
|
||||||
|
|
||||||
## Build the mobile apps
|
## Build the Android prototype
|
||||||
|
|
||||||
The project uses Capacitor for native Android and iOS shells.
|
The mobile prototype uses Capacitor for Android.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run android:debug
|
npm run android:debug
|
||||||
```
|
```
|
||||||
|
|
||||||
The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-1.0.0-debug.apk`. For iOS, use macOS with Xcode and run `npm run ios:unsigned-ipa`; details are in the [native build guide](docs/native-builds.md).
|
The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-0.1.0-debug.apk`. iOS is currently unsupported for financial reasons; see the [native build guide](docs/native-builds.md).
|
||||||
|
|
||||||
## Project checks
|
## Project checks
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ android {
|
|||||||
applicationId "com.ninosaurier.beathound"
|
applicationId "com.ninosaurier.beathound"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 4
|
||||||
versionName "1.0.0"
|
versionName "0.1.0"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
android:label="@string/title_activity_main"
|
android:label="@string/title_activity_main"
|
||||||
android:theme="@style/AppTheme.NoActionBarLaunch"
|
android:theme="@style/AppTheme.NoActionBarLaunch"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
+7
-27
@@ -1,8 +1,8 @@
|
|||||||
# Native Mobile Builds
|
# Native Mobile Builds
|
||||||
|
|
||||||
BeatHound uses Capacitor to wrap the web app for Android and iOS. The `android/` and `ios/` folders contain the native projects.
|
BeatHound's current mobile target is an Android/e/OS prototype using Capacitor. An iOS project scaffold exists, but iOS is not supported at this time for financial reasons; there is no supported iOS build or distribution process.
|
||||||
|
|
||||||
## Android and e/OS
|
## Android and e/OS prototype
|
||||||
|
|
||||||
The Android project has a minimum SDK level of 24. It can run on Android 7.0 and newer. Compatible e/OS 4 or newer devices can install the same APK when their Android base meets that minimum.
|
The Android project has a minimum SDK level of 24. It can run on Android 7.0 and newer. Compatible e/OS 4 or newer devices can install the same APK when their Android base meets that minimum.
|
||||||
|
|
||||||
@@ -35,36 +35,16 @@ adb install downloads/BeatHound-Android-eOS-1.0.0-debug.apk
|
|||||||
|
|
||||||
You can also transfer the APK to the device and open it. The device may ask you to allow installation from that file source.
|
You can also transfer the APK to the device and open it. The device may ask you to allow installation from that file source.
|
||||||
|
|
||||||
## iOS
|
## iOS status
|
||||||
|
|
||||||
Capacitor's Xcode project is in `ios/App/App.xcodeproj`. Building an iOS app requires macOS and Xcode. This repository includes a script for creating an unsigned IPA that can be signed on-device for personal sideloading; this Linux build environment cannot produce the IPA itself.
|
The repository contains an iOS project scaffold, but it is not a supported target. iOS development, testing, and distribution are currently out of scope for financial reasons. The unsigned IPA tooling is experimental and is not a supported release or installation path.
|
||||||
|
|
||||||
### Build an unsigned IPA for sideloading
|
|
||||||
|
|
||||||
On a Mac with Node.js and Xcode installed:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install
|
|
||||||
npm run ios:unsigned-ipa
|
|
||||||
```
|
|
||||||
|
|
||||||
The script builds the app for physical iOS devices and writes:
|
|
||||||
|
|
||||||
```text
|
|
||||||
downloads/ios/BeatHound-iOS-1.0.0-unsigned.ipa
|
|
||||||
```
|
|
||||||
|
|
||||||
The IPA is not directly installable by opening it on an iPhone. Import it into a sideloading app such as AltStore or Sideloadly and sign it with your Apple ID. A free personal Apple ID can be used for personal sideloading, but the signature needs periodic renewal and the sideloading app's setup instructions must be followed. No App Store upload is involved.
|
|
||||||
|
|
||||||
For managed distribution to other users or direct installation without a sideloading app, use Apple's supported distribution and signing options in Xcode. Keep certificates, provisioning profiles, and signing keys out of Git.
|
|
||||||
|
|
||||||
## Mobile build commands
|
## Mobile build commands
|
||||||
|
|
||||||
| Command | Result |
|
| Command | Result |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `npm run build:mobile` | Builds the web assets with relative paths for Capacitor. |
|
| `npm run build:mobile` | Builds the web assets with relative paths for Capacitor. |
|
||||||
| `npm run cap:sync` | Builds web assets and syncs both native projects. |
|
| `npm run cap:sync` | Builds web assets and syncs the local Capacitor projects; Android/e/OS is the supported prototype target. |
|
||||||
| `npm run android:debug` | Builds and syncs Android, then creates a debug APK. |
|
| `npm run android:debug` | Builds and syncs Android, then creates a debug APK. |
|
||||||
| `npm run ios:sync` | Builds and syncs the iOS project. |
|
| `npm run ios:sync` | Syncs the iOS scaffold; this does not mean iOS is a supported target. |
|
||||||
| `npm run ios:open` | Opens the iOS project in Xcode; run this on macOS. |
|
| `npm run ios:open` | Opens the iOS scaffold in Xcode; iOS builds are unsupported. |
|
||||||
| `npm run ios:unsigned-ipa` | Builds an unsigned iOS IPA for personal sideloading; run this on macOS with Xcode. |
|
|
||||||
@@ -15,8 +15,7 @@ Main tools:
|
|||||||
- **React** builds the interface and manages state.
|
- **React** builds the interface and manages state.
|
||||||
- **TypeScript** checks types before the app is built.
|
- **TypeScript** checks types before the app is built.
|
||||||
- **Ionic React** provides page and control components.
|
- **Ionic React** provides page and control components.
|
||||||
- **Capacitor** wraps the web app in native Android and iOS projects.
|
- **Capacitor** wraps the web app in native projects. Android/e/OS is the current mobile prototype; iOS is not supported for financial reasons.
|
||||||
- **Capacitor** wraps the web app in native Android and iOS projects.
|
|
||||||
- **Ionicons** provides the control icons.
|
- **Ionicons** provides the control icons.
|
||||||
- **Vite** runs the local development server and builds the static site.
|
- **Vite** runs the local development server and builds the static site.
|
||||||
- **Vitest** runs the tests.
|
- **Vitest** runs the tests.
|
||||||
@@ -285,13 +284,13 @@ npm test
|
|||||||
|
|
||||||
The scripts are defined in `package.json`. `npm run build` first runs TypeScript with no output, then Vite writes the app's static production site to `dist/`. The React plugin and Vitest environment are set in `vite.config.ts`. TypeScript strict options are in `tsconfig.json`; ESLint rules are in `eslint.config.js`.
|
The scripts are defined in `package.json`. `npm run build` first runs TypeScript with no output, then Vite writes the app's static production site to `dist/`. The React plugin and Vitest environment are set in `vite.config.ts`. TypeScript strict options are in `tsconfig.json`; ESLint rules are in `eslint.config.js`.
|
||||||
|
|
||||||
`capacitor.config.ts` sets the native app ID and points Capacitor to `dist/`. The Android debug build is copied into `downloads/` by `npm run android:debug`. iOS project sync is available on all platforms, but creating a signed IPA requires macOS and Xcode.
|
`capacitor.config.ts` sets the native app ID and points Capacitor to `dist/`. The Android debug build is copied into `downloads/` by `npm run android:debug`. An iOS scaffold exists, but iOS development, testing, and distribution are not currently supported for financial reasons.
|
||||||
|
|
||||||
`capacitor.config.ts` points Capacitor to the `dist/` web build and defines the native app ID. `npm run build:mobile` uses relative asset paths so the native WebView can load local files.
|
`capacitor.config.ts` points Capacitor to the `dist/` web build and defines the native app ID. `npm run build:mobile` uses relative asset paths so the native WebView can load local files.
|
||||||
|
|
||||||
The documentation site uses VitePress. Run `npm run docs:dev` to work on it locally, `npm run docs:build` to create its static files in `docs/.vitepress/dist/`, and `npm run docs:preview` to view that build. The pages are Markdown files under `docs/`; navigation and local search are set in `docs/.vitepress/config.mts`.
|
The documentation site uses VitePress. Run `npm run docs:dev` to work on it locally, `npm run docs:build` to create its static files in `docs/.vitepress/dist/`, and `npm run docs:preview` to view that build. The pages are Markdown files under `docs/`; navigation and local search are set in `docs/.vitepress/config.mts`.
|
||||||
|
|
||||||
The project includes a web manifest and home-screen icons in `public/`, plus Capacitor wrappers in `android/` and `ios/`. It does not include a service worker, offline caching, persistence, or a server deployment configuration. Native build steps are in [Native Mobile Builds](native-builds.md).
|
The project includes a web manifest and home-screen icons in `public/`, plus Capacitor wrappers in `android/` and `ios/`. Android/e/OS is the current mobile prototype; the iOS scaffold is not a supported target. The project does not include a service worker, offline caching, persistence, or a server deployment configuration. Native build steps are in [Native Mobile Builds](native-builds.md).
|
||||||
|
|
||||||
## 10. Main implementation limits
|
## 10. Main implementation limits
|
||||||
|
|
||||||
@@ -301,4 +300,4 @@ The project includes a web manifest and home-screen icons in `public/`, plus Cap
|
|||||||
- Playback timing uses a browser interval and may drift under load.
|
- Playback timing uses a browser interval and may drift under load.
|
||||||
- Points are rounded to one of four playback subdivisions per main step when they play.
|
- Points are rounded to one of four playback subdivisions per main step when they play.
|
||||||
- The app makes audio with browser-generated oscillators and noise. It does not load user audio files.
|
- The app makes audio with browser-generated oscillators and noise. It does not load user audio files.
|
||||||
- iOS IPA creation requires macOS, Xcode, and signing configured outside this Linux build environment.
|
- iOS development, testing, and distribution are currently unsupported for financial reasons.
|
||||||
@@ -66,7 +66,7 @@ Browsers often block sound until the user interacts with the page. Press **Play*
|
|||||||
|
|
||||||
The app makes playback ticks with a browser timer. At each tick it checks whether a sound point should play. The exact timing can depend on the browser and the device.
|
The app makes playback ticks with a browser timer. At each tick it checks whether a sound point should play. The exact timing can depend on the browser and the device.
|
||||||
|
|
||||||
The page layout adapts to different screen sizes. The project includes a web app manifest, icons, and Capacitor projects for Android and iOS. It does not include code for saving patterns or working offline. See the [native build guide](native-builds.md) for mobile build requirements.
|
The page layout adapts to different screen sizes. The project includes a web app manifest and icons. The current mobile prototype targets Android/e/OS; iOS is not supported at this time for financial reasons. The app does not include code for saving patterns or working offline. See the [native build guide](native-builds.md) for mobile build requirements.
|
||||||
|
|
||||||
## 4. Run the project on your computer
|
## 4. Run the project on your computer
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ npm test
|
|||||||
|
|
||||||
## 5. How the software is organized
|
## 5. How the software is organized
|
||||||
|
|
||||||
BeatHound is a React and TypeScript app. Ionic React provides many of the buttons, popovers, and page elements. Vite runs the development server and builds the web app. Capacitor wraps that web app in Android and iOS projects.
|
BeatHound is a React and TypeScript app. Ionic React provides many of the buttons, popovers, and page elements. Vite runs the development server and builds the web app. Capacitor wraps that web app in native projects; Android/e/OS is the current mobile prototype, while iOS is unsupported for financial reasons.
|
||||||
|
|
||||||
The main path through the app is:
|
The main path through the app is:
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,11 +1,5 @@
|
|||||||
# iOS sideload download
|
# iOS availability
|
||||||
|
|
||||||
The unsigned IPA is generated on macOS with Xcode and written to this folder:
|
BeatHound currently has an Android/e/OS mobile prototype. iOS is not supported at this time for financial reasons, and no iOS app or download is provided.
|
||||||
|
|
||||||
```text
|
An iOS project scaffold and experimental build tooling remain in the repository, but they are not maintained or supported for building, testing, or distribution. See the [native build guide](../../docs/native-builds.md#ios-status) for the current status.
|
||||||
BeatHound-iOS-1.0.0-unsigned.ipa
|
|
||||||
```
|
|
||||||
|
|
||||||
Run `npm install` and `npm run ios:unsigned-ipa` from the repository root on a Mac. The package can then be committed here for download. It must be imported into a sideloading app such as AltStore or Sideloadly and signed with an Apple ID before installation; tapping an unsigned IPA on an iPhone will not install it. See the [native build guide](../../docs/native-builds.md#build-an-unsigned-ipa-for-sideloading) for details.
|
|
||||||
|
|
||||||
This repository is currently being edited in a Linux environment without Xcode, so the IPA binary cannot be generated here.
|
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "beat-hound",
|
"name": "beat-hound",
|
||||||
"version": "1.0.0",
|
"version": "0.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "beat-hound",
|
"name": "beat-hound",
|
||||||
"version": "1.0.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/android": "^8.6.2",
|
"@capacitor/android": "^8.6.2",
|
||||||
"@capacitor/core": "^8.6.2",
|
"@capacitor/core": "^8.6.2",
|
||||||
|
|||||||
+2
-3
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "beat-hound",
|
"name": "beat-hound",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host 0.0.0.0",
|
"dev": "vite --host 0.0.0.0",
|
||||||
@@ -11,10 +11,9 @@
|
|||||||
"docs:build": "vitepress build docs",
|
"docs:build": "vitepress build docs",
|
||||||
"docs:preview": "vitepress preview docs --host 0.0.0.0",
|
"docs:preview": "vitepress preview docs --host 0.0.0.0",
|
||||||
"cap:sync": "npm run build:mobile && cap sync",
|
"cap:sync": "npm run build:mobile && cap sync",
|
||||||
"android:debug": "npm run build:mobile && cap sync android && cd android && ./gradlew assembleDebug && cd .. && mkdir -p downloads && cp android/app/build/outputs/apk/debug/app-debug.apk downloads/BeatHound-Android-eOS-1.0.0-debug.apk",
|
"android:debug": "npm run build:mobile && cap sync android && cd android && ./gradlew assembleDebug && cd .. && mkdir -p downloads && cp android/app/build/outputs/apk/debug/app-debug.apk downloads/BeatHound-Android-eOS-0.1.0-debug.apk",
|
||||||
"ios:sync": "npm run build:mobile && cap sync ios",
|
"ios:sync": "npm run build:mobile && cap sync ios",
|
||||||
"ios:open": "cap open ios",
|
"ios:open": "cap open ios",
|
||||||
"ios:unsigned-ipa": "bash scripts/build-ios-unsigned-ipa.sh",
|
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"lint": "eslint ."
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-1
@@ -22,7 +22,10 @@ function App() {
|
|||||||
return (
|
return (
|
||||||
<IonApp>
|
<IonApp>
|
||||||
<IonPage>
|
<IonPage>
|
||||||
<IonContent fullscreen className="app-content">
|
<IonContent
|
||||||
|
fullscreen
|
||||||
|
className={`app-content${isStudioView ? ' app-content-studio' : ''}`}
|
||||||
|
>
|
||||||
<div className="app-shell">
|
<div className="app-shell">
|
||||||
<AppHeader activeView={activeView} onNavigate={navigateTo} />
|
<AppHeader activeView={activeView} onNavigate={navigateTo} />
|
||||||
{isStudioView ? (
|
{isStudioView ? (
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { useRef } from 'react';
|
|
||||||
import { IonButton, IonIcon, IonPopover } from '@ionic/react';
|
import { IonButton, IonIcon, IonPopover } from '@ionic/react';
|
||||||
import { ellipsisVertical } from 'ionicons/icons';
|
import { ellipsisVertical } from 'ionicons/icons';
|
||||||
import { usePopoverDisclosure } from '../hooks/usePopoverDisclosure';
|
import { usePopoverDisclosure } from '../hooks/usePopoverDisclosure';
|
||||||
@@ -10,11 +9,9 @@ interface AppHeaderProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
||||||
const popoverRef = useRef<HTMLIonPopoverElement>(null);
|
|
||||||
const popover = usePopoverDisclosure();
|
const popover = usePopoverDisclosure();
|
||||||
|
|
||||||
function selectView(view: AppView): void {
|
function selectView(view: AppView): void {
|
||||||
void popoverRef.current?.dismiss();
|
|
||||||
onNavigate(view);
|
onNavigate(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +35,7 @@ export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
|||||||
|
|
||||||
<div className="app-header-actions">
|
<div className="app-header-actions">
|
||||||
<IonButton
|
<IonButton
|
||||||
id="app-menu-trigger"
|
id={popover.triggerId}
|
||||||
className="app-menu-trigger"
|
className="app-menu-trigger"
|
||||||
fill="clear"
|
fill="clear"
|
||||||
aria-label="Open app menu"
|
aria-label="Open app menu"
|
||||||
@@ -51,11 +48,12 @@ export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="app-menu-popover"
|
className="app-menu-popover"
|
||||||
ref={popoverRef}
|
trigger={popover.triggerId}
|
||||||
trigger="app-menu-trigger"
|
reference="trigger"
|
||||||
triggerAction="click"
|
size="auto"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="end"
|
alignment="end"
|
||||||
|
dismissOnSelect
|
||||||
onDidPresent={popover.onDidPresent}
|
onDidPresent={popover.onDidPresent}
|
||||||
onDidDismiss={popover.onDidDismiss}
|
onDidDismiss={popover.onDidDismiss}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const BeatTemplateSelector = memo(function BeatTemplateSelector({
|
|||||||
return (
|
return (
|
||||||
<div className="beat-template-selector">
|
<div className="beat-template-selector">
|
||||||
<IonButton
|
<IonButton
|
||||||
id="beat-template-trigger"
|
id={popover.triggerId}
|
||||||
className="beat-template-trigger"
|
className="beat-template-trigger"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
aria-label={`Dance template: ${selectedTemplate?.label ?? 'Select a template'}`}
|
aria-label={`Dance template: ${selectedTemplate?.label ?? 'Select a template'}`}
|
||||||
@@ -39,8 +39,9 @@ export const BeatTemplateSelector = memo(function BeatTemplateSelector({
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="beat-template-popover"
|
className="beat-template-popover"
|
||||||
trigger="beat-template-trigger"
|
trigger={popover.triggerId}
|
||||||
triggerAction="click"
|
reference="trigger"
|
||||||
|
size="cover"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
dismissOnSelect
|
dismissOnSelect
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ import {
|
|||||||
IonAccordion,
|
IonAccordion,
|
||||||
IonAccordionGroup,
|
IonAccordionGroup,
|
||||||
IonButton,
|
IonButton,
|
||||||
|
IonContent,
|
||||||
IonIcon,
|
IonIcon,
|
||||||
IonItem,
|
IonItem,
|
||||||
IonLabel,
|
IonLabel,
|
||||||
IonPopover,
|
IonModal,
|
||||||
IonSearchbar,
|
IonSearchbar,
|
||||||
} from '@ionic/react';
|
} from '@ionic/react';
|
||||||
import { add } from 'ionicons/icons';
|
import { add } from 'ionicons/icons';
|
||||||
@@ -16,7 +17,8 @@ import {
|
|||||||
isInstrumentId,
|
isInstrumentId,
|
||||||
} from '../domain/instruments';
|
} from '../domain/instruments';
|
||||||
import type { InstrumentId } from '../domain/instruments';
|
import type { InstrumentId } from '../domain/instruments';
|
||||||
import { usePopoverDisclosure } from '../hooks/usePopoverDisclosure';
|
|
||||||
|
const PICKER_SHEET_BREAKPOINTS = [0, 0.82, 1];
|
||||||
|
|
||||||
interface InstrumentSelectorProps {
|
interface InstrumentSelectorProps {
|
||||||
onSelectInstrument: (instrumentId: InstrumentId) => void;
|
onSelectInstrument: (instrumentId: InstrumentId) => void;
|
||||||
@@ -25,8 +27,8 @@ interface InstrumentSelectorProps {
|
|||||||
export function InstrumentSelector({ onSelectInstrument }: InstrumentSelectorProps) {
|
export function InstrumentSelector({ onSelectInstrument }: InstrumentSelectorProps) {
|
||||||
const [searchQuery, setSearchQuery] = useState('');
|
const [searchQuery, setSearchQuery] = useState('');
|
||||||
const [expandedCategoryIds, setExpandedCategoryIds] = useState<string[]>([]);
|
const [expandedCategoryIds, setExpandedCategoryIds] = useState<string[]>([]);
|
||||||
const popoverRef = useRef<HTMLIonPopoverElement>(null);
|
const [isPickerOpen, setIsPickerOpen] = useState(false);
|
||||||
const popover = usePopoverDisclosure();
|
const modalRef = useRef<HTMLIonModalElement>(null);
|
||||||
|
|
||||||
const filteredCategories = useMemo(() => {
|
const filteredCategories = useMemo(() => {
|
||||||
const query = searchQuery.trim().toLowerCase();
|
const query = searchQuery.trim().toLowerCase();
|
||||||
@@ -80,8 +82,8 @@ export function InstrumentSelector({ onSelectInstrument }: InstrumentSelectorPro
|
|||||||
setExpandedCategoryIds(typeof value === 'string' ? [value] : []);
|
setExpandedCategoryIds(typeof value === 'string' ? [value] : []);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handlePopoverDidDismiss(): void {
|
function handlePickerDidDismiss(): void {
|
||||||
popover.onDidDismiss();
|
setIsPickerOpen(false);
|
||||||
setSearchQuery('');
|
setSearchQuery('');
|
||||||
setExpandedCategoryIds([]);
|
setExpandedCategoryIds([]);
|
||||||
}
|
}
|
||||||
@@ -89,7 +91,7 @@ export function InstrumentSelector({ onSelectInstrument }: InstrumentSelectorPro
|
|||||||
function addInstrument(value: unknown): void {
|
function addInstrument(value: unknown): void {
|
||||||
if (!isInstrumentId(value)) return;
|
if (!isInstrumentId(value)) return;
|
||||||
|
|
||||||
void popoverRef.current?.dismiss();
|
void modalRef.current?.dismiss();
|
||||||
onSelectInstrument(value);
|
onSelectInstrument(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,76 +101,79 @@ export function InstrumentSelector({ onSelectInstrument }: InstrumentSelectorPro
|
|||||||
id="instrument-add-trigger"
|
id="instrument-add-trigger"
|
||||||
className="instrument-add-button"
|
className="instrument-add-button"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
|
onClick={() => setIsPickerOpen(true)}
|
||||||
aria-label="Open samples"
|
aria-label="Open samples"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
aria-expanded={popover.isOpen}
|
aria-expanded={isPickerOpen}
|
||||||
>
|
>
|
||||||
<IonIcon icon={add} slot="start" />
|
<IonIcon icon={add} slot="start" />
|
||||||
Samples
|
Samples
|
||||||
</IonButton>
|
</IonButton>
|
||||||
|
|
||||||
<IonPopover
|
<IonModal
|
||||||
ref={popoverRef}
|
ref={modalRef}
|
||||||
className="instrument-picker-popover"
|
className="instrument-picker-modal"
|
||||||
trigger="instrument-add-trigger"
|
isOpen={isPickerOpen}
|
||||||
triggerAction="click"
|
breakpoints={PICKER_SHEET_BREAKPOINTS}
|
||||||
side="top"
|
initialBreakpoint={1}
|
||||||
alignment="start"
|
expandToScroll={false}
|
||||||
onDidPresent={popover.onDidPresent}
|
handle
|
||||||
onDidDismiss={handlePopoverDidDismiss}
|
onDidDismiss={handlePickerDidDismiss}
|
||||||
>
|
>
|
||||||
<div className="instrument-picker-menu">
|
<IonContent className="instrument-picker-content" scrollY={false}>
|
||||||
<IonSearchbar
|
<div className="instrument-picker-menu">
|
||||||
className="instrument-picker-search"
|
<IonSearchbar
|
||||||
aria-label="Search samples"
|
className="instrument-picker-search"
|
||||||
placeholder="Search samples"
|
aria-label="Search samples"
|
||||||
value={searchQuery}
|
placeholder="Search samples"
|
||||||
debounce={0}
|
value={searchQuery}
|
||||||
showClearButton="always"
|
debounce={0}
|
||||||
onIonInput={(event) => handleSearchInput(event.detail.value)}
|
showClearButton="always"
|
||||||
onIonClear={() => handleSearchInput('')}
|
onIonInput={(event) => handleSearchInput(event.detail.value)}
|
||||||
/>
|
onIonClear={() => handleSearchInput('')}
|
||||||
|
/>
|
||||||
|
|
||||||
{filteredCategories.length > 0 ? (
|
{filteredCategories.length > 0 ? (
|
||||||
<IonAccordionGroup
|
<IonAccordionGroup
|
||||||
className="instrument-picker-accordion-group"
|
className="instrument-picker-accordion-group"
|
||||||
multiple
|
multiple
|
||||||
value={expandedCategoryIds}
|
value={expandedCategoryIds}
|
||||||
onIonChange={(event) => handleAccordionChange(event.detail.value)}
|
onIonChange={(event) => handleAccordionChange(event.detail.value)}
|
||||||
>
|
>
|
||||||
{filteredCategories.map(({ category, instruments }) => (
|
{filteredCategories.map(({ category, instruments }) => (
|
||||||
<IonAccordion
|
<IonAccordion
|
||||||
className="instrument-picker-category"
|
className="instrument-picker-category"
|
||||||
key={category.id}
|
key={category.id}
|
||||||
value={category.id}
|
value={category.id}
|
||||||
>
|
>
|
||||||
<IonItem className="instrument-category-header" slot="header" lines="none">
|
<IonItem className="instrument-category-header" slot="header" lines="none">
|
||||||
<IonLabel>{category.label}</IonLabel>
|
<IonLabel>{category.label}</IonLabel>
|
||||||
</IonItem>
|
</IonItem>
|
||||||
<div className="instrument-category-content" slot="content">
|
<div className="instrument-category-content" slot="content">
|
||||||
{instruments.map((instrument) => (
|
{instruments.map((instrument) => (
|
||||||
<IonButton
|
<IonButton
|
||||||
className="instrument-picker-option"
|
className="instrument-picker-option"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
key={instrument.id}
|
key={instrument.id}
|
||||||
aria-label={`Add ${instrument.label}`}
|
aria-label={`Add ${instrument.label}`}
|
||||||
onClick={() => addInstrument(instrument.id)}
|
onClick={() => addInstrument(instrument.id)}
|
||||||
>
|
>
|
||||||
<span className="instrument-picker-option-copy">
|
<span className="instrument-picker-option-copy">
|
||||||
<span>{instrument.label}</span>
|
<span>{instrument.label}</span>
|
||||||
<span>{instrument.description}</span>
|
<span>{instrument.description}</span>
|
||||||
</span>
|
</span>
|
||||||
</IonButton>
|
</IonButton>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</IonAccordion>
|
</IonAccordion>
|
||||||
))}
|
))}
|
||||||
</IonAccordionGroup>
|
</IonAccordionGroup>
|
||||||
) : (
|
) : (
|
||||||
<p className="instrument-picker-empty" role="status">No matching samples.</p>
|
<p className="instrument-picker-empty" role="status">No matching samples.</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</IonPopover>
|
</IonContent>
|
||||||
|
</IonModal>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonButton
|
<IonButton
|
||||||
id="sound-ring-selector-trigger"
|
id={popover.triggerId}
|
||||||
className="sound-ring-selector-trigger"
|
className="sound-ring-selector-trigger"
|
||||||
fill="clear"
|
fill="clear"
|
||||||
disabled={soundIds.length === 0}
|
disabled={soundIds.length === 0}
|
||||||
@@ -46,8 +46,9 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="sound-ring-popover"
|
className="sound-ring-popover"
|
||||||
trigger="sound-ring-selector-trigger"
|
trigger={popover.triggerId}
|
||||||
triggerAction="click"
|
reference="trigger"
|
||||||
|
size="cover"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="end"
|
alignment="end"
|
||||||
dismissOnSelect
|
dismissOnSelect
|
||||||
@@ -63,7 +64,9 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
|||||||
className="sound-ring-option"
|
className="sound-ring-option"
|
||||||
fill={selected ? 'solid' : 'clear'}
|
fill={selected ? 'solid' : 'clear'}
|
||||||
aria-pressed={selected}
|
aria-pressed={selected}
|
||||||
onClick={() => onSelectSound(soundId)}
|
onClick={() => {
|
||||||
|
onSelectSound(soundId);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span className="sound-ring-option-content">
|
<span className="sound-ring-option-content">
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -10,14 +10,19 @@ interface TempoControlProps {
|
|||||||
onTempoChange: (tempoBpm: number) => void;
|
onTempoChange: (tempoBpm: number) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TEMPO_TRACK_HEIGHT = 164;
|
||||||
|
const TEMPO_THUMB_SIZE = 18;
|
||||||
|
|
||||||
export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange }: TempoControlProps) {
|
export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange }: TempoControlProps) {
|
||||||
const popover = usePopoverDisclosure();
|
const popover = usePopoverDisclosure();
|
||||||
const tempoProgress = ((tempoBpm - MIN_TEMPO_BPM) / (MAX_TEMPO_BPM - MIN_TEMPO_BPM)) * 100;
|
const tempoProgress = ((tempoBpm - MIN_TEMPO_BPM) / (MAX_TEMPO_BPM - MIN_TEMPO_BPM)) * 100;
|
||||||
|
const tempoThumbCenter = TEMPO_THUMB_SIZE / 2
|
||||||
|
+ ((100 - tempoProgress) / 100) * (TEMPO_TRACK_HEIGHT - TEMPO_THUMB_SIZE);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonButton
|
<IonButton
|
||||||
id="main-tempo-control-trigger"
|
id={popover.triggerId}
|
||||||
className="tempo-trigger"
|
className="tempo-trigger"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
aria-label={`Change tempo, currently ${tempoBpm} BPM`}
|
aria-label={`Change tempo, currently ${tempoBpm} BPM`}
|
||||||
@@ -32,8 +37,9 @@ export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="tempo-popover"
|
className="tempo-popover"
|
||||||
trigger="main-tempo-control-trigger"
|
trigger={popover.triggerId}
|
||||||
triggerAction="click"
|
reference="trigger"
|
||||||
|
size="cover"
|
||||||
side="top"
|
side="top"
|
||||||
alignment="start"
|
alignment="start"
|
||||||
onDidPresent={popover.onDidPresent}
|
onDidPresent={popover.onDidPresent}
|
||||||
@@ -41,7 +47,13 @@ export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange
|
|||||||
>
|
>
|
||||||
<div className="tempo-popover-content">
|
<div className="tempo-popover-content">
|
||||||
<output className="tempo-value" aria-live="polite">{tempoBpm} BPM</output>
|
<output className="tempo-value" aria-live="polite">{tempoBpm} BPM</output>
|
||||||
<div className="tempo-range-track">
|
<div
|
||||||
|
className="tempo-range-track"
|
||||||
|
style={{
|
||||||
|
'--tempo-progress': `${tempoProgress}%`,
|
||||||
|
'--tempo-thumb-center': `${tempoThumbCenter}px`,
|
||||||
|
} as CSSProperties}
|
||||||
|
>
|
||||||
<input
|
<input
|
||||||
className="tempo-range"
|
className="tempo-range"
|
||||||
type="range"
|
type="range"
|
||||||
@@ -50,9 +62,9 @@ export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange
|
|||||||
max={MAX_TEMPO_BPM}
|
max={MAX_TEMPO_BPM}
|
||||||
step={1}
|
step={1}
|
||||||
value={tempoBpm}
|
value={tempoBpm}
|
||||||
style={{ '--tempo-progress': `${tempoProgress}%` } as CSSProperties}
|
|
||||||
onChange={(event) => onTempoChange(event.currentTarget.valueAsNumber)}
|
onChange={(event) => onTempoChange(event.currentTarget.valueAsNumber)}
|
||||||
/>
|
/>
|
||||||
|
<span className="tempo-range-thumb" aria-hidden="true" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</IonPopover>
|
</IonPopover>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const TimeSignatureSelector = memo(function TimeSignatureSelector({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonButton
|
<IonButton
|
||||||
id="time-signature-trigger"
|
id={popover.triggerId}
|
||||||
className="meter-trigger"
|
className="meter-trigger"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
aria-label={`Change time signature, currently ${beatsPerBar}/4`}
|
aria-label={`Change time signature, currently ${beatsPerBar}/4`}
|
||||||
@@ -34,8 +34,9 @@ export const TimeSignatureSelector = memo(function TimeSignatureSelector({
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="meter-popover"
|
className="meter-popover"
|
||||||
trigger="time-signature-trigger"
|
trigger={popover.triggerId}
|
||||||
triggerAction="click"
|
reference="trigger"
|
||||||
|
size="cover"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="start"
|
alignment="start"
|
||||||
dismissOnSelect
|
dismissOnSelect
|
||||||
@@ -49,7 +50,9 @@ export const TimeSignatureSelector = memo(function TimeSignatureSelector({
|
|||||||
className="meter-option"
|
className="meter-option"
|
||||||
fill={option === beatsPerBar ? 'solid' : 'clear'}
|
fill={option === beatsPerBar ? 'solid' : 'clear'}
|
||||||
aria-pressed={option === beatsPerBar}
|
aria-pressed={option === beatsPerBar}
|
||||||
onClick={() => onChange(option)}
|
onClick={() => {
|
||||||
|
onChange(option);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span className="meter-option-content">{option}/4</span>
|
<span className="meter-option-content">{option}/4</span>
|
||||||
</IonButton>
|
</IonButton>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ export const BEATS_PER_BAR_OPTIONS = [2, 3, 4, 5, 6, 7, 8] as const;
|
|||||||
export type BeatsPerBar = (typeof BEATS_PER_BAR_OPTIONS)[number];
|
export type BeatsPerBar = (typeof BEATS_PER_BAR_OPTIONS)[number];
|
||||||
export const TOTAL_STEPS = DEFAULT_BEATS_PER_BAR * STEPS_PER_BEAT;
|
export const TOTAL_STEPS = DEFAULT_BEATS_PER_BAR * STEPS_PER_BEAT;
|
||||||
export const TEMPO_BPM = 112;
|
export const TEMPO_BPM = 112;
|
||||||
export const MIN_TEMPO_BPM = 60;
|
export const MIN_TEMPO_BPM = 30;
|
||||||
export const MAX_TEMPO_BPM = 180;
|
export const MAX_TEMPO_BPM = 260;
|
||||||
|
|
||||||
export function getTotalSteps(beatsPerBar: BeatsPerBar): number {
|
export function getTotalSteps(beatsPerBar: BeatsPerBar): number {
|
||||||
return beatsPerBar * STEPS_PER_BEAT;
|
return beatsPerBar * STEPS_PER_BEAT;
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useId, useState } from 'react';
|
||||||
|
|
||||||
export interface PopoverDisclosure {
|
export interface PopoverDisclosure {
|
||||||
|
triggerId: string;
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onDidPresent: () => void;
|
onDidPresent: () => void;
|
||||||
onDidDismiss: () => void;
|
onDidDismiss: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function usePopoverDisclosure(): PopoverDisclosure {
|
export function usePopoverDisclosure(): PopoverDisclosure {
|
||||||
|
const triggerId = useId();
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
|
||||||
const onDidPresent = useCallback(() => setIsOpen(true), []);
|
const onDidPresent = useCallback(() => setIsOpen(true), []);
|
||||||
const onDidDismiss = useCallback(() => setIsOpen(false), []);
|
const onDidDismiss = useCallback(() => setIsOpen(false), []);
|
||||||
|
|
||||||
return { isOpen, onDidPresent, onDidDismiss };
|
return { triggerId, isOpen, onDidPresent, onDidDismiss };
|
||||||
}
|
}
|
||||||
@@ -249,6 +249,8 @@ describe('sequencer state transitions', () => {
|
|||||||
const tooSlow = sequencerReducer(initial, { type: 'tempo-changed', tempoBpm: 10 });
|
const tooSlow = sequencerReducer(initial, { type: 'tempo-changed', tempoBpm: 10 });
|
||||||
const tooFast = sequencerReducer(initial, { type: 'tempo-changed', tempoBpm: 300 });
|
const tooFast = sequencerReducer(initial, { type: 'tempo-changed', tempoBpm: 300 });
|
||||||
|
|
||||||
|
expect(MIN_TEMPO_BPM).toBe(30);
|
||||||
|
expect(MAX_TEMPO_BPM).toBe(260);
|
||||||
expect(tooSlow.tempoBpm).toBe(MIN_TEMPO_BPM);
|
expect(tooSlow.tempoBpm).toBe(MIN_TEMPO_BPM);
|
||||||
expect(tooFast.tempoBpm).toBe(MAX_TEMPO_BPM);
|
expect(tooFast.tempoBpm).toBe(MAX_TEMPO_BPM);
|
||||||
});
|
});
|
||||||
|
|||||||
+107
-51
@@ -71,6 +71,10 @@ ion-content.app-content {
|
|||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ion-content.app-content-studio {
|
||||||
|
--overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
/* Application shell and studio heading */
|
/* Application shell and studio heading */
|
||||||
.app-shell {
|
.app-shell {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
@@ -319,8 +323,8 @@ ion-content.app-content {
|
|||||||
.studio-heading h1 {
|
.studio-heading h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
font: 500 clamp(24px, 6vw, 40px)/1.1 var(--display);
|
font: 500 clamp(22px, 5vw, 34px)/1.1 var(--display);
|
||||||
letter-spacing: -1.1px;
|
letter-spacing: -0.9px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,6 +347,7 @@ ion-content.app-content {
|
|||||||
--background-activated: #3b3944;
|
--background-activated: #3b3944;
|
||||||
--border-radius: 9px;
|
--border-radius: 9px;
|
||||||
--border-width: 0;
|
--border-width: 0;
|
||||||
|
width: min(230px, calc(100vw - 32px));
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
@@ -368,7 +373,6 @@ ion-content.app-content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.beat-template-popover {
|
.beat-template-popover {
|
||||||
--width: 230px;
|
|
||||||
--background: var(--surface);
|
--background: var(--surface);
|
||||||
--backdrop-opacity: 0;
|
--backdrop-opacity: 0;
|
||||||
--box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
|
--box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
|
||||||
@@ -467,6 +471,7 @@ ion-content.app-content {
|
|||||||
--color: var(--muted);
|
--color: var(--muted);
|
||||||
--border-radius: 7px;
|
--border-radius: 7px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
min-width: 160px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: var(--mono);
|
font-family: var(--mono);
|
||||||
font-size: 8px;
|
font-size: 8px;
|
||||||
@@ -502,7 +507,6 @@ ion-content.app-content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sound-ring-popover {
|
.sound-ring-popover {
|
||||||
--width: 160px;
|
|
||||||
--background: var(--surface);
|
--background: var(--surface);
|
||||||
--backdrop-opacity: 0;
|
--backdrop-opacity: 0;
|
||||||
--box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
|
--box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
|
||||||
@@ -581,6 +585,8 @@ ion-content.app-content {
|
|||||||
|
|
||||||
.timeline-orbit-hit-area {
|
.timeline-orbit-hit-area {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
outline: none;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
transition: r 720ms cubic-bezier(0.22, 1.15, 0.36, 1);
|
transition: r 720ms cubic-bezier(0.22, 1.15, 0.36, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -601,7 +607,7 @@ ion-content.app-content {
|
|||||||
|
|
||||||
.timeline-tick text {
|
.timeline-tick text {
|
||||||
fill: var(--muted);
|
fill: var(--muted);
|
||||||
font: 9px var(--mono);
|
font: 14px var(--mono);
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-playhead line {
|
.timeline-playhead line {
|
||||||
@@ -868,17 +874,25 @@ ion-content.app-content {
|
|||||||
font-size: 19px;
|
font-size: 19px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ion-popover.instrument-picker-popover {
|
ion-modal.instrument-picker-modal {
|
||||||
--width: min(420px, calc(100vw - 24px));
|
--width: min(420px, calc(100vw - 24px));
|
||||||
|
--height: min(620px, calc(100% - (var(--ion-modal-offset-top, 0px) + 10px)));
|
||||||
|
--max-height: calc(100% - (var(--ion-modal-offset-top, 0px) + 10px));
|
||||||
--background: var(--surface);
|
--background: var(--surface);
|
||||||
--backdrop-opacity: 0;
|
--border-radius: 18px 18px 0 0;
|
||||||
--box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
|
--box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.45);
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-content.instrument-picker-content {
|
||||||
|
--background: var(--surface);
|
||||||
|
--overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.instrument-picker-menu {
|
.instrument-picker-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: min(60vh, 420px);
|
height: 100%;
|
||||||
|
max-height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -1097,7 +1111,6 @@ ion-popover.instrument-picker-popover {
|
|||||||
|
|
||||||
/* Popover contents */
|
/* Popover contents */
|
||||||
.tempo-popover {
|
.tempo-popover {
|
||||||
--width: var(--tempo-control-width);
|
|
||||||
--height: 226px;
|
--height: 226px;
|
||||||
--background: var(--surface);
|
--background: var(--surface);
|
||||||
--backdrop-opacity: 0;
|
--backdrop-opacity: 0;
|
||||||
@@ -1117,28 +1130,20 @@ ion-popover.instrument-picker-popover {
|
|||||||
|
|
||||||
.tempo-range-track {
|
.tempo-range-track {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
width: 44px;
|
width: 44px;
|
||||||
height: 164px;
|
height: 164px;
|
||||||
flex: 0 0 164px;
|
flex: 0 0 164px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tempo-range {
|
.tempo-range-track::before {
|
||||||
width: 44px;
|
position: absolute;
|
||||||
height: 164px;
|
top: 9px;
|
||||||
margin: 0;
|
bottom: 9px;
|
||||||
padding: 0;
|
left: 50%;
|
||||||
border: 0;
|
|
||||||
appearance: none;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
writing-mode: vertical-lr;
|
|
||||||
direction: rtl;
|
|
||||||
background: transparent;
|
|
||||||
touch-action: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tempo-range::-webkit-slider-runnable-track {
|
|
||||||
width: 3px;
|
width: 3px;
|
||||||
height: 100%;
|
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
to top,
|
to top,
|
||||||
@@ -1147,52 +1152,62 @@ ion-popover.instrument-picker-popover {
|
|||||||
#58537d var(--tempo-progress),
|
#58537d var(--tempo-progress),
|
||||||
#58537d 100%
|
#58537d 100%
|
||||||
);
|
);
|
||||||
|
content: '';
|
||||||
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tempo-range::-webkit-slider-thumb {
|
.tempo-range {
|
||||||
width: 18px;
|
position: absolute;
|
||||||
height: 18px;
|
top: 50%;
|
||||||
margin-top: 0;
|
left: 50%;
|
||||||
|
width: 164px;
|
||||||
|
height: 44px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 50%;
|
appearance: none;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
background: var(--accent);
|
z-index: 1;
|
||||||
box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18);
|
transform: translate(-50%, -50%) rotate(-90deg);
|
||||||
|
background: transparent;
|
||||||
|
cursor: ns-resize;
|
||||||
|
opacity: 0;
|
||||||
|
touch-action: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tempo-range::-moz-range-track {
|
.tempo-range-thumb {
|
||||||
width: 3px;
|
position: absolute;
|
||||||
border-radius: 999px;
|
top: var(--tempo-thumb-center);
|
||||||
background: #58537d;
|
left: 50%;
|
||||||
}
|
|
||||||
|
|
||||||
.tempo-range::-moz-range-progress {
|
|
||||||
border-radius: 999px;
|
|
||||||
background: var(--accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tempo-range::-moz-range-thumb {
|
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
border: 0;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18);
|
box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18);
|
||||||
|
pointer-events: none;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tempo-range:focus-visible {
|
.tempo-range-track:focus-within .tempo-range-thumb {
|
||||||
|
box-shadow: 0 0 0 2px var(--base), 0 0 0 4px var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tempo-range-track:focus-within {
|
||||||
outline: 2px solid var(--accent);
|
outline: 2px solid var(--accent);
|
||||||
outline-offset: 4px;
|
outline-offset: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meter-popover {
|
.meter-popover {
|
||||||
--width: 96px;
|
--height: 250px;
|
||||||
--height: 224px;
|
|
||||||
--background: var(--surface);
|
--background: var(--surface);
|
||||||
--backdrop-opacity: 0;
|
--backdrop-opacity: 0;
|
||||||
--box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.2);
|
--box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.meter-popover::part(content) {
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.meter-popover-content {
|
.meter-popover-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1211,6 +1226,7 @@ ion-popover.instrument-picker-popover {
|
|||||||
--border-radius: 7px;
|
--border-radius: 7px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 31px;
|
height: 31px;
|
||||||
|
min-height: 31px;
|
||||||
flex: 0 0 31px;
|
flex: 0 0 31px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
@@ -1301,8 +1317,8 @@ ion-popover.instrument-picker-popover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.studio-heading h1 {
|
.studio-heading h1 {
|
||||||
font-size: clamp(20px, 5.5vw, 32px);
|
font-size: clamp(18px, 4.5vw, 26px);
|
||||||
letter-spacing: -0.75px;
|
letter-spacing: -0.6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-prompt {
|
.template-prompt {
|
||||||
@@ -1360,6 +1376,46 @@ ion-popover.instrument-picker-popover {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-height: 1100px) {
|
||||||
|
.app-shell {
|
||||||
|
padding-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.studio {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.studio-heading {
|
||||||
|
padding: 14px 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.studio-heading h1 {
|
||||||
|
font-size: clamp(17px, 4.2vw, 25px);
|
||||||
|
letter-spacing: -0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-prompt {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-copy {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orbit-card {
|
||||||
|
padding: 12px 10px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-wrap {
|
||||||
|
width: min(100%, max(180px, calc(100dvh - 390px)));
|
||||||
|
}
|
||||||
|
|
||||||
|
.sound-legend {
|
||||||
|
gap: 6px 10px;
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 360px) {
|
@media (max-width: 360px) {
|
||||||
.transport-inner {
|
.transport-inner {
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
|
|||||||
Reference in new issue
Block a user