@xhub-short/ui 0.1.0-beta.1 → 0.1.0-beta.11

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.
Files changed (76) hide show
  1. package/dist/CommentSheet.css-DyEc3Sro.d.ts +217 -0
  2. package/dist/VideoSlotPlayIndicator-DPs8Xt5C.d.ts +51 -0
  3. package/dist/chunk-3OB3OVYR.js +349 -0
  4. package/dist/{chunk-WKX2WBVO.js → chunk-3XPJHUYL.js} +1 -39
  5. package/dist/chunk-4RIMQOBR.js +58 -0
  6. package/dist/chunk-4TUBNA2X.js +180 -0
  7. package/dist/{chunk-4YDIRPIN.js → chunk-ANCP53F3.js} +3 -3
  8. package/dist/{chunk-UXMA4KJZ.js → chunk-CAWE42LH.js} +5 -3
  9. package/dist/{chunk-ANGBSV7L.js → chunk-CIIZ3IHV.js} +10 -5
  10. package/dist/chunk-DR7KR7OT.js +103 -0
  11. package/dist/chunk-DXLCQ4FH.js +102 -0
  12. package/dist/chunk-EDWS2IPH.js +1 -0
  13. package/dist/chunk-FR7UQSZP.js +570 -0
  14. package/dist/chunk-IWSBYOSS.js +91 -0
  15. package/dist/chunk-JEY6R4KJ.js +334 -0
  16. package/dist/chunk-KMJ3PQ7M.js +1262 -0
  17. package/dist/chunk-MFJS65C5.js +368 -0
  18. package/dist/{chunk-HW4LXTFT.js → chunk-OM4L7RE5.js} +18 -6
  19. package/dist/chunk-PBIH2F2Q.js +344 -0
  20. package/dist/chunk-PJ4NMVMY.js +326 -0
  21. package/dist/chunk-Q6MG7AVG.js +531 -0
  22. package/dist/chunk-QCKVF2DR.js +713 -0
  23. package/dist/chunk-QCRRF76W.js +75 -0
  24. package/dist/chunk-QUEJHA24.js +508 -0
  25. package/dist/chunk-VXW7AOGM.js +285 -0
  26. package/dist/chunk-YB7AXTX7.js +430 -0
  27. package/dist/chunk-ZGWSJ6Z5.js +601 -0
  28. package/dist/components/ActionBar/index.js +1 -1
  29. package/dist/components/AdvanceMenu/index.d.ts +78 -0
  30. package/dist/components/AdvanceMenu/index.js +1 -0
  31. package/dist/components/AuthorInfo/index.d.ts +5 -1
  32. package/dist/components/AuthorInfo/index.js +1 -1
  33. package/dist/components/BottomSheet/index.d.ts +82 -0
  34. package/dist/components/BottomSheet/index.js +1 -0
  35. package/dist/components/CleanModeOverlay/index.d.ts +60 -0
  36. package/dist/components/CleanModeOverlay/index.js +1 -0
  37. package/dist/components/CommentSheet/index.d.ts +164 -0
  38. package/dist/components/CommentSheet/index.js +1 -0
  39. package/dist/components/DetailView/index.d.ts +311 -0
  40. package/dist/components/DetailView/index.js +1 -0
  41. package/dist/components/ErrorBoundary/index.js +1 -1
  42. package/dist/components/ImageCarousel/index.d.ts +50 -0
  43. package/dist/components/ImageCarousel/index.js +1 -0
  44. package/dist/components/ImagePostSlot/index.d.ts +207 -0
  45. package/dist/components/ImagePostSlot/index.js +1 -0
  46. package/dist/components/ProgressBar/index.d.ts +30 -2
  47. package/dist/components/ProgressBar/index.js +1 -1
  48. package/dist/components/QualityPicker/index.d.ts +35 -0
  49. package/dist/components/QualityPicker/index.js +1 -0
  50. package/dist/components/ReportSheet/index.d.ts +68 -0
  51. package/dist/components/ReportSheet/index.js +1 -0
  52. package/dist/components/Skeleton/index.js +1 -1
  53. package/dist/components/SpeedPicker/index.d.ts +32 -0
  54. package/dist/components/SpeedPicker/index.js +1 -0
  55. package/dist/components/VideoFeed/index.d.ts +12 -1
  56. package/dist/components/VideoFeed/index.js +1 -1
  57. package/dist/components/VideoInfo/index.d.ts +4 -2
  58. package/dist/components/VideoInfo/index.js +1 -1
  59. package/dist/components/VideoPlayer/index.d.ts +14 -41
  60. package/dist/components/VideoPlayer/index.js +1 -1
  61. package/dist/components/VideoSlot/index.d.ts +84 -65
  62. package/dist/components/VideoSlot/index.js +2 -1
  63. package/dist/components/VirtualSlider/index.d.ts +339 -0
  64. package/dist/components/VirtualSlider/index.js +1 -0
  65. package/dist/components/icons/index.js +1 -1
  66. package/dist/index.d.ts +107 -95
  67. package/dist/index.js +84 -27
  68. package/package.json +51 -7
  69. package/dist/chunk-2PTMP65P.js +0 -738
  70. package/dist/chunk-4MN72OZH.js +0 -148
  71. package/dist/chunk-DHQJBXQW.js +0 -562
  72. package/dist/chunk-SSJDO24Q.js +0 -204
  73. package/dist/chunk-XAOEHLOX.js +0 -1326
  74. package/dist/chunk-YW23IBKF.js +0 -530
  75. package/dist/chunk-ZZDQKP4R.js +0 -418
  76. package/dist/use-gesture-react.esm-3SV4QLEJ.js +0 -1893
