@streamscloud/embeddable 15.1.0-1770823267010 → 16.0.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.
Files changed (345) hide show
  1. package/dist/ads/ad-card/cmp.ad-card.svelte +13 -13
  2. package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +12 -12
  3. package/dist/core/graphql.d.ts +1 -1
  4. package/dist/core/graphql.js +4 -9
  5. package/dist/core/media/index.d.ts +0 -2
  6. package/dist/core/media/index.js +0 -2
  7. package/dist/external-api/data-providers/internal-short-video-player-items-provider.d.ts +1 -1
  8. package/dist/external-api/data-providers/internal-short-video-player-items-provider.js +2 -2
  9. package/dist/external-api/data-providers/internal-streams-player-data-provider.js +2 -2
  10. package/dist/external-api/media-page/index.d.ts +1 -1
  11. package/dist/external-api/short-videos-player/index.d.ts +1 -1
  12. package/dist/external-api/streams-player/index.d.ts +1 -1
  13. package/dist/media-center/media-center/cmp.media-center-proxy.svelte +4 -4
  14. package/dist/media-center/media-center/cmp.media-center-proxy.svelte.d.ts +14 -13
  15. package/dist/media-center/media-center/discover/community-features-localization.d.ts +4 -6
  16. package/dist/media-center/media-center/discover/community-features-localization.js +12 -10
  17. package/dist/media-center/media-center/discover/community-features.svelte +7 -7
  18. package/dist/media-center/media-center/discover/community-features.svelte.d.ts +8 -13
  19. package/dist/media-center/media-center/discover/discover-header.svelte +11 -11
  20. package/dist/media-center/media-center/discover/discover-header.svelte.d.ts +6 -13
  21. package/dist/media-center/media-center/discover/discover-view-handler.svelte.js +1 -1
  22. package/dist/media-center/media-center/discover/discover-view-localization.d.ts +2 -5
  23. package/dist/media-center/media-center/discover/discover-view-localization.js +6 -8
  24. package/dist/media-center/media-center/discover/discover-view.svelte +3 -4
  25. package/dist/media-center/media-center/discover/discover-view.svelte.d.ts +11 -12
  26. package/dist/media-center/media-center/footer/media-center-footer.svelte +6 -6
  27. package/dist/media-center/media-center/footer/media-center-footer.svelte.d.ts +6 -13
  28. package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +1 -1
  29. package/dist/media-center/media-center/header/media-center-header-localization.d.ts +2 -4
  30. package/dist/media-center/media-center/header/media-center-header-localization.js +12 -12
  31. package/dist/media-center/media-center/header/media-center-header-mobile.svelte +7 -7
  32. package/dist/media-center/media-center/header/media-center-header-mobile.svelte.d.ts +8 -12
  33. package/dist/media-center/media-center/header/media-center-header.svelte +10 -10
  34. package/dist/media-center/media-center/header/media-center-header.svelte.d.ts +10 -12
  35. package/dist/media-center/media-center/media-center-context.svelte.d.ts +1 -1
  36. package/dist/media-center/media-center/media-center-context.svelte.js +1 -1
  37. package/dist/media-center/media-center/media-center-settings.svelte.d.ts +1 -1
  38. package/dist/media-center/media-center/media-center-view.svelte +3 -3
  39. package/dist/media-center/media-center/media-center-view.svelte.d.ts +8 -13
  40. package/dist/media-center/media-center/menu/category-following-wrapper.svelte +4 -4
  41. package/dist/media-center/media-center/menu/category-following-wrapper.svelte.d.ts +10 -13
  42. package/dist/media-center/media-center/menu/menu-localization.d.ts +5 -8
  43. package/dist/media-center/media-center/menu/menu-localization.js +15 -14
  44. package/dist/media-center/media-center/menu/menu.svelte +12 -12
  45. package/dist/media-center/media-center/menu/menu.svelte.d.ts +11 -12
  46. package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +4 -4
  47. package/dist/media-center/media-center/moments/cmp.moments-circle.svelte.d.ts +6 -13
  48. package/dist/media-center/media-center/moments/moments-feed-handler.svelte.d.ts +1 -1
  49. package/dist/media-center/media-center/moments/moments-feed-handler.svelte.js +1 -1
  50. package/dist/media-center/media-center/moments/moments-state.svelte.d.ts +1 -1
  51. package/dist/media-center/media-center/posts-feed/feed-providers-generator.d.ts +1 -1
  52. package/dist/media-center/media-center/posts-feed/feed-providers-generator.js +2 -2
  53. package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.d.ts +1 -1
  54. package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.js +2 -2
  55. package/dist/media-center/media-center/streams-feed/feed-providers-generator.js +2 -2
  56. package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.js +1 -1
  57. package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte.d.ts +9 -12
  58. package/dist/media-center/media-center/types.d.ts +2 -2
  59. package/dist/media-page/cmp.media-page.svelte +1 -3
  60. package/dist/media-page/cmp.media-page.svelte.d.ts +10 -13
  61. package/dist/media-page/index.d.ts +2 -2
  62. package/dist/posts/attachments/cmp.attachments.svelte +1 -3
  63. package/dist/posts/attachments/cmp.attachments.svelte.d.ts +13 -12
  64. package/dist/posts/controls/post-actions-handler.svelte.d.ts +1 -1
  65. package/dist/posts/controls/post-actions-handler.svelte.js +1 -1
  66. package/dist/posts/post-viewer/attachments-horizontal.svelte +7 -7
  67. package/dist/posts/post-viewer/attachments-horizontal.svelte.d.ts +15 -12
  68. package/dist/posts/post-viewer/cmp.post-viewer.svelte +6 -6
  69. package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +21 -12
  70. package/dist/posts/post-viewer/heading.svelte +5 -6
  71. package/dist/posts/post-viewer/heading.svelte.d.ts +10 -13
  72. package/dist/posts/post-viewer/media/post-media.svelte +10 -10
  73. package/dist/posts/post-viewer/media/post-media.svelte.d.ts +10 -12
  74. package/dist/posts/post-viewer/post-texts.svelte +5 -5
  75. package/dist/posts/post-viewer/post-texts.svelte.d.ts +10 -13
  76. package/dist/posts/post-viewer/post-viewer-localization.d.ts +2 -5
  77. package/dist/posts/post-viewer/post-viewer-localization.js +6 -8
  78. package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +21 -12
  79. package/dist/posts/posts-player/index.d.ts +1 -1
  80. package/dist/posts/posts-player/posts-player-proxy.svelte +5 -1
  81. package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +23 -12
  82. package/dist/posts/posts-player/posts-player-view.svelte +33 -28
  83. package/dist/posts/posts-player/posts-player-view.svelte.d.ts +4 -14
  84. package/dist/posts/posts-player/types.d.ts +2 -2
  85. package/dist/products/price-helper.js +1 -1
  86. package/dist/products/product-card/cmp.product-card.svelte +12 -12
  87. package/dist/products/product-card/cmp.product-card.svelte.d.ts +13 -12
  88. package/dist/products/product-card/product-card-localization.d.ts +1 -3
  89. package/dist/products/product-card/product-card-localization.js +3 -4
  90. package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +15 -15
  91. package/dist/short-videos/short-video-card/cmp.short-video-card.svelte.d.ts +8 -12
  92. package/dist/short-videos/short-video-card/localization.d.ts +1 -3
  93. package/dist/short-videos/short-video-card/localization.js +3 -4
  94. package/dist/streams/layout/cmp.layout.svelte +2 -2
  95. package/dist/streams/layout/cmp.layout.svelte.d.ts +11 -12
  96. package/dist/streams/layout/cmp.slot-content.svelte +4 -4
  97. package/dist/streams/layout/cmp.slot-content.svelte.d.ts +12 -12
  98. package/dist/streams/layout/cmp.slot.svelte.d.ts +13 -13
  99. package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +2 -2
  100. package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte.d.ts +6 -13
  101. package/dist/streams/layout/element-views/cmp.button-stream-element.svelte.d.ts +9 -13
  102. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +2 -3
  103. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +10 -13
  104. package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +12 -13
  105. package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +2 -2
  106. package/dist/streams/layout/element-views/cmp.images-stream-element.svelte.d.ts +8 -13
  107. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +2 -2
  108. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +8 -13
  109. package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte +4 -9
  110. package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte.d.ts +10 -13
  111. package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +1 -4
  112. package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +10 -12
  113. package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +2 -2
  114. package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte.d.ts +8 -13
  115. package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +2 -2
  116. package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +7 -13
  117. package/dist/streams/layout/element-views/cmp.stream-element.svelte +7 -8
  118. package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +14 -12
  119. package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +5 -5
  120. package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +8 -13
  121. package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +5 -5
  122. package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +8 -13
  123. package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte.d.ts +6 -13
  124. package/dist/streams/layout/element-views/price-element-view.svelte +6 -6
  125. package/dist/streams/layout/element-views/price-element-view.svelte.d.ts +13 -12
  126. package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +2 -5
  127. package/dist/streams/layout/element-views/price-stream-element-localization.js +6 -8
  128. package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +1 -3
  129. package/dist/streams/layout/element-views/stock-stream-element-localization.js +3 -4
  130. package/dist/streams/layout/index.js +1 -1
  131. package/dist/streams/layout/serializer.svelte.js +5 -6
  132. package/dist/streams/layout/styles-transformer.js +1 -1
  133. package/dist/streams/stream-card/cmp.stream-card.svelte +3 -3
  134. package/dist/streams/stream-card/cmp.stream-card.svelte.d.ts +9 -12
  135. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +5 -7
  136. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +19 -12
  137. package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +24 -12
  138. package/dist/streams/streams-player/index.d.ts +1 -1
  139. package/dist/streams/streams-player/stream-overview.svelte +4 -4
  140. package/dist/streams/streams-player/stream-overview.svelte.d.ts +9 -12
  141. package/dist/streams/streams-player/stream-player-localization.d.ts +1 -4
  142. package/dist/streams/streams-player/stream-player-localization.js +3 -6
  143. package/dist/streams/streams-player/streams-player-buffer.svelte.d.ts +1 -1
  144. package/dist/streams/streams-player/streams-player-buffer.svelte.js +1 -1
  145. package/dist/streams/streams-player/streams-player-proxy.svelte +5 -1
  146. package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +26 -12
  147. package/dist/streams/streams-player/streams-player-view.svelte +70 -66
  148. package/dist/streams/streams-player/streams-player-view.svelte.d.ts +4 -14
  149. package/dist/streams/streams-player/types.d.ts +1 -1
  150. package/dist/ui/media-item-view/cmp.media-item-view.svelte +4 -4
  151. package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +11 -12
  152. package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +11 -12
  153. package/dist/ui/media-items-gallery/types.js +2 -1
  154. package/dist/ui/player/player/cmp.player.svelte +18 -16
  155. package/dist/ui/player/player/cmp.player.svelte.d.ts +31 -17
  156. package/dist/ui/player/player/controls-and-attachments.svelte +15 -20
  157. package/dist/ui/player/player/controls-and-attachments.svelte.d.ts +28 -17
  158. package/dist/ui/player/player/overview-panel.svelte +26 -24
  159. package/dist/ui/player/player/overview-panel.svelte.d.ts +12 -12
  160. package/dist/ui/player/player/player-config.svelte.d.ts +4 -4
  161. package/dist/ui/player/player/player-config.svelte.js +3 -3
  162. package/dist/ui/player/player/player-settings.svelte.d.ts +1 -1
  163. package/dist/ui/player/progress/cmp.chunks-progress.svelte.d.ts +8 -13
  164. package/dist/ui/shadow-dom/cmp.shadow-root.svelte +9 -3
  165. package/dist/ui/shadow-dom/cmp.shadow-root.svelte.d.ts +12 -13
  166. package/dist/ui/shadow-dom/colors.scss +2 -2
  167. package/package.json +12 -13
  168. package/dist/core/actions/horizontal-wheel-scroll.d.ts +0 -5
  169. package/dist/core/actions/horizontal-wheel-scroll.js +0 -20
  170. package/dist/core/actions/index.d.ts +0 -2
  171. package/dist/core/actions/index.js +0 -2
  172. package/dist/core/actions/swallow-touch.d.ts +0 -2
  173. package/dist/core/actions/swallow-touch.js +0 -17
  174. package/dist/core/browser.d.ts +0 -1
  175. package/dist/core/browser.js +0 -1
  176. package/dist/core/continuation-token.d.ts +0 -1
  177. package/dist/core/continuation-token.js +0 -1
  178. package/dist/core/cursor-result.d.ts +0 -1
  179. package/dist/core/cursor-result.js +0 -1
  180. package/dist/core/data-loaders/index.d.ts +0 -2
  181. package/dist/core/data-loaders/index.js +0 -1
  182. package/dist/core/deferred.d.ts +0 -1
  183. package/dist/core/deferred.js +0 -1
  184. package/dist/core/document.event-handlers.d.ts +0 -2
  185. package/dist/core/document.event-handlers.js +0 -8
  186. package/dist/core/image-preloader.d.ts +0 -1
  187. package/dist/core/image-preloader.js +0 -10
  188. package/dist/core/locale.d.ts +0 -4
  189. package/dist/core/locale.js +0 -1
  190. package/dist/core/media/images-size-detector.service.d.ts +0 -6
  191. package/dist/core/media/images-size-detector.service.js +0 -15
  192. package/dist/core/toastr.d.ts +0 -1
  193. package/dist/core/toastr.js +0 -1
  194. package/dist/core/transitions/index.d.ts +0 -1
  195. package/dist/core/transitions/index.js +0 -1
  196. package/dist/core/utils/compact-number.d.ts +0 -8
  197. package/dist/core/utils/compact-number.js +0 -48
  198. package/dist/core/utils/date-helper.d.ts +0 -1
  199. package/dist/core/utils/date-helper.js +0 -1
  200. package/dist/core/utils/html-helper.d.ts +0 -1
  201. package/dist/core/utils/html-helper.js +0 -1
  202. package/dist/core/utils/index.d.ts +0 -1
  203. package/dist/core/utils/index.js +0 -1
  204. package/dist/core/utils/string-generator.d.ts +0 -1
  205. package/dist/core/utils/string-generator.js +0 -1
  206. package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -5
  207. package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
  208. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -5
  209. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
  210. package/dist/ui/button/index.d.ts +0 -3
  211. package/dist/ui/button/index.js +0 -1
  212. package/dist/ui/card-actions/card-action-container.d.ts +0 -2
  213. package/dist/ui/card-actions/card-action-container.js +0 -17
  214. package/dist/ui/card-actions/cmp.card-action.svelte +0 -28
  215. package/dist/ui/card-actions/cmp.card-action.svelte.d.ts +0 -14
  216. package/dist/ui/card-actions/cmp.card-actions.svelte +0 -60
  217. package/dist/ui/card-actions/cmp.card-actions.svelte.d.ts +0 -14
  218. package/dist/ui/card-actions/index.d.ts +0 -4
  219. package/dist/ui/card-actions/index.js +0 -3
  220. package/dist/ui/card-actions/types.d.ts +0 -9
  221. package/dist/ui/card-actions/types.js +0 -1
  222. package/dist/ui/dropdown/cmp.dropdown.svelte +0 -173
  223. package/dist/ui/dropdown/cmp.dropdown.svelte.d.ts +0 -14
  224. package/dist/ui/dropdown/dropdown-ignore.d.ts +0 -6
  225. package/dist/ui/dropdown/dropdown-ignore.js +0 -11
  226. package/dist/ui/dropdown/index.d.ts +0 -3
  227. package/dist/ui/dropdown/index.js +0 -2
  228. package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +0 -5
  229. package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +0 -14
  230. package/dist/ui/dynamic-component/index.d.ts +0 -2
  231. package/dist/ui/dynamic-component/index.js +0 -2
  232. package/dist/ui/dynamic-component/types.svelte.d.ts +0 -11
  233. package/dist/ui/dynamic-component/types.svelte.js +0 -13
  234. package/dist/ui/icon/index.d.ts +0 -2
  235. package/dist/ui/icon/index.js +0 -1
  236. package/dist/ui/icon/types.d.ts +0 -1
  237. package/dist/ui/icon/types.js +0 -1
  238. package/dist/ui/image/index.d.ts +0 -1
  239. package/dist/ui/image/index.js +0 -1
  240. package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +0 -75
  241. package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +0 -14
  242. package/dist/ui/infinite-scrolling/index.d.ts +0 -1
  243. package/dist/ui/infinite-scrolling/index.js +0 -1
  244. package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte +0 -119
  245. package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte.d.ts +0 -14
  246. package/dist/ui/line-clamp/cmp.line-clamp.svelte +0 -84
  247. package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +0 -14
  248. package/dist/ui/line-clamp/index.d.ts +0 -2
  249. package/dist/ui/line-clamp/index.js +0 -2
  250. package/dist/ui/line-clamp/line-clamp-localization.d.ts +0 -6
  251. package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
  252. package/dist/ui/line-clamp/line-clamp-types.d.ts +0 -3
  253. package/dist/ui/line-clamp/line-clamp-types.js +0 -1
  254. package/dist/ui/line-clamp/line-clamp-utils.d.ts +0 -8
  255. package/dist/ui/line-clamp/line-clamp-utils.js +0 -33
  256. package/dist/ui/loading/cmp.loading.svelte +0 -80
  257. package/dist/ui/loading/cmp.loading.svelte.d.ts +0 -14
  258. package/dist/ui/loading/index.d.ts +0 -1
  259. package/dist/ui/loading/index.js +0 -1
  260. package/dist/ui/media-playback/index.d.ts +0 -2
  261. package/dist/ui/media-playback/index.js +0 -2
  262. package/dist/ui/media-playback/playback-manager.svelte.d.ts +0 -25
  263. package/dist/ui/media-playback/playback-manager.svelte.js +0 -62
  264. package/dist/ui/media-playback/volume-manager.svelte.d.ts +0 -10
  265. package/dist/ui/media-playback/volume-manager.svelte.js +0 -27
  266. package/dist/ui/player/button/cmp.mobile-player-buttons.svelte +0 -37
  267. package/dist/ui/player/button/cmp.mobile-player-buttons.svelte.d.ts +0 -14
  268. package/dist/ui/player/button/cmp.player-buttons.svelte +0 -127
  269. package/dist/ui/player/button/cmp.player-buttons.svelte.d.ts +0 -14
  270. package/dist/ui/player/button/cmp.responsive-player-buttons.svelte +0 -32
  271. package/dist/ui/player/button/cmp.responsive-player-buttons.svelte.d.ts +0 -14
  272. package/dist/ui/player/button/index.d.ts +0 -4
  273. package/dist/ui/player/button/index.js +0 -3
  274. package/dist/ui/player/button/types.d.ts +0 -7
  275. package/dist/ui/player/button/types.js +0 -1
  276. package/dist/ui/player/providers/chunks-player-buffer/index.d.ts +0 -2
  277. package/dist/ui/player/providers/chunks-player-buffer/index.js +0 -2
  278. package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.d.ts +0 -9
  279. package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.js +0 -9
  280. package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.d.ts +0 -30
  281. package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.js +0 -73
  282. package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.d.ts +0 -23
  283. package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.js +0 -220
  284. package/dist/ui/player/providers/default-chunks-player-buffer.svelte.d.ts +0 -23
  285. package/dist/ui/player/providers/default-chunks-player-buffer.svelte.js +0 -71
  286. package/dist/ui/player/providers/default-feed-player-buffer.svelte.d.ts +0 -29
  287. package/dist/ui/player/providers/default-feed-player-buffer.svelte.js +0 -121
  288. package/dist/ui/player/providers/index.d.ts +0 -3
  289. package/dist/ui/player/providers/index.js +0 -2
  290. package/dist/ui/player/providers/service.d.ts +0 -2
  291. package/dist/ui/player/providers/service.js +0 -13
  292. package/dist/ui/player/providers/types.d.ts +0 -54
  293. package/dist/ui/player/providers/types.js +0 -1
  294. package/dist/ui/player/slider/cmp.player-slider.svelte +0 -207
  295. package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +0 -24
  296. package/dist/ui/player/slider/index.d.ts +0 -2
  297. package/dist/ui/player/slider/index.js +0 -2
  298. package/dist/ui/player/slider/prevent-slider-scroll.d.ts +0 -5
  299. package/dist/ui/player/slider/prevent-slider-scroll.js +0 -11
  300. package/dist/ui/player/slider/types.d.ts +0 -16
  301. package/dist/ui/player/slider/types.js +0 -1
  302. package/dist/ui/player/slider/wheel-gestures-adapter.d.ts +0 -17
  303. package/dist/ui/player/slider/wheel-gestures-adapter.js +0 -79
  304. package/dist/ui/player/slider-horizontal/cmp.slider.svelte +0 -413
  305. package/dist/ui/player/slider-horizontal/cmp.slider.svelte.d.ts +0 -14
  306. package/dist/ui/player/slider-horizontal/index.d.ts +0 -2
  307. package/dist/ui/player/slider-horizontal/index.js +0 -2
  308. package/dist/ui/player/slider-horizontal/slider-localization.d.ts +0 -5
  309. package/dist/ui/player/slider-horizontal/slider-localization.js +0 -13
  310. package/dist/ui/player/slider-horizontal/types.d.ts +0 -11
  311. package/dist/ui/player/slider-horizontal/types.js +0 -8
  312. package/dist/ui/player/utils/index.d.ts +0 -1
  313. package/dist/ui/player/utils/index.js +0 -1
  314. package/dist/ui/player/utils/touch-synchronizer.d.ts +0 -7
  315. package/dist/ui/player/utils/touch-synchronizer.js +0 -21
  316. package/dist/ui/progress/cmp.progress.svelte +0 -29
  317. package/dist/ui/progress/cmp.progress.svelte.d.ts +0 -14
  318. package/dist/ui/progress/index.d.ts +0 -1
  319. package/dist/ui/progress/index.js +0 -1
  320. package/dist/ui/proportional-container/cmp.proportional-container.svelte +0 -25
  321. package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +0 -14
  322. package/dist/ui/proportional-container/index.d.ts +0 -1
  323. package/dist/ui/proportional-container/index.js +0 -1
  324. package/dist/ui/seek-bar/cmp.seek-bar.svelte +0 -156
  325. package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +0 -14
  326. package/dist/ui/seek-bar/index.d.ts +0 -1
  327. package/dist/ui/seek-bar/index.js +0 -1
  328. package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -113
  329. package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -14
  330. package/dist/ui/swipe-indicator/index.d.ts +0 -1
  331. package/dist/ui/swipe-indicator/index.js +0 -1
  332. package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -5
  333. package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
  334. package/dist/ui/time-ago/cmp.time-ago.svelte +0 -69
  335. package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +0 -14
  336. package/dist/ui/time-ago/index.d.ts +0 -1
  337. package/dist/ui/time-ago/index.js +0 -1
  338. package/dist/ui/time-ago/time-ago-localization.d.ts +0 -12
  339. package/dist/ui/time-ago/time-ago-localization.js +0 -55
  340. package/dist/ui/video/cmp.video.svelte +0 -376
  341. package/dist/ui/video/cmp.video.svelte.d.ts +0 -14
  342. package/dist/ui/video/index.d.ts +0 -2
  343. package/dist/ui/video/index.js +0 -2
  344. package/dist/ui/video/types.d.ts +0 -4
  345. package/dist/ui/video/types.js +0 -5
