@100mslive/roomkit-react 0.3.24 → 0.3.25-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -915,8 +915,13 @@
915
915
  "format": "esm"
916
916
  },
917
917
  "src/VideoTile/StyledVideoTile.tsx": {
918
- "bytes": 2968,
918
+ "bytes": 3105,
919
919
  "imports": [
920
+ {
921
+ "path": "framer-motion",
922
+ "kind": "import-statement",
923
+ "external": true
924
+ },
920
925
  {
921
926
  "path": "src/Layout/index.tsx",
922
927
  "kind": "import-statement",
@@ -5779,7 +5784,7 @@
5779
5784
  "format": "cjs"
5780
5785
  },
5781
5786
  "../hms-video-store/dist/index.js": {
5782
- "bytes": 373860,
5787
+ "bytes": 374174,
5783
5788
  "imports": [
5784
5789
  {
5785
5790
  "path": "../../node_modules/reselect/es/index.js",
@@ -10701,13 +10706,18 @@
10701
10706
  "format": "esm"
10702
10707
  },
10703
10708
  "src/Prebuilt/components/VideoLayouts/Grid.tsx": {
10704
- "bytes": 1272,
10709
+ "bytes": 1428,
10705
10710
  "imports": [
10706
10711
  {
10707
10712
  "path": "react",
10708
10713
  "kind": "import-statement",
10709
10714
  "external": true
10710
10715
  },
10716
+ {
10717
+ "path": "framer-motion",
10718
+ "kind": "import-statement",
10719
+ "external": true
10720
+ },
10711
10721
  {
10712
10722
  "path": "@100mslive/react-sdk",
10713
10723
  "kind": "import-statement",
@@ -11321,7 +11331,7 @@
11321
11331
  ],
11322
11332
  "format": "esm"
11323
11333
  },
11324
- "../../../../../../../tmp/tmp-2792-syn0Gf89RRcC/1931be0167c1/tldraw.css": {
11334
+ "../../../../../../../tmp/tmp-2773-hI6w7T2P7kzb/1932f8a9bf93/tldraw.css": {
11325
11335
  "bytes": 80111,
11326
11336
  "imports": [
11327
11337
  {
@@ -11371,7 +11381,7 @@
11371
11381
  }
11372
11382
  ]
11373
11383
  },
11374
- "../../../../../../../tmp/tmp-2792-syn0Gf89RRcC/1931be015f10/index.css": {
11384
+ "../../../../../../../tmp/tmp-2773-hI6w7T2P7kzb/1932f8a9b7e0/index.css": {
11375
11385
  "bytes": 597,
11376
11386
  "imports": [
11377
11387
  {
@@ -11380,7 +11390,7 @@
11380
11390
  "external": true
11381
11391
  },
11382
11392
  {
11383
- "path": "../../../../../../../tmp/tmp-2792-syn0Gf89RRcC/1931be0167c1/tldraw.css",
11393
+ "path": "../../../../../../../tmp/tmp-2773-hI6w7T2P7kzb/1932f8a9bf93/tldraw.css",
11384
11394
  "kind": "import-rule",
11385
11395
  "original": "@tldraw/tldraw/tldraw.css"
11386
11396
  }
@@ -11455,7 +11465,7 @@
11455
11465
  "original": "../../common/constants"
11456
11466
  },
11457
11467
  {
11458
- "path": "../../../../../../../tmp/tmp-2792-syn0Gf89RRcC/1931be015f10/index.css",
11468
+ "path": "../../../../../../../tmp/tmp-2773-hI6w7T2P7kzb/1932f8a9b7e0/index.css",
11459
11469
  "kind": "import-statement",
11460
11470
  "original": "@100mslive/hms-whiteboard/index.css"
11461
11471
  },
@@ -15719,7 +15729,7 @@
15719
15729
  "imports": [],
15720
15730
  "exports": [],
15721
15731
  "inputs": {},
15722
- "bytes": 3622096
15732
+ "bytes": 3623645
15723
15733
  },
15724
15734
  "dist/index.cjs.js": {
15725
15735
  "imports": [
@@ -15863,6 +15873,11 @@
15863
15873
  "kind": "require-call",
15864
15874
  "external": true
15865
15875
  },
15876
+ {
15877
+ "path": "framer-motion",
15878
+ "kind": "require-call",
15879
+ "external": true
15880
+ },
15866
15881
  {
15867
15882
  "path": "@radix-ui/react-dropdown-menu",
15868
15883
  "kind": "require-call",
@@ -18098,6 +18113,11 @@
18098
18113
  "kind": "require-call",
18099
18114
  "external": true
18100
18115
  },
18116
+ {
18117
+ "path": "framer-motion",
18118
+ "kind": "require-call",
18119
+ "external": true
18120
+ },
18101
18121
  {
18102
18122
  "path": "react",
18103
18123
  "kind": "require-call",
@@ -19057,7 +19077,7 @@
19057
19077
  "cssBundle": "dist/index.cjs.css",
19058
19078
  "inputs": {
19059
19079
  "<define:process.env>": {
19060
- "bytesInOutput": 17919
19080
+ "bytesInOutput": 18073
19061
19081
  },
19062
19082
  "../../node_modules/lodash/lodash.js": {
19063
19083
  "bytesInOutput": 224296
@@ -19231,7 +19251,7 @@
19231
19251
  "bytesInOutput": 27
19232
19252
  },
19233
19253
  "src/VideoTile/StyledVideoTile.tsx": {
19234
- "bytesInOutput": 2594
19254
+ "bytesInOutput": 2753
19235
19255
  },
19236
19256
  "src/VideoList/index.tsx": {
19237
19257
  "bytesInOutput": 27
@@ -19591,7 +19611,7 @@
19591
19611
  "bytesInOutput": 10613
19592
19612
  },
19593
19613
  "../hms-video-store/dist/index.js": {
19594
- "bytesInOutput": 54392
19614
+ "bytesInOutput": 54400
19595
19615
  },
19596
19616
  "../../node_modules/reselect/es/index.js": {
19597
19617
  "bytesInOutput": 2539
@@ -19903,7 +19923,7 @@
19903
19923
  "bytesInOutput": 1796
19904
19924
  },
19905
19925
  "src/Prebuilt/components/VideoLayouts/Grid.tsx": {
19906
- "bytesInOutput": 1268
19926
+ "bytesInOutput": 1422
19907
19927
  },
19908
19928
  "src/Prebuilt/components/hooks/useTileLayout.tsx": {
19909
19929
  "bytesInOutput": 3866
@@ -19935,7 +19955,7 @@
19935
19955
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
19936
19956
  "bytesInOutput": 3051
19937
19957
  },
19938
- "../../../../../../../tmp/tmp-2792-syn0Gf89RRcC/1931be015f10/index.css": {
19958
+ "../../../../../../../tmp/tmp-2773-hI6w7T2P7kzb/1932f8a9b7e0/index.css": {
19939
19959
  "bytesInOutput": 0
19940
19960
  },
19941
19961
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -20170,7 +20190,7 @@
20170
20190
  "bytesInOutput": 2777
20171
20191
  }
20172
20192
  },
20173
- "bytes": 1505609
20193
+ "bytes": 1506084
20174
20194
  },
20175
20195
  "dist/index.cjs.css.map": {
20176
20196
  "imports": [],
@@ -20232,10 +20252,10 @@
20232
20252
  }
20233
20253
  ],
20234
20254
  "inputs": {
20235
- "../../../../../../../tmp/tmp-2792-syn0Gf89RRcC/1931be0167c1/tldraw.css": {
20255
+ "../../../../../../../tmp/tmp-2773-hI6w7T2P7kzb/1932f8a9bf93/tldraw.css": {
20236
20256
  "bytesInOutput": 75223
20237
20257
  },
20238
- "../../../../../../../tmp/tmp-2792-syn0Gf89RRcC/1931be015f10/index.css": {
20258
+ "../../../../../../../tmp/tmp-2773-hI6w7T2P7kzb/1932f8a9b7e0/index.css": {
20239
20259
  "bytesInOutput": 401
20240
20260
  }
20241
20261
  },
@@ -915,8 +915,13 @@
915
915
  "format": "esm"
916
916
  },
917
917
  "src/VideoTile/StyledVideoTile.tsx": {
918
- "bytes": 2968,
918
+ "bytes": 3105,
919
919
  "imports": [
920
+ {
921
+ "path": "framer-motion",
922
+ "kind": "import-statement",
923
+ "external": true
924
+ },
920
925
  {
921
926
  "path": "src/Layout/index.tsx",
922
927
  "kind": "import-statement",
@@ -5779,7 +5784,7 @@
5779
5784
  "format": "cjs"
5780
5785
  },
5781
5786
  "../hms-video-store/dist/index.js": {
5782
- "bytes": 373860,
5787
+ "bytes": 374174,
5783
5788
  "imports": [
5784
5789
  {
5785
5790
  "path": "../../node_modules/reselect/es/index.js",
@@ -10701,13 +10706,18 @@
10701
10706
  "format": "esm"
10702
10707
  },
10703
10708
  "src/Prebuilt/components/VideoLayouts/Grid.tsx": {
10704
- "bytes": 1272,
10709
+ "bytes": 1428,
10705
10710
  "imports": [
10706
10711
  {
10707
10712
  "path": "react",
10708
10713
  "kind": "import-statement",
10709
10714
  "external": true
10710
10715
  },
10716
+ {
10717
+ "path": "framer-motion",
10718
+ "kind": "import-statement",
10719
+ "external": true
10720
+ },
10711
10721
  {
10712
10722
  "path": "@100mslive/react-sdk",
10713
10723
  "kind": "import-statement",
@@ -11321,7 +11331,7 @@
11321
11331
  ],
11322
11332
  "format": "esm"
11323
11333
  },
11324
- "../../../../../../../tmp/tmp-2792-ichNzF0hFphw/1931be017163/tldraw.css": {
11334
+ "../../../../../../../tmp/tmp-2773-6RMsN9ZT6He3/1932f8a9bf82/tldraw.css": {
11325
11335
  "bytes": 80111,
11326
11336
  "imports": [
11327
11337
  {
@@ -11371,7 +11381,7 @@
11371
11381
  }
11372
11382
  ]
11373
11383
  },
11374
- "../../../../../../../tmp/tmp-2792-ichNzF0hFphw/1931be017122/index.css": {
11384
+ "../../../../../../../tmp/tmp-2773-6RMsN9ZT6He3/1932f8a9bd61/index.css": {
11375
11385
  "bytes": 597,
11376
11386
  "imports": [
11377
11387
  {
@@ -11380,7 +11390,7 @@
11380
11390
  "external": true
11381
11391
  },
11382
11392
  {
11383
- "path": "../../../../../../../tmp/tmp-2792-ichNzF0hFphw/1931be017163/tldraw.css",
11393
+ "path": "../../../../../../../tmp/tmp-2773-6RMsN9ZT6He3/1932f8a9bf82/tldraw.css",
11384
11394
  "kind": "import-rule",
11385
11395
  "original": "@tldraw/tldraw/tldraw.css"
11386
11396
  }
@@ -11455,7 +11465,7 @@
11455
11465
  "original": "../../common/constants"
11456
11466
  },
11457
11467
  {
11458
- "path": "../../../../../../../tmp/tmp-2792-ichNzF0hFphw/1931be017122/index.css",
11468
+ "path": "../../../../../../../tmp/tmp-2773-6RMsN9ZT6He3/1932f8a9bd61/index.css",
11459
11469
  "kind": "import-statement",
11460
11470
  "original": "@100mslive/hms-whiteboard/index.css"
11461
11471
  },
@@ -15719,7 +15729,7 @@
15719
15729
  "imports": [],
15720
15730
  "exports": [],
15721
15731
  "inputs": {},
15722
- "bytes": 3662111
15732
+ "bytes": 3663636
15723
15733
  },
15724
15734
  "dist/index.js": {
15725
15735
  "imports": [
@@ -15863,6 +15873,11 @@
15863
15873
  "kind": "import-statement",
15864
15874
  "external": true
15865
15875
  },
15876
+ {
15877
+ "path": "framer-motion",
15878
+ "kind": "import-statement",
15879
+ "external": true
15880
+ },
15866
15881
  {
15867
15882
  "path": "@radix-ui/react-dropdown-menu",
15868
15883
  "kind": "import-statement",
@@ -18098,6 +18113,11 @@
18098
18113
  "kind": "import-statement",
18099
18114
  "external": true
18100
18115
  },
18116
+ {
18117
+ "path": "framer-motion",
18118
+ "kind": "import-statement",
18119
+ "external": true
18120
+ },
18101
18121
  {
18102
18122
  "path": "react",
18103
18123
  "kind": "import-statement",
@@ -19123,7 +19143,7 @@
19123
19143
  "cssBundle": "dist/index.css",
19124
19144
  "inputs": {
19125
19145
  "<define:process.env>": {
19126
- "bytesInOutput": 17919
19146
+ "bytesInOutput": 18073
19127
19147
  },
19128
19148
  "../../node_modules/lodash/lodash.js": {
19129
19149
  "bytesInOutput": 224291
@@ -19297,7 +19317,7 @@
19297
19317
  "bytesInOutput": 27
19298
19318
  },
19299
19319
  "src/VideoTile/StyledVideoTile.tsx": {
19300
- "bytesInOutput": 2594
19320
+ "bytesInOutput": 2714
19301
19321
  },
19302
19322
  "src/VideoList/index.tsx": {
19303
19323
  "bytesInOutput": 27
@@ -19657,7 +19677,7 @@
19657
19677
  "bytesInOutput": 9861
19658
19678
  },
19659
19679
  "../hms-video-store/dist/index.js": {
19660
- "bytesInOutput": 54280
19680
+ "bytesInOutput": 54288
19661
19681
  },
19662
19682
  "../../node_modules/reselect/es/index.js": {
19663
19683
  "bytesInOutput": 2539
@@ -19969,7 +19989,7 @@
19969
19989
  "bytesInOutput": 1698
19970
19990
  },
19971
19991
  "src/Prebuilt/components/VideoLayouts/Grid.tsx": {
19972
- "bytesInOutput": 1204
19992
+ "bytesInOutput": 1316
19973
19993
  },
19974
19994
  "src/Prebuilt/components/hooks/useTileLayout.tsx": {
19975
19995
  "bytesInOutput": 3834
@@ -20001,7 +20021,7 @@
20001
20021
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
20002
20022
  "bytesInOutput": 2830
20003
20023
  },
20004
- "../../../../../../../tmp/tmp-2792-ichNzF0hFphw/1931be017122/index.css": {
20024
+ "../../../../../../../tmp/tmp-2773-6RMsN9ZT6He3/1932f8a9bd61/index.css": {
20005
20025
  "bytesInOutput": 0
20006
20026
  },
20007
20027
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -20236,7 +20256,7 @@
20236
20256
  "bytesInOutput": 2632
20237
20257
  }
20238
20258
  },
20239
- "bytes": 1450651
20259
+ "bytes": 1451045
20240
20260
  },
20241
20261
  "dist/index.css.map": {
20242
20262
  "imports": [],
@@ -20298,10 +20318,10 @@
20298
20318
  }
20299
20319
  ],
20300
20320
  "inputs": {
20301
- "../../../../../../../tmp/tmp-2792-ichNzF0hFphw/1931be017163/tldraw.css": {
20321
+ "../../../../../../../tmp/tmp-2773-6RMsN9ZT6He3/1932f8a9bf82/tldraw.css": {
20302
20322
  "bytesInOutput": 75223
20303
20323
  },
20304
- "../../../../../../../tmp/tmp-2792-ichNzF0hFphw/1931be017122/index.css": {
20324
+ "../../../../../../../tmp/tmp-2773-6RMsN9ZT6He3/1932f8a9bd61/index.css": {
20305
20325
  "bytesInOutput": 401
20306
20326
  }
20307
20327
  },
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.24",
13
+ "version": "0.3.25-alpha.0",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -75,12 +75,12 @@
75
75
  "react": ">=17.0.2 <19.0.0"
76
76
  },
77
77
  "dependencies": {
78
- "@100mslive/hls-player": "0.3.24",
78
+ "@100mslive/hls-player": "0.3.25-alpha.0",
79
79
  "@100mslive/hms-noise-cancellation": "0.0.1",
80
- "@100mslive/hms-virtual-background": "1.13.24",
81
- "@100mslive/hms-whiteboard": "0.0.14",
82
- "@100mslive/react-icons": "0.10.24",
83
- "@100mslive/react-sdk": "0.10.24",
80
+ "@100mslive/hms-virtual-background": "1.13.25-alpha.0",
81
+ "@100mslive/hms-whiteboard": "0.0.15-alpha.0",
82
+ "@100mslive/react-icons": "0.10.25-alpha.0",
83
+ "@100mslive/react-sdk": "0.10.25-alpha.0",
84
84
  "@100mslive/types-prebuilt": "0.12.12",
85
85
  "@emoji-mart/data": "^1.0.6",
86
86
  "@emoji-mart/react": "^1.0.1",
@@ -102,6 +102,7 @@
102
102
  "@stitches/react": "1.3.1-1",
103
103
  "emoji-mart": "^5.2.2",
104
104
  "eventemitter2": "^6.4.9",
105
+ "framer-motion": "^11.11.0",
105
106
  "lodash.merge": "^4.6.2",
106
107
  "qrcode.react": "^3.1.0",
107
108
  "react-dom": "^18.2.0",
@@ -117,5 +118,5 @@
117
118
  "uuid": "^8.3.2",
118
119
  "worker-timers": "^7.0.40"
119
120
  },
120
- "gitHead": "5fa06e76860c048811f0ba23e372a048bfd93fa4"
121
+ "gitHead": "b9a15a40498feb37cf34dc6fab790cb9dcfcd775"
121
122
  }
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { AnimatePresence } from 'framer-motion';
2
3
  import { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';
3
4
  import { Box } from '../../../Layout';
4
5
  // @ts-ignore: No implicit Any
@@ -9,35 +10,37 @@ export const Grid = React.forwardRef<HTMLDivElement, { tiles: TrackWithPeerAndDi
9
10
  ({ tiles, edgeToEdge }, ref) => {
10
11
  const videoTileProps = useVideoTileContext();
11
12
  return (
12
- <Box
13
- ref={ref}
14
- css={{
15
- flex: '1 1 0',
16
- gap: '$4',
17
- display: 'flex',
18
- placeContent: 'center',
19
- alignItems: 'center',
20
- justifyContent: 'center',
21
- flexFlow: 'row wrap',
22
- minHeight: 0,
23
- '@lg': { gap: edgeToEdge ? 0 : '$4' },
24
- }}
25
- >
26
- {tiles?.map(tile => {
27
- return (
28
- <VideoTile
29
- key={tile.track?.id || tile.peer?.id}
30
- width={tile.width}
31
- height={tile.height}
32
- peerId={tile.peer?.id}
33
- trackId={tile.track?.id}
34
- rootCSS={{ padding: 0 }}
35
- objectFit="contain"
36
- {...videoTileProps}
37
- />
38
- );
39
- })}
40
- </Box>
13
+ <AnimatePresence>
14
+ <Box
15
+ ref={ref}
16
+ css={{
17
+ flex: '1 1 0',
18
+ gap: '$4',
19
+ display: 'flex',
20
+ placeContent: 'center',
21
+ alignItems: 'center',
22
+ justifyContent: 'center',
23
+ flexFlow: 'row wrap',
24
+ minHeight: 0,
25
+ '@lg': { gap: edgeToEdge ? 0 : '$4' },
26
+ }}
27
+ >
28
+ {tiles?.map(tile => {
29
+ return (
30
+ <VideoTile
31
+ key={tile.track?.id || tile.peer?.id}
32
+ width={tile.width}
33
+ height={tile.height}
34
+ peerId={tile.peer?.id}
35
+ trackId={tile.track?.id}
36
+ rootCSS={{ padding: 0 }}
37
+ objectFit="contain"
38
+ {...videoTileProps}
39
+ />
40
+ );
41
+ })}
42
+ </Box>
43
+ </AnimatePresence>
41
44
  );
42
45
  },
43
46
  );
@@ -1,15 +1,24 @@
1
+ import { motion } from 'framer-motion';
1
2
  import { Box } from '../Layout';
2
3
  import { styled } from '../Theme';
3
4
  import { flexCenter } from '../utils';
4
5
 
5
6
  export const Root = styled('div', {
6
7
  padding: '0.75rem',
7
- // show videotile context menu on hover
8
- // [`&:hover .tile-menu`]: {
9
- // display: 'inline-block',
10
- // },
11
8
  });
12
9
 
10
+ const MotionRoot = motion(Root);
11
+ MotionRoot.defaultProps = {
12
+ layout: true,
13
+ transition: {
14
+ type: 'spring',
15
+ stiffness: 300,
16
+ damping: 30,
17
+ mass: 1,
18
+ duration: 0.15,
19
+ },
20
+ };
21
+
13
22
  const Container = styled('div', {
14
23
  width: '100%',
15
24
  height: '100%',
@@ -128,7 +137,7 @@ const AvatarContainer = styled(Box, {
128
137
  });
129
138
 
130
139
  interface VideoTileType {
131
- Root: typeof Root;
140
+ Root: typeof MotionRoot;
132
141
  Container: typeof Container;
133
142
  Overlay: typeof Overlay;
134
143
  Info: typeof Info;
@@ -139,7 +148,7 @@ interface VideoTileType {
139
148
  }
140
149
 
141
150
  export const StyledVideoTile: VideoTileType = {
142
- Root,
151
+ Root: MotionRoot,
143
152
  Container,
144
153
  Overlay,
145
154
  Info,