@streamscloud/embeddable 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/advertising/ad-view/cmp.ad-view.svelte +82 -0
- package/dist/advertising/ad-view/cmp.ad-view.svelte.d.ts +8 -0
- package/dist/advertising/ad-view/index.d.ts +2 -0
- package/dist/advertising/ad-view/index.js +1 -0
- package/dist/advertising/ad-view/mapper.d.ts +3 -0
- package/dist/advertising/ad-view/mapper.js +16 -0
- package/dist/advertising/ad-view/operations.generated.d.ts +17 -0
- package/dist/advertising/ad-view/operations.generated.js +46 -0
- package/dist/advertising/ad-view/operations.graphql +14 -0
- package/dist/advertising/ad-view/types.d.ts +10 -0
- package/dist/advertising/ad-view/types.js +1 -0
- package/dist/advertising/index.d.ts +1 -0
- package/dist/advertising/index.js +1 -0
- package/dist/advertising/types.d.ts +5 -0
- package/dist/advertising/types.js +6 -0
- package/dist/core/continuation-token.d.ts +10 -0
- package/dist/core/continuation-token.js +32 -0
- package/dist/core/cursor-result.d.ts +9 -0
- package/dist/core/cursor-result.js +1 -0
- package/dist/core/data-loaders/cursor-data-loader.svelte.d.ts +14 -0
- package/dist/core/data-loaders/cursor-data-loader.svelte.js +35 -0
- package/dist/core/data-loaders/data-loader.d.ts +4 -0
- package/dist/core/data-loaders/data-loader.js +1 -0
- package/dist/core/data-loaders/index.d.ts +2 -0
- package/dist/core/data-loaders/index.js +1 -0
- package/dist/core/deferred.d.ts +6 -0
- package/dist/core/deferred.js +13 -0
- package/dist/core/graphql.d.ts +1 -0
- package/dist/core/graphql.js +10 -0
- package/dist/core/media/image-helper.d.ts +10 -0
- package/dist/core/media/image-helper.js +30 -0
- package/dist/core/media/images-size-detector.service.d.ts +6 -0
- package/dist/core/media/images-size-detector.service.js +15 -0
- package/dist/core/media/index.d.ts +4 -0
- package/dist/core/media/index.js +4 -0
- package/dist/core/media/media-item-url.service.d.ts +2 -0
- package/dist/core/media/media-item-url.service.js +2 -0
- package/dist/core/media/types.d.ts +28 -0
- package/dist/core/media/types.js +19 -0
- package/dist/core/toastr.d.ts +1 -0
- package/dist/core/toastr.js +26 -0
- package/dist/core/transitions/index.d.ts +1 -0
- package/dist/core/transitions/index.js +1 -0
- package/dist/core/transitions/slide-horizontally.d.ts +7 -0
- package/dist/core/transitions/slide-horizontally.js +55 -0
- package/dist/core/utils/array-helper.d.ts +23 -0
- package/dist/core/utils/array-helper.js +148 -0
- package/dist/core/utils/date-helper.d.ts +29 -0
- package/dist/core/utils/date-helper.js +146 -0
- package/dist/core/utils/dom-helper.d.ts +12 -0
- package/dist/core/utils/dom-helper.js +76 -0
- package/dist/core/utils/html-helper.d.ts +40 -0
- package/dist/core/utils/html-helper.js +97 -0
- package/dist/core/utils/index.d.ts +3 -0
- package/dist/core/utils/index.js +3 -0
- package/dist/core/utils/number-helper.d.ts +6 -0
- package/dist/core/utils/number-helper.js +28 -0
- package/dist/core/utils/string-generator.d.ts +2 -0
- package/dist/core/utils/string-generator.js +15 -0
- package/dist/core/utils/string-helper.d.ts +10 -0
- package/dist/core/utils/string-helper.js +53 -0
- package/dist/core/utils/url-helper.d.ts +3 -0
- package/dist/core/utils/url-helper.js +13 -0
- package/dist/core/utils/utils.d.ts +28 -0
- package/dist/core/utils/utils.js +100 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/products/index.d.ts +1 -0
- package/dist/products/index.js +1 -0
- package/dist/products/price-helper.d.ts +4 -0
- package/dist/products/price-helper.js +36 -0
- package/dist/products/product-card/cmp.product-card.svelte +121 -0
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +10 -0
- package/dist/products/product-card/index.d.ts +3 -0
- package/dist/products/product-card/index.js +3 -0
- package/dist/products/product-card/mapper.d.ts +3 -0
- package/dist/products/product-card/mapper.js +14 -0
- package/dist/products/product-card/operations.generated.d.ts +22 -0
- package/dist/products/product-card/operations.generated.js +65 -0
- package/dist/products/product-card/operations.graphql +19 -0
- package/dist/products/product-card/product-card-localization.svelte.d.ts +7 -0
- package/dist/products/product-card/product-card-localization.svelte.js +11 -0
- package/dist/products/product-card/types.d.ts +10 -0
- package/dist/products/product-card/types.js +1 -0
- package/dist/products/types.d.ts +5 -0
- package/dist/products/types.js +6 -0
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +71 -0
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +7 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +145 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +10 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +86 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +9 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +133 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +12 -0
- package/dist/short-videos/short-video-viewer/description.svelte +46 -0
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +9 -0
- package/dist/short-videos/short-video-viewer/index.d.ts +6 -0
- package/dist/short-videos/short-video-viewer/index.js +4 -0
- package/dist/short-videos/short-video-viewer/mapper.d.ts +3 -0
- package/dist/short-videos/short-video-viewer/mapper.js +28 -0
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +56 -0
- package/dist/short-videos/short-video-viewer/operations.generated.js +187 -0
- package/dist/short-videos/short-video-viewer/operations.graphql +26 -0
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.d.ts +14 -0
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +21 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +10 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +13 -0
- package/dist/short-videos/short-video-viewer/types.d.ts +17 -0
- package/dist/short-videos/short-video-viewer/types.js +1 -0
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.d.ts +12 -0
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.js +26 -0
- package/dist/short-videos/short-videos-player/action-button.svelte +38 -0
- package/dist/short-videos/short-videos-player/action-button.svelte.d.ts +10 -0
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +91 -0
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +13 -0
- package/dist/short-videos/short-videos-player/controls.svelte +215 -0
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +15 -0
- package/dist/short-videos/short-videos-player/index.d.ts +2 -0
- package/dist/short-videos/short-videos-player/index.js +1 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +14 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +21 -0
- package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +16 -0
- package/dist/short-videos/short-videos-player/ui-manager.svelte.js +25 -0
- package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte +485 -0
- package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte.d.ts +3 -0
- package/dist/short-videos/short-videos-player-modal/index.d.ts +79 -0
- package/dist/short-videos/short-videos-player-modal/index.js +78 -0
- package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.d.ts +16 -0
- package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.js +13 -0
- package/dist/streams/components/cmp.stream-page-component.svelte +16 -0
- package/dist/streams/components/cmp.stream-page-component.svelte.d.ts +10 -0
- package/dist/streams/components/components.factory.d.ts +22 -0
- package/dist/streams/components/components.factory.js +34 -0
- package/dist/streams/components/images/cmp.images-component.svelte +7 -0
- package/dist/streams/components/images/cmp.images-component.svelte.d.ts +7 -0
- package/dist/streams/components/images/index.d.ts +2 -0
- package/dist/streams/components/images/index.js +1 -0
- package/dist/streams/components/images/types.d.ts +8 -0
- package/dist/streams/components/images/types.js +5 -0
- package/dist/streams/components/index.d.ts +7 -0
- package/dist/streams/components/index.js +6 -0
- package/dist/streams/components/mapper.d.ts +3 -0
- package/dist/streams/components/mapper.js +43 -0
- package/dist/streams/components/operations.generated.d.ts +178 -0
- package/dist/streams/components/operations.generated.js +653 -0
- package/dist/streams/components/operations.graphql +35 -0
- package/dist/streams/components/product/cmp.product-component.svelte +148 -0
- package/dist/streams/components/product/cmp.product-component.svelte.d.ts +8 -0
- package/dist/streams/components/product/index.d.ts +3 -0
- package/dist/streams/components/product/index.js +2 -0
- package/dist/streams/components/product/mapper.d.ts +3 -0
- package/dist/streams/components/product/mapper.js +14 -0
- package/dist/streams/components/product/operations.generated.d.ts +22 -0
- package/dist/streams/components/product/operations.generated.js +53 -0
- package/dist/streams/components/product/operations.graphql +19 -0
- package/dist/streams/components/product/types.d.ts +10 -0
- package/dist/streams/components/product/types.js +1 -0
- package/dist/streams/components/short-video/cmp.short-video-component.svelte +9 -0
- package/dist/streams/components/short-video/cmp.short-video-component.svelte.d.ts +10 -0
- package/dist/streams/components/short-video/index.d.ts +3 -0
- package/dist/streams/components/short-video/index.js +2 -0
- package/dist/streams/components/short-video/mapper.d.ts +3 -0
- package/dist/streams/components/short-video/mapper.js +4 -0
- package/dist/streams/components/short-video/operations.generated.d.ts +56 -0
- package/dist/streams/components/short-video/operations.generated.js +193 -0
- package/dist/streams/components/short-video/operations.graphql +3 -0
- package/dist/streams/components/short-video/types.d.ts +2 -0
- package/dist/streams/components/short-video/types.js +1 -0
- package/dist/streams/components/stream-components-localization.svelte.d.ts +10 -0
- package/dist/streams/components/stream-components-localization.svelte.js +13 -0
- package/dist/streams/components/types.d.ts +27 -0
- package/dist/streams/components/types.js +6 -0
- package/dist/streams/slots/cmp.stream-component-slot.svelte +35 -0
- package/dist/streams/slots/cmp.stream-component-slot.svelte.d.ts +9 -0
- package/dist/streams/slots/index.d.ts +3 -0
- package/dist/streams/slots/index.js +2 -0
- package/dist/streams/slots/mapper.d.ts +3 -0
- package/dist/streams/slots/mapper.js +18 -0
- package/dist/streams/slots/operations.generated.d.ts +17 -0
- package/dist/streams/slots/operations.generated.js +34 -0
- package/dist/streams/slots/operations.graphql +14 -0
- package/dist/streams/slots/styles-transformer.d.ts +6 -0
- package/dist/streams/slots/styles-transformer.js +12 -0
- package/dist/streams/slots/types.d.ts +16 -0
- package/dist/streams/slots/types.js +1 -0
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +47 -0
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +9 -0
- package/dist/streams/stream-page-viewer/index.d.ts +2 -0
- package/dist/streams/stream-page-viewer/index.js +1 -0
- package/dist/streams/stream-page-viewer/mapper.d.ts +3 -0
- package/dist/streams/stream-page-viewer/mapper.js +23 -0
- package/dist/streams/stream-page-viewer/operations.generated.d.ts +113 -0
- package/dist/streams/stream-page-viewer/operations.generated.js +400 -0
- package/dist/streams/stream-page-viewer/operations.graphql +13 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +10 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +13 -0
- package/dist/streams/stream-page-viewer/types.d.ts +18 -0
- package/dist/streams/stream-page-viewer/types.js +1 -0
- package/dist/streams/stream-player/action-button.svelte +38 -0
- package/dist/streams/stream-player/action-button.svelte.d.ts +10 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte +141 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +16 -0
- package/dist/streams/stream-player/controls.svelte +222 -0
- package/dist/streams/stream-player/controls.svelte.d.ts +14 -0
- package/dist/streams/stream-player/index.d.ts +2 -0
- package/dist/streams/stream-player/index.js +1 -0
- package/dist/streams/stream-player/mapper.d.ts +3 -0
- package/dist/streams/stream-player/mapper.js +15 -0
- package/dist/streams/stream-player/operations.generated.d.ts +161 -0
- package/dist/streams/stream-player/operations.generated.js +559 -0
- package/dist/streams/stream-player/operations.graphql +32 -0
- package/dist/streams/stream-player/stream-overview.svelte +239 -0
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +17 -0
- package/dist/streams/stream-player/stream-player-buffer.svelte.d.ts +25 -0
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +84 -0
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +18 -0
- package/dist/streams/stream-player/stream-player-localization.svelte.js +29 -0
- package/dist/streams/stream-player/types.d.ts +12 -0
- package/dist/streams/stream-player/types.js +1 -0
- package/dist/streams/stream-player/ui-manager.svelte.d.ts +17 -0
- package/dist/streams/stream-player/ui-manager.svelte.js +26 -0
- package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte +486 -0
- package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte.d.ts +3 -0
- package/dist/streams/stream-player-modal/index.d.ts +79 -0
- package/dist/streams/stream-player-modal/index.js +78 -0
- package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.d.ts +17 -0
- package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.js +14 -0
- package/dist/ui/button/cmp.button.svelte +10 -0
- package/dist/ui/button/cmp.button.svelte.d.ts +16 -0
- package/dist/ui/button/index.d.ts +2 -0
- package/dist/ui/button/index.js +2 -0
- package/dist/ui/button/resources/button-base.svelte +84 -0
- package/dist/ui/button/resources/button-base.svelte.d.ts +13 -0
- package/dist/ui/button/resources/button-theme.svelte +204 -0
- package/dist/ui/button/resources/button-theme.svelte.d.ts +10 -0
- package/dist/ui/button/resources/button-types.d.ts +21 -0
- package/dist/ui/button/resources/button-types.js +23 -0
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +5 -0
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +7 -0
- package/dist/ui/dynamic-component/index.d.ts +2 -0
- package/dist/ui/dynamic-component/index.js +2 -0
- package/dist/ui/dynamic-component/types.svelte.d.ts +11 -0
- package/dist/ui/dynamic-component/types.svelte.js +13 -0
- package/dist/ui/icon/cmp.icon.svelte +113 -0
- package/dist/ui/icon/cmp.icon.svelte.d.ts +8 -0
- package/dist/ui/icon/index.d.ts +2 -0
- package/dist/ui/icon/index.js +2 -0
- package/dist/ui/icon/types.d.ts +9 -0
- package/dist/ui/icon/types.js +10 -0
- package/dist/ui/image/cmp.image-round.svelte +41 -0
- package/dist/ui/image/cmp.image-round.svelte.d.ts +11 -0
- package/dist/ui/image/cmp.image-rounded.svelte +71 -0
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +11 -0
- package/dist/ui/image/cmp.image-stub.svelte +34 -0
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +18 -0
- package/dist/ui/image/cmp.image.svelte +82 -0
- package/dist/ui/image/cmp.image.svelte.d.ts +13 -0
- package/dist/ui/image/image-state.d.ts +6 -0
- package/dist/ui/image/image-state.js +17 -0
- package/dist/ui/image/index.d.ts +4 -0
- package/dist/ui/image/index.js +4 -0
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +84 -0
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +11 -0
- package/dist/ui/infinite-scrolling/index.d.ts +1 -0
- package/dist/ui/infinite-scrolling/index.js +1 -0
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +89 -0
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +12 -0
- package/dist/ui/line-clamp/index.d.ts +2 -0
- package/dist/ui/line-clamp/index.js +2 -0
- package/dist/ui/line-clamp/line-clamp-localization.svelte.d.ts +9 -0
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +15 -0
- package/dist/ui/line-clamp/line-clamp-types.d.ts +3 -0
- package/dist/ui/line-clamp/line-clamp-types.js +1 -0
- package/dist/ui/line-clamp/line-clamp-utils.d.ts +8 -0
- package/dist/ui/line-clamp/line-clamp-utils.js +33 -0
- package/dist/ui/loading/cmp.loading.svelte +97 -0
- package/dist/ui/loading/cmp.loading.svelte.d.ts +9 -0
- package/dist/ui/loading/index.d.ts +1 -0
- package/dist/ui/loading/index.js +1 -0
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +90 -0
- package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +12 -0
- package/dist/ui/media-item-view/index.d.ts +1 -0
- package/dist/ui/media-item-view/index.js +1 -0
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +277 -0
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +12 -0
- package/dist/ui/media-items-gallery/index.d.ts +1 -0
- package/dist/ui/media-items-gallery/index.js +1 -0
- package/dist/ui/media-items-gallery/types.d.ts +12 -0
- package/dist/ui/media-items-gallery/types.js +35 -0
- package/dist/ui/media-playback/index.d.ts +2 -0
- package/dist/ui/media-playback/index.js +2 -0
- package/dist/ui/media-playback/playback-manager.svelte.d.ts +25 -0
- package/dist/ui/media-playback/playback-manager.svelte.js +62 -0
- package/dist/ui/media-playback/volume-manager.svelte.d.ts +10 -0
- package/dist/ui/media-playback/volume-manager.svelte.js +27 -0
- package/dist/ui/player/cmp.player-slider.svelte +161 -0
- package/dist/ui/player/cmp.player-slider.svelte.d.ts +33 -0
- package/dist/ui/player/index.d.ts +4 -0
- package/dist/ui/player/index.js +3 -0
- package/dist/ui/player/player-buffer.svelte.d.ts +28 -0
- package/dist/ui/player/player-buffer.svelte.js +64 -0
- package/dist/ui/player/prevent-slider-scroll.d.ts +5 -0
- package/dist/ui/player/prevent-slider-scroll.js +11 -0
- package/dist/ui/player/types.d.ts +14 -0
- package/dist/ui/player/types.js +1 -0
- package/dist/ui/progress/cmp.progress.svelte +37 -0
- package/dist/ui/progress/cmp.progress.svelte.d.ts +6 -0
- package/dist/ui/progress/index.d.ts +1 -0
- package/dist/ui/progress/index.js +1 -0
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +39 -0
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +8 -0
- package/dist/ui/proportional-container/index.d.ts +1 -0
- package/dist/ui/proportional-container/index.js +1 -0
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +63 -0
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +12 -0
- package/dist/ui/seek-bar/index.d.ts +1 -0
- package/dist/ui/seek-bar/index.js +1 -0
- package/dist/ui/shadow-dom/cmp.shadow-dom.svelte +26 -0
- package/dist/ui/shadow-dom/cmp.shadow-dom.svelte.d.ts +7 -0
- package/dist/ui/shadow-dom/index.d.ts +1 -0
- package/dist/ui/shadow-dom/index.js +1 -0
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte +120 -0
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte.d.ts +18 -0
- package/dist/ui/spotlight-layout/index.d.ts +1 -0
- package/dist/ui/spotlight-layout/index.js +1 -0
- package/dist/ui/time-ago/cmp.time-ago.svelte +69 -0
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +9 -0
- package/dist/ui/time-ago/index.d.ts +2 -0
- package/dist/ui/time-ago/index.js +1 -0
- package/dist/ui/time-ago/time-ago-localization.svelte.d.ts +21 -0
- package/dist/ui/time-ago/time-ago-localization.svelte.js +39 -0
- package/dist/ui/video/cmp.video.svelte +377 -0
- package/dist/ui/video/cmp.video.svelte.d.ts +24 -0
- package/dist/ui/video/index.d.ts +1 -0
- package/dist/ui/video/index.js +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<script lang="ts">import { slideHorizontally } from '../../core/transitions';
|
|
2
|
+
import { Icon } from '../../ui/icon';
|
|
3
|
+
import { Image, ImageRound } from '../../ui/image';
|
|
4
|
+
import { InfiniteScrolling } from '../../ui/infinite-scrolling';
|
|
5
|
+
import { LineClamp } from '../../ui/line-clamp';
|
|
6
|
+
import { ProportionalContainer } from '../../ui/proportional-container';
|
|
7
|
+
import { TimeAgo } from '../../ui/time-ago';
|
|
8
|
+
import { default as ActionButton } from './action-button.svelte';
|
|
9
|
+
import { StreamPlayerLocalization } from './stream-player-localization.svelte';
|
|
10
|
+
import IconPanelLeftText from '@fluentui/svg-icons/icons/panel_left_text_20_regular.svg';
|
|
11
|
+
let { model, buffer, activePageId, on, uiManager, localization } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
{#if !uiManager.overviewCollapsed}
|
|
15
|
+
<div class="stream-overview" transition:slideHorizontally|local>
|
|
16
|
+
<div class="stream-overview-info">
|
|
17
|
+
<div class="stream-overview-owner">
|
|
18
|
+
<div class="stream-overview-owner__image">
|
|
19
|
+
<ImageRound src={model.header.image} />
|
|
20
|
+
</div>
|
|
21
|
+
<div class="stream-overview-owner__body">
|
|
22
|
+
<div class="stream-overview-owner__name">
|
|
23
|
+
<LineClamp maxLines={1}>
|
|
24
|
+
{model.header.name}
|
|
25
|
+
</LineClamp>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="stream-overview-owner__meta">
|
|
28
|
+
<LineClamp maxLines={1}>
|
|
29
|
+
<TimeAgo date={model.publishedAt || model.createdAt} />
|
|
30
|
+
</LineClamp>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="stream-overview-info__title">
|
|
35
|
+
<LineClamp maxLines={2}>
|
|
36
|
+
{model.title}
|
|
37
|
+
</LineClamp>
|
|
38
|
+
</div>
|
|
39
|
+
{#if model.subTitle}
|
|
40
|
+
<div class="stream-overview-info__subtitle">
|
|
41
|
+
<LineClamp maxLines={3}>
|
|
42
|
+
{model.subTitle}
|
|
43
|
+
</LineClamp>
|
|
44
|
+
</div>
|
|
45
|
+
{/if}
|
|
46
|
+
<div class="stream-overview-info__pages">
|
|
47
|
+
{localization.pagesCount(model.pagesCount)}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="stream-overview-pages">
|
|
51
|
+
<InfiniteScrolling loadMore={buffer.loadMore}>
|
|
52
|
+
<div class="stream-overview-pages__grid">
|
|
53
|
+
{#each buffer.loaded as item, index (item.id)}
|
|
54
|
+
<button
|
|
55
|
+
type="button"
|
|
56
|
+
class="stream-overview-pages__page"
|
|
57
|
+
class:stream-overview-pages__page--active={activePageId === item.id}
|
|
58
|
+
onclick={() => on.setCurrentItem(index)}>
|
|
59
|
+
<ProportionalContainer ratio={9 / 16}>
|
|
60
|
+
<Image src={item.cover} />
|
|
61
|
+
</ProportionalContainer>
|
|
62
|
+
</button>
|
|
63
|
+
{/each}
|
|
64
|
+
</div>
|
|
65
|
+
</InfiniteScrolling>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
{/if}
|
|
69
|
+
|
|
70
|
+
<div class="toggle-collapsed-button">
|
|
71
|
+
<ActionButton on={{ click: () => (uiManager.overviewCollapsed = !uiManager.overviewCollapsed) }}>
|
|
72
|
+
<Icon src={IconPanelLeftText} />
|
|
73
|
+
</ActionButton>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<style>@keyframes fadeIn {
|
|
77
|
+
0% {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
50% {
|
|
81
|
+
opacity: 0.4;
|
|
82
|
+
}
|
|
83
|
+
100% {
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
.stream-overview {
|
|
88
|
+
background: #1c1c1c;
|
|
89
|
+
height: 100%;
|
|
90
|
+
min-height: 100%;
|
|
91
|
+
max-height: 100%;
|
|
92
|
+
width: 13.75rem;
|
|
93
|
+
min-width: 13.75rem;
|
|
94
|
+
max-width: 13.75rem;
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
min-height: 0;
|
|
98
|
+
padding-bottom: 0.9375rem;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 0;
|
|
102
|
+
left: 0;
|
|
103
|
+
height: 100%;
|
|
104
|
+
z-index: 1;
|
|
105
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
106
|
+
}
|
|
107
|
+
@container (width < 576px) {
|
|
108
|
+
.stream-overview {
|
|
109
|
+
width: 100%;
|
|
110
|
+
min-width: 100%;
|
|
111
|
+
max-width: 100%;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.toggle-collapsed-button {
|
|
116
|
+
position: absolute;
|
|
117
|
+
bottom: var(--stream-player--controls--offset-vertical);
|
|
118
|
+
left: var(--stream-player--controls--offset-horizontal);
|
|
119
|
+
z-index: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.stream-overview-info {
|
|
123
|
+
padding: 1rem;
|
|
124
|
+
}
|
|
125
|
+
.stream-overview-info__title {
|
|
126
|
+
font-size: 1.125rem;
|
|
127
|
+
line-height: 1.2;
|
|
128
|
+
font-weight: 900;
|
|
129
|
+
color: #ffffff;
|
|
130
|
+
}
|
|
131
|
+
.stream-overview-info__subtitle {
|
|
132
|
+
font-size: 0.9375rem;
|
|
133
|
+
line-height: 1.6;
|
|
134
|
+
font-weight: 500;
|
|
135
|
+
letter-spacing: 0.75px;
|
|
136
|
+
color: #ffffff;
|
|
137
|
+
}
|
|
138
|
+
.stream-overview-info__pages {
|
|
139
|
+
font-size: 0.625rem;
|
|
140
|
+
line-height: 1;
|
|
141
|
+
font-weight: 500;
|
|
142
|
+
color: #999999;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.stream-overview-pages {
|
|
146
|
+
display: flex;
|
|
147
|
+
flex: 1;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
overflow-y: auto;
|
|
150
|
+
overscroll-behavior: contain;
|
|
151
|
+
scrollbar-color: transparent transparent;
|
|
152
|
+
scrollbar-width: thin;
|
|
153
|
+
--custom-scrollbar-background: transparent;
|
|
154
|
+
padding: 0.9375rem 0.9375rem 0;
|
|
155
|
+
}
|
|
156
|
+
.stream-overview-pages::-webkit-scrollbar {
|
|
157
|
+
width: 3px;
|
|
158
|
+
height: 3px;
|
|
159
|
+
background: var(--custom-scrollbar-background, transparent);
|
|
160
|
+
visibility: hidden;
|
|
161
|
+
}
|
|
162
|
+
.stream-overview-pages::-webkit-scrollbar-thumb {
|
|
163
|
+
background: transparent;
|
|
164
|
+
}
|
|
165
|
+
.stream-overview-pages:hover {
|
|
166
|
+
scrollbar-color: var(--custom-scrollbar-color, #b0b0b0) var(--custom-scrollbar-background, #f1f1f1);
|
|
167
|
+
scrollbar-width: thin;
|
|
168
|
+
}
|
|
169
|
+
.stream-overview-pages:hover::-webkit-scrollbar {
|
|
170
|
+
width: 3px;
|
|
171
|
+
height: 3px;
|
|
172
|
+
background: var(--custom-scrollbar-background, transparent);
|
|
173
|
+
visibility: hidden;
|
|
174
|
+
}
|
|
175
|
+
.stream-overview-pages:hover::-webkit-scrollbar-thumb {
|
|
176
|
+
background: var(--custom-scrollbar-color, #b0b0b0);
|
|
177
|
+
}
|
|
178
|
+
.stream-overview-pages__grid {
|
|
179
|
+
display: flex;
|
|
180
|
+
flex-direction: column;
|
|
181
|
+
align-items: center;
|
|
182
|
+
gap: 2.5rem;
|
|
183
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
184
|
+
}
|
|
185
|
+
@container (width < 576px) {
|
|
186
|
+
.stream-overview-pages__grid {
|
|
187
|
+
display: grid;
|
|
188
|
+
width: 100%;
|
|
189
|
+
grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
|
|
190
|
+
gap: 1.25rem;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
.stream-overview-pages__page {
|
|
194
|
+
width: 6.25rem;
|
|
195
|
+
border-radius: 0.125rem;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
198
|
+
}
|
|
199
|
+
@container (width < 576px) {
|
|
200
|
+
.stream-overview-pages__page {
|
|
201
|
+
width: auto;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
.stream-overview-pages__page--active {
|
|
205
|
+
outline: 2px solid #5a8dec;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.stream-overview-owner {
|
|
209
|
+
display: flex;
|
|
210
|
+
gap: 0.5rem;
|
|
211
|
+
margin-bottom: 0.5rem;
|
|
212
|
+
}
|
|
213
|
+
.stream-overview-owner__image {
|
|
214
|
+
width: 2rem;
|
|
215
|
+
min-width: 2rem;
|
|
216
|
+
max-width: 2rem;
|
|
217
|
+
height: 2rem;
|
|
218
|
+
min-height: 2rem;
|
|
219
|
+
max-height: 2rem;
|
|
220
|
+
--image--rounded--inner--border-color: #111827;
|
|
221
|
+
--image--rounded--outer--border-color: #f3f4f6;
|
|
222
|
+
--image--rounded--outer--border-width: 0.0625rem;
|
|
223
|
+
}
|
|
224
|
+
.stream-overview-owner__body {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
color: #ffffff;
|
|
229
|
+
}
|
|
230
|
+
.stream-overview-owner__name {
|
|
231
|
+
font-size: 0.75rem;
|
|
232
|
+
line-height: 1.2;
|
|
233
|
+
font-weight: 500;
|
|
234
|
+
}
|
|
235
|
+
.stream-overview-owner__meta {
|
|
236
|
+
font-size: 0.625rem;
|
|
237
|
+
line-height: 1.2;
|
|
238
|
+
font-weight: 500;
|
|
239
|
+
}</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StreamPlayerBuffer } from './stream-player-buffer.svelte';
|
|
2
|
+
import { StreamPlayerLocalization } from './stream-player-localization.svelte';
|
|
3
|
+
import type { StreamPlayerModel } from './types';
|
|
4
|
+
import type { StreamPlayerUiManager } from './ui-manager.svelte';
|
|
5
|
+
type Props = {
|
|
6
|
+
model: StreamPlayerModel;
|
|
7
|
+
activePageId: string;
|
|
8
|
+
buffer: StreamPlayerBuffer;
|
|
9
|
+
uiManager: StreamPlayerUiManager;
|
|
10
|
+
localization: StreamPlayerLocalization;
|
|
11
|
+
on: {
|
|
12
|
+
setCurrentItem: (index: number) => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare const StreamOverview: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type StreamOverview = ReturnType<typeof StreamOverview>;
|
|
17
|
+
export default StreamOverview;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IPlayerBuffer } from '../../ui/player';
|
|
2
|
+
import { type StreamPageViewerModel } from '../stream-page-viewer';
|
|
3
|
+
import type { Client } from '@urql/core';
|
|
4
|
+
export declare class StreamPlayerBuffer implements IPlayerBuffer<StreamPageViewerModel> {
|
|
5
|
+
readonly loaded: StreamPageViewerModel[];
|
|
6
|
+
readonly currentIndex: number;
|
|
7
|
+
readonly current: StreamPageViewerModel | null;
|
|
8
|
+
readonly canLoadNext: boolean;
|
|
9
|
+
readonly canLoadPrevious: boolean;
|
|
10
|
+
readonly navigationDisabled: boolean;
|
|
11
|
+
readonly animationDuration = 1200;
|
|
12
|
+
private _pagesLoader;
|
|
13
|
+
private _currentIndex;
|
|
14
|
+
private _loaded;
|
|
15
|
+
constructor(data: {
|
|
16
|
+
streamId: string;
|
|
17
|
+
graphql: Client;
|
|
18
|
+
});
|
|
19
|
+
loadMore: () => Promise<StreamPageViewerModel[]>;
|
|
20
|
+
loadNext: () => Promise<void>;
|
|
21
|
+
loadPrevious: () => Promise<void>;
|
|
22
|
+
setIndex: (index: number) => void;
|
|
23
|
+
reset: () => void;
|
|
24
|
+
private warmUpBuffer;
|
|
25
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ContinuationToken } from '../../core/continuation-token';
|
|
2
|
+
import { CursorDataLoader } from '../../core/data-loaders';
|
|
3
|
+
import { ImageScale } from '../../core/media';
|
|
4
|
+
import { Utils } from '../../core/utils';
|
|
5
|
+
import {} from '../stream-page-viewer';
|
|
6
|
+
import { mapToStreamPageViewerModel } from '../stream-page-viewer/mapper';
|
|
7
|
+
import { GetStreamPagesDocument } from './operations.generated';
|
|
8
|
+
export class StreamPlayerBuffer {
|
|
9
|
+
loaded = $derived.by(() => this._loaded);
|
|
10
|
+
currentIndex = $derived.by(() => this._currentIndex);
|
|
11
|
+
current = $derived(this.currentIndex >= 0 ? this.loaded[this.currentIndex] : null);
|
|
12
|
+
canLoadNext = $derived(this.currentIndex < this.loaded.length - 1);
|
|
13
|
+
canLoadPrevious = $derived(this.currentIndex > 0);
|
|
14
|
+
navigationDisabled = $derived(!this.canLoadNext && !this.canLoadPrevious);
|
|
15
|
+
animationDuration = 1200;
|
|
16
|
+
_pagesLoader;
|
|
17
|
+
_currentIndex = $state(-1);
|
|
18
|
+
_loaded = $state.raw([]);
|
|
19
|
+
constructor(data) {
|
|
20
|
+
const { streamId, graphql } = data;
|
|
21
|
+
this._pagesLoader = new CursorDataLoader({
|
|
22
|
+
loadPage: async (continuationToken) => {
|
|
23
|
+
const payload = await graphql
|
|
24
|
+
.query(GetStreamPagesDocument, {
|
|
25
|
+
input: {
|
|
26
|
+
limit: 10,
|
|
27
|
+
continuationToken,
|
|
28
|
+
filter: {
|
|
29
|
+
streamId
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
image_scale: ImageScale.OriginalEncoded
|
|
33
|
+
})
|
|
34
|
+
.toPromise();
|
|
35
|
+
const data = payload.data?.streamPages;
|
|
36
|
+
if (!data) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const items = data.items.map(mapToStreamPageViewerModel);
|
|
40
|
+
this._loaded = [...this._loaded, ...items];
|
|
41
|
+
return {
|
|
42
|
+
items: items,
|
|
43
|
+
continuationToken: ContinuationToken.fromPayload(data.continuationToken)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
this.warmUpBuffer();
|
|
48
|
+
this.loadNext = Utils.throttle(this.loadNext, this.animationDuration);
|
|
49
|
+
this.loadPrevious = Utils.throttle(this.loadPrevious, this.animationDuration);
|
|
50
|
+
}
|
|
51
|
+
loadMore = () => this._pagesLoader.loadMore();
|
|
52
|
+
loadNext = async () => {
|
|
53
|
+
if (!this.canLoadNext) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
++this._currentIndex;
|
|
57
|
+
this.warmUpBuffer();
|
|
58
|
+
};
|
|
59
|
+
loadPrevious = async () => {
|
|
60
|
+
if (!this.canLoadPrevious) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
--this._currentIndex;
|
|
64
|
+
};
|
|
65
|
+
setIndex = (index) => {
|
|
66
|
+
this._currentIndex = index;
|
|
67
|
+
this.warmUpBuffer();
|
|
68
|
+
};
|
|
69
|
+
reset = () => {
|
|
70
|
+
this._pagesLoader.reset();
|
|
71
|
+
};
|
|
72
|
+
warmUpBuffer = async () => {
|
|
73
|
+
const bufferSize = 5;
|
|
74
|
+
if (this.loaded.length >= this.currentIndex + bufferSize) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
await this._pagesLoader.loadMore();
|
|
78
|
+
if (this._currentIndex < 0) {
|
|
79
|
+
if (this.loaded.length > 0) {
|
|
80
|
+
this._currentIndex = 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
2
|
+
export interface IStreamPlayerLocalization {
|
|
3
|
+
productsSection?: string;
|
|
4
|
+
offersSection?: string;
|
|
5
|
+
streamNotFound?: string;
|
|
6
|
+
viewsCount?: (count: number) => string;
|
|
7
|
+
pagesCount?: (count: number) => string;
|
|
8
|
+
timeAgoLocalization?: ITimeAgoLocalization;
|
|
9
|
+
}
|
|
10
|
+
export declare class StreamPlayerLocalization {
|
|
11
|
+
streamNotFound: string;
|
|
12
|
+
productsSection: string;
|
|
13
|
+
offersSection: string;
|
|
14
|
+
viewsCount: (count: number) => string;
|
|
15
|
+
pagesCount: (count: number) => string;
|
|
16
|
+
timeAgoLocalization: ITimeAgoLocalization | undefined;
|
|
17
|
+
constructor(init?: IStreamPlayerLocalization);
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class StreamPlayerLocalization {
|
|
2
|
+
streamNotFound = $state('Stream not found');
|
|
3
|
+
productsSection = $state('Products');
|
|
4
|
+
offersSection = $state('Offers');
|
|
5
|
+
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
6
|
+
pagesCount = $state((count) => (count === 1 ? '1 page' : `${count} pages`));
|
|
7
|
+
timeAgoLocalization = $state(undefined);
|
|
8
|
+
constructor(init) {
|
|
9
|
+
if (!init) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (init.streamNotFound !== undefined) {
|
|
13
|
+
this.streamNotFound = init.streamNotFound;
|
|
14
|
+
}
|
|
15
|
+
if (init.productsSection !== undefined) {
|
|
16
|
+
this.productsSection = init.productsSection;
|
|
17
|
+
}
|
|
18
|
+
if (init.offersSection !== undefined) {
|
|
19
|
+
this.offersSection = init.offersSection;
|
|
20
|
+
}
|
|
21
|
+
if (init.viewsCount !== undefined) {
|
|
22
|
+
this.viewsCount = init.viewsCount;
|
|
23
|
+
}
|
|
24
|
+
if (init.pagesCount !== undefined) {
|
|
25
|
+
this.pagesCount = init.pagesCount;
|
|
26
|
+
}
|
|
27
|
+
this.timeAgoLocalization = init.timeAgoLocalization;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class StreamPlayerUiManager {
|
|
2
|
+
overviewCollapsed: boolean;
|
|
3
|
+
shortVideoDetailsCollapsed: boolean;
|
|
4
|
+
globalCssVariables: string;
|
|
5
|
+
isMobileView: boolean;
|
|
6
|
+
showShortVideoOverlay: boolean;
|
|
7
|
+
private readonly actionButtonSize;
|
|
8
|
+
private readonly navigationButtonSize;
|
|
9
|
+
private readonly controlsOffsetHorizontal;
|
|
10
|
+
private readonly controlsOffsetVertical;
|
|
11
|
+
private viewTotalWidth;
|
|
12
|
+
private mainViewColumnWidth;
|
|
13
|
+
updateDimensions: (dimensions: {
|
|
14
|
+
viewTotalWidth: number;
|
|
15
|
+
mainViewColumnWidth: number;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class StreamPlayerUiManager {
|
|
2
|
+
overviewCollapsed = $state(false);
|
|
3
|
+
shortVideoDetailsCollapsed = $state(true);
|
|
4
|
+
globalCssVariables = $derived.by(() => {
|
|
5
|
+
const values = [
|
|
6
|
+
`--stream-player--action-button--size: ${this.actionButtonSize}px`,
|
|
7
|
+
`--stream-player--navigation-button--size: ${this.navigationButtonSize}px`,
|
|
8
|
+
`--stream-player--controls--offset-horizontal: ${this.controlsOffsetHorizontal}px`,
|
|
9
|
+
`--stream-player--controls--offset-vertical: ${this.controlsOffsetVertical}px`,
|
|
10
|
+
`--stream-player--sidebar--available-space: ${(this.viewTotalWidth - this.mainViewColumnWidth) / 2}px`
|
|
11
|
+
];
|
|
12
|
+
return values.join(';');
|
|
13
|
+
});
|
|
14
|
+
isMobileView = $derived.by(() => this.viewTotalWidth <= 576);
|
|
15
|
+
showShortVideoOverlay = $derived.by(() => (this.viewTotalWidth - this.mainViewColumnWidth) / 2 <= 70);
|
|
16
|
+
actionButtonSize = 30;
|
|
17
|
+
navigationButtonSize = 40;
|
|
18
|
+
controlsOffsetHorizontal = 15;
|
|
19
|
+
controlsOffsetVertical = 10;
|
|
20
|
+
viewTotalWidth = $state(0);
|
|
21
|
+
mainViewColumnWidth = $state(0);
|
|
22
|
+
updateDimensions = (dimensions) => {
|
|
23
|
+
this.viewTotalWidth = dimensions.viewTotalWidth;
|
|
24
|
+
this.mainViewColumnWidth = dimensions.mainViewColumnWidth;
|
|
25
|
+
};
|
|
26
|
+
}
|