package/dist/index.js CHANGED
@@ -1,19 +1,30 @@
1
- export { BUFFERING_STATE_CLASS, ENDED_CLASS, ERROR_CLASS, ERROR_STATE_CLASS, LOADING_CLASS, LOADING_STATE_ATTR, LOADING_STATE_CLASS, PAUSED_CLASS, PLAYBACK_STATE_ATTR, PLAYER_CLASS, PLAYING_CLASS, POSTER_CLASS, READY_CLASS, VIDEO_CLASS, VIDEO_PLAYER_CSS, Z_INDEX as VIDEO_PLAYER_Z_INDEX, Z_INDEX_CSS_VARS as VIDEO_PLAYER_Z_INDEX_CSS_VARS, VIDEO_TYPE_ATTR, VIDEO_WRAPPER_CLASS, VideoElementError, VideoPlayerHeadless, createFirstFrameCache, firstFrameCache, useAutoFirstFrameCapture, useFirstFrameCapture, useVideoElement } from './chunk-HW4LXTFT.js';
2
- export { LOADING_ATTR, LOADING_DATASET_KEY, PLAYER_STATE_ATTR, PLAYER_STATE_DATASET_KEY, SLOT_CLASS, SLOT_ERROR_CLASS, SLOT_LOADING_CLASS, SLOT_PAUSED_CLASS, SLOT_PLAYING_CLASS, VIDEO_ID_ATTR, VIDEO_ID_DATASET_KEY, VIDEO_SLOT_CSS, VIDEO_SLOT_LIKE_ANIMATION_CSS, VideoSlotContext, VideoSlotHeadless, VideoSlotLikeAnimation, VideoSlotOverlay, VideoSlotPoster, VideoSlotSkeleton, Z_INDEX, Z_INDEX_CSS_VARS, useDoubleTap, useOptionalVideoSlotContext, useVideoSlotContext, useVideoSlotIsActive, useVideoSlotIsPlaying, useVideoSlotPlayer, useVideoSlotResource, useVideoSlotVideo } from './chunk-XAOEHLOX.js';
3
- export { ACTION_BAR_CSS, CompoundBookmark as ActionBarBookmark, CompoundComment as ActionBarComment, ActionBarHeadless, CompoundLike as ActionBarLike, CompoundShare as ActionBarShare, ActionButton, BookmarkButton, CommentButton, LikeButton, ShareButton } from './chunk-ANGBSV7L.js';
4
- export { AUTHOR_INFO_CSS, AuthorAvatar, AuthorDescription, AuthorInfoContext, AuthorInfoHeadless, AuthorName, FollowButton, useAuthorInfoContext, useOptionalAuthorInfoContext } from './chunk-2PTMP65P.js';
5
- export { BookmarkFilledIcon, BookmarkIcon, CloseIcon, CommentIcon, HeartFilledIcon, HeartIcon, MoreIcon, MusicIcon, PauseIcon, PlayIcon, PlusIcon, ShareIcon, UserCheckIcon, UserPlusIcon, VerifiedIcon, VolumeIcon, VolumeMutedIcon } from './chunk-4YDIRPIN.js';
6
- export { ErrorBoundary } from './chunk-SSJDO24Q.js';
7
- export { PROGRESS_BAR_CSS, ProgressBarHeadless, calculateProgress, formatTime } from './chunk-YW23IBKF.js';
8
- export { Skeleton, SkeletonAvatar, SkeletonText, SkeletonVideo } from './chunk-4MN72OZH.js';
9
- export { SLOT_ACTIVE_ATTR, SLOT_ACTIVE_DATASET_KEY, SLOT_INDEX_ATTR, SLOT_INDEX_DATASET_KEY, VIDEO_FEED_CLASS_PREFIX, VIDEO_FEED_CSS, VideoFeedContext, VideoFeedHeadless, getSlotIndexFromPosition, useOptionalVideoFeedContext, useVideoFeedContext, useVideoFeedPosition } from './chunk-ZZDQKP4R.js';
10
- export { cn, formatCount, formatCountWithSeparators, isGestureLoaded, loadGesture, parseFormattedCount, preloadGesture } from './chunk-WKX2WBVO.js';
11
- export { VIDEO_INFO_CSS, VideoAuthorName, VideoCaption, VideoHashtags, VideoInfoContext, VideoInfoHeadless, VideoLocation, VideoMusic, useOptionalVideoInfoContext, useVideoInfoContext } from './chunk-DHQJBXQW.js';
12
- import { injectComponentCSS } from './chunk-UXMA4KJZ.js';
13
- export { injectComponentCSS, isComponentCSSInjected, removeComponentCSS } from './chunk-UXMA4KJZ.js';
1
+ export { SLOT_ACTIVE_ATTR, SLOT_ACTIVE_DATASET_KEY, SLOT_INDEX_ATTR, SLOT_INDEX_DATASET_KEY, VIDEO_FEED_CLASS_PREFIX, VIDEO_FEED_CSS, VideoFeedContext, VideoFeedHeadless, getSlotIndexFromPosition, useOptionalVideoFeedContext, useVideoFeedContext, useVideoFeedPosition } from './chunk-4TUBNA2X.js';
2
+ export { VIDEO_INFO_CSS, VideoAuthorName, VideoCaption, VideoHashtags, VideoInfoContext, VideoInfoHeadless, VideoLocation, VideoMusic, useOptionalVideoInfoContext, useVideoInfoContext } from './chunk-PBIH2F2Q.js';
3
+ export { BUFFERING_STATE_CLASS, ENDED_CLASS, ERROR_CLASS, ERROR_STATE_CLASS, LOADING_CLASS, LOADING_STATE_ATTR, LOADING_STATE_CLASS, PAUSED_CLASS, PLAYBACK_STATE_ATTR, PLAYER_CLASS, PLAYING_CLASS, POSTER_CLASS, READY_CLASS, VIDEO_CLASS, VIDEO_PLAYER_CSS, Z_INDEX as VIDEO_PLAYER_Z_INDEX, Z_INDEX_CSS_VARS as VIDEO_PLAYER_Z_INDEX_CSS_VARS, VIDEO_TYPE_ATTR, VIDEO_WRAPPER_CLASS, VideoElementError, VideoPlayerHeadless, createFirstFrameCache, firstFrameCache, useAutoFirstFrameCapture, useFirstFrameCapture, useVideoElement } from './chunk-OM4L7RE5.js';
4
+ export { LOADING_ATTR, LOADING_DATASET_KEY, PLAYER_STATE_ATTR, PLAYER_STATE_DATASET_KEY, ReportedVideoOverlay, SLOT_CLASS, SLOT_ERROR_CLASS, SLOT_LOADING_CLASS, SLOT_PAUSED_CLASS, SLOT_PLAYING_CLASS, VIDEO_ID_ATTR, VIDEO_ID_DATASET_KEY, VIDEO_SLOT_CSS, VIDEO_SLOT_LIKE_ANIMATION_CSS, VideoSlotHeadless, VideoSlotLikeAnimation, VideoSlotOverlay, VideoSlotPoster, VideoSlotSkeleton, Z_INDEX, Z_INDEX_CSS_VARS } from './chunk-ZGWSJ6Z5.js';
5
+ export { DEFAULT_BUFFER_SIZE, DEFAULT_EMPTY_TEXT, DEFAULT_END_REACHED_THRESHOLD, DEFAULT_END_TEXT, DEFAULT_LOADING_TEXT, SLIDER_CLASS, SLIDER_CONTAINER_CLASS, SLIDER_CONTAINER_SNAPPING_CLASS, SLIDER_CONTAINER_SWIPING_CLASS, SLOT_ACTIVE_ATTR as SLIDER_SLOT_ACTIVE_ATTR, SLIDER_SLOT_ACTIVE_CLASS, SLOT_ACTIVE_DATASET_KEY as SLIDER_SLOT_ACTIVE_DATASET_KEY, SLIDER_SLOT_ADJACENT_CLASS, SLIDER_SLOT_CLASS, SLOT_INDEX_ATTR as SLIDER_SLOT_INDEX_ATTR, SLOT_INDEX_DATASET_KEY as SLIDER_SLOT_INDEX_DATASET_KEY, SLIDER_SLOT_TRANSITIONING_CLASS, VIRTUAL_SLIDER_CSS, VirtualSlider, VirtualSliderContext, getSlotIndexFromPosition as getSliderIndexFromPosition, useOptionalVirtualSliderContext, useSliderActiveIndex, useSliderIsSwiping, useSliderPosition, useVirtualSliderContext } from './chunk-YB7AXTX7.js';
6
+ export { ErrorBoundary } from './chunk-IWSBYOSS.js';
7
+ export { IMAGE_POST_ACTIVE_ATTR, IMAGE_POST_ID_ATTR, IMAGE_POST_SLOT_ACTIVE_CLASS, IMAGE_POST_SLOT_CLASS, IMAGE_POST_SLOT_CLEAN_MODE_CLASS, IMAGE_POST_SLOT_CSS, ImagePostSlotActions, ImagePostSlotBottom, ImagePostSlotCaption, ImagePostSlotHeadless, ImagePostSlotMusic, ImagePostSlotOverlay, ImagePostSlotPlayIndicator, ImagePostSlotReadMore, useImagePostSlotContext, useOptionalImagePostSlotContext } from './chunk-JEY6R4KJ.js';
8
+ export { VideoSlotContext, VideoSlotPlayIndicator, useDoubleTap, useOptionalVideoSlotContext, useVideoSlotContext, useVideoSlotIsActive, useVideoSlotIsPlaying, useVideoSlotPlayer, useVideoSlotResource, useVideoSlotVideo } from './chunk-MFJS65C5.js';
9
+ export { PROGRESS_BAR_CSS, ProgressBarHeadless, calculateProgress, formatTime } from './chunk-VXW7AOGM.js';
10
+ export { QUALITY_PICKER_CSS, QualityPickerHeadless } from './chunk-DR7KR7OT.js';
11
+ export { REPORT_SHEET_CSS, ReportSheetHeadless, injectReportSheetCSS } from './chunk-QCKVF2DR.js';
12
+ export { Skeleton, SkeletonAvatar, SkeletonText, SkeletonVideo } from './chunk-4RIMQOBR.js';
13
+ export { DEFAULT_SPEEDS, SPEED_PICKER_CSS, SpeedPickerHeadless } from './chunk-QCRRF76W.js';
14
+ export { ACTION_BAR_CSS, CompoundBookmark as ActionBarBookmark, CompoundComment as ActionBarComment, ActionBarHeadless, CompoundLike as ActionBarLike, CompoundShare as ActionBarShare, ActionButton, BookmarkButton, CommentButton, LikeButton, ShareButton } from './chunk-CIIZ3IHV.js';
15
+ export { ADVANCE_MENU_CSS, AdvanceMenuHeadless } from './chunk-DXLCQ4FH.js';
16
+ export { AUTHOR_INFO_CSS, AuthorAvatar, AuthorDescription, AuthorInfoContext, AuthorInfoHeadless, AuthorName, FollowButton, useAuthorInfoContext, useOptionalAuthorInfoContext } from './chunk-3OB3OVYR.js';
17
+ export { BookmarkFilledIcon, BookmarkIcon, CloseIcon, CommentIcon, HeartFilledIcon, HeartIcon, MoreIcon, MusicIcon, PauseIcon, PlayIcon, PlusIcon, ShareIcon, UserCheckIcon, UserPlusIcon, VerifiedIcon, VolumeIcon, VolumeMutedIcon } from './chunk-ANCP53F3.js';
18
+ export { CLEAN_MODE_OVERLAY_CSS, CleanModeOverlayHeadless, injectCleanModeOverlayCSS } from './chunk-QUEJHA24.js';
19
+ export { COMMENT_SHEET_CSS, CommentInput, CommentItemComponent, CommentList, CommentSheet, CommentSheetContext, CommentSheetHeadless, SheetHeader, useCommentSheetContext, useOptionalCommentSheetContext } from './chunk-KMJ3PQ7M.js';
20
+ export { DETAIL_VIEW_CSS, DetailViewAuthor, DetailViewCaption, DetailViewGallery, DetailViewHeadless, DetailViewMusic, DetailViewStats, useDetailViewContext } from './chunk-FR7UQSZP.js';
21
+ export { IMAGE_CAROUSEL_CSS, ImageCarouselHeadless } from './chunk-Q6MG7AVG.js';
22
+ export { clsx, clsx2 as cn } from './chunk-EDWS2IPH.js';
23
+ export { formatCount, formatCountWithSeparators, parseFormattedCount } from './chunk-3XPJHUYL.js';
24
+ import { injectComponentCSS } from './chunk-CAWE42LH.js';
25
+ export { injectComponentCSS, isComponentCSSInjected, removeComponentCSS } from './chunk-CAWE42LH.js';
14
26
  import { createContext, useInsertionEffect, useContext, useState } from 'react';
