@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.
- package/dist/ads/ad-card/cmp.ad-card.svelte +18 -29
- package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +0 -2
- package/dist/core/graphql.d.ts +1 -1
- package/dist/core/graphql.js +4 -9
- package/dist/core/media/index.d.ts +0 -2
- package/dist/core/media/index.js +0 -2
- package/dist/external-api/data-providers/internal-short-video-player-items-provider.d.ts +1 -1
- package/dist/external-api/data-providers/internal-short-video-player-items-provider.js +2 -2
- package/dist/external-api/data-providers/internal-streams-player-data-provider.js +2 -2
- package/dist/external-api/media-page/index.d.ts +1 -1
- package/dist/external-api/short-videos-player/index.d.ts +1 -1
- package/dist/external-api/streams-player/index.d.ts +1 -1
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte +4 -4
- package/dist/media-center/media-center/discover/community-features-localization.d.ts +4 -6
- package/dist/media-center/media-center/discover/community-features-localization.js +12 -10
- package/dist/media-center/media-center/discover/community-features.svelte +10 -21
- package/dist/media-center/media-center/discover/community-features.svelte.d.ts +0 -2
- package/dist/media-center/media-center/discover/discover-header.svelte +14 -25
- package/dist/media-center/media-center/discover/discover-view-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/discover/discover-view-handler.svelte.js +1 -1
- package/dist/media-center/media-center/discover/discover-view-localization.d.ts +2 -5
- package/dist/media-center/media-center/discover/discover-view-localization.js +6 -8
- package/dist/media-center/media-center/discover/discover-view.svelte +6 -19
- package/dist/media-center/media-center/footer/media-center-footer.svelte +7 -18
- package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/header/media-center-header-localization.d.ts +2 -4
- package/dist/media-center/media-center/header/media-center-header-localization.js +12 -12
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte +8 -19
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte.d.ts +0 -2
- package/dist/media-center/media-center/header/media-center-header.svelte +12 -23
- package/dist/media-center/media-center/media-center-context.svelte.d.ts +1 -1
- package/dist/media-center/media-center/media-center-context.svelte.js +1 -1
- package/dist/media-center/media-center/media-center-settings.svelte.d.ts +1 -1
- package/dist/media-center/media-center/media-center-view.svelte +4 -15
- package/dist/media-center/media-center/menu/category-following-wrapper.svelte +5 -16
- package/dist/media-center/media-center/menu/menu-localization.d.ts +5 -8
- package/dist/media-center/media-center/menu/menu-localization.js +15 -14
- package/dist/media-center/media-center/menu/menu.svelte +15 -26
- package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +6 -17
- package/dist/media-center/media-center/moments/moments-feed-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/moments/moments-feed-handler.svelte.js +1 -1
- package/dist/media-center/media-center/moments/moments-state.svelte.d.ts +1 -1
- package/dist/media-center/media-center/posts-feed/feed-providers-generator.d.ts +1 -1
- package/dist/media-center/media-center/posts-feed/feed-providers-generator.js +2 -2
- package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.d.ts +2 -2
- package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.js +2 -2
- package/dist/media-center/media-center/streams-feed/feed-providers-generator.js +2 -2
- package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.js +1 -1
- package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +1 -12
- package/dist/media-center/media-center/types.d.ts +2 -2
- package/dist/media-page/index.d.ts +2 -2
- package/dist/posts/attachments/cmp.attachments.svelte +2 -15
- package/dist/posts/attachments/cmp.attachments.svelte.d.ts +0 -2
- package/dist/posts/controls/post-actions-handler.svelte.d.ts +1 -1
- package/dist/posts/controls/post-actions-handler.svelte.js +2 -3
- package/dist/posts/post-viewer/attachments-horizontal.svelte +10 -21
- package/dist/posts/post-viewer/cmp.post-viewer.svelte +7 -18
- package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +1 -3
- package/dist/posts/post-viewer/heading.svelte +8 -20
- package/dist/posts/post-viewer/media/post-media.svelte +11 -22
- package/dist/posts/post-viewer/media/post-media.svelte.d.ts +0 -2
- package/dist/posts/post-viewer/post-texts.svelte +6 -17
- package/dist/posts/post-viewer/post-viewer-localization.d.ts +2 -5
- package/dist/posts/post-viewer/post-viewer-localization.js +6 -8
- package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +2 -2
- package/dist/posts/posts-player/index.d.ts +1 -1
- package/dist/posts/posts-player/posts-player-proxy.svelte +5 -1
- package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +2 -2
- package/dist/posts/posts-player/posts-player-view.svelte +34 -30
- package/dist/posts/posts-player/types.d.ts +2 -2
- package/dist/products/price-helper.js +1 -1
- package/dist/products/product-card/cmp.product-card.svelte +16 -30
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +0 -2
- package/dist/products/product-card/product-card-localization.d.ts +1 -3
- package/dist/products/product-card/product-card-localization.js +3 -4
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +19 -35
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte.d.ts +0 -2
- package/dist/short-videos/short-video-card/localization.d.ts +1 -3
- package/dist/short-videos/short-video-card/localization.js +3 -4
- package/dist/streams/layout/cmp.layout.svelte +3 -14
- package/dist/streams/layout/cmp.slot-content.svelte +5 -16
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +0 -2
- package/dist/streams/layout/cmp.slot.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +2 -3
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +3 -14
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte +4 -9
- package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +1 -4
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +3 -14
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +3 -14
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +7 -8
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +5 -5
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +5 -5
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/price-element-view.svelte +7 -18
- package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +2 -5
- package/dist/streams/layout/element-views/price-stream-element-localization.js +6 -8
- package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +1 -3
- package/dist/streams/layout/element-views/stock-stream-element-localization.js +3 -4
- package/dist/streams/layout/index.d.ts +1 -1
- package/dist/streams/layout/index.js +1 -1
- package/dist/streams/layout/serializer.svelte.js +5 -6
- package/dist/streams/layout/styles-transformer.d.ts +3 -3
- package/dist/streams/layout/styles-transformer.js +1 -1
- package/dist/streams/stream-card/cmp.stream-card.svelte +6 -20
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +6 -19
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +1 -3
- package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +1 -1
- package/dist/streams/streams-player/index.d.ts +1 -1
- package/dist/streams/streams-player/stream-overview.svelte +5 -16
- package/dist/streams/streams-player/stream-player-localization.d.ts +1 -4
- package/dist/streams/streams-player/stream-player-localization.js +3 -6
- package/dist/streams/streams-player/streams-player-buffer.svelte.d.ts +1 -1
- package/dist/streams/streams-player/streams-player-buffer.svelte.js +1 -1
- package/dist/streams/streams-player/streams-player-proxy.svelte +5 -1
- package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +1 -1
- package/dist/streams/streams-player/streams-player-view.svelte +71 -79
- package/dist/streams/streams-player/types.d.ts +1 -1
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +5 -16
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +2 -16
- package/dist/ui/media-items-gallery/types.js +2 -1
- package/dist/ui/player/player/cmp.player.svelte +19 -28
- package/dist/ui/player/player/cmp.player.svelte.d.ts +1 -1
- package/dist/ui/player/player/controls-and-attachments.svelte +16 -32
- package/dist/ui/player/player/controls-and-attachments.svelte.d.ts +1 -1
- package/dist/ui/player/player/overview-panel.svelte +27 -36
- package/dist/ui/player/player/player-config.svelte.d.ts +4 -4
- package/dist/ui/player/player/player-config.svelte.js +3 -3
- package/dist/ui/player/player/player-settings.svelte.d.ts +1 -1
- package/dist/ui/player/progress/cmp.chunks-progress.svelte +1 -12
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +9 -14
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte.d.ts +2 -0
- package/dist/ui/shadow-dom/colors.scss +2 -2
- package/dist/ui/shadow-dom/shadow-root-service.js +2 -2
- package/package.json +13 -25
- package/dist/core/actions/horizontal-wheel-scroll.d.ts +0 -5
- package/dist/core/actions/horizontal-wheel-scroll.js +0 -20
- package/dist/core/actions/index.d.ts +0 -2
- package/dist/core/actions/index.js +0 -2
- package/dist/core/actions/swallow-touch.d.ts +0 -2
- package/dist/core/actions/swallow-touch.js +0 -17
- package/dist/core/browser.d.ts +0 -1
- package/dist/core/browser.js +0 -1
- package/dist/core/continuation-token.d.ts +0 -11
- package/dist/core/continuation-token.js +0 -35
- package/dist/core/cursor-result.d.ts +0 -9
- package/dist/core/cursor-result.js +0 -1
- package/dist/core/data-loaders/cursor-data-loader.svelte.d.ts +0 -14
- package/dist/core/data-loaders/cursor-data-loader.svelte.js +0 -35
- package/dist/core/data-loaders/data-loader.d.ts +0 -4
- package/dist/core/data-loaders/data-loader.js +0 -1
- package/dist/core/data-loaders/index.d.ts +0 -2
- package/dist/core/data-loaders/index.js +0 -1
- package/dist/core/deferred.d.ts +0 -6
- package/dist/core/deferred.js +0 -13
- package/dist/core/document.event-handlers.d.ts +0 -2
- package/dist/core/document.event-handlers.js +0 -8
- package/dist/core/image-preloader.d.ts +0 -1
- package/dist/core/image-preloader.js +0 -10
- package/dist/core/locale.d.ts +0 -4
- package/dist/core/locale.js +0 -1
- package/dist/core/media/image-helper.d.ts +0 -10
- package/dist/core/media/image-helper.js +0 -30
- package/dist/core/media/images-size-detector.service.d.ts +0 -6
- package/dist/core/media/images-size-detector.service.js +0 -15
- package/dist/core/toastr.d.ts +0 -1
- package/dist/core/toastr.js +0 -26
- package/dist/core/transitions/index.d.ts +0 -1
- package/dist/core/transitions/index.js +0 -1
- package/dist/core/transitions/slide-horizontally.d.ts +0 -7
- package/dist/core/transitions/slide-horizontally.js +0 -55
- package/dist/core/utils/array-helper.d.ts +0 -23
- package/dist/core/utils/array-helper.js +0 -148
- package/dist/core/utils/compact-number.d.ts +0 -8
- package/dist/core/utils/compact-number.js +0 -48
- package/dist/core/utils/date-helper.d.ts +0 -29
- package/dist/core/utils/date-helper.js +0 -146
- package/dist/core/utils/dom-helper.d.ts +0 -12
- package/dist/core/utils/dom-helper.js +0 -76
- package/dist/core/utils/html-helper.d.ts +0 -42
- package/dist/core/utils/html-helper.js +0 -104
- package/dist/core/utils/index.d.ts +0 -3
- package/dist/core/utils/index.js +0 -3
- package/dist/core/utils/number-helper.d.ts +0 -6
- package/dist/core/utils/number-helper.js +0 -28
- package/dist/core/utils/string-generator.d.ts +0 -2
- package/dist/core/utils/string-generator.js +0 -15
- package/dist/core/utils/string-helper.d.ts +0 -10
- package/dist/core/utils/string-helper.js +0 -53
- package/dist/core/utils/url-helper.d.ts +0 -3
- package/dist/core/utils/url-helper.js +0 -13
- package/dist/core/utils/utils.d.ts +0 -29
- package/dist/core/utils/utils.js +0 -104
- package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -5
- package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -5
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
- package/dist/ui/button/cmp.button.svelte +0 -10
- package/dist/ui/button/cmp.button.svelte.d.ts +0 -16
- package/dist/ui/button/cmp.options-button.svelte +0 -123
- package/dist/ui/button/cmp.options-button.svelte.d.ts +0 -20
- package/dist/ui/button/index.d.ts +0 -3
- package/dist/ui/button/index.js +0 -3
- package/dist/ui/button/resources/button-base.svelte +0 -84
- package/dist/ui/button/resources/button-base.svelte.d.ts +0 -13
- package/dist/ui/button/resources/button-theme.svelte +0 -53
- package/dist/ui/button/resources/button-theme.svelte.d.ts +0 -10
- package/dist/ui/button/resources/button-types.d.ts +0 -20
- package/dist/ui/button/resources/button-types.js +0 -22
- package/dist/ui/card-actions/card-action-container.d.ts +0 -2
- package/dist/ui/card-actions/card-action-container.js +0 -17
- package/dist/ui/card-actions/cmp.card-action.svelte +0 -28
- package/dist/ui/card-actions/cmp.card-action.svelte.d.ts +0 -10
- package/dist/ui/card-actions/cmp.card-actions.svelte +0 -71
- package/dist/ui/card-actions/cmp.card-actions.svelte.d.ts +0 -9
- package/dist/ui/card-actions/index.d.ts +0 -4
- package/dist/ui/card-actions/index.js +0 -3
- package/dist/ui/card-actions/types.d.ts +0 -9
- package/dist/ui/card-actions/types.js +0 -1
- package/dist/ui/dropdown/cmp.dropdown.svelte +0 -184
- package/dist/ui/dropdown/cmp.dropdown.svelte.d.ts +0 -23
- package/dist/ui/dropdown/dropdown-ignore.d.ts +0 -6
- package/dist/ui/dropdown/dropdown-ignore.js +0 -11
- package/dist/ui/dropdown/index.d.ts +0 -3
- package/dist/ui/dropdown/index.js +0 -2
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +0 -5
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +0 -7
- package/dist/ui/dynamic-component/index.d.ts +0 -2
- package/dist/ui/dynamic-component/index.js +0 -2
- package/dist/ui/dynamic-component/types.svelte.d.ts +0 -11
- package/dist/ui/dynamic-component/types.svelte.js +0 -13
- package/dist/ui/icon/cmp.icon.svelte +0 -75
- package/dist/ui/icon/cmp.icon.svelte.d.ts +0 -8
- package/dist/ui/icon/index.d.ts +0 -2
- package/dist/ui/icon/index.js +0 -2
- package/dist/ui/icon/types.d.ts +0 -9
- package/dist/ui/icon/types.js +0 -10
- package/dist/ui/image/cmp.image-round.svelte +0 -41
- package/dist/ui/image/cmp.image-round.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-rounded.svelte +0 -64
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-stub.svelte +0 -31
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +0 -18
- package/dist/ui/image/cmp.image.svelte +0 -79
- package/dist/ui/image/cmp.image.svelte.d.ts +0 -13
- package/dist/ui/image/image-state.d.ts +0 -6
- package/dist/ui/image/image-state.js +0 -17
- package/dist/ui/image/index.d.ts +0 -4
- package/dist/ui/image/index.js +0 -4
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +0 -75
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +0 -11
- package/dist/ui/infinite-scrolling/index.d.ts +0 -1
- package/dist/ui/infinite-scrolling/index.js +0 -1
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte +0 -119
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte.d.ts +0 -10
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +0 -84
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +0 -11
- package/dist/ui/line-clamp/index.d.ts +0 -2
- package/dist/ui/line-clamp/index.js +0 -2
- package/dist/ui/line-clamp/line-clamp-localization.d.ts +0 -6
- package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
- package/dist/ui/line-clamp/line-clamp-types.d.ts +0 -3
- package/dist/ui/line-clamp/line-clamp-types.js +0 -1
- package/dist/ui/line-clamp/line-clamp-utils.d.ts +0 -8
- package/dist/ui/line-clamp/line-clamp-utils.js +0 -33
- package/dist/ui/loading/cmp.loading.svelte +0 -94
- package/dist/ui/loading/cmp.loading.svelte.d.ts +0 -9
- package/dist/ui/loading/index.d.ts +0 -1
- package/dist/ui/loading/index.js +0 -1
- package/dist/ui/media-playback/index.d.ts +0 -2
- package/dist/ui/media-playback/index.js +0 -2
- package/dist/ui/media-playback/playback-manager.svelte.d.ts +0 -25
- package/dist/ui/media-playback/playback-manager.svelte.js +0 -62
- package/dist/ui/media-playback/volume-manager.svelte.d.ts +0 -10
- package/dist/ui/media-playback/volume-manager.svelte.js +0 -27
- package/dist/ui/player/button/cmp.mobile-player-buttons.svelte +0 -37
- package/dist/ui/player/button/cmp.mobile-player-buttons.svelte.d.ts +0 -7
- package/dist/ui/player/button/cmp.player-buttons.svelte +0 -127
- package/dist/ui/player/button/cmp.player-buttons.svelte.d.ts +0 -9
- package/dist/ui/player/button/cmp.responsive-player-buttons.svelte +0 -32
- package/dist/ui/player/button/cmp.responsive-player-buttons.svelte.d.ts +0 -8
- package/dist/ui/player/button/index.d.ts +0 -4
- package/dist/ui/player/button/index.js +0 -3
- package/dist/ui/player/button/types.d.ts +0 -7
- package/dist/ui/player/button/types.js +0 -1
- package/dist/ui/player/providers/chunks-player-buffer/index.d.ts +0 -2
- package/dist/ui/player/providers/chunks-player-buffer/index.js +0 -2
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.d.ts +0 -9
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.js +0 -9
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.d.ts +0 -30
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.js +0 -73
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.d.ts +0 -23
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.js +0 -220
- package/dist/ui/player/providers/default-chunks-player-buffer.svelte.d.ts +0 -23
- package/dist/ui/player/providers/default-chunks-player-buffer.svelte.js +0 -71
- package/dist/ui/player/providers/default-feed-player-buffer.svelte.d.ts +0 -29
- package/dist/ui/player/providers/default-feed-player-buffer.svelte.js +0 -121
- package/dist/ui/player/providers/index.d.ts +0 -3
- package/dist/ui/player/providers/index.js +0 -2
- package/dist/ui/player/providers/service.d.ts +0 -2
- package/dist/ui/player/providers/service.js +0 -13
- package/dist/ui/player/providers/types.d.ts +0 -54
- package/dist/ui/player/providers/types.js +0 -1
- package/dist/ui/player/slider/cmp.player-slider.svelte +0 -218
- package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +0 -34
- package/dist/ui/player/slider/index.d.ts +0 -2
- package/dist/ui/player/slider/index.js +0 -2
- package/dist/ui/player/slider/prevent-slider-scroll.d.ts +0 -5
- package/dist/ui/player/slider/prevent-slider-scroll.js +0 -11
- package/dist/ui/player/slider/types.d.ts +0 -16
- package/dist/ui/player/slider/types.js +0 -1
- package/dist/ui/player/slider/wheel-gestures-adapter.d.ts +0 -17
- package/dist/ui/player/slider/wheel-gestures-adapter.js +0 -79
- package/dist/ui/player/slider-horizontal/cmp.slider.svelte +0 -424
- package/dist/ui/player/slider-horizontal/cmp.slider.svelte.d.ts +0 -31
- package/dist/ui/player/slider-horizontal/index.d.ts +0 -2
- package/dist/ui/player/slider-horizontal/index.js +0 -2
- package/dist/ui/player/slider-horizontal/slider-localization.d.ts +0 -5
- package/dist/ui/player/slider-horizontal/slider-localization.js +0 -13
- package/dist/ui/player/slider-horizontal/types.d.ts +0 -11
- package/dist/ui/player/slider-horizontal/types.js +0 -8
- package/dist/ui/player/utils/index.d.ts +0 -1
- package/dist/ui/player/utils/index.js +0 -1
- package/dist/ui/player/utils/touch-synchronizer.d.ts +0 -7
- package/dist/ui/player/utils/touch-synchronizer.js +0 -21
- package/dist/ui/progress/cmp.progress.svelte +0 -40
- package/dist/ui/progress/cmp.progress.svelte.d.ts +0 -6
- package/dist/ui/progress/index.d.ts +0 -1
- package/dist/ui/progress/index.js +0 -1
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +0 -39
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +0 -8
- package/dist/ui/proportional-container/index.d.ts +0 -1
- package/dist/ui/proportional-container/index.js +0 -1
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +0 -167
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +0 -15
- package/dist/ui/seek-bar/index.d.ts +0 -1
- package/dist/ui/seek-bar/index.js +0 -1
- package/dist/ui/shadow-dom/normalize-shadow.css +0 -350
- package/dist/ui/shadow-dom/reset-shadow.css +0 -176
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -124
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -8
- package/dist/ui/swipe-indicator/index.d.ts +0 -1
- package/dist/ui/swipe-indicator/index.js +0 -1
- package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -5
- package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
- package/dist/ui/time-ago/cmp.time-ago.svelte +0 -69
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +0 -9
- package/dist/ui/time-ago/index.d.ts +0 -1
- package/dist/ui/time-ago/index.js +0 -1
- package/dist/ui/time-ago/time-ago-localization.d.ts +0 -12
- package/dist/ui/time-ago/time-ago-localization.js +0 -55
- package/dist/ui/video/cmp.video.svelte +0 -387
- package/dist/ui/video/cmp.video.svelte.d.ts +0 -27
- package/dist/ui/video/index.d.ts +0 -2
- package/dist/ui/video/index.js +0 -2
- package/dist/ui/video/types.d.ts +0 -4
- package/dist/ui/video/types.js +0 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AdCard } from '../../ads/ad-card';
|
|
3
3
|
import { PostModel } from '../model';
|
|
4
4
|
import { ProductCard } from '../../products/product-card';
|
|
5
|
-
let { model, trackingParams: externalTrackingParams,
|
|
5
|
+
let { model, trackingParams: externalTrackingParams, on } = $props();
|
|
6
6
|
const trackingParams = $derived.by(() => {
|
|
7
7
|
if (externalTrackingParams || externalTrackingParams === false) {
|
|
8
8
|
return externalTrackingParams;
|
|
@@ -21,7 +21,6 @@ const trackingParams = $derived.by(() => {
|
|
|
21
21
|
<AdCard
|
|
22
22
|
ad={ad}
|
|
23
23
|
trackingParams={trackingParams}
|
|
24
|
-
locale={locale}
|
|
25
24
|
on={{
|
|
26
25
|
click: on?.adClick,
|
|
27
26
|
impression: on?.adImpression
|
|
@@ -34,7 +33,6 @@ const trackingParams = $derived.by(() => {
|
|
|
34
33
|
<ProductCard
|
|
35
34
|
product={product}
|
|
36
35
|
trackingParams={trackingParams}
|
|
37
|
-
locale={locale}
|
|
38
36
|
on={{
|
|
39
37
|
click: on?.productClick,
|
|
40
38
|
impression: on?.productImpression
|
|
@@ -44,18 +42,7 @@ const trackingParams = $derived.by(() => {
|
|
|
44
42
|
</div>
|
|
45
43
|
{/if}
|
|
46
44
|
|
|
47
|
-
<style
|
|
48
|
-
0% {
|
|
49
|
-
opacity: 1;
|
|
50
|
-
}
|
|
51
|
-
50% {
|
|
52
|
-
opacity: 0.4;
|
|
53
|
-
}
|
|
54
|
-
100% {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
.post-attachments {
|
|
45
|
+
<style>.post-attachments {
|
|
59
46
|
--_post-attachments--gap: var(--post-attachments--gap, 1.875rem);
|
|
60
47
|
--product-card--background-color: var(--sc-player--card-background);
|
|
61
48
|
--product-card--price-color: var(--sc-player--price);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { Locale } from '../../core/locale';
|
|
2
1
|
import type { TrackingParams } from '../../marketing-tracking';
|
|
3
2
|
import { PostModel } from '../model';
|
|
4
3
|
type Props = {
|
|
5
4
|
model: PostModel;
|
|
6
5
|
trackingParams: TrackingParams | null;
|
|
7
|
-
locale?: Locale;
|
|
8
6
|
on?: {
|
|
9
7
|
productClick?: (productId: string) => void;
|
|
10
8
|
productImpression?: (productId: string) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PostModel } from '../model';
|
|
2
2
|
import type { IPostSocialInteractionsHandler } from '../social-interactions';
|
|
3
|
-
import { IconColor } from '
|
|
3
|
+
import type { IconColor } from '@streamscloud/kit/ui/icon';
|
|
4
4
|
export declare class PostActionsHandler {
|
|
5
5
|
readonly actions: PostAction[];
|
|
6
6
|
private post;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IconColor } from '../../ui/icon';
|
|
2
|
-
import { MediaVolumeManager } from '../../ui/media-playback';
|
|
3
1
|
import IconHeartFilled from '@fluentui/svg-icons/icons/heart_32_filled.svg?raw';
|
|
4
2
|
import IconHeart from '@fluentui/svg-icons/icons/heart_32_regular.svg?raw';
|
|
5
3
|
import IconShare from '@fluentui/svg-icons/icons/share_48_regular.svg?raw';
|
|
6
4
|
import IconShoppingBag from '@fluentui/svg-icons/icons/shopping_bag_32_regular.svg?raw';
|
|
7
5
|
import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_32_regular.svg?raw';
|
|
8
6
|
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_32_regular.svg?raw';
|
|
7
|
+
import { MediaVolumeManager } from '@streamscloud/kit/ui/media-playback';
|
|
9
8
|
export class PostActionsHandler {
|
|
10
9
|
actions = $derived.by(() => {
|
|
11
10
|
const result = [];
|
|
@@ -15,7 +14,7 @@ export class PostActionsHandler {
|
|
|
15
14
|
if (this.post.enableSocialInteractions && this.socialInteractionsHandler) {
|
|
16
15
|
result.push({
|
|
17
16
|
icon: this.isLikedStore.isLiked ? IconHeartFilled : IconHeart,
|
|
18
|
-
iconColor: this.isLikedStore.isLiked ?
|
|
17
|
+
iconColor: this.isLikedStore.isLiked ? 'red' : undefined,
|
|
19
18
|
callback: () => this.socialInteractionsHandler?.toggleLike(this.post.id)
|
|
20
19
|
});
|
|
21
20
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<script lang="ts">import {
|
|
2
|
-
import { Currency } from '../../core/enums';
|
|
1
|
+
<script lang="ts">import { Currency } from '../../core/enums';
|
|
3
2
|
import { enrichAdLinkWithTracking, enrichProductLinkWithTracking } from '../../marketing-tracking';
|
|
4
3
|
import { PostModel } from '../model';
|
|
5
4
|
import { toPriceRepresentation } from '../../products/price-helper';
|
|
6
|
-
import { Icon, IconColor } from '../../ui/icon';
|
|
7
|
-
import { ImageRounded } from '../../ui/image';
|
|
8
5
|
import { PostViewerUiManager } from './ui-manager.svelte';
|
|
9
6
|
import IconTargetArrow from '@fluentui/svg-icons/icons/target_arrow_20_regular.svg?raw';
|
|
7
|
+
import { horizontalWheelScroll, swallowTouch } from '@streamscloud/kit/core/actions';
|
|
8
|
+
import { Icon } from '@streamscloud/kit/ui/icon';
|
|
9
|
+
import { ImageRounded } from '@streamscloud/kit/ui/image';
|
|
10
10
|
let { model, trackingParams, uiManager, on } = $props();
|
|
11
11
|
const attachmentsToShow = $derived.by(() => {
|
|
12
12
|
if (!model.attachments) {
|
|
@@ -114,7 +114,7 @@ const variables = $derived.by(() => {
|
|
|
114
114
|
data-ad-id={attachment.adId || undefined}>
|
|
115
115
|
<div class="attachments-card" class:attachments-card--single={attachmentsToShow.length === 1} class:attachments-card--dark={!attachment.isAd}>
|
|
116
116
|
<div class="attachments-card__thumb">
|
|
117
|
-
<ImageRounded src={attachment.image} alt=""
|
|
117
|
+
<ImageRounded src={attachment.image} alt="" />
|
|
118
118
|
</div>
|
|
119
119
|
<div class="attachments-card__content">
|
|
120
120
|
<div class="attachments-card__title" title={attachment.title}>
|
|
@@ -136,25 +136,14 @@ const variables = $derived.by(() => {
|
|
|
136
136
|
</div>
|
|
137
137
|
{#if attachment.isAd}
|
|
138
138
|
<div class="attachments-horizontal__item-icon">
|
|
139
|
-
<Icon src={IconTargetArrow} color=
|
|
139
|
+
<Icon src={IconTargetArrow} color="white" />
|
|
140
140
|
</div>
|
|
141
141
|
{/if}
|
|
142
142
|
</div>
|
|
143
143
|
{/each}
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
|
-
<style
|
|
147
|
-
0% {
|
|
148
|
-
opacity: 1;
|
|
149
|
-
}
|
|
150
|
-
50% {
|
|
151
|
-
opacity: 0.4;
|
|
152
|
-
}
|
|
153
|
-
100% {
|
|
154
|
-
opacity: 1;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
.attachments-horizontal {
|
|
146
|
+
<style>.attachments-horizontal {
|
|
158
147
|
pointer-events: auto;
|
|
159
148
|
display: flex;
|
|
160
149
|
gap: 0.5rem;
|
|
@@ -179,7 +168,7 @@ const variables = $derived.by(() => {
|
|
|
179
168
|
position: absolute;
|
|
180
169
|
bottom: 2px;
|
|
181
170
|
right: 2px;
|
|
182
|
-
--icon--size: 1rem;
|
|
171
|
+
--sc-kit--icon--size: 1rem;
|
|
183
172
|
}
|
|
184
173
|
|
|
185
174
|
.attachments-card {
|
|
@@ -208,8 +197,8 @@ const variables = $derived.by(() => {
|
|
|
208
197
|
width: 100%;
|
|
209
198
|
}
|
|
210
199
|
.attachments-card__thumb {
|
|
211
|
-
--image--rounded--width: 2.375rem;
|
|
212
|
-
--image--rounded--height: 2.375rem;
|
|
200
|
+
--sc-kit--image--rounded--width: 2.375rem;
|
|
201
|
+
--sc-kit--image--rounded--height: 2.375rem;
|
|
213
202
|
overflow: hidden;
|
|
214
203
|
border-radius: 0.125rem;
|
|
215
204
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts">import { PostType } from '../..';
|
|
2
2
|
import { PostModel } from '../model';
|
|
3
|
-
import { ResponsivePlayerButtons } from '../../ui/player/button';
|
|
4
3
|
import { default as AttachmentsHorizontal } from './attachments-horizontal.svelte';
|
|
5
4
|
import { default as Heading } from './heading.svelte';
|
|
6
5
|
import { default as PostMedia } from './media/post-media.svelte';
|
|
7
6
|
import { default as Texts } from './post-texts.svelte';
|
|
8
7
|
import { PostViewerLocalization } from './post-viewer-localization';
|
|
9
8
|
import { PostViewerUiManager } from './ui-manager.svelte';
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import { ResponsivePlayerButtons } from '@streamscloud/kit/ui/player/buttons';
|
|
10
|
+
let { model, trackingParams: externalTrackingParams, enableAttachments = true, controlActions, enableControls = true, autoplay = 'on-appearance', on, overlay } = $props();
|
|
11
|
+
const localization = new PostViewerLocalization();
|
|
12
12
|
const uiManager = new PostViewerUiManager();
|
|
13
13
|
$effect(() => {
|
|
14
14
|
uiManager.enableAttachments = enableAttachments;
|
|
@@ -56,7 +56,7 @@ const variables = $derived.by(() => {
|
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
58
|
<div class="post-viewer" style={variables} use:viewerMounted>
|
|
59
|
-
<PostMedia id={model.id} media={model.media}
|
|
59
|
+
<PostMedia id={model.id} media={model.media} autoplay={autoplay} on={{ videoProgress: on?.progress }} />
|
|
60
60
|
{#if (uiManager.showAttachments && model.attachments) || model.heading || model.texts.kicker || model.texts.title || model.texts.text || model.texts.readMoreUrl}
|
|
61
61
|
<div class="post-viewer__information">
|
|
62
62
|
{#if model.heading}
|
|
@@ -89,18 +89,7 @@ const variables = $derived.by(() => {
|
|
|
89
89
|
{/if}
|
|
90
90
|
</div>
|
|
91
91
|
|
|
92
|
-
<style
|
|
93
|
-
0% {
|
|
94
|
-
opacity: 1;
|
|
95
|
-
}
|
|
96
|
-
50% {
|
|
97
|
-
opacity: 0.4;
|
|
98
|
-
}
|
|
99
|
-
100% {
|
|
100
|
-
opacity: 1;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
.post-viewer {
|
|
92
|
+
<style>.post-viewer {
|
|
104
93
|
width: 100%;
|
|
105
94
|
min-width: 100%;
|
|
106
95
|
max-width: 100%;
|
|
@@ -119,8 +108,8 @@ const variables = $derived.by(() => {
|
|
|
119
108
|
}
|
|
120
109
|
}
|
|
121
110
|
.post-viewer__controls-panel {
|
|
122
|
-
--player-button--color: var(--sc-player--button);
|
|
123
|
-
--player-button--color--inactive: var(--sc-player--button-inactive);
|
|
111
|
+
--sc-kit--player-button--color: var(--sc-player--button);
|
|
112
|
+
--sc-kit--player-button--color--inactive: var(--sc-player--button-inactive);
|
|
124
113
|
position: absolute;
|
|
125
114
|
left: auto;
|
|
126
115
|
right: 0;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Locale } from '../../core/locale';
|
|
2
1
|
import type { TrackingParams } from '../../marketing-tracking';
|
|
3
2
|
import { PostModel } from '../model';
|
|
4
|
-
import { type PlayerButtonDef } from '
|
|
3
|
+
import { type PlayerButtonDef } from '@streamscloud/kit/ui/player/buttons';
|
|
5
4
|
import type { Snippet } from 'svelte';
|
|
6
5
|
type Props = {
|
|
7
6
|
model: PostModel;
|
|
@@ -10,7 +9,6 @@ type Props = {
|
|
|
10
9
|
enableControls?: boolean;
|
|
11
10
|
controlActions: PlayerButtonDef[];
|
|
12
11
|
autoplay?: true | false | 'on-appearance';
|
|
13
|
-
locale?: Locale;
|
|
14
12
|
on?: {
|
|
15
13
|
progress?: (progress: number) => void;
|
|
16
14
|
productClick?: (productId: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">import { PostModel } from '../model';
|
|
2
2
|
import { PostViewerUiManager } from './ui-manager.svelte';
|
|
3
|
-
import { ImageRound } from '../../ui/image';
|
|
4
|
-
import { TimeAgo } from '../../ui/time-ago';
|
|
5
3
|
import { PostViewerLocalization } from './post-viewer-localization';
|
|
4
|
+
import { ImageRound } from '@streamscloud/kit/ui/image';
|
|
5
|
+
import { TimeAgo } from '@streamscloud/kit/ui/time-ago';
|
|
6
6
|
let { model, uiManager, localization } = $props();
|
|
7
7
|
const variables = $derived.by(() => {
|
|
8
8
|
const values = [
|
|
@@ -14,13 +14,13 @@ const variables = $derived.by(() => {
|
|
|
14
14
|
|
|
15
15
|
<div class="post-viewer-heading" style={variables}>
|
|
16
16
|
<div class="post-viewer-heading__source-image">
|
|
17
|
-
<ImageRound src={model.image} alt={`${model.name} profilbilde`}
|
|
17
|
+
<ImageRound src={model.image} alt={`${model.name} profilbilde`} />
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
<div class="post-viewer-heading__info">
|
|
21
21
|
<div class="post-viewer-heading__source-name">{model.name}</div>
|
|
22
22
|
<p class="post-viewer-heading__metadata">
|
|
23
|
-
<TimeAgo date={model.displayDate}
|
|
23
|
+
<TimeAgo date={model.displayDate} />
|
|
24
24
|
{#if Number.isInteger(model.viewsCount) && model.viewsCount}
|
|
25
25
|
<span>·</span>
|
|
26
26
|
{localization.viewsCount(model.viewsCount)}
|
|
@@ -29,18 +29,7 @@ const variables = $derived.by(() => {
|
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
|
-
<style
|
|
33
|
-
0% {
|
|
34
|
-
opacity: 1;
|
|
35
|
-
}
|
|
36
|
-
50% {
|
|
37
|
-
opacity: 0.4;
|
|
38
|
-
}
|
|
39
|
-
100% {
|
|
40
|
-
opacity: 1;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
.post-viewer-heading {
|
|
32
|
+
<style>.post-viewer-heading {
|
|
44
33
|
--_post-viewer-heading-texts--color: #ffffff;
|
|
45
34
|
--_post-viewer-heading--text--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);
|
|
46
35
|
display: flex;
|
|
@@ -56,9 +45,8 @@ const variables = $derived.by(() => {
|
|
|
56
45
|
min-height: 2rem;
|
|
57
46
|
max-height: 2rem;
|
|
58
47
|
margin-right: 0.625rem;
|
|
59
|
-
--image--rounded--outer--border-radius: 0.5rem;
|
|
60
|
-
--image--rounded--inner--border-width: 0;
|
|
61
|
-
--rounded-img-background: none;
|
|
48
|
+
--sc-kit--image--rounded--outer--border-radius: 0.5rem;
|
|
49
|
+
--sc-kit--image--rounded--inner--border-width: 0;
|
|
62
50
|
}
|
|
63
51
|
.post-viewer-heading__info {
|
|
64
52
|
display: flex;
|
|
@@ -72,7 +60,7 @@ const variables = $derived.by(() => {
|
|
|
72
60
|
color: var(--_post-viewer-heading-texts--color);
|
|
73
61
|
text-shadow: var(--_post-viewer-heading--text--shadow);
|
|
74
62
|
text-overflow: ellipsis;
|
|
75
|
-
width: 100%;
|
|
63
|
+
max-width: 100%;
|
|
76
64
|
white-space: nowrap;
|
|
77
65
|
overflow: hidden;
|
|
78
66
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">import { Image } from '
|
|
2
|
-
import {
|
|
3
|
-
import { Video } from '
|
|
4
|
-
let { id, media,
|
|
1
|
+
<script lang="ts">import { Image } from '@streamscloud/kit/ui/image';
|
|
2
|
+
import { Carousel } from '@streamscloud/kit/ui/player/carousel';
|
|
3
|
+
import { Video } from '@streamscloud/kit/ui/video';
|
|
4
|
+
let { id, media, autoplay = 'on-appearance', on } = $props();
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
{#snippet mediaItem(item: IPostMediaItemModel)}
|
|
@@ -26,26 +26,15 @@ let { id, media, locale, autoplay = 'on-appearance', on } = $props();
|
|
|
26
26
|
{#if media.items.length === 1}
|
|
27
27
|
{@render mediaItem(media.items[0])}
|
|
28
28
|
{:else if media.items.length > 1}
|
|
29
|
-
<
|
|
29
|
+
<Carousel items={media.items} initialIndex={media.currentIndex} on={{ indexChanged: (index) => (media.currentIndex = index) }}>
|
|
30
30
|
{#snippet children(item)}
|
|
31
31
|
{@render mediaItem(item)}
|
|
32
32
|
{/snippet}
|
|
33
|
-
</
|
|
33
|
+
</Carousel>
|
|
34
34
|
{/if}
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
|
-
<style
|
|
38
|
-
0% {
|
|
39
|
-
opacity: 1;
|
|
40
|
-
}
|
|
41
|
-
50% {
|
|
42
|
-
opacity: 0.4;
|
|
43
|
-
}
|
|
44
|
-
100% {
|
|
45
|
-
opacity: 1;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
.post-media {
|
|
37
|
+
<style>.post-media {
|
|
49
38
|
--_post-media--background-color: light-dark(#ffffff, #000000);
|
|
50
39
|
width: 100%;
|
|
51
40
|
min-width: 100%;
|
|
@@ -56,10 +45,10 @@ let { id, media, locale, autoplay = 'on-appearance', on } = $props();
|
|
|
56
45
|
background-color: rgb(from var(--_post-media--background-color) r g b/60%);
|
|
57
46
|
}
|
|
58
47
|
.post-media--fit {
|
|
59
|
-
--video--media-fit: contain;
|
|
60
|
-
--image--object-fit: contain;
|
|
48
|
+
--sc-kit--video--media-fit: contain;
|
|
49
|
+
--sc-kit--image--object-fit: contain;
|
|
61
50
|
}
|
|
62
51
|
.post-media--fill {
|
|
63
|
-
--video--media-fit: cover;
|
|
64
|
-
--image--object-fit: cover;
|
|
52
|
+
--sc-kit--video--media-fit: cover;
|
|
53
|
+
--sc-kit--image--object-fit: cover;
|
|
65
54
|
}</style>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type { Locale } from '../../../core/locale';
|
|
2
1
|
import type { PostViewerMediaModel } from '../../model/post-media-model.svelte';
|
|
3
2
|
type Props = {
|
|
4
3
|
id: string;
|
|
5
4
|
media: PostViewerMediaModel;
|
|
6
|
-
locale: Locale;
|
|
7
5
|
autoplay?: true | false | 'on-appearance';
|
|
8
6
|
on: {
|
|
9
7
|
videoProgress?: (progress: number) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">import {
|
|
2
|
-
import { PostViewerLocalization } from './post-viewer-localization';
|
|
1
|
+
<script lang="ts">import { PostViewerLocalization } from './post-viewer-localization';
|
|
3
2
|
import { PostViewerUiManager } from './ui-manager.svelte';
|
|
3
|
+
import { LineClamp } from '@streamscloud/kit/ui/line-clamp';
|
|
4
4
|
let { model, uiManager, localization } = $props();
|
|
5
5
|
const variables = $derived.by(() => {
|
|
6
6
|
const values = [
|
|
@@ -13,17 +13,17 @@ const variables = $derived.by(() => {
|
|
|
13
13
|
<div class="post-viewer-texts" style={variables}>
|
|
14
14
|
{#if model.kicker}
|
|
15
15
|
<div class="post-viewer-texts__kicker">
|
|
16
|
-
<LineClamp maxLines={1} enableShowMore={false}
|
|
16
|
+
<LineClamp maxLines={1} enableShowMore={false}>{model.kicker}</LineClamp>
|
|
17
17
|
</div>
|
|
18
18
|
{/if}
|
|
19
19
|
{#if model.title}
|
|
20
20
|
<div class="post-viewer-texts__title">
|
|
21
|
-
<LineClamp maxLines={2} enableShowMore={false}
|
|
21
|
+
<LineClamp maxLines={2} enableShowMore={false}>{model.title}</LineClamp>
|
|
22
22
|
</div>
|
|
23
23
|
{/if}
|
|
24
24
|
{#if model.text}
|
|
25
25
|
<div class="post-viewer-texts__text">
|
|
26
|
-
<LineClamp maxLines={2} enableShowMore={true}
|
|
26
|
+
<LineClamp maxLines={2} enableShowMore={true}>{model.text}</LineClamp>
|
|
27
27
|
</div>
|
|
28
28
|
{/if}
|
|
29
29
|
{#if model.readMoreUrl}
|
|
@@ -33,18 +33,7 @@ const variables = $derived.by(() => {
|
|
|
33
33
|
{/if}
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
|
-
<style
|
|
37
|
-
0% {
|
|
38
|
-
opacity: 1;
|
|
39
|
-
}
|
|
40
|
-
50% {
|
|
41
|
-
opacity: 0.4;
|
|
42
|
-
}
|
|
43
|
-
100% {
|
|
44
|
-
opacity: 1;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
.post-viewer-texts {
|
|
36
|
+
<style>.post-viewer-texts {
|
|
48
37
|
--_post-viewer-texts--color: #ffffff;
|
|
49
38
|
--_post-viewer-texts--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);
|
|
50
39
|
color: var(--_post-viewer-texts--color);
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { type Locale } from '../../core/locale';
|
|
2
1
|
export declare class PostViewerLocalization {
|
|
3
|
-
viewsCount: (count: number) => string;
|
|
4
|
-
readMore: string;
|
|
5
|
-
locale: Locale;
|
|
6
|
-
constructor(locale: Locale);
|
|
2
|
+
get viewsCount(): (count: number) => string;
|
|
3
|
+
get readMore(): string;
|
|
7
4
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {} from '
|
|
1
|
+
import { getLocale } from '@streamscloud/kit/locale';
|
|
2
2
|
export class PostViewerLocalization {
|
|
3
|
-
viewsCount
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
this.readMore = loc.readMore[locale];
|
|
9
|
-
this.locale = locale;
|
|
3
|
+
get viewsCount() {
|
|
4
|
+
return loc.viewsCount[getLocale()];
|
|
5
|
+
}
|
|
6
|
+
get readMore() {
|
|
7
|
+
return loc.readMore[getLocale()];
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
10
|
const loc = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Locale } from '../../core/locale';
|
|
2
1
|
import type { IPostSocialInteractionsHandler } from '..';
|
|
3
2
|
import type { IPostSharingHandler } from '../sharing';
|
|
4
|
-
import type { IPlayerDataProvider } from '../../ui/player/providers';
|
|
5
3
|
import type { IPostAnalyticsHandler, PostPlayerModel } from './types';
|
|
4
|
+
import type { Locale } from '@streamscloud/kit/locale';
|
|
5
|
+
import type { IPlayerDataProvider } from '@streamscloud/kit/ui/player/providers';
|
|
6
6
|
type Props = {
|
|
7
7
|
dataProvider: IPlayerDataProvider<PostPlayerModel>;
|
|
8
8
|
socialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Locale } from '../../core/locale';
|
|
2
1
|
import { type IMediaCenterDataProvider } from '../../media-center/config/types';
|
|
3
2
|
import type { IPostSharingHandler } from '../sharing';
|
|
4
3
|
import type { IPostSocialInteractionsHandler } from '../social-interactions';
|
|
5
4
|
import { default as PostsPlayer } from './cmp.posts-player.svelte';
|
|
6
5
|
import type { IPostAnalyticsHandler, PostPlayerModel } from './types';
|
|
6
|
+
import type { Locale } from '@streamscloud/kit/locale';
|
|
7
7
|
export { PostsPlayer, type PostPlayerModel };
|
|
8
8
|
export type { IMediaCenterDataProvider, IPostAnalyticsHandler };
|
|
9
9
|
/**
|
|
@@ -8,7 +8,11 @@ const handleBackgroundImagedLoaded = (url) => {
|
|
|
8
8
|
};
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
|
-
<ShadowRoot
|
|
11
|
+
<ShadowRoot
|
|
12
|
+
locale={playerSettings?.locale}
|
|
13
|
+
theme={playerSettings?.theme ?? 'dark'}
|
|
14
|
+
backgroundDisabled={playerSettings?.disableBackground === true}
|
|
15
|
+
backgroundImageUrl={backgroundImageUrl}>
|
|
12
16
|
<PostsPlayerView
|
|
13
17
|
dataProvider={{ type: 'provider', provider: dataProvider }}
|
|
14
18
|
socialInteractionsHandler={socialInteractionsHandler}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Locale } from '../../core/locale';
|
|
2
1
|
import type { IPostSharingHandler } from '../sharing';
|
|
3
2
|
import type { IPostSocialInteractionsHandler } from '../social-interactions';
|
|
4
3
|
import { type ICloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
5
|
-
import type { IPlayerDataProvider } from '../../ui/player/providers';
|
|
6
4
|
import type { IPostAnalyticsHandler, PostPlayerModel } from './types';
|
|
5
|
+
import type { Locale } from '@streamscloud/kit/locale';
|
|
6
|
+
import type { IPlayerDataProvider } from '@streamscloud/kit/ui/player/providers';
|
|
7
7
|
type Props = {
|
|
8
8
|
dataProvider: IPlayerDataProvider<PostPlayerModel>;
|
|
9
9
|
socialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
<script lang="ts">import { PostType } from '../../core/enums';
|
|
2
|
-
import { preloadImage } from '../../core/image-preloader';
|
|
3
2
|
import { PostAttachments } from '../attachments';
|
|
4
3
|
import { PostActionsGenerator } from '../controls';
|
|
5
4
|
import { getPostCoverImage, PostModel } from '../model';
|
|
6
5
|
import { PostViewer } from '../post-viewer';
|
|
7
|
-
import { IconColor } from '../../ui/icon';
|
|
8
6
|
import { Player, PlayerConfig, PlayerSettings } from '../../ui/player';
|
|
9
|
-
import {} from '../../ui/player/providers';
|
|
10
|
-
import { initBufferFromProvider } from '../../ui/player/providers/service';
|
|
11
7
|
import IconDelete from '@fluentui/svg-icons/icons/delete_32_regular.svg?raw';
|
|
12
8
|
import IconEdit from '@fluentui/svg-icons/icons/edit_32_regular.svg?raw';
|
|
9
|
+
import { preloadImage } from '@streamscloud/kit/core/utils';
|
|
10
|
+
import { initBufferFromProvider } from '@streamscloud/kit/ui/player/providers';
|
|
13
11
|
import { untrack } from 'svelte';
|
|
14
12
|
let { dataProvider, socialInteractionsHandler, sharingHandler, playerSettings, analyticsHandler, managementActions, closeOrchestrator, on } = $props();
|
|
15
13
|
let buffer = $state.raw(null);
|
|
@@ -50,7 +48,7 @@ const contentPlayerConfig = untrack(() => new PlayerConfig({
|
|
|
50
48
|
playerBuffer: null,
|
|
51
49
|
settings: new PlayerSettings(playerSettings),
|
|
52
50
|
closeOrchestrator,
|
|
53
|
-
|
|
51
|
+
feedSliderCallbacks: {
|
|
54
52
|
itemActivated: (id) => {
|
|
55
53
|
const post = getLoadedItemById(id);
|
|
56
54
|
if (!post) {
|
|
@@ -125,7 +123,7 @@ const currentItemActions = $derived.by(() => {
|
|
|
125
123
|
if (managementActions?.deletePost) {
|
|
126
124
|
result.push({
|
|
127
125
|
icon: IconDelete,
|
|
128
|
-
iconColor:
|
|
126
|
+
iconColor: 'red',
|
|
129
127
|
callback: async () => {
|
|
130
128
|
await managementActions.deletePost(buffer.current.id);
|
|
131
129
|
}
|
|
@@ -141,7 +139,6 @@ const currentItemActions = $derived.by(() => {
|
|
|
141
139
|
<PostAttachments
|
|
142
140
|
model={postModel}
|
|
143
141
|
trackingParams={false}
|
|
144
|
-
locale={contentPlayerConfig.settings.locale}
|
|
145
142
|
on={{
|
|
146
143
|
productClick: (id) => onProductClick(id, postModel.id),
|
|
147
144
|
productImpression: (id) => onProductImpression(id, postModel.id),
|
|
@@ -149,26 +146,33 @@ const currentItemActions = $derived.by(() => {
|
|
|
149
146
|
adImpression: (id) => onAdImpression(id)
|
|
150
147
|
}} />
|
|
151
148
|
{/snippet}
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
</Player>
|
|
149
|
+
<div class="player-host">
|
|
150
|
+
<Player
|
|
151
|
+
config={contentPlayerConfig}
|
|
152
|
+
itemActions={currentItemActions}
|
|
153
|
+
attachmentsView={buffer?.current && itemAsPostModel(buffer.current).attachments ? attachmentsView : undefined}>
|
|
154
|
+
{#snippet itemView({ item })}
|
|
155
|
+
{@const postModel = itemAsPostModel(item)}
|
|
156
|
+
{@const handler = postActionsGenerator.getPostActionsHandler(postModel)}
|
|
157
|
+
<PostViewer
|
|
158
|
+
model={postModel}
|
|
159
|
+
controlActions={handler.actions}
|
|
160
|
+
trackingParams={false}
|
|
161
|
+
enableAttachments={contentPlayerConfig.uiManager.showAttachmentsOverlay}
|
|
162
|
+
enableControls={contentPlayerConfig.uiManager.showControlsOverlay}
|
|
163
|
+
autoplay="on-appearance"
|
|
164
|
+
on={{
|
|
165
|
+
productClick: (productId) => onProductClick(productId, postModel.id),
|
|
166
|
+
productImpression: (productId) => onProductImpression(productId, postModel.id),
|
|
167
|
+
adClick: (adId) => onAdClick(adId),
|
|
168
|
+
adImpression: (adId) => onAdImpression(adId)
|
|
169
|
+
}} />
|
|
170
|
+
{/snippet}
|
|
171
|
+
</Player>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<style>.player-host {
|
|
175
|
+
display: contents;
|
|
176
|
+
--sc-kit--player-button--color: var(--sc-player--button);
|
|
177
|
+
--sc-kit--player-button--color--inactive: var(--sc-player--button-inactive);
|
|
178
|
+
}</style>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { PostType } from '../../core/enums';
|
|
2
|
-
import type { Locale } from '../../core/locale';
|
|
3
2
|
import type { IPostModel } from '..';
|
|
4
3
|
import type { IPostSharingHandler } from '../sharing';
|
|
5
4
|
import type { IPostSocialInteractionsHandler } from '../social-interactions';
|
|
6
5
|
import type { ICloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
7
|
-
import type {
|
|
6
|
+
import type { Locale } from '@streamscloud/kit/locale';
|
|
7
|
+
import type { IPlayerBuffer, IPlayerDataProvider } from '@streamscloud/kit/ui/player/providers';
|
|
8
8
|
export interface IPostAnalyticsHandler {
|
|
9
9
|
trackPostOpened: (postType: PostType, postId: string) => void;
|
|
10
10
|
trackShortVideoView: (videoId: string) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Currency } from '../core/enums';
|
|
2
|
-
import { Utils } from '
|
|
2
|
+
import { Utils } from '@streamscloud/kit/core/utils';
|
|
3
3
|
export const toPriceRepresentation = (data) => {
|
|
4
4
|
const { amount, currency, options } = data;
|
|
5
5
|
const { currencyMode = 'symbol', missingFractionMode = 'zeros-or-placeholder', locale = 'nb-NO' } = options ?? {};
|