@streamscloud/embeddable 15.1.0 → 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 (368) hide show
  1. package/dist/ads/ad-card/cmp.ad-card.svelte +18 -29
  2. package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +0 -2
  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/discover/community-features-localization.d.ts +4 -6
  15. package/dist/media-center/media-center/discover/community-features-localization.js +12 -10
  16. package/dist/media-center/media-center/discover/community-features.svelte +10 -21
  17. package/dist/media-center/media-center/discover/community-features.svelte.d.ts +0 -2
  18. package/dist/media-center/media-center/discover/discover-header.svelte +14 -25
  19. package/dist/media-center/media-center/discover/discover-view-handler.svelte.d.ts +1 -1
  20. package/dist/media-center/media-center/discover/discover-view-handler.svelte.js +1 -1
  21. package/dist/media-center/media-center/discover/discover-view-localization.d.ts +2 -5
  22. package/dist/media-center/media-center/discover/discover-view-localization.js +6 -8
  23. package/dist/media-center/media-center/discover/discover-view.svelte +6 -19
  24. package/dist/media-center/media-center/footer/media-center-footer.svelte +7 -18
  25. package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +1 -1
  26. package/dist/media-center/media-center/header/media-center-header-localization.d.ts +2 -4
  27. package/dist/media-center/media-center/header/media-center-header-localization.js +12 -12
  28. package/dist/media-center/media-center/header/media-center-header-mobile.svelte +8 -19
  29. package/dist/media-center/media-center/header/media-center-header-mobile.svelte.d.ts +0 -2
  30. package/dist/media-center/media-center/header/media-center-header.svelte +12 -23
  31. package/dist/media-center/media-center/media-center-context.svelte.d.ts +1 -1
  32. package/dist/media-center/media-center/media-center-context.svelte.js +1 -1
  33. package/dist/media-center/media-center/media-center-settings.svelte.d.ts +1 -1
  34. package/dist/media-center/media-center/media-center-view.svelte +4 -15
  35. package/dist/media-center/media-center/menu/category-following-wrapper.svelte +5 -16
  36. package/dist/media-center/media-center/menu/menu-localization.d.ts +5 -8
  37. package/dist/media-center/media-center/menu/menu-localization.js +15 -14
  38. package/dist/media-center/media-center/menu/menu.svelte +15 -26
  39. package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +6 -17
  40. package/dist/media-center/media-center/moments/moments-feed-handler.svelte.d.ts +1 -1
  41. package/dist/media-center/media-center/moments/moments-feed-handler.svelte.js +1 -1
  42. package/dist/media-center/media-center/moments/moments-state.svelte.d.ts +1 -1
  43. package/dist/media-center/media-center/posts-feed/feed-providers-generator.d.ts +1 -1
  44. package/dist/media-center/media-center/posts-feed/feed-providers-generator.js +2 -2
  45. package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.d.ts +2 -2
  46. package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.js +2 -2
  47. package/dist/media-center/media-center/streams-feed/feed-providers-generator.js +2 -2
  48. package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.d.ts +1 -1
  49. package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.js +1 -1
  50. package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +1 -12
  51. package/dist/media-center/media-center/types.d.ts +2 -2
  52. package/dist/media-page/index.d.ts +2 -2
  53. package/dist/posts/attachments/cmp.attachments.svelte +2 -15
  54. package/dist/posts/attachments/cmp.attachments.svelte.d.ts +0 -2
  55. package/dist/posts/controls/post-actions-handler.svelte.d.ts +1 -1
  56. package/dist/posts/controls/post-actions-handler.svelte.js +2 -3
  57. package/dist/posts/post-viewer/attachments-horizontal.svelte +10 -21
  58. package/dist/posts/post-viewer/cmp.post-viewer.svelte +7 -18
  59. package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +1 -3
  60. package/dist/posts/post-viewer/heading.svelte +8 -20
  61. package/dist/posts/post-viewer/media/post-media.svelte +11 -22
  62. package/dist/posts/post-viewer/media/post-media.svelte.d.ts +0 -2
  63. package/dist/posts/post-viewer/post-texts.svelte +6 -17
  64. package/dist/posts/post-viewer/post-viewer-localization.d.ts +2 -5
  65. package/dist/posts/post-viewer/post-viewer-localization.js +6 -8
  66. package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +2 -2
  67. package/dist/posts/posts-player/index.d.ts +1 -1
  68. package/dist/posts/posts-player/posts-player-proxy.svelte +5 -1
  69. package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +2 -2
  70. package/dist/posts/posts-player/posts-player-view.svelte +34 -30
  71. package/dist/posts/posts-player/types.d.ts +2 -2
  72. package/dist/products/price-helper.js +1 -1
  73. package/dist/products/product-card/cmp.product-card.svelte +16 -30
  74. package/dist/products/product-card/cmp.product-card.svelte.d.ts +0 -2
  75. package/dist/products/product-card/product-card-localization.d.ts +1 -3
  76. package/dist/products/product-card/product-card-localization.js +3 -4
  77. package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +19 -35
  78. package/dist/short-videos/short-video-card/cmp.short-video-card.svelte.d.ts +0 -2
  79. package/dist/short-videos/short-video-card/localization.d.ts +1 -3
  80. package/dist/short-videos/short-video-card/localization.js +3 -4
  81. package/dist/streams/layout/cmp.layout.svelte +3 -14
  82. package/dist/streams/layout/cmp.slot-content.svelte +5 -16
  83. package/dist/streams/layout/cmp.slot-content.svelte.d.ts +0 -2
  84. package/dist/streams/layout/cmp.slot.svelte +1 -12
  85. package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +2 -2
  86. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +2 -3
  87. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +0 -2
  88. package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +1 -12
  89. package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +3 -14
  90. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +2 -2
  91. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +0 -2
  92. package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte +4 -9
  93. package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte.d.ts +0 -2
  94. package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +1 -4
  95. package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -2
  96. package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +3 -14
  97. package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +3 -14
  98. package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +0 -2
  99. package/dist/streams/layout/element-views/cmp.stream-element.svelte +7 -8
  100. package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +0 -2
  101. package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +5 -5
  102. package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +0 -2
  103. package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +5 -5
  104. package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -2
  105. package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +1 -12
  106. package/dist/streams/layout/element-views/price-element-view.svelte +7 -18
  107. package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +2 -5
  108. package/dist/streams/layout/element-views/price-stream-element-localization.js +6 -8
  109. package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +1 -3
  110. package/dist/streams/layout/element-views/stock-stream-element-localization.js +3 -4
  111. package/dist/streams/layout/index.d.ts +1 -1
  112. package/dist/streams/layout/index.js +1 -1
  113. package/dist/streams/layout/serializer.svelte.js +5 -6
  114. package/dist/streams/layout/styles-transformer.d.ts +3 -3
  115. package/dist/streams/layout/styles-transformer.js +1 -1
  116. package/dist/streams/stream-card/cmp.stream-card.svelte +6 -20
  117. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +6 -19
  118. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +1 -3
  119. package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +1 -1
  120. package/dist/streams/streams-player/index.d.ts +1 -1
  121. package/dist/streams/streams-player/stream-overview.svelte +5 -16
  122. package/dist/streams/streams-player/stream-player-localization.d.ts +1 -4
  123. package/dist/streams/streams-player/stream-player-localization.js +3 -6
  124. package/dist/streams/streams-player/streams-player-buffer.svelte.d.ts +1 -1
  125. package/dist/streams/streams-player/streams-player-buffer.svelte.js +1 -1
  126. package/dist/streams/streams-player/streams-player-proxy.svelte +5 -1
  127. package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +1 -1
  128. package/dist/streams/streams-player/streams-player-view.svelte +71 -79
  129. package/dist/streams/streams-player/types.d.ts +1 -1
  130. package/dist/ui/media-item-view/cmp.media-item-view.svelte +5 -16
  131. package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +2 -16
  132. package/dist/ui/media-items-gallery/types.js +2 -1
  133. package/dist/ui/player/player/cmp.player.svelte +19 -28
  134. package/dist/ui/player/player/cmp.player.svelte.d.ts +1 -1
  135. package/dist/ui/player/player/controls-and-attachments.svelte +16 -32
  136. package/dist/ui/player/player/controls-and-attachments.svelte.d.ts +1 -1
  137. package/dist/ui/player/player/overview-panel.svelte +27 -36
  138. package/dist/ui/player/player/player-config.svelte.d.ts +4 -4
  139. package/dist/ui/player/player/player-config.svelte.js +3 -3
  140. package/dist/ui/player/player/player-settings.svelte.d.ts +1 -1
  141. package/dist/ui/player/progress/cmp.chunks-progress.svelte +1 -12
  142. package/dist/ui/shadow-dom/cmp.shadow-root.svelte +9 -14
  143. package/dist/ui/shadow-dom/cmp.shadow-root.svelte.d.ts +2 -0
  144. package/dist/ui/shadow-dom/colors.scss +2 -2
  145. package/dist/ui/shadow-dom/shadow-root-service.js +2 -2
  146. package/package.json +13 -25
  147. package/dist/core/actions/horizontal-wheel-scroll.d.ts +0 -5
  148. package/dist/core/actions/horizontal-wheel-scroll.js +0 -20
  149. package/dist/core/actions/index.d.ts +0 -2
  150. package/dist/core/actions/index.js +0 -2
  151. package/dist/core/actions/swallow-touch.d.ts +0 -2
  152. package/dist/core/actions/swallow-touch.js +0 -17
  153. package/dist/core/browser.d.ts +0 -1
  154. package/dist/core/browser.js +0 -1
  155. package/dist/core/continuation-token.d.ts +0 -11
  156. package/dist/core/continuation-token.js +0 -35
  157. package/dist/core/cursor-result.d.ts +0 -9
  158. package/dist/core/cursor-result.js +0 -1
  159. package/dist/core/data-loaders/cursor-data-loader.svelte.d.ts +0 -14
  160. package/dist/core/data-loaders/cursor-data-loader.svelte.js +0 -35
  161. package/dist/core/data-loaders/data-loader.d.ts +0 -4
  162. package/dist/core/data-loaders/data-loader.js +0 -1
  163. package/dist/core/data-loaders/index.d.ts +0 -2
  164. package/dist/core/data-loaders/index.js +0 -1
  165. package/dist/core/deferred.d.ts +0 -6
  166. package/dist/core/deferred.js +0 -13
  167. package/dist/core/document.event-handlers.d.ts +0 -2
  168. package/dist/core/document.event-handlers.js +0 -8
  169. package/dist/core/image-preloader.d.ts +0 -1
  170. package/dist/core/image-preloader.js +0 -10
  171. package/dist/core/locale.d.ts +0 -4
  172. package/dist/core/locale.js +0 -1
  173. package/dist/core/media/image-helper.d.ts +0 -10
  174. package/dist/core/media/image-helper.js +0 -30
  175. package/dist/core/media/images-size-detector.service.d.ts +0 -6
  176. package/dist/core/media/images-size-detector.service.js +0 -15
  177. package/dist/core/toastr.d.ts +0 -1
  178. package/dist/core/toastr.js +0 -26
  179. package/dist/core/transitions/index.d.ts +0 -1
  180. package/dist/core/transitions/index.js +0 -1
  181. package/dist/core/transitions/slide-horizontally.d.ts +0 -7
  182. package/dist/core/transitions/slide-horizontally.js +0 -55
  183. package/dist/core/utils/array-helper.d.ts +0 -23
  184. package/dist/core/utils/array-helper.js +0 -148
  185. package/dist/core/utils/compact-number.d.ts +0 -8
  186. package/dist/core/utils/compact-number.js +0 -48
  187. package/dist/core/utils/date-helper.d.ts +0 -29
  188. package/dist/core/utils/date-helper.js +0 -146
  189. package/dist/core/utils/dom-helper.d.ts +0 -12
  190. package/dist/core/utils/dom-helper.js +0 -76
  191. package/dist/core/utils/html-helper.d.ts +0 -42
  192. package/dist/core/utils/html-helper.js +0 -104
  193. package/dist/core/utils/index.d.ts +0 -3
  194. package/dist/core/utils/index.js +0 -3
  195. package/dist/core/utils/number-helper.d.ts +0 -6
  196. package/dist/core/utils/number-helper.js +0 -28
  197. package/dist/core/utils/string-generator.d.ts +0 -2
  198. package/dist/core/utils/string-generator.js +0 -15
  199. package/dist/core/utils/string-helper.d.ts +0 -10
  200. package/dist/core/utils/string-helper.js +0 -53
  201. package/dist/core/utils/url-helper.d.ts +0 -3
  202. package/dist/core/utils/url-helper.js +0 -13
  203. package/dist/core/utils/utils.d.ts +0 -29
  204. package/dist/core/utils/utils.js +0 -104
  205. package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -5
  206. package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
  207. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -5
  208. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
  209. package/dist/ui/button/cmp.button.svelte +0 -10
  210. package/dist/ui/button/cmp.button.svelte.d.ts +0 -16
  211. package/dist/ui/button/cmp.options-button.svelte +0 -123
  212. package/dist/ui/button/cmp.options-button.svelte.d.ts +0 -20
  213. package/dist/ui/button/index.d.ts +0 -3
  214. package/dist/ui/button/index.js +0 -3
  215. package/dist/ui/button/resources/button-base.svelte +0 -84
  216. package/dist/ui/button/resources/button-base.svelte.d.ts +0 -13
  217. package/dist/ui/button/resources/button-theme.svelte +0 -53
  218. package/dist/ui/button/resources/button-theme.svelte.d.ts +0 -10
  219. package/dist/ui/button/resources/button-types.d.ts +0 -20
  220. package/dist/ui/button/resources/button-types.js +0 -22
  221. package/dist/ui/card-actions/card-action-container.d.ts +0 -2
  222. package/dist/ui/card-actions/card-action-container.js +0 -17
  223. package/dist/ui/card-actions/cmp.card-action.svelte +0 -28
  224. package/dist/ui/card-actions/cmp.card-action.svelte.d.ts +0 -10
  225. package/dist/ui/card-actions/cmp.card-actions.svelte +0 -71
  226. package/dist/ui/card-actions/cmp.card-actions.svelte.d.ts +0 -9
  227. package/dist/ui/card-actions/index.d.ts +0 -4
  228. package/dist/ui/card-actions/index.js +0 -3
  229. package/dist/ui/card-actions/types.d.ts +0 -9
  230. package/dist/ui/card-actions/types.js +0 -1
  231. package/dist/ui/dropdown/cmp.dropdown.svelte +0 -184
  232. package/dist/ui/dropdown/cmp.dropdown.svelte.d.ts +0 -23
  233. package/dist/ui/dropdown/dropdown-ignore.d.ts +0 -6
  234. package/dist/ui/dropdown/dropdown-ignore.js +0 -11
  235. package/dist/ui/dropdown/index.d.ts +0 -3
  236. package/dist/ui/dropdown/index.js +0 -2
  237. package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +0 -5
  238. package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +0 -7
  239. package/dist/ui/dynamic-component/index.d.ts +0 -2
  240. package/dist/ui/dynamic-component/index.js +0 -2
  241. package/dist/ui/dynamic-component/types.svelte.d.ts +0 -11
  242. package/dist/ui/dynamic-component/types.svelte.js +0 -13
  243. package/dist/ui/icon/cmp.icon.svelte +0 -75
  244. package/dist/ui/icon/cmp.icon.svelte.d.ts +0 -8
  245. package/dist/ui/icon/index.d.ts +0 -2
  246. package/dist/ui/icon/index.js +0 -2
  247. package/dist/ui/icon/types.d.ts +0 -9
  248. package/dist/ui/icon/types.js +0 -10
  249. package/dist/ui/image/cmp.image-round.svelte +0 -41
  250. package/dist/ui/image/cmp.image-round.svelte.d.ts +0 -11
  251. package/dist/ui/image/cmp.image-rounded.svelte +0 -64
  252. package/dist/ui/image/cmp.image-rounded.svelte.d.ts +0 -11
  253. package/dist/ui/image/cmp.image-stub.svelte +0 -31
  254. package/dist/ui/image/cmp.image-stub.svelte.d.ts +0 -18
  255. package/dist/ui/image/cmp.image.svelte +0 -79
  256. package/dist/ui/image/cmp.image.svelte.d.ts +0 -13
  257. package/dist/ui/image/image-state.d.ts +0 -6
  258. package/dist/ui/image/image-state.js +0 -17
  259. package/dist/ui/image/index.d.ts +0 -4
  260. package/dist/ui/image/index.js +0 -4
  261. package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +0 -75
  262. package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +0 -11
  263. package/dist/ui/infinite-scrolling/index.d.ts +0 -1
  264. package/dist/ui/infinite-scrolling/index.js +0 -1
  265. package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte +0 -119
  266. package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte.d.ts +0 -10
  267. package/dist/ui/line-clamp/cmp.line-clamp.svelte +0 -84
  268. package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +0 -11
  269. package/dist/ui/line-clamp/index.d.ts +0 -2
  270. package/dist/ui/line-clamp/index.js +0 -2
  271. package/dist/ui/line-clamp/line-clamp-localization.d.ts +0 -6
  272. package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
  273. package/dist/ui/line-clamp/line-clamp-types.d.ts +0 -3
  274. package/dist/ui/line-clamp/line-clamp-types.js +0 -1
  275. package/dist/ui/line-clamp/line-clamp-utils.d.ts +0 -8
  276. package/dist/ui/line-clamp/line-clamp-utils.js +0 -33
  277. package/dist/ui/loading/cmp.loading.svelte +0 -94
  278. package/dist/ui/loading/cmp.loading.svelte.d.ts +0 -9
  279. package/dist/ui/loading/index.d.ts +0 -1
  280. package/dist/ui/loading/index.js +0 -1
  281. package/dist/ui/media-playback/index.d.ts +0 -2
  282. package/dist/ui/media-playback/index.js +0 -2
  283. package/dist/ui/media-playback/playback-manager.svelte.d.ts +0 -25
  284. package/dist/ui/media-playback/playback-manager.svelte.js +0 -62
  285. package/dist/ui/media-playback/volume-manager.svelte.d.ts +0 -10
  286. package/dist/ui/media-playback/volume-manager.svelte.js +0 -27
  287. package/dist/ui/player/button/cmp.mobile-player-buttons.svelte +0 -37
  288. package/dist/ui/player/button/cmp.mobile-player-buttons.svelte.d.ts +0 -7
  289. package/dist/ui/player/button/cmp.player-buttons.svelte +0 -127
  290. package/dist/ui/player/button/cmp.player-buttons.svelte.d.ts +0 -9
  291. package/dist/ui/player/button/cmp.responsive-player-buttons.svelte +0 -32
  292. package/dist/ui/player/button/cmp.responsive-player-buttons.svelte.d.ts +0 -8
  293. package/dist/ui/player/button/index.d.ts +0 -4
  294. package/dist/ui/player/button/index.js +0 -3
  295. package/dist/ui/player/button/types.d.ts +0 -7
  296. package/dist/ui/player/button/types.js +0 -1
  297. package/dist/ui/player/providers/chunks-player-buffer/index.d.ts +0 -2
  298. package/dist/ui/player/providers/chunks-player-buffer/index.js +0 -2
  299. package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.d.ts +0 -9
  300. package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.js +0 -9
  301. package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.d.ts +0 -30
  302. package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.js +0 -73
  303. package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.d.ts +0 -23
  304. package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.js +0 -220
  305. package/dist/ui/player/providers/default-chunks-player-buffer.svelte.d.ts +0 -23
  306. package/dist/ui/player/providers/default-chunks-player-buffer.svelte.js +0 -71
  307. package/dist/ui/player/providers/default-feed-player-buffer.svelte.d.ts +0 -29
  308. package/dist/ui/player/providers/default-feed-player-buffer.svelte.js +0 -121
  309. package/dist/ui/player/providers/index.d.ts +0 -3
  310. package/dist/ui/player/providers/index.js +0 -2
  311. package/dist/ui/player/providers/service.d.ts +0 -2
  312. package/dist/ui/player/providers/service.js +0 -13
  313. package/dist/ui/player/providers/types.d.ts +0 -54
  314. package/dist/ui/player/providers/types.js +0 -1
  315. package/dist/ui/player/slider/cmp.player-slider.svelte +0 -218
  316. package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +0 -34
  317. package/dist/ui/player/slider/index.d.ts +0 -2
  318. package/dist/ui/player/slider/index.js +0 -2
  319. package/dist/ui/player/slider/prevent-slider-scroll.d.ts +0 -5
  320. package/dist/ui/player/slider/prevent-slider-scroll.js +0 -11
  321. package/dist/ui/player/slider/types.d.ts +0 -16
  322. package/dist/ui/player/slider/types.js +0 -1
  323. package/dist/ui/player/slider/wheel-gestures-adapter.d.ts +0 -17
  324. package/dist/ui/player/slider/wheel-gestures-adapter.js +0 -79
  325. package/dist/ui/player/slider-horizontal/cmp.slider.svelte +0 -424
  326. package/dist/ui/player/slider-horizontal/cmp.slider.svelte.d.ts +0 -31
  327. package/dist/ui/player/slider-horizontal/index.d.ts +0 -2
  328. package/dist/ui/player/slider-horizontal/index.js +0 -2
  329. package/dist/ui/player/slider-horizontal/slider-localization.d.ts +0 -5
  330. package/dist/ui/player/slider-horizontal/slider-localization.js +0 -13
  331. package/dist/ui/player/slider-horizontal/types.d.ts +0 -11
  332. package/dist/ui/player/slider-horizontal/types.js +0 -8
  333. package/dist/ui/player/utils/index.d.ts +0 -1
  334. package/dist/ui/player/utils/index.js +0 -1
  335. package/dist/ui/player/utils/touch-synchronizer.d.ts +0 -7
  336. package/dist/ui/player/utils/touch-synchronizer.js +0 -21
  337. package/dist/ui/progress/cmp.progress.svelte +0 -40
  338. package/dist/ui/progress/cmp.progress.svelte.d.ts +0 -6
  339. package/dist/ui/progress/index.d.ts +0 -1
  340. package/dist/ui/progress/index.js +0 -1
  341. package/dist/ui/proportional-container/cmp.proportional-container.svelte +0 -39
  342. package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +0 -8
  343. package/dist/ui/proportional-container/index.d.ts +0 -1
  344. package/dist/ui/proportional-container/index.js +0 -1
  345. package/dist/ui/seek-bar/cmp.seek-bar.svelte +0 -167
  346. package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +0 -15
  347. package/dist/ui/seek-bar/index.d.ts +0 -1
  348. package/dist/ui/seek-bar/index.js +0 -1
  349. package/dist/ui/shadow-dom/normalize-shadow.css +0 -350
  350. package/dist/ui/shadow-dom/reset-shadow.css +0 -176
  351. package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -124
  352. package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -8
  353. package/dist/ui/swipe-indicator/index.d.ts +0 -1
  354. package/dist/ui/swipe-indicator/index.js +0 -1
  355. package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -5
  356. package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
  357. package/dist/ui/time-ago/cmp.time-ago.svelte +0 -69
  358. package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +0 -9
  359. package/dist/ui/time-ago/index.d.ts +0 -1
  360. package/dist/ui/time-ago/index.js +0 -1
  361. package/dist/ui/time-ago/time-ago-localization.d.ts +0 -12
  362. package/dist/ui/time-ago/time-ago-localization.js +0 -55
  363. package/dist/ui/video/cmp.video.svelte +0 -387
  364. package/dist/ui/video/cmp.video.svelte.d.ts +0 -27
  365. package/dist/ui/video/index.d.ts +0 -2
  366. package/dist/ui/video/index.js +0 -2
  367. package/dist/ui/video/types.d.ts +0 -4
  368. package/dist/ui/video/types.js +0 -5
