snice 4.9.0 → 4.10.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/adapters/react/app-tiles.d.ts +28 -0
- package/adapters/react/app-tiles.d.ts.map +1 -0
- package/adapters/react/app-tiles.js +24 -0
- package/adapters/react/app-tiles.js.map +1 -0
- package/adapters/react/app-tiles.tsx +36 -0
- package/adapters/react/book.d.ts +28 -0
- package/adapters/react/book.d.ts.map +1 -0
- package/adapters/react/book.js +24 -0
- package/adapters/react/book.js.map +1 -0
- package/adapters/react/book.tsx +36 -0
- package/adapters/react/comments.d.ts +29 -0
- package/adapters/react/comments.d.ts.map +1 -0
- package/adapters/react/comments.js +24 -0
- package/adapters/react/comments.js.map +1 -0
- package/adapters/react/comments.tsx +37 -0
- package/adapters/react/components.d.ts +52 -0
- package/adapters/react/components.d.ts.map +1 -1
- package/adapters/react/components.js +26 -0
- package/adapters/react/components.js.map +1 -1
- package/adapters/react/components.ts +52 -0
- package/adapters/react/countdown.d.ts +31 -0
- package/adapters/react/countdown.d.ts.map +1 -0
- package/adapters/react/countdown.js +24 -0
- package/adapters/react/countdown.js.map +1 -0
- package/adapters/react/countdown.tsx +39 -0
- package/adapters/react/cropper.d.ts +29 -0
- package/adapters/react/cropper.d.ts.map +1 -0
- package/adapters/react/cropper.js +24 -0
- package/adapters/react/cropper.js.map +1 -0
- package/adapters/react/cropper.tsx +37 -0
- package/adapters/react/diff.d.ts +31 -0
- package/adapters/react/diff.d.ts.map +1 -0
- package/adapters/react/diff.js +24 -0
- package/adapters/react/diff.js.map +1 -0
- package/adapters/react/diff.tsx +39 -0
- package/adapters/react/flip-card.d.ts +28 -0
- package/adapters/react/flip-card.d.ts.map +1 -0
- package/adapters/react/flip-card.js +24 -0
- package/adapters/react/flip-card.js.map +1 -0
- package/adapters/react/flip-card.tsx +36 -0
- package/adapters/react/flow.d.ts +32 -0
- package/adapters/react/flow.d.ts.map +1 -0
- package/adapters/react/flow.js +24 -0
- package/adapters/react/flow.js.map +1 -0
- package/adapters/react/flow.tsx +40 -0
- package/adapters/react/gantt.d.ts +27 -0
- package/adapters/react/gantt.d.ts.map +1 -0
- package/adapters/react/gantt.js +24 -0
- package/adapters/react/gantt.js.map +1 -0
- package/adapters/react/gantt.tsx +35 -0
- package/adapters/react/map.d.ts +30 -0
- package/adapters/react/map.d.ts.map +1 -0
- package/adapters/react/map.js +24 -0
- package/adapters/react/map.js.map +1 -0
- package/adapters/react/map.tsx +38 -0
- package/adapters/react/markdown.d.ts +26 -0
- package/adapters/react/markdown.d.ts.map +1 -0
- package/adapters/react/markdown.js +24 -0
- package/adapters/react/markdown.js.map +1 -0
- package/adapters/react/markdown.tsx +34 -0
- package/adapters/react/notification-center.d.ts +26 -0
- package/adapters/react/notification-center.d.ts.map +1 -0
- package/adapters/react/notification-center.js +24 -0
- package/adapters/react/notification-center.js.map +1 -0
- package/adapters/react/notification-center.tsx +34 -0
- package/adapters/react/org-chart.d.ts +28 -0
- package/adapters/react/org-chart.d.ts.map +1 -0
- package/adapters/react/org-chart.js +24 -0
- package/adapters/react/org-chart.js.map +1 -0
- package/adapters/react/org-chart.tsx +36 -0
- package/adapters/react/pdf-viewer.d.ts +28 -0
- package/adapters/react/pdf-viewer.d.ts.map +1 -0
- package/adapters/react/pdf-viewer.js +24 -0
- package/adapters/react/pdf-viewer.js.map +1 -0
- package/adapters/react/pdf-viewer.tsx +36 -0
- package/adapters/react/podcast-player.d.ts +40 -0
- package/adapters/react/podcast-player.d.ts.map +1 -0
- package/adapters/react/podcast-player.js +24 -0
- package/adapters/react/podcast-player.js.map +1 -0
- package/adapters/react/podcast-player.tsx +48 -0
- package/adapters/react/pricing-table.d.ts +27 -0
- package/adapters/react/pricing-table.d.ts.map +1 -0
- package/adapters/react/pricing-table.js +24 -0
- package/adapters/react/pricing-table.js.map +1 -0
- package/adapters/react/pricing-table.tsx +35 -0
- package/adapters/react/rating.d.ts +30 -0
- package/adapters/react/rating.d.ts.map +1 -0
- package/adapters/react/rating.js +24 -0
- package/adapters/react/rating.js.map +1 -0
- package/adapters/react/rating.tsx +38 -0
- package/adapters/react/recipe.d.ts +43 -0
- package/adapters/react/recipe.d.ts.map +1 -0
- package/adapters/react/recipe.js +24 -0
- package/adapters/react/recipe.js.map +1 -0
- package/adapters/react/recipe.tsx +51 -0
- package/adapters/react/sortable.d.ts +28 -0
- package/adapters/react/sortable.d.ts.map +1 -0
- package/adapters/react/sortable.js +24 -0
- package/adapters/react/sortable.js.map +1 -0
- package/adapters/react/sortable.tsx +36 -0
- package/adapters/react/spotlight.d.ts +27 -0
- package/adapters/react/spotlight.d.ts.map +1 -0
- package/adapters/react/spotlight.js +24 -0
- package/adapters/react/spotlight.js.map +1 -0
- package/adapters/react/spotlight.tsx +35 -0
- package/adapters/react/spreadsheet.d.ts +27 -0
- package/adapters/react/spreadsheet.d.ts.map +1 -0
- package/adapters/react/spreadsheet.js +24 -0
- package/adapters/react/spreadsheet.js.map +1 -0
- package/adapters/react/spreadsheet.tsx +35 -0
- package/adapters/react/tag-input.d.ts +33 -0
- package/adapters/react/tag-input.d.ts.map +1 -0
- package/adapters/react/tag-input.js +24 -0
- package/adapters/react/tag-input.js.map +1 -0
- package/adapters/react/tag-input.tsx +41 -0
- package/adapters/react/testimonial.d.ts +31 -0
- package/adapters/react/testimonial.d.ts.map +1 -0
- package/adapters/react/testimonial.js +24 -0
- package/adapters/react/testimonial.js.map +1 -0
- package/adapters/react/testimonial.tsx +39 -0
- package/adapters/react/video-player.d.ts +34 -0
- package/adapters/react/video-player.d.ts.map +1 -0
- package/adapters/react/video-player.js +24 -0
- package/adapters/react/video-player.js.map +1 -0
- package/adapters/react/video-player.tsx +42 -0
- package/adapters/react/waterfall.d.ts +29 -0
- package/adapters/react/waterfall.d.ts.map +1 -0
- package/adapters/react/waterfall.js +24 -0
- package/adapters/react/waterfall.js.map +1 -0
- package/adapters/react/waterfall.tsx +37 -0
- package/adapters/react/weather.d.ts +27 -0
- package/adapters/react/weather.d.ts.map +1 -0
- package/adapters/react/weather.js +24 -0
- package/adapters/react/weather.js.map +1 -0
- package/adapters/react/weather.tsx +35 -0
- package/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/accordion/snice-accordion.min.js +1 -1
- package/dist/cdn/alert/snice-alert.js +1 -1
- package/dist/cdn/alert/snice-alert.min.js +1 -1
- package/dist/cdn/app-tiles/README.md +27 -0
- package/dist/cdn/app-tiles/snice-app-tiles.js +333 -0
- package/dist/cdn/app-tiles/snice-app-tiles.js.map +1 -0
- package/dist/cdn/app-tiles/snice-app-tiles.min.js +11 -0
- package/dist/cdn/app-tiles/snice-app-tiles.min.js.map +1 -0
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
- package/dist/cdn/avatar/snice-avatar.js +1 -1
- package/dist/cdn/avatar/snice-avatar.min.js +1 -1
- package/dist/cdn/badge/snice-badge.js +1 -1
- package/dist/cdn/badge/snice-badge.min.js +1 -1
- package/dist/cdn/banner/snice-banner.js +1 -1
- package/dist/cdn/banner/snice-banner.min.js +1 -1
- package/dist/cdn/book/README.md +27 -0
- package/dist/cdn/book/snice-book.js +353 -0
- package/dist/cdn/book/snice-book.js.map +1 -0
- package/dist/cdn/book/snice-book.min.js +13 -0
- package/dist/cdn/book/snice-book.min.js.map +1 -0
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +1 -1
- package/dist/cdn/button/snice-button.js +1 -1
- package/dist/cdn/button/snice-button.min.js +1 -1
- package/dist/cdn/calendar/snice-calendar.js +1 -1
- package/dist/cdn/calendar/snice-calendar.min.js +1 -1
- package/dist/cdn/camera/snice-camera.js +1 -1
- package/dist/cdn/camera/snice-camera.min.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.min.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.min.js +1 -1
- package/dist/cdn/card/snice-card.js +1 -1
- package/dist/cdn/card/snice-card.min.js +1 -1
- package/dist/cdn/carousel/snice-carousel.js +1 -1
- package/dist/cdn/carousel/snice-carousel.min.js +1 -1
- package/dist/cdn/chart/snice-chart.js +1 -1
- package/dist/cdn/chart/snice-chart.min.js +1 -1
- package/dist/cdn/chat/snice-chat.js +1 -1
- package/dist/cdn/chat/snice-chat.min.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.min.js +1 -1
- package/dist/cdn/chip/snice-chip.js +1 -1
- package/dist/cdn/chip/snice-chip.min.js +1 -1
- package/dist/cdn/code-block/snice-code-block.js +1 -1
- package/dist/cdn/code-block/snice-code-block.min.js +1 -1
- package/dist/cdn/color-display/snice-color-display.js +1 -1
- package/dist/cdn/color-display/snice-color-display.min.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.min.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.min.js +1 -1
- package/dist/cdn/comments/README.md +27 -0
- package/dist/cdn/comments/snice-comments.js +544 -0
- package/dist/cdn/comments/snice-comments.js.map +1 -0
- package/dist/cdn/comments/snice-comments.min.js +100 -0
- package/dist/cdn/comments/snice-comments.min.js.map +1 -0
- package/dist/cdn/countdown/README.md +27 -0
- package/dist/cdn/countdown/snice-countdown.js +235 -0
- package/dist/cdn/countdown/snice-countdown.js.map +1 -0
- package/dist/cdn/countdown/snice-countdown.min.js +14 -0
- package/dist/cdn/countdown/snice-countdown.min.js.map +1 -0
- package/dist/cdn/cropper/README.md +27 -0
- package/dist/cdn/cropper/snice-cropper.js +352 -0
- package/dist/cdn/cropper/snice-cropper.js.map +1 -0
- package/dist/cdn/cropper/snice-cropper.min.js +25 -0
- package/dist/cdn/cropper/snice-cropper.min.js.map +1 -0
- package/dist/cdn/date-picker/snice-date-picker.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.min.js +1 -1
- package/dist/cdn/diff/README.md +27 -0
- package/dist/cdn/diff/snice-diff.js +441 -0
- package/dist/cdn/diff/snice-diff.js.map +1 -0
- package/dist/cdn/diff/snice-diff.min.js +54 -0
- package/dist/cdn/diff/snice-diff.min.js.map +1 -0
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/divider/snice-divider.min.js +1 -1
- package/dist/cdn/doc/snice-doc.js +1 -1
- package/dist/cdn/doc/snice-doc.min.js +1 -1
- package/dist/cdn/draw/snice-draw.js +1 -1
- package/dist/cdn/draw/snice-draw.min.js +1 -1
- package/dist/cdn/drawer/snice-drawer.js +1 -1
- package/dist/cdn/drawer/snice-drawer.min.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
- package/dist/cdn/flip-card/README.md +27 -0
- package/dist/cdn/flip-card/snice-flip-card.js +183 -0
- package/dist/cdn/flip-card/snice-flip-card.js.map +1 -0
- package/dist/cdn/flip-card/snice-flip-card.min.js +22 -0
- package/dist/cdn/flip-card/snice-flip-card.min.js.map +1 -0
- package/dist/cdn/flow/README.md +27 -0
- package/dist/cdn/flow/snice-flow.js +822 -0
- package/dist/cdn/flow/snice-flow.js.map +1 -0
- package/dist/cdn/flow/snice-flow.min.js +17 -0
- package/dist/cdn/flow/snice-flow.min.js.map +1 -0
- package/dist/cdn/funnel/snice-funnel.js +1 -1
- package/dist/cdn/funnel/snice-funnel.min.js +1 -1
- package/dist/cdn/gantt/README.md +27 -0
- package/dist/cdn/gantt/snice-gantt.js +436 -0
- package/dist/cdn/gantt/snice-gantt.js.map +1 -0
- package/dist/cdn/gantt/snice-gantt.min.js +60 -0
- package/dist/cdn/gantt/snice-gantt.min.js.map +1 -0
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/gauge/snice-gauge.min.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.min.js +1 -1
- package/dist/cdn/image/snice-image.js +1 -1
- package/dist/cdn/image/snice-image.min.js +1 -1
- package/dist/cdn/input/snice-input.js +1 -1
- package/dist/cdn/input/snice-input.min.js +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/kanban/snice-kanban.min.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js +1 -1
- package/dist/cdn/kpi/snice-kpi.min.js +1 -1
- package/dist/cdn/layout/snice-layout.js +1 -1
- package/dist/cdn/layout/snice-layout.min.js +1 -1
- package/dist/cdn/link/snice-link.js +1 -1
- package/dist/cdn/link/snice-link.min.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.min.js +1 -1
- package/dist/cdn/list/snice-list.js +1 -1
- package/dist/cdn/list/snice-list.min.js +1 -1
- package/dist/cdn/location/snice-location.js +1 -1
- package/dist/cdn/location/snice-location.min.js +1 -1
- package/dist/cdn/login/snice-login.js +1 -1
- package/dist/cdn/login/snice-login.min.js +1 -1
- package/dist/cdn/map/README.md +27 -0
- package/dist/cdn/map/snice-map.js +415 -0
- package/dist/cdn/map/snice-map.js.map +1 -0
- package/dist/cdn/map/snice-map.min.js +52 -0
- package/dist/cdn/map/snice-map.min.js.map +1 -0
- package/dist/cdn/markdown/README.md +27 -0
- package/dist/cdn/markdown/snice-markdown.js +317 -0
- package/dist/cdn/markdown/snice-markdown.js.map +1 -0
- package/dist/cdn/markdown/snice-markdown.min.js +11 -0
- package/dist/cdn/markdown/snice-markdown.min.js.map +1 -0
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/masonry/snice-masonry.min.js +1 -1
- package/dist/cdn/menu/snice-menu.js +1 -1
- package/dist/cdn/menu/snice-menu.min.js +1 -1
- package/dist/cdn/modal/snice-modal.js +1 -1
- package/dist/cdn/modal/snice-modal.min.js +1 -1
- package/dist/cdn/music-player/snice-music-player.js +1 -1
- package/dist/cdn/music-player/snice-music-player.min.js +1 -1
- package/dist/cdn/nav/snice-nav.js +1 -1
- package/dist/cdn/nav/snice-nav.min.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.min.js +1 -1
- package/dist/cdn/notification-center/README.md +27 -0
- package/dist/cdn/notification-center/snice-notification-center.js +204 -0
- package/dist/cdn/notification-center/snice-notification-center.js.map +1 -0
- package/dist/cdn/notification-center/snice-notification-center.min.js +33 -0
- package/dist/cdn/notification-center/snice-notification-center.min.js.map +1 -0
- package/dist/cdn/org-chart/README.md +27 -0
- package/dist/cdn/org-chart/snice-org-chart.js +294 -0
- package/dist/cdn/org-chart/snice-org-chart.js.map +1 -0
- package/dist/cdn/org-chart/snice-org-chart.min.js +32 -0
- package/dist/cdn/org-chart/snice-org-chart.min.js.map +1 -0
- package/dist/cdn/pagination/snice-pagination.js +1 -1
- package/dist/cdn/pagination/snice-pagination.min.js +1 -1
- package/dist/cdn/paint/snice-paint.js +1 -1
- package/dist/cdn/paint/snice-paint.min.js +1 -1
- package/dist/cdn/pdf-viewer/README.md +27 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +594 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js.map +1 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +88 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js.map +1 -0
- package/dist/cdn/podcast-player/README.md +27 -0
- package/dist/cdn/podcast-player/snice-podcast-player.js +835 -0
- package/dist/cdn/podcast-player/snice-podcast-player.js.map +1 -0
- package/dist/cdn/podcast-player/snice-podcast-player.min.js +209 -0
- package/dist/cdn/podcast-player/snice-podcast-player.min.js.map +1 -0
- package/dist/cdn/pricing-table/README.md +27 -0
- package/dist/cdn/pricing-table/snice-pricing-table.js +491 -0
- package/dist/cdn/pricing-table/snice-pricing-table.js.map +1 -0
- package/dist/cdn/pricing-table/snice-pricing-table.min.js +141 -0
- package/dist/cdn/pricing-table/snice-pricing-table.min.js.map +1 -0
- package/dist/cdn/progress/snice-progress.js +1 -1
- package/dist/cdn/progress/snice-progress.min.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.min.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.min.js +1 -1
- package/dist/cdn/radio/snice-radio.js +1 -1
- package/dist/cdn/radio/snice-radio.min.js +1 -1
- package/dist/cdn/rating/README.md +27 -0
- package/dist/cdn/rating/snice-rating.js +210 -0
- package/dist/cdn/rating/snice-rating.js.map +1 -0
- package/dist/cdn/rating/snice-rating.min.js +25 -0
- package/dist/cdn/rating/snice-rating.min.js.map +1 -0
- package/dist/cdn/recipe/README.md +27 -0
- package/dist/cdn/recipe/snice-recipe.js +619 -0
- package/dist/cdn/recipe/snice-recipe.js.map +1 -0
- package/dist/cdn/recipe/snice-recipe.min.js +185 -0
- package/dist/cdn/recipe/snice-recipe.min.js.map +1 -0
- package/dist/cdn/runtime/snice-runtime.esm.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +3 -3
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
- package/dist/cdn/sankey/snice-sankey.js +1 -1
- package/dist/cdn/sankey/snice-sankey.min.js +1 -1
- package/dist/cdn/select/snice-select.js +1 -1
- package/dist/cdn/select/snice-select.min.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.min.js +1 -1
- package/dist/cdn/slider/snice-slider.js +1 -1
- package/dist/cdn/slider/snice-slider.min.js +1 -1
- package/dist/cdn/sortable/README.md +27 -0
- package/dist/cdn/sortable/snice-sortable.js +254 -0
- package/dist/cdn/sortable/snice-sortable.js.map +1 -0
- package/dist/cdn/sortable/snice-sortable.min.js +12 -0
- package/dist/cdn/sortable/snice-sortable.min.js.map +1 -0
- package/dist/cdn/sparkline/snice-sparkline.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
- package/dist/cdn/spinner/snice-spinner.js +1 -1
- package/dist/cdn/spinner/snice-spinner.min.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
- package/dist/cdn/spotlight/README.md +27 -0
- package/dist/cdn/spotlight/snice-spotlight.js +397 -0
- package/dist/cdn/spotlight/snice-spotlight.js.map +1 -0
- package/dist/cdn/spotlight/snice-spotlight.min.js +8 -0
- package/dist/cdn/spotlight/snice-spotlight.min.js.map +1 -0
- package/dist/cdn/spreadsheet/README.md +27 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.js +1171 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.js.map +1 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +30 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js.map +1 -0
- package/dist/cdn/stepper/snice-stepper.js +1 -1
- package/dist/cdn/stepper/snice-stepper.min.js +1 -1
- package/dist/cdn/switch/snice-switch.js +1 -1
- package/dist/cdn/switch/snice-switch.min.js +1 -1
- package/dist/cdn/table/snice-table.js +1 -1
- package/dist/cdn/table/snice-table.min.js +1 -1
- package/dist/cdn/tabs/snice-tabs.js +1 -1
- package/dist/cdn/tabs/snice-tabs.min.js +1 -1
- package/dist/cdn/tag-input/README.md +27 -0
- package/dist/cdn/tag-input/snice-tag-input.js +387 -0
- package/dist/cdn/tag-input/snice-tag-input.js.map +1 -0
- package/dist/cdn/tag-input/snice-tag-input.min.js +65 -0
- package/dist/cdn/tag-input/snice-tag-input.min.js.map +1 -0
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/testimonial/README.md +27 -0
- package/dist/cdn/testimonial/snice-testimonial.js +187 -0
- package/dist/cdn/testimonial/snice-testimonial.js.map +1 -0
- package/dist/cdn/testimonial/snice-testimonial.min.js +21 -0
- package/dist/cdn/testimonial/snice-testimonial.min.js.map +1 -0
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/textarea/snice-textarea.min.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.min.js +1 -1
- package/dist/cdn/timeline/snice-timeline.js +1 -1
- package/dist/cdn/timeline/snice-timeline.min.js +1 -1
- package/dist/cdn/timer/snice-timer.js +1 -1
- package/dist/cdn/timer/snice-timer.min.js +1 -1
- package/dist/cdn/toast/snice-toast.js +1 -1
- package/dist/cdn/toast/snice-toast.min.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
- package/dist/cdn/tree/snice-tree.js +1 -1
- package/dist/cdn/tree/snice-tree.min.js +1 -1
- package/dist/cdn/treemap/snice-treemap.js +1 -1
- package/dist/cdn/treemap/snice-treemap.min.js +1 -1
- package/dist/cdn/video-player/README.md +27 -0
- package/dist/cdn/video-player/snice-video-player.js +721 -0
- package/dist/cdn/video-player/snice-video-player.js.map +1 -0
- package/dist/cdn/video-player/snice-video-player.min.js +153 -0
- package/dist/cdn/video-player/snice-video-player.min.js.map +1 -0
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +1 -1
- package/dist/cdn/waterfall/README.md +27 -0
- package/dist/cdn/waterfall/snice-waterfall.js +292 -0
- package/dist/cdn/waterfall/snice-waterfall.js.map +1 -0
- package/dist/cdn/waterfall/snice-waterfall.min.js +12 -0
- package/dist/cdn/waterfall/snice-waterfall.min.js.map +1 -0
- package/dist/cdn/weather/README.md +27 -0
- package/dist/cdn/weather/snice-weather.js +194 -0
- package/dist/cdn/weather/snice-weather.js.map +1 -0
- package/dist/cdn/weather/snice-weather.min.js +42 -0
- package/dist/cdn/weather/snice-weather.min.js.map +1 -0
- package/dist/components/app-tiles/snice-app-tiles.d.ts +36 -0
- package/dist/components/app-tiles/snice-app-tiles.js +265 -0
- package/dist/components/app-tiles/snice-app-tiles.js.map +1 -0
- package/dist/components/app-tiles/snice-app-tiles.types.d.ts +22 -0
- package/dist/components/book/snice-book.d.ts +46 -0
- package/dist/components/book/snice-book.js +285 -0
- package/dist/components/book/snice-book.js.map +1 -0
- package/dist/components/book/snice-book.types.d.ts +21 -0
- package/dist/components/comments/snice-comments.d.ts +62 -0
- package/dist/components/comments/snice-comments.js +476 -0
- package/dist/components/comments/snice-comments.js.map +1 -0
- package/dist/components/comments/snice-comments.types.d.ts +64 -0
- package/dist/components/countdown/snice-countdown.d.ts +21 -0
- package/dist/components/countdown/snice-countdown.js +168 -0
- package/dist/components/countdown/snice-countdown.js.map +1 -0
- package/dist/components/countdown/snice-countdown.types.d.ts +18 -0
- package/dist/components/cropper/snice-cropper.d.ts +32 -0
- package/dist/components/cropper/snice-cropper.js +285 -0
- package/dist/components/cropper/snice-cropper.js.map +1 -0
- package/dist/components/cropper/snice-cropper.types.d.ts +26 -0
- package/dist/components/diff/snice-diff.d.ts +32 -0
- package/dist/components/diff/snice-diff.js +374 -0
- package/dist/components/diff/snice-diff.js.map +1 -0
- package/dist/components/diff/snice-diff.types.d.ts +26 -0
- package/dist/components/flip-card/snice-flip-card.d.ts +15 -0
- package/dist/components/flip-card/snice-flip-card.js +116 -0
- package/dist/components/flip-card/snice-flip-card.js.map +1 -0
- package/dist/components/flip-card/snice-flip-card.types.d.ts +16 -0
- package/dist/components/flow/snice-flow.d.ts +91 -0
- package/dist/components/flow/snice-flow.js +755 -0
- package/dist/components/flow/snice-flow.js.map +1 -0
- package/dist/components/flow/snice-flow.types.d.ts +64 -0
- package/dist/components/gantt/snice-gantt.d.ts +34 -0
- package/dist/components/gantt/snice-gantt.js +369 -0
- package/dist/components/gantt/snice-gantt.js.map +1 -0
- package/dist/components/gantt/snice-gantt.types.d.ts +37 -0
- package/dist/components/map/snice-map.d.ts +44 -0
- package/dist/components/map/snice-map.js +348 -0
- package/dist/components/map/snice-map.js.map +1 -0
- package/dist/components/map/snice-map.types.d.ts +41 -0
- package/dist/components/markdown/snice-markdown.d.ts +24 -0
- package/dist/components/markdown/snice-markdown.js +250 -0
- package/dist/components/markdown/snice-markdown.js.map +1 -0
- package/dist/components/markdown/snice-markdown.types.d.ts +16 -0
- package/dist/components/notification-center/snice-notification-center.d.ts +18 -0
- package/dist/components/notification-center/snice-notification-center.js +137 -0
- package/dist/components/notification-center/snice-notification-center.js.map +1 -0
- package/dist/components/notification-center/snice-notification-center.types.d.ts +24 -0
- package/dist/components/org-chart/snice-org-chart.d.ts +28 -0
- package/dist/components/org-chart/snice-org-chart.js +227 -0
- package/dist/components/org-chart/snice-org-chart.js.map +1 -0
- package/dist/components/org-chart/snice-org-chart.types.d.ts +28 -0
- package/dist/components/pdf-viewer/pdf.min.mjs +21 -0
- package/dist/components/pdf-viewer/pdf.worker.min.mjs +21 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.d.ts +59 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.js +527 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.js.map +1 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.types.d.ts +25 -0
- package/dist/components/podcast-player/snice-podcast-player.d.ts +72 -0
- package/dist/components/podcast-player/snice-podcast-player.js +768 -0
- package/dist/components/podcast-player/snice-podcast-player.js.map +1 -0
- package/dist/components/podcast-player/snice-podcast-player.types.d.ts +79 -0
- package/dist/components/pricing-table/snice-pricing-table.d.ts +51 -0
- package/dist/components/pricing-table/snice-pricing-table.js +422 -0
- package/dist/components/pricing-table/snice-pricing-table.js.map +1 -0
- package/dist/components/pricing-table/snice-pricing-table.types.d.ts +49 -0
- package/dist/components/rating/snice-rating.d.ts +15 -0
- package/dist/components/rating/snice-rating.js +143 -0
- package/dist/components/rating/snice-rating.js.map +1 -0
- package/dist/components/rating/snice-rating.types.d.ts +15 -0
- package/dist/components/recipe/snice-recipe.d.ts +53 -0
- package/dist/components/recipe/snice-recipe.js +552 -0
- package/dist/components/recipe/snice-recipe.js.map +1 -0
- package/dist/components/recipe/snice-recipe.types.d.ts +56 -0
- package/dist/components/sortable/snice-sortable.d.ts +24 -0
- package/dist/components/sortable/snice-sortable.js +187 -0
- package/dist/components/sortable/snice-sortable.js.map +1 -0
- package/dist/components/sortable/snice-sortable.types.d.ts +20 -0
- package/dist/components/spotlight/snice-spotlight.d.ts +42 -0
- package/dist/components/spotlight/snice-spotlight.js +330 -0
- package/dist/components/spotlight/snice-spotlight.js.map +1 -0
- package/dist/components/spotlight/snice-spotlight.types.d.ts +26 -0
- package/dist/components/spreadsheet/snice-spreadsheet.d.ts +102 -0
- package/dist/components/spreadsheet/snice-spreadsheet.js +1104 -0
- package/dist/components/spreadsheet/snice-spreadsheet.js.map +1 -0
- package/dist/components/spreadsheet/snice-spreadsheet.types.d.ts +54 -0
- package/dist/components/tag-input/snice-tag-input.d.ts +40 -0
- package/dist/components/tag-input/snice-tag-input.js +320 -0
- package/dist/components/tag-input/snice-tag-input.js.map +1 -0
- package/dist/components/tag-input/snice-tag-input.types.d.ts +29 -0
- package/dist/components/testimonial/snice-testimonial.d.ts +15 -0
- package/dist/components/testimonial/snice-testimonial.js +120 -0
- package/dist/components/testimonial/snice-testimonial.js.map +1 -0
- package/dist/components/testimonial/snice-testimonial.types.d.ts +10 -0
- package/dist/components/video-player/snice-video-player.d.ts +78 -0
- package/dist/components/video-player/snice-video-player.js +654 -0
- package/dist/components/video-player/snice-video-player.js.map +1 -0
- package/dist/components/video-player/snice-video-player.types.d.ts +47 -0
- package/dist/components/waterfall/snice-waterfall.d.ts +30 -0
- package/dist/components/waterfall/snice-waterfall.js +225 -0
- package/dist/components/waterfall/snice-waterfall.js.map +1 -0
- package/dist/components/waterfall/snice-waterfall.types.d.ts +23 -0
- package/dist/components/weather/snice-weather.d.ts +10 -0
- package/dist/components/weather/snice-weather.js +127 -0
- package/dist/components/weather/snice-weather.js.map +1 -0
- package/dist/components/weather/snice-weather.types.d.ts +22 -0
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/DEVELOPMENT.md +1 -1
- package/docs/ai/api.md +6 -3
- package/docs/ai/components/accordion.md +0 -34
- package/docs/ai/components/app-tiles.md +77 -0
- package/docs/ai/components/audio-recorder.md +2 -0
- package/docs/ai/components/badge.md +7 -0
- package/docs/ai/components/book.md +78 -0
- package/docs/ai/components/button.md +5 -0
- package/docs/ai/components/chart.md +0 -24
- package/docs/ai/components/chat.md +7 -95
- package/docs/ai/components/code-block.md +3 -82
- package/docs/ai/components/color-display.md +3 -3
- package/docs/ai/components/color-picker.md +4 -4
- package/docs/ai/components/comments.md +75 -0
- package/docs/ai/components/countdown.md +54 -0
- package/docs/ai/components/cropper.md +57 -0
- package/docs/ai/components/date-picker.md +15 -9
- package/docs/ai/components/diff.md +66 -0
- package/docs/ai/components/divider.md +1 -1
- package/docs/ai/components/draw.md +5 -5
- package/docs/ai/components/drawer.md +5 -5
- package/docs/ai/components/empty-state.md +2 -2
- package/docs/ai/components/file-gallery.md +16 -87
- package/docs/ai/components/file-upload.md +6 -6
- package/docs/ai/components/flip-card.md +52 -0
- package/docs/ai/components/flow.md +104 -0
- package/docs/ai/components/funnel.md +3 -3
- package/docs/ai/components/gantt.md +63 -0
- package/docs/ai/components/gauge.md +1 -1
- package/docs/ai/components/heatmap.md +5 -5
- package/docs/ai/components/input.md +20 -18
- package/docs/ai/components/kanban.md +2 -2
- package/docs/ai/components/kpi.md +4 -53
- package/docs/ai/components/layout.md +10 -235
- package/docs/ai/components/link-preview.md +20 -29
- package/docs/ai/components/link.md +27 -47
- package/docs/ai/components/list.md +51 -31
- package/docs/ai/components/location.md +15 -27
- package/docs/ai/components/login.md +43 -94
- package/docs/ai/components/map.md +72 -0
- package/docs/ai/components/markdown.md +63 -0
- package/docs/ai/components/masonry.md +10 -6
- package/docs/ai/components/menu.md +40 -72
- package/docs/ai/components/modal.md +25 -42
- package/docs/ai/components/music-player.md +37 -89
- package/docs/ai/components/nav.md +25 -39
- package/docs/ai/components/network-graph.md +39 -43
- package/docs/ai/components/notification-center.md +79 -0
- package/docs/ai/components/org-chart.md +62 -0
- package/docs/ai/components/pagination.md +16 -18
- package/docs/ai/components/pdf-viewer.md +57 -0
- package/docs/ai/components/podcast-player.md +94 -0
- package/docs/ai/components/pricing-table.md +87 -0
- package/docs/ai/components/progress.md +23 -39
- package/docs/ai/components/qr-code.md +37 -84
- package/docs/ai/components/qr-reader.md +51 -61
- package/docs/ai/components/radio.md +27 -39
- package/docs/ai/components/rating.md +56 -0
- package/docs/ai/components/recipe.md +90 -0
- package/docs/ai/components/skeleton.md +0 -8
- package/docs/ai/components/slider.md +10 -50
- package/docs/ai/components/sortable.md +57 -0
- package/docs/ai/components/sparkline.md +26 -152
- package/docs/ai/components/spinner.md +0 -21
- package/docs/ai/components/split-pane.md +16 -38
- package/docs/ai/components/spotlight.md +61 -0
- package/docs/ai/components/spreadsheet.md +138 -0
- package/docs/ai/components/stepper.md +37 -183
- package/docs/ai/components/switch.md +28 -35
- package/docs/ai/components/table.md +43 -172
- package/docs/ai/components/tabs.md +31 -52
- package/docs/ai/components/tag-input.md +70 -0
- package/docs/ai/components/terminal.md +34 -116
- package/docs/ai/components/testimonial.md +56 -0
- package/docs/ai/components/textarea.md +11 -43
- package/docs/ai/components/theme.md +120 -0
- package/docs/ai/components/time-range-picker.md +17 -49
- package/docs/ai/components/timeline.md +7 -46
- package/docs/ai/components/timer.md +41 -37
- package/docs/ai/components/toast.md +19 -90
- package/docs/ai/components/tooltip.md +17 -104
- package/docs/ai/components/tree.md +38 -162
- package/docs/ai/components/treemap.md +23 -44
- package/docs/ai/components/video-player.md +91 -0
- package/docs/ai/components/virtual-scroller.md +23 -46
- package/docs/ai/components/waterfall.md +56 -0
- package/docs/ai/components/weather.md +78 -0
- package/docs/ai/decorators.md +25 -3
- package/docs/ai/patterns.md +17 -1
- package/docs/components/accordion.md +8 -6
- package/docs/components/alert.md +2 -0
- package/docs/components/app-tiles.md +162 -0
- package/docs/components/audio-recorder.md +6 -0
- package/docs/components/avatar.md +225 -0
- package/docs/components/badge.md +2 -0
- package/docs/components/banner.md +2 -0
- package/docs/components/book.md +184 -0
- package/docs/components/breadcrumbs.md +2 -0
- package/docs/components/button.md +15 -0
- package/docs/components/calendar.md +2 -0
- package/docs/components/camera-annotate.md +2 -0
- package/docs/components/camera.md +2 -0
- package/docs/components/candlestick.md +2 -0
- package/docs/components/card.md +2 -0
- package/docs/components/carousel.md +205 -36
- package/docs/components/chart.md +2 -0
- package/docs/components/chat.md +2 -0
- package/docs/components/checkbox.md +2 -0
- package/docs/components/chip.md +2 -0
- package/docs/components/code-block.md +2 -0
- package/docs/components/color-display.md +2 -0
- package/docs/components/color-picker.md +6 -4
- package/docs/components/command-palette.md +2 -0
- package/docs/components/comments.md +235 -0
- package/docs/components/countdown.md +121 -0
- package/docs/components/cropper.md +152 -0
- package/docs/components/date-picker.md +201 -0
- package/docs/components/diff.md +177 -0
- package/docs/components/divider.md +132 -0
- package/docs/components/doc.md +2 -0
- package/docs/components/draw.md +2 -0
- package/docs/components/drawer.md +2 -0
- package/docs/components/empty-state.md +2 -0
- package/docs/components/file-gallery.md +2 -0
- package/docs/components/file-upload.md +2 -0
- package/docs/components/flip-card.md +169 -0
- package/docs/components/flow.md +208 -0
- package/docs/components/funnel.md +2 -0
- package/docs/components/gantt.md +187 -0
- package/docs/components/gauge.md +2 -0
- package/docs/components/heatmap.md +2 -0
- package/docs/components/image.md +2 -0
- package/docs/components/input.md +242 -0
- package/docs/components/kanban.md +2 -0
- package/docs/components/kpi.md +2 -0
- package/docs/components/layout.md +84 -0
- package/docs/components/link-preview.md +66 -92
- package/docs/components/link.md +73 -157
- package/docs/components/list.md +140 -44
- package/docs/components/location.md +96 -283
- package/docs/components/login.md +131 -498
- package/docs/components/map.md +203 -0
- package/docs/components/markdown.md +220 -0
- package/docs/components/masonry.md +57 -102
- package/docs/components/menu.md +87 -494
- package/docs/components/modal.md +83 -436
- package/docs/components/music-player.md +116 -221
- package/docs/components/nav.md +107 -170
- package/docs/components/network-graph.md +83 -111
- package/docs/components/notification-center.md +256 -0
- package/docs/components/org-chart.md +275 -0
- package/docs/components/pagination.md +75 -218
- package/docs/components/paint.md +108 -73
- package/docs/components/pdf-viewer.md +204 -0
- package/docs/components/podcast-player.md +277 -0
- package/docs/components/pricing-table.md +249 -0
- package/docs/components/progress.md +169 -0
- package/docs/components/qr-code.md +95 -378
- package/docs/components/qr-reader.md +83 -258
- package/docs/components/radio.md +151 -0
- package/docs/components/rating.md +154 -0
- package/docs/components/recipe.md +323 -0
- package/docs/components/sankey.md +84 -107
- package/docs/components/select.md +114 -485
- package/docs/components/skeleton.md +96 -0
- package/docs/components/slider.md +92 -235
- package/docs/components/sortable.md +267 -0
- package/docs/components/sparkline.md +76 -222
- package/docs/components/spinner.md +37 -18
- package/docs/components/split-pane.md +62 -226
- package/docs/components/spotlight.md +240 -0
- package/docs/components/spreadsheet.md +405 -0
- package/docs/components/stepper.md +72 -306
- package/docs/components/switch.md +69 -293
- package/docs/components/table.md +250 -0
- package/docs/components/tabs.md +92 -471
- package/docs/components/tag-input.md +257 -0
- package/docs/components/terminal.md +87 -391
- package/docs/components/testimonial.md +185 -0
- package/docs/components/textarea.md +96 -181
- package/docs/components/theme.md +216 -0
- package/docs/components/time-range-picker.md +99 -151
- package/docs/components/timeline.md +67 -115
- package/docs/components/timer.md +44 -86
- package/docs/components/toast.md +93 -432
- package/docs/components/tooltip.md +75 -419
- package/docs/components/tree.md +110 -436
- package/docs/components/treemap.md +86 -129
- package/docs/components/video-player.md +336 -0
- package/docs/components/virtual-scroller.md +86 -226
- package/docs/components/waterfall.md +217 -0
- package/docs/components/weather.md +239 -0
- package/package.json +1 -1
- package/docs/ai/components/popover.md +0 -70
- package/docs/components/popover.md +0 -333
|
@@ -0,0 +1,768 @@
|
|
|
1
|
+
import { __esDecorate, __runInitializers } from 'tslib';
|
|
2
|
+
import { element, property, query, styles, ready, dispose, watch, render, dispatch, css, html } from 'snice';
|
|
3
|
+
|
|
4
|
+
var playerStyles = ":host{display:block;font-family:var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);contain:layout style paint}.podcast-container{background:var(--snice-color-background,rgb(255 255 255));border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-lg,.5rem);padding:var(--snice-spacing-lg,1.5rem);box-shadow:var(--snice-shadow-md,0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1))}.podcast-info{display:flex;gap:var(--snice-spacing-md,1rem);margin-bottom:var(--snice-spacing-lg,1.5rem)}.podcast-artwork{flex-shrink:0;width:7.5rem;height:7.5rem;border-radius:var(--snice-border-radius-lg,.5rem);overflow:hidden;background:var(--snice-color-background-element,rgb(252 251 249));display:flex;align-items:center;justify-content:center}.podcast-artwork img{width:100%;height:100%;object-fit:cover}.podcast-artwork-placeholder{color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-meta{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}.podcast-show{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-primary,rgb(37 99 235));margin-bottom:var(--snice-spacing-3xs,.125rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase;letter-spacing:.05em}.podcast-title{font-size:var(--snice-font-size-lg, 1.125rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-xs,.5rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-description{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text-secondary,rgb(82 82 82));line-height:var(--snice-line-height-normal, 1.5);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.podcast-controls{margin-bottom:var(--snice-spacing-md,1rem)}.podcast-control-buttons{display:flex;align-items:center;justify-content:center;gap:var(--snice-spacing-md,1rem);margin-bottom:var(--snice-spacing-md,1rem)}.podcast-btn{background:0 0;border:none;cursor:pointer;padding:var(--snice-spacing-xs,.5rem);border-radius:var(--snice-border-radius-md,.25rem);color:var(--snice-color-text,rgb(23 23 23));display:inline-flex;align-items:center;justify-content:center;transition:background-color var(--snice-transition-fast, 150ms) ease;position:relative}.podcast-btn:hover:not(:disabled){background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-btn:active:not(:disabled){background:var(--snice-color-background-active,rgb(226 226 226))}.podcast-btn:disabled{opacity:.5;cursor:not-allowed}.podcast-btn-skip-label{position:absolute;font-size:.5rem;font-weight:var(--snice-font-weight-bold,700);color:var(--snice-color-text,rgb(23 23 23));bottom:.25rem}.podcast-btn-play{background:var(--snice-color-primary,rgb(37 99 235));color:var(--snice-color-text-inverse,rgb(250 250 250));padding:var(--snice-spacing-md,1rem);border-radius:50%}.podcast-btn-play:hover:not(:disabled){background:var(--snice-color-primary-hover,rgb(29 78 216))}.podcast-btn-speed{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);min-width:2.75rem;padding:var(--snice-spacing-2xs,.25rem) var(--snice-spacing-xs,.5rem);border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-md,.25rem)}.podcast-btn-speed.active{color:var(--snice-color-primary,rgb(37 99 235));border-color:var(--snice-color-primary,rgb(37 99 235))}.podcast-progress-container{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem)}.podcast-time{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-secondary,rgb(82 82 82));min-width:2.75rem}.podcast-time-current{text-align:right}.podcast-time-remaining{text-align:left}.podcast-progress{flex:1;height:.375rem;background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px;cursor:pointer;position:relative;overflow:hidden}.podcast-progress:hover{height:.5rem}.podcast-progress-bar{height:100%;background:var(--snice-color-primary,rgb(37 99 235));border-radius:9999px;transition:width .1s linear}.podcast-volume{display:flex;align-items:center;gap:var(--snice-spacing-xs,.5rem)}.podcast-volume-slider-container{display:flex;align-items:center}.podcast-volume-slider{-webkit-appearance:none;appearance:none;width:5rem;height:.375rem;background:linear-gradient(to right,var(--snice-color-primary,rgb(37 99 235)) 0,var(--snice-color-primary,rgb(37 99 235)) var(--volume-percent,100%),var(--snice-color-background-element,rgb(252 251 249)) var(--volume-percent,100%),var(--snice-color-background-element,rgb(252 251 249)) 100%);border-radius:9999px;outline:0;cursor:pointer}.podcast-volume-slider::-webkit-slider-runnable-track{width:100%;height:.375rem;background:0 0;border-radius:9999px}.podcast-volume-slider::-moz-range-track{width:100%;height:.375rem;background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px}.podcast-volume-slider::-moz-range-progress{height:.375rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:9999px}.podcast-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:.875rem;height:.875rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:50%;cursor:pointer;margin-top:-.25rem}.podcast-volume-slider::-moz-range-thumb{width:.875rem;height:.875rem;background:var(--snice-color-primary,rgb(37 99 235));border:none;border-radius:50%;cursor:pointer}.podcast-bottom-bar{display:flex;align-items:center;justify-content:space-between;margin-top:var(--snice-spacing-sm,.75rem)}.podcast-sleep{display:flex;align-items:center;gap:var(--snice-spacing-2xs,.25rem)}.podcast-sleep-label{font-size:var(--snice-font-size-xs, .75rem);color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-sleep-time{font-size:var(--snice-font-size-xs, .75rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-primary,rgb(37 99 235));font-variant-numeric:tabular-nums}.podcast-btn-sleep{font-size:var(--snice-font-size-xs, .75rem);padding:var(--snice-spacing-3xs,.125rem) var(--snice-spacing-xs,.5rem);border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-md,.25rem)}.podcast-btn-sleep.active{color:var(--snice-color-primary,rgb(37 99 235));border-color:var(--snice-color-primary,rgb(37 99 235))}.podcast-chapters{border-top:1px solid var(--snice-color-border,rgb(226 226 226));padding-top:var(--snice-spacing-md,1rem);margin-top:var(--snice-spacing-md,1rem)}.podcast-chapters-header{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-sm,.75rem)}.podcast-chapter-item{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem);padding:var(--snice-spacing-xs,.5rem) var(--snice-spacing-sm,.75rem);border-radius:var(--snice-border-radius-md,.25rem);cursor:pointer;transition:background-color var(--snice-transition-fast, 150ms) ease}.podcast-chapter-item:hover{background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-chapter-item.active{background:var(--snice-color-primary-subtle,rgb(239 246 255))}.podcast-chapter-time{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-tertiary,rgb(115 115 115));min-width:2.5rem;flex-shrink:0}.podcast-chapter-title{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text,rgb(23 23 23));flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-chapter-item.active .podcast-chapter-title{color:var(--snice-color-primary,rgb(37 99 235));font-weight:var(--snice-font-weight-medium,500)}.podcast-episodes{border-top:1px solid var(--snice-color-border,rgb(226 226 226));padding-top:var(--snice-spacing-md,1rem);margin-top:var(--snice-spacing-md,1rem)}.podcast-episodes-header{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-sm,.75rem)}.podcast-episode-list{display:flex;flex-direction:column;gap:var(--snice-spacing-2xs,.25rem);max-height:18.75rem;overflow-y:auto}.podcast-episode-item{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem);padding:var(--snice-spacing-sm,.75rem);border-radius:var(--snice-border-radius-md,.25rem);cursor:pointer;transition:background-color var(--snice-transition-fast, 150ms) ease}.podcast-episode-item:hover{background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-episode-item.active{background:var(--snice-color-primary-subtle,rgb(239 246 255))}.podcast-episode-artwork{width:3rem;height:3rem;border-radius:var(--snice-border-radius-md,.25rem);object-fit:cover;flex-shrink:0}.podcast-episode-info{flex:1;min-width:0}.podcast-episode-title{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-3xs,.125rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-episode-item.active .podcast-episode-title{color:var(--snice-color-primary,rgb(37 99 235));font-weight:var(--snice-font-weight-medium,500)}.podcast-episode-date{font-size:var(--snice-font-size-xs, .75rem);color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-episode-duration{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-tertiary,rgb(115 115 115));flex-shrink:0}.podcast-episode-playing-icon{display:flex;align-items:center;gap:2px;flex-shrink:0}.podcast-episode-playing-icon span{display:inline-block;width:3px;height:.75rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:1px;animation:.8s ease-in-out infinite podcast-bar-bounce}.podcast-episode-playing-icon span:nth-child(2){animation-delay:.15s}.podcast-episode-playing-icon span:nth-child(3){animation-delay:.3s}@keyframes podcast-bar-bounce{0%,100%{height:.25rem}50%{height:.75rem}}.podcast-episode-list::-webkit-scrollbar{width:.5rem}.podcast-episode-list::-webkit-scrollbar-track{background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px}.podcast-episode-list::-webkit-scrollbar-thumb{background:var(--snice-color-border,rgb(226 226 226));border-radius:9999px}.podcast-episode-list::-webkit-scrollbar-thumb:hover{background:var(--snice-color-border-hover,rgb(204 204 204))}";
|
|
5
|
+
|
|
6
|
+
const PLAYBACK_RATES = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
|
7
|
+
const SLEEP_OPTIONS = [0, 5, 10, 15, 30, 45, 60]; // minutes
|
|
8
|
+
const STORAGE_KEY_PREFIX = 'snice-podcast-position-';
|
|
9
|
+
let SnicePodcastPlayer = (() => {
|
|
10
|
+
let _classDecorators = [element('snice-podcast-player')];
|
|
11
|
+
let _classDescriptor;
|
|
12
|
+
let _classExtraInitializers = [];
|
|
13
|
+
let _classThis;
|
|
14
|
+
let _classSuper = HTMLElement;
|
|
15
|
+
let _instanceExtraInitializers = [];
|
|
16
|
+
let _src_decorators;
|
|
17
|
+
let _src_initializers = [];
|
|
18
|
+
let _src_extraInitializers = [];
|
|
19
|
+
let _fromRss_decorators;
|
|
20
|
+
let _fromRss_initializers = [];
|
|
21
|
+
let _fromRss_extraInitializers = [];
|
|
22
|
+
let _title_decorators;
|
|
23
|
+
let _title_initializers = [];
|
|
24
|
+
let _title_extraInitializers = [];
|
|
25
|
+
let _show_decorators;
|
|
26
|
+
let _show_initializers = [];
|
|
27
|
+
let _show_extraInitializers = [];
|
|
28
|
+
let _artwork_decorators;
|
|
29
|
+
let _artwork_initializers = [];
|
|
30
|
+
let _artwork_extraInitializers = [];
|
|
31
|
+
let _description_decorators;
|
|
32
|
+
let _description_initializers = [];
|
|
33
|
+
let _description_extraInitializers = [];
|
|
34
|
+
let _playbackRate_decorators;
|
|
35
|
+
let _playbackRate_initializers = [];
|
|
36
|
+
let _playbackRate_extraInitializers = [];
|
|
37
|
+
let _skipForward_decorators;
|
|
38
|
+
let _skipForward_initializers = [];
|
|
39
|
+
let _skipForward_extraInitializers = [];
|
|
40
|
+
let _skipBack_decorators;
|
|
41
|
+
let _skipBack_initializers = [];
|
|
42
|
+
let _skipBack_extraInitializers = [];
|
|
43
|
+
let _currentTime_decorators;
|
|
44
|
+
let _currentTime_initializers = [];
|
|
45
|
+
let _currentTime_extraInitializers = [];
|
|
46
|
+
let _duration_decorators;
|
|
47
|
+
let _duration_initializers = [];
|
|
48
|
+
let _duration_extraInitializers = [];
|
|
49
|
+
let _volume_decorators;
|
|
50
|
+
let _volume_initializers = [];
|
|
51
|
+
let _volume_extraInitializers = [];
|
|
52
|
+
let _muted_decorators;
|
|
53
|
+
let _muted_initializers = [];
|
|
54
|
+
let _muted_extraInitializers = [];
|
|
55
|
+
let _episodes_decorators;
|
|
56
|
+
let _episodes_initializers = [];
|
|
57
|
+
let _episodes_extraInitializers = [];
|
|
58
|
+
let _currentEpisodeIndex_decorators;
|
|
59
|
+
let _currentEpisodeIndex_initializers = [];
|
|
60
|
+
let _currentEpisodeIndex_extraInitializers = [];
|
|
61
|
+
let _sleepTimer_decorators;
|
|
62
|
+
let _sleepTimer_initializers = [];
|
|
63
|
+
let _sleepTimer_extraInitializers = [];
|
|
64
|
+
let _progressElement_decorators;
|
|
65
|
+
let _progressElement_initializers = [];
|
|
66
|
+
let _progressElement_extraInitializers = [];
|
|
67
|
+
let _componentStyles_decorators;
|
|
68
|
+
let _init_decorators;
|
|
69
|
+
let _cleanup_decorators;
|
|
70
|
+
let _handleSrcChange_decorators;
|
|
71
|
+
let _handleRssChange_decorators;
|
|
72
|
+
let _handleVolumeChange_decorators;
|
|
73
|
+
let _handleMutedChange_decorators;
|
|
74
|
+
let _handlePlaybackRateChange_decorators;
|
|
75
|
+
let _renderPlayer_decorators;
|
|
76
|
+
let _emitPlay_decorators;
|
|
77
|
+
let _emitPause_decorators;
|
|
78
|
+
let _emitEnded_decorators;
|
|
79
|
+
let _emitTimeUpdate_decorators;
|
|
80
|
+
let _emitRateChange_decorators;
|
|
81
|
+
let _emitEpisodeChange_decorators;
|
|
82
|
+
let _emitFeedLoaded_decorators;
|
|
83
|
+
(class extends _classSuper {
|
|
84
|
+
static { _classThis = this; }
|
|
85
|
+
static {
|
|
86
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
87
|
+
_src_decorators = [property()];
|
|
88
|
+
_fromRss_decorators = [property({ attribute: 'from-rss' })];
|
|
89
|
+
_title_decorators = [property()];
|
|
90
|
+
_show_decorators = [property()];
|
|
91
|
+
_artwork_decorators = [property()];
|
|
92
|
+
_description_decorators = [property()];
|
|
93
|
+
_playbackRate_decorators = [property({ type: Number, attribute: 'playback-rate' })];
|
|
94
|
+
_skipForward_decorators = [property({ type: Number, attribute: 'skip-forward' })];
|
|
95
|
+
_skipBack_decorators = [property({ type: Number, attribute: 'skip-back' })];
|
|
96
|
+
_currentTime_decorators = [property({ type: Number, attribute: 'current-time' })];
|
|
97
|
+
_duration_decorators = [property({ type: Number })];
|
|
98
|
+
_volume_decorators = [property({ type: Number })];
|
|
99
|
+
_muted_decorators = [property({ type: Boolean })];
|
|
100
|
+
_episodes_decorators = [property({ type: Array })];
|
|
101
|
+
_currentEpisodeIndex_decorators = [property({ type: Number, attribute: 'current-episode-index' })];
|
|
102
|
+
_sleepTimer_decorators = [property({ type: Number, attribute: 'sleep-timer' })];
|
|
103
|
+
_progressElement_decorators = [query('.podcast-progress')];
|
|
104
|
+
_componentStyles_decorators = [styles()];
|
|
105
|
+
_init_decorators = [ready()];
|
|
106
|
+
_cleanup_decorators = [dispose()];
|
|
107
|
+
_handleSrcChange_decorators = [watch('src')];
|
|
108
|
+
_handleRssChange_decorators = [watch('fromRss')];
|
|
109
|
+
_handleVolumeChange_decorators = [watch('volume')];
|
|
110
|
+
_handleMutedChange_decorators = [watch('muted')];
|
|
111
|
+
_handlePlaybackRateChange_decorators = [watch('playbackRate')];
|
|
112
|
+
_renderPlayer_decorators = [render()];
|
|
113
|
+
_emitPlay_decorators = [dispatch('podcast-play', { bubbles: true, composed: true })];
|
|
114
|
+
_emitPause_decorators = [dispatch('podcast-pause', { bubbles: true, composed: true })];
|
|
115
|
+
_emitEnded_decorators = [dispatch('podcast-ended', { bubbles: true, composed: true })];
|
|
116
|
+
_emitTimeUpdate_decorators = [dispatch('podcast-time-update', { bubbles: true, composed: true })];
|
|
117
|
+
_emitRateChange_decorators = [dispatch('podcast-rate-change', { bubbles: true, composed: true })];
|
|
118
|
+
_emitEpisodeChange_decorators = [dispatch('podcast-episode-change', { bubbles: true, composed: true })];
|
|
119
|
+
_emitFeedLoaded_decorators = [dispatch('podcast-feed-loaded', { bubbles: true, composed: true })];
|
|
120
|
+
__esDecorate(this, null, _componentStyles_decorators, { kind: "method", name: "componentStyles", static: false, private: false, access: { has: obj => "componentStyles" in obj, get: obj => obj.componentStyles }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
121
|
+
__esDecorate(this, null, _init_decorators, { kind: "method", name: "init", static: false, private: false, access: { has: obj => "init" in obj, get: obj => obj.init }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
122
|
+
__esDecorate(this, null, _cleanup_decorators, { kind: "method", name: "cleanup", static: false, private: false, access: { has: obj => "cleanup" in obj, get: obj => obj.cleanup }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
123
|
+
__esDecorate(this, null, _handleSrcChange_decorators, { kind: "method", name: "handleSrcChange", static: false, private: false, access: { has: obj => "handleSrcChange" in obj, get: obj => obj.handleSrcChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
124
|
+
__esDecorate(this, null, _handleRssChange_decorators, { kind: "method", name: "handleRssChange", static: false, private: false, access: { has: obj => "handleRssChange" in obj, get: obj => obj.handleRssChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
125
|
+
__esDecorate(this, null, _handleVolumeChange_decorators, { kind: "method", name: "handleVolumeChange", static: false, private: false, access: { has: obj => "handleVolumeChange" in obj, get: obj => obj.handleVolumeChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
126
|
+
__esDecorate(this, null, _handleMutedChange_decorators, { kind: "method", name: "handleMutedChange", static: false, private: false, access: { has: obj => "handleMutedChange" in obj, get: obj => obj.handleMutedChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
127
|
+
__esDecorate(this, null, _handlePlaybackRateChange_decorators, { kind: "method", name: "handlePlaybackRateChange", static: false, private: false, access: { has: obj => "handlePlaybackRateChange" in obj, get: obj => obj.handlePlaybackRateChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
128
|
+
__esDecorate(this, null, _renderPlayer_decorators, { kind: "method", name: "renderPlayer", static: false, private: false, access: { has: obj => "renderPlayer" in obj, get: obj => obj.renderPlayer }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
129
|
+
__esDecorate(this, null, _emitPlay_decorators, { kind: "method", name: "emitPlay", static: false, private: false, access: { has: obj => "emitPlay" in obj, get: obj => obj.emitPlay }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
130
|
+
__esDecorate(this, null, _emitPause_decorators, { kind: "method", name: "emitPause", static: false, private: false, access: { has: obj => "emitPause" in obj, get: obj => obj.emitPause }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
131
|
+
__esDecorate(this, null, _emitEnded_decorators, { kind: "method", name: "emitEnded", static: false, private: false, access: { has: obj => "emitEnded" in obj, get: obj => obj.emitEnded }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
132
|
+
__esDecorate(this, null, _emitTimeUpdate_decorators, { kind: "method", name: "emitTimeUpdate", static: false, private: false, access: { has: obj => "emitTimeUpdate" in obj, get: obj => obj.emitTimeUpdate }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
133
|
+
__esDecorate(this, null, _emitRateChange_decorators, { kind: "method", name: "emitRateChange", static: false, private: false, access: { has: obj => "emitRateChange" in obj, get: obj => obj.emitRateChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
134
|
+
__esDecorate(this, null, _emitEpisodeChange_decorators, { kind: "method", name: "emitEpisodeChange", static: false, private: false, access: { has: obj => "emitEpisodeChange" in obj, get: obj => obj.emitEpisodeChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
135
|
+
__esDecorate(this, null, _emitFeedLoaded_decorators, { kind: "method", name: "emitFeedLoaded", static: false, private: false, access: { has: obj => "emitFeedLoaded" in obj, get: obj => obj.emitFeedLoaded }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
136
|
+
__esDecorate(null, null, _src_decorators, { kind: "field", name: "src", static: false, private: false, access: { has: obj => "src" in obj, get: obj => obj.src, set: (obj, value) => { obj.src = value; } }, metadata: _metadata }, _src_initializers, _src_extraInitializers);
|
|
137
|
+
__esDecorate(null, null, _fromRss_decorators, { kind: "field", name: "fromRss", static: false, private: false, access: { has: obj => "fromRss" in obj, get: obj => obj.fromRss, set: (obj, value) => { obj.fromRss = value; } }, metadata: _metadata }, _fromRss_initializers, _fromRss_extraInitializers);
|
|
138
|
+
__esDecorate(null, null, _title_decorators, { kind: "field", name: "title", static: false, private: false, access: { has: obj => "title" in obj, get: obj => obj.title, set: (obj, value) => { obj.title = value; } }, metadata: _metadata }, _title_initializers, _title_extraInitializers);
|
|
139
|
+
__esDecorate(null, null, _show_decorators, { kind: "field", name: "show", static: false, private: false, access: { has: obj => "show" in obj, get: obj => obj.show, set: (obj, value) => { obj.show = value; } }, metadata: _metadata }, _show_initializers, _show_extraInitializers);
|
|
140
|
+
__esDecorate(null, null, _artwork_decorators, { kind: "field", name: "artwork", static: false, private: false, access: { has: obj => "artwork" in obj, get: obj => obj.artwork, set: (obj, value) => { obj.artwork = value; } }, metadata: _metadata }, _artwork_initializers, _artwork_extraInitializers);
|
|
141
|
+
__esDecorate(null, null, _description_decorators, { kind: "field", name: "description", static: false, private: false, access: { has: obj => "description" in obj, get: obj => obj.description, set: (obj, value) => { obj.description = value; } }, metadata: _metadata }, _description_initializers, _description_extraInitializers);
|
|
142
|
+
__esDecorate(null, null, _playbackRate_decorators, { kind: "field", name: "playbackRate", static: false, private: false, access: { has: obj => "playbackRate" in obj, get: obj => obj.playbackRate, set: (obj, value) => { obj.playbackRate = value; } }, metadata: _metadata }, _playbackRate_initializers, _playbackRate_extraInitializers);
|
|
143
|
+
__esDecorate(null, null, _skipForward_decorators, { kind: "field", name: "skipForward", static: false, private: false, access: { has: obj => "skipForward" in obj, get: obj => obj.skipForward, set: (obj, value) => { obj.skipForward = value; } }, metadata: _metadata }, _skipForward_initializers, _skipForward_extraInitializers);
|
|
144
|
+
__esDecorate(null, null, _skipBack_decorators, { kind: "field", name: "skipBack", static: false, private: false, access: { has: obj => "skipBack" in obj, get: obj => obj.skipBack, set: (obj, value) => { obj.skipBack = value; } }, metadata: _metadata }, _skipBack_initializers, _skipBack_extraInitializers);
|
|
145
|
+
__esDecorate(null, null, _currentTime_decorators, { kind: "field", name: "currentTime", static: false, private: false, access: { has: obj => "currentTime" in obj, get: obj => obj.currentTime, set: (obj, value) => { obj.currentTime = value; } }, metadata: _metadata }, _currentTime_initializers, _currentTime_extraInitializers);
|
|
146
|
+
__esDecorate(null, null, _duration_decorators, { kind: "field", name: "duration", static: false, private: false, access: { has: obj => "duration" in obj, get: obj => obj.duration, set: (obj, value) => { obj.duration = value; } }, metadata: _metadata }, _duration_initializers, _duration_extraInitializers);
|
|
147
|
+
__esDecorate(null, null, _volume_decorators, { kind: "field", name: "volume", static: false, private: false, access: { has: obj => "volume" in obj, get: obj => obj.volume, set: (obj, value) => { obj.volume = value; } }, metadata: _metadata }, _volume_initializers, _volume_extraInitializers);
|
|
148
|
+
__esDecorate(null, null, _muted_decorators, { kind: "field", name: "muted", static: false, private: false, access: { has: obj => "muted" in obj, get: obj => obj.muted, set: (obj, value) => { obj.muted = value; } }, metadata: _metadata }, _muted_initializers, _muted_extraInitializers);
|
|
149
|
+
__esDecorate(null, null, _episodes_decorators, { kind: "field", name: "episodes", static: false, private: false, access: { has: obj => "episodes" in obj, get: obj => obj.episodes, set: (obj, value) => { obj.episodes = value; } }, metadata: _metadata }, _episodes_initializers, _episodes_extraInitializers);
|
|
150
|
+
__esDecorate(null, null, _currentEpisodeIndex_decorators, { kind: "field", name: "currentEpisodeIndex", static: false, private: false, access: { has: obj => "currentEpisodeIndex" in obj, get: obj => obj.currentEpisodeIndex, set: (obj, value) => { obj.currentEpisodeIndex = value; } }, metadata: _metadata }, _currentEpisodeIndex_initializers, _currentEpisodeIndex_extraInitializers);
|
|
151
|
+
__esDecorate(null, null, _sleepTimer_decorators, { kind: "field", name: "sleepTimer", static: false, private: false, access: { has: obj => "sleepTimer" in obj, get: obj => obj.sleepTimer, set: (obj, value) => { obj.sleepTimer = value; } }, metadata: _metadata }, _sleepTimer_initializers, _sleepTimer_extraInitializers);
|
|
152
|
+
__esDecorate(null, null, _progressElement_decorators, { kind: "field", name: "progressElement", static: false, private: false, access: { has: obj => "progressElement" in obj, get: obj => obj.progressElement, set: (obj, value) => { obj.progressElement = value; } }, metadata: _metadata }, _progressElement_initializers, _progressElement_extraInitializers);
|
|
153
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
154
|
+
_classThis = _classDescriptor.value;
|
|
155
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
156
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
157
|
+
}
|
|
158
|
+
componentStyles() {
|
|
159
|
+
return css /*css*/ `${playerStyles}`;
|
|
160
|
+
}
|
|
161
|
+
init() {
|
|
162
|
+
this.audioElement = new Audio();
|
|
163
|
+
this.audioElement.volume = this.volume;
|
|
164
|
+
this.audioElement.muted = this.muted;
|
|
165
|
+
this.audioElement.playbackRate = this.playbackRate;
|
|
166
|
+
this.audioElement.addEventListener('loadedmetadata', () => {
|
|
167
|
+
this.duration = this.audioElement.duration;
|
|
168
|
+
if (this.state === 'loading') {
|
|
169
|
+
this.state = 'paused';
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
this.audioElement.addEventListener('play', () => {
|
|
173
|
+
this.state = 'playing';
|
|
174
|
+
this.emitPlay();
|
|
175
|
+
});
|
|
176
|
+
this.audioElement.addEventListener('pause', () => {
|
|
177
|
+
if (!this.audioElement.ended) {
|
|
178
|
+
this.state = 'paused';
|
|
179
|
+
this.savePosition();
|
|
180
|
+
}
|
|
181
|
+
this.emitPause();
|
|
182
|
+
});
|
|
183
|
+
this.audioElement.addEventListener('ended', () => {
|
|
184
|
+
this.state = 'stopped';
|
|
185
|
+
this.clearSavedPosition();
|
|
186
|
+
this.emitEnded();
|
|
187
|
+
});
|
|
188
|
+
this.audioElement.addEventListener('timeupdate', () => {
|
|
189
|
+
this.currentTime = this.audioElement.currentTime;
|
|
190
|
+
this.emitTimeUpdate();
|
|
191
|
+
});
|
|
192
|
+
this.audioElement.addEventListener('error', () => {
|
|
193
|
+
this.state = 'error';
|
|
194
|
+
});
|
|
195
|
+
// Load src if provided directly
|
|
196
|
+
if (this.src) {
|
|
197
|
+
this.loadSrc(this.src);
|
|
198
|
+
}
|
|
199
|
+
// Fetch RSS if provided
|
|
200
|
+
if (this.fromRss) {
|
|
201
|
+
this.fetchRSS(this.fromRss);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
cleanup() {
|
|
205
|
+
this.savePosition();
|
|
206
|
+
this.clearSleepTimer();
|
|
207
|
+
if (this.audioElement) {
|
|
208
|
+
this.audioElement.pause();
|
|
209
|
+
this.audioElement.src = '';
|
|
210
|
+
this.audioElement = null;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
handleSrcChange(_oldVal, newVal) {
|
|
214
|
+
if (newVal) {
|
|
215
|
+
this.loadSrc(newVal);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
handleRssChange(_oldVal, newVal) {
|
|
219
|
+
if (newVal) {
|
|
220
|
+
this.fetchRSS(newVal);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
handleVolumeChange(_oldVal, newVal) {
|
|
224
|
+
if (this.audioElement && newVal >= 0 && newVal <= 1) {
|
|
225
|
+
this.audioElement.volume = newVal;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
handleMutedChange(_oldVal, newVal) {
|
|
229
|
+
if (this.audioElement) {
|
|
230
|
+
this.audioElement.muted = newVal;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
handlePlaybackRateChange(_oldVal, newVal) {
|
|
234
|
+
if (this.audioElement && newVal >= 0.5 && newVal <= 2) {
|
|
235
|
+
this.audioElement.playbackRate = newVal;
|
|
236
|
+
this.emitRateChange();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
renderPlayer() {
|
|
240
|
+
const currentEpisode = this.getCurrentEpisode();
|
|
241
|
+
const displayTitle = currentEpisode?.title || this.title || 'No episode loaded';
|
|
242
|
+
const displayShow = currentEpisode ? this.show : this.show;
|
|
243
|
+
const displayArtwork = currentEpisode?.artwork || this.artwork;
|
|
244
|
+
const displayDescription = currentEpisode?.description || this.description;
|
|
245
|
+
const chapters = currentEpisode?.chapters || [];
|
|
246
|
+
const progress = this.duration > 0 ? (this.currentTime / this.duration) * 100 : 0;
|
|
247
|
+
const isPlaying = this.state === 'playing';
|
|
248
|
+
const hasSource = !!this.src || this.currentEpisodeIndex >= 0;
|
|
249
|
+
const rateIsNotOne = this.playbackRate !== 1;
|
|
250
|
+
const hasSleepTimer = this.sleepTimerRemaining > 0;
|
|
251
|
+
const hasChapters = chapters.length > 0;
|
|
252
|
+
const hasEpisodes = this.episodes.length > 0;
|
|
253
|
+
const showVolSlider = this.showVolumeSlider;
|
|
254
|
+
const isMutedOrZero = this.muted || this.volume === 0;
|
|
255
|
+
const isHighVolume = !this.muted && this.volume > 0.5;
|
|
256
|
+
return html /*html*/ `
|
|
257
|
+
<div class="podcast-container">
|
|
258
|
+
<div class="podcast-info">
|
|
259
|
+
<div class="podcast-artwork">
|
|
260
|
+
<if ${displayArtwork}>
|
|
261
|
+
<img src="${displayArtwork}" alt="${displayTitle}" />
|
|
262
|
+
</if>
|
|
263
|
+
<if ${!displayArtwork}>
|
|
264
|
+
<div class="podcast-artwork-placeholder">
|
|
265
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
266
|
+
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/>
|
|
267
|
+
<path d="M19 10v2a7 7 0 0 1-14 0v-2"/>
|
|
268
|
+
<line x1="12" y1="19" x2="12" y2="23"/>
|
|
269
|
+
<line x1="8" y1="23" x2="16" y2="23"/>
|
|
270
|
+
</svg>
|
|
271
|
+
</div>
|
|
272
|
+
</if>
|
|
273
|
+
</div>
|
|
274
|
+
|
|
275
|
+
<div class="podcast-meta">
|
|
276
|
+
<if ${displayShow}>
|
|
277
|
+
<div class="podcast-show">${displayShow}</div>
|
|
278
|
+
</if>
|
|
279
|
+
<div class="podcast-title">${displayTitle}</div>
|
|
280
|
+
<if ${displayDescription}>
|
|
281
|
+
<div class="podcast-description">${displayDescription}</div>
|
|
282
|
+
</if>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
<div class="podcast-controls">
|
|
287
|
+
<div class="podcast-control-buttons">
|
|
288
|
+
<button
|
|
289
|
+
class="podcast-btn podcast-btn-speed ${rateIsNotOne ? 'active' : ''}"
|
|
290
|
+
@click=${() => this.cyclePlaybackRate()}
|
|
291
|
+
title="Playback speed"
|
|
292
|
+
>${this.playbackRate}x</button>
|
|
293
|
+
|
|
294
|
+
<button
|
|
295
|
+
class="podcast-btn"
|
|
296
|
+
@click=${() => this.doSkipBack()}
|
|
297
|
+
title="Skip back ${this.skipBack}s"
|
|
298
|
+
?disabled=${!hasSource}
|
|
299
|
+
>
|
|
300
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
301
|
+
<path d="M1 4v6h6"/>
|
|
302
|
+
<path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/>
|
|
303
|
+
</svg>
|
|
304
|
+
<span class="podcast-btn-skip-label">${this.skipBack}</span>
|
|
305
|
+
</button>
|
|
306
|
+
|
|
307
|
+
<button
|
|
308
|
+
class="podcast-btn podcast-btn-play"
|
|
309
|
+
@click=${() => this.toggle()}
|
|
310
|
+
title="${isPlaying ? 'Pause' : 'Play'}"
|
|
311
|
+
?disabled=${!hasSource}
|
|
312
|
+
>
|
|
313
|
+
<if ${isPlaying}>
|
|
314
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor">
|
|
315
|
+
<rect x="6" y="4" width="4" height="16"></rect>
|
|
316
|
+
<rect x="14" y="4" width="4" height="16"></rect>
|
|
317
|
+
</svg>
|
|
318
|
+
</if>
|
|
319
|
+
<if ${!isPlaying}>
|
|
320
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor">
|
|
321
|
+
<path d="M8 5v14l11-7z"/>
|
|
322
|
+
</svg>
|
|
323
|
+
</if>
|
|
324
|
+
</button>
|
|
325
|
+
|
|
326
|
+
<button
|
|
327
|
+
class="podcast-btn"
|
|
328
|
+
@click=${() => this.doSkipForward()}
|
|
329
|
+
title="Skip forward ${this.skipForward}s"
|
|
330
|
+
?disabled=${!hasSource}
|
|
331
|
+
>
|
|
332
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
333
|
+
<path d="M23 4v6h-6"/>
|
|
334
|
+
<path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/>
|
|
335
|
+
</svg>
|
|
336
|
+
<span class="podcast-btn-skip-label">${this.skipForward}</span>
|
|
337
|
+
</button>
|
|
338
|
+
|
|
339
|
+
<button
|
|
340
|
+
class="podcast-btn podcast-btn-sleep ${hasSleepTimer ? 'active' : ''}"
|
|
341
|
+
@click=${() => this.cycleSleepTimer()}
|
|
342
|
+
title="Sleep timer"
|
|
343
|
+
>
|
|
344
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
345
|
+
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
|
|
346
|
+
</svg>
|
|
347
|
+
</button>
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
<div class="podcast-progress-container">
|
|
351
|
+
<span class="podcast-time podcast-time-current">${this.formatTime(this.currentTime)}</span>
|
|
352
|
+
<div class="podcast-progress" @click=${(e) => this.handleSeek(e)}>
|
|
353
|
+
<div class="podcast-progress-bar" style="width: ${progress}%"></div>
|
|
354
|
+
</div>
|
|
355
|
+
<span class="podcast-time podcast-time-remaining">-${this.formatTime(this.duration - this.currentTime)}</span>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
|
|
359
|
+
<div class="podcast-bottom-bar">
|
|
360
|
+
<div class="podcast-volume">
|
|
361
|
+
<button
|
|
362
|
+
class="podcast-btn"
|
|
363
|
+
@click=${() => this.toggleVolumeSlider()}
|
|
364
|
+
title="Volume"
|
|
365
|
+
>
|
|
366
|
+
<if ${isMutedOrZero}>
|
|
367
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
368
|
+
<path d="M11 5L6 9H2v6h4l5 4V5z"/>
|
|
369
|
+
<line x1="23" y1="9" x2="17" y2="15"/>
|
|
370
|
+
<line x1="17" y1="9" x2="23" y2="15"/>
|
|
371
|
+
</svg>
|
|
372
|
+
</if>
|
|
373
|
+
<if ${isHighVolume}>
|
|
374
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
375
|
+
<path d="M11 5L6 9H2v6h4l5 4V5z"/>
|
|
376
|
+
<path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"/>
|
|
377
|
+
</svg>
|
|
378
|
+
</if>
|
|
379
|
+
<if ${!isMutedOrZero && !isHighVolume}>
|
|
380
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
381
|
+
<path d="M11 5L6 9H2v6h4l5 4V5z"/>
|
|
382
|
+
<path d="M15.54 8.46a5 5 0 0 1 0 7.07"/>
|
|
383
|
+
</svg>
|
|
384
|
+
</if>
|
|
385
|
+
</button>
|
|
386
|
+
<if ${showVolSlider}>
|
|
387
|
+
<div class="podcast-volume-slider-container">
|
|
388
|
+
<input
|
|
389
|
+
class="podcast-volume-slider"
|
|
390
|
+
type="range"
|
|
391
|
+
min="0"
|
|
392
|
+
max="1"
|
|
393
|
+
step="0.01"
|
|
394
|
+
.value=${this.volume.toString()}
|
|
395
|
+
style="--volume-percent: ${this.volume * 100}%"
|
|
396
|
+
@input=${(e) => this.handleVolumeInput(e)}
|
|
397
|
+
/>
|
|
398
|
+
</div>
|
|
399
|
+
</if>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<if ${hasSleepTimer}>
|
|
403
|
+
<div class="podcast-sleep">
|
|
404
|
+
<span class="podcast-sleep-label">Sleep in</span>
|
|
405
|
+
<span class="podcast-sleep-time">${this.formatTime(this.sleepTimerRemaining)}</span>
|
|
406
|
+
</div>
|
|
407
|
+
</if>
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
<if ${hasChapters}>
|
|
411
|
+
<div class="podcast-chapters">
|
|
412
|
+
<div class="podcast-chapters-header">Chapters</div>
|
|
413
|
+
${chapters.map((chapter, i) => {
|
|
414
|
+
const isActive = this.isActiveChapter(chapter, chapters, i);
|
|
415
|
+
return html /*html*/ `
|
|
416
|
+
<div
|
|
417
|
+
class="podcast-chapter-item ${isActive ? 'active' : ''}"
|
|
418
|
+
@click=${() => this.seekTo(chapter.startTime)}
|
|
419
|
+
>
|
|
420
|
+
<span class="podcast-chapter-time">${this.formatTime(chapter.startTime)}</span>
|
|
421
|
+
<span class="podcast-chapter-title">${chapter.title}</span>
|
|
422
|
+
</div>
|
|
423
|
+
`;
|
|
424
|
+
})}
|
|
425
|
+
</div>
|
|
426
|
+
</if>
|
|
427
|
+
|
|
428
|
+
<if ${hasEpisodes}>
|
|
429
|
+
<div class="podcast-episodes">
|
|
430
|
+
<div class="podcast-episodes-header">Episodes</div>
|
|
431
|
+
<div class="podcast-episode-list">
|
|
432
|
+
${this.episodes.map((episode, index) => {
|
|
433
|
+
const isActive = index === this.currentEpisodeIndex;
|
|
434
|
+
const isEpPlaying = isActive && isPlaying;
|
|
435
|
+
return html /*html*/ `
|
|
436
|
+
<div
|
|
437
|
+
class="podcast-episode-item ${isActive ? 'active' : ''}"
|
|
438
|
+
@click=${() => this.loadEpisode(index)}
|
|
439
|
+
>
|
|
440
|
+
<if ${episode.artwork}>
|
|
441
|
+
<img class="podcast-episode-artwork" src="${episode.artwork}" alt="${episode.title}" />
|
|
442
|
+
</if>
|
|
443
|
+
<div class="podcast-episode-info">
|
|
444
|
+
<div class="podcast-episode-title">${episode.title}</div>
|
|
445
|
+
<if ${episode.pubDate}>
|
|
446
|
+
<div class="podcast-episode-date">${episode.pubDate}</div>
|
|
447
|
+
</if>
|
|
448
|
+
</div>
|
|
449
|
+
<if ${isEpPlaying}>
|
|
450
|
+
<div class="podcast-episode-playing-icon">
|
|
451
|
+
<span></span><span></span><span></span>
|
|
452
|
+
</div>
|
|
453
|
+
</if>
|
|
454
|
+
<if ${!isEpPlaying && episode.duration}>
|
|
455
|
+
<div class="podcast-episode-duration">${this.formatTime(episode.duration || 0)}</div>
|
|
456
|
+
</if>
|
|
457
|
+
</div>
|
|
458
|
+
`;
|
|
459
|
+
})}
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
</if>
|
|
463
|
+
</div>
|
|
464
|
+
`;
|
|
465
|
+
}
|
|
466
|
+
// --- Public Methods ---
|
|
467
|
+
async play() {
|
|
468
|
+
if (!this.audioElement || !this.audioElement.src)
|
|
469
|
+
return;
|
|
470
|
+
try {
|
|
471
|
+
await this.audioElement.play();
|
|
472
|
+
}
|
|
473
|
+
catch {
|
|
474
|
+
this.state = 'error';
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
pause() {
|
|
478
|
+
if (!this.audioElement)
|
|
479
|
+
return;
|
|
480
|
+
this.audioElement.pause();
|
|
481
|
+
}
|
|
482
|
+
toggle() {
|
|
483
|
+
if (this.state === 'playing') {
|
|
484
|
+
this.pause();
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
this.play();
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
doSkipForward() {
|
|
491
|
+
if (!this.audioElement)
|
|
492
|
+
return;
|
|
493
|
+
this.seekTo(Math.min(this.currentTime + this.skipForward, this.duration));
|
|
494
|
+
}
|
|
495
|
+
doSkipBack() {
|
|
496
|
+
if (!this.audioElement)
|
|
497
|
+
return;
|
|
498
|
+
this.seekTo(Math.max(this.currentTime - this.skipBack, 0));
|
|
499
|
+
}
|
|
500
|
+
seekTo(time) {
|
|
501
|
+
if (!this.audioElement)
|
|
502
|
+
return;
|
|
503
|
+
this.audioElement.currentTime = time;
|
|
504
|
+
this.currentTime = time;
|
|
505
|
+
}
|
|
506
|
+
setPlaybackRate(rate) {
|
|
507
|
+
if (rate < 0.5 || rate > 2)
|
|
508
|
+
return;
|
|
509
|
+
this.playbackRate = rate;
|
|
510
|
+
}
|
|
511
|
+
loadEpisode(index) {
|
|
512
|
+
if (index < 0 || index >= this.episodes.length)
|
|
513
|
+
return;
|
|
514
|
+
// Save position of current episode before switching
|
|
515
|
+
this.savePosition();
|
|
516
|
+
const episode = this.episodes[index];
|
|
517
|
+
this.currentEpisodeIndex = index;
|
|
518
|
+
this.title = episode.title;
|
|
519
|
+
if (episode.artwork)
|
|
520
|
+
this.artwork = episode.artwork;
|
|
521
|
+
if (episode.description)
|
|
522
|
+
this.description = episode.description;
|
|
523
|
+
this.loadSrc(episode.src);
|
|
524
|
+
this.emitEpisodeChange(episode, index);
|
|
525
|
+
// Restore saved position for this episode
|
|
526
|
+
const saved = this.getSavedPosition(episode.src);
|
|
527
|
+
if (saved > 0) {
|
|
528
|
+
// Wait for metadata to load before seeking
|
|
529
|
+
const onLoaded = () => {
|
|
530
|
+
this.seekTo(saved);
|
|
531
|
+
this.audioElement?.removeEventListener('loadedmetadata', onLoaded);
|
|
532
|
+
};
|
|
533
|
+
this.audioElement?.addEventListener('loadedmetadata', onLoaded);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
// --- Private Methods ---
|
|
537
|
+
loadSrc(src) {
|
|
538
|
+
if (!this.audioElement)
|
|
539
|
+
return;
|
|
540
|
+
this.state = 'loading';
|
|
541
|
+
this.audioElement.src = src;
|
|
542
|
+
this.audioElement.load();
|
|
543
|
+
this.currentTime = 0;
|
|
544
|
+
this.duration = 0;
|
|
545
|
+
}
|
|
546
|
+
async fetchRSS(url) {
|
|
547
|
+
try {
|
|
548
|
+
const response = await fetch(url);
|
|
549
|
+
const text = await response.text();
|
|
550
|
+
const feed = this.parseRSS(text);
|
|
551
|
+
if (feed.title && !this.show)
|
|
552
|
+
this.show = feed.title;
|
|
553
|
+
if (feed.artwork && !this.artwork)
|
|
554
|
+
this.artwork = feed.artwork;
|
|
555
|
+
if (feed.description && !this.description)
|
|
556
|
+
this.description = feed.description;
|
|
557
|
+
this.episodes = feed.episodes;
|
|
558
|
+
this.emitFeedLoaded(feed);
|
|
559
|
+
}
|
|
560
|
+
catch {
|
|
561
|
+
this.state = 'error';
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
parseRSS(xml) {
|
|
565
|
+
const parser = new DOMParser();
|
|
566
|
+
const doc = parser.parseFromString(xml, 'application/xml');
|
|
567
|
+
const channel = doc.querySelector('channel');
|
|
568
|
+
const title = channel?.querySelector('title')?.textContent || '';
|
|
569
|
+
const description = channel?.querySelector('description')?.textContent || '';
|
|
570
|
+
// Try itunes:image first, then regular image
|
|
571
|
+
const itunesImage = channel?.querySelector('image[href]')?.getAttribute('href')
|
|
572
|
+
|| channel?.getElementsByTagNameNS('http://www.itunes.com/dtds/podcast-1.0.dtd', 'image')?.[0]?.getAttribute('href');
|
|
573
|
+
const regularImage = channel?.querySelector('image > url')?.textContent;
|
|
574
|
+
const artwork = itunesImage || regularImage || '';
|
|
575
|
+
const items = channel?.querySelectorAll('item') || [];
|
|
576
|
+
const episodes = [];
|
|
577
|
+
items.forEach(item => {
|
|
578
|
+
const epTitle = item.querySelector('title')?.textContent || '';
|
|
579
|
+
const enclosure = item.querySelector('enclosure');
|
|
580
|
+
const src = enclosure?.getAttribute('url') || '';
|
|
581
|
+
if (!src)
|
|
582
|
+
return;
|
|
583
|
+
const epDescription = item.querySelector('description')?.textContent || '';
|
|
584
|
+
const pubDate = item.querySelector('pubDate')?.textContent || '';
|
|
585
|
+
// Parse itunes:duration
|
|
586
|
+
const itunesDuration = item.getElementsByTagNameNS('http://www.itunes.com/dtds/podcast-1.0.dtd', 'duration')?.[0]?.textContent;
|
|
587
|
+
const duration = itunesDuration ? this.parseDuration(itunesDuration) : undefined;
|
|
588
|
+
// Episode artwork
|
|
589
|
+
const epImage = item.getElementsByTagNameNS('http://www.itunes.com/dtds/podcast-1.0.dtd', 'image')?.[0]?.getAttribute('href') || '';
|
|
590
|
+
episodes.push({
|
|
591
|
+
title: epTitle,
|
|
592
|
+
src,
|
|
593
|
+
artwork: epImage || artwork,
|
|
594
|
+
description: epDescription,
|
|
595
|
+
pubDate: pubDate ? this.formatDate(pubDate) : undefined,
|
|
596
|
+
duration,
|
|
597
|
+
});
|
|
598
|
+
});
|
|
599
|
+
return { title, artwork, description, episodes };
|
|
600
|
+
}
|
|
601
|
+
parseDuration(duration) {
|
|
602
|
+
// Handle HH:MM:SS, MM:SS, or plain seconds
|
|
603
|
+
const parts = duration.split(':').map(Number);
|
|
604
|
+
if (parts.length === 3)
|
|
605
|
+
return parts[0] * 3600 + parts[1] * 60 + parts[2];
|
|
606
|
+
if (parts.length === 2)
|
|
607
|
+
return parts[0] * 60 + parts[1];
|
|
608
|
+
return parts[0] || 0;
|
|
609
|
+
}
|
|
610
|
+
formatDate(dateStr) {
|
|
611
|
+
try {
|
|
612
|
+
const date = new Date(dateStr);
|
|
613
|
+
return date.toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' });
|
|
614
|
+
}
|
|
615
|
+
catch {
|
|
616
|
+
return dateStr;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
cyclePlaybackRate() {
|
|
620
|
+
const idx = PLAYBACK_RATES.indexOf(this.playbackRate);
|
|
621
|
+
const nextIdx = (idx + 1) % PLAYBACK_RATES.length;
|
|
622
|
+
this.setPlaybackRate(PLAYBACK_RATES[nextIdx]);
|
|
623
|
+
}
|
|
624
|
+
cycleSleepTimer() {
|
|
625
|
+
const currentMinutes = Math.ceil(this.sleepTimerRemaining / 60);
|
|
626
|
+
const idx = SLEEP_OPTIONS.findIndex(opt => opt >= currentMinutes);
|
|
627
|
+
const nextIdx = (idx + 1) % SLEEP_OPTIONS.length;
|
|
628
|
+
const minutes = SLEEP_OPTIONS[nextIdx];
|
|
629
|
+
this.clearSleepTimer();
|
|
630
|
+
if (minutes > 0) {
|
|
631
|
+
this.sleepTimerRemaining = minutes * 60;
|
|
632
|
+
this.sleepTimerInterval = window.setInterval(() => {
|
|
633
|
+
this.sleepTimerRemaining--;
|
|
634
|
+
if (this.sleepTimerRemaining <= 0) {
|
|
635
|
+
this.pause();
|
|
636
|
+
this.clearSleepTimer();
|
|
637
|
+
}
|
|
638
|
+
}, 1000);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
clearSleepTimer() {
|
|
642
|
+
if (this.sleepTimerInterval !== null) {
|
|
643
|
+
clearInterval(this.sleepTimerInterval);
|
|
644
|
+
this.sleepTimerInterval = null;
|
|
645
|
+
}
|
|
646
|
+
this.sleepTimerRemaining = 0;
|
|
647
|
+
}
|
|
648
|
+
handleSeek(e) {
|
|
649
|
+
if (!this.progressElement || this.duration === 0)
|
|
650
|
+
return;
|
|
651
|
+
const rect = this.progressElement.getBoundingClientRect();
|
|
652
|
+
const percent = (e.clientX - rect.left) / rect.width;
|
|
653
|
+
this.seekTo(percent * this.duration);
|
|
654
|
+
}
|
|
655
|
+
handleVolumeInput(e) {
|
|
656
|
+
const input = e.target;
|
|
657
|
+
const vol = parseFloat(input.value);
|
|
658
|
+
input.style.setProperty('--volume-percent', `${vol * 100}%`);
|
|
659
|
+
this.volume = vol;
|
|
660
|
+
if (vol > 0 && this.muted)
|
|
661
|
+
this.muted = false;
|
|
662
|
+
}
|
|
663
|
+
toggleVolumeSlider() {
|
|
664
|
+
this.showVolumeSlider = !this.showVolumeSlider;
|
|
665
|
+
}
|
|
666
|
+
getCurrentEpisode() {
|
|
667
|
+
if (this.currentEpisodeIndex >= 0 && this.currentEpisodeIndex < this.episodes.length) {
|
|
668
|
+
return this.episodes[this.currentEpisodeIndex];
|
|
669
|
+
}
|
|
670
|
+
return null;
|
|
671
|
+
}
|
|
672
|
+
isActiveChapter(chapter, chapters, index) {
|
|
673
|
+
const nextChapter = chapters[index + 1];
|
|
674
|
+
const endTime = chapter.endTime || (nextChapter ? nextChapter.startTime : this.duration);
|
|
675
|
+
return this.currentTime >= chapter.startTime && this.currentTime < endTime;
|
|
676
|
+
}
|
|
677
|
+
formatTime(seconds) {
|
|
678
|
+
if (isNaN(seconds) || seconds === Infinity || seconds < 0)
|
|
679
|
+
return '0:00';
|
|
680
|
+
const h = Math.floor(seconds / 3600);
|
|
681
|
+
const m = Math.floor((seconds % 3600) / 60);
|
|
682
|
+
const s = Math.floor(seconds % 60);
|
|
683
|
+
if (h > 0) {
|
|
684
|
+
return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
|
|
685
|
+
}
|
|
686
|
+
return `${m}:${s.toString().padStart(2, '0')}`;
|
|
687
|
+
}
|
|
688
|
+
// --- localStorage position memory ---
|
|
689
|
+
getStorageKey(src) {
|
|
690
|
+
return STORAGE_KEY_PREFIX + (src || this.audioElement?.src || '');
|
|
691
|
+
}
|
|
692
|
+
savePosition() {
|
|
693
|
+
if (!this.audioElement?.src || this.currentTime < 5)
|
|
694
|
+
return;
|
|
695
|
+
try {
|
|
696
|
+
localStorage.setItem(this.getStorageKey(), String(this.currentTime));
|
|
697
|
+
}
|
|
698
|
+
catch { /* storage full or unavailable */ }
|
|
699
|
+
}
|
|
700
|
+
getSavedPosition(src) {
|
|
701
|
+
try {
|
|
702
|
+
const saved = localStorage.getItem(this.getStorageKey(src));
|
|
703
|
+
return saved ? parseFloat(saved) : 0;
|
|
704
|
+
}
|
|
705
|
+
catch {
|
|
706
|
+
return 0;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
clearSavedPosition() {
|
|
710
|
+
try {
|
|
711
|
+
localStorage.removeItem(this.getStorageKey());
|
|
712
|
+
}
|
|
713
|
+
catch { /* ignore */ }
|
|
714
|
+
}
|
|
715
|
+
// --- Events ---
|
|
716
|
+
emitPlay() {
|
|
717
|
+
return { player: this, episode: this.getCurrentEpisode() };
|
|
718
|
+
}
|
|
719
|
+
emitPause() {
|
|
720
|
+
return { player: this, episode: this.getCurrentEpisode() };
|
|
721
|
+
}
|
|
722
|
+
emitEnded() {
|
|
723
|
+
return { player: this, episode: this.getCurrentEpisode() };
|
|
724
|
+
}
|
|
725
|
+
emitTimeUpdate() {
|
|
726
|
+
return { player: this, currentTime: this.currentTime, duration: this.duration };
|
|
727
|
+
}
|
|
728
|
+
emitRateChange() {
|
|
729
|
+
return { player: this, rate: this.playbackRate };
|
|
730
|
+
}
|
|
731
|
+
emitEpisodeChange(episode, index) {
|
|
732
|
+
return { player: this, episode, index };
|
|
733
|
+
}
|
|
734
|
+
emitFeedLoaded(feed) {
|
|
735
|
+
return { player: this, feed };
|
|
736
|
+
}
|
|
737
|
+
constructor() {
|
|
738
|
+
super(...arguments);
|
|
739
|
+
this.src = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _src_initializers, ''));
|
|
740
|
+
this.fromRss = (__runInitializers(this, _src_extraInitializers), __runInitializers(this, _fromRss_initializers, ''));
|
|
741
|
+
this.title = (__runInitializers(this, _fromRss_extraInitializers), __runInitializers(this, _title_initializers, ''));
|
|
742
|
+
this.show = (__runInitializers(this, _title_extraInitializers), __runInitializers(this, _show_initializers, ''));
|
|
743
|
+
this.artwork = (__runInitializers(this, _show_extraInitializers), __runInitializers(this, _artwork_initializers, ''));
|
|
744
|
+
this.description = (__runInitializers(this, _artwork_extraInitializers), __runInitializers(this, _description_initializers, ''));
|
|
745
|
+
this.playbackRate = (__runInitializers(this, _description_extraInitializers), __runInitializers(this, _playbackRate_initializers, 1));
|
|
746
|
+
this.skipForward = (__runInitializers(this, _playbackRate_extraInitializers), __runInitializers(this, _skipForward_initializers, 30));
|
|
747
|
+
this.skipBack = (__runInitializers(this, _skipForward_extraInitializers), __runInitializers(this, _skipBack_initializers, 15));
|
|
748
|
+
this.currentTime = (__runInitializers(this, _skipBack_extraInitializers), __runInitializers(this, _currentTime_initializers, 0));
|
|
749
|
+
this.duration = (__runInitializers(this, _currentTime_extraInitializers), __runInitializers(this, _duration_initializers, 0));
|
|
750
|
+
this.volume = (__runInitializers(this, _duration_extraInitializers), __runInitializers(this, _volume_initializers, 1));
|
|
751
|
+
this.muted = (__runInitializers(this, _volume_extraInitializers), __runInitializers(this, _muted_initializers, false));
|
|
752
|
+
this.episodes = (__runInitializers(this, _muted_extraInitializers), __runInitializers(this, _episodes_initializers, []));
|
|
753
|
+
this.currentEpisodeIndex = (__runInitializers(this, _episodes_extraInitializers), __runInitializers(this, _currentEpisodeIndex_initializers, -1));
|
|
754
|
+
this.sleepTimer = (__runInitializers(this, _currentEpisodeIndex_extraInitializers), __runInitializers(this, _sleepTimer_initializers, 0));
|
|
755
|
+
this.state = (__runInitializers(this, _sleepTimer_extraInitializers), 'stopped');
|
|
756
|
+
this.audioElement = null;
|
|
757
|
+
this.sleepTimerInterval = null;
|
|
758
|
+
this.sleepTimerRemaining = 0;
|
|
759
|
+
this.showVolumeSlider = false;
|
|
760
|
+
this.progressElement = __runInitializers(this, _progressElement_initializers, void 0);
|
|
761
|
+
__runInitializers(this, _progressElement_extraInitializers);
|
|
762
|
+
}
|
|
763
|
+
});
|
|
764
|
+
return _classThis;
|
|
765
|
+
})();
|
|
766
|
+
|
|
767
|
+
export { SnicePodcastPlayer };
|
|
768
|
+
//# sourceMappingURL=snice-podcast-player.js.map
|