15
27
  import { jsx, jsxs } from 'react/jsx-runtime';
16
- export { clsx } from 'clsx';
17
28
 
18
29
  // src/styles/css-content.ts
19
30
  var CSS_CONTENT = `
@@ -22,13 +33,23 @@ var CSS_CONTENT = `
22
33
  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
23
34
 
24
35
  /* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
25
- FONT LOADING
36
+ CSS LAYER DECLARATION
37
+
38
+ Declare the 'sv' layer first. All SDK component styles go into this layer.
39
+ Host app styles WITHOUT @layer automatically have HIGHER priority.
40
+ \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
41
+
42
+ @layer sv;
43
+
44
+ /* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
45
+ FONT LOADING (outside layer - needs to be global)
26
46
  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
27
47
 
28
48
  @import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700&display=swap');
29
49
 
30
50
  /* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
31
51
  CSS VARIABLES - Light Mode (Default)
52
+ Outside layer so host app can easily override variables
32
53
  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
33
54
 
34
55
  :root {
@@ -201,9 +222,11 @@ var CSS_CONTENT = `
201
222
  }
202
223
 
203
224
  /* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
204
- BASE STYLES
225
+ BASE STYLES - Inside @layer sv for easy host app overrides
205
226
  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
206
227
 
228
+ @layer sv {
229
+
207
230
  .sv-root {
208
231
  font-family: var(--sv-font-family);
209
232
  font-size: var(--sv-font-size-md);
@@ -598,6 +621,8 @@ var CSS_CONTENT = `
598
621
  transform: translateZ(0);
599
622
  will-change: transform;
600
623
  }
624
+
625
+ } /* End @layer sv */
601
626
  `;
602
627
 
603
628
  // src/styles/useStyles.ts
@@ -679,6 +704,7 @@ var Components = {
679
704
  // Reference only
680
705
  VideoSlotHeadless: () => null,
681
706
  VideoPlayerHeadless: () => null,
707
+ CommentSheetHeadless: () => null,
682
708
  ErrorBoundary: () => null,
683
709
  Skeleton: () => null
684
710
  };
@@ -920,13 +946,16 @@ var CustomLayout = Object.assign(CustomLayoutRoot, {
920
946
  CustomLayout.displayName = "CustomLayout";
921
947
  function DefaultError({
922
948
  error,
923
- onRetry
949
+ onRetry,
950
+ networkErrorText = "No internet connection",
951
+ genericErrorText = "Video failed to load",
952
+ retryText = "Tap to retry"
924
953
  }) {
925
954
  const isNetworkError = error.message.toLowerCase().includes("network");
926
955
  return /* @__PURE__ */ jsxs("div", { className: "sv-layout__error", children: [
927
956
  /* @__PURE__ */ jsx("span", { className: "sv-layout__error-icon", children: isNetworkError ? "\u{1F4E1}" : "\u26A0\uFE0F" }),
928
- /* @__PURE__ */ jsx("span", { className: "sv-layout__error-text", children: isNetworkError ? "No internet connection" : "Video failed to load" }),
929
- onRetry && /* @__PURE__ */ jsx("button", { type: "button", className: "sv-layout__error-retry", onClick: onRetry, children: "Tap to retry" })
957
+ /* @__PURE__ */ jsx("span", { className: "sv-layout__error-text", children: isNetworkError ? networkErrorText : genericErrorText }),
958
+ onRetry && /* @__PURE__ */ jsx("button", { type: "button", className: "sv-layout__error-retry", onClick: onRetry, children: retryText })
930
959
  ] });
931
960
  }
932
961
  var buildClassName = (className) => `sv-layout sv-layout--default ${className ?? ""}`;
@@ -952,7 +981,11 @@ function DefaultLayout(props) {
952
981
  error,
953
982
  onRetry,
954
983
  className,
955
- testId
984
+ testId,
985
+ // i18n props
986
+ networkErrorText,
987
+ genericErrorText,
988
+ retryText
956
989
  } = props;
957
990
  useInsertionEffect(() => {
958
991
  return injectComponentCSS("layout", LAYOUT_CSS);
@@ -960,7 +993,16 @@ function DefaultLayout(props) {
960
993
  const containerClass = buildClassName(className);
961
994
  if (error) {
962
995
  const errorContent = renderError ? renderError(error, onRetry ?? (() => {
963
- })) : /* @__PURE__ */ jsx(DefaultError, { error, onRetry });
996
+ })) : /* @__PURE__ */ jsx(
997
+ DefaultError,
998
+ {
999
+ error,
1000
+ onRetry,
1001
+ networkErrorText,
1002
+ genericErrorText,
1003
+ retryText
1004
+ }
1005
+ );
964
1006
  return /* @__PURE__ */ jsx("div", { className: containerClass, "data-testid": testId, children: errorContent });
965
1007
  }
966
1008
  const poster = showPoster ? renderPoster?.() : null;
@@ -990,12 +1032,14 @@ var DefaultPlayIcon = () => /* @__PURE__ */ jsx("svg", { "aria-hidden": "true",
990
1032
  var DefaultPauseIcon = () => /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", width: "32", height: "32", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M6 4h4v16H6zM14 4h4v16h-4z" }) });
991
1033
  function MinimalError({
992
1034
  error,
993
- onRetry
1035
+ onRetry,
1036
+ errorFallbackText = "Video failed to load",
1037
+ retryText = "Retry"
994
1038
  }) {
995
1039
  return /* @__PURE__ */ jsxs("div", { className: "sv-layout__error", children: [
996
1040
  /* @__PURE__ */ jsx("span", { className: "sv-layout__error-icon", children: "\u26A0\uFE0F" }),
997
- /* @__PURE__ */ jsx("span", { className: "sv-layout__error-text", children: error.message || "Video failed to load" }),
998
- onRetry && /* @__PURE__ */ jsx("button", { type: "button", className: "sv-layout__error-retry", onClick: onRetry, children: "Retry" })
1041
+ /* @__PURE__ */ jsx("span", { className: "sv-layout__error-text", children: error.message || errorFallbackText }),
1042
+ onRetry && /* @__PURE__ */ jsx("button", { type: "button", className: "sv-layout__error-retry", onClick: onRetry, children: retryText })
999
1043
  ] });
1000
1044
  }
1001
1045
  function MinimalLayout({
@@ -1024,7 +1068,12 @@ function MinimalLayout({
1024
1068
  onPlayClick,
1025
1069
  // Styling
1026
1070
  className,
1027
- testId
1071
+ testId,
1072
+ // i18n props
1073
+ errorFallbackText,
1074
+ retryText,
1075
+ playAriaLabel = "Play",
1076
+ pauseAriaLabel = "Pause"
1028
1077
  }) {
1029
1078
  const [isButtonVisible, setIsButtonVisible] = useState(true);
1030
1079
  useInsertionEffect(() => {
@@ -1048,7 +1097,15 @@ function MinimalLayout({
1048
1097
  };
1049
1098
  if (error) {
1050
1099
  return /* @__PURE__ */ jsx("div", { className: `sv-layout sv-layout--minimal ${className ?? ""}`, "data-testid": testId, children: renderError ? renderError(error, onRetry ?? (() => {
1051
- })) : /* @__PURE__ */ jsx(MinimalError, { error, onRetry }) });
1100
+ })) : /* @__PURE__ */ jsx(
1101
+ MinimalError,
1102
+ {
1103
+ error,
1104
+ onRetry,
1105
+ errorFallbackText,
1106
+ retryText
1107
+ }
1108
+ ) });
1052
1109
  }
1053
1110
  return /* @__PURE__ */ jsxs("div", { className: `sv-layout sv-layout--minimal ${className ?? ""}`, "data-testid": testId, children: [
1054
1111
  renderPlayer?.(),
@@ -1059,7 +1116,7 @@ function MinimalLayout({
1059
1116
  type: "button",
1060
1117
  className: `sv-layout__play-button ${isButtonVisible ? "sv-layout__play-button--visible" : ""}`,
1061
1118
  onClick: handlePlayClick,
1062
- "aria-label": isPlaying ? "Pause" : "Play",
1119
+ "aria-label": isPlaying ? pauseAriaLabel : playAriaLabel,
1063
1120
  children: isPlaying ? pauseIcon ?? /* @__PURE__ */ jsx(DefaultPauseIcon, {}) : playIcon ?? /* @__PURE__ */ jsx(DefaultPlayIcon, {})
1064
1121
  }
1065
1122
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xhub-short/ui",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.11",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,9 +17,49 @@
17
17
  "types": "./dist/index.d.ts",
18
18
  "import": "./dist/index.js"
19
19
  },
20
+ "./ActionBar": {
21
+ "types": "./dist/components/ActionBar/index.d.ts",
22
+ "import": "./dist/components/ActionBar/index.js"
23
+ },
24
+ "./AuthorInfo": {
25
+ "types": "./dist/components/AuthorInfo/index.d.ts",
26
+ "import": "./dist/components/AuthorInfo/index.js"
27
+ },
28
+ "./ErrorBoundary": {
29
+ "types": "./dist/components/ErrorBoundary/index.d.ts",
30
+ "import": "./dist/components/ErrorBoundary/index.js"
31
+ },
32
+ "./ProgressBar": {
33
+ "types": "./dist/components/ProgressBar/index.d.ts",
34
+ "import": "./dist/components/ProgressBar/index.js"
35
+ },
36
+ "./Skeleton": {
37
+ "types": "./dist/components/Skeleton/index.d.ts",
38
+ "import": "./dist/components/Skeleton/index.js"
39
+ },
20
40
  "./VideoFeed": {
21
41
  "types": "./dist/components/VideoFeed/index.d.ts",
22
42
  "import": "./dist/components/VideoFeed/index.js"
43
+ },
44
+ "./VideoInfo": {
45
+ "types": "./dist/components/VideoInfo/index.d.ts",
46
+ "import": "./dist/components/VideoInfo/index.js"
47
+ },
48
+ "./VideoPlayer": {
49
+ "types": "./dist/components/VideoPlayer/index.d.ts",
50
+ "import": "./dist/components/VideoPlayer/index.js"
51
+ },
52
+ "./VideoSlot": {
53
+ "types": "./dist/components/VideoSlot/index.d.ts",
54
+ "import": "./dist/components/VideoSlot/index.js"
55
+ },
56
+ "./VirtualSlider": {
57
+ "types": "./dist/components/VirtualSlider/index.d.ts",
58
+ "import": "./dist/components/VirtualSlider/index.js"
59
+ },
60
+ "./icons": {
61
+ "types": "./dist/components/icons/index.d.ts",
62
+ "import": "./dist/components/icons/index.js"
23
63
  }
24
64
  },
25
65
  "main": "./dist/index.js",
@@ -29,16 +69,20 @@
29
69
  ],
30
70
  "dependencies": {
31
71
  "clsx": "^2.1.0",
32
- "@xhub-short/contracts": "0.1.0-beta.1"
33
- },
34
- "optionalDependencies": {
35
- "@use-gesture/react": "^10.3.0",
36
- "hls.js": "^1.5.0"
72
+ "@xhub-short/contracts": "0.1.0-beta.11"
37
73
  },
38
74
  "peerDependencies": {
39
75
  "react": "^19.0.0",
40
76
  "react-dom": "^19.0.0"
41
77
  },
78
+ "peerDependenciesMeta": {
79
+ "hls.js": {
80
+ "optional": true
81
+ }
82
+ },
83
+ "optionalDependencies": {
84
+ "hls.js": "^1.5.0"
85
+ },
42
86
  "devDependencies": {
43
87
  "@testing-library/react": "^16.0.0",
44
88
  "@types/node": "^22.0.0",
@@ -50,7 +94,7 @@
50
94
  "typescript": "^5.7.0",
51
95
  "vitest": "^2.1.0",
52
96
  "@xhub-short/tsconfig": "0.0.0",
53
- "@xhub-short/vitest-config": "0.0.1-beta.0"
97
+ "@xhub-short/vitest-config": "0.1.0-beta.10"
54
98
  },
55
99
  "scripts": {
56
100
  "build": "tsup",