@100mslive/roomkit-react 0.4.3-alpha.0 → 0.4.3-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/Prebuilt/App.d.ts +1 -0
  2. package/dist/Prebuilt/AppContext.d.ts +1 -0
  3. package/dist/index.cjs.css +2 -2
  4. package/dist/index.cjs.css.map +1 -1
  5. package/dist/index.cjs.js +79 -11
  6. package/dist/index.cjs.js.map +3 -3
  7. package/dist/index.css +2 -2
  8. package/dist/index.css.map +1 -1
  9. package/dist/index.js +79 -11
  10. package/dist/index.js.map +3 -3
  11. package/dist/meta.cjs.json +22 -17
  12. package/dist/meta.esbuild.json +22 -17
  13. package/package.json +8 -20
  14. package/src/Prebuilt/App.tsx +6 -1
  15. package/src/Prebuilt/AppContext.tsx +1 -0
  16. package/src/Prebuilt/layouts/HLSView.jsx +51 -4
  17. package/src/Accordion/Accordion.stories.tsx +0 -50
  18. package/src/Avatar/Avatar.stories.tsx +0 -33
  19. package/src/Button/Button.mdx +0 -43
  20. package/src/Button/Button.stories.tsx +0 -52
  21. package/src/Chat/Chat.mdx +0 -39
  22. package/src/Chat/Chat.stories.tsx +0 -39
  23. package/src/Checkbox/Checkbox.stories.tsx +0 -61
  24. package/src/Divider/HorizontalDivider.stories.tsx +0 -34
  25. package/src/Divider/VerticalDivider.stories.tsx +0 -40
  26. package/src/Dropdown/Dropdown.stories.tsx +0 -94
  27. package/src/Fieldset/Fieldset.stories.tsx +0 -29
  28. package/src/Footer/Footer.stories.tsx +0 -61
  29. package/src/Icons/Icons.stories.mdx +0 -10
  30. package/src/Icons/IconsList.jsx +0 -17
  31. package/src/Input/Input.stories.tsx +0 -25
  32. package/src/Input/PasswordInput.stories.tsx +0 -53
  33. package/src/Introduction/Integrating.stories.mdx +0 -100
  34. package/src/Introduction/Introduction.stories.mdx +0 -9
  35. package/src/Link/Link.stories.tsx +0 -18
  36. package/src/Loading/Loading.mdx +0 -15
  37. package/src/Loading/Loading.stories.tsx +0 -37
  38. package/src/Modal/Dialog.mdx +0 -19
  39. package/src/Modal/Dialog.stories.tsx +0 -68
  40. package/src/Pagination/StyledPagination.stories.tsx +0 -80
  41. package/src/Popover/Popover.mdx +0 -9
  42. package/src/Popover/Popover.stories.tsx +0 -95
  43. package/src/Prebuilt/Prebuilt.stories.tsx +0 -46
  44. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.stories.tsx +0 -40
  45. package/src/QRCode/QRCode.mdx +0 -9
  46. package/src/QRCode/QRCode.stories.tsx +0 -29
  47. package/src/RadioGroup/RadioGroup.stories.tsx +0 -32
  48. package/src/ReactSelect/ReactSelect.stories.tsx +0 -83
  49. package/src/Select/Select.stories.tsx +0 -33
  50. package/src/Sheet/Sheet.mdx +0 -19
  51. package/src/Sheet/Sheet.stories.tsx +0 -103
  52. package/src/Slider/Slider.stories.tsx +0 -21
  53. package/src/Switch/Switch.mdx +0 -11
  54. package/src/Switch/Switch.stories.tsx +0 -46
  55. package/src/Tabs/Tabs.stories.tsx +0 -77
  56. package/src/Text/Text.stories.tsx +0 -21
  57. package/src/Theme/Theme.stories.mdx +0 -8
  58. package/src/Theme/ThemeStory.jsx +0 -56
  59. package/src/Toast/AppToast.stories.tsx +0 -56
  60. package/src/Toast/Toast.mdx +0 -19
  61. package/src/Toast/Toast.stories.tsx +0 -57
  62. package/src/Tooltip/Tooltip.stories.tsx +0 -62
  63. package/src/Video/UseVideo.mdx +0 -22
  64. package/src/Video/UseVideo.stories.tsx +0 -26
  65. package/src/Video/Video.mdx +0 -24
  66. package/src/Video/Video.stories.tsx +0 -27
  67. package/src/VideoList/VideoList.stories.tsx +0 -92
  68. package/src/VideoTile/VideoTile.mdx +0 -28
  69. package/src/VideoTile/VideoTile.stories.tsx +0 -32
