@azure/communication-react 1.5.1-alpha-202303090014 → 1.5.1-alpha-202303100015

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 (26) hide show
  1. package/dist/dist-cjs/communication-react/index.js +95 -27
  2. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  3. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  5. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.d.ts +2 -0
  6. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js +6 -5
  7. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +10 -1
  9. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +17 -3
  11. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  12. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +4 -0
  13. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +1 -0
  15. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +13 -5
  16. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +8 -0
  18. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +6 -1
  19. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +26 -2
  21. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +42 -14
  22. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/utils/responsive.d.ts +6 -0
  24. package/dist/dist-esm/react-components/src/components/utils/responsive.js +7 -0
  25. package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
  26. package/package.json +8 -8
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { _pxToRem } from "../../../../../acs-ui-common/src";
4
- import { SMALL_FLOATING_MODAL_SIZE_PX, VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX } from './FloatingLocalVideo.styles';
4
+ import { SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX, SMALL_FLOATING_MODAL_SIZE_PX, VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX } from './FloatingLocalVideo.styles';
5
5
  /**
6
6
  * VerticalGallery tile size in rem:
7
7
  *
@@ -10,7 +10,16 @@ import { SMALL_FLOATING_MODAL_SIZE_PX, VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX }
10
10
  *
11
11
  * @private
12
12
  */
13
- export const VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 5.625, maxHeight: 9, width: 9 };
13
+ export const SHORT_VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 5.625, maxHeight: 9, width: 9 };
14
+ /**
15
+ * VerticalGallery tile size in rem:
16
+ *
17
+ * min - smallest possible size of the tile (90px)
18
+ * max - Largest size we want the vertical tiles (144px)
19
+ *
20
+ * @private
21
+ */
22
+ export const VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 6.75, maxHeight: 11, width: 11 };
14
23
  /**
15
24
  * Styles for the VerticalGallery's container set in parent.
16
25
  *
@@ -19,20 +28,39 @@ export const VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 5.625, maxHeight: 9,
19
28
  * @param shouldFloatLocalVideo whether rendered in floating layout or not
20
29
  * @returns Style set for VerticalGallery container.
21
30
  */
