Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/www/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
NEXT_PUBLIC_V0_URL=https://v0.dev
NEXT_PUBLIC_APP_URL=http://localhost:4000
NEXT_PUBLIC_APP_URL=http://localhost:4000
NEXT_PUBLIC_ELEVENLABS_AGENT_ID=your-agent-id-here
9 changes: 6 additions & 3 deletions apps/www/app/(view)/view/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { z } from "zod"
import { siteConfig } from "@/lib/config"
import { getRegistryComponent, getRegistryItem } from "@/lib/registry"
import { absoluteUrl, cn } from "@/lib/utils"
import { RegistryPreviewProvider } from "@/components/registry-preview-provider"

export const revalidate = false
export const dynamic = "force-static"
Expand Down Expand Up @@ -95,9 +96,11 @@ export default async function BlockPage({

return (
<>
<div className={cn("bg-background", item.meta?.container)}>
<Component />
</div>
<RegistryPreviewProvider>
<div className={cn("bg-background", item.meta?.container)}>
<Component />
</div>
</RegistryPreviewProvider>
</>
)
}
94 changes: 50 additions & 44 deletions apps/www/components/cards/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"use client"

import { ConversationProvider } from "@elevenlabs/react"

import { CardsActivityGoal } from "@/components/cards/activity-goal"
import { CardsBarVisualizer } from "@/components/cards/bar-visualizer"
import { CardsLiveRecording } from "@/components/cards/live-recording"
Expand All @@ -15,60 +19,62 @@ import { ConversationBar } from "@/registry/elevenlabs-ui/ui/conversation-bar"

export function CardsDemo() {
return (
<div className="md:grids-col-2 grid **:data-[slot=card]:shadow-none md:gap-4 lg:grid-cols-10 xl:grid-cols-11">
<div className="grid gap-4 lg:col-span-4 xl:col-span-6">
<div className="grid gap-1 sm:grid-cols-[auto_1fr] md:hidden">
<VoiceChat02 />
<div className="pt-3 sm:pt-0 sm:pl-2 xl:pl-4">
<CardsActivityGoal />
</div>
<div className="pt-3 sm:col-span-2 xl:pt-4">
{/* <CardsExerciseMinutes /> */}
<ConversationProvider>
<div className="md:grids-col-2 grid **:data-[slot=card]:shadow-none md:gap-4 lg:grid-cols-10 xl:grid-cols-11">
<div className="grid gap-4 lg:col-span-4 xl:col-span-6">
<div className="grid gap-1 sm:grid-cols-[auto_1fr] md:hidden">
<VoiceChat02 />
<div className="pt-3 sm:pt-0 sm:pl-2 xl:pl-4">
<CardsActivityGoal />
</div>
<div className="pt-3 sm:col-span-2 xl:pt-4">
{/* <CardsExerciseMinutes /> */}
</div>
</div>
</div>
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
<div className="flex flex-col gap-4">
<CardsBarVisualizer />
<VoiceForm />
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
<div className="flex flex-col gap-4">
<CardsBarVisualizer />
<VoiceForm />

<OrbDemo small />
<VoicePickerDemo />
<WaveformDemo />
</div>
<div className="flex flex-col gap-4">
<Speaker01 />
<div className="lg:hidden xl:block">
<ConversationDemo />
<OrbDemo small />
<VoicePickerDemo />
<WaveformDemo />
</div>
<div className="flex flex-col gap-4">
<Speaker01 />
<div className="lg:hidden xl:block">
<ConversationDemo />
</div>
</div>
</div>
</div>
</div>
<div className="flex flex-col gap-4 lg:col-span-6 xl:col-span-5">
<div className="hidden gap-1 sm:grid-cols-2 md:grid">
<VoiceChat02 />
<div className="pt-3 sm:pt-0 sm:pl-2 xl:pl-3">
<MusicPlayer02 />
<div className="pt-3">
<CardsLiveRecording />
<div className="flex flex-col gap-4 lg:col-span-6 xl:col-span-5">
<div className="hidden gap-1 sm:grid-cols-2 md:grid">
<VoiceChat02 />
<div className="pt-3 sm:pt-0 sm:pl-2 xl:pl-3">
<MusicPlayer02 />
<div className="pt-3">
<CardsLiveRecording />
</div>
<div className="pt-3">
<ConversationBar
agentId={process.env.NEXT_PUBLIC_ELEVENLABS_AGENT_ID!}
className="p-0"
/>
</div>
</div>
<div className="pt-3">
<ConversationBar
agentId={process.env.NEXT_PUBLIC_ELEVENLABS_AGENT_ID!}
className="p-0"
/>
<div className="pt-3 sm:col-span-2 xl:pt-3">
<MusicPlayer01 />
</div>
</div>
<div className="pt-3 sm:col-span-2 xl:pt-3">
<MusicPlayer01 />
<div className="hidden md:block">
<VoiceChat01 />
</div>
<div className="hidden lg:block xl:hidden">
<ConversationDemo />
</div>
</div>
<div className="hidden md:block">
<VoiceChat01 />
</div>
<div className="hidden lg:block xl:hidden">
<ConversationDemo />
</div>
</div>
</div>
</ConversationProvider>
)
}
7 changes: 6 additions & 1 deletion apps/www/components/component-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Image from "next/image"

import { ComponentPreviewTabs } from "@/components/component-preview-tabs"
import { ComponentSource } from "@/components/component-source"
import { RegistryPreviewProvider } from "@/components/registry-preview-provider"
import { Index } from "@/registry/__index__"

export function ComponentPreview({
Expand Down Expand Up @@ -63,7 +64,11 @@ export function ComponentPreview({
className={className}
align={align}
hideCode={hideCode}
component={<Component />}
component={
<RegistryPreviewProvider>
<Component />
</RegistryPreviewProvider>
}
source={<ComponentSource name={name} collapsible={false} />}
marginOff={marginOff}
{...props}
Expand Down
8 changes: 8 additions & 0 deletions apps/www/components/registry-preview-provider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use client"

import type { ReactNode } from "react"
import { ConversationProvider } from "@elevenlabs/react"

export function RegistryPreviewProvider({ children }: { children: ReactNode }) {
return <ConversationProvider>{children}</ConversationProvider>
}
4 changes: 2 additions & 2 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@elevenlabs/client": "^0.12.0",
"@elevenlabs/client": "^1.7.0",
"@elevenlabs/elevenlabs-js": "^2.20.1",
"@elevenlabs/react": "^0.12.0",
"@elevenlabs/react": "^1.6.0",
"@faker-js/faker": "^8.2.0",
"@hookform/resolvers": "^3.10.0",
"@radix-ui/react-accessible-icon": "^1.1.1",
Expand Down
Loading
Loading