@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,400 @@
|
|
|
1
|
+
export const StreamPageViewerPayloadFragmentDoc = {
|
|
2
|
+
kind: 'Document',
|
|
3
|
+
definitions: [
|
|
4
|
+
{
|
|
5
|
+
kind: 'FragmentDefinition',
|
|
6
|
+
name: { kind: 'Name', value: 'StreamPageViewerPayloadFragment' },
|
|
7
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'StreamPage' } },
|
|
8
|
+
selectionSet: {
|
|
9
|
+
kind: 'SelectionSet',
|
|
10
|
+
selections: [
|
|
11
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
12
|
+
{
|
|
13
|
+
kind: 'Field',
|
|
14
|
+
name: { kind: 'Name', value: 'cover' },
|
|
15
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
16
|
+
},
|
|
17
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
|
|
18
|
+
{
|
|
19
|
+
kind: 'Field',
|
|
20
|
+
name: { kind: 'Name', value: 'components' },
|
|
21
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'StreamComponentPayloadFragment' } }] }
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
kind: 'Field',
|
|
25
|
+
name: { kind: 'Name', value: 'slots' },
|
|
26
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'StreamComponentSlotFragment' } }] }
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
kind: 'FragmentDefinition',
|
|
33
|
+
name: { kind: 'Name', value: 'ProductCardPayloadFragment' },
|
|
34
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
|
|
35
|
+
selectionSet: {
|
|
36
|
+
kind: 'SelectionSet',
|
|
37
|
+
selections: [
|
|
38
|
+
{
|
|
39
|
+
kind: 'Field',
|
|
40
|
+
name: { kind: 'Name', value: 'media' },
|
|
41
|
+
selectionSet: {
|
|
42
|
+
kind: 'SelectionSet',
|
|
43
|
+
selections: [
|
|
44
|
+
{
|
|
45
|
+
kind: 'Field',
|
|
46
|
+
name: { kind: 'Name', value: 'url' },
|
|
47
|
+
arguments: [
|
|
48
|
+
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
kind: 'Field',
|
|
53
|
+
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
54
|
+
arguments: [
|
|
55
|
+
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
63
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
64
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
65
|
+
{
|
|
66
|
+
kind: 'Field',
|
|
67
|
+
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
68
|
+
selectionSet: {
|
|
69
|
+
kind: 'SelectionSet',
|
|
70
|
+
selections: [
|
|
71
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
72
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
73
|
+
{
|
|
74
|
+
kind: 'Field',
|
|
75
|
+
name: { kind: 'Name', value: 'productSalePrices' },
|
|
76
|
+
selectionSet: {
|
|
77
|
+
kind: 'SelectionSet',
|
|
78
|
+
selections: [
|
|
79
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
80
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
|
|
81
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
kind: 'FragmentDefinition',
|
|
93
|
+
name: { kind: 'Name', value: 'AdViewPayloadFragment' },
|
|
94
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Ad' } },
|
|
95
|
+
selectionSet: {
|
|
96
|
+
kind: 'SelectionSet',
|
|
97
|
+
selections: [
|
|
98
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
99
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
100
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
101
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'buttonText' } },
|
|
102
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'buttonUrl' } },
|
|
103
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'openLinkInNewWindow' } },
|
|
104
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
105
|
+
{
|
|
106
|
+
kind: 'Field',
|
|
107
|
+
name: { kind: 'Name', value: 'media' },
|
|
108
|
+
selectionSet: {
|
|
109
|
+
kind: 'SelectionSet',
|
|
110
|
+
selections: [
|
|
111
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
112
|
+
{
|
|
113
|
+
kind: 'Field',
|
|
114
|
+
name: { kind: 'Name', value: 'url' },
|
|
115
|
+
arguments: [
|
|
116
|
+
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
kind: 'Field',
|
|
121
|
+
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
122
|
+
arguments: [
|
|
123
|
+
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
kind: 'FragmentDefinition',
|
|
134
|
+
name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
|
|
135
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
136
|
+
selectionSet: {
|
|
137
|
+
kind: 'SelectionSet',
|
|
138
|
+
selections: [
|
|
139
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
140
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
|
|
141
|
+
{
|
|
142
|
+
kind: 'Field',
|
|
143
|
+
name: { kind: 'Name', value: 'postHeading' },
|
|
144
|
+
selectionSet: {
|
|
145
|
+
kind: 'SelectionSet',
|
|
146
|
+
selections: [
|
|
147
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'sourceImage' } },
|
|
148
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'sourceName' } },
|
|
149
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'postDisplayDate' } },
|
|
150
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'postViewsCount' } }
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
kind: 'Field',
|
|
156
|
+
name: { kind: 'Name', value: 'allProducts' },
|
|
157
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductCardPayloadFragment' } }] }
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
kind: 'Field',
|
|
161
|
+
name: { kind: 'Name', value: 'ad' },
|
|
162
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'AdViewPayloadFragment' } }] }
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
kind: 'Field',
|
|
166
|
+
name: { kind: 'Name', value: 'postData' },
|
|
167
|
+
selectionSet: {
|
|
168
|
+
kind: 'SelectionSet',
|
|
169
|
+
selections: [
|
|
170
|
+
{
|
|
171
|
+
kind: 'Field',
|
|
172
|
+
name: { kind: 'Name', value: 'media' },
|
|
173
|
+
selectionSet: {
|
|
174
|
+
kind: 'SelectionSet',
|
|
175
|
+
selections: [
|
|
176
|
+
{
|
|
177
|
+
kind: 'Field',
|
|
178
|
+
name: { kind: 'Name', value: 'url' },
|
|
179
|
+
arguments: [
|
|
180
|
+
{
|
|
181
|
+
kind: 'Argument',
|
|
182
|
+
name: { kind: 'Name', value: 'scale' },
|
|
183
|
+
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
kind: 'Field',
|
|
189
|
+
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
190
|
+
arguments: [
|
|
191
|
+
{
|
|
192
|
+
kind: 'Argument',
|
|
193
|
+
name: { kind: 'Name', value: 'scale' },
|
|
194
|
+
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
kind: 'Field',
|
|
204
|
+
name: { kind: 'Name', value: 'shortVideoData' },
|
|
205
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
kind: 'FragmentDefinition',
|
|
215
|
+
name: { kind: 'Name', value: 'ShortVideoStreamComponentDataFragment' },
|
|
216
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
217
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } }] }
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
kind: 'FragmentDefinition',
|
|
221
|
+
name: { kind: 'Name', value: 'ShortVideoStreamComponentParamsFragment' },
|
|
222
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ShortVideoStreamComponentParams' } },
|
|
223
|
+
selectionSet: {
|
|
224
|
+
kind: 'SelectionSet',
|
|
225
|
+
selections: [
|
|
226
|
+
{
|
|
227
|
+
kind: 'Field',
|
|
228
|
+
name: { kind: 'Name', value: 'data' },
|
|
229
|
+
selectionSet: {
|
|
230
|
+
kind: 'SelectionSet',
|
|
231
|
+
selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoStreamComponentDataFragment' } }]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
kind: 'FragmentDefinition',
|
|
239
|
+
name: { kind: 'Name', value: 'ImagesStreamComponentParamsFragment' },
|
|
240
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ImagesStreamComponentParams' } },
|
|
241
|
+
selectionSet: {
|
|
242
|
+
kind: 'SelectionSet',
|
|
243
|
+
selections: [
|
|
244
|
+
{
|
|
245
|
+
kind: 'Field',
|
|
246
|
+
name: { kind: 'Name', value: 'images' },
|
|
247
|
+
selectionSet: {
|
|
248
|
+
kind: 'SelectionSet',
|
|
249
|
+
selections: [
|
|
250
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
251
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'url' } }
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'mode' } }
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
kind: 'FragmentDefinition',
|
|
261
|
+
name: { kind: 'Name', value: 'ProductStreamComponentDataFragment' },
|
|
262
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
|
|
263
|
+
selectionSet: {
|
|
264
|
+
kind: 'SelectionSet',
|
|
265
|
+
selections: [
|
|
266
|
+
{
|
|
267
|
+
kind: 'Field',
|
|
268
|
+
name: { kind: 'Name', value: 'media' },
|
|
269
|
+
selectionSet: {
|
|
270
|
+
kind: 'SelectionSet',
|
|
271
|
+
selections: [
|
|
272
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'url' } },
|
|
273
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
|
|
274
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
279
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
280
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
281
|
+
{
|
|
282
|
+
kind: 'Field',
|
|
283
|
+
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
284
|
+
selectionSet: {
|
|
285
|
+
kind: 'SelectionSet',
|
|
286
|
+
selections: [
|
|
287
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
288
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
289
|
+
{
|
|
290
|
+
kind: 'Field',
|
|
291
|
+
name: { kind: 'Name', value: 'productSalePrices' },
|
|
292
|
+
selectionSet: {
|
|
293
|
+
kind: 'SelectionSet',
|
|
294
|
+
selections: [
|
|
295
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
296
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
|
|
297
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
kind: 'FragmentDefinition',
|
|
309
|
+
name: { kind: 'Name', value: 'ProductStreamComponentParamsFragment' },
|
|
310
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ProductStreamComponentParams' } },
|
|
311
|
+
selectionSet: {
|
|
312
|
+
kind: 'SelectionSet',
|
|
313
|
+
selections: [
|
|
314
|
+
{
|
|
315
|
+
kind: 'Field',
|
|
316
|
+
name: { kind: 'Name', value: 'data' },
|
|
317
|
+
selectionSet: {
|
|
318
|
+
kind: 'SelectionSet',
|
|
319
|
+
selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductStreamComponentDataFragment' } }]
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
kind: 'FragmentDefinition',
|
|
327
|
+
name: { kind: 'Name', value: 'StreamComponentPayloadFragment' },
|
|
328
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'StreamComponent' } },
|
|
329
|
+
selectionSet: {
|
|
330
|
+
kind: 'SelectionSet',
|
|
331
|
+
selections: [
|
|
332
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'slotId' } },
|
|
333
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
334
|
+
{
|
|
335
|
+
kind: 'Field',
|
|
336
|
+
name: { kind: 'Name', value: 'params' },
|
|
337
|
+
selectionSet: {
|
|
338
|
+
kind: 'SelectionSet',
|
|
339
|
+
selections: [
|
|
340
|
+
{
|
|
341
|
+
kind: 'Field',
|
|
342
|
+
name: { kind: 'Name', value: 'shortVideo' },
|
|
343
|
+
selectionSet: {
|
|
344
|
+
kind: 'SelectionSet',
|
|
345
|
+
selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoStreamComponentParamsFragment' } }]
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
kind: 'Field',
|
|
350
|
+
name: { kind: 'Name', value: 'images' },
|
|
351
|
+
selectionSet: {
|
|
352
|
+
kind: 'SelectionSet',
|
|
353
|
+
selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ImagesStreamComponentParamsFragment' } }]
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
kind: 'Field',
|
|
358
|
+
name: { kind: 'Name', value: 'product' },
|
|
359
|
+
selectionSet: {
|
|
360
|
+
kind: 'SelectionSet',
|
|
361
|
+
selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductStreamComponentParamsFragment' } }]
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
kind: 'FragmentDefinition',
|
|
372
|
+
name: { kind: 'Name', value: 'StreamComponentSlotFragment' },
|
|
373
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'StreamComponentSlot' } },
|
|
374
|
+
selectionSet: {
|
|
375
|
+
kind: 'SelectionSet',
|
|
376
|
+
selections: [
|
|
377
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
378
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'allowedComponents' } },
|
|
379
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'top' } },
|
|
380
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'left' } },
|
|
381
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'width' } },
|
|
382
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'height' } },
|
|
383
|
+
{
|
|
384
|
+
kind: 'Field',
|
|
385
|
+
name: { kind: 'Name', value: 'styles' },
|
|
386
|
+
selectionSet: {
|
|
387
|
+
kind: 'SelectionSet',
|
|
388
|
+
selections: [
|
|
389
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'paddingTop' } },
|
|
390
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'paddingRight' } },
|
|
391
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'paddingBottom' } },
|
|
392
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'paddingLeft' } }
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
2
|
+
export interface IStreamPageViewerLocalization {
|
|
3
|
+
viewsCount?: (count: number) => string;
|
|
4
|
+
timeAgoLocalization?: ITimeAgoLocalization;
|
|
5
|
+
}
|
|
6
|
+
export declare class StreamPageViewerLocalization {
|
|
7
|
+
viewsCount: (count: number) => string;
|
|
8
|
+
timeAgoLocalization: ITimeAgoLocalization | undefined;
|
|
9
|
+
constructor(init?: IStreamPageViewerLocalization);
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class StreamPageViewerLocalization {
|
|
2
|
+
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
3
|
+
timeAgoLocalization = $state(undefined);
|
|
4
|
+
constructor(init) {
|
|
5
|
+
if (!init) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (init.viewsCount !== undefined) {
|
|
9
|
+
this.viewsCount = init.viewsCount;
|
|
10
|
+
}
|
|
11
|
+
this.timeAgoLocalization = init.timeAgoLocalization;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ShortVideoStreamComponentData, StreamComponentModel } from '../components';
|
|
2
|
+
import type { StreamComponentSlotModel } from '../slots';
|
|
3
|
+
export type StreamPageViewerModel = GeneralStreamPageViewerModel | ShortVideoStreamPageViewerModel;
|
|
4
|
+
export type ShortVideoStreamPageViewerModel = {
|
|
5
|
+
type: 'short-video';
|
|
6
|
+
id: string;
|
|
7
|
+
cover: string | null;
|
|
8
|
+
name: string | null;
|
|
9
|
+
shortVideo: ShortVideoStreamComponentData;
|
|
10
|
+
};
|
|
11
|
+
export type GeneralStreamPageViewerModel = {
|
|
12
|
+
type: 'general';
|
|
13
|
+
id: string;
|
|
14
|
+
cover: string | null;
|
|
15
|
+
name: string | null;
|
|
16
|
+
components: StreamComponentModel[];
|
|
17
|
+
slots: StreamComponentSlotModel[];
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script lang="ts">let { children, on } = $props();
|
|
2
|
+
export {};
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<button type="button" class="action-button" onclick={() => on.click()}>
|
|
6
|
+
{@render children()}
|
|
7
|
+
</button>
|
|
8
|
+
|
|
9
|
+
<style>@keyframes fadeIn {
|
|
10
|
+
0% {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
}
|
|
13
|
+
50% {
|
|
14
|
+
opacity: 0.4;
|
|
15
|
+
}
|
|
16
|
+
100% {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.action-button {
|
|
21
|
+
--_stream-player--action-button--size: var(--stream-player--action-button--size);
|
|
22
|
+
--_action-button--background: var(--action-button-background, #1c1c1c);
|
|
23
|
+
width: var(--_stream-player--action-button--size);
|
|
24
|
+
min-width: var(--_stream-player--action-button--size);
|
|
25
|
+
max-width: var(--_stream-player--action-button--size);
|
|
26
|
+
height: var(--_stream-player--action-button--size);
|
|
27
|
+
min-height: var(--_stream-player--action-button--size);
|
|
28
|
+
max-height: var(--_stream-player--action-button--size);
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
line-height: 0;
|
|
33
|
+
background: var(--_action-button--background);
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
--icon--size: 1.25rem;
|
|
36
|
+
z-index: 1;
|
|
37
|
+
color: #ffffff;
|
|
38
|
+
}</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type Props = {
|
|
3
|
+
on: {
|
|
4
|
+
click: () => void;
|
|
5
|
+
};
|
|
6
|
+
children: Snippet;
|
|
7
|
+
};
|
|
8
|
+
declare const ActionButton: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type ActionButton = ReturnType<typeof ActionButton>;
|
|
10
|
+
export default ActionButton;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<script lang="ts">var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { toastrWarning } from '../../core/toastr';
|
|
11
|
+
import { PlayerSlider } from '../../ui/player';
|
|
12
|
+
import { ShortVideosViewer } from '../../short-videos/short-video-viewer';
|
|
13
|
+
import { StreamPageViewer } from '../stream-page-viewer';
|
|
14
|
+
import { Loading } from '../../ui/loading';
|
|
15
|
+
import { SpotlightLayout } from '../../ui/spotlight-layout';
|
|
16
|
+
import { default as Controls } from './controls.svelte';
|
|
17
|
+
import { mapStreamPlayerModel } from './mapper';
|
|
18
|
+
import { GetStreamDocument } from './operations.generated';
|
|
19
|
+
import { default as Overview } from './stream-overview.svelte';
|
|
20
|
+
import { StreamPlayerBuffer } from './stream-player-buffer.svelte';
|
|
21
|
+
import { StreamPlayerLocalization } from './stream-player-localization.svelte';
|
|
22
|
+
import { StreamPlayerUiManager } from './ui-manager.svelte';
|
|
23
|
+
import { onDestroy, onMount } from 'svelte';
|
|
24
|
+
let { streamId, graphql, localization: localizationInit, on } = $props();
|
|
25
|
+
const localization = $derived(new StreamPlayerLocalization(localizationInit));
|
|
26
|
+
let model = $state(null);
|
|
27
|
+
let buffer = $state.raw(null);
|
|
28
|
+
let loading = $state(true);
|
|
29
|
+
let activePageId = $derived.by(() => { var _a, _b; return (_b = (_a = buffer === null || buffer === void 0 ? void 0 : buffer.current) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : ''; });
|
|
30
|
+
const uiManager = new StreamPlayerUiManager();
|
|
31
|
+
onMount(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
uiManager.overviewCollapsed = window && window.innerWidth < window.innerHeight;
|
|
34
|
+
try {
|
|
35
|
+
const streamPayload = yield graphql.query(GetStreamDocument, { id: streamId }).toPromise();
|
|
36
|
+
if (!((_a = streamPayload.data) === null || _a === void 0 ? void 0 : _a.stream)) {
|
|
37
|
+
toastrWarning(localization.streamNotFound);
|
|
38
|
+
(_b = on === null || on === void 0 ? void 0 : on.closePlayer) === null || _b === void 0 ? void 0 : _b.call(on);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
// start tracking the stream
|
|
42
|
+
model = mapStreamPlayerModel(streamPayload.data.stream);
|
|
43
|
+
buffer = new StreamPlayerBuffer({ graphql, streamId });
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
loading = false;
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
onDestroy(() => {
|
|
50
|
+
// end tracking the stream
|
|
51
|
+
});
|
|
52
|
+
const handleChangePage = (index) => {
|
|
53
|
+
if (!buffer) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
buffer.setIndex(index);
|
|
57
|
+
if (uiManager.isMobileView) {
|
|
58
|
+
uiManager.overviewCollapsed = true;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const handleDimensionsChanged = (dimensions) => {
|
|
62
|
+
uiManager.updateDimensions({
|
|
63
|
+
mainViewColumnWidth: dimensions.mainSceneWidth,
|
|
64
|
+
viewTotalWidth: dimensions.totalWidth
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<div class="stream-player-container">
|
|
70
|
+
{#if loading}
|
|
71
|
+
<Loading positionAbsoluteCenter={true} timeout={600} />
|
|
72
|
+
{/if}
|
|
73
|
+
<div class="stream-player" style={uiManager.globalCssVariables}>
|
|
74
|
+
{#if buffer && model}
|
|
75
|
+
<SpotlightLayout ratio={9 / 16} on={{ dimensionsChanged: handleDimensionsChanged }}>
|
|
76
|
+
<div class="stream-player__content">
|
|
77
|
+
<PlayerSlider buffer={buffer}>
|
|
78
|
+
{#snippet children({ item })}
|
|
79
|
+
{#if item.type === 'general'}
|
|
80
|
+
<StreamPageViewer page={item} />
|
|
81
|
+
{:else if item.type === 'short-video'}
|
|
82
|
+
<ShortVideosViewer model={item.shortVideo} autoplay="on-appearance" showAttachments={uiManager.showShortVideoOverlay} />
|
|
83
|
+
{/if}
|
|
84
|
+
{/snippet}
|
|
85
|
+
</PlayerSlider>
|
|
86
|
+
</div>
|
|
87
|
+
</SpotlightLayout>
|
|
88
|
+
{#if model}
|
|
89
|
+
<Overview
|
|
90
|
+
model={model}
|
|
91
|
+
buffer={buffer}
|
|
92
|
+
activePageId={activePageId}
|
|
93
|
+
uiManager={uiManager}
|
|
94
|
+
localization={localization}
|
|
95
|
+
on={{ setCurrentItem: handleChangePage }} />
|
|
96
|
+
{/if}
|
|
97
|
+
<Controls buffer={buffer} uiManager={uiManager} localization={localization} on={{ closePlayer: () => on?.closePlayer?.() }} />
|
|
98
|
+
{/if}
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<style>@keyframes fadeIn {
|
|
103
|
+
0% {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
}
|
|
106
|
+
50% {
|
|
107
|
+
opacity: 0.4;
|
|
108
|
+
}
|
|
109
|
+
100% {
|
|
110
|
+
opacity: 1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
.stream-player-container {
|
|
114
|
+
width: 100%;
|
|
115
|
+
min-width: 100%;
|
|
116
|
+
max-width: 100%;
|
|
117
|
+
height: 100%;
|
|
118
|
+
min-height: 100%;
|
|
119
|
+
max-height: 100%;
|
|
120
|
+
container-type: inline-size;
|
|
121
|
+
display: flex;
|
|
122
|
+
position: relative;
|
|
123
|
+
background: #000000;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.stream-player {
|
|
127
|
+
display: flex;
|
|
128
|
+
flex: 1;
|
|
129
|
+
padding: 0.625rem 0;
|
|
130
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
131
|
+
}
|
|
132
|
+
@container (width < 576px) {
|
|
133
|
+
.stream-player {
|
|
134
|
+
padding: 0;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
.stream-player__content {
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 100%;
|
|
140
|
+
--short-video-viewer--actions-panel--bottom: 5rem;
|
|
141
|
+
}</style>
|