@onlive.ai/common-121 0.2.163 → 0.2.184

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.
Files changed (447) hide show
  1. package/audi-dark.theme-B8g9SRrd.d.cts +11 -0
  2. package/audi-dark.theme-B8g9SRrd.d.ts +11 -0
  3. package/audi.theme-CbqEkKLD.d.cts +11 -0
  4. package/audi.theme-CbqEkKLD.d.ts +11 -0
  5. package/australia.theme-Cs0cygOQ.d.cts +11 -0
  6. package/australia.theme-Cs0cygOQ.d.ts +11 -0
  7. package/chunk-UTOVVCSU.js +2 -0
  8. package/components/asset/asset-modal-portal.cjs +1 -1
  9. package/components/asset/asset-modal-portal.d.cts +1 -1
  10. package/components/asset/asset-modal-portal.d.ts +1 -1
  11. package/components/asset/asset-modal-portal.js +1 -1
  12. package/components/asset/asset.cjs +4 -4
  13. package/components/asset/asset.d.cts +1 -1
  14. package/components/asset/asset.d.ts +1 -1
  15. package/components/asset/asset.js +13 -13
  16. package/components/asset/asset.loaders.cjs +1 -1
  17. package/components/asset/asset.loaders.d.cts +1 -1
  18. package/components/asset/asset.loaders.d.ts +1 -1
  19. package/components/asset/asset.loaders.js +1 -1
  20. package/components/asset/asset.renderer.cjs +4 -4
  21. package/components/asset/asset.renderer.d.cts +1 -1
  22. package/components/asset/asset.renderer.d.ts +1 -1
  23. package/components/asset/asset.renderer.js +10 -10
  24. package/components/asset/asset.styles.cjs +1 -1
  25. package/components/asset/asset.styles.d.cts +1 -1
  26. package/components/asset/asset.styles.d.ts +1 -1
  27. package/components/asset/asset.styles.js +1 -1
  28. package/components/asset/asset.types.cjs +1 -1
  29. package/components/asset/asset.types.d.cts +1 -1
  30. package/components/asset/asset.types.d.ts +1 -1
  31. package/components/asset/asset.types.js +1 -1
  32. package/components/asset/index.cjs +4 -4
  33. package/components/asset/index.d.cts +1 -1
  34. package/components/asset/index.d.ts +1 -1
  35. package/components/asset/index.js +13 -13
  36. package/components/player/player.cjs +1 -1
  37. package/components/player/player.d.cts +1 -1
  38. package/components/player/player.d.ts +1 -1
  39. package/components/player/player.js +1 -1
  40. package/components/player/player.styles.cjs +1 -1
  41. package/components/player/player.styles.d.cts +1 -1
  42. package/components/player/player.styles.d.ts +1 -1
  43. package/components/player/player.styles.js +1 -1
  44. package/components/side-bar/index.cjs +1 -1
  45. package/components/side-bar/index.d.cts +1 -1
  46. package/components/side-bar/index.d.ts +1 -1
  47. package/components/side-bar/index.js +1 -1
  48. package/components/side-bar/side-bar.cjs +1 -1
  49. package/components/side-bar/side-bar.d.cts +1 -1
  50. package/components/side-bar/side-bar.d.ts +1 -1
  51. package/components/side-bar/side-bar.js +1 -1
  52. package/components/side-bar/side-bar.styles.cjs +1 -1
  53. package/components/side-bar/side-bar.styles.d.cts +1 -1
  54. package/components/side-bar/side-bar.styles.d.ts +1 -1
  55. package/components/side-bar/side-bar.styles.js +1 -1
  56. package/components/side-bar/side-bar.types.cjs +1 -1
  57. package/components/side-bar/side-bar.types.d.cts +1 -1
  58. package/components/side-bar/side-bar.types.d.ts +1 -1
  59. package/components/side-bar/side-bar.types.js +1 -1
  60. package/components/upload/index.cjs +1 -1
  61. package/components/upload/index.d.cts +1 -1
  62. package/components/upload/index.d.ts +1 -1
  63. package/components/upload/index.js +1 -1
  64. package/components/upload/upload.cjs +1 -1
  65. package/components/upload/upload.d.cts +1 -1
  66. package/components/upload/upload.d.ts +1 -1
  67. package/components/upload/upload.js +1 -1
  68. package/components/upload/upload.styles.cjs +1 -1
  69. package/components/upload/upload.styles.d.cts +1 -1
  70. package/components/upload/upload.styles.d.ts +1 -1
  71. package/components/upload/upload.styles.js +1 -1
  72. package/components/upload/upload.types.cjs +1 -1
  73. package/components/upload/upload.types.d.cts +1 -1
  74. package/components/upload/upload.types.d.ts +1 -1
  75. package/components/upload/upload.types.js +1 -1
  76. package/cuernavaca.theme-0UFX1MeG.d.cts +11 -0
  77. package/cuernavaca.theme-0UFX1MeG.d.ts +11 -0
  78. package/cupra-diagonal.theme-DVrQr2iv.d.cts +11 -0
  79. package/cupra-diagonal.theme-DVrQr2iv.d.ts +11 -0
  80. package/cupra-events.theme-D2xJeafa.d.cts +11 -0
  81. package/cupra-events.theme-D2xJeafa.d.ts +11 -0
  82. package/cupra.theme-CqgKWLYE.d.cts +11 -0
  83. package/cupra.theme-CqgKWLYE.d.ts +11 -0
  84. package/germany.theme-CnwD309P.d.cts +11 -0
  85. package/germany.theme-CnwD309P.d.ts +11 -0
  86. package/hyundai.theme-E2ZiyZmJ.d.cts +11 -0
  87. package/hyundai.theme-E2ZiyZmJ.d.ts +11 -0
  88. package/index.cjs +276 -276
  89. package/index.d.cts +4134 -3
  90. package/index.d.ts +4134 -3
  91. package/index.js +280 -280
  92. package/italy.theme-BjfPp7rU.d.cts +11 -0
  93. package/italy.theme-BjfPp7rU.d.ts +11 -0
  94. package/magimix.theme-7cd19P1X.d.cts +11 -0
  95. package/magimix.theme-7cd19P1X.d.ts +11 -0
  96. package/media-SB4RDT6E.js +2 -0
  97. package/onlive-ai.theme-CASPoRHr.d.cts +11 -0
  98. package/onlive-ai.theme-CASPoRHr.d.ts +11 -0
  99. package/onlive.theme-nKZQHG1I.d.cts +11 -0
  100. package/onlive.theme-nKZQHG1I.d.ts +11 -0
  101. package/package.json +13 -9
  102. package/react/components/asset/Asset.cjs +1 -1
  103. package/react/components/asset/Asset.jsx +1 -1
  104. package/react/components/side-bar/SideBar.cjs +1 -1
  105. package/react/components/side-bar/SideBar.jsx +1 -1
  106. package/react/components/upload/Upload.cjs +1 -1
  107. package/react/components/upload/Upload.jsx +1 -1
  108. package/seat-cupra.theme-B4ylEjOZ.d.cts +11 -0
  109. package/seat-cupra.theme-B4ylEjOZ.d.ts +11 -0
  110. package/services/audio.service.cjs +1 -1
  111. package/services/audio.service.d.cts +1 -1
  112. package/services/audio.service.d.ts +1 -1
  113. package/services/audio.service.js +1 -1
  114. package/services/conversation/conversation.service.cjs +2 -2
  115. package/services/conversation/conversation.service.d.cts +26 -3
  116. package/services/conversation/conversation.service.d.ts +26 -3
  117. package/services/conversation/conversation.service.js +2 -2
  118. package/services/conversation/conversation.types.cjs +2 -2
  119. package/services/conversation/conversation.types.d.cts +120 -4
  120. package/services/conversation/conversation.types.d.ts +120 -4
  121. package/services/conversation/conversation.types.js +2 -2
  122. package/services/conversation/index.cjs +2 -2
  123. package/services/conversation/index.d.cts +19 -2
  124. package/services/conversation/index.d.ts +19 -2
  125. package/services/conversation/index.js +2 -2
  126. package/services/conversation/mock/actor/agent.cjs +2 -0
  127. package/services/conversation/mock/actor/agent.d.cts +202 -0
  128. package/services/conversation/mock/actor/agent.d.ts +202 -0
  129. package/services/conversation/mock/actor/agent.js +2 -0
  130. package/services/conversation/mock/actor/index.cjs +2 -0
  131. package/services/conversation/mock/actor/index.d.cts +4 -0
  132. package/services/conversation/mock/actor/index.d.ts +4 -0
  133. package/services/conversation/mock/actor/index.js +2 -0
  134. package/services/conversation/mock/actor/strategies.cjs +2 -0
  135. package/services/conversation/mock/actor/strategies.d.cts +31 -0
  136. package/services/conversation/mock/actor/strategies.d.ts +31 -0
  137. package/services/conversation/mock/actor/strategies.js +2 -0
  138. package/services/conversation/mock/errors.cjs +2 -0
  139. package/services/conversation/mock/errors.d.cts +125 -0
  140. package/services/conversation/mock/errors.d.ts +125 -0
  141. package/services/conversation/mock/errors.js +2 -0
  142. package/services/conversation/mock/events.cjs +2 -0
  143. package/services/conversation/mock/events.d.cts +253 -0
  144. package/services/conversation/mock/events.d.ts +253 -0
  145. package/services/conversation/mock/events.js +2 -0
  146. package/services/conversation/mock/factory.cjs +2 -0
  147. package/services/conversation/mock/factory.d.cts +134 -0
  148. package/services/conversation/mock/factory.d.ts +134 -0
  149. package/services/conversation/mock/factory.js +2 -0
  150. package/services/conversation/mock/fixtures.cjs +2 -0
  151. package/services/conversation/mock/fixtures.d.cts +191 -0
  152. package/services/conversation/mock/fixtures.d.ts +191 -0
  153. package/services/conversation/mock/fixtures.js +2 -0
  154. package/services/conversation/mock/generators.cjs +2 -0
  155. package/services/conversation/mock/generators.d.cts +123 -0
  156. package/services/conversation/mock/generators.d.ts +123 -0
  157. package/services/conversation/mock/generators.js +2 -0
  158. package/services/conversation/mock/index.cjs +2 -0
  159. package/services/conversation/mock/index.d.cts +24 -0
  160. package/services/conversation/mock/index.d.ts +24 -0
  161. package/services/conversation/mock/index.js +2 -0
  162. package/services/conversation/mock/livekit/index.cjs +2 -0
  163. package/services/conversation/mock/livekit/index.d.cts +7 -0
  164. package/services/conversation/mock/livekit/index.d.ts +7 -0
  165. package/services/conversation/mock/livekit/index.js +2 -0
  166. package/services/conversation/mock/livekit/local-participant.cjs +2 -0
  167. package/services/conversation/mock/livekit/local-participant.d.cts +204 -0
  168. package/services/conversation/mock/livekit/local-participant.d.ts +204 -0
  169. package/services/conversation/mock/livekit/local-participant.js +2 -0
  170. package/services/conversation/mock/livekit/participant.cjs +2 -0
  171. package/services/conversation/mock/livekit/participant.d.cts +171 -0
  172. package/services/conversation/mock/livekit/participant.d.ts +171 -0
  173. package/services/conversation/mock/livekit/participant.js +2 -0
  174. package/services/conversation/mock/livekit/room.cjs +2 -0
  175. package/services/conversation/mock/livekit/room.d.cts +292 -0
  176. package/services/conversation/mock/livekit/room.d.ts +292 -0
  177. package/services/conversation/mock/livekit/room.js +2 -0
  178. package/services/conversation/mock/livekit/streams.cjs +2 -0
  179. package/services/conversation/mock/livekit/streams.d.cts +190 -0
  180. package/services/conversation/mock/livekit/streams.d.ts +190 -0
  181. package/services/conversation/mock/livekit/streams.js +2 -0
  182. package/services/conversation/mock/livekit/tracks.cjs +2 -0
  183. package/services/conversation/mock/livekit/tracks.d.cts +149 -0
  184. package/services/conversation/mock/livekit/tracks.d.ts +149 -0
  185. package/services/conversation/mock/livekit/tracks.js +2 -0
  186. package/services/conversation/mock/media.cjs +2 -0
  187. package/services/conversation/mock/media.d.cts +174 -0
  188. package/services/conversation/mock/media.d.ts +174 -0
  189. package/services/conversation/mock/media.js +2 -0
  190. package/services/conversation/mock/service.cjs +2 -0
  191. package/services/conversation/mock/service.d.cts +305 -0
  192. package/services/conversation/mock/service.d.ts +305 -0
  193. package/services/conversation/mock/service.js +2 -0
  194. package/services/conversation/mock/service.test.cjs +2 -0
  195. package/services/conversation/mock/service.test.d.cts +1 -0
  196. package/services/conversation/mock/service.test.d.ts +1 -0
  197. package/services/conversation/mock/service.test.js +2 -0
  198. package/services/conversation/mock/state.cjs +2 -0
  199. package/services/conversation/mock/state.d.cts +296 -0
  200. package/services/conversation/mock/state.d.ts +296 -0
  201. package/services/conversation/mock/state.js +2 -0
  202. package/services/conversation/mock/storybook.cjs +2 -0
  203. package/services/conversation/mock/storybook.d.cts +197 -0
  204. package/services/conversation/mock/storybook.d.ts +197 -0
  205. package/services/conversation/mock/storybook.js +2 -0
  206. package/services/conversation/mock/types.cjs +2 -0
  207. package/services/conversation/mock/types.d.cts +442 -0
  208. package/services/conversation/mock/types.d.ts +442 -0
  209. package/services/conversation/mock/types.js +1 -0
  210. package/services/faqs/faqs.service.cjs +1 -1
  211. package/services/faqs/faqs.service.d.cts +1 -1
  212. package/services/faqs/faqs.service.d.ts +1 -1
  213. package/services/faqs/faqs.service.js +1 -1
  214. package/services/faqs/faqs.types.cjs +1 -1
  215. package/services/faqs/faqs.types.d.cts +1 -1
  216. package/services/faqs/faqs.types.d.ts +1 -1
  217. package/services/faqs/faqs.types.js +1 -1
  218. package/services/faqs/index.cjs +1 -1
  219. package/services/faqs/index.d.cts +1 -1
  220. package/services/faqs/index.d.ts +1 -1
  221. package/services/faqs/index.js +1 -1
  222. package/services/file/file.service.cjs +1 -1
  223. package/services/file/file.service.d.cts +1 -1
  224. package/services/file/file.service.d.ts +1 -1
  225. package/services/file/file.service.js +1 -1
  226. package/services/file/file.types.cjs +1 -1
  227. package/services/file/file.types.d.cts +1 -1
  228. package/services/file/file.types.d.ts +1 -1
  229. package/services/file/file.types.js +1 -1
  230. package/services/file/index.cjs +1 -1
  231. package/services/file/index.d.cts +1 -1
  232. package/services/file/index.d.ts +1 -1
  233. package/services/file/index.js +1 -1
  234. package/services/firebase/firebase-api.cjs +1 -1
  235. package/services/firebase/firebase-api.d.cts +1 -1
  236. package/services/firebase/firebase-api.d.ts +1 -1
  237. package/services/firebase/firebase-api.js +1 -1
  238. package/services/multimedia/config.example.cjs +1 -1
  239. package/services/multimedia/config.example.d.cts +1 -1
  240. package/services/multimedia/config.example.d.ts +1 -1
  241. package/services/multimedia/config.example.js +1 -1
  242. package/services/multimedia/index.cjs +1 -1
  243. package/services/multimedia/index.d.cts +1 -1
  244. package/services/multimedia/index.d.ts +1 -1
  245. package/services/multimedia/index.js +1 -1
  246. package/services/multimedia/multimedia.service.cjs +1 -1
  247. package/services/multimedia/multimedia.service.d.cts +1 -1
  248. package/services/multimedia/multimedia.service.d.ts +1 -1
  249. package/services/multimedia/multimedia.service.js +1 -1
  250. package/services/multimedia/multimedia.types.cjs +1 -1
  251. package/services/multimedia/multimedia.types.d.cts +1 -1
  252. package/services/multimedia/multimedia.types.d.ts +1 -1
  253. package/services/multimedia/multimedia.types.js +1 -1
  254. package/services/product/index.cjs +1 -1
  255. package/services/product/index.d.cts +1 -1
  256. package/services/product/index.d.ts +1 -1
  257. package/services/product/index.js +1 -1
  258. package/services/product/product.service.cjs +1 -1
  259. package/services/product/product.service.d.cts +1 -1
  260. package/services/product/product.service.d.ts +1 -1
  261. package/services/product/product.service.js +1 -1
  262. package/services/product/product.types.cjs +1 -1
  263. package/services/product/product.types.d.cts +1 -1
  264. package/services/product/product.types.d.ts +1 -1
  265. package/services/product/product.types.js +1 -1
  266. package/services/request.provider.cjs +1 -1
  267. package/services/request.provider.d.cts +1 -1
  268. package/services/request.provider.d.ts +1 -1
  269. package/services/request.provider.js +1 -1
  270. package/services/session.service.cjs +2 -2
  271. package/services/session.service.d.cts +1 -1
  272. package/services/session.service.d.ts +1 -1
  273. package/services/session.service.js +2 -2
  274. package/services/upload/index.cjs +1 -1
  275. package/services/upload/index.d.cts +1 -1
  276. package/services/upload/index.d.ts +1 -1
  277. package/services/upload/index.js +1 -1
  278. package/services/upload/upload.service.cjs +1 -1
  279. package/services/upload/upload.service.d.cts +1 -1
  280. package/services/upload/upload.service.d.ts +1 -1
  281. package/services/upload/upload.service.js +1 -1
  282. package/themes/custom/audi-dark.theme.cjs +920 -0
  283. package/themes/custom/audi-dark.theme.d.cts +3 -0
  284. package/themes/custom/audi-dark.theme.d.ts +3 -0
  285. package/themes/custom/audi-dark.theme.js +920 -0
  286. package/themes/custom/audi.theme.cjs +777 -0
  287. package/themes/custom/audi.theme.d.cts +3 -0
  288. package/themes/custom/audi.theme.d.ts +3 -0
  289. package/themes/custom/audi.theme.js +777 -0
  290. package/themes/custom/australia.theme.cjs +386 -0
  291. package/themes/custom/australia.theme.d.cts +3 -0
  292. package/themes/custom/australia.theme.d.ts +3 -0
  293. package/themes/custom/australia.theme.js +386 -0
  294. package/themes/custom/cuernavaca.theme.cjs +196 -0
  295. package/themes/custom/cuernavaca.theme.d.cts +3 -0
  296. package/themes/custom/cuernavaca.theme.d.ts +3 -0
  297. package/themes/custom/cuernavaca.theme.js +196 -0
  298. package/themes/custom/cupra-diagonal.theme.cjs +1029 -0
  299. package/themes/custom/cupra-diagonal.theme.d.cts +3 -0
  300. package/themes/custom/cupra-diagonal.theme.d.ts +3 -0
  301. package/themes/custom/cupra-diagonal.theme.js +1029 -0
  302. package/themes/custom/cupra-events.theme.cjs +555 -0
  303. package/themes/custom/cupra-events.theme.d.cts +3 -0
  304. package/themes/custom/cupra-events.theme.d.ts +3 -0
  305. package/themes/custom/cupra-events.theme.js +555 -0
  306. package/themes/custom/cupra.theme.cjs +147 -0
  307. package/themes/custom/cupra.theme.d.cts +3 -0
  308. package/themes/custom/cupra.theme.d.ts +3 -0
  309. package/themes/custom/cupra.theme.js +147 -0
  310. package/themes/custom/germany.theme.cjs +716 -0
  311. package/themes/custom/germany.theme.d.cts +3 -0
  312. package/themes/custom/germany.theme.d.ts +3 -0
  313. package/themes/custom/germany.theme.js +716 -0
  314. package/themes/custom/hyundai.theme.cjs +294 -0
  315. package/themes/custom/hyundai.theme.d.cts +3 -0
  316. package/themes/custom/hyundai.theme.d.ts +3 -0
  317. package/themes/custom/hyundai.theme.js +294 -0
  318. package/themes/custom/italy.theme.cjs +850 -0
  319. package/themes/custom/italy.theme.d.cts +3 -0
  320. package/themes/custom/italy.theme.d.ts +3 -0
  321. package/themes/custom/italy.theme.js +850 -0
  322. package/themes/custom/magimix.theme.cjs +119 -0
  323. package/themes/custom/magimix.theme.d.cts +3 -0
  324. package/themes/custom/magimix.theme.d.ts +3 -0
  325. package/themes/custom/magimix.theme.js +119 -0
  326. package/themes/custom/onlive-ai.theme.cjs +74 -0
  327. package/themes/custom/onlive-ai.theme.d.cts +3 -0
  328. package/themes/custom/onlive-ai.theme.d.ts +3 -0
  329. package/themes/custom/onlive-ai.theme.js +74 -0
  330. package/themes/custom/onlive.theme.cjs +33 -0
  331. package/themes/custom/onlive.theme.d.cts +3 -0
  332. package/themes/custom/onlive.theme.d.ts +3 -0
  333. package/themes/custom/onlive.theme.js +33 -0
  334. package/themes/custom/seat-cupra.theme.cjs +478 -0
  335. package/themes/custom/seat-cupra.theme.d.cts +3 -0
  336. package/themes/custom/seat-cupra.theme.d.ts +3 -0
  337. package/themes/custom/seat-cupra.theme.js +478 -0
  338. package/themes/dark.cjs +13 -2
  339. package/themes/dark.d.cts +1 -1
  340. package/themes/dark.d.ts +1 -1
  341. package/themes/dark.js +12 -1
  342. package/themes/light.cjs +13 -2
  343. package/themes/light.d.cts +1 -1
  344. package/themes/light.d.ts +1 -1
  345. package/themes/light.js +12 -1
  346. package/types/globals.cjs +1 -1
  347. package/types/globals.d.cts +1 -1
  348. package/types/globals.d.ts +1 -1
  349. package/types/globals.js +1 -1
  350. package/types/tracking-options.cjs +1 -1
  351. package/types/tracking-options.d.cts +1 -1
  352. package/types/tracking-options.d.ts +1 -1
  353. package/types/tracking-options.js +1 -1
  354. package/utils/adopt-styles.cjs +1 -1
  355. package/utils/adopt-styles.d.cts +1 -1
  356. package/utils/adopt-styles.d.ts +1 -1
  357. package/utils/adopt-styles.js +1 -1
  358. package/utils/apply-optional-styles.cjs +6548 -0
  359. package/utils/apply-optional-styles.d.cts +47 -0
  360. package/utils/apply-optional-styles.d.ts +47 -0
  361. package/utils/apply-optional-styles.js +6548 -0
  362. package/utils/browser-preferences.cjs +1 -1
  363. package/utils/browser-preferences.d.cts +1 -1
  364. package/utils/browser-preferences.d.ts +1 -1
  365. package/utils/browser-preferences.js +1 -1
  366. package/utils/classify-media.cjs +1 -1
  367. package/utils/classify-media.d.cts +1 -1
  368. package/utils/classify-media.d.ts +1 -1
  369. package/utils/classify-media.js +1 -1
  370. package/utils/decorators.cjs +1 -1
  371. package/utils/decorators.d.cts +1 -1
  372. package/utils/decorators.d.ts +1 -1
  373. package/utils/decorators.js +1 -1
  374. package/utils/detected-lang.cjs +1 -1
  375. package/utils/detected-lang.d.cts +1 -1
  376. package/utils/detected-lang.d.ts +1 -1
  377. package/utils/detected-lang.js +1 -1
  378. package/utils/fullscreen.cjs +1 -1
  379. package/utils/fullscreen.d.cts +1 -1
  380. package/utils/fullscreen.d.ts +1 -1
  381. package/utils/fullscreen.js +1 -1
  382. package/utils/insert-script.cjs +1 -1
  383. package/utils/insert-script.d.cts +1 -1
  384. package/utils/insert-script.d.ts +1 -1
  385. package/utils/insert-script.js +1 -1
  386. package/utils/is-map-compatible.cjs +1 -1
  387. package/utils/is-map-compatible.d.cts +1 -1
  388. package/utils/is-map-compatible.d.ts +1 -1
  389. package/utils/is-map-compatible.js +1 -1
  390. package/utils/markdown.cjs +1 -1
  391. package/utils/markdown.d.cts +1 -1
  392. package/utils/markdown.d.ts +1 -1
  393. package/utils/markdown.js +1 -1
  394. package/utils/merge.cjs +1 -1
  395. package/utils/merge.d.cts +1 -1
  396. package/utils/merge.d.ts +1 -1
  397. package/utils/merge.js +1 -1
  398. package/utils/multiband-track-volume.cjs +1 -1
  399. package/utils/multiband-track-volume.d.cts +1 -1
  400. package/utils/multiband-track-volume.d.ts +1 -1
  401. package/utils/multiband-track-volume.js +1 -1
  402. package/utils/onlive-url-params.cjs +1 -1
  403. package/utils/onlive-url-params.d.cts +1 -1
  404. package/utils/onlive-url-params.d.ts +1 -1
  405. package/utils/onlive-url-params.js +1 -1
  406. package/utils/pretty-distance.cjs +1 -1
  407. package/utils/pretty-distance.d.cts +1 -1
  408. package/utils/pretty-distance.d.ts +1 -1
  409. package/utils/pretty-distance.js +1 -1
  410. package/utils/pretty-time.cjs +1 -1
  411. package/utils/pretty-time.d.cts +1 -1
  412. package/utils/pretty-time.d.ts +1 -1
  413. package/utils/pretty-time.js +1 -1
  414. package/utils/random-string.cjs +1 -1
  415. package/utils/random-string.d.cts +1 -1
  416. package/utils/random-string.d.ts +1 -1
  417. package/utils/random-string.js +1 -1
  418. package/utils/resource-type.cjs +1 -1
  419. package/utils/resource-type.d.cts +1 -1
  420. package/utils/resource-type.d.ts +1 -1
  421. package/utils/resource-type.js +1 -1
  422. package/utils/round-number.cjs +1 -1
  423. package/utils/round-number.d.cts +1 -1
  424. package/utils/round-number.d.ts +1 -1
  425. package/utils/round-number.js +1 -1
  426. package/utils/safe-html.cjs +2 -2
  427. package/utils/safe-html.d.cts +9 -2
  428. package/utils/safe-html.d.ts +9 -2
  429. package/utils/safe-html.js +2 -2
  430. package/utils/sanitize.cjs +1 -1
  431. package/utils/sanitize.d.cts +1 -1
  432. package/utils/sanitize.d.ts +1 -1
  433. package/utils/sanitize.js +1 -1
  434. package/utils/spread.cjs +1 -1
  435. package/utils/spread.d.cts +1 -1
  436. package/utils/spread.d.ts +1 -1
  437. package/utils/spread.js +1 -1
  438. package/utils/watch.cjs +1 -1
  439. package/utils/watch.d.cts +1 -1
  440. package/utils/watch.d.ts +1 -1
  441. package/utils/watch.js +1 -1
  442. package/react/components/asset/Asset.d.cts +0 -33
  443. package/react/components/asset/Asset.d.ts +0 -33
  444. package/react/components/side-bar/SideBar.d.cts +0 -37
  445. package/react/components/side-bar/SideBar.d.ts +0 -37
  446. package/react/components/upload/Upload.d.cts +0 -23
  447. package/react/components/upload/Upload.d.ts +0 -23
