@streamscloud/embeddable 15.1.0 → 16.0.1
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
|
@@ -16,18 +16,7 @@ export {};
|
|
|
16
16
|
{/if}
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<style
|
|
20
|
-
0% {
|
|
21
|
-
opacity: 1;
|
|
22
|
-
}
|
|
23
|
-
50% {
|
|
24
|
-
opacity: 0.4;
|
|
25
|
-
}
|
|
26
|
-
100% {
|
|
27
|
-
opacity: 1;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
.chunks-progress {
|
|
19
|
+
<style>.chunks-progress {
|
|
31
20
|
display: flex;
|
|
32
21
|
flex-direction: column;
|
|
33
22
|
gap: 0.5rem;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<script lang="ts">import { brandColors } from '../../core/theme';
|
|
2
|
-
|
|
2
|
+
import { setLocale } from '@streamscloud/kit/locale';
|
|
3
|
+
let { locale, theme = 'dark', backgroundDisabled, backgroundImageUrl, children } = $props();
|
|
4
|
+
$effect(() => {
|
|
5
|
+
if (locale) {
|
|
6
|
+
setLocale(locale);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
3
9
|
const appendBrandPair = (values, name, pair) => {
|
|
4
10
|
if (pair.light) {
|
|
5
11
|
values.push(`--sc-player--light--${name}: ${pair.light}`);
|
|
@@ -42,17 +48,6 @@ const styles = $derived.by(() => {
|
|
|
42
48
|
</div>
|
|
43
49
|
|
|
44
50
|
<style>@charset "UTF-8";
|
|
45
|
-
@keyframes fadeIn {
|
|
46
|
-
0% {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
50% {
|
|
50
|
-
opacity: 0.4;
|
|
51
|
-
}
|
|
52
|
-
100% {
|
|
53
|
-
opacity: 1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
51
|
.shadow-root {
|
|
57
52
|
/* Backgrounds */
|
|
58
53
|
--sc-mc-color--bg-button: light-dark(#ffffff, #111827);
|
|
@@ -88,8 +83,8 @@ const styles = $derived.by(() => {
|
|
|
88
83
|
--sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
|
|
89
84
|
/* Player brand colors — overridable via --sc-player--{light|dark}--{name} custom properties */
|
|
90
85
|
--sc-player--background: light-dark(
|
|
91
|
-
var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-
|
|
92
|
-
var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-
|
|
86
|
+
var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%)),
|
|
87
|
+
var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%))
|
|
93
88
|
);
|
|
94
89
|
--sc-player--brand: light-dark(
|
|
95
90
|
var(--sc-player--light--brand, var(--sc-mc-color--border-brand)),
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type ThemeValue } from '../../core/theme';
|
|
2
|
+
import { type Locale } from '@streamscloud/kit/locale';
|
|
2
3
|
import type { Snippet } from 'svelte';
|
|
3
4
|
type Props = {
|
|
5
|
+
locale?: Locale;
|
|
4
6
|
theme?: ThemeValue;
|
|
5
7
|
backgroundDisabled: boolean;
|
|
6
8
|
backgroundImageUrl: string | null | 'not-applicable';
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
|
|
41
41
|
/* Player brand colors — overridable via --sc-player--{light|dark}--{name} custom properties */
|
|
42
42
|
--sc-player--background: light-dark(
|
|
43
|
-
var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-
|
|
44
|
-
var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-
|
|
43
|
+
var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%)),
|
|
44
|
+
var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 90%))
|
|
45
45
|
);
|
|
46
46
|
--sc-player--brand: light-dark(
|
|
47
47
|
var(--sc-player--light--brand, var(--sc-mc-color--border-brand)),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import normalize from '
|
|
2
|
-
import reset from '
|
|
1
|
+
import normalize from '@streamscloud/kit/styles/normalize.css?raw';
|
|
2
|
+
import reset from '@streamscloud/kit/styles/reset.css?raw';
|
|
3
3
|
export const createShadowRoot = (host) => {
|
|
4
4
|
prepareShadowRootHost(host);
|
|
5
5
|
const shadowRoot = host.attachShadow({ mode: 'open' });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamscloud/embeddable",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.1",
|
|
4
4
|
"author": "StreamsCloud",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dev": "vite dev --port 3010 --host",
|
|
12
12
|
"build": "svelte-package --tsconfig ./tsconfig.app.json && prettier --write --plugin prettier-plugin-svelte . && eslint --fix .",
|
|
13
13
|
"publish:prod": "npm run build && npm publish --access public --tag latest",
|
|
14
|
-
"version:dev": "node -e \"const
|
|
14
|
+
"version:dev": "node -e \"const p=require('./package.json');p.version=p.version.split('-')[0]+'-'+Date.now();require('fs').writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\"",
|
|
15
15
|
"publish:dev": "npm run build && npm run version:dev && npm publish --tag next && git checkout -- package.json",
|
|
16
16
|
"pack": "npm run build && npm pack",
|
|
17
17
|
"preview": "vite preview",
|
|
@@ -133,20 +133,14 @@
|
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
"peerDependencies": {
|
|
136
|
-
"@
|
|
137
|
-
"@popperjs/core": "^2.11.8",
|
|
136
|
+
"@streamscloud/kit": "^0.1.3",
|
|
138
137
|
"@streamscloud/streams-analytics-collector": "^4.0.1",
|
|
139
|
-
"
|
|
140
|
-
"dequal": "^2.0.3",
|
|
141
|
-
"dompurify": "^3.3.0",
|
|
142
|
-
"mobile-detect": "^1.4.5",
|
|
143
|
-
"svelte": "^5.50.0",
|
|
144
|
-
"wheel-gestures": "^2.2.48"
|
|
138
|
+
"svelte": "^5.51.0"
|
|
145
139
|
},
|
|
146
140
|
"devDependencies": {
|
|
147
141
|
"@eslint/compat": "^2.0.2",
|
|
148
142
|
"@eslint/js": "^9.39.2",
|
|
149
|
-
"@fluentui/svg-icons": "^1.1.
|
|
143
|
+
"@fluentui/svg-icons": "^1.1.319",
|
|
150
144
|
"@graphql-codegen/add": "^6.0.0",
|
|
151
145
|
"@graphql-codegen/cli": "^6.1.1",
|
|
152
146
|
"@graphql-codegen/introspection": "^5.0.0",
|
|
@@ -155,39 +149,33 @@
|
|
|
155
149
|
"@graphql-codegen/typescript": "^5.0.7",
|
|
156
150
|
"@graphql-codegen/typescript-operations": "^5.0.7",
|
|
157
151
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
158
|
-
"@
|
|
152
|
+
"@streamscloud/kit": "^0.1.3",
|
|
159
153
|
"@streamscloud/streams-analytics-collector": "^4.0.1",
|
|
160
154
|
"@sveltejs/package": "^2.5.7",
|
|
161
155
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
162
156
|
"@tsconfig/svelte": "^5.0.7",
|
|
163
|
-
"@types/dompurify": "^3.0.5",
|
|
164
|
-
"@urql/core": "^6.0.1",
|
|
165
157
|
"autoprefixer": "^10.4.24",
|
|
166
|
-
"dequal": "^2.0.3",
|
|
167
|
-
"dompurify": "^3.3.1",
|
|
168
158
|
"eslint": "^9.39.2",
|
|
169
159
|
"eslint-config-prettier": "^10.1.8",
|
|
170
160
|
"eslint-formatter-codeframe": "^7.32.2",
|
|
171
161
|
"eslint-formatter-visualstudio": "^9.0.1",
|
|
172
162
|
"eslint-plugin-import": "^2.32.0",
|
|
173
|
-
"eslint-plugin-jsonc": "^2.21.
|
|
163
|
+
"eslint-plugin-jsonc": "^2.21.1",
|
|
174
164
|
"eslint-plugin-only-warn": "^1.1.0",
|
|
175
165
|
"eslint-plugin-promise": "^7.2.1",
|
|
176
|
-
"eslint-plugin-svelte": "^3.
|
|
177
|
-
"eslint-plugin-unused-imports": "^4.
|
|
166
|
+
"eslint-plugin-svelte": "^3.15.0",
|
|
167
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
178
168
|
"globals": "^17.3.0",
|
|
179
|
-
"mobile-detect": "^1.4.5",
|
|
180
169
|
"prettier": "^3.8.1",
|
|
181
170
|
"prettier-plugin-svelte": "^3.4.1",
|
|
182
171
|
"publint": "^0.3.17",
|
|
183
172
|
"sass": "^1.97.3",
|
|
184
|
-
"svelte": "^5.
|
|
185
|
-
"svelte-check": "^4.
|
|
173
|
+
"svelte": "^5.51.0",
|
|
174
|
+
"svelte-check": "^4.4.0",
|
|
186
175
|
"svelte-preprocess": "^6.0.3",
|
|
187
176
|
"typescript": "^5.9.3",
|
|
188
|
-
"typescript-eslint": "^8.
|
|
177
|
+
"typescript-eslint": "^8.55.0",
|
|
189
178
|
"vite": "^7.3.1",
|
|
190
|
-
"vite-tsconfig-paths": "^6.1.
|
|
191
|
-
"wheel-gestures": "^2.2.48"
|
|
179
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
192
180
|
}
|
|
193
181
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const horizontalWheelScroll = (node, param = { isolateScroll: true, speed: 1 }) => {
|
|
2
|
-
const onWheel = (event) => {
|
|
3
|
-
const canScrollX = node.scrollWidth > node.clientWidth;
|
|
4
|
-
if (!canScrollX) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
const delta = Math.abs(event.deltaX) > Math.abs(event.deltaY) ? event.deltaX : event.deltaY;
|
|
8
|
-
node.scrollBy({ left: delta * (param.speed ?? 1), behavior: 'smooth' });
|
|
9
|
-
if (param.isolateScroll) {
|
|
10
|
-
event.preventDefault();
|
|
11
|
-
event.stopPropagation();
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
node.addEventListener('wheel', onWheel, { passive: false });
|
|
15
|
-
return {
|
|
16
|
-
destroy() {
|
|
17
|
-
node.removeEventListener('wheel', onWheel);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const swallowTouch = (node) => {
|
|
2
|
-
const stopAll = (e) => {
|
|
3
|
-
e.stopPropagation();
|
|
4
|
-
};
|
|
5
|
-
node.addEventListener('touchstart', stopAll, { passive: false });
|
|
6
|
-
node.addEventListener('touchmove', stopAll, { passive: false });
|
|
7
|
-
node.addEventListener('touchend', stopAll, { passive: false });
|
|
8
|
-
node.addEventListener('touchcancel', stopAll, { passive: false });
|
|
9
|
-
return {
|
|
10
|
-
destroy() {
|
|
11
|
-
node.removeEventListener('touchstart', stopAll);
|
|
12
|
-
node.removeEventListener('touchmove', stopAll);
|
|
13
|
-
node.removeEventListener('touchend', stopAll);
|
|
14
|
-
node.removeEventListener('touchcancel', stopAll);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
};
|
package/dist/core/browser.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const runningInBrowser: () => boolean;
|
package/dist/core/browser.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const runningInBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class ContinuationToken {
|
|
2
|
-
canLoadMore: boolean;
|
|
3
|
-
value: string | null;
|
|
4
|
-
private constructor();
|
|
5
|
-
static init(): ContinuationToken;
|
|
6
|
-
static fromPayload(value: string | null): ContinuationToken;
|
|
7
|
-
static preventLoading(): ContinuationToken;
|
|
8
|
-
toNextChunkString(): string | null | undefined;
|
|
9
|
-
toString(): string | null;
|
|
10
|
-
toJSON(): string | null;
|
|
11
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export class ContinuationToken {
|
|
2
|
-
canLoadMore;
|
|
3
|
-
value;
|
|
4
|
-
constructor(canLoadMore, value) {
|
|
5
|
-
this.canLoadMore = canLoadMore;
|
|
6
|
-
this.value = value;
|
|
7
|
-
}
|
|
8
|
-
static init() {
|
|
9
|
-
// initial state, no data is loaded so far
|
|
10
|
-
return new ContinuationToken(true, null);
|
|
11
|
-
}
|
|
12
|
-
static fromPayload(value) {
|
|
13
|
-
if (value?.length && value.length > 1 && value.length < 5000) {
|
|
14
|
-
// initialized with server response that there is more data, and value is valid
|
|
15
|
-
return new ContinuationToken(true, value);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
// initialized with server response that there is no more data or value is invalid
|
|
19
|
-
return new ContinuationToken(false, null);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
static preventLoading() {
|
|
23
|
-
// additional initilizer, to block further loading
|
|
24
|
-
return new ContinuationToken(false, null);
|
|
25
|
-
}
|
|
26
|
-
toNextChunkString() {
|
|
27
|
-
return this.canLoadMore ? this.value || undefined : this.value;
|
|
28
|
-
}
|
|
29
|
-
toString() {
|
|
30
|
-
return this.value;
|
|
31
|
-
}
|
|
32
|
-
toJSON() {
|
|
33
|
-
return this.value;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type CursorResult } from '../cursor-result';
|
|
2
|
-
import { ContinuationToken } from '../continuation-token';
|
|
3
|
-
import type { IDataLoader } from './data-loader';
|
|
4
|
-
export declare class CursorDataLoader<T> implements IDataLoader<T> {
|
|
5
|
-
items: T[];
|
|
6
|
-
continuationToken: ContinuationToken;
|
|
7
|
-
private loadPage;
|
|
8
|
-
private deferred;
|
|
9
|
-
constructor(init: {
|
|
10
|
-
loadPage: (continuationToken: ContinuationToken) => Promise<CursorResult<T> | null>;
|
|
11
|
-
});
|
|
12
|
-
loadMore: () => Promise<T[]>;
|
|
13
|
-
reset(): Promise<void>;
|
|
14
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {} from '../cursor-result';
|
|
2
|
-
import { Deferred } from '../deferred';
|
|
3
|
-
import { ContinuationToken } from '../continuation-token';
|
|
4
|
-
export class CursorDataLoader {
|
|
5
|
-
items = $state([]);
|
|
6
|
-
continuationToken = $state.raw(ContinuationToken.init());
|
|
7
|
-
loadPage;
|
|
8
|
-
deferred = null;
|
|
9
|
-
constructor(init) {
|
|
10
|
-
this.loadPage = init.loadPage;
|
|
11
|
-
}
|
|
12
|
-
loadMore = async () => {
|
|
13
|
-
if (this.deferred) {
|
|
14
|
-
return this.deferred.promise;
|
|
15
|
-
}
|
|
16
|
-
if (!this.continuationToken.canLoadMore) {
|
|
17
|
-
return [];
|
|
18
|
-
}
|
|
19
|
-
this.deferred = new Deferred();
|
|
20
|
-
let result = await this.loadPage(this.continuationToken);
|
|
21
|
-
if (!result) {
|
|
22
|
-
result = { items: [], continuationToken: ContinuationToken.preventLoading() };
|
|
23
|
-
}
|
|
24
|
-
this.continuationToken = result.continuationToken;
|
|
25
|
-
this.items = [...this.items, ...result.items];
|
|
26
|
-
this.deferred.resolve(result.items);
|
|
27
|
-
this.deferred = null;
|
|
28
|
-
return result.items;
|
|
29
|
-
};
|
|
30
|
-
async reset() {
|
|
31
|
-
this.items = [];
|
|
32
|
-
this.continuationToken = ContinuationToken.init();
|
|
33
|
-
await this.loadMore();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CursorDataLoader } from './cursor-data-loader.svelte';
|
package/dist/core/deferred.d.ts
DELETED
package/dist/core/deferred.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const preloadImage: (src: string, throwOnError?: boolean) => Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const preloadImage = (src, throwOnError = false) => {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
const img = new Image();
|
|
4
|
-
img.decoding = 'async';
|
|
5
|
-
img.loading = 'eager';
|
|
6
|
-
img.onload = () => resolve();
|
|
7
|
-
img.onerror = (e) => (throwOnError ? reject(e) : resolve());
|
|
8
|
-
img.src = src;
|
|
9
|
-
});
|
|
10
|
-
};
|
package/dist/core/locale.d.ts
DELETED
package/dist/core/locale.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class ImageHelper {
|
|
2
|
-
static checkIsVertical: (url: string) => Promise<boolean>;
|
|
3
|
-
static computeRatio: (src: string) => Promise<ImageSize | null>;
|
|
4
|
-
static getRatio: (metadata: ImageSize) => number;
|
|
5
|
-
}
|
|
6
|
-
type ImageSize = {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
};
|
|
10
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export class ImageHelper {
|
|
2
|
-
static checkIsVertical = async (url) => {
|
|
3
|
-
const ratio = await ImageHelper.computeRatio(url);
|
|
4
|
-
if (!ratio) {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
return ratio.height >= ratio.width;
|
|
8
|
-
};
|
|
9
|
-
static computeRatio = async (src) => {
|
|
10
|
-
const setRatio = (imageElement, resolveFn) => {
|
|
11
|
-
if (!imageElement || !imageElement.width) {
|
|
12
|
-
resolveFn(null);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
resolveFn({ width: imageElement.width, height: imageElement.height });
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
return new Promise((resolve) => {
|
|
19
|
-
const imageElement = new Image();
|
|
20
|
-
imageElement.onload = () => {
|
|
21
|
-
setRatio(imageElement, resolve);
|
|
22
|
-
};
|
|
23
|
-
imageElement.onerror = () => {
|
|
24
|
-
setRatio(null, resolve);
|
|
25
|
-
};
|
|
26
|
-
imageElement.src = src;
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
static getRatio = (metadata) => metadata.width / metadata.height;
|
|
30
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ImageScale } from '../enums';
|
|
2
|
-
import MobileDetect from 'mobile-detect';
|
|
3
|
-
export class ImageSizeDetectorService {
|
|
4
|
-
userAgent;
|
|
5
|
-
constructor(userAgent = null) {
|
|
6
|
-
this.userAgent = userAgent;
|
|
7
|
-
}
|
|
8
|
-
getImageSize() {
|
|
9
|
-
if (!this.userAgent) {
|
|
10
|
-
return ImageScale.OriginalEncoded;
|
|
11
|
-
}
|
|
12
|
-
const result = new MobileDetect(this.userAgent);
|
|
13
|
-
return result.mobile() ? ImageScale.Medium : ImageScale.OriginalEncoded;
|
|
14
|
-
}
|
|
15
|
-
}
|
package/dist/core/toastr.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const toastrWarning: (message: string) => void;
|
package/dist/core/toastr.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export const toastrWarning = (message) => {
|
|
2
|
-
const toast = document.createElement('div');
|
|
3
|
-
toast.innerHTML = `
|
|
4
|
-
<span>${message}</span>
|
|
5
|
-
<span style="margin-left: auto; cursor: pointer; color: #666;" onclick="this.parentElement.remove()">x</span>
|
|
6
|
-
`;
|
|
7
|
-
Object.assign(toast.style, {
|
|
8
|
-
display: 'flex',
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
gap: '8px',
|
|
11
|
-
background: 'white',
|
|
12
|
-
color: 'black',
|
|
13
|
-
borderRadius: '5px',
|
|
14
|
-
padding: '12px 16px',
|
|
15
|
-
boxShadow: '0 2px 10px rgba(0, 0, 0, 0.1)',
|
|
16
|
-
position: 'fixed',
|
|
17
|
-
bottom: '10px',
|
|
18
|
-
right: '10px',
|
|
19
|
-
width: '300px',
|
|
20
|
-
borderLeft: '4px solid #e0a800',
|
|
21
|
-
borderBottom: '4px solid #e0a800',
|
|
22
|
-
zIndex: 1000
|
|
23
|
-
});
|
|
24
|
-
document.body.appendChild(toast);
|
|
25
|
-
setTimeout(() => toast.remove(), 5000);
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { slideHorizontally } from './slide-horizontally';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { slideHorizontally } from './slide-horizontally';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { sineInOut } from 'svelte/easing';
|
|
2
|
-
import type { TransitionConfig } from 'svelte/transition';
|
|
3
|
-
export declare const slideHorizontally: (node: HTMLElement, { delay, duration, easing }?: {
|
|
4
|
-
delay?: number | undefined;
|
|
5
|
-
duration?: number | undefined;
|
|
6
|
-
easing?: typeof sineInOut | undefined;
|
|
7
|
-
}) => TransitionConfig;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { sineInOut } from 'svelte/easing';
|
|
2
|
-
export const slideHorizontally = (node, { delay = 0, duration = 400, easing = sineInOut } = {}) => {
|
|
3
|
-
const style = getComputedStyle(node);
|
|
4
|
-
const isHtmlElement = (node) => node.nodeType === Node.ELEMENT_NODE;
|
|
5
|
-
const children = Array.from(node.children).filter(isHtmlElement);
|
|
6
|
-
children.forEach((child) => {
|
|
7
|
-
const style = getComputedStyle(child);
|
|
8
|
-
child.style.width = style.width;
|
|
9
|
-
child.style.minWidth = style.width;
|
|
10
|
-
child.style.maxWidth = style.maxWidth;
|
|
11
|
-
});
|
|
12
|
-
const opacity = +style.opacity;
|
|
13
|
-
const width = parseFloat(style.width);
|
|
14
|
-
const padding_left = parseFloat(style.paddingLeft);
|
|
15
|
-
const padding_right = parseFloat(style.paddingRight);
|
|
16
|
-
const margin_left = parseFloat(style.marginLeft);
|
|
17
|
-
const margin_right = parseFloat(style.marginRight);
|
|
18
|
-
const border_left_width = parseFloat(style.borderLeftWidth);
|
|
19
|
-
const border_right_width = parseFloat(style.borderRightWidth);
|
|
20
|
-
let initialT = undefined;
|
|
21
|
-
let initialU = undefined;
|
|
22
|
-
return {
|
|
23
|
-
delay,
|
|
24
|
-
duration,
|
|
25
|
-
easing,
|
|
26
|
-
css: (t, u) => {
|
|
27
|
-
if (initialT === undefined) {
|
|
28
|
-
initialT = t;
|
|
29
|
-
}
|
|
30
|
-
if (initialU === undefined) {
|
|
31
|
-
initialU = u;
|
|
32
|
-
}
|
|
33
|
-
return ('overflow: hidden;' +
|
|
34
|
-
`opacity: ${Math.min(t, 1) * opacity};` +
|
|
35
|
-
`width: ${t * width}px;` +
|
|
36
|
-
`min-width: ${t * width}px;` +
|
|
37
|
-
`padding-left: ${t * padding_left}px;` +
|
|
38
|
-
`padding-right: ${t * padding_right}px;` +
|
|
39
|
-
`margin-left: ${t * margin_left}px;` +
|
|
40
|
-
`margin-right: ${t * margin_right}px;` +
|
|
41
|
-
`border-left-width: ${t * border_left_width}px;` +
|
|
42
|
-
`border-right-width: ${t * border_right_width}px;`);
|
|
43
|
-
},
|
|
44
|
-
// Clean up function to remove the wrapper when the transition is done
|
|
45
|
-
tick: (t, u) => {
|
|
46
|
-
if ((initialT === 0 && t === 1) || (initialU === 0 && u === 1)) {
|
|
47
|
-
children.forEach((child) => {
|
|
48
|
-
child.style.width = '';
|
|
49
|
-
child.style.minWidth = '';
|
|
50
|
-
child.style.maxWidth = '';
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare class ArrayHelper {
|
|
2
|
-
static distinct<T>(items: T[]): T[];
|
|
3
|
-
static distinctBy<T>(items: T[], keyFn: (elem: T) => unknown): T[];
|
|
4
|
-
static intersect<T>(arrays: T[][]): T[];
|
|
5
|
-
static assertHasValue<T>(value: T | null | undefined): value is T;
|
|
6
|
-
/**
|
|
7
|
-
* Find position ("from" and "to" indexes) of the element that was moved inside array (only one element should be moved)
|
|
8
|
-
*/
|
|
9
|
-
static findMovedElement(initial: unknown[], modified: unknown[]): {
|
|
10
|
-
from: number;
|
|
11
|
-
to: number;
|
|
12
|
-
} | undefined;
|
|
13
|
-
static moveArrayItem<T>(arr: T[], from: number, to: number): T[];
|
|
14
|
-
static replaceArrayItem<T>(arr: T[], originalItem: T, newItem: T): T[];
|
|
15
|
-
static randomElement<T>(arr: T[]): T;
|
|
16
|
-
static randomElements<T>(arr: T[], count: number): T[];
|
|
17
|
-
static sortArray<T>(array: T[], propertyFunc: (elem: T) => unknown): T[];
|
|
18
|
-
static sortArrayDescending<T>(array: T[], propertyFunc: (elem: T) => unknown): T[];
|
|
19
|
-
static groupBy<T>(array: T[], keyResolver: (elem: T) => string): Record<string, T[]>;
|
|
20
|
-
static repeat<T>(itemFn: (i: number) => T, length: number): T[];
|
|
21
|
-
static areEqual<T>(array1?: T[] | null, array2?: T[] | null): boolean;
|
|
22
|
-
private static sortArrayInternal;
|
|
23
|
-
}
|