@onlive.ai/common-121 0.2.70 → 0.2.163

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 (286) hide show
  1. package/README.md +0 -1
  2. package/components/asset/asset-modal-portal.cjs +550 -0
  3. package/components/asset/asset-modal-portal.d.cts +22 -0
  4. package/components/asset/asset-modal-portal.d.ts +22 -0
  5. package/components/asset/asset-modal-portal.js +550 -0
  6. package/components/asset/asset.cjs +3536 -0
  7. package/components/asset/asset.d.cts +37 -0
  8. package/components/asset/asset.d.ts +37 -0
  9. package/components/asset/asset.js +3536 -0
  10. package/components/asset/asset.loaders.cjs +2 -0
  11. package/components/asset/asset.loaders.d.cts +17 -0
  12. package/components/asset/asset.loaders.d.ts +17 -0
  13. package/components/asset/asset.loaders.js +2 -0
  14. package/components/asset/asset.renderer.cjs +2292 -0
  15. package/components/asset/asset.renderer.d.cts +29 -0
  16. package/components/asset/asset.renderer.d.ts +29 -0
  17. package/components/asset/asset.renderer.js +2292 -0
  18. package/components/asset/asset.styles.cjs +683 -0
  19. package/components/asset/asset.styles.d.cts +6 -0
  20. package/components/asset/asset.styles.d.ts +6 -0
  21. package/components/asset/asset.styles.js +683 -0
  22. package/components/asset/asset.types.cjs +2 -0
  23. package/components/asset/asset.types.d.cts +103 -0
  24. package/components/asset/asset.types.d.ts +103 -0
  25. package/components/asset/asset.types.js +1 -0
  26. package/components/asset/index.cjs +3536 -0
  27. package/components/asset/index.d.cts +8 -0
  28. package/components/asset/index.d.ts +8 -0
  29. package/components/asset/index.js +3536 -0
  30. package/components/player/player.cjs +2044 -0
  31. package/components/player/player.d.cts +25 -0
  32. package/components/player/player.d.ts +25 -0
  33. package/components/player/player.js +2044 -0
  34. package/components/player/player.styles.cjs +16 -0
  35. package/components/player/player.styles.d.cts +6 -0
  36. package/components/player/player.styles.d.ts +6 -0
  37. package/components/player/player.styles.js +16 -0
  38. package/components/side-bar/index.cjs +3185 -0
  39. package/components/side-bar/index.d.cts +11 -0
  40. package/components/side-bar/index.d.ts +11 -0
  41. package/components/side-bar/index.js +3185 -0
  42. package/components/side-bar/side-bar.cjs +3185 -0
  43. package/components/side-bar/side-bar.d.cts +83 -0
  44. package/components/side-bar/side-bar.d.ts +83 -0
  45. package/components/side-bar/side-bar.js +3185 -0
  46. package/components/side-bar/side-bar.styles.cjs +801 -0
  47. package/components/side-bar/side-bar.styles.d.cts +6 -0
  48. package/components/side-bar/side-bar.styles.d.ts +6 -0
  49. package/components/side-bar/side-bar.styles.js +801 -0
  50. package/components/side-bar/side-bar.types.cjs +2 -0
  51. package/components/side-bar/side-bar.types.d.cts +105 -0
  52. package/components/side-bar/side-bar.types.d.ts +105 -0
  53. package/components/side-bar/side-bar.types.js +2 -0
  54. package/components/upload/index.cjs +83 -0
  55. package/components/upload/index.d.cts +4 -0
  56. package/components/upload/index.d.ts +4 -0
  57. package/components/upload/index.js +83 -0
  58. package/components/upload/upload.cjs +83 -0
  59. package/components/upload/upload.d.cts +28 -0
  60. package/components/upload/upload.d.ts +28 -0
  61. package/components/upload/upload.js +83 -0
  62. package/components/upload/upload.styles.cjs +65 -0
  63. package/components/upload/upload.styles.d.cts +6 -0
  64. package/components/upload/upload.styles.d.ts +6 -0
  65. package/components/upload/upload.styles.js +65 -0
  66. package/components/upload/upload.types.cjs +2 -0
  67. package/components/upload/upload.types.d.cts +16 -0
  68. package/components/upload/upload.types.d.ts +16 -0
  69. package/components/upload/upload.types.js +1 -0
  70. package/index.cjs +4677 -0
  71. package/index.d.cts +338 -0
  72. package/index.d.ts +338 -0
  73. package/index.js +4677 -0
  74. package/package.json +32 -11
  75. package/react/components/asset/Asset.cjs +2 -0
  76. package/react/components/asset/Asset.d.cts +33 -0
  77. package/react/components/asset/Asset.d.ts +33 -0
  78. package/react/components/asset/Asset.jsx +2 -0
  79. package/react/components/side-bar/SideBar.cjs +2 -0
  80. package/react/components/side-bar/SideBar.d.cts +37 -0
  81. package/react/components/side-bar/SideBar.d.ts +37 -0
  82. package/react/components/side-bar/SideBar.jsx +2 -0
  83. package/react/components/upload/Upload.cjs +2 -0
  84. package/react/components/upload/Upload.d.cts +23 -0
  85. package/react/components/upload/Upload.d.ts +23 -0
  86. package/react/components/upload/Upload.jsx +2 -0
  87. package/services/audio.service.cjs +2 -2
  88. package/services/audio.service.d.cts +1 -0
  89. package/services/audio.service.d.ts +1 -0
  90. package/services/audio.service.js +2 -2
  91. package/services/conversation/conversation.service.cjs +2 -0
  92. package/services/conversation/conversation.service.d.cts +533 -0
  93. package/services/conversation/conversation.service.d.ts +533 -0
  94. package/services/conversation/conversation.service.js +2 -0
  95. package/services/conversation/conversation.types.cjs +2 -0
  96. package/services/conversation/conversation.types.d.cts +519 -0
  97. package/services/conversation/conversation.types.d.ts +519 -0
  98. package/services/conversation/conversation.types.js +2 -0
  99. package/services/conversation/index.cjs +2 -0
  100. package/services/conversation/index.d.cts +7 -0
  101. package/services/conversation/index.d.ts +7 -0
  102. package/services/conversation/index.js +2 -0
  103. package/services/faqs/faqs.service.cjs +2 -0
  104. package/services/faqs/faqs.service.d.cts +16 -0
  105. package/services/faqs/faqs.service.d.ts +16 -0
  106. package/services/faqs/faqs.service.js +2 -0
  107. package/services/faqs/faqs.types.cjs +2 -0
  108. package/services/faqs/faqs.types.d.cts +60 -0
  109. package/services/faqs/faqs.types.d.ts +60 -0
  110. package/services/faqs/faqs.types.js +1 -0
  111. package/services/faqs/index.cjs +2 -0
  112. package/services/faqs/index.d.cts +3 -0
  113. package/services/faqs/index.d.ts +3 -0
  114. package/services/faqs/index.js +2 -0
  115. package/services/file/file.service.cjs +2 -0
  116. package/services/file/file.service.d.cts +66 -0
  117. package/services/file/file.service.d.ts +66 -0
  118. package/services/file/file.service.js +2 -0
  119. package/services/file/file.types.cjs +2 -0
  120. package/services/file/file.types.d.cts +72 -0
  121. package/services/file/file.types.d.ts +72 -0
  122. package/services/file/file.types.js +1 -0
  123. package/services/file/index.cjs +2 -0
  124. package/services/file/index.d.cts +3 -0
  125. package/services/file/index.d.ts +3 -0
  126. package/services/file/index.js +2 -0
  127. package/services/firebase/firebase-api.cjs +2 -2
  128. package/services/firebase/firebase-api.d.cts +25 -9
  129. package/services/firebase/firebase-api.d.ts +25 -9
  130. package/services/firebase/firebase-api.js +2 -2
  131. package/services/multimedia/config.example.cjs +2 -0
  132. package/services/multimedia/config.example.d.cts +13 -0
  133. package/services/multimedia/config.example.d.ts +13 -0
  134. package/services/multimedia/config.example.js +2 -0
  135. package/services/multimedia/index.cjs +2 -0
  136. package/services/multimedia/index.d.cts +3 -0
  137. package/services/multimedia/index.d.ts +3 -0
  138. package/services/multimedia/index.js +2 -0
  139. package/services/multimedia/multimedia.service.cjs +2 -0
  140. package/services/multimedia/multimedia.service.d.cts +28 -0
  141. package/services/multimedia/multimedia.service.d.ts +28 -0
  142. package/services/multimedia/multimedia.service.js +2 -0
  143. package/services/multimedia/multimedia.types.cjs +2 -0
  144. package/services/multimedia/multimedia.types.d.cts +65 -0
  145. package/services/multimedia/multimedia.types.d.ts +65 -0
  146. package/services/multimedia/multimedia.types.js +1 -0
  147. package/services/product/index.cjs +2 -0
  148. package/services/product/index.d.cts +3 -0
  149. package/services/product/index.d.ts +3 -0
  150. package/services/product/index.js +2 -0
  151. package/services/product/product.service.cjs +2 -0
  152. package/services/product/product.service.d.cts +19 -0
  153. package/services/product/product.service.d.ts +19 -0
  154. package/services/product/product.service.js +2 -0
  155. package/services/product/product.types.cjs +2 -0
  156. package/services/product/product.types.d.cts +78 -0
  157. package/services/product/product.types.d.ts +78 -0
  158. package/services/product/product.types.js +1 -0
  159. package/services/request.provider.cjs +1 -1
  160. package/services/request.provider.d.cts +1 -0
  161. package/services/request.provider.d.ts +1 -0
  162. package/services/request.provider.js +1 -1
  163. package/services/session.service.cjs +2 -0
  164. package/services/session.service.d.cts +70 -0
  165. package/services/session.service.d.ts +70 -0
  166. package/services/session.service.js +2 -0
  167. package/services/upload/index.cjs +2 -0
  168. package/services/upload/index.d.cts +2 -0
  169. package/services/upload/index.d.ts +2 -0
  170. package/services/upload/index.js +2 -0
  171. package/services/upload/upload.service.cjs +2 -0
  172. package/services/upload/upload.service.d.cts +81 -0
  173. package/services/upload/upload.service.d.ts +81 -0
  174. package/services/upload/upload.service.js +2 -0
  175. package/themes/dark.cjs +4 -1
  176. package/themes/dark.d.cts +1 -0
  177. package/themes/dark.d.ts +1 -0
  178. package/themes/dark.js +4 -1
  179. package/themes/light.cjs +1 -1
  180. package/themes/light.d.cts +1 -0
  181. package/themes/light.d.ts +1 -0
  182. package/themes/light.js +1 -1
  183. package/types/globals.cjs +2 -0
  184. package/types/globals.d.cts +39 -0
  185. package/types/globals.d.ts +39 -0
  186. package/types/globals.js +1 -0
  187. package/types/tracking-options.cjs +2 -2
  188. package/types/tracking-options.d.cts +8 -6
  189. package/types/tracking-options.d.ts +8 -6
  190. package/types/tracking-options.js +1 -1
  191. package/utils/adopt-styles.cjs +2 -2
  192. package/utils/adopt-styles.d.cts +1 -0
  193. package/utils/adopt-styles.d.ts +1 -0
  194. package/utils/adopt-styles.js +2 -2
  195. package/utils/browser-preferences.cjs +2 -2
  196. package/utils/browser-preferences.d.cts +1 -0
  197. package/utils/browser-preferences.d.ts +1 -0
  198. package/utils/browser-preferences.js +2 -2
  199. package/utils/classify-media.cjs +1 -1
  200. package/utils/classify-media.d.cts +1 -0
  201. package/utils/classify-media.d.ts +1 -0
  202. package/utils/classify-media.js +1 -1
  203. package/utils/decorators.cjs +1 -1
  204. package/utils/decorators.d.cts +1 -0
  205. package/utils/decorators.d.ts +1 -0
  206. package/utils/decorators.js +1 -1
  207. package/utils/detected-lang.cjs +2 -2
  208. package/utils/detected-lang.d.cts +1 -0
  209. package/utils/detected-lang.d.ts +1 -0
  210. package/utils/detected-lang.js +2 -2
  211. package/utils/fullscreen.cjs +2 -2
  212. package/utils/fullscreen.d.cts +6 -5
  213. package/utils/fullscreen.d.ts +6 -5
  214. package/utils/fullscreen.js +2 -2
  215. package/utils/insert-script.cjs +1 -1
  216. package/utils/insert-script.d.cts +1 -0
  217. package/utils/insert-script.d.ts +1 -0
  218. package/utils/insert-script.js +1 -1
  219. package/utils/is-map-compatible.cjs +1 -1
  220. package/utils/is-map-compatible.d.cts +1 -0
  221. package/utils/is-map-compatible.d.ts +1 -0
  222. package/utils/is-map-compatible.js +1 -1
  223. package/utils/markdown.cjs +2 -2
  224. package/utils/markdown.d.cts +1 -0
  225. package/utils/markdown.d.ts +1 -0
  226. package/utils/markdown.js +2 -2
  227. package/utils/merge.cjs +2 -2
  228. package/utils/merge.d.cts +2 -1
  229. package/utils/merge.d.ts +2 -1
  230. package/utils/merge.js +2 -2
  231. package/utils/multiband-track-volume.cjs +2 -2
  232. package/utils/multiband-track-volume.d.cts +1 -0
  233. package/utils/multiband-track-volume.d.ts +1 -0
  234. package/utils/multiband-track-volume.js +2 -2
  235. package/utils/onlive-url-params.cjs +1 -1
  236. package/utils/onlive-url-params.d.cts +1 -0
  237. package/utils/onlive-url-params.d.ts +1 -0
  238. package/utils/onlive-url-params.js +1 -1
  239. package/utils/pretty-distance.cjs +2 -2
  240. package/utils/pretty-distance.d.cts +2 -1
  241. package/utils/pretty-distance.d.ts +2 -1
  242. package/utils/pretty-distance.js +2 -2
  243. package/utils/pretty-time.cjs +2 -0
  244. package/utils/pretty-time.d.cts +16 -0
  245. package/utils/pretty-time.d.ts +16 -0
  246. package/utils/pretty-time.js +2 -0
  247. package/utils/random-string.cjs +1 -1
  248. package/utils/random-string.d.cts +1 -0
  249. package/utils/random-string.d.ts +1 -0
  250. package/utils/random-string.js +1 -1
  251. package/utils/resource-type.cjs +1 -1
  252. package/utils/resource-type.d.cts +1 -0
  253. package/utils/resource-type.d.ts +1 -0
  254. package/utils/resource-type.js +1 -1
  255. package/utils/round-number.cjs +2 -0
  256. package/utils/round-number.d.cts +30 -0
  257. package/utils/round-number.d.ts +30 -0
  258. package/utils/round-number.js +2 -0
  259. package/utils/safe-html.cjs +2 -2
  260. package/utils/safe-html.d.cts +4 -3
  261. package/utils/safe-html.d.ts +4 -3
  262. package/utils/safe-html.js +2 -2
  263. package/utils/sanitize.cjs +2 -2
  264. package/utils/sanitize.d.cts +1 -0
  265. package/utils/sanitize.d.ts +1 -0
  266. package/utils/sanitize.js +2 -2
  267. package/utils/spread.cjs +2 -2
  268. package/utils/spread.d.cts +1 -0
  269. package/utils/spread.d.ts +1 -0
  270. package/utils/spread.js +2 -2
  271. package/utils/watch.cjs +1 -1
  272. package/utils/watch.d.cts +1 -0
  273. package/utils/watch.d.ts +1 -0
  274. package/utils/watch.js +1 -1
  275. package/services/firebase/firebase.service.cjs +0 -2
  276. package/services/firebase/firebase.service.d.cts +0 -40
  277. package/services/firebase/firebase.service.d.ts +0 -40
  278. package/services/firebase/firebase.service.js +0 -2
  279. package/services/livekit.service.cjs +0 -2
  280. package/services/livekit.service.d.cts +0 -219
  281. package/services/livekit.service.d.ts +0 -219
  282. package/services/livekit.service.js +0 -2
  283. package/types/window-context.cjs +0 -2
  284. package/types/window-context.d.cts +0 -8
  285. package/types/window-context.d.ts +0 -8
  286. package/types/window-context.js +0 -1