@@ -16,18 +16,7 @@ export {};
16
16
  {/if}
17
17
  </div>
18
18
 
19
- <style>@keyframes fadeIn {
20
- 0% {
21
- opacity: 1;
22
- }
23
- 50% {
24
- opacity: 0.4;
25
- }
26
- 100% {
27
- opacity: 1;
28
- }
29
- }
30
- .chunks-progress {
19
+ <style>.chunks-progress {
31
20
  display: flex;
32
21
  flex-direction: column;
33
22
  gap: 0.5rem;
@@ -1,5 +1,11 @@
1
1
  <script lang="ts">import { brandColors } from '../../core/theme';
2
- let { theme = 'dark', backgroundDisabled, backgroundImageUrl, children } = $props();
2
+ import { setLocale } from '@streamscloud/kit/locale';
3
+ let { locale, theme = 'dark', backgroundDisabled, backgroundImageUrl, children } = $props();
4
+ $effect(() => {
5
+ if (locale) {
6
+ setLocale(locale);
7
+ }
8
+ });
3
9
  const appendBrandPair = (values, name, pair) => {
4
10
  if (pair.light) {
5
11
  values.push(`--sc-player--light--${name}: ${pair.light}`);
@@ -42,17 +48,6 @@ const styles = $derived.by(() => {
42
48
  </div>
43
49
 
44
50
  <style>@charset "UTF-8";
45
- @keyframes fadeIn {
46
- 0% {
47
- opacity: 1;
48
- }
49
- 50% {
50
- opacity: 0.4;
51
- }
52
- 100% {
53
- opacity: 1;
54
- }
55
- }
56
51
  .shadow-root {
57
52
  /* Backgrounds */
58
53
  --sc-mc-color--bg-button: light-dark(#ffffff, #111827);
@@ -88,8 +83,8 @@ const styles = $derived.by(() => {
88
83
  --sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
89
84
  /* Player brand colors — overridable via --sc-player--{light|dark}--{name} custom properties */
90
85
  --sc-player--background: light-dark(
91
- var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%)),
92
- var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%))
86
+ var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%)),
87
+ var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%))
93
88
  );
94
89
  --sc-player--brand: light-dark(
95
90
  var(--sc-player--light--brand, var(--sc-mc-color--border-brand)),
@@ -1,6 +1,8 @@
1
1
  import { type ThemeValue } from '../../core/theme';
2
+ import { type Locale } from '@streamscloud/kit/locale';
2
3
  import type { Snippet } from 'svelte';
3
4
  type Props = {
5
+ locale?: Locale;
4
6
  theme?: ThemeValue;
5
7
  backgroundDisabled: boolean;
6
8
  backgroundImageUrl: string | null | 'not-applicable';
@@ -40,8 +40,8 @@
40
40
 
41
41
  /* Player brand colors — overridable via --sc-player--{light|dark}--{name} custom properties */
42
42
  --sc-player--background: light-dark(
43
- var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%)),
44
- var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%))
43
+ var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%)),
44
+ var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%))
45
45
  );