@@ -0,0 +1,296 @@
1
+ /*! @onlive.ai/common-121 v0.2.184 | © 2026 Onlive.ai */
2
+ import { MockServiceConfig, MockRoomState, MockConnectionState, MockParticipantRole, MockParticipantKind, MockParticipantState, MockError, MockTrackKind, MockTrackSource, MockTrackState, MockAgentConfig, MockAgentState, MockAgentStatus, MockAgentMessage, MockMessageState, MockErrorCode, MockStateSnapshot, MockStateSnapshotJSON } from './types.cjs';
3
+
4
+ /**
5
+ * @summary In-memory state management for the mock LiveKit service.
6
+ *
7
+ * @description Manages all mock state including rooms, participants, tracks, agents,
8
+ * and messages. Provides methods for state manipulation and queries.
9
+ */
10
+
11
+ /**
12
+ * @summary Manages in-memory state for the mock service.
13
+ *
14
+ * @description Provides a centralized store for all mock LiveKit entities
15
+ * with methods for CRUD operations and state queries.
16
+ */
17
+ declare class MockState {
18
+ /** Map of room ID to room state */
19
+ private rooms;
20
+ /** Map of participant identity to participant state */
21
+ private participants;
22
+ /** Map of track ID to track state */
23
+ private tracks;
24
+ /** Map of agent ID to agent state */
25
+ private agents;
26
+ /** Map of room ID to array of messages */
27
+ private messages;
28
+ /** Current service configuration */
29
+ private config;
30
+ /** Random number generator state for deterministic behavior */
31
+ private randomState;
32
+ /**
33
+ * Initializes a new instance of MockState.
34
+ *
35
+ * @param {MockServiceConfig} config - Service configuration.
36
+ */
37
+ constructor(config?: MockServiceConfig);
38
+ /**
39
+ * Updates the service configuration.
40
+ *
41
+ * @param {Partial<MockServiceConfig>} config - Configuration updates.
42
+ */
43
+ updateConfig(config: Partial<MockServiceConfig>): void;
44
+ /**
45
+ * Gets the current service configuration.
46
+ *
47
+ * @returns {MockServiceConfig} Current configuration.
48
+ */
49
+ getConfig(): MockServiceConfig;
50
+ /**
51
+ * Generates a seeded random number for deterministic behavior.
52
+ *
53
+ * @returns {number} Random number between 0 and 1.
54
+ */
55
+ random(): number;
56
+ /**
57
+ * Creates a new room.
58
+ *
59
+ * @param {string} name - Room name.
60
+ * @param {string} [groupId] - Group identifier.
61
+ * @param {Record<string, unknown>} [metadata] - Room metadata.
62
+ * @returns {MockRoomState} Created room state.
63
+ */
64
+ createRoom(name: string, groupId?: string, metadata?: Record<string, unknown>): MockRoomState;
65
+ /**
66
+ * Gets a room by ID.
67
+ *
68
+ * @param {string} roomId - Room identifier.
69
+ * @returns {MockRoomState | undefined} Room state if found.
70
+ */
71
+ getRoom(roomId: string): MockRoomState | undefined;
72
+ /**
73
+ * Gets a room by name.
74
+ *
75
+ * @param {string} name - Room name.
76
+ * @returns {MockRoomState | undefined} Room state if found.
77
+ */
78
+ getRoomByName(name: string): MockRoomState | undefined;
79
+ /**
80
+ * Lists all rooms.
81
+ *
82
+ * @param {boolean} [activeOnly] - Only return active rooms.
83
+ * @returns {MockRoomState[]} Array of room states.
84
+ */
85
+ listRooms(activeOnly?: boolean): MockRoomState[];
86
+ /**
87
+ * Updates room connection state.
88
+ *
89
+ * @param {string} roomId - Room identifier.
90
+ * @param {MockConnectionState} state - New connection state.
91
+ * @returns {MockConnectionState | undefined} Previous state if room exists.
92
+ */
93
+ updateRoomConnectionState(roomId: string, state: MockConnectionState): MockConnectionState | undefined;
94
+ /**
95
+ * Ends a room.
96
+ *
97
+ * @param {string} roomId - Room identifier.
98
+ * @returns {boolean} True if room was ended successfully.
99
+ */
100
+ endRoom(roomId: string): boolean;
101
+ /**
102
+ * Deletes a room and all associated data.
103
+ *
104
+ * @param {string} roomId - Room identifier.
105
+ * @returns {boolean} True if room was deleted.
106
+ */
107
+ deleteRoom(roomId: string): boolean;
108
+ /**
109
+ * Adds a participant to a room.
110
+ *
111
+ * @param {string} roomId - Room identifier.
112
+ * @param {string} identity - Participant identity.
113
+ * @param {string} [name] - Display name.
114
+ * @param {MockParticipantRole} [role] - Participant role.
115
+ * @param {MockParticipantKind} [kind] - Participant kind.
116
+ * @param {boolean} [isLocal] - Whether this is the local participant.
117
+ * @returns {MockParticipantState | MockError} Participant state or error.
118
+ */
119
+ addParticipant(roomId: string, identity: string, name?: string, role?: MockParticipantRole, kind?: MockParticipantKind, isLocal?: boolean): MockParticipantState | MockError;
120
+ /**
121
+ * Gets a participant by identity.
122
+ *
123
+ * @param {string} identity - Participant identity.
124
+ * @returns {MockParticipantState | undefined} Participant state if found.
125
+ */
126
+ getParticipant(identity: string): MockParticipantState | undefined;
127
+ /**
128
+ * Lists participants in a room.
129
+ *
130
+ * @param {string} roomId - Room identifier.
131
+ * @param {boolean} [connectedOnly] - Only return connected participants.
132
+ * @returns {MockParticipantState[]} Array of participant states.
133
+ */
134
+ listParticipants(roomId: string, connectedOnly?: boolean): MockParticipantState[];
135
+ /**
136
+ * Updates participant attributes.
137
+ *
138
+ * @param {string} identity - Participant identity.
139
+ * @param {Record<string, string>} attributes - New attributes.
140
+ * @returns {Record<string, string> | undefined} Previous attributes if participant exists.
141
+ */
142
+ updateParticipantAttributes(identity: string, attributes: Record<string, string>): Record<string, string> | undefined;
143
+ /**
144
+ * Removes a participant from a room.
145
+ *
146
+ * @param {string} identity - Participant identity.
147
+ * @returns {MockParticipantState | undefined} Removed participant if found.
148
+ */
149
+ removeParticipant(identity: string): MockParticipantState | undefined;
150
+ /**
151
+ * Publishes a track for a participant.
152
+ *
153
+ * @param {string} participantIdentity - Participant identity.
154
+ * @param {MockTrackKind} kind - Track kind.
155
+ * @param {MockTrackSource} source - Track source.
156
+ * @param {Record<string, unknown>} [metadata] - Track metadata.
157
+ * @returns {MockTrackState | MockError} Track state or error.
158
+ */
159
+ publishTrack(participantIdentity: string, kind: MockTrackKind, source?: MockTrackSource, metadata?: Record<string, unknown>): MockTrackState | MockError;
160
+ /**
161
+ * Gets a track by ID.
162
+ *
163
+ * @param {string} trackId - Track identifier.
164
+ * @returns {MockTrackState | undefined} Track state if found.
165
+ */
166
+ getTrack(trackId: string): MockTrackState | undefined;
167
+ /**
168
+ * Lists tracks for a participant or room.
169
+ *
170
+ * @param {string} [roomId] - Filter by room ID.
171
+ * @param {string} [participantIdentity] - Filter by participant identity.
172
+ * @returns {MockTrackState[]} Array of track states.
173
+ */
174
+ listTracks(roomId?: string, participantIdentity?: string): MockTrackState[];
175
+ /**
176
+ * Unpublishes a track.
177
+ *
178
+ * @param {string} trackId - Track identifier.
179
+ * @returns {MockTrackState | undefined} Unpublished track if found.
180
+ */
181
+ unpublishTrack(trackId: string): MockTrackState | undefined;
182
+ /**
183
+ * Mutes or unmutes a track.
184
+ *
185
+ * @param {string} trackId - Track identifier.
186
+ * @param {boolean} muted - Whether to mute the track.
187
+ * @returns {boolean} True if track was updated.
188
+ */
189
+ setTrackMuted(trackId: string, muted: boolean): boolean;
190
+ /**
191
+ * Starts an agent in a room.
192
+ *
193
+ * @param {string} roomId - Room identifier.
194
+ * @param {string} name - Agent name.
195
+ * @param {Partial<MockAgentConfig>} [config] - Agent configuration.
196
+ * @returns {MockAgentState | MockError} Agent state or error.
197
+ */
198
+ startAgent(roomId: string, name: string, config?: Partial<MockAgentConfig>): MockAgentState | MockError;
199
+ /**
200
+ * Gets an agent by ID.
201
+ *
202
+ * @param {string} agentId - Agent identifier.
203
+ * @returns {MockAgentState | undefined} Agent state if found.
204
+ */
205
+ getAgent(agentId: string): MockAgentState | undefined;
206
+ /**
207
+ * Lists agents in a room.
208
+ *
209
+ * @param {string} roomId - Room identifier.
210
+ * @returns {MockAgentState[]} Array of agent states.
211
+ */
212
+ listAgents(roomId: string): MockAgentState[];
213
+ /**
214
+ * Stops an agent.
215
+ *
216
+ * @param {string} agentId - Agent identifier.
217
+ * @returns {MockAgentState | undefined} Stopped agent if found.
218
+ */
219
+ stopAgent(agentId: string): MockAgentState | undefined;
220
+ /**
221
+ * Updates agent status.
222
+ *
223
+ * @param {string} agentId - Agent identifier.
224
+ * @param {MockAgentStatus} status - New status.
225
+ * @returns {boolean} True if agent was updated.
226
+ */
227
+ updateAgentStatus(agentId: string, status: MockAgentStatus): boolean;
228
+ /**
229
+ * Adds a message to agent's history.
230
+ *
231
+ * @param {string} agentId - Agent identifier.
232
+ * @param {string} content - Message content.
233
+ * @param {"user" | "agent"} role - Message role.
234
+ * @returns {MockAgentMessage | undefined} Created message if agent exists.
235
+ */
236
+ addAgentMessage(agentId: string, content: string, role: "user" | "agent"): MockAgentMessage | undefined;
237
+ /**
238
+ * Adds a message to a room.
239
+ *
240
+ * @param {string} roomId - Room identifier.
241
+ * @param {string} participantIdentity - Sender identity.
242
+ * @param {string} content - Message content.
243
+ * @param {"standard" | "system"} [type] - Message type.
244
+ * @param {Record<string, unknown>} [attributes] - Message attributes.
245
+ * @returns {MockMessageState | MockError} Message state or error.
246
+ */
247
+ addMessage(roomId: string, participantIdentity: string, content: string, type?: "standard" | "system", attributes?: Record<string, unknown>): MockMessageState | MockError;
248
+ /**
249
+ * Gets messages for a room.
250
+ *
251
+ * @param {string} roomId - Room identifier.
252
+ * @param {number} [limit] - Maximum messages to return.
253
+ * @returns {MockMessageState[]} Array of messages.
254
+ */
255
+ getMessages(roomId: string, limit?: number): MockMessageState[];
256
+ /**
257
+ * Creates a mock error.
258
+ *
259
+ * @param {MockErrorCode} code - Error code.
260
+ * @param {string} message - Error message.
261
+ * @param {Record<string, unknown>} [details] - Additional details.
262
+ * @returns {MockError} Mock error object.
263
+ */
264
+ createError(code: MockErrorCode, message: string, details?: Record<string, unknown>): MockError;
265
+ /**
266
+ * Checks if a value is a MockError.
267
+ *
268
+ * @param {unknown} value - Value to check.
269
+ * @returns {boolean} True if value is a MockError.
270
+ */
271
+ isError(value: unknown): value is MockError;
272
+ /**
273
+ * Resets all state.
274
+ */
275
+ reset(): void;
276
+ /**
277
+ * Gets a complete snapshot of the current state.
278
+ *
279
+ * @returns {MockStateSnapshot} Current state snapshot.
280
+ */
281
+ getSnapshot(): MockStateSnapshot;
282
+ /**
283
+ * Exports state to JSON.
284
+ *
285
+ * @returns {MockStateSnapshotJSON} JSON-serializable snapshot.
286
+ */
287
+ toJSON(): MockStateSnapshotJSON;
288
+ /**
289
+ * Imports state from JSON.
290
+ *
291
+ * @param {MockStateSnapshotJSON} json - State to import.
292
+ */
293
+ fromJSON(json: MockStateSnapshotJSON): void;
294
+ }
295
+
296
+ export { MockState };
@@ -0,0 +1,296 @@
1
+ /*! @onlive.ai/common-121 v0.2.184 | © 2026 Onlive.ai */
2
+ import { MockServiceConfig, MockRoomState, MockConnectionState, MockParticipantRole, MockParticipantKind, MockParticipantState, MockError, MockTrackKind, MockTrackSource, MockTrackState, MockAgentConfig, MockAgentState, MockAgentStatus, MockAgentMessage, MockMessageState, MockErrorCode, MockStateSnapshot, MockStateSnapshotJSON } from './types.js';
3
+
4
+ /**
5
+ * @summary In-memory state management for the mock LiveKit service.
6
+ *
7
+ * @description Manages all mock state including rooms, participants, tracks, agents,
8
+ * and messages. Provides methods for state manipulation and queries.
9
+ */
10
+
11
+ /**
12
+ * @summary Manages in-memory state for the mock service.
13
+ *
14
+ * @description Provides a centralized store for all mock LiveKit entities
15
+ * with methods for CRUD operations and state queries.
16
+ */
17
+ declare class MockState {
18
+ /** Map of room ID to room state */
19
+ private rooms;
20
+ /** Map of participant identity to participant state */
21
+ private participants;
22
+ /** Map of track ID to track state */
23
+ private tracks;
24
+ /** Map of agent ID to agent state */
25
+ private agents;
26
+ /** Map of room ID to array of messages */
27
+ private messages;
28
+ /** Current service configuration */
29
+ private config;
30
+ /** Random number generator state for deterministic behavior */
31
+ private randomState;
32
+ /**
33
+ * Initializes a new instance of MockState.
34
+ *
35
+ * @param {MockServiceConfig} config - Service configuration.
36
+ */
37
+ constructor(config?: MockServiceConfig);
38
+ /**
39
+ * Updates the service configuration.
40
+ *
41
+ * @param {Partial<MockServiceConfig>} config - Configuration updates.
42
+ */
43
+ updateConfig(config: Partial<MockServiceConfig>): void;
44
+ /**
45
+ * Gets the current service configuration.
46
+ *
47
+ * @returns {MockServiceConfig} Current configuration.
48
+ */
49
+ getConfig(): MockServiceConfig;
50
+ /**
51
+ * Generates a seeded random number for deterministic behavior.
52
+ *
53
+ * @returns {number} Random number between 0 and 1.
54
+ */
55
+ random(): number;
56
+ /**
57
+ * Creates a new room.
58
+ *
59
+ * @param {string} name - Room name.
60
+ * @param {string} [groupId] - Group identifier.
61
+ * @param {Record<string, unknown>} [metadata] - Room metadata.
62
+ * @returns {MockRoomState} Created room state.
63
+ */
64
+ createRoom(name: string, groupId?: string, metadata?: Record<string, unknown>): MockRoomState;
65
+ /**
66
+ * Gets a room by ID.
67
+ *
68
+ * @param {string} roomId - Room identifier.
69
+ * @returns {MockRoomState | undefined} Room state if found.
70
+ */
71
+ getRoom(roomId: string): MockRoomState | undefined;
72
+ /**
73
+ * Gets a room by name.
74
+ *
75
+ * @param {string} name - Room name.
76
+ * @returns {MockRoomState | undefined} Room state if found.
77
+ */
78
+ getRoomByName(name: string): MockRoomState | undefined;
79
+ /**
80
+ * Lists all rooms.
81
+ *
82
+ * @param {boolean} [activeOnly] - Only return active rooms.
83
+ * @returns {MockRoomState[]} Array of room states.
84
+ */
85
+ listRooms(activeOnly?: boolean): MockRoomState[];
86
+ /**
87
+ * Updates room connection state.
88
+ *
89
+ * @param {string} roomId - Room identifier.
90
+ * @param {MockConnectionState} state - New connection state.
91
+ * @returns {MockConnectionState | undefined} Previous state if room exists.
92
+ */
93
+ updateRoomConnectionState(roomId: string, state: MockConnectionState): MockConnectionState | undefined;
94
+ /**
95
+ * Ends a room.
96
+ *
97
+ * @param {string} roomId - Room identifier.
98
+ * @returns {boolean} True if room was ended successfully.
99
+ */
100
+ endRoom(roomId: string): boolean;
101
+ /**
102
+ * Deletes a room and all associated data.
103
+ *
104
+ * @param {string} roomId - Room identifier.
105
+ * @returns {boolean} True if room was deleted.
106
+ */
107
+ deleteRoom(roomId: string): boolean;
108
+ /**
109
+ * Adds a participant to a room.
110
+ *
111
+ * @param {string} roomId - Room identifier.
112
+ * @param {string} identity - Participant identity.
113
+ * @param {string} [name] - Display name.
114
+ * @param {MockParticipantRole} [role] - Participant role.
115
+ * @param {MockParticipantKind} [kind] - Participant kind.
116
+ * @param {boolean} [isLocal] - Whether this is the local participant.
117
+ * @returns {MockParticipantState | MockError} Participant state or error.
118
+ */
119
+ addParticipant(roomId: string, identity: string, name?: string, role?: MockParticipantRole, kind?: MockParticipantKind, isLocal?: boolean): MockParticipantState | MockError;
120
+ /**
121
+ * Gets a participant by identity.
122
+ *
123
+ * @param {string} identity - Participant identity.
124
+ * @returns {MockParticipantState | undefined} Participant state if found.
125
+ */
126
+ getParticipant(identity: string): MockParticipantState | undefined;
127
+ /**
128
+ * Lists participants in a room.
129
+ *
130
+ * @param {string} roomId - Room identifier.
131
+ * @param {boolean} [connectedOnly] - Only return connected participants.
132
+ * @returns {MockParticipantState[]} Array of participant states.
133
+ */
134
+ listParticipants(roomId: string, connectedOnly?: boolean): MockParticipantState[];
135
+ /**
136
+ * Updates participant attributes.
137
+ *
138
+ * @param {string} identity - Participant identity.
139
+ * @param {Record<string, string>} attributes - New attributes.
140
+ * @returns {Record<string, string> | undefined} Previous attributes if participant exists.
141
+ */
142
+ updateParticipantAttributes(identity: string, attributes: Record<string, string>): Record<string, string> | undefined;
143
+ /**
144
+ * Removes a participant from a room.
145
+ *
146
+ * @param {string} identity - Participant identity.
147
+ * @returns {MockParticipantState | undefined} Removed participant if found.
148
+ */
149
+ removeParticipant(identity: string): MockParticipantState | undefined;
150
+ /**
151
+ * Publishes a track for a participant.
152
+ *
153
+ * @param {string} participantIdentity - Participant identity.
154
+ * @param {MockTrackKind} kind - Track kind.
155
+ * @param {MockTrackSource} source - Track source.
156
+ * @param {Record<string, unknown>} [metadata] - Track metadata.
157
+ * @returns {MockTrackState | MockError} Track state or error.
158
+ */
159
+ publishTrack(participantIdentity: string, kind: MockTrackKind, source?: MockTrackSource, metadata?: Record<string, unknown>): MockTrackState | MockError;
160
+ /**
161
+ * Gets a track by ID.
162
+ *
163
+ * @param {string} trackId - Track identifier.
164
+ * @returns {MockTrackState | undefined} Track state if found.
165
+ */
166
+ getTrack(trackId: string): MockTrackState | undefined;
167
+ /**
168
+ * Lists tracks for a participant or room.
169
+ *
170
+ * @param {string} [roomId] - Filter by room ID.
171
+ * @param {string} [participantIdentity] - Filter by participant identity.
172
+ * @returns {MockTrackState[]} Array of track states.
173
+ */
174
+ listTracks(roomId?: string, participantIdentity?: string): MockTrackState[];
175
+ /**
176
+ * Unpublishes a track.
177
+ *
178
+ * @param {string} trackId - Track identifier.
179
+ * @returns {MockTrackState | undefined} Unpublished track if found.
180
+ */
181
+ unpublishTrack(trackId: string): MockTrackState | undefined;
182
+ /**
183
+ * Mutes or unmutes a track.
184
+ *
185
+ * @param {string} trackId - Track identifier.
186
+ * @param {boolean} muted - Whether to mute the track.
187
+ * @returns {boolean} True if track was updated.
188
+ */
189
+ setTrackMuted(trackId: string, muted: boolean): boolean;
190
+ /**
191
+ * Starts an agent in a room.
192
+ *
193
+ * @param {string} roomId - Room identifier.
194
+ * @param {string} name - Agent name.
195
+ * @param {Partial<MockAgentConfig>} [config] - Agent configuration.
196
+ * @returns {MockAgentState | MockError} Agent state or error.
197
+ */
198
+ startAgent(roomId: string, name: string, config?: Partial<MockAgentConfig>): MockAgentState | MockError;
199
+ /**
200
+ * Gets an agent by ID.
201
+ *
202
+ * @param {string} agentId - Agent identifier.
203
+ * @returns {MockAgentState | undefined} Agent state if found.
204
+ */
205
+ getAgent(agentId: string): MockAgentState | undefined;
206
+ /**
207
+ * Lists agents in a room.
208
+ *
209
+ * @param {string} roomId - Room identifier.
210
+ * @returns {MockAgentState[]} Array of agent states.
211
+ */
212
+ listAgents(roomId: string): MockAgentState[];
213
+ /**
214
+ * Stops an agent.
215
+ *
216
+ * @param {string} agentId - Agent identifier.
217
+ * @returns {MockAgentState | undefined} Stopped agent if found.
218
+ */
219
+ stopAgent(agentId: string): MockAgentState | undefined;
220
+ /**
221
+ * Updates agent status.
222
+ *
223
+ * @param {string} agentId - Agent identifier.
224
+ * @param {MockAgentStatus} status - New status.
225
+ * @returns {boolean} True if agent was updated.
226
+ */
227
+ updateAgentStatus(agentId: string, status: MockAgentStatus): boolean;
228
+ /**
229
+ * Adds a message to agent's history.
230
+ *
231
+ * @param {string} agentId - Agent identifier.
232
+ * @param {string} content - Message content.
233
+ * @param {"user" | "agent"} role - Message role.
234
+ * @returns {MockAgentMessage | undefined} Created message if agent exists.
235
+ */
236
+ addAgentMessage(agentId: string, content: string, role: "user" | "agent"): MockAgentMessage | undefined;
237
+ /**
238
+ * Adds a message to a room.
239
+ *
240
+ * @param {string} roomId - Room identifier.
241
+ * @param {string} participantIdentity - Sender identity.
242
+ * @param {string} content - Message content.
243
+ * @param {"standard" | "system"} [type] - Message type.
244
+ * @param {Record<string, unknown>} [attributes] - Message attributes.
245
+ * @returns {MockMessageState | MockError} Message state or error.
246
+ */
247
+ addMessage(roomId: string, participantIdentity: string, content: string, type?: "standard" | "system", attributes?: Record<string, unknown>): MockMessageState | MockError;
248
+ /**
249
+ * Gets messages for a room.
250
+ *
251
+ * @param {string} roomId - Room identifier.
252
+ * @param {number} [limit] - Maximum messages to return.
253
+ * @returns {MockMessageState[]} Array of messages.
254
+ */
255
+ getMessages(roomId: string, limit?: number): MockMessageState[];
256
+ /**
257
+ * Creates a mock error.
258
+ *
259
+ * @param {MockErrorCode} code - Error code.
260
+ * @param {string} message - Error message.
261
+ * @param {Record<string, unknown>} [details] - Additional details.
262
+ * @returns {MockError} Mock error object.
263
+ */
264
+ createError(code: MockErrorCode, message: string, details?: Record<string, unknown>): MockError;
265
+ /**
266
+ * Checks if a value is a MockError.
267
+ *
268
+ * @param {unknown} value - Value to check.
269
+ * @returns {boolean} True if value is a MockError.
270
+ */
271
+ isError(value: unknown): value is MockError;
272
+ /**
273
+ * Resets all state.
274
+ */
275
+ reset(): void;
276
+ /**
277
+ * Gets a complete snapshot of the current state.
278
+ *
279
+ * @returns {MockStateSnapshot} Current state snapshot.
280
+ */
281
+ getSnapshot(): MockStateSnapshot;
282
+ /**
283
+ * Exports state to JSON.
284
+ *
285
+ * @returns {MockStateSnapshotJSON} JSON-serializable snapshot.
286
+ */
287
+ toJSON(): MockStateSnapshotJSON;
288
+ /**
289
+ * Imports state from JSON.
290
+ *
291
+ * @param {MockStateSnapshotJSON} json - State to import.
292
+ */
293
+ fromJSON(json: MockStateSnapshotJSON): void;
294
+ }
295
+
296
+ export { MockState };
@@ -0,0 +1,2 @@
1
+ /*! @onlive.ai/common-121 v0.2.184 | © 2026 Onlive.ai */
2
+ var u=0;function c(g){return u++,`mock_${g}_${u}_${Date.now().toString(36)}`}function d(g,t,e){let n=e||new Date().toISOString(),r=typeof btoa=="function"?btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):n.replace(/[^a-zA-Z0-9]/g,"");return`mock_token_${g}_${t}_${r}`}function k(g){return`wss://mock-livekit.local/room/${g}`}var f=class{constructor(t={}){this.rooms=new Map;this.participants=new Map;this.tracks=new Map;this.agents=new Map;this.messages=new Map;this.config=t,this.randomState=t.seed??Date.now()}updateConfig(t){this.config={...this.config,...t},t.seed!==void 0&&(this.randomState=t.seed)}getConfig(){return{...this.config}}random(){return this.randomState=(this.randomState*1103515245+12345)%2147483648,this.randomState/2147483648}createRoom(t,e,n){let r=c("room"),s=new Date().toISOString(),o={id:r,name:t,groupId:e||c("group"),createdAt:s,metadata:n,isActive:!0,participantIds:[],connectionState:"disconnected",wsURL:k(r),token:d(r,"pending",s)};return this.rooms.set(r,o),this.messages.set(r,[]),o}getRoom(t){return this.rooms.get(t)}getRoomByName(t){for(let e of this.rooms.values())if(e.name===t)return e}listRooms(t=!1){let e=Array.from(this.rooms.values());return t?e.filter(n=>n.isActive):e}updateRoomConnectionState(t,e){let n=this.rooms.get(t);if(!n)return;let r=n.connectionState;return n.connectionState=e,r}endRoom(t){let e=this.rooms.get(t);if(!e||!e.isActive)return!1;e.isActive=!1,e.endedAt=new Date().toISOString(),e.connectionState="disconnected";for(let n of e.participantIds){let r=this.participants.get(n);r&&(r.isConnected=!1)}for(let n of this.agents.values())n.roomId===t&&n.status==="running"&&(n.status="stopped",n.stoppedAt=new Date().toISOString());return!0}deleteRoom(t){let e=this.rooms.get(t);if(!e)return!1;for(let n of e.participantIds)this.participants.delete(n);for(let[n,r]of this.tracks)r.roomId===t&&this.tracks.delete(n);for(let[n,r]of this.agents)r.roomId===t&&this.agents.delete(n);return this.messages.delete(t),this.rooms.delete(t),!0}addParticipant(t,e,n,r="user",s="standard",o=!1){let i=this.rooms.get(t);if(!i)return this.createError("ROOM_NOT_FOUND",`Room ${t} not found`);if(!i.isActive)return this.createError("ROOM_ENDED",`Room ${t} has ended`);let a=this.participants.get(e);if(a&&a.roomId===t&&a.isConnected)return this.config.strictMode?this.createError("PARTICIPANT_ALREADY_JOINED",`Participant ${e} is already in room ${t}`):a;let p={identity:e,name:n||e,roomId:t,joinedAt:new Date().toISOString(),isConnected:!0,trackIds:[],role:r,attributes:{},kind:s,isLocal:o};return this.participants.set(e,p),i.participantIds.push(e),p}getParticipant(t){return this.participants.get(t)}listParticipants(t,e=!0){let n=this.rooms.get(t);if(!n)return[];let r=[];for(let s of n.participantIds){let o=this.participants.get(s);o&&(!e||o.isConnected)&&r.push(o)}return r}updateParticipantAttributes(t,e){let n=this.participants.get(t);if(!n)return;let r={...n.attributes};return n.attributes={...n.attributes,...e},r}removeParticipant(t){let e=this.participants.get(t);if(!e)return;e.isConnected=!1;for(let r of e.trackIds)this.tracks.delete(r);e.trackIds=[];let n=this.rooms.get(e.roomId);if(n){let r=n.participantIds.indexOf(t);r!==-1&&n.participantIds.splice(r,1)}return e}publishTrack(t,e,n="unknown",r){let s=this.participants.get(t);if(!s)return this.createError("PARTICIPANT_NOT_FOUND",`Participant ${t} not found`);if(!s.isConnected)return this.createError("INVALID_OPERATION",`Participant ${t} is not connected`);let o=this.rooms.get(s.roomId);if(!o||!o.isActive)return this.createError("ROOM_ENDED","Room is not active");let i=c("track"),a={id:i,kind:e,source:n,participantIdentity:t,roomId:s.roomId,publishedAt:new Date().toISOString(),muted:!1,metadata:r};return this.tracks.set(i,a),s.trackIds.push(i),a}getTrack(t){return this.tracks.get(t)}listTracks(t,e){let n=[];for(let r of this.tracks.values())t&&r.roomId!==t||e&&r.participantIdentity!==e||n.push(r);return n}unpublishTrack(t){let e=this.tracks.get(t);if(!e)return;let n=this.participants.get(e.participantIdentity);if(n){let r=n.trackIds.indexOf(t);r!==-1&&n.trackIds.splice(r,1)}return this.tracks.delete(t),e}setTrackMuted(t,e){let n=this.tracks.get(t);return n?(n.muted=e,!0):!1}startAgent(t,e,n={}){let r=this.rooms.get(t);if(!r)return this.createError("ROOM_NOT_FOUND",`Room ${t} not found`);if(!r.isActive)return this.createError("ROOM_ENDED",`Room ${t} has ended`);let s=c("agent"),o={id:s,roomId:t,name:e,status:"running",startedAt:new Date().toISOString(),config:{responseStrategy:"echo",...n},messageHistory:[]};return this.agents.set(s,o),this.addParticipant(t,`agent_${s}`,e,"agent","agent",!1),o}getAgent(t){return this.agents.get(t)}listAgents(t){let e=[];for(let n of this.agents.values())n.roomId===t&&e.push(n);return e}stopAgent(t){let e=this.agents.get(t);if(e)return e.status="stopped",e.stoppedAt=new Date().toISOString(),this.removeParticipant(`agent_${t}`),e}updateAgentStatus(t,e){let n=this.agents.get(t);return n?(n.status=e,e==="stopped"&&(n.stoppedAt=new Date().toISOString()),!0):!1}addAgentMessage(t,e,n){let r=this.agents.get(t);if(!r)return;let s={id:c("msg"),content:e,role:n,timestamp:new Date().toISOString()};return r.messageHistory.push(s),s}addMessage(t,e,n,r="standard",s){if(!this.rooms.get(t))return this.createError("ROOM_NOT_FOUND",`Room ${t} not found`);let i={id:c("msg"),roomId:t,content:n,participantIdentity:e,createdAt:new Date().toISOString(),type:r,attributes:s},a=this.messages.get(t)||[];return a.push(i),this.messages.set(t,a),i}getMessages(t,e){let n=this.messages.get(t)||[];return e?n.slice(-e):n}createError(t,e,n){return{code:t,message:e,details:n}}isError(t){return typeof t=="object"&&t!==null&&"code"in t&&"message"in t}reset(){this.rooms.clear(),this.participants.clear(),this.tracks.clear(),this.agents.clear(),this.messages.clear(),this.randomState=this.config.seed??Date.now()}getSnapshot(){return{rooms:new Map(this.rooms),participants:new Map(this.participants),tracks:new Map(this.tracks),agents:new Map(this.agents),messages:new Map(this.messages),config:{...this.config},eventHistory:[]}}toJSON(){return{rooms:Object.fromEntries(this.rooms),participants:Object.fromEntries(this.participants),tracks:Object.fromEntries(this.tracks),agents:Object.fromEntries(this.agents),messages:Object.fromEntries(this.messages),config:this.config,eventHistory:[],exportedAt:new Date().toISOString()}}fromJSON(t){this.rooms=new Map(Object.entries(t.rooms)),this.participants=new Map(Object.entries(t.participants)),this.tracks=new Map(Object.entries(t.tracks)),this.agents=new Map(Object.entries(t.agents)),this.messages=new Map(Object.entries(t.messages).map(([e,n])=>[e,n])),this.config=t.config}};export{f as MockState};