22
- export const verticalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow) => {
23
- return isNarrow
31
+ export const verticalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow, isShort) => {
32
+ return isNarrow && isShort
24
33
  ? {
25
- width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
34
+ width: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
26
35
  height: shouldFloatLocalVideo ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height)})` : '100%',
27
36
  paddingBottom: '0.5rem'
28
37
  }
29
- : {
30
- width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
31
- height: shouldFloatLocalVideo
32
- ? `calc(100% - ${_pxToRem(VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX.height)})`
33
- : '100%',
34
- paddingBottom: '0.5rem'
35
- };
38
+ : !isNarrow && isShort
39
+ ? {
40
+ width: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
41
+ height: shouldFloatLocalVideo
42
+ ? `calc(100% - ${_pxToRem(SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX.height)})`
43
+ : '100%',
44
+ paddingBottom: '0.5rem'
45
+ }
46
+ : {
47
+ width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
48
+ height: shouldFloatLocalVideo
49
+ ? `calc(100% - ${_pxToRem(VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX.height)})`
50
+ : '100%',
51
+ paddingBottom: '0.5rem'
52
+ };
53
+ };
54
+ /**
55
+ * @private
56
+ */
57
+ export const SHORT_VERTICAL_GALLERY_TILE_STYLE = {
58
+ minHeight: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.minHeight}rem`,
59
+ minWidth: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
60
+ maxHeight: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.maxHeight}rem`,
61
+ maxWidth: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
62
+ width: '100%',
63
+ height: '100%'
36
64
  };
37
65
  /**
38
66
  * @private
@@ -48,7 +76,7 @@ export const VERTICAL_GALLERY_TILE_STYLE = {
48
76
  /**
49
77
  * @private
50
78
  */
51
- export const verticalGalleryStyle = {
52
- children: VERTICAL_GALLERY_TILE_STYLE
79
+ export const verticalGalleryStyle = (isShort) => {
80
+ return isShort ? { children: SHORT_VERTICAL_GALLERY_TILE_STYLE } : { children: VERTICAL_GALLERY_TILE_STYLE };
53
81
  };
54
82
  //# sourceMappingURL=VideoGalleryResponsiveVerticalGallery.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VideoGalleryResponsiveVerticalGallery.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,uCAAuC,EAAE,MAAM,6BAA6B,CAAC;AAEpH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAE3F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,qBAA8B,EAAE,QAAiB,EAAU,EAAE;IACzG,OAAO,QAAQ;QACb,CAAC,CAAC;YACE,KAAK,EAAE,GAAG,8BAA8B,CAAC,KAAK,KAAK;YACnD,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,eAAe,QAAQ,CAAC,4BAA4B,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;YACxG,aAAa,EAAE,QAAQ;SACxB;QACH,CAAC,CAAC;YACE,KAAK,EAAE,GAAG,8BAA8B,CAAC,KAAK,KAAK;YACnD,MAAM,EAAE,qBAAqB;gBAC3B,CAAC,CAAC,eAAe,QAAQ,CAAC,uCAAuC,CAAC,MAAM,CAAC,GAAG;gBAC5E,CAAC,CAAC,MAAM;YACV,aAAa,EAAE,QAAQ;SACxB,CAAC;AACR,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,SAAS,EAAE,GAAG,8BAA8B,CAAC,SAAS,KAAK;IAC3D,QAAQ,EAAE,GAAG,8BAA8B,CAAC,KAAK,KAAK;IACtD,SAAS,EAAE,GAAG,8BAA8B,CAAC,SAAS,KAAK;IAC3D,QAAQ,EAAE,GAAG,8BAA8B,CAAC,KAAK,KAAK;IACtD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;CACf,CAAC;AACF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,QAAQ,EAAE,2BAA2B;CACtC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStyle } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { VerticalGalleryStyles } from '../../VerticalGallery';\nimport { SMALL_FLOATING_MODAL_SIZE_PX, VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX } from './FloatingLocalVideo.styles';\n\n/**\n * VerticalGallery tile size in rem:\n *\n * min - smallest possible size of the tile (90px)\n * max - Largest size we want the vertical tiles (144px)\n *\n * @private\n */\nexport const VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 5.625, maxHeight: 9, width: 9 };\n\n/**\n * Styles for the VerticalGallery's container set in parent.\n *\n * width is being increased by 1rem to account for the gap width desired for the VerticalGallery.\n *\n * @param shouldFloatLocalVideo whether rendered in floating layout or not\n * @returns Style set for VerticalGallery container.\n */\nexport const verticalGalleryContainerStyle = (shouldFloatLocalVideo: boolean, isNarrow: boolean): IStyle => {\n return isNarrow\n ? {\n width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n height: shouldFloatLocalVideo ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height)})` : '100%',\n paddingBottom: '0.5rem'\n }\n : {\n width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n height: shouldFloatLocalVideo\n ? `calc(100% - ${_pxToRem(VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX.height)})`\n : '100%',\n paddingBottom: '0.5rem'\n };\n};\n\n/**\n * @private\n */\nexport const VERTICAL_GALLERY_TILE_STYLE = {\n minHeight: `${VERTICAL_GALLERY_TILE_SIZE_REM.minHeight}rem`,\n minWidth: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n maxHeight: `${VERTICAL_GALLERY_TILE_SIZE_REM.maxHeight}rem`,\n maxWidth: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n width: '100%',\n height: '100%'\n};\n/**\n * @private\n */\nexport const verticalGalleryStyle: VerticalGalleryStyles = {\n children: VERTICAL_GALLERY_TILE_STYLE\n};\n\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"VideoGalleryResponsiveVerticalGallery.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD,OAAO,EACL,6CAA6C,EAC7C,4BAA4B,EAC5B,uCAAuC,EACxC,MAAM,6BAA6B,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,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AS,KAAK;IACjE,QAAQ,EAAE,GAAG,oCAAoC,CAAC,KAAK,KAAK;IAC5D,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,SAAS,EAAE,GAAG,8BAA8B,CAAC,SAAS,KAAK;IAC3D,QAAQ,EAAE,GAAG,8BAA8B,CAAC,KAAK,KAAK;IACtD,SAAS,EAAE,GAAG,8BAA8B,CAAC,SAAS,KAAK;IAC3D,QAAQ,EAAE,GAAG,8BAA8B,CAAC,KAAK,KAAK;IACtD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAgB,EAAyB,EAAE;IAC9E,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,iCAAiC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,2BAA2B,EAAE,CAAC;AAC/G,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStyle } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { VerticalGalleryStyles } from '../../VerticalGallery';\nimport {\n SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX,\n SMALL_FLOATING_MODAL_SIZE_PX,\n VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX\n} from './FloatingLocalVideo.styles';\n\n/**\n * VerticalGallery tile size in rem:\n *\n * min - smallest possible size of the tile (90px)\n * max - Largest size we want the vertical tiles (144px)\n *\n * @private\n */\nexport const SHORT_VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 5.625, maxHeight: 9, width: 9 };\n\n/**\n * VerticalGallery tile size in rem:\n *\n * min - smallest possible size of the tile (90px)\n * max - Largest size we want the vertical tiles (144px)\n *\n * @private\n */\nexport const VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 6.75, maxHeight: 11, width: 11 };\n\n/**\n * Styles for the VerticalGallery's container set in parent.\n *\n * width is being increased by 1rem to account for the gap width desired for the VerticalGallery.\n *\n * @param shouldFloatLocalVideo whether rendered in floating layout or not\n * @returns Style set for VerticalGallery container.\n */\nexport const verticalGalleryContainerStyle = (\n shouldFloatLocalVideo: boolean,\n isNarrow: boolean,\n isShort: boolean\n): IStyle => {\n return isNarrow && isShort\n ? {\n width: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n height: shouldFloatLocalVideo ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height)})` : '100%',\n paddingBottom: '0.5rem'\n }\n : !isNarrow && isShort\n ? {\n width: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n height: shouldFloatLocalVideo\n ? `calc(100% - ${_pxToRem(SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX.height)})`\n : '100%',\n paddingBottom: '0.5rem'\n }\n : {\n width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n height: shouldFloatLocalVideo\n ? `calc(100% - ${_pxToRem(VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX.height)})`\n : '100%',\n paddingBottom: '0.5rem'\n };\n};\n\n/**\n * @private\n */\nexport const SHORT_VERTICAL_GALLERY_TILE_STYLE = {\n minHeight: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.minHeight}rem`,\n minWidth: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n maxHeight: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.maxHeight}rem`,\n maxWidth: `${SHORT_VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n width: '100%',\n height: '100%'\n};\n\n/**\n * @private\n */\nexport const VERTICAL_GALLERY_TILE_STYLE = {\n minHeight: `${VERTICAL_GALLERY_TILE_SIZE_REM.minHeight}rem`,\n minWidth: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n maxHeight: `${VERTICAL_GALLERY_TILE_SIZE_REM.maxHeight}rem`,\n maxWidth: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,\n width: '100%',\n height: '100%'\n};\n\n/**\n * @private\n */\nexport const verticalGalleryStyle = (isShort: boolean): VerticalGalleryStyles => {\n return isShort ? { children: SHORT_VERTICAL_GALLERY_TILE_STYLE } : { children: VERTICAL_GALLERY_TILE_STYLE };\n};\n\"../../../../../acs-ui-common/src\""]}