@@ -1,127 +0,0 @@
1
- <script lang="ts">import { Icon } from '../../icon';
2
- let { actions, scaleEffect = false, zoom = 1 } = $props();
3
- </script>
4
-
5
- {#if actions.length === 1}
6
- {@const action = actions[0]}
7
- <button
8
- type="button"
9
- class="player-button"
10
- style:zoom={zoom}
11
- class:player-button--scale-effect={scaleEffect}
12
- disabled={action.disabled}
13
- onclick={action.callback}>
14
- <span class="player-button__icon">
15
- <Icon src={action.icon} color={action.iconColor} />
16
- </span>
17
- </button>
18
- {:else if actions.length > 1}
19
- <div class="player-buttons" style:zoom={zoom}>
20
- {#each actions as action (action.icon)}
21
- <button
22
- type="button"
23
- class="player-buttons__action"
24
- class:player-buttons__action--scale-effect={scaleEffect}
25
- disabled={action.disabled}
26
- onclick={action.callback}>
27
- <span class="player-buttons__action-icon">
28
- <Icon src={action.icon} color={action.iconColor} />
29
- </span>
30
- </button>
31
- {/each}
32
- </div>
33
- {/if}
34
-
35
- <style>.player-button {
36
- --_player-button--color: var(--player-button--color, rgb(from light-dark(#272727, #000000) r g b / 95%));
37
- --_player-button--color--inactive: var(--player-button--color--inactive, rgb(from var(--_player-button--color) r g b / 60%));
38
- --_player-button--icon-scale: 1;
39
- pointer-events: auto;
40
- padding: 0.625rem;
41
- display: flex;
42
- justify-content: center;
43
- align-items: center;
44
- background-color: var(--_player-button--color--inactive);
45
- transition: background-color 0.5s;
46
- border-radius: 50%;
47
- color: var(--sc-mc-color--text-white);
48
- --icon--color: var(--sc-mc-color--icon-overlay);
49
- --icon--size: 1.75rem;
50
- }
51
- .player-button:hover:not(:disabled) {
52
- background-color: var(--_player-button--color);
53
- }
54
- .player-button:disabled {
55
- opacity: 0.5;
56
- cursor: default;
57
- }
58
- .player-button--scale-effect:hover:not(:disabled) {
59
- --_player-button--icon-scale: 1.2;
60
- }
61
- .player-button__icon {
62
- display: block;
63
- transform: scale(var(--_player-button--icon-scale));
64
- transition: 0.3s;
65
- }
66
- .player-button {
67
- /* Set 'container-type: inline-size;' to reference container*/
68
- }
69
- @container (width < 576px) {
70
- .player-button {
71
- padding: 0.5rem;
72
- --icon--size: 1.5rem;
73
- }
74
- }
75
-
76
- .player-buttons {
77
- --_player-button--color: var(--player-button--color, rgb(from light-dark(#272727, #000000) r g b / 95%));
78
- --_player-button--color--inactive: var(--player-button--color--inactive, rgb(from var(--_player-button--color) r g b / 60%));
79
- cursor: pointer;
80
- display: flex;
81
- flex-direction: column;
82
- justify-content: center;
83
- border-radius: 1.25rem;
84
- background: var(--_player-button--color--inactive);
85
- padding: 0.4375rem 0.0625rem;
86
- pointer-events: auto;
87
- }
88
- .player-buttons__action {
89
- --_player-button--icon-scale: 1;
90
- display: flex;
91
- justify-content: center;
92
- align-items: center;
93
- padding: 0.5625rem;
94
- border-radius: 1.25rem;
95
- color: var(--sc-mc-color--text-white);
96
- --icon--color: var(--sc-mc-color--icon-overlay);
97
- --icon--size: 1.75rem;
98
- transition: background-color 0.5s;
99
- }
100
- .player-buttons__action:hover:not(:disabled) {
101
- background-color: var(--_player-button--color);
102
- }
103
- .player-buttons__action:disabled {
104
- opacity: 0.5;
105
- cursor: default;
106
- }
107
- .player-buttons__action--scale-effect:hover:not(:disabled) {
108
- --_player-button--icon-scale: 1.2;
109
- background-color: transparent;
110
- }
111
- .player-buttons__action-icon {
112
- display: block;
113
- transform: scale(var(--_player-button--icon-scale));
114
- transition: 0.3s;
115
- }
116
- .player-buttons {
117
- /* Set 'container-type: inline-size;' to reference container*/
118
- }
119
- @container (width < 576px) {
120
- .player-buttons {
121
- border-radius: 0.9375rem;
122
- padding: 0.25rem 0.0625rem;
123
- }
124
- .player-buttons__action {
125
- --icon--size: 1.5rem;
126
- }
127
- }</style>
@@ -1,14 +0,0 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- declare const __propDef: {
3
- props: Record<string, never>;
4
- events: {
5
- [evt: string]: CustomEvent<any>;
6
- };
7
- slots: {};
8
- };
9
- export type CmpProps = typeof __propDef.props;
10
- export type CmpEvents = typeof __propDef.events;
11
- export type CmpSlots = typeof __propDef.slots;
12
- export default class Cmp extends SvelteComponentTyped<CmpProps, CmpEvents, CmpSlots> {
13
- }
14
- export {};
@@ -1,32 +0,0 @@
1
- <script lang="ts">import { default as MobilePlayerButtons } from './cmp.mobile-player-buttons.svelte';
2
- import { default as PlayerButtons } from './cmp.player-buttons.svelte';
3
- let { scaleEffect = false, actions } = $props();
4
- </script>
5
-
6
- <div class="desktop-controls">
7
- <PlayerButtons actions={actions} scaleEffect={scaleEffect} />
8
- </div>
9
-
10
- <div class="mobile-controls">
11
- <MobilePlayerButtons actions={actions} />
12
- </div>
13
-
14
- <style>.desktop-controls {
15
- display: contents;
16
- /* Set 'container-type: inline-size;' to reference container*/
17
- }
18
- @container (width < 576px) {
19
- .desktop-controls {
20
- display: none;
21
- }
22
- }
23
-
24
- .mobile-controls {
25
- display: none;
26
- /* Set 'container-type: inline-size;' to reference container*/
27
- }
28
- @container (width < 576px) {
29
- .mobile-controls {
30
- display: contents;
31
- }
32
- }</style>
@@ -1,14 +0,0 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- declare const __propDef: {
3
- props: Record<string, never>;
4
- events: {
5
- [evt: string]: CustomEvent<any>;
6
- };
7
- slots: {};
8
- };
9
- export type CmpProps = typeof __propDef.props;
10
- export type CmpEvents = typeof __propDef.events;
11
- export type CmpSlots = typeof __propDef.slots;
12
- export default class Cmp extends SvelteComponentTyped<CmpProps, CmpEvents, CmpSlots> {
13
- }
14
- export {};
@@ -1,4 +0,0 @@
1
- export { default as PlayerButtons } from './cmp.player-buttons.svelte';
2
- export { default as MobilePlayerButtons } from './cmp.mobile-player-buttons.svelte';
3
- export { default as ResponsivePlayerButtons } from './cmp.responsive-player-buttons.svelte';
4
- export type { PlayerButtonDef } from './types';
@@ -1,3 +0,0 @@
1
- export { default as PlayerButtons } from './cmp.player-buttons.svelte';
2
- export { default as MobilePlayerButtons } from './cmp.mobile-player-buttons.svelte';
3
- export { default as ResponsivePlayerButtons } from './cmp.responsive-player-buttons.svelte';
@@ -1,7 +0,0 @@
1
- import type { IconColor } from '../../icon';
2
- export type PlayerButtonDef = {
3
- icon: string;
4
- iconColor?: IconColor;
5
- callback: () => void;
6
- disabled?: boolean;
7
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export { PlayerChunk } from './player-chunk.svelte';
2
- export { PlayerChunksManager } from './player-chunks-manager.svelte';
@@ -1,2 +0,0 @@
1
- export { PlayerChunk } from './player-chunk.svelte';
2
- export { PlayerChunksManager } from './player-chunks-manager.svelte';
@@ -1,9 +0,0 @@
1
- import type { WithId } from '../types';
2
- export declare class PlayerChunkItem<T extends WithId> {
3
- model: T;
4
- chunkId: string;
5
- constructor(init: {
6
- model: T;
7
- chunkId: string;
8
- });
9
- }
@@ -1,9 +0,0 @@
1
- export class PlayerChunkItem {
2
- model;
3
- chunkId;
4
- constructor(init) {
5
- const { model, chunkId } = init;
6
- this.model = model;
7
- this.chunkId = chunkId;
8
- }
9
- }
@@ -1,30 +0,0 @@
1
- import { PlayerChunkItem } from './player-chunk-item.svelte';
2
- import type { WithId } from '../types';
3
- export declare class PlayerChunk<TItem extends WithId, TChunk extends WithId> {
4
- readonly model: TChunk;
5
- readonly items: TItem[];
6
- readonly chunkItems: PlayerChunkItem<TItem>[];
7
- readonly activeChunkItem: PlayerChunkItem<TItem>;
8
- private _chunkItems;
9
- private _activeItemIndex;
10
- private _fetchDeferred;
11
- private _itemsLoader;
12
- constructor(data: {
13
- chunk: TChunk;
14
- provider: {
15
- loadChunkItems: (chunkId: string, continuationToken: string | null | undefined) => Promise<{
16
- items: TItem[];
17
- continuationToken: string | null;
18
- }>;
19
- };
20
- callbacks?: {
21
- onChunkFullyLoaded: (chunk: PlayerChunk<TItem, TChunk>) => void;
22
- };
23
- });
24
- get isLoading(): boolean;
25
- get canLoadMore(): any;
26
- get activeItemIndex(): number;
27
- loadMore: () => any;
28
- setActiveItemIndex: (index: number) => Promise<void>;
29
- mutateChunkItems: (items: PlayerChunkItem<TItem>[]) => void;
30
- }
@@ -1,73 +0,0 @@
1
- import { ContinuationToken } from '../../../../core/continuation-token';
2
- import { CursorDataLoader } from '../../../../core/data-loaders';
3
- import { Deferred } from '../../../../core/deferred';
4
- import { PlayerChunkItem } from './player-chunk-item.svelte';
5
- export class PlayerChunk {
6
- model;
7
- items = $derived.by(() => this._chunkItems.map((i) => i.model));
8
- chunkItems = $derived.by(() => this._chunkItems);
9
- activeChunkItem = $derived.by(() => this._chunkItems[this._activeItemIndex] ?? null);
10
- _chunkItems = $state.raw([]);
11
- _activeItemIndex = $state(0);
12
- _fetchDeferred = $state.raw(null);
13
- _itemsLoader;
14
- constructor(data) {
15
- const { chunk, provider, callbacks } = data;
16
- this.model = chunk;
17
- this._itemsLoader = new CursorDataLoader({
18
- loadPage: async (continuationToken) => {
19
- if (this._fetchDeferred) {
20
- return await this._fetchDeferred.promise;
21
- }
22
- if (!this.canLoadMore) {
23
- return null;
24
- }
25
- try {
26
- this._fetchDeferred = new Deferred();
27
- const itemsResult = await provider.loadChunkItems(this.model.id, continuationToken.toNextChunkString());
28
- const newItems = itemsResult.items;
29
- this._chunkItems = [
30
- ...this._chunkItems,
31
- ...newItems.map((item) => new PlayerChunkItem({
32
- model: item,
33
- chunkId: this.model.id
34
- }))
35
- ];
36
- const continuationTokenResult = ContinuationToken.fromPayload(itemsResult.continuationToken);
37
- if (!continuationTokenResult.canLoadMore) {
38
- callbacks?.onChunkFullyLoaded(this);
39
- }
40
- const result = {
41
- items: newItems,
42
- continuationToken: continuationTokenResult
43
- };
44
- this._fetchDeferred.resolve(result);
45
- return result;
46
- }
47
- catch {
48
- this._fetchDeferred?.resolve(null);
49
- return null;
50
- }
51
- finally {
52
- this._fetchDeferred = null;
53
- }
54
- }
55
- });
56
- }
57
- get isLoading() {
58
- return !!this._fetchDeferred;
59
- }
60
- get canLoadMore() {
61
- return this._itemsLoader.continuationToken.canLoadMore;
62
- }
63
- get activeItemIndex() {
64
- return this._activeItemIndex;
65
- }
66
- loadMore = () => this._itemsLoader.loadMore();
67
- setActiveItemIndex = async (index) => {
68
- this._activeItemIndex = index;
69
- };
70
- mutateChunkItems = (items) => {
71
- this._chunkItems = items;
72
- };
73
- }
@@ -1,23 +0,0 @@
1
- import { PlayerChunk } from './player-chunk.svelte';
2
- import type { IChunksPlayerDataProvider, WithId } from '../types';
3
- export declare class PlayerChunksManager<TItem extends WithId, TChunk extends WithId> {
4
- private provider;
5
- private _activeChunkIndex;
6
- private _loadedChunks;
7
- private _warmUpDeferred;
8
- constructor(provider: IChunksPlayerDataProvider<TItem, TChunk>);
9
- get activeChunk(): PlayerChunk<TItem, TChunk>;
10
- get loadedChunks(): PlayerChunk<TItem, TChunk>[];
11
- get isLoading(): boolean;
12
- get flattenedChunkItems(): TItem[];
13
- get flattenedActiveChunkItemIndex(): number;
14
- tryActivateItemById: (id: string) => boolean;
15
- removeItemById: (id: string) => boolean;
16
- removeChunkById: (id: string) => boolean | undefined;
17
- initialize: () => Promise<void>;
18
- setActiveChunkIndex: (index: number, chunkItemIndex: number) => Promise<void>;
19
- activateItemAtFlattenedIndex: (index: number) => Promise<void>;
20
- warmUp: () => Promise<any>;
21
- reset: () => Promise<void>;
22
- private warmUpSequentially;
23
- }
@@ -1,220 +0,0 @@
1
- import { Deferred } from '../../../../core/deferred';
2
- import { PlayerChunk } from './player-chunk.svelte';
3
- const ITEMS_BUFFER_SIZE = 10;
4
- // Configuration: if true, always start from first item when switching chunks
5
- // if false, activate the exact item at its position in the new chunk
6
- const START_FROM_FIRST_ITEM_ON_CHUNK_SWITCH = true;
7
- export class PlayerChunksManager {
8
- provider;
9
- _activeChunkIndex = $state(-1);
10
- _loadedChunks = $state.raw([]);
11
- _warmUpDeferred = $state.raw(null);
12
- constructor(provider) {
13
- this.provider = provider;
14
- }
15
- get activeChunk() {
16
- return this._loadedChunks[this._activeChunkIndex] ?? null;
17
- }
18
- get loadedChunks() {
19
- return this._loadedChunks;
20
- }
21
- get isLoading() {
22
- return this._warmUpDeferred !== null || this._loadedChunks.some((c) => c.isLoading);
23
- }
24
- get flattenedChunkItems() {
25
- return this._loadedChunks.reduce((acc, chunk) => {
26
- acc.push(...chunk.items);
27
- return acc;
28
- }, []);
29
- }
30
- get flattenedActiveChunkItemIndex() {
31
- if (!this.activeChunk || !this.activeChunk.activeChunkItem) {
32
- return -1;
33
- }
34
- let itemsBeforeActiveChunk = 0;
35
- for (let i = 0; i < this._activeChunkIndex; i++) {
36
- itemsBeforeActiveChunk += this._loadedChunks[i].items.length;
37
- }
38
- return itemsBeforeActiveChunk + this.activeChunk.activeItemIndex;
39
- }
40
- tryActivateItemById = (id) => {
41
- const chunkWithItemIndex = this._loadedChunks.findIndex((chunk) => chunk.items.some((item) => item.id === id));
42
- const chunkWithItem = this._loadedChunks[chunkWithItemIndex];
43
- if (!chunkWithItem) {
44
- return false;
45
- }
46
- const itemIndex = chunkWithItem.items.findIndex((item) => item.id === id);
47
- this.setActiveChunkIndex(chunkWithItemIndex, itemIndex);
48
- return true;
49
- };
50
- removeItemById = (id) => {
51
- const itemIndex = this.flattenedChunkItems.findIndex((item) => item.id === id);
52
- if (itemIndex === -1) {
53
- return false;
54
- }
55
- const currentItem = this.flattenedChunkItems[this.flattenedActiveChunkItemIndex];
56
- // Find next item to activate BEFORE removing (if removing current item)
57
- let nextItemId = currentItem?.id;
58
- if (this.flattenedActiveChunkItemIndex === itemIndex) {
59
- // Try next item
60
- if (itemIndex + 1 < this.flattenedChunkItems.length) {
61
- nextItemId = this.flattenedChunkItems[itemIndex + 1].id;
62
- }
63
- // Try previous item
64
- else if (itemIndex > 0) {
65
- nextItemId = this.flattenedChunkItems[itemIndex - 1].id;
66
- }
67
- else {
68
- // No items left
69
- nextItemId = null;
70
- }
71
- }
72
- // Remove item from chunks
73
- this._loadedChunks.forEach((chunk) => {
74
- if (chunk.chunkItems.some((i) => i.model.id === id)) {
75
- chunk.mutateChunkItems(chunk.chunkItems.filter((i) => i.model.id !== id));
76
- }
77
- });
78
- if (nextItemId) {
79
- this.tryActivateItemById(nextItemId);
80
- }
81
- else {
82
- this._activeChunkIndex = -1;
83
- }
84
- return true;
85
- };
86
- removeChunkById = (id) => {
87
- const chunkIndex = this._loadedChunks.findIndex((chunk) => chunk.model.id === id);
88
- if (chunkIndex === -1) {
89
- return false;
90
- }
91
- const isActiveChunk = this._activeChunkIndex === chunkIndex;
92
- let newActiveChunkIndex = this._activeChunkIndex;
93
- this._loadedChunks.splice(chunkIndex, 1);
94
- if (this._loadedChunks.length === 0) {
95
- this._activeChunkIndex = -1;
96
- this.provider.onEndReached?.();
97
- return;
98
- }
99
- if (isActiveChunk) {
100
- if (chunkIndex < this._loadedChunks.length) {
101
- newActiveChunkIndex = chunkIndex;
102
- }
103
- else {
104
- newActiveChunkIndex = this._loadedChunks.length - 1;
105
- }
106
- }
107
- else if (this._activeChunkIndex > chunkIndex) {
108
- newActiveChunkIndex--;
109
- }
110
- this.setActiveChunkIndex(newActiveChunkIndex, 0);
111
- return true;
112
- };
113
- initialize = async () => {
114
- this._loadedChunks = this.provider.initialData.prefetchedChunks.map((chunk) => new PlayerChunk({ chunk, provider: { loadChunkItems: this.provider.loadChunkItems } }));
115
- await this.warmUp();
116
- if (this._loadedChunks.length === 0 || this.flattenedChunkItems.length === 0) {
117
- this.provider.onEndReached?.();
118
- return;
119
- }
120
- const firstFilledChunkIndex = this._loadedChunks.findIndex((c) => c.items.length > 0);
121
- const initialStartItemIndex = firstFilledChunkIndex === 0 && this.provider.initialData.startItemIndex && this.provider.initialData.startItemIndex > 0
122
- ? this.provider.initialData.startItemIndex
123
- : 0;
124
- this.setActiveChunkIndex(firstFilledChunkIndex, initialStartItemIndex);
125
- };
126
- setActiveChunkIndex = async (index, chunkItemIndex) => {
127
- this._activeChunkIndex = index;
128
- this.activeChunk.setActiveItemIndex(chunkItemIndex);
129
- // Don't wait for warm up to be finished, it runs in the background
130
- this.warmUp();
131
- };
132
- activateItemAtFlattenedIndex = async (index) => {
133
- const activeChunkId = this.activeChunk?.model.id;
134
- const flattenedItems = this.loadedChunks.flatMap((x) => x.chunkItems);
135
- const nextItem = flattenedItems[index];
136
- if (!nextItem) {
137
- return;
138
- }
139
- if (nextItem.chunkId !== activeChunkId) {
140
- const nextChunkIndex = this.loadedChunks.findIndex((c) => c.model.id === nextItem.chunkId);
141
- if (nextChunkIndex === -1) {
142
- return;
143
- }
144
- const itemIndexInChunk = START_FROM_FIRST_ITEM_ON_CHUNK_SWITCH ? 0 : this.loadedChunks[nextChunkIndex].chunkItems.indexOf(nextItem);
145
- this.setActiveChunkIndex(nextChunkIndex, itemIndexInChunk);
146
- }
147
- else {
148
- this.activeChunk.setActiveItemIndex(this.activeChunk.chunkItems.indexOf(nextItem));
149
- // Don't wait for warm up to be finished, it runs in the background
150
- this.warmUp();
151
- }
152
- };
153
- warmUp = async () => {
154
- if (this._warmUpDeferred) {
155
- return this._warmUpDeferred.promise;
156
- }
157
- this._warmUpDeferred = new Deferred();
158
- try {
159
- await this.warmUpSequentially();
160
- }
161
- finally {
162
- this._warmUpDeferred.resolve();
163
- this._warmUpDeferred = null;
164
- }
165
- };
166
- reset = async () => {
167
- this._activeChunkIndex = -1;
168
- this._loadedChunks = [];
169
- this._warmUpDeferred = null;
170
- await this.warmUp();
171
- };
172
- warmUpSequentially = async () => {
173
- const startChunkIndex = Math.max(0, this._activeChunkIndex);
174
- // Calculate how many items we need ahead of current position
175
- const getItemsAhead = () => {
176
- const currentFlatIndex = this.flattenedActiveChunkItemIndex;
177
- const totalItems = this.flattenedChunkItems.length;
178
- return totalItems - currentFlatIndex - 1; // -1 because current item doesn't count
179
- };
180
- while (getItemsAhead() < ITEMS_BUFFER_SIZE) {
181
- // Find first non-fully-loaded chunk starting from active
182
- let targetChunkIndex = -1;
183
- for (let i = startChunkIndex; i < this._loadedChunks.length; i++) {
184
- if (this._loadedChunks[i].canLoadMore) {
185
- targetChunkIndex = i;
186
- break;
187
- }
188
- }
189
- // If all chunks are fully loaded, load more chunks
190
- if (targetChunkIndex === -1) {
191
- const result = await this.provider.loadMoreChunks();
192
- if (result.length === 0) {
193
- // No more chunks available
194
- break;
195
- }
196
- this._loadedChunks = [
197
- ...this._loadedChunks,
198
- ...result.map((chunk) => new PlayerChunk({
199
- chunk,
200
- provider: { loadChunkItems: this.provider.loadChunkItems }
201
- }))
202
- ];
203
- continue; // Re-check for chunks to fill
204
- }
205
- // Load one page from target chunk
206
- const chunk = this._loadedChunks[targetChunkIndex];
207
- const itemsBefore = chunk.items.length;
208
- await chunk.loadMore();
209
- const itemsAfter = chunk.items.length;
210
- // If chunk became fully loaded but added no items, continue to next chunk
211
- if (itemsAfter === itemsBefore && !chunk.canLoadMore) {
212
- continue;
213
- }
214
- // If no progress made and chunk is not fully loaded, something went wrong
215
- if (itemsAfter === itemsBefore && chunk.canLoadMore) {
216
- break; // Avoid infinite loop
217
- }
218
- }
219
- };
220
- }
@@ -1,23 +0,0 @@
1
- import type { IChunksPlayerBuffer, IChunksPlayerDataProvider, WithId } from './types';
2
- export declare class DefaultChunksPlayerBuffer<TItem extends WithId, TChunk extends WithId> implements IChunksPlayerBuffer<TItem> {
3
- readonly kind = "chunks";
4
- readonly loaded: TItem[];
5
- readonly currentIndex: number;
6
- readonly current: TItem | null;
7
- readonly canLoadNext: boolean;
8
- readonly canLoadPrevious: boolean;
9
- readonly navigationDisabled: boolean;
10
- readonly animationDuration = 500;
11
- private _playerChunksManager;
12
- private _onEndReachedFn;
13
- constructor(provider: IChunksPlayerDataProvider<TItem, TChunk>);
14
- get activeChunk(): import("./chunks-player-buffer").PlayerChunk<TItem, TChunk>;
15
- setActiveChunkItemIndex: (index: number) => void;
16
- tryActivateItemById: (id: string) => boolean;
17
- removeChunkById: (id: string) => boolean | undefined;
18
- removeItemById: (id: string) => boolean;
19
- loadNext: () => Promise<void>;
20
- loadPrevious: () => Promise<void>;
21
- reset: () => void;
22
- ensureWarmedUp: () => Promise<void>;
23
- }