orb-ui 0.8.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -3
- package/dist/adapters/agora/index.d.ts +65 -0
- package/dist/adapters/azure-voice-live/browser-audio.d.ts +32 -0
- package/dist/adapters/azure-voice-live/index.d.ts +67 -0
- package/dist/adapters/cartesia/index.d.ts +50 -0
- package/dist/adapters/deepgram/index.d.ts +69 -0
- package/dist/adapters/hume/index.d.ts +48 -0
- package/dist/adapters/index.d.ts +8 -0
- package/dist/adapters/nova-sonic/index.d.ts +60 -0
- package/dist/adapters/openai-live/index.d.ts +36 -0
- package/dist/adapters/retell/index.d.ts +78 -0
- package/dist/adapters.cjs +20 -1
- package/dist/adapters.js +1421 -52
- package/dist/orb-ui.cjs +1 -1
- package/dist/orb-ui.js +2 -2
- package/package.json +15 -3
package/dist/orb-ui.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.createContext)(void 0);function r({children:r,theme:i,size:a,className:o,style:s,slotProps:c,components:l,renderTheme:u}){let d=(0,e.useMemo)(()=>({theme:i,size:a,className:o,style:s,slotProps:c,components:l,renderTheme:u}),[o,l,u,a,c,s,i]);return(0,t.jsx)(n.Provider,{value:d,children:r})}function i(){return(0,e.useContext)(n)}function a(e,t,n){return e??t?.state??n.state}function o(e,t){return e===`listening`?t.inputVolume??0:e===`speaking`?t.outputVolume??0:0}function s(...e){return e.filter(Boolean).join(` `)||void 0}function c(e,t){return e?t?{...e,...t,className:s(e.className,t.className),style:{...e.style,...t.style}}:e:t}function l(e,t){if(!e)return t;if(!t)return e;let n={},r=new Set([...Object.keys(e),...Object.keys(t)]);for(let i of r)n[i]=c(e[i],t[i]);return n}function u(e,t,...n){let r=e?.[t];return{...r,className:s(`orb-ui__${t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`,...n,r?.className)}}var d=[`idle`,`connecting`,`listening`,`thinking`,`speaking`,`error`];function f({state:n,volume:r,size:i,declaredSize:a,className:o,style:c,slotProps:l,rootRef:f,disabled:p=!1,onStart:m,onStop:h,config:g,..._}){let v=Math.max(0,r)**+g.motion.responseExponent,y=u(l,`root`,`orb-ui`,`orb-ui--debug`,o),b=u(l,`header`),x=u(l,`label`),S=u(l,`meterTrack`),C=u(l,`meterFill`),w=u(l,`actions`),T=u(l,`control`),{className:E,style:D,...O}=y,{className:k,style:A,...j}=b,{className:M,style:N,...P}=x,{className:F,style:I,...L}=S,{className:ee,style:te,...R}=C,{className:z,style:B,...ne}=w,{className:V,style:H,...U}=T;return(0,t.jsxs)(`div`,{...O,..._,ref:f,className:E,"data-orb-ui-rendered-size":Math.round(i),"data-orb-ui-slot":`root`,style:{width:`var(--orb-ui-size, ${a}px)`,fontFamily:`monospace`,fontSize:12,background:g.appearance.backgroundColor,color:g.appearance.textColor,border:`1px solid ${g.appearance.borderColor}`,borderRadius:g.geometry.borderRadius,padding:g.geometry.padding,boxSizing:`border-box`,userSelect:`none`,...c,...D},children:[(0,t.jsx)(`div`,{...j,className:k,"data-orb-ui-slot":`header`,style:{color:`#555`,marginBottom:10,fontSize:10,letterSpacing:1,...A},children:`ORB DEBUG`}),(0,t.jsxs)(`div`,{style:{marginBottom:8},children:[(0,t.jsxs)(`span`,{...P,className:M,"data-orb-ui-slot":`label`,style:{color:`#555`,...N},children:[`state`,` `]}),(0,t.jsx)(`span`,{style:{color:g.appearance.colors[n],fontWeight:`bold`},children:n})]}),(0,t.jsxs)(`div`,{style:{marginBottom:10},children:[(0,t.jsxs)(`span`,{...P,className:M,"data-orb-ui-slot":`label`,style:{color:`#555`,...N},children:[`volume`,` `]}),(0,t.jsx)(`span`,{style:{color:g.appearance.textColor},children:v.toFixed(2)}),(0,t.jsx)(`div`,{...L,className:F,"data-orb-ui-slot":`meter-track`,style:{marginTop:4,height:4,background:`#222`,borderRadius:2,overflow:`hidden`,...I},children:(0,t.jsx)(`div`,{...R,className:ee,"data-orb-ui-slot":`meter-fill`,style:{height:`100%`,width:`${v*100}%`,background:g.appearance.colors[n],borderRadius:2,transition:`width 50ms linear`,...te}})})]}),(0,t.jsxs)(`div`,{style:{marginBottom:10},children:[(0,t.jsx)(`div`,{style:{color:`#555`,marginBottom:4,fontSize:10},children:`force state`}),(0,t.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:d.map(t=>(0,e.createElement)(`button`,{...U,key:t,className:V,"data-orb-ui-slot":`control`,disabled:p,style:{fontSize:10,padding:`2px 6px`,background:n===t?g.appearance.colors[t]:`#222`,color:n===t?`#000`:`#
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.createContext)(void 0);function r({children:r,theme:i,size:a,className:o,style:s,slotProps:c,components:l,renderTheme:u}){let d=(0,e.useMemo)(()=>({theme:i,size:a,className:o,style:s,slotProps:c,components:l,renderTheme:u}),[o,l,u,a,c,s,i]);return(0,t.jsx)(n.Provider,{value:d,children:r})}function i(){return(0,e.useContext)(n)}function a(e,t,n){return e??t?.state??n.state}function o(e,t){return e===`listening`?t.inputVolume??0:e===`speaking`?t.outputVolume??0:0}function s(...e){return e.filter(Boolean).join(` `)||void 0}function c(e,t){return e?t?{...e,...t,className:s(e.className,t.className),style:{...e.style,...t.style}}:e:t}function l(e,t){if(!e)return t;if(!t)return e;let n={},r=new Set([...Object.keys(e),...Object.keys(t)]);for(let i of r)n[i]=c(e[i],t[i]);return n}function u(e,t,...n){let r=e?.[t];return{...r,className:s(`orb-ui__${t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`,...n,r?.className)}}var d=[`idle`,`connecting`,`listening`,`thinking`,`speaking`,`error`];function f({state:n,volume:r,size:i,declaredSize:a,className:o,style:c,slotProps:l,rootRef:f,disabled:p=!1,onStart:m,onStop:h,config:g,..._}){let v=Math.max(0,r)**+g.motion.responseExponent,y=u(l,`root`,`orb-ui`,`orb-ui--debug`,o),b=u(l,`header`),x=u(l,`label`),S=u(l,`meterTrack`),C=u(l,`meterFill`),w=u(l,`actions`),T=u(l,`control`),{className:E,style:D,...O}=y,{className:k,style:A,...j}=b,{className:M,style:N,...P}=x,{className:F,style:I,...L}=S,{className:ee,style:te,...R}=C,{className:z,style:B,...ne}=w,{className:V,style:H,...U}=T;return(0,t.jsxs)(`div`,{...O,..._,ref:f,className:E,"data-orb-ui-rendered-size":Math.round(i),"data-orb-ui-slot":`root`,style:{width:`var(--orb-ui-size, ${a}px)`,fontFamily:`monospace`,fontSize:12,background:g.appearance.backgroundColor,color:g.appearance.textColor,border:`1px solid ${g.appearance.borderColor}`,borderRadius:g.geometry.borderRadius,padding:g.geometry.padding,boxSizing:`border-box`,userSelect:`none`,...c,...D},children:[(0,t.jsx)(`div`,{...j,className:k,"data-orb-ui-slot":`header`,style:{color:`#555`,marginBottom:10,fontSize:10,letterSpacing:1,...A},children:`ORB DEBUG`}),(0,t.jsxs)(`div`,{style:{marginBottom:8},children:[(0,t.jsxs)(`span`,{...P,className:M,"data-orb-ui-slot":`label`,style:{color:`#555`,...N},children:[`state`,` `]}),(0,t.jsx)(`span`,{style:{color:g.appearance.colors[n],fontWeight:`bold`},children:n})]}),(0,t.jsxs)(`div`,{style:{marginBottom:10},children:[(0,t.jsxs)(`span`,{...P,className:M,"data-orb-ui-slot":`label`,style:{color:`#555`,...N},children:[`volume`,` `]}),(0,t.jsx)(`span`,{style:{color:g.appearance.textColor},children:v.toFixed(2)}),(0,t.jsx)(`div`,{...L,className:F,"data-orb-ui-slot":`meter-track`,style:{marginTop:4,height:4,background:`#222`,borderRadius:2,overflow:`hidden`,...I},children:(0,t.jsx)(`div`,{...R,className:ee,"data-orb-ui-slot":`meter-fill`,style:{height:`100%`,width:`${v*100}%`,background:g.appearance.colors[n],borderRadius:2,transition:`width 50ms linear`,...te}})})]}),(0,t.jsxs)(`div`,{style:{marginBottom:10},children:[(0,t.jsx)(`div`,{style:{color:`#555`,marginBottom:4,fontSize:10},children:`force state`}),(0,t.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:d.map(t=>(0,e.createElement)(`button`,{...U,key:t,className:V,"data-orb-ui-slot":`control`,disabled:p,style:{fontSize:10,padding:`2px 6px`,background:n===t?g.appearance.colors[t]:`#222`,color:n===t?`#000`:`#999`,border:`1px solid ${n===t?g.appearance.colors[t]:`#333`}`,borderRadius:3,cursor:p?`not-allowed`:`pointer`,...H},onClick:()=>{console.warn(`[orb-ui debug] To force state '${t}', use controlled mode: <Orb state="${t}" />`)}},t))})]}),(0,t.jsxs)(`div`,{...ne,className:z,"data-orb-ui-slot":`actions`,style:{display:`flex`,gap:6,...B},children:[(0,t.jsx)(`button`,{...U,className:s(V,`orb-ui__control--start`),"data-orb-ui-slot":`control`,disabled:p,onClick:m,style:{flex:1,padding:`4px 0`,background:`#1a3a1a`,color:`#40f080`,border:`1px solid #40f080`,borderRadius:4,cursor:p?`not-allowed`:`pointer`,fontSize:11,...H},children:`Start`}),(0,t.jsx)(`button`,{...U,className:s(V,`orb-ui__control--stop`),"data-orb-ui-slot":`control`,disabled:p,onClick:h,style:{flex:1,padding:`4px 0`,background:`#3a1a1a`,color:`#ff8080`,border:`1px solid #f04040`,borderRadius:4,cursor:p?`not-allowed`:`pointer`,fontSize:11,...H},children:`Stop`})]})]})}var p=typeof window<`u`?e.useLayoutEffect:e.useEffect;function m(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}var h=`
|
|
2
2
|
@keyframes orb-circle-idle-pulse {
|
|
3
3
|
from { transform: scale(1); }
|
|
4
4
|
to { transform: scale(1.06); }
|
package/dist/orb-ui.js
CHANGED
|
@@ -202,7 +202,7 @@ function x({ state: e, volume: n, size: r, declaredSize: i, className: a, style:
|
|
|
202
202
|
fontSize: 10,
|
|
203
203
|
padding: "2px 6px",
|
|
204
204
|
background: e === n ? m.appearance.colors[n] : "#222",
|
|
205
|
-
color: e === n ? "#000" : "#
|
|
205
|
+
color: e === n ? "#000" : "#999",
|
|
206
206
|
border: `1px solid ${e === n ? m.appearance.colors[n] : "#333"}`,
|
|
207
207
|
borderRadius: 3,
|
|
208
208
|
cursor: d ? "not-allowed" : "pointer",
|
|
@@ -251,7 +251,7 @@ function x({ state: e, volume: n, size: r, declaredSize: i, className: a, style:
|
|
|
251
251
|
flex: 1,
|
|
252
252
|
padding: "4px 0",
|
|
253
253
|
background: "#3a1a1a",
|
|
254
|
-
color: "#
|
|
254
|
+
color: "#ff8080",
|
|
255
255
|
border: "1px solid #f04040",
|
|
256
256
|
borderRadius: 4,
|
|
257
257
|
cursor: d ? "not-allowed" : "pointer",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orb-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "React voice agent UI components with audio-reactive adapters for Vapi, ElevenLabs, LiveKit, Pipecat, OpenAI Realtime, Gemini Live, and custom voice AI apps.",
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"description": "React voice agent UI components with audio-reactive adapters for Vapi, ElevenLabs, LiveKit, Pipecat, OpenAI Live, OpenAI Realtime, Gemini Live, and custom voice AI apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/orb-ui.cjs",
|
|
7
7
|
"module": "./dist/orb-ui.js",
|
|
@@ -37,10 +37,15 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@azure/ai-voicelive": "1.1.0",
|
|
41
|
+
"@cartesia/cartesia-js": "4.2.0",
|
|
40
42
|
"@changesets/cli": "^2.31.0",
|
|
43
|
+
"@deepgram/agents": "0.1.2",
|
|
44
|
+
"@deepgram/react": "0.2.0",
|
|
41
45
|
"@elevenlabs/client": "1.9.0",
|
|
42
46
|
"@eslint/js": "^10.0.1",
|
|
43
47
|
"@google/genai": "2.11.0",
|
|
48
|
+
"@humeai/voice-react": "0.3.0-beta.6",
|
|
44
49
|
"@pipecat-ai/client-js": "1.12.0",
|
|
45
50
|
"@pipecat-ai/small-webrtc-transport": "1.10.5",
|
|
46
51
|
"@playwright/test": "1.61.1",
|
|
@@ -48,12 +53,17 @@
|
|
|
48
53
|
"@types/react-dom": "^18.3.7",
|
|
49
54
|
"@vapi-ai/web": "2.7.0",
|
|
50
55
|
"@vitejs/plugin-react": "^6.0.2",
|
|
56
|
+
"agora-agent-client-toolkit": "2.10.0",
|
|
57
|
+
"agora-rtc-sdk-ng": "4.24.8",
|
|
58
|
+
"agora-rtm": "2.3.0",
|
|
51
59
|
"eslint": "^10.4.0",
|
|
52
60
|
"globals": "^17.6.0",
|
|
61
|
+
"hume": "0.16.1",
|
|
53
62
|
"livekit-client": "2.20.0",
|
|
54
63
|
"prettier": "^3.8.3",
|
|
55
64
|
"react": "^18.3.1",
|
|
56
65
|
"react-dom": "^18.3.1",
|
|
66
|
+
"retell-client-js-sdk": "3.0.2",
|
|
57
67
|
"typescript": "^5.9.3",
|
|
58
68
|
"typescript-eslint": "^8.59.4",
|
|
59
69
|
"vite": "^8.0.14",
|
|
@@ -80,6 +90,7 @@
|
|
|
80
90
|
"elevenlabs",
|
|
81
91
|
"livekit",
|
|
82
92
|
"pipecat",
|
|
93
|
+
"openai-live",
|
|
83
94
|
"openai-realtime",
|
|
84
95
|
"gemini-live"
|
|
85
96
|
],
|
|
@@ -104,7 +115,8 @@
|
|
|
104
115
|
"build": "tsc && vite build",
|
|
105
116
|
"build:demo": "pnpm --filter orb-ui-demo build",
|
|
106
117
|
"changeset": "changeset",
|
|
107
|
-
"check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm typecheck:examples && pnpm test && pnpm build && pnpm typecheck:package && pnpm typecheck:demo && pnpm build:demo && pnpm test:e2e:built",
|
|
118
|
+
"check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm typecheck:examples && pnpm test && pnpm build && pnpm typecheck:package && pnpm typecheck:demo && pnpm build:demo && pnpm check:nova && pnpm test:e2e:built",
|
|
119
|
+
"check:nova": "npm --prefix examples/nova-sonic ci --ignore-scripts && npm --prefix examples/nova-sonic run typecheck && npm --prefix examples/nova-sonic test && npm --prefix examples/nova-sonic run build",
|
|
108
120
|
"dev": "vite build --watch",
|
|
109
121
|
"dev:demo": "pnpm --filter orb-ui-demo dev",
|
|
110
122
|
"format": "prettier . --write",
|