This documentation covers two main classes: TrackManager
and PlayerManager
, which are used for managing audio tracks and playback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FullscreenDialogContent> | |
<PageLayout variant="tight"> | |
<PageLayout.LeftNav sticky> | |
<Stepper> | |
<Stepper.Step /> | |
<Stepper.Step /> | |
<Stepper.Step /> | |
</Stepper> | |
</PageLayout.LeftNav> | |
<PageLayout.Content>main content</PageLayout.Content> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new-sandbox() { | |
# If no argument is provided, prompt the user for an app name | |
if [ -z "$1" ]; then | |
echo -n "Enter the app name (or press Enter to use timestamp): " | |
read appname | |
# Use current time as the fallback if the user doesn't input a name | |
appname=${appname:-$(date +%B-%d-%Y-%I%M%p | tr '[:upper:]' '[:lower:]')} | |
else | |
# Set the app name to the first argument | |
appname="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"categories": [ | |
{ | |
"name": "Restaurants", | |
"keywords": [ | |
"oven", | |
"cutlery", | |
"chef", | |
"napkin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"categories": [ | |
{ | |
"name": "Restaurants", | |
"prompts": [ | |
"The bustling ambiance of a busy restaurant, with clinking glasses, cutlery, and muffled conversations.", | |
"The sound of a waiter taking an order, with pen scribbling on a notepad and polite chatter.", | |
"The sizzle of food being cooked on a hot grill, accompanied by the sound of a spatula flipping.", | |
"Diners chatting and laughing, with background music playing softly.", | |
"The clattering of dishes being washed in the kitchen, with water running and dishes clinking.", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
MotionValue, | |
useAnimationFrame, | |
useMotionValue, | |
} from "framer-motion"; | |
import React from "react"; | |
export interface Clock { | |
value: MotionValue<number>; | |
setRate: (rate: number) => void; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { range } from "lodash"; | |
import { clamp } from "framer-motion"; | |
export function toRadians(degrees: number) { | |
var pi = Math.PI; | |
return degrees * (pi / 180); | |
} | |
export const cos = (degrees: number) => { | |
return Math.cos(toRadians(degrees)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import * as React from "react"; | |
import * as TabsPrimitive from "@radix-ui/react-tabs"; | |
import { cn } from "@/lib/utils"; | |
function createPropsTunnel<TunneledProps extends Record<string, any>>( | |
defaultProps: Required<TunneledProps> | |
) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { action, makeObservable, observable, runInAction } from "mobx"; | |
export class PromiseManager<T extends (...args: any[]) => Promise<any>> { | |
status: "idle" | "pending" | "fulfilled" | "rejected" = "idle"; | |
executionCount = 0; | |
asyncFunction: T; | |
constructor(asyncFunction: T) { | |
makeObservable(this, { | |
status: observable.ref, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { observable, makeObservable, runInAction, action } from "mobx"; | |
import { HistoryManager } from "./history"; | |
import { v4 as uuid } from "uuid"; | |
type Constructor<T> = { | |
new (...params: any[]): T; | |
[x: string | number | symbol]: any; | |
}; | |
type BaseData = { |
NewerOlder