package/index.d.cts ADDED
@@ -0,0 +1,338 @@
1
+ /*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
2
+ import * as lit from 'lit';
3
+ import { LitElement, TemplateResult } from 'lit';
4
+ import * as _lit_react from '@lit/react';
5
+ import { EventName } from '@lit/react';
6
+
7
+ /*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
8
+
9
+
10
+ type AssetType = "product" | "multimedia" | "faq" | "file";
11
+ interface IAsset {
12
+ id: string;
13
+ name: string;
14
+ description?: string;
15
+ url?: string;
16
+ thumbnail?: string;
17
+ type: AssetType;
18
+ externalId?: string;
19
+ metadata?: Record<string, unknown>;
20
+ question?: string;
21
+ answer?: string;
22
+ }
23
+ interface AssetConfig {
24
+ multimediaService?: {
25
+ baseUrl: string;
26
+ organizationId: string;
27
+ };
28
+ faqsService?: {
29
+ baseUrl: string;
30
+ organizationId: string;
31
+ };
32
+ productService?: {
33
+ baseUrl: string;
34
+ organizationId: string;
35
+ };
36
+ fileService?: {
37
+ baseUrl: string;
38
+ organizationId: string;
39
+ enableUpload?: boolean;
40
+ };
41
+ assetDisplayOptions?: AssetDisplayOptions;
42
+ }
43
+ interface AssetDisplayOptions {
44
+ showThumbnail?: boolean;
45
+ showName?: boolean;
46
+ showDescription?: boolean;
47
+ showMetadata?: boolean;
48
+ showPrice?: boolean;
49
+ showDuration?: boolean;
50
+ showSize?: boolean;
51
+ showTags?: boolean;
52
+ layout?: "card" | "compact" | "minimal";
53
+ size?: "small" | "medium" | "large";
54
+ }
55
+
56
+ declare class OSBAsset extends LitElement {
57
+ static styles: lit.CSSResult[];
58
+ type: AssetType;
59
+ externalId: string;
60
+ config?: AssetConfig;
61
+ private asset?;
62
+ private loadingState;
63
+ private error?;
64
+ private assetLoader?;
65
+ private assetRenderer;
66
+ private isDownloading;
67
+ private modalPortal?;
68
+ private defaultDisplayOptions;
69
+ connectedCallback(): void;
70
+ disconnectedCallback(): void;
71
+ private initializeServices;
72
+ private loadAsset;
73
+ private onDownload;
74
+ private getDownloadFilename;
75
+ private getFileExtension;
76
+ private openModal;
77
+ private onMaximize;
78
+ private closeModal;
79
+ render(): TemplateResult;
80
+ }
81
+ declare global {
82
+ interface HTMLElementTagNameMap {
83
+ "osb-asset": OSBAsset;
84
+ }
85
+ }
86
+
87
+ declare class OCHPlayer extends LitElement {
88
+ static styles: lit.CSSResult[];
89
+ sources: {
90
+ src: string;
91
+ type: string;
92
+ }[];
93
+ private player;
94
+ $player: HTMLVideoElement;
95
+ connectedCallback(): void;
96
+ firstUpdated(): void;
97
+ play(): void;
98
+ pause(): void;
99
+ render(): lit.TemplateResult<1>;
100
+ }
101
+ declare global {
102
+ interface HTMLElementTagNameMap {
103
+ "och-player": OCHPlayer;
104
+ }
105
+ }
106
+
107
+ type UploadType = "image" | "video" | "document";
108
+ interface UploadConfig {
109
+ maxFileSize?: number;
110
+ allowedExtensions?: string[];
111
+ multiple?: boolean;
112
+ showImage?: boolean;
113
+ showVideo?: boolean;
114
+ showDocument?: boolean;
115
+ }
116
+ interface UploadEvents {
117
+ onFileSelected?: (file: File, type: UploadType) => void;
118
+ onUploadError?: (error: string) => void;
119
+ }
120
+
121
+ declare class OSBUpload extends LitElement {
122
+ static styles: lit.CSSResult[];
123
+ config?: UploadConfig;
124
+ events?: UploadEvents;
125
+ private defaultConfig;
126
+ private getAllowedExtensions;
127
+ private getAcceptAttribute;
128
+ private getFileTypeLabel;
129
+ private getAvailableTypes;
130
+ private onTypeSelect;
131
+ private openFileDialog;
132
+ private handleFileSelection;
133
+ private validateFile;
134
+ render(): TemplateResult;
135
+ private getIconName;
136
+ }
137
+ declare global {
138
+ interface HTMLElementTagNameMap {
139
+ "osb-upload": OSBUpload;
140
+ }
141
+ }
142
+
143
+ interface FaqsServiceConfig {
144
+ baseUrl: string;
145
+ organizationId: string;
146
+ }
147
+
148
+ interface FileServiceConfig {
149
+ baseUrl: string;
150
+ organizationId?: string;
151
+ enableUpload?: boolean;
152
+ }
153
+
154
+ interface MultimediaServiceConfig {
155
+ baseUrl: string;
156
+ organizationId: string;
157
+ }
158
+
159
+ interface ProductServiceConfig {
160
+ baseUrl: string;
161
+ organizationId: string;
162
+ }
163
+
164
+ type AssetCategory = "products" | "videos" | "images" | "presentations" | "audios" | "special-effects" | "faqs";
165
+ interface SidebarConfig {
166
+ multimediaService: MultimediaServiceConfig;
167
+ productService?: ProductServiceConfig;
168
+ faqsService?: FaqsServiceConfig;
169
+ fileService?: FileServiceConfig;
170
+ showSearch?: boolean;
171
+ showAddButton?: boolean;
172
+ itemsPerPage?: number;
173
+ enableInfiniteScroll?: boolean;
174
+ customCategories?: AssetCategory[];
175
+ enableUpload?: boolean;
176
+ enableExtraFilters?: boolean;
177
+ userGroupId?: string;
178
+ }
179
+ interface SearchConfig {
180
+ placeholder?: string;
181
+ debounceMs?: number;
182
+ minLength?: number;
183
+ }
184
+ interface AssetItemDisplayOptions {
185
+ showThumbnail?: boolean;
186
+ showDescription?: boolean;
187
+ showPrice?: boolean;
188
+ showDuration?: boolean;
189
+ showSize?: boolean;
190
+ showTags?: boolean;
191
+ thumbnailSize?: "small" | "medium" | "large";
192
+ layout?: "grid" | "list";
193
+ }
194
+
195
+ declare class OSBSideBar extends LitElement {
196
+ static styles: lit.CSSResult[];
197
+ config?: SidebarConfig;
198
+ searchConfig?: SearchConfig;
199
+ selectedCategory: AssetCategory;
200
+ disabled: boolean;
201
+ private multimediaService?;
202
+ private productService?;
203
+ private faqsService?;
204
+ private fileService?;
205
+ private isUploading;
206
+ private uploadProgress;
207
+ private categoryStates;
208
+ private searchTimeout?;
209
+ private unifiedSearchQuery;
210
+ private extraFilters;
211
+ private activeFilters;
212
+ private loadingFilters;
213
+ private defaultSearchConfig;
214
+ firstUpdated(): Promise<void>;
215
+ private initializeService;
216
+ private initializeCategoryStates;
217
+ private loadExtraFilters;
218
+ private hasActiveFilters;
219
+ /**
220
+ * Convert ActiveFilters to extraFields format for products
221
+ * Products use extraFields (JSONB) with string | number | boolean values
222
+ */
223
+ private convertToExtraFields;
224
+ private loadCategoryData;
225
+ private mapProductsToAssetItems;
226
+ private mapMultimediaToAssetItems;
227
+ private mapFaqsToAssetItems;
228
+ private updateCategoryState;
229
+ private onCategoryToggle;
230
+ private onUnifiedSearchInput;
231
+ private searchAllCategories;
232
+ private clearSearchAllCategories;
233
+ private onFilterChange;
234
+ private reloadAllOpenCategories;
235
+ private renderExtraFilters;
236
+ private renderFilter;
237
+ private renderSelectFilter;
238
+ private renderMultiselectFilter;
239
+ private renderTextFilter;
240
+ private onLoadMore;
241
+ private onItemSelect;
242
+ private onFileSelected;
243
+ private renderCategoryHeader;
244
+ private renderAssetItem;
245
+ private renderAssetThumbnail;
246
+ private renderAssetContent;
247
+ private renderAssetName;
248
+ private renderAssetPrice;
249
+ private renderAssetPresentation;
250
+ private renderAssetDescription;
251
+ private renderAssetMeta;
252
+ private renderAssetTags;
253
+ private renderCategoryContent;
254
+ private formatFileSize;
255
+ private getFormat;
256
+ private formatDuration;
257
+ render(): TemplateResult;
258
+ }
259
+ declare global {
260
+ interface HTMLElementTagNameMap {
261
+ "osb-side-bar": OSBSideBar;
262
+ }
263
+ }
264
+
265
+ /**
266
+ * React wrapper for the OSBAsset web component
267
+ *
268
+ * This component provides a React-friendly interface for the Onlive Asset component.
269
+ * It supports rendering different types of assets (image, video, presentation, product, faq)
270
+ * with download and modal functionality.
271
+ */
272
+ declare const Asset: _lit_react.ReactWebComponent<OSBAsset, {
273
+ onAssetClick: EventName<CustomEvent<{
274
+ asset: IAsset;
275
+ }>>;
276
+ onAssetDownload: EventName<CustomEvent<{
277
+ asset: IAsset;
278
+ }>>;
279
+ onAssetLoad: EventName<CustomEvent<{
280
+ asset: IAsset;
281
+ }>>;
282
+ onAssetError: EventName<CustomEvent<{
283
+ error: string;
284
+ asset: IAsset;
285
+ }>>;
286
+ onContentClick: EventName<CustomEvent<{
287
+ content: any;
288
+ }>>;
289
+ }>;
290
+
291
+ /**
292
+ * React wrapper for the OSBSideBar web component
293
+ *
294
+ * This component provides a React-friendly interface for the Onlive SideBar component.
295
+ * It supports rendering different types of content with customizable display options.
296
+ */
297
+ declare const SideBar: _lit_react.ReactWebComponent<OSBSideBar, {
298
+ onSearch: EventName<CustomEvent<{
299
+ query: string;
300
+ category: string;
301
+ }>>;
302
+ onLoadMore: EventName<CustomEvent<{
303
+ category: string;
304
+ }>>;
305
+ onItemAdd: EventName<CustomEvent<{
306
+ category: string;
307
+ }>>;
308
+ onCategoryChange: EventName<CustomEvent<{
309
+ category: string;
310
+ }>>;
311
+ onItemSelect: EventName<CustomEvent<{
312
+ item: any;
313
+ }>>;
314
+ onFileUpload: EventName<CustomEvent<{
315
+ id: string;
316
+ name: string;
317
+ url: string;
318
+ type: string;
319
+ }>>;
320
+ }>;
321
+
322
+ /**
323
+ * React wrapper for the OSBUpload web component
324
+ *
325
+ * This component provides a React-friendly interface for the Onlive Upload component.
326
+ * It supports file selection with customizable trigger button and dropdown menu for different file types.
327
+ */
328
+ declare const Upload: _lit_react.ReactWebComponent<OSBUpload, {
329
+ onFileSelected: EventName<CustomEvent<{
330
+ file: File;
331
+ type: UploadType;
332
+ }>>;
333
+ onUploadError: EventName<CustomEvent<{
334
+ error: string;
335
+ }>>;
336
+ }>;
337
+
338
+ export { Asset, type AssetDisplayOptions, type AssetItemDisplayOptions, OSBAsset, OSBSideBar, OSBUpload, SideBar, Upload, type UploadConfig };
package/index.d.ts ADDED
@@ -0,0 +1,338 @@
1
+ /*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
2
+ import * as lit from 'lit';
3
+ import { LitElement, TemplateResult } from 'lit';
4
+ import * as _lit_react from '@lit/react';
5
+ import { EventName } from '@lit/react';
6
+
7
+ /*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
8
+
9
+
10
+ type AssetType = "product" | "multimedia" | "faq" | "file";
11
+ interface IAsset {
12
+ id: string;
13
+ name: string;
14
+ description?: string;
15
+ url?: string;
16
+ thumbnail?: string;
17
+ type: AssetType;
18
+ externalId?: string;
19
+ metadata?: Record<string, unknown>;
20
+ question?: string;
21
+ answer?: string;
22
+ }
23
+ interface AssetConfig {
24
+ multimediaService?: {
25
+ baseUrl: string;
26
+ organizationId: string;
27
+ };
28
+ faqsService?: {
29
+ baseUrl: string;
30
+ organizationId: string;
31
+ };
32
+ productService?: {
33
+ baseUrl: string;
34
+ organizationId: string;
35
+ };
36
+ fileService?: {
37
+ baseUrl: string;
38
+ organizationId: string;
39
+ enableUpload?: boolean;
40
+ };
41
+ assetDisplayOptions?: AssetDisplayOptions;
42
+ }
43
+ interface AssetDisplayOptions {
44
+ showThumbnail?: boolean;
45
+ showName?: boolean;
46
+ showDescription?: boolean;
47
+ showMetadata?: boolean;
48
+ showPrice?: boolean;
49
+ showDuration?: boolean;
50
+ showSize?: boolean;
51
+ showTags?: boolean;
52
+ layout?: "card" | "compact" | "minimal";
53
+ size?: "small" | "medium" | "large";
54
+ }
55
+
56
+ declare class OSBAsset extends LitElement {
57
+ static styles: lit.CSSResult[];
58
+ type: AssetType;
59
+ externalId: string;
60
+ config?: AssetConfig;
61
+ private asset?;
62
+ private loadingState;
63
+ private error?;
64
+ private assetLoader?;
65
+ private assetRenderer;
66
+ private isDownloading;
67
+ private modalPortal?;
68
+ private defaultDisplayOptions;
69
+ connectedCallback(): void;
70
+ disconnectedCallback(): void;
71
+ private initializeServices;
72
+ private loadAsset;
73
+ private onDownload;
74
+ private getDownloadFilename;
75
+ private getFileExtension;
76
+ private openModal;
77
+ private onMaximize;
78
+ private closeModal;
79
+ render(): TemplateResult;
80
+ }
81
+ declare global {
82
+ interface HTMLElementTagNameMap {
83
+ "osb-asset": OSBAsset;
84
+ }
85
+ }
86
+
87
+ declare class OCHPlayer extends LitElement {
88
+ static styles: lit.CSSResult[];
89
+ sources: {
90
+ src: string;
91
+ type: string;
92
+ }[];
93
+ private player;
94
+ $player: HTMLVideoElement;
95
+ connectedCallback(): void;
96
+ firstUpdated(): void;
97
+ play(): void;
98
+ pause(): void;
99
+ render(): lit.TemplateResult<1>;
100
+ }
101
+ declare global {
102
+ interface HTMLElementTagNameMap {
103
+ "och-player": OCHPlayer;
104
+ }
105
+ }
106
+
107
+ type UploadType = "image" | "video" | "document";
108
+ interface UploadConfig {
109
+ maxFileSize?: number;
110
+ allowedExtensions?: string[];
111
+ multiple?: boolean;
112
+ showImage?: boolean;
113
+ showVideo?: boolean;
114
+ showDocument?: boolean;
115
+ }
116
+ interface UploadEvents {
117
+ onFileSelected?: (file: File, type: UploadType) => void;
118
+ onUploadError?: (error: string) => void;
119
+ }
120
+
121
+ declare class OSBUpload extends LitElement {
122
+ static styles: lit.CSSResult[];
123
+ config?: UploadConfig;
124
+ events?: UploadEvents;
125
+ private defaultConfig;
126
+ private getAllowedExtensions;
127
+ private getAcceptAttribute;
128
+ private getFileTypeLabel;
129
+ private getAvailableTypes;
130
+ private onTypeSelect;
131
+ private openFileDialog;
132
+ private handleFileSelection;
133
+ private validateFile;
134
+ render(): TemplateResult;
135
+ private getIconName;
136
+ }
137
+ declare global {
138
+ interface HTMLElementTagNameMap {
139
+ "osb-upload": OSBUpload;
140
+ }
141
+ }
142
+
143
+ interface FaqsServiceConfig {
144
+ baseUrl: string;
145
+ organizationId: string;
146
+ }
147
+
148
+ interface FileServiceConfig {
149
+ baseUrl: string;
150
+ organizationId?: string;
151
+ enableUpload?: boolean;
152
+ }
153
+
154
+ interface MultimediaServiceConfig {
155
+ baseUrl: string;
156
+ organizationId: string;
157
+ }
158
+
159
+ interface ProductServiceConfig {
160
+ baseUrl: string;
161
+ organizationId: string;
162
+ }
163
+
164
+ type AssetCategory = "products" | "videos" | "images" | "presentations" | "audios" | "special-effects" | "faqs";
165
+ interface SidebarConfig {
166
+ multimediaService: MultimediaServiceConfig;
167
+ productService?: ProductServiceConfig;
168
+ faqsService?: FaqsServiceConfig;
169
+ fileService?: FileServiceConfig;
170
+ showSearch?: boolean;
171
+ showAddButton?: boolean;
172
+ itemsPerPage?: number;
173
+ enableInfiniteScroll?: boolean;
174
+ customCategories?: AssetCategory[];
175
+ enableUpload?: boolean;
176
+ enableExtraFilters?: boolean;
177
+ userGroupId?: string;
178
+ }
179
+ interface SearchConfig {
180
+ placeholder?: string;
181
+ debounceMs?: number;
182
+ minLength?: number;
183
+ }
184
+ interface AssetItemDisplayOptions {
185
+ showThumbnail?: boolean;
186
+ showDescription?: boolean;
187
+ showPrice?: boolean;
188
+ showDuration?: boolean;
189
+ showSize?: boolean;
190
+ showTags?: boolean;
191
+ thumbnailSize?: "small" | "medium" | "large";
192
+ layout?: "grid" | "list";
193
+ }
194
+
195
+ declare class OSBSideBar extends LitElement {
196
+ static styles: lit.CSSResult[];
197
+ config?: SidebarConfig;
198
+ searchConfig?: SearchConfig;
199
+ selectedCategory: AssetCategory;
200
+ disabled: boolean;
201
+ private multimediaService?;
202
+ private productService?;
203
+ private faqsService?;
204
+ private fileService?;
205
+ private isUploading;
206
+ private uploadProgress;
207
+ private categoryStates;
208
+ private searchTimeout?;
209
+ private unifiedSearchQuery;
210
+ private extraFilters;
211
+ private activeFilters;
212
+ private loadingFilters;
213
+ private defaultSearchConfig;
214
+ firstUpdated(): Promise<void>;
215
+ private initializeService;
216
+ private initializeCategoryStates;
217
+ private loadExtraFilters;
218
+ private hasActiveFilters;
219
+ /**
220
+ * Convert ActiveFilters to extraFields format for products
221
+ * Products use extraFields (JSONB) with string | number | boolean values
222
+ */
223
+ private convertToExtraFields;
224
+ private loadCategoryData;
225
+ private mapProductsToAssetItems;
226
+ private mapMultimediaToAssetItems;
227
+ private mapFaqsToAssetItems;
228
+ private updateCategoryState;
229
+ private onCategoryToggle;
230
+ private onUnifiedSearchInput;
231
+ private searchAllCategories;
232
+ private clearSearchAllCategories;
233
+ private onFilterChange;
234
+ private reloadAllOpenCategories;
235
+ private renderExtraFilters;
236
+ private renderFilter;
237
+ private renderSelectFilter;
238
+ private renderMultiselectFilter;
239
+ private renderTextFilter;
240
+ private onLoadMore;
241
+ private onItemSelect;
242
+ private onFileSelected;
243
+ private renderCategoryHeader;
244
+ private renderAssetItem;
245
+ private renderAssetThumbnail;
246
+ private renderAssetContent;
247
+ private renderAssetName;
248
+ private renderAssetPrice;
249
+ private renderAssetPresentation;
250
+ private renderAssetDescription;
251
+ private renderAssetMeta;
252
+ private renderAssetTags;
253
+ private renderCategoryContent;
254
+ private formatFileSize;
255
+ private getFormat;
256
+ private formatDuration;
257
+ render(): TemplateResult;
258
+ }
259
+ declare global {
260
+ interface HTMLElementTagNameMap {
261
+ "osb-side-bar": OSBSideBar;
262
+ }
263
+ }
264
+
265
+ /**
266
+ * React wrapper for the OSBAsset web component
267
+ *
268
+ * This component provides a React-friendly interface for the Onlive Asset component.
269
+ * It supports rendering different types of assets (image, video, presentation, product, faq)
270
+ * with download and modal functionality.
271
+ */
272
+ declare const Asset: _lit_react.ReactWebComponent<OSBAsset, {
273
+ onAssetClick: EventName<CustomEvent<{
274
+ asset: IAsset;
275
+ }>>;
276
+ onAssetDownload: EventName<CustomEvent<{
277
+ asset: IAsset;
278
+ }>>;
279
+ onAssetLoad: EventName<CustomEvent<{
280
+ asset: IAsset;
281
+ }>>;
282
+ onAssetError: EventName<CustomEvent<{
283
+ error: string;
284
+ asset: IAsset;
285
+ }>>;
286
+ onContentClick: EventName<CustomEvent<{
287
+ content: any;
288
+ }>>;
289
+ }>;
290
+
291
+ /**
292
+ * React wrapper for the OSBSideBar web component
293
+ *
294
+ * This component provides a React-friendly interface for the Onlive SideBar component.
295
+ * It supports rendering different types of content with customizable display options.
296
+ */
297
+ declare const SideBar: _lit_react.ReactWebComponent<OSBSideBar, {
298
+ onSearch: EventName<CustomEvent<{
299
+ query: string;
300
+ category: string;
301
+ }>>;
302
+ onLoadMore: EventName<CustomEvent<{
303
+ category: string;
304
+ }>>;
305
+ onItemAdd: EventName<CustomEvent<{
306
+ category: string;
307
+ }>>;
308
+ onCategoryChange: EventName<CustomEvent<{
309
+ category: string;
310
+ }>>;
311
+ onItemSelect: EventName<CustomEvent<{
312
+ item: any;
313
+ }>>;
314
+ onFileUpload: EventName<CustomEvent<{
315
+ id: string;
316
+ name: string;
317
+ url: string;
318
+ type: string;
319
+ }>>;
320
+ }>;
321
+
322
+ /**
323
+ * React wrapper for the OSBUpload web component
324
+ *
325
+ * This component provides a React-friendly interface for the Onlive Upload component.
326
+ * It supports file selection with customizable trigger button and dropdown menu for different file types.
327
+ */
328
+ declare const Upload: _lit_react.ReactWebComponent<OSBUpload, {
329
+ onFileSelected: EventName<CustomEvent<{
330
+ file: File;
331
+ type: UploadType;
332
+ }>>;
333
+ onUploadError: EventName<CustomEvent<{
334
+ error: string;
335
+ }>>;
336
+ }>;
337
+
338
+ export { Asset, type AssetDisplayOptions, type AssetItemDisplayOptions, OSBAsset, OSBSideBar, OSBUpload, SideBar, Upload, type UploadConfig };