@@ -19,4 +19,10 @@ export declare const _useContainerHeight: (containerRef: RefObject<HTMLElement>)
19
19
  * @returns boolean
20
20
  */
21
21
  export declare const isNarrowWidth: (containerWidthRem: number) => boolean;
22
+ /**
23
+ * Utility function to determine if container width is short
24
+ * @param containerWidthRem container height in rem
25
+ * @returns boolean
26
+ */
27
+ export declare const isShortHeight: (containerHeightRem: number) => boolean;
22
28
  //# sourceMappingURL=responsive.d.ts.map
@@ -49,10 +49,17 @@ export const _useContainerHeight = (containerRef) => {
49
49
  return height;
50
50
  };
51
51
  const NARROW_WIDTH_REM = 30;
52
+ const SHORT_HEIGHT_REM = 23.75;
52
53
  /**
53
54
  * Utility function to determine if container width is narrow
54
55
  * @param containerWidthRem container width in rem
55
56
  * @returns boolean
56
57
  */
57
58
  export const isNarrowWidth = (containerWidthRem) => containerWidthRem <= convertRemToPx(NARROW_WIDTH_REM);
59
+ /**
60
+ * Utility function to determine if container width is short
61
+ * @param containerWidthRem container height in rem
62
+ * @returns boolean
63
+ */
64
+ export const isShortHeight = (containerHeightRem) => containerHeightRem <= convertRemToPx(SHORT_HEIGHT_REM);
58
65
  //# sourceMappingURL=responsive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/responsive.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAE,MAAM,EAA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AAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAChD;QAED,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC;QACzC,OAAO,GAAG,EAAE;YACV,eAAe,CAAC,UAAU,EAAE,CAAC;QAC/B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE7B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,iBAAyB,EAAW,EAAE,CAClE,iBAAiB,IAAI,cAAc,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RefObject, useEffect, useState, useRef } from 'react';\nimport { _convertRemToPx as convertRemToPx } from '@internal/acs-ui-common';\n\n/**\n * A utility hook for providing the width of a parent element.\n * Returns updated width if parent/window resizes.\n * @param containerRef - Ref of a parent element whose width will be returned.\n * @internal\n */\nexport const _useContainerWidth = (containerRef: RefObject<HTMLElement>): number | undefined => {\n const [width, setWidth] = useState<number | undefined>(undefined);\n\n const observer = useRef(\n new ResizeObserver((entries) => {\n const { width } = entries[0].contentRect;\n setWidth(width);\n })\n );\n\n useEffect(() => {\n if (containerRef.current) {\n observer.current.observe(containerRef.current);\n }\n\n const currentObserver = observer.current;\n return () => {\n currentObserver.disconnect();\n };\n }, [containerRef, observer]);\n\n return width;\n};\n\n/**\n * A utility hook for providing the height of a parent element.\n * Returns updated height if parent/window resizes.\n * @param containerRef - Ref of a parent element whose height will be returned.\n * @internal\n */\nexport const _useContainerHeight = (containerRef: RefObject<HTMLElement>): number | undefined => {\n const [height, setHeight] = useState<number | undefined>(undefined);\n\n const observer = useRef(\n new ResizeObserver((entries) => {\n const { height } = entries[0].contentRect;\n setHeight(height);\n })\n );\n\n useEffect(() => {\n if (containerRef.current) {\n observer.current.observe(containerRef.current);\n }\n\n const currentObserver = observer.current;\n return () => {\n currentObserver.disconnect();\n };\n }, [containerRef, observer]);\n\n return height;\n};\n\nconst NARROW_WIDTH_REM = 30;\n\n/**\n * Utility function to determine if container width is narrow\n * @param containerWidthRem container width in rem\n * @returns boolean\n */\nexport const isNarrowWidth = (containerWidthRem: number): boolean =>\n containerWidthRem <= convertRemToPx(NARROW_WIDTH_REM);\n\"../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"responsive.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/responsive.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,eAAe,IAAI,cAAc,EAAE,sCAAgC;AAE5E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,YAAoC,EAAsB,EAAE;IAC7F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IAElE,MAAM,QAAQ,GAAG,MAAM,CACrB,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QACzC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAChD;QAED,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC;QACzC,OAAO,GAAG,EAAE;YACV,eAAe,CAAC,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CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RefObject, useEffect, useState, useRef } from 'react';\nimport { _convertRemToPx as convertRemToPx } from '@internal/acs-ui-common';\n\n/**\n * A utility hook for providing the width of a parent element.\n * Returns updated width if parent/window resizes.\n * @param containerRef - Ref of a parent element whose width will be returned.\n * @internal\n */\nexport const _useContainerWidth = (containerRef: RefObject<HTMLElement>): number | undefined => {\n const [width, setWidth] = useState<number | undefined>(undefined);\n\n const observer = useRef(\n new ResizeObserver((entries) => {\n const { width } = entries[0].contentRect;\n setWidth(width);\n })\n );\n\n useEffect(() => {\n if (containerRef.current) {\n observer.current.observe(containerRef.current);\n }\n\n const currentObserver = observer.current;\n return () => {\n currentObserver.disconnect();\n };\n }, [containerRef, observer]);\n\n return width;\n};\n\n/**\n * A utility hook for providing the height of a parent element.\n * Returns updated height if parent/window resizes.\n * @param containerRef - Ref of a parent element whose height will be returned.\n * @internal\n */\nexport const _useContainerHeight = (containerRef: RefObject<HTMLElement>): number | undefined => {\n const [height, setHeight] = useState<number | undefined>(undefined);\n\n const observer = useRef(\n new ResizeObserver((entries) => {\n const { height } = entries[0].contentRect;\n setHeight(height);\n })\n );\n\n useEffect(() => {\n if (containerRef.current) {\n observer.current.observe(containerRef.current);\n }\n\n const currentObserver = observer.current;\n return () => {\n currentObserver.disconnect();\n };\n }, [containerRef, observer]);\n\n return height;\n};\n\nconst NARROW_WIDTH_REM = 30;\n\nconst SHORT_HEIGHT_REM = 23.75;\n\n/**\n * Utility function to determine if container width is narrow\n * @param containerWidthRem container width in rem\n * @returns boolean\n */\nexport const isNarrowWidth = (containerWidthRem: number): boolean =>\n containerWidthRem <= convertRemToPx(NARROW_WIDTH_REM);\n\n/**\n * Utility function to determine if container width is short\n * @param containerWidthRem container height in rem\n * @returns boolean\n */\nexport const isShortHeight = (containerHeightRem: number): boolean =>\n containerHeightRem <= convertRemToPx(SHORT_HEIGHT_REM);\n\"../../../../acs-ui-common/src\""]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.5.1-alpha-202303090014",