46
46
  --sc-player--brand: light-dark(
47
47
  var(--sc-player--light--brand, var(--sc-mc-color--border-brand)),
@@ -1,5 +1,5 @@
1
- import normalize from './normalize-shadow.css?raw';
2
- import reset from './reset-shadow.css?raw';
1
+ import normalize from '@streamscloud/kit/styles/normalize.css?raw';
2
+ import reset from '@streamscloud/kit/styles/reset.css?raw';
3
3
  export const createShadowRoot = (host) => {
4
4
  prepareShadowRootHost(host);
5
5
  const shadowRoot = host.attachShadow({ mode: 'open' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "15.1.0",
3
+ "version": "16.0.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "dev": "vite dev --port 3010 --host",
12
12
  "build": "svelte-package --tsconfig ./tsconfig.app.json && prettier --write --plugin prettier-plugin-svelte . && eslint --fix .",
13
13
  "publish:prod": "npm run build && npm publish --access public --tag latest",
14
- "version:dev": "node -e \"const fs=require('fs');const pkg=require('./package.json');const base=(pkg.version.includes('-')?pkg.version.split('-')[0]:pkg.version);pkg.version=base+'-'+Date.now();fs.writeFileSync('package.json',JSON.stringify(pkg,null,2)+'\\n');\"",
14
+ "version:dev": "node -e \"const p=require('./package.json');p.version=p.version.split('-')[0]+'-'+Date.now();require('fs').writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\"",
15
15
  "publish:dev": "npm run build && npm run version:dev && npm publish --tag next && git checkout -- package.json",
16
16
  "pack": "npm run build && npm pack",
17
17
  "preview": "vite preview",
@@ -133,20 +133,14 @@
133
133
  }
134
134
  },
135
135
  "peerDependencies": {
136
- "@fluentui/svg-icons": "^1.1.318",
137
- "@popperjs/core": "^2.11.8",
136
+ "@streamscloud/kit": "^0.1.1",
138
137
  "@streamscloud/streams-analytics-collector": "^4.0.1",
139
- "@urql/core": "^5.1.1 || ^6.0.0",
140
- "dequal": "^2.0.3",
141
- "dompurify": "^3.3.0",
142
- "mobile-detect": "^1.4.5",
143
- "svelte": "^5.50.0",
144
- "wheel-gestures": "^2.2.48"
138
+ "svelte": "^5.51.0"
145
139
  },
146
140
  "devDependencies": {
147
141
  "@eslint/compat": "^2.0.2",
148
142
  "@eslint/js": "^9.39.2",
149
- "@fluentui/svg-icons": "^1.1.318",
143
+ "@fluentui/svg-icons": "^1.1.319",
150
144
  "@graphql-codegen/add": "^6.0.0",
151
145
  "@graphql-codegen/cli": "^6.1.1",
152
146
  "@graphql-codegen/introspection": "^5.0.0",
@@ -155,39 +149,33 @@
155
149
  "@graphql-codegen/typescript": "^5.0.7",
156
150
  "@graphql-codegen/typescript-operations": "^5.0.7",
157
151
  "@graphql-typed-document-node/core": "^3.2.0",
158
- "@popperjs/core": "^2.11.8",
152
+ "@streamscloud/kit": "^0.1.1",
159
153
  "@streamscloud/streams-analytics-collector": "^4.0.1",
160
154
  "@sveltejs/package": "^2.5.7",
161
155
  "@sveltejs/vite-plugin-svelte": "^6.2.4",
162
156
  "@tsconfig/svelte": "^5.0.7",
163
- "@types/dompurify": "^3.0.5",
164
- "@urql/core": "^6.0.1",
165
157
  "autoprefixer": "^10.4.24",
166
- "dequal": "^2.0.3",
167
- "dompurify": "^3.3.1",
168
158
  "eslint": "^9.39.2",
169
159
  "eslint-config-prettier": "^10.1.8",
170
160
  "eslint-formatter-codeframe": "^7.32.2",
171
161
  "eslint-formatter-visualstudio": "^9.0.1",
172
162
  "eslint-plugin-import": "^2.32.0",
173
- "eslint-plugin-jsonc": "^2.21.0",
163
+ "eslint-plugin-jsonc": "^2.21.1",
174
164
  "eslint-plugin-only-warn": "^1.1.0",
175
165
  "eslint-plugin-promise": "^7.2.1",
176
- "eslint-plugin-svelte": "^3.14.0",
177
- "eslint-plugin-unused-imports": "^4.3.0",
166
+ "eslint-plugin-svelte": "^3.15.0",
167
+ "eslint-plugin-unused-imports": "^4.4.1",
178
168
  "globals": "^17.3.0",
179
- "mobile-detect": "^1.4.5",
180
169
  "prettier": "^3.8.1",
181
170
  "prettier-plugin-svelte": "^3.4.1",
182
171
  "publint": "^0.3.17",
183
172
  "sass": "^1.97.3",
184
- "svelte": "^5.50.0",
185
- "svelte-check": "^4.3.6",
173
+ "svelte": "^5.51.0",
174
+ "svelte-check": "^4.4.0",
186
175
  "svelte-preprocess": "^6.0.3",
187
176
  "typescript": "^5.9.3",
188
- "typescript-eslint": "^8.54.0",
177
+ "typescript-eslint": "^8.55.0",
189
178
  "vite": "^7.3.1",
190
- "vite-tsconfig-paths": "^6.1.0",
191
- "wheel-gestures": "^2.2.48"
179
+ "vite-tsconfig-paths": "^6.1.1"
192
180
  }
193
181
  }
@@ -1,5 +0,0 @@
1
- import type { Action } from 'svelte/action';
2
- export declare const horizontalWheelScroll: Action<HTMLElement, {
3
- isolateScroll: boolean;
4
- speed?: number;
5
- } | undefined>;
@@ -1,20 +0,0 @@
1
- export const horizontalWheelScroll = (node, param = { isolateScroll: true, speed: 1 }) => {
2
- const onWheel = (event) => {
3
- const canScrollX = node.scrollWidth > node.clientWidth;
4
- if (!canScrollX) {
5
- return;
6
- }
7
- const delta = Math.abs(event.deltaX) > Math.abs(event.deltaY) ? event.deltaX : event.deltaY;
8
- node.scrollBy({ left: delta * (param.speed ?? 1), behavior: 'smooth' });
9
- if (param.isolateScroll) {
10
- event.preventDefault();
11
- event.stopPropagation();
12
- }
13
- };
14
- node.addEventListener('wheel', onWheel, { passive: false });
15
- return {
16
- destroy() {
17
- node.removeEventListener('wheel', onWheel);
18
- }
19
- };
20
- };
@@ -1,2 +0,0 @@
1
- export { horizontalWheelScroll } from './horizontal-wheel-scroll';
2
- export { swallowTouch } from './swallow-touch';
@@ -1,2 +0,0 @@
1
- export { horizontalWheelScroll } from './horizontal-wheel-scroll';
2
- export { swallowTouch } from './swallow-touch';
@@ -1,2 +0,0 @@
1
- import type { Action } from 'svelte/action';
2
- export declare const swallowTouch: Action;
@@ -1,17 +0,0 @@
1
- export const swallowTouch = (node) => {
2
- const stopAll = (e) => {
3
- e.stopPropagation();
4
- };
5
- node.addEventListener('touchstart', stopAll, { passive: false });
6
- node.addEventListener('touchmove', stopAll, { passive: false });
7
- node.addEventListener('touchend', stopAll, { passive: false });
8
- node.addEventListener('touchcancel', stopAll, { passive: false });
9
- return {
10
- destroy() {
11
- node.removeEventListener('touchstart', stopAll);
12
- node.removeEventListener('touchmove', stopAll);
13
- node.removeEventListener('touchend', stopAll);
14
- node.removeEventListener('touchcancel', stopAll);
15
- }
16
- };
17
- };
@@ -1 +0,0 @@
1
- export declare const runningInBrowser: () => boolean;
@@ -1 +0,0 @@
1
- export const runningInBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined';
@@ -1,11 +0,0 @@
1
- export declare class ContinuationToken {
2
- canLoadMore: boolean;
3
- value: string | null;
4
- private constructor();
5
- static init(): ContinuationToken;
6
- static fromPayload(value: string | null): ContinuationToken;
7
- static preventLoading(): ContinuationToken;
8
- toNextChunkString(): string | null | undefined;
9
- toString(): string | null;
10
- toJSON(): string | null;
11
- }
@@ -1,35 +0,0 @@
1
- export class ContinuationToken {
2
- canLoadMore;
3
- value;
4
- constructor(canLoadMore, value) {
5
- this.canLoadMore = canLoadMore;
6
- this.value = value;
7
- }
8
- static init() {
9
- // initial state, no data is loaded so far
10
- return new ContinuationToken(true, null);
11
- }
12
- static fromPayload(value) {
13
- if (value?.length && value.length > 1 && value.length < 5000) {
14
- // initialized with server response that there is more data, and value is valid
15
- return new ContinuationToken(true, value);
16
- }
17
- else {
18
- // initialized with server response that there is no more data or value is invalid
19
- return new ContinuationToken(false, null);
20
- }
21
- }
22
- static preventLoading() {
23
- // additional initilizer, to block further loading
24
- return new ContinuationToken(false, null);
25
- }
26
- toNextChunkString() {
27
- return this.canLoadMore ? this.value || undefined : this.value;
28
- }
29
- toString() {
30
- return this.value;
31
- }
32
- toJSON() {
33
- return this.value;
34
- }
35
- }
@@ -1,9 +0,0 @@
1
- import type { ContinuationToken } from './continuation-token';
2
- export type CursorResult<T> = {
3
- items: T[];
4
- continuationToken: ContinuationToken;
5
- };
6
- export type CursorPayload<T> = {
7
- items: T[];
8
- continuationToken: string | null;
9
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- import { type CursorResult } from '../cursor-result';
2
- import { ContinuationToken } from '../continuation-token';
3
- import type { IDataLoader } from './data-loader';
4
- export declare class CursorDataLoader<T> implements IDataLoader<T> {
5
- items: T[];
6
- continuationToken: ContinuationToken;
7
- private loadPage;
8
- private deferred;
9
- constructor(init: {
10
- loadPage: (continuationToken: ContinuationToken) => Promise<CursorResult<T> | null>;
11
- });
12
- loadMore: () => Promise<T[]>;
13
- reset(): Promise<void>;
14
- }
@@ -1,35 +0,0 @@
1
- import {} from '../cursor-result';
2
- import { Deferred } from '../deferred';
3
- import { ContinuationToken } from '../continuation-token';
4
- export class CursorDataLoader {
5
- items = $state([]);
6
- continuationToken = $state.raw(ContinuationToken.init());
7
- loadPage;
8
- deferred = null;
9
- constructor(init) {
10
- this.loadPage = init.loadPage;
11
- }
12
- loadMore = async () => {
13
- if (this.deferred) {
14
- return this.deferred.promise;
15
- }
16
- if (!this.continuationToken.canLoadMore) {
17
- return [];
18
- }
19
- this.deferred = new Deferred();
20
- let result = await this.loadPage(this.continuationToken);
21
- if (!result) {
22
- result = { items: [], continuationToken: ContinuationToken.preventLoading() };
23
- }
24
- this.continuationToken = result.continuationToken;
25
- this.items = [...this.items, ...result.items];
26
- this.deferred.resolve(result.items);
27
- this.deferred = null;
28
- return result.items;
29
- };
30
- async reset() {
31
- this.items = [];
32
- this.continuationToken = ContinuationToken.init();
33
- await this.loadMore();
34
- }
35
- }
@@ -1,4 +0,0 @@
1
- export interface IDataLoader<T> {
2
- items: T[];
3
- loadMore: () => Promise<T[]>;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export { CursorDataLoader } from './cursor-data-loader.svelte';
2
- export type { IDataLoader } from './data-loader';
@@ -1 +0,0 @@
1
- export { CursorDataLoader } from './cursor-data-loader.svelte';
@@ -1,6 +0,0 @@
1
- export declare class Deferred<T = void> {
2
- promise: Promise<T>;
3
- reject: (reason?: unknown) => void;
4
- resolve: (value: T) => void;
5
- constructor();
6
- }
@@ -1,13 +0,0 @@
1
- export class Deferred {
2
- promise;
3
- reject;
4
- resolve;
5
- constructor() {
6
- this.resolve = () => ({});
7
- this.reject = () => ({});
8
- this.promise = new Promise((resolve, reject) => {
9
- this.reject = reject;
10
- this.resolve = resolve;
11
- });
12
- }
13
- }
@@ -1,2 +0,0 @@
1
- export declare const handleEsc: (event: KeyboardEvent, callback: () => void) => void;
2
- export declare const isTouchDevice: () => boolean;
@@ -1,8 +0,0 @@
1
- export const handleEsc = (event, callback) => {
2
- if (event.key === 'Escape' || event.key === 'Esc') {
3
- callback();
4
- }
5
- };
6
- export const isTouchDevice = () => {
7
- return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
8
- };
@@ -1 +0,0 @@
1
- export declare const preloadImage: (src: string, throwOnError?: boolean) => Promise<void>;
@@ -1,10 +0,0 @@
1
- export const preloadImage = (src, throwOnError = false) => {
2
- return new Promise((resolve, reject) => {
3
- const img = new Image();
4
- img.decoding = 'async';
5
- img.loading = 'eager';
6
- img.onload = () => resolve();
7
- img.onerror = (e) => (throwOnError ? reject(e) : resolve());
8
- img.src = src;
9
- });
10
- };
@@ -1,4 +0,0 @@
1
- export type Locale = 'en' | 'no';
2
- export type LocalizationSchema = {
3
- [key: string]: Record<Locale, unknown>;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- export declare class ImageHelper {
2
- static checkIsVertical: (url: string) => Promise<boolean>;
3
- static computeRatio: (src: string) => Promise<ImageSize | null>;
4
- static getRatio: (metadata: ImageSize) => number;
5
- }
6
- type ImageSize = {
7
- width: number;
8
- height: number;
9
- };
10
- export {};
@@ -1,30 +0,0 @@
1
- export class ImageHelper {
2
- static checkIsVertical = async (url) => {
3
- const ratio = await ImageHelper.computeRatio(url);
4
- if (!ratio) {
5
- return false;
6
- }
7
- return ratio.height >= ratio.width;
8
- };
9
- static computeRatio = async (src) => {
10
- const setRatio = (imageElement, resolveFn) => {
11
- if (!imageElement || !imageElement.width) {
12
- resolveFn(null);
13
- }
14
- else {
15
- resolveFn({ width: imageElement.width, height: imageElement.height });
16
- }
17
- };
18
- return new Promise((resolve) => {
19
- const imageElement = new Image();
20
- imageElement.onload = () => {
21
- setRatio(imageElement, resolve);
22
- };
23
- imageElement.onerror = () => {
24
- setRatio(null, resolve);
25
- };
26
- imageElement.src = src;
27
- });
28
- };
29
- static getRatio = (metadata) => metadata.width / metadata.height;
30
- }
@@ -1,6 +0,0 @@
1
- import { ImageScale } from '../enums';
2
- export declare class ImageSizeDetectorService {
3
- userAgent: string | null;
4
- constructor(userAgent?: string | null);
5
- getImageSize(): ImageScale;
6
- }
@@ -1,15 +0,0 @@
1
- import { ImageScale } from '../enums';
2
- import MobileDetect from 'mobile-detect';
3
- export class ImageSizeDetectorService {
4
- userAgent;
5
- constructor(userAgent = null) {
6
- this.userAgent = userAgent;
7
- }
8
- getImageSize() {
9
- if (!this.userAgent) {
10
- return ImageScale.OriginalEncoded;
11
- }
12
- const result = new MobileDetect(this.userAgent);
13
- return result.mobile() ? ImageScale.Medium : ImageScale.OriginalEncoded;
14
- }
15
- }
@@ -1 +0,0 @@
1
- export declare const toastrWarning: (message: string) => void;
@@ -1,26 +0,0 @@
1
- export const toastrWarning = (message) => {
2
- const toast = document.createElement('div');
3
- toast.innerHTML = `
4
- <span>${message}</span>
5
- <span style="margin-left: auto; cursor: pointer; color: #666;" onclick="this.parentElement.remove()">x</span>
6
- `;
7
- Object.assign(toast.style, {
8
- display: 'flex',
9
- alignItems: 'center',
10
- gap: '8px',
11
- background: 'white',
12
- color: 'black',
13
- borderRadius: '5px',
14
- padding: '12px 16px',
15
- boxShadow: '0 2px 10px rgba(0, 0, 0, 0.1)',
16
- position: 'fixed',
17
- bottom: '10px',
18
- right: '10px',
19
- width: '300px',
20
- borderLeft: '4px solid #e0a800',
21
- borderBottom: '4px solid #e0a800',
22
- zIndex: 1000
23
- });
24
- document.body.appendChild(toast);
25
- setTimeout(() => toast.remove(), 5000);
26
- };
@@ -1 +0,0 @@
1
- export { slideHorizontally } from './slide-horizontally';
@@ -1 +0,0 @@
1
- export { slideHorizontally } from './slide-horizontally';
@@ -1,7 +0,0 @@
1
- import { sineInOut } from 'svelte/easing';
2
- import type { TransitionConfig } from 'svelte/transition';
3
- export declare const slideHorizontally: (node: HTMLElement, { delay, duration, easing }?: {
4
- delay?: number | undefined;
5
- duration?: number | undefined;
6
- easing?: typeof sineInOut | undefined;
7
- }) => TransitionConfig;
@@ -1,55 +0,0 @@
1
- import { sineInOut } from 'svelte/easing';
2
- export const slideHorizontally = (node, { delay = 0, duration = 400, easing = sineInOut } = {}) => {
3
- const style = getComputedStyle(node);
4
- const isHtmlElement = (node) => node.nodeType === Node.ELEMENT_NODE;
5
- const children = Array.from(node.children).filter(isHtmlElement);
6
- children.forEach((child) => {
7
- const style = getComputedStyle(child);
8
- child.style.width = style.width;
9
- child.style.minWidth = style.width;
10
- child.style.maxWidth = style.maxWidth;
11
- });
12
- const opacity = +style.opacity;
13
- const width = parseFloat(style.width);
14
- const padding_left = parseFloat(style.paddingLeft);
15
- const padding_right = parseFloat(style.paddingRight);
16
- const margin_left = parseFloat(style.marginLeft);
17
- const margin_right = parseFloat(style.marginRight);
18
- const border_left_width = parseFloat(style.borderLeftWidth);
19
- const border_right_width = parseFloat(style.borderRightWidth);
20
- let initialT = undefined;
21
- let initialU = undefined;
22
- return {
23
- delay,
24
- duration,
25
- easing,
26
- css: (t, u) => {
27
- if (initialT === undefined) {
28
- initialT = t;
29
- }
30
- if (initialU === undefined) {
31
- initialU = u;
32
- }
33
- return ('overflow: hidden;' +
34
- `opacity: ${Math.min(t, 1) * opacity};` +
35
- `width: ${t * width}px;` +
36
- `min-width: ${t * width}px;` +
37
- `padding-left: ${t * padding_left}px;` +
38
- `padding-right: ${t * padding_right}px;` +
39
- `margin-left: ${t * margin_left}px;` +
40
- `margin-right: ${t * margin_right}px;` +
41
- `border-left-width: ${t * border_left_width}px;` +
42
- `border-right-width: ${t * border_right_width}px;`);
43
- },
44
- // Clean up function to remove the wrapper when the transition is done
45
- tick: (t, u) => {
46
- if ((initialT === 0 && t === 1) || (initialU === 0 && u === 1)) {
47
- children.forEach((child) => {
48
- child.style.width = '';
49
- child.style.minWidth = '';
50
- child.style.maxWidth = '';
51
- });
52
- }
53
- }
54
- };
55
- };
@@ -1,23 +0,0 @@
1
- export declare class ArrayHelper {
2
- static distinct<T>(items: T[]): T[];
3
- static distinctBy<T>(items: T[], keyFn: (elem: T) => unknown): T[];
4
- static intersect<T>(arrays: T[][]): T[];
5
- static assertHasValue<T>(value: T | null | undefined): value is T;
6
- /**
7
- * Find position ("from" and "to" indexes) of the element that was moved inside array (only one element should be moved)
8
- */
9
- static findMovedElement(initial: unknown[], modified: unknown[]): {
10
- from: number;
11
- to: number;
12
- } | undefined;
13
- static moveArrayItem<T>(arr: T[], from: number, to: number): T[];
14
- static replaceArrayItem<T>(arr: T[], originalItem: T, newItem: T): T[];
15
- static randomElement<T>(arr: T[]): T;
16
- static randomElements<T>(arr: T[], count: number): T[];
17
- static sortArray<T>(array: T[], propertyFunc: (elem: T) => unknown): T[];
18
- static sortArrayDescending<T>(array: T[], propertyFunc: (elem: T) => unknown): T[];
19
- static groupBy<T>(array: T[], keyResolver: (elem: T) => string): Record<string, T[]>;
20
- static repeat<T>(itemFn: (i: number) => T, length: number): T[];
21
- static areEqual<T>(array1?: T[] | null, array2?: T[] | null): boolean;
22
- private static sortArrayInternal;
23
- }