@@ -1,92 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { ComponentStory } from '@storybook/react';
3
- import { selectPeers, useHMSStore, useVideoList } from '@100mslive/react-sdk';
4
- import { MicOffIcon } from '@100mslive/react-icons';
5
- import { Video } from '../Video/Video';
6
- import { StyledVideoTile } from '../VideoTile';
7
- import { StyledVideoList } from './StyledVideoList';
8
- import { getLeft } from './videoListUtils';
9
-
10
- const VideoListMeta = {
11
- title: 'Video/VideoList',
12
- };
13
-
14
- export default VideoListMeta;
15
-
16
- const VideoTile: React.FC<{ width: number; height: number; trackId: string; name: string }> = ({
17
- width,
18
- height,
19
- trackId,
20
- name,
21
- }) => {
22
- return (
23
- <StyledVideoTile.Root css={{ width, height }}>
24
- <StyledVideoTile.Container>
25
- <Video trackId={trackId} />
26
- <StyledVideoTile.Info>{name}</StyledVideoTile.Info>
27
- <StyledVideoTile.AudioIndicator>
28
- <MicOffIcon />
29
- </StyledVideoTile.AudioIndicator>
30
- </StyledVideoTile.Container>
31
- </StyledVideoTile.Root>
32
- );
33
- };
34
-
35
- interface VideoListProps {
36
- maxTileCount: number;
37
- aspectRatio: {
38
- width: number;
39
- height: number;
40
- };
41
- }
42
-
43
- const VideoListStory: React.FC<VideoListProps> = ({ maxTileCount, aspectRatio }) => {
44
- const peers = useHMSStore(selectPeers);
45
- const [page] = useState(0);
46
- const { ref, pagesWithTiles } = useVideoList({
47
- peers,
48
- offsetY: 50,
49
- maxTileCount,
50
- aspectRatio,
51
- });
52
- return (
53
- <StyledVideoList.Root css={{ height: '100vh', width: '100%' }} ref={ref}>
54
- <StyledVideoList.Container>
55
- {pagesWithTiles && pagesWithTiles.length > 0
56
- ? pagesWithTiles.map((tiles, pageNo) => (
57
- <StyledVideoList.View
58
- css={{
59
- left: getLeft(pageNo, page),
60
- transition: 'left 0.3s ease-in-out',
61
- }}
62
- >
63
- {tiles.map((tile, i) =>
64
- tile.track?.source === 'screen' ? null : (
65
- <VideoTile
66
- key={tile.track?.id || tile.peer.id + i}
67
- width={tile.width}
68
- height={tile.height}
69
- trackId={tile.track?.id || ''}
70
- name={tile.peer.name}
71
- />
72
- ),
73
- )}
74
- </StyledVideoList.View>
75
- ))
76
- : null}
77
- </StyledVideoList.Container>
78
- </StyledVideoList.Root>
79
- );
80
- };
81
-
82
- const Template: ComponentStory<typeof VideoListStory> = args => <VideoListStory {...args} />;
83
-
84
- export const Example = Template.bind({});
85
-
86
- Example.args = {
87
- maxTileCount: 2,
88
- aspectRatio: {
89
- width: 2,
90
- height: 1,
91
- },
92
- };
@@ -1,28 +0,0 @@
1
- ## VideoTile
2
-
3
- import { Story } from '@storybook/addon-docs';
4
-
5
- Building a `<VideoTile />` component is all about composing styled/unstyled component provided by `../`. We will create a basic videotile by composing `StyledVideoTile`.
6
-
7
- ```jsx
8
- import { StyledVideoTile, Video } from '../';
9
-
10
- const VideoTileStory = () => {
11
- return (
12
- // width,height of the tile
13
- <StyledVideoTile.Root css={{ width: 500, height: 300 }}>
14
- <StyledVideoTile.Container>
15
- {/* trackId of the peer */}
16
- <Video trackId="1" />
17
- {/* Meta info */}
18
- <StyledVideoTile.Info>Deepankar</StyledVideoTile.Info>
19
- <StyledVideoTile.AudioIndicator>
20
- <MicOffIcon />
21
- </StyledVideoTile.AudioIndicator>
22
- </StyledVideoTile.Container>
23
- </StyledVideoTile.Root>
24
- );
25
- };
26
- ```
27
-
28
- <Story id="video-videotile--example" />
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { MicOffIcon } from '@100mslive/react-icons';
3
- import { Video } from '../Video/Video';
4
- import { StyledVideoTile } from './StyledVideoTile';
5
- import VideoTileDocs from './VideoTile.mdx';
6
-
7
- const VideoTileMeta = {
8
- title: 'Video/VideoTile',
9
- parameters: {
10
- docs: {
11
- page: VideoTileDocs,
12
- },
13
- },
14
- };
15
-
16
- export default VideoTileMeta;
17
-
18
- const VideoTileStory = () => {
19
- return (
20
- <StyledVideoTile.Root css={{ width: 500, height: 300 }}>
21
- <StyledVideoTile.Container>
22
- <Video trackId="1" />
23
- <StyledVideoTile.Info>Deepankar</StyledVideoTile.Info>
24
- <StyledVideoTile.AudioIndicator>
25
- <MicOffIcon />
26
- </StyledVideoTile.AudioIndicator>
27
- </StyledVideoTile.Container>
28
- </StyledVideoTile.Root>
29
- );
30
- };
31
-
32
- export const Example = VideoTileStory.bind({});