3
+ "version": "1.5.1-alpha-202303100015",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -89,13 +89,13 @@
89
89
  "@azure/core-auth": "1.3.2",
90
90
  "@babel/cli": "~7.16.0",
91
91
  "@babel/core": "~7.16.0",
92
- "@internal/calling-component-bindings": "1.5.1-alpha-202303090014",
93
- "@internal/calling-stateful-client": "1.5.1-alpha-202303090014",
94
- "@internal/chat-component-bindings": "1.5.1-alpha-202303090014",
95
- "@internal/chat-stateful-client": "1.5.1-alpha-202303090014",
96
- "@internal/fake-backends": "1.5.1-alpha-202303090014",
97
- "@internal/react-components": "1.5.1-alpha-202303090014",
98
- "@internal/react-composites": "1.5.1-alpha-202303090014",
92
+ "@internal/calling-component-bindings": "1.5.1-alpha-202303100015",
93
+ "@internal/calling-stateful-client": "1.5.1-alpha-202303100015",
94
+ "@internal/chat-component-bindings": "1.5.1-alpha-202303100015",
95
+ "@internal/chat-stateful-client": "1.5.1-alpha-202303100015",
96
+ "@internal/fake-backends": "1.5.1-alpha-202303100015",
97
+ "@internal/react-components": "1.5.1-alpha-202303100015",
98
+ "@internal/react-composites": "1.5.1-alpha-202303100015",
99
99
  "@microsoft/api-documenter": "~7.12.11",
100
100
  "@microsoft/api-extractor": "~7.18.0",
101
101
  "@rollup/plugin-json": "~4.1.0",