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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. package/dist/Accordion/Accordion.d.ts +134 -322
  2. package/dist/Accordion/index.d.ts +134 -322
  3. package/dist/Avatar/Avatar.d.ts +47 -141
  4. package/dist/Button/Button.d.ts +47 -141
  5. package/dist/Checkbox/Checkbox.d.ts +134 -322
  6. package/dist/Collapsible/Collapsible.d.ts +201 -483
  7. package/dist/ConferenceScreen-5G5WGPIO.css +2780 -0
  8. package/dist/{HLSView-JYFTZVCM.css.map → ConferenceScreen-5G5WGPIO.css.map} +1 -1
  9. package/dist/ConferenceScreen-KS5URW6Z.js +1778 -0
  10. package/dist/ConferenceScreen-KS5URW6Z.js.map +7 -0
  11. package/dist/Divider/Divider.d.ts +134 -322
  12. package/dist/Dropdown/Dropdown.d.ts +804 -1932
  13. package/dist/EmbedView-BCRQ3GHV.js +17 -0
  14. package/dist/EmbedView-BCRQ3GHV.js.map +7 -0
  15. package/dist/EmbedView-Y24VRONT.css +2780 -0
  16. package/dist/EmbedView-Y24VRONT.css.map +7 -0
  17. package/dist/EmojiReaction-NA5F5DWN.js +11 -0
  18. package/dist/EmojiReaction-NA5F5DWN.js.map +7 -0
  19. package/dist/Fieldset/Fieldset.d.ts +47 -141
  20. package/dist/Footer/Footer.d.ts +536 -1288
  21. package/dist/{HLSView-JYFTZVCM.css → HLSView-DC43TOIW.css} +3 -3
  22. package/dist/HLSView-DC43TOIW.css.map +7 -0
  23. package/dist/{HLSView-EPPGI6XI.js → HLSView-XRGOWFRB.js} +38 -24
  24. package/dist/HLSView-XRGOWFRB.js.map +7 -0
  25. package/dist/IconButton/IconButton.d.ts +47 -141
  26. package/dist/Input/Input.d.ts +362 -926
  27. package/dist/Label/Label.d.ts +47 -141
  28. package/dist/Layout/Box.d.ts +47 -141
  29. package/dist/Layout/Flex.d.ts +47 -141
  30. package/dist/LeaveScreen-3OZN3MU3.css +2780 -0
  31. package/dist/LeaveScreen-3OZN3MU3.css.map +7 -0
  32. package/dist/LeaveScreen-PC4KB6OG.js +556 -0
  33. package/dist/LeaveScreen-PC4KB6OG.js.map +7 -0
  34. package/dist/Link/Link.d.ts +47 -141
  35. package/dist/Modal/Dialog.d.ts +329 -987
  36. package/dist/Modal/DialogContent.d.ts +469 -1127
  37. package/dist/MoreSettings-KTRYHDB2.css +2780 -0
  38. package/dist/MoreSettings-KTRYHDB2.css.map +7 -0
  39. package/dist/MoreSettings-XLNYT7PW.js +16 -0
  40. package/dist/MoreSettings-XLNYT7PW.js.map +7 -0
  41. package/dist/PDFView-LJ7I3K3H.js +84 -0
  42. package/dist/PDFView-LJ7I3K3H.js.map +7 -0
  43. package/dist/PDFView-RJK44WVO.css +2780 -0
  44. package/dist/PDFView-RJK44WVO.css.map +7 -0
  45. package/dist/Pagination/StyledPagination.d.ts +268 -644
  46. package/dist/Polls-AULCHMLW.js +1584 -0
  47. package/dist/Polls-AULCHMLW.js.map +7 -0
  48. package/dist/Polls-K4GO5ZOC.css +2780 -0
  49. package/dist/Polls-K4GO5ZOC.css.map +7 -0
  50. package/dist/Popover/index.d.ts +201 -483
  51. package/dist/Prebuilt/IconButton.d.ts +134 -322
  52. package/dist/Prebuilt/components/Chat/ChatBody.d.ts +134 -322
  53. package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +335 -805
  54. package/dist/Prebuilt/components/Notifications/DeviceChangeNotifications.d.ts +1 -0
  55. package/dist/Prebuilt/components/Notifications/DeviceInUseError.d.ts +2 -0
  56. package/dist/Prebuilt/components/Notifications/ErrorNotifications.d.ts +1 -0
  57. package/dist/Prebuilt/components/Notifications/MessageNotifications.d.ts +1 -0
  58. package/dist/Prebuilt/components/Notifications/PollNotificationModal.d.ts +1 -0
  59. package/dist/Prebuilt/components/Settings/common.d.ts +134 -322
  60. package/dist/Progress/index.d.ts +134 -322
  61. package/dist/RadioGroup/RadioGroup.d.ts +201 -483
  62. package/dist/RaiseHand-E4OVMBW6.js +10 -0
  63. package/dist/RaiseHand-E4OVMBW6.js.map +7 -0
  64. package/dist/ReactSelect/ReactSelect.d.ts +670 -1610
  65. package/dist/RoleProminence-LHUXHLVI.css +2780 -0
  66. package/dist/RoleProminence-LHUXHLVI.css.map +7 -0
  67. package/dist/RoleProminence-RWJP2Z36.js +116 -0
  68. package/dist/RoleProminence-RWJP2Z36.js.map +7 -0
  69. package/dist/RoomDetailsPane-6BM2FPWW.css +2780 -0
  70. package/dist/RoomDetailsPane-6BM2FPWW.css.map +7 -0
  71. package/dist/RoomDetailsPane-7OP2CNJW.js +53 -0
  72. package/dist/RoomDetailsPane-7OP2CNJW.js.map +7 -0
  73. package/dist/ScreenshareLayout-RHTD2PQT.css +2780 -0
  74. package/dist/ScreenshareLayout-RHTD2PQT.css.map +7 -0
  75. package/dist/ScreenshareLayout-TM7DLYLH.js +358 -0
  76. package/dist/ScreenshareLayout-TM7DLYLH.js.map +7 -0
  77. package/dist/Select/Select.d.ts +201 -483
  78. package/dist/Sheet/Sheet.d.ts +329 -987
  79. package/dist/SidePaneTabs-T7BKZ2AT.js +1354 -0
  80. package/dist/SidePaneTabs-T7BKZ2AT.js.map +7 -0
  81. package/dist/SidePaneTabs-TBUPHNAU.css +2780 -0
  82. package/dist/SidePaneTabs-TBUPHNAU.css.map +7 -0
  83. package/dist/Slider/Slider.d.ts +47 -141
  84. package/dist/Stats/StyledStats.d.ts +402 -966
  85. package/dist/Switch/Switch.d.ts +47 -141
  86. package/dist/Tabs/Tabs.d.ts +268 -644
  87. package/dist/Text/Text.d.ts +47 -141
  88. package/dist/TextArea/TextArea.d.ts +47 -141
  89. package/dist/Theme/base.config.d.ts +26 -78
  90. package/dist/Theme/stitches.config.d.ts +1046 -1493
  91. package/dist/TileMenu/StyledMenuTile.d.ts +469 -1127
  92. package/dist/Toast/Toast.d.ts +382 -946
  93. package/dist/VBPicker-M5VYFEUB.css +2780 -0
  94. package/dist/VBPicker-M5VYFEUB.css.map +7 -0
  95. package/dist/VBPicker-TQLIL3NC.js +322 -0
  96. package/dist/VBPicker-TQLIL3NC.js.map +7 -0
  97. package/dist/Video/Video.d.ts +47 -141
  98. package/dist/VideoList/StyledVideoList.d.ts +201 -483
  99. package/dist/VideoTile/StyledVideoTile.d.ts +670 -1610
  100. package/dist/WaitingView-TLJ52XYA.js +10 -0
  101. package/dist/WaitingView-TLJ52XYA.js.map +7 -0
  102. package/dist/WhiteboardLayout-PZZTM2FW.css +2780 -0
  103. package/dist/WhiteboardLayout-PZZTM2FW.css.map +7 -0
  104. package/dist/WhiteboardLayout-YYZ5UVGG.js +96 -0
  105. package/dist/WhiteboardLayout-YYZ5UVGG.js.map +7 -0
  106. package/dist/android-perm-1.png +0 -0
  107. package/dist/audio-level.png +0 -0
  108. package/dist/chunk-42XPBCZO.js +487 -0
  109. package/dist/chunk-42XPBCZO.js.map +7 -0
  110. package/dist/chunk-4BQ3AMVG.js +16802 -0
  111. package/dist/chunk-4BQ3AMVG.js.map +7 -0
  112. package/dist/chunk-4L5OKEIV.js +90 -0
  113. package/dist/chunk-4L5OKEIV.js.map +7 -0
  114. package/dist/chunk-6BX3VCVC.js +6337 -0
  115. package/dist/chunk-6BX3VCVC.js.map +7 -0
  116. package/dist/chunk-A3COGXMF.js +114 -0
  117. package/dist/chunk-A3COGXMF.js.map +7 -0
  118. package/dist/chunk-B3HHL3ND.js +178 -0
  119. package/dist/chunk-B3HHL3ND.js.map +7 -0
  120. package/dist/chunk-B5NLX6N6.js +41 -0
  121. package/dist/chunk-B5NLX6N6.js.map +7 -0
  122. package/dist/chunk-BXBPZGSP.js +161 -0
  123. package/dist/chunk-BXBPZGSP.js.map +7 -0
  124. package/dist/chunk-DVVFWHQG.js +136 -0
  125. package/dist/chunk-DVVFWHQG.js.map +7 -0
  126. package/dist/chunk-GV2DTYSU.js +262 -0
  127. package/dist/chunk-GV2DTYSU.js.map +7 -0
  128. package/dist/chunk-KF2YEUWU.js +254 -0
  129. package/dist/chunk-KF2YEUWU.js.map +7 -0
  130. package/dist/chunk-KQXTIHI6.js +59 -0
  131. package/dist/chunk-KQXTIHI6.js.map +7 -0
  132. package/dist/chunk-MR3HE7HV.js +830 -0
  133. package/dist/chunk-MR3HE7HV.js.map +7 -0
  134. package/dist/chunk-OQBTPJPO.js +71 -0
  135. package/dist/chunk-OQBTPJPO.js.map +7 -0
  136. package/dist/chunk-P7OOTR7P.js +2595 -0
  137. package/dist/chunk-P7OOTR7P.js.map +7 -0
  138. package/dist/chunk-THDU2DKP.js +30 -0
  139. package/dist/chunk-THDU2DKP.js.map +7 -0
  140. package/dist/chunk-U4QYH2BP.js +98 -0
  141. package/dist/chunk-U4QYH2BP.js.map +7 -0
  142. package/dist/chunk-USEEH3QW.js +418 -0
  143. package/dist/chunk-USEEH3QW.js.map +7 -0
  144. package/dist/chunk-UZW3C3ML.js +171 -0
  145. package/dist/chunk-UZW3C3ML.js.map +7 -0
  146. package/dist/chunk-YDIB6WKJ.js +576 -0
  147. package/dist/chunk-YDIB6WKJ.js.map +7 -0
  148. package/dist/chunk-ZFTULCCP.js +62 -0
  149. package/dist/chunk-ZFTULCCP.js.map +7 -0
  150. package/dist/empty-chat.svg +12 -0
  151. package/dist/index.cjs.css +2 -2
  152. package/dist/index.cjs.css.map +1 -1
  153. package/dist/index.cjs.js +22737 -22481
  154. package/dist/index.cjs.js.map +4 -4
  155. package/dist/index.css +2 -2
  156. package/dist/index.css.map +1 -1
  157. package/dist/index.js +25 -15
  158. package/dist/ios-perm-0.png +0 -0
  159. package/dist/meta.cjs.json +5680 -5307
  160. package/dist/meta.esbuild.json +8824 -5953
  161. package/dist/pdf-share.png +0 -0
  162. package/dist/screen-share.png +0 -0
  163. package/dist/transaction_error.svg +12 -0
  164. package/package.json +8 -8
  165. package/src/Avatar/Avatar.tsx +1 -1
  166. package/src/Popover/Popover.stories.tsx +1 -1
  167. package/src/Prebuilt/App.tsx +6 -2
  168. package/src/Prebuilt/components/Chat/Chat.tsx +12 -8
  169. package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -1
  170. package/src/Prebuilt/components/Header/common.jsx +6 -5
  171. package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +18 -0
  172. package/src/Prebuilt/components/Notifications/DeviceInUseError.tsx +79 -0
  173. package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +56 -0
  174. package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +24 -0
  175. package/src/Prebuilt/components/Notifications/Notifications.tsx +13 -159
  176. package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +23 -2
  177. package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +71 -0
  178. package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +1 -5
  179. package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +7 -5
  180. package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +23 -1
  181. package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +13 -5
  182. package/src/Prebuilt/components/StatsForNerds.jsx +32 -3
  183. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +43 -31
  184. package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +2 -2
  185. package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +3 -1
  186. package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +6 -0
  187. package/src/Prebuilt/layouts/HLSView.jsx +1 -0
  188. package/src/Prebuilt/layouts/PDFView.jsx +1 -0
  189. package/src/Prebuilt/layouts/SidePane.tsx +12 -6
  190. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +35 -34
  191. package/dist/HLSView-EPPGI6XI.js.map +0 -7
  192. package/dist/chunk-ZAX5VT7V.js +0 -34686
  193. package/dist/chunk-ZAX5VT7V.js.map +0 -7
@@ -0,0 +1,114 @@
1
+ import {
2
+ Dropdown,
3
+ useDropdownList,
4
+ useLandscapeHLSStream,
5
+ useMobileHLSStream
6
+ } from "./chunk-USEEH3QW.js";
7
+ import {
8
+ Box,
9
+ Flex
10
+ } from "./chunk-4L5OKEIV.js";
11
+ import {
12
+ IconButton_default,
13
+ Tooltip,
14
+ useRoomLayoutConferencingScreen
15
+ } from "./chunk-6BX3VCVC.js";
16
+ import {
17
+ EMOJI_REACTION_TYPE,
18
+ __async,
19
+ config,
20
+ init_define_process_env,
21
+ styled
22
+ } from "./chunk-YDIB6WKJ.js";
23
+
24
+ // src/Prebuilt/components/EmojiReaction.jsx
25
+ init_define_process_env();
26
+ import React2, { useState } from "react";
27
+ import { useMedia } from "react-use";
28
+ import data from "@emoji-mart/data/sets/14/apple.json";
29
+ import { init } from "emoji-mart";
30
+ import {
31
+ selectAvailableRoleNames,
32
+ selectIsConnectedToRoom,
33
+ selectLocalPeerID,
34
+ useCustomEvent,
35
+ useHMSStore
36
+ } from "@100mslive/react-sdk";
37
+ import { EmojiIcon } from "@100mslive/react-icons";
38
+
39
+ // src/Prebuilt/components/Footer/EmojiCard.jsx
40
+ init_define_process_env();
41
+ import React from "react";
42
+ var emojiReactionList = [
43
+ [{ emojiId: "+1" }, { emojiId: "-1" }, { emojiId: "wave" }, { emojiId: "clap" }, { emojiId: "fire" }],
44
+ [{ emojiId: "tada" }, { emojiId: "heart_eyes" }, { emojiId: "joy" }, { emojiId: "open_mouth" }, { emojiId: "sob" }]
45
+ ];
46
+ var EmojiCard = ({ sendReaction }) => {
47
+ return emojiReactionList.map((emojiLine, index) => /* @__PURE__ */ React.createElement(Flex, { key: index, justify: "between", css: { mb: "$8" } }, emojiLine.map((emoji) => /* @__PURE__ */ React.createElement(EmojiContainer, { key: emoji.emojiId, onClick: () => sendReaction(emoji.emojiId) }, /* @__PURE__ */ React.createElement("em-emoji", { id: emoji.emojiId, size: "100%", set: "apple" })))));
48
+ };
49
+ var EmojiContainer = styled("span", {
50
+ position: "relative",
51
+ cursor: "pointer",
52
+ width: "$16",
53
+ height: "$16",
54
+ p: "$4",
55
+ "&:hover": {
56
+ p: "7px",
57
+ bg: "$surface_brighter",
58
+ borderRadius: "$1"
59
+ }
60
+ });
61
+
62
+ // src/Prebuilt/components/EmojiReaction.jsx
63
+ init({ data });
64
+ var EmojiReaction = ({ showCard = false }) => {
65
+ const [open, setOpen] = useState(false);
66
+ const isConnected = useHMSStore(selectIsConnectedToRoom);
67
+ const { elements } = useRoomLayoutConferencingScreen();
68
+ useDropdownList({ open, name: "EmojiReaction" });
69
+ const roles = useHMSStore(selectAvailableRoleNames);
70
+ const localPeerId = useHMSStore(selectLocalPeerID);
71
+ const isMobile = useMedia(config.media.md);
72
+ const isLandscape = useMedia(config.media.ls);
73
+ const isMobileHLSStream = useMobileHLSStream();
74
+ const isLandscapeStream = useLandscapeHLSStream();
75
+ const { sendEvent } = useCustomEvent({
76
+ type: EMOJI_REACTION_TYPE
77
+ });
78
+ const sendReaction = (emojiId) => __async(void 0, null, function* () {
79
+ var _a;
80
+ const data2 = {
81
+ type: EMOJI_REACTION_TYPE,
82
+ emojiId,
83
+ senderId: localPeerId
84
+ };
85
+ sendEvent(data2, { roleNames: roles });
86
+ (_a = window.showFlyingEmoji) == null ? void 0 : _a.call(window, { emojiId, senderId: localPeerId });
87
+ });
88
+ if (!isConnected || !elements.emoji_reactions) {
89
+ return null;
90
+ }
91
+ if (showCard) {
92
+ return /* @__PURE__ */ React2.createElement(EmojiCard, { sendReaction });
93
+ }
94
+ return /* @__PURE__ */ React2.createElement(Dropdown.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React2.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "emoji_reaction_btn" }, /* @__PURE__ */ React2.createElement(
95
+ IconButton_default,
96
+ {
97
+ css: isMobile || isLandscape ? { bg: "$surface_default", r: "$round", border: "1px solid $border_bright" } : {}
98
+ },
99
+ /* @__PURE__ */ React2.createElement(Tooltip, { title: "Emoji reaction" }, /* @__PURE__ */ React2.createElement(Box, null, /* @__PURE__ */ React2.createElement(EmojiIcon, null)))
100
+ )), /* @__PURE__ */ React2.createElement(
101
+ Dropdown.Content,
102
+ {
103
+ sideOffset: 5,
104
+ align: isMobileHLSStream || isLandscapeStream ? "end" : "center",
105
+ css: { p: "$8", bg: "$surface_default" }
106
+ },
107
+ /* @__PURE__ */ React2.createElement(EmojiCard, { sendReaction })
108
+ ));
109
+ };
110
+
111
+ export {
112
+ EmojiReaction
113
+ };
114
+ //# sourceMappingURL=chunk-A3COGXMF.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Prebuilt/components/EmojiReaction.jsx", "../src/Prebuilt/components/Footer/EmojiCard.jsx"],
4
+ "sourcesContent": ["import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport data from '@emoji-mart/data/sets/14/apple.json';\nimport { init } from 'emoji-mart';\nimport {\n selectAvailableRoleNames,\n selectIsConnectedToRoom,\n selectLocalPeerID,\n useCustomEvent,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { EmojiIcon } from '@100mslive/react-icons';\nimport { EmojiCard } from './Footer/EmojiCard';\n// import { ToastManager } from './Toast/ToastManager';\nimport { Dropdown } from '../../Dropdown';\nimport { Box } from '../../Layout';\nimport { config as cssConfig } from '../../Theme';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useDropdownList } from './hooks/useDropdownList';\nimport { useLandscapeHLSStream, useMobileHLSStream } from '../common/hooks';\nimport { EMOJI_REACTION_TYPE } from '../common/constants';\n\ninit({ data });\n\nexport const EmojiReaction = ({ showCard = false }) => {\n const [open, setOpen] = useState(false);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const { elements } = useRoomLayoutConferencingScreen();\n useDropdownList({ open: open, name: 'EmojiReaction' });\n // const hmsActions = useHMSActions();\n const roles = useHMSStore(selectAvailableRoleNames);\n const localPeerId = useHMSStore(selectLocalPeerID);\n // const { isStreamingOn } = useRecordingStreaming();\n const isMobile = useMedia(cssConfig.media.md);\n const isLandscape = useMedia(cssConfig.media.ls);\n const isMobileHLSStream = useMobileHLSStream();\n const isLandscapeStream = useLandscapeHLSStream();\n\n const { sendEvent } = useCustomEvent({\n type: EMOJI_REACTION_TYPE,\n });\n\n const sendReaction = async emojiId => {\n const data = {\n type: EMOJI_REACTION_TYPE,\n emojiId: emojiId,\n senderId: localPeerId,\n };\n // TODO: RT find a way to figure out hls-viewer roles\n sendEvent(data, { roleNames: roles });\n window.showFlyingEmoji?.({ emojiId, senderId: localPeerId });\n /* if (isStreamingOn) {\n try {\n await hmsActions.sendHLSTimedMetadata([\n {\n payload: JSON.stringify(data),\n duration: 2,\n },\n ]);\n } catch (error) {\n console.log(error);\n ToastManager.addToast({ title: error.message });\n }\n } */\n };\n\n if (!isConnected || !elements.emoji_reactions) {\n return null;\n }\n\n if (showCard) {\n return <EmojiCard sendReaction={sendReaction} />;\n }\n return (\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <Dropdown.Trigger asChild data-testid=\"emoji_reaction_btn\">\n <IconButton\n css={\n isMobile || isLandscape ? { bg: '$surface_default', r: '$round', border: '1px solid $border_bright' } : {}\n }\n >\n <Tooltip title=\"Emoji reaction\">\n <Box>\n <EmojiIcon />\n </Box>\n </Tooltip>\n </IconButton>\n </Dropdown.Trigger>\n <Dropdown.Content\n sideOffset={5}\n align={isMobileHLSStream || isLandscapeStream ? 'end' : 'center'}\n css={{ p: '$8', bg: '$surface_default' }}\n >\n <EmojiCard sendReaction={sendReaction} />\n </Dropdown.Content>\n </Dropdown.Root>\n );\n};\n", "import React from 'react';\nimport { Flex } from '../../../Layout';\nimport { styled } from '../../../Theme';\n\n// When changing emojis in the grid, keep in mind that the payload used in sendHLSTimedMetadata has a limit of 100 characters. Using bigger emoji Ids can cause the limit to be exceeded.\nconst emojiReactionList = [\n [{ emojiId: '+1' }, { emojiId: '-1' }, { emojiId: 'wave' }, { emojiId: 'clap' }, { emojiId: 'fire' }],\n [{ emojiId: 'tada' }, { emojiId: 'heart_eyes' }, { emojiId: 'joy' }, { emojiId: 'open_mouth' }, { emojiId: 'sob' }],\n];\n\nexport const EmojiCard = ({ sendReaction }) => {\n return emojiReactionList.map((emojiLine, index) => (\n <Flex key={index} justify=\"between\" css={{ mb: '$8' }}>\n {emojiLine.map(emoji => (\n <EmojiContainer key={emoji.emojiId} onClick={() => sendReaction(emoji.emojiId)}>\n <em-emoji id={emoji.emojiId} size=\"100%\" set=\"apple\"></em-emoji>\n </EmojiContainer>\n ))}\n </Flex>\n ));\n};\n\nconst EmojiContainer = styled('span', {\n position: 'relative',\n cursor: 'pointer',\n width: '$16',\n height: '$16',\n p: '$4',\n '&:hover': {\n p: '7px',\n bg: '$surface_brighter',\n borderRadius: '$1',\n },\n});\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAOA,UAAS,gBAAgB;AAChC,SAAS,gBAAgB;AACzB,OAAO,UAAU;AACjB,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;;;ACX1B;AAAA,OAAO,WAAW;AAKlB,IAAM,oBAAoB;AAAA,EACxB,CAAC,EAAE,SAAS,KAAK,GAAG,EAAE,SAAS,KAAK,GAAG,EAAE,SAAS,OAAO,GAAG,EAAE,SAAS,OAAO,GAAG,EAAE,SAAS,OAAO,CAAC;AAAA,EACpG,CAAC,EAAE,SAAS,OAAO,GAAG,EAAE,SAAS,aAAa,GAAG,EAAE,SAAS,MAAM,GAAG,EAAE,SAAS,aAAa,GAAG,EAAE,SAAS,MAAM,CAAC;AACpH;AAEO,IAAM,YAAY,CAAC,EAAE,aAAa,MAAM;AAC7C,SAAO,kBAAkB,IAAI,CAAC,WAAW,UACvC,oCAAC,QAAK,KAAK,OAAO,SAAQ,WAAU,KAAK,EAAE,IAAI,KAAK,KACjD,UAAU,IAAI,WACb,oCAAC,kBAAe,KAAK,MAAM,SAAS,SAAS,MAAM,aAAa,MAAM,OAAO,KAC3E,oCAAC,cAA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c,MAAY,cAAc,WACvC,gBAAAA,OAAA,cAAC,SAAS,SAAT,EAAiB,SAAO,MAAC,eAAY,wBACpC,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACC,KACE,YAAY,cAAc,EAAE,IAAI,oBAAoB,GAAG,UAAU,QAAQ,2BAA2B,IAAI,CAAC;AAAA;AAAA,IAG3G,gBAAAA,OAAA,cAAC,WAAQ,OAAM,oBACb,gBAAAA,OAAA,cAAC,WACC,gBAAAA,OAAA,cAAC,eAAU,CACb,CACF;AAAA,EACF,CACF,GACA,gBAAAA,OAAA;AAAA,IAAC,SAAS;AAAA,IAAT;AAAA,MACC,YAAY;AAAA,MACZ,OAAO,qBAAqB,oBAAoB,QAAQ;AAAA,MACxD,KAAK,EAAE,GAAG,MAAM,IAAI,mBAAmB;AAAA;AAAA,IAEvC,gBAAAA,OAAA,cAAC,aAAU,cAA4B;AAAA,EACzC,CACF;AAEJ;",
6
+ "names": ["React", "data", "React"]
7
+ }
@@ -0,0 +1,178 @@
1
+ import {
2
+ StyledPagination
3
+ } from "./chunk-4BQ3AMVG.js";
4
+ import {
5
+ config,
6
+ init_define_process_env
7
+ } from "./chunk-YDIB6WKJ.js";
8
+
9
+ // src/Prebuilt/components/Pagination.tsx
10
+ init_define_process_env();
11
+ import React, { useEffect } from "react";
12
+ import { ChevronLeftIcon, ChevronRightIcon } from "@100mslive/react-icons";
13
+ var Pagination = ({
14
+ page,
15
+ onPageChange,
16
+ numPages
17
+ }) => {
18
+ const disableLeft = page === 0;
19
+ const disableRight = page === numPages - 1;
20
+ const nextPage = (e) => {
21
+ e.stopPropagation();
22
+ onPageChange(Math.min(page + 1, numPages - 1));
23
+ };
24
+ const prevPage = (e) => {
25
+ e.stopPropagation();
26
+ onPageChange(Math.max(page - 1, 0));
27
+ };
28
+ useEffect(() => {
29
+ if (page >= numPages) {
30
+ onPageChange(Math.max(0, numPages - 1));
31
+ }
32
+ }, [numPages, onPageChange, page]);
33
+ if (numPages <= 1) {
34
+ return null;
35
+ }
36
+ return /* @__PURE__ */ React.createElement(StyledPagination.Root, { css: { flexShrink: 0 } }, /* @__PURE__ */ React.createElement(StyledPagination.Chevron, { disabled: disableLeft, onClick: prevPage }, /* @__PURE__ */ React.createElement(ChevronLeftIcon, { width: 16, height: 16, style: { cursor: disableLeft ? "not-allowed" : "pointer" } })), numPages <= 5 ? /* @__PURE__ */ React.createElement(StyledPagination.Dots, null, [...Array(numPages)].map((_, i) => /* @__PURE__ */ React.createElement(
37
+ StyledPagination.Dot,
38
+ {
39
+ key: i,
40
+ active: page === i,
41
+ onClick: (e) => {
42
+ e.stopPropagation();
43
+ onPageChange(i);
44
+ }
45
+ }
46
+ ))) : null, /* @__PURE__ */ React.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React.createElement(ChevronRightIcon, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
47
+ };
48
+
49
+ // src/Prebuilt/components/hooks/useTileLayout.tsx
50
+ init_define_process_env();
51
+ import { useEffect as useEffect2, useMemo, useState } from "react";
52
+ import { useMeasure, useMedia } from "react-use";
53
+ import {
54
+ getPeersWithTiles,
55
+ selectTracksMap,
56
+ useHMSVanillaStore
57
+ } from "@100mslive/react-sdk";
58
+ var aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4, 9 / 16] };
59
+ var usePagesWithTiles = ({ peers, maxTileCount }) => {
60
+ const vanillaStore = useHMSVanillaStore();
61
+ const tracksMap = vanillaStore.getState(selectTracksMap);
62
+ const peersWithTiles = useMemo(
63
+ () => getPeersWithTiles(peers, tracksMap, () => false),
64
+ [peers, tracksMap]
65
+ );
66
+ const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);
67
+ const pagesList = useMemo(() => {
68
+ let sliceStart = 0;
69
+ let remaining = peersWithTiles.length;
70
+ const list = [];
71
+ for (let i = 0; i < noOfPages; i++) {
72
+ const count = Math.min(remaining, maxTileCount);
73
+ list.push(peersWithTiles.slice(sliceStart, sliceStart + count));
74
+ remaining = remaining - count;
75
+ sliceStart += count;
76
+ }
77
+ return list;
78
+ }, [peersWithTiles, noOfPages, maxTileCount]);
79
+ return pagesList;
80
+ };
81
+ var useTileLayout = ({
82
+ pageList,
83
+ maxTileCount,
84
+ edgeToEdge = false
85
+ }) => {
86
+ const vanillaStore = useHMSVanillaStore();
87
+ const [ref, { width, height }] = useMeasure();
88
+ const isMobile = useMedia(config.media.lg);
89
+ const [pagesWithTiles, setPagesWithTiles] = useState([]);
90
+ useEffect2(() => {
91
+ if (width === 0 || height === 0) {
92
+ return;
93
+ }
94
+ for (const page of pageList) {
95
+ const noOfTilesInPage = page.length;
96
+ let maxCols = noOfTilesInPage > 2 && noOfTilesInPage < 9 ? Math.ceil(noOfTilesInPage / 2) : Math.ceil(Math.sqrt(noOfTilesInPage));
97
+ if (isMobile) {
98
+ maxCols = noOfTilesInPage < 4 ? 1 : Math.min(maxCols, 2);
99
+ }
100
+ const maxRows = Math.ceil(noOfTilesInPage / maxCols);
101
+ let index = 0;
102
+ const matrix = new Array(maxRows).fill(null).map((_, i) => {
103
+ const numCols = Math.min(maxCols, noOfTilesInPage - i * maxCols);
104
+ const rowElements = [];
105
+ for (let j = 0; j < numCols; j++) {
106
+ if (index < page.length) {
107
+ rowElements.push(page[index++]);
108
+ }
109
+ }
110
+ return rowElements;
111
+ });
112
+ const gap = edgeToEdge && isMobile ? 0 : 8;
113
+ const maxHeight = height - (maxRows - 1) * gap;
114
+ const maxRowHeight = maxHeight / matrix.length;
115
+ const aspectRatios = isMobile && (noOfTilesInPage === 1 || noOfTilesInPage > 3) ? aspectRatioConfig.mobile : aspectRatioConfig.default;
116
+ for (const row of matrix) {
117
+ let tileWidth = (width - (row.length - 1) * gap) / row.length;
118
+ let tileHeight = 0;
119
+ if (edgeToEdge) {
120
+ tileHeight = maxRowHeight;
121
+ } else {
122
+ const calcHeights = aspectRatios.map((aR) => tileWidth / aR);
123
+ for (const h of calcHeights) {
124
+ if (h < maxRowHeight) {
125
+ if (tileHeight < h) {
126
+ tileHeight = h;
127
+ }
128
+ }
129
+ }
130
+ if (tileHeight === 0) {
131
+ tileHeight = maxRowHeight;
132
+ const calcWidths = aspectRatios.map((aR) => tileHeight * aR);
133
+ tileWidth = 0;
134
+ for (const w of calcWidths) {
135
+ if (w < width) {
136
+ if (tileWidth < w) {
137
+ tileWidth = w;
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ for (let i = 0; i < row.length; i++) {
144
+ row[i].width = tileWidth;
145
+ row[i].height = tileHeight;
146
+ }
147
+ }
148
+ }
149
+ setPagesWithTiles([...pageList]);
150
+ }, [width, height, maxTileCount, pageList, vanillaStore, isMobile, edgeToEdge]);
151
+ return { pagesWithTiles, ref };
152
+ };
153
+
154
+ // src/Prebuilt/components/hooks/useVideoTileLayout.ts
155
+ init_define_process_env();
156
+ import React2, { useContext } from "react";
157
+ var VideoTileContext = React2.createContext({
158
+ enableSpotlightingPeer: true,
159
+ hideParticipantNameOnTile: false,
160
+ roundedVideoTile: true,
161
+ hideAudioMuteOnTile: false,
162
+ hideAudioLevelOnTile: false,
163
+ objectFit: "contain",
164
+ hideMetadataOnTile: false
165
+ });
166
+ var useVideoTileContext = () => {
167
+ const context = useContext(VideoTileContext);
168
+ return context;
169
+ };
170
+
171
+ export {
172
+ VideoTileContext,
173
+ useVideoTileContext,
174
+ Pagination,
175
+ usePagesWithTiles,
176
+ useTileLayout
177
+ };
178
+ //# sourceMappingURL=chunk-B3HHL3ND.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Prebuilt/components/Pagination.tsx", "../src/Prebuilt/components/hooks/useTileLayout.tsx", "../src/Prebuilt/components/hooks/useVideoTileLayout.ts"],
4
+ "sourcesContent": ["import React, { useEffect } from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@100mslive/react-icons';\nimport { StyledPagination } from '../../Pagination';\n\nexport const Pagination = ({\n page,\n onPageChange,\n numPages,\n}: {\n page: number;\n onPageChange: (page: number) => void;\n numPages: number;\n}) => {\n const disableLeft = page === 0;\n const disableRight = page === numPages - 1;\n const nextPage = (e: React.SyntheticEvent) => {\n e.stopPropagation();\n onPageChange(Math.min(page + 1, numPages - 1));\n };\n const prevPage = (e: React.SyntheticEvent) => {\n e.stopPropagation();\n onPageChange(Math.max(page - 1, 0));\n };\n\n useEffect(() => {\n // currentPageIndex should not exceed pages length\n if (page >= numPages) {\n onPageChange(Math.max(0, numPages - 1));\n }\n }, [numPages, onPageChange, page]);\n\n if (numPages <= 1) {\n return null;\n }\n\n return (\n <StyledPagination.Root css={{ flexShrink: 0 }}>\n <StyledPagination.Chevron disabled={disableLeft} onClick={prevPage}>\n <ChevronLeftIcon width={16} height={16} style={{ cursor: disableLeft ? 'not-allowed' : 'pointer' }} />\n </StyledPagination.Chevron>\n {numPages <= 5 ? (\n <StyledPagination.Dots>\n {[...Array(numPages)].map((_, i) => (\n <StyledPagination.Dot\n key={i}\n active={page === i}\n onClick={e => {\n e.stopPropagation();\n onPageChange(i);\n }}\n />\n ))}\n </StyledPagination.Dots>\n ) : null}\n <StyledPagination.Chevron disabled={disableRight} onClick={nextPage}>\n <ChevronRightIcon width={16} height={16} style={{ cursor: disableRight ? 'not-allowed' : 'pointer' }} />\n </StyledPagination.Chevron>\n </StyledPagination.Root>\n );\n};\n", "import { useEffect, useMemo, useState } from 'react';\nimport { useMeasure, useMedia } from 'react-use';\nimport {\n getPeersWithTiles,\n HMSPeer,\n selectTracksMap,\n TrackWithPeerAndDimensions,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { config as cssConfig } from '../../../Theme';\n\nconst aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4, 9 / 16] };\n\nexport const usePagesWithTiles = ({ peers, maxTileCount }: { peers: HMSPeer[]; maxTileCount: number }) => {\n const vanillaStore = useHMSVanillaStore();\n const tracksMap = vanillaStore.getState(selectTracksMap);\n const peersWithTiles = useMemo(\n () => getPeersWithTiles(peers, tracksMap, () => false) as TrackWithPeerAndDimensions[],\n [peers, tracksMap],\n );\n const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);\n const pagesList = useMemo(() => {\n let sliceStart = 0;\n let remaining = peersWithTiles.length;\n const list = [];\n // split into pages\n for (let i = 0; i < noOfPages; i++) {\n const count = Math.min(remaining, maxTileCount);\n list.push(peersWithTiles.slice(sliceStart, sliceStart + count));\n remaining = remaining - count;\n sliceStart += count;\n }\n return list;\n }, [peersWithTiles, noOfPages, maxTileCount]);\n return pagesList;\n};\n\nexport const useTileLayout = ({\n pageList,\n maxTileCount,\n edgeToEdge = false,\n}: {\n pageList: TrackWithPeerAndDimensions[][];\n maxTileCount: number;\n edgeToEdge?: boolean;\n}) => {\n const vanillaStore = useHMSVanillaStore();\n const [ref, { width, height }] = useMeasure<HTMLDivElement>();\n const isMobile = useMedia(cssConfig.media.lg);\n const [pagesWithTiles, setPagesWithTiles] = useState<TrackWithPeerAndDimensions[][]>([]);\n\n useEffect(() => {\n if (width === 0 || height === 0) {\n return;\n }\n // calculate dimesions for each page\n for (const page of pageList) {\n const noOfTilesInPage = page.length;\n let maxCols =\n noOfTilesInPage > 2 && noOfTilesInPage < 9\n ? Math.ceil(noOfTilesInPage / 2)\n : Math.ceil(Math.sqrt(noOfTilesInPage));\n if (isMobile) {\n maxCols = noOfTilesInPage < 4 ? 1 : Math.min(maxCols, 2);\n }\n const maxRows = Math.ceil(noOfTilesInPage / maxCols);\n let index = 0;\n // convert the current page to a matrix(grid)\n const matrix = new Array(maxRows).fill(null).map((_, i) => {\n const numCols = Math.min(maxCols, noOfTilesInPage - i * maxCols);\n const rowElements = [];\n for (let j = 0; j < numCols; j++) {\n if (index < page.length) {\n rowElements.push(page[index++]);\n }\n }\n return rowElements;\n });\n\n const gap = edgeToEdge && isMobile ? 0 : 8; // gap between flex items\n const maxHeight = height - (maxRows - 1) * gap;\n const maxRowHeight = maxHeight / matrix.length;\n const aspectRatios =\n isMobile && (noOfTilesInPage === 1 || noOfTilesInPage > 3)\n ? aspectRatioConfig.mobile\n : aspectRatioConfig.default;\n // calculate height and width of each tile in a row\n for (const row of matrix) {\n let tileWidth = (width - (row.length - 1) * gap) / row.length;\n let tileHeight = 0;\n if (edgeToEdge) {\n tileHeight = maxRowHeight;\n } else {\n const calcHeights = aspectRatios.map(aR => tileWidth / aR);\n for (const h of calcHeights) {\n if (h < maxRowHeight) {\n if (tileHeight < h) {\n tileHeight = h;\n }\n }\n }\n\n // tileHeight is not calculated as it could be exceeding the max possible height\n // find the max possible width instead\n if (tileHeight === 0) {\n tileHeight = maxRowHeight;\n const calcWidths = aspectRatios.map(aR => tileHeight * aR);\n tileWidth = 0;\n for (const w of calcWidths) {\n if (w < width) {\n if (tileWidth < w) {\n tileWidth = w;\n }\n }\n }\n }\n }\n for (let i = 0; i < row.length; i++) {\n row[i].width = tileWidth;\n row[i].height = tileHeight;\n }\n }\n }\n setPagesWithTiles([...pageList]);\n }, [width, height, maxTileCount, pageList, vanillaStore, isMobile, edgeToEdge]);\n return { pagesWithTiles, ref };\n};\n", "import React, { useContext } from 'react';\n\ntype TileContextType = {\n enableSpotlightingPeer: boolean;\n hideParticipantNameOnTile?: boolean;\n roundedVideoTile?: boolean;\n hideAudioMuteOnTile?: boolean;\n hideAudioLevelOnTile?: boolean;\n objectFit?: 'cover' | 'contain';\n hideMetadataOnTile?: boolean;\n};\n\nexport const VideoTileContext = React.createContext<TileContextType>({\n enableSpotlightingPeer: true,\n hideParticipantNameOnTile: false,\n roundedVideoTile: true,\n hideAudioMuteOnTile: false,\n hideAudioLevelOnTile: false,\n objectFit: 'contain',\n hideMetadataOnTile: false,\n});\n\nexport const useVideoTileContext = () => {\n const context = useContext(VideoTileContext);\n return context;\n};\n"],
5
+ "mappings": ";;;;;;;;;AAAA;AAAA,OAAO,SAAS,iBAAiB;AACjC,SAAS,iBAAiB,wBAAwB;AAG3C,IAA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Aa,EAAE;AACzD,wBAAY;AACZ,uBAAW,KAAK,YAAY;AAC1B,kBAAI,IAAI,OAAO;AACb,oBAAI,YAAY,GAAG;AACjB,8BAAY;AAAA,gBACd;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AACA,iBAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,cAAI,CAAC,EAAE,QAAQ;AACf,cAAI,CAAC,EAAE,SAAS;AAAA,QAClB;AAAA,MACF;AAAA,IACF;AACA,sBAAkB,CAAC,GAAG,QAAQ,CAAC;AAAA,EACjC,GAAG,CAAC,OAAO,QAAQ,cAAc,UAAU,cAAc,UAAU,UAAU,CAAC;AAC9E,SAAO,EAAE,gBAAgB,IAAI;AAC/B;;;AC9HA;AAAA,OAAOC,UAAS,kBAAkB;AAY3B,IAAM,mBAAmBA,OAAM,cAA+B;AAAA,EACnE,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,WAAW;AAAA,EACX,oBAAoB;AACtB,CAAC;AAEM,IAAM,sBAAsB,MAAM;AACvC,QAAM,UAAU,WAAW,gBAAgB;AAC3C,SAAO;AACT;",
6
+ "names": ["useEffect", "useEffect", "React"]
7
+ }
@@ -0,0 +1,41 @@
1
+ import {
2
+ useMyMetadata
3
+ } from "./chunk-ZFTULCCP.js";
4
+ import {
5
+ IconButton_default,
6
+ Tooltip,
7
+ useRoomLayoutConferencingScreen
8
+ } from "./chunk-6BX3VCVC.js";
9
+ import {
10
+ __async,
11
+ init_define_process_env
12
+ } from "./chunk-YDIB6WKJ.js";
13
+
14
+ // src/Prebuilt/components/RaiseHand.tsx
15
+ init_define_process_env();
16
+ import React from "react";
17
+ import { HandIcon, HandRaiseSlashedIcon } from "@100mslive/react-icons";
18
+ var RaiseHand = ({ css }) => {
19
+ const { isHandRaised, toggleHandRaise } = useMyMetadata();
20
+ const { elements } = useRoomLayoutConferencingScreen();
21
+ if (!elements.hand_raise) {
22
+ return null;
23
+ }
24
+ return /* @__PURE__ */ React.createElement(Tooltip, { title: isHandRaised ? "Lower hand" : "Raise hand" }, /* @__PURE__ */ React.createElement(
25
+ IconButton_default,
26
+ {
27
+ "data-testid": "hand_raise_btn",
28
+ css,
29
+ active: !isHandRaised,
30
+ onClick: () => __async(void 0, null, function* () {
31
+ return yield toggleHandRaise();
32
+ })
33
+ },
34
+ isHandRaised ? /* @__PURE__ */ React.createElement(HandRaiseSlashedIcon, null) : /* @__PURE__ */ React.createElement(HandIcon, null)
35
+ ));
36
+ };
37
+
38
+ export {
39
+ RaiseHand
40
+ };
41
+ //# sourceMappingURL=chunk-B5NLX6N6.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Prebuilt/components/RaiseHand.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport { HandIcon, HandRaiseSlashedIcon } from '@100mslive/react-icons';\nimport { CSS } from '../../Theme';\nimport { Tooltip } from '../../Tooltip';\n// @ts-ignore: No implicit Any\nimport IconButton from '../IconButton';\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useMyMetadata } from './hooks/useMetadata';\n\nexport const RaiseHand = ({ css }: { css?: CSS }) => {\n const { isHandRaised, toggleHandRaise } = useMyMetadata();\n const { elements } = useRoomLayoutConferencingScreen();\n\n if (!elements.hand_raise) {\n return null;\n }\n\n return (\n <Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>\n <IconButton\n data-testid=\"hand_raise_btn\"\n css={css}\n active={!isHandRaised}\n onClick={async () => await toggleHandRaise()}\n >\n {isHandRaised ? <HandRaiseSlashedIcon /> : <HandIcon />}\n </IconButton>\n </Tooltip>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA,OAAO,WAAW;AAClB,SAAS,UAAU,4BAA4B;AAQxC,IAAM,YAAY,CAAC,EAAE,IAAI,MAAqB;AACnD,QAAM,EAAE,cAAc,gBAAgB,IAAI,cAAc;AACxD,QAAM,EAAE,SAAS,IAAI,gCAAgC;AAErD,MAAI,CAAC,SAAS,YAAY;AACxB,WAAO;AAAA,EACT;AAEA,SACE,oCAAC,WAAQ,OAAO,eAAe,eAAe,gBAC5C;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ;AAAA,MACA,QAAQ,CAAC;AAAA,MACT,SAAS,MAAS;AAAG,qBAAM,gBAAgB;AAAA;AAAA;AAAA,IAE1C,eAAe,oCAAC,0BAAqB,IAAK,oCAAC,cAAS;AAAA,EACvD,CACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,161 @@
1
+ import {
2
+ init_define_process_env,
3
+ styled
4
+ } from "./chunk-YDIB6WKJ.js";
5
+
6
+ // src/Text/Text.tsx
7
+ init_define_process_env();
8
+ var textVariants = {
9
+ h1: {
10
+ fontWeight: "$semiBold",
11
+ letterSpacing: "-1.5px",
12
+ fontSize: "$h1",
13
+ lineHeight: "$h1",
14
+ "@md": {
15
+ fontSize: "4.5rem",
16
+ lineHeight: "4.75rem"
17
+ }
18
+ },
19
+ h2: {
20
+ fontSize: "$h2",
21
+ lineHeight: "$h2",
22
+ fontWeight: "$semiBold",
23
+ letterSpacing: "-0.5px",
24
+ "@md": {
25
+ fontSize: "3rem",
26
+ lineHeight: "3.25rem"
27
+ }
28
+ },
29
+ h3: {
30
+ fontSize: "$h3",
31
+ lineHeight: "$h3",
32
+ fontWeight: "$semiBold",
33
+ "@md": {
34
+ fontSize: "2.5rem",
35
+ lineHeight: "2.75rem"
36
+ }
37
+ },
38
+ h4: {
39
+ fontSize: "$h4",
40
+ lineHeight: "$h4",
41
+ fontWeight: "$semiBold",
42
+ letterSpacing: "0.25px",
43
+ "@md": {
44
+ fontSize: "1.75rem",
45
+ lineHeight: "2rem"
46
+ }
47
+ },
48
+ h5: {
49
+ fontSize: "$h5",
50
+ lineHeight: "$h5",
51
+ fontWeight: "$semiBold",
52
+ "@md": {
53
+ fontSize: "1.5rem",
54
+ lineHeight: "1.75rem"
55
+ }
56
+ },
57
+ h6: {
58
+ fontSize: "$h6",
59
+ lineHeight: "$h6",
60
+ fontWeight: "$semiBold",
61
+ letterSpacing: "0.15px",
62
+ "@md": {
63
+ fontSize: "1.25rem",
64
+ lineHeight: "1.5rem"
65
+ }
66
+ },
67
+ sub1: {
68
+ fontSize: "$md",
69
+ lineHeight: "$h5",
70
+ fontWeight: "$medium",
71
+ letterSpacing: "0.15px"
72
+ },
73
+ sub2: {
74
+ fontSize: "$sm",
75
+ lineHeight: "$sm",
76
+ fontWeight: "$medium",
77
+ letterSpacing: "0.1px"
78
+ },
79
+ body1: {
80
+ fontSize: "$md",
81
+ lineHeight: "$h6",
82
+ fontWeight: "$medium",
83
+ letterSpacing: "0.1px"
84
+ },
85
+ body2: {
86
+ fontSize: "0.875rem",
87
+ lineHeight: "1.25rem",
88
+ fontWeight: "$medium",
89
+ letterSpacing: "0.25px"
90
+ },
91
+ button: {
92
+ fontSize: "1rem",
93
+ lineHeight: "1.5rem",
94
+ fontWeight: "$semiBold",
95
+ letterSpacing: "0.5px"
96
+ },
97
+ caption: {
98
+ fontSize: "0.75rem",
99
+ lineHeight: "1rem",
100
+ letterSpacing: "0.4px",
101
+ fontWeight: "$regular"
102
+ },
103
+ overline: {
104
+ fontSize: "0.625rem",
105
+ lineHeight: "1rem",
106
+ letterSpacing: "1.5px",
107
+ fontWeight: "$medium"
108
+ },
109
+ tiny: {
110
+ fontSize: "$tiny",
111
+ lineHeight: "$tiny"
112
+ },
113
+ xs: {
114
+ fontSize: "$xs",
115
+ lineHeight: "$xs"
116
+ },
117
+ sm: {
118
+ fontSize: "$sm",
119
+ lineHeight: "$sm"
120
+ },
121
+ md: {
122
+ fontSize: "$md",
123
+ lineHeight: "$md"
124
+ },
125
+ lg: {
126
+ fontSize: "$lg",
127
+ lineHeight: "$md",
128
+ fontWeight: "$semiBold",
129
+ letterSpacing: "0.15px"
130
+ }
131
+ };
132
+ var Text = styled("p", {
133
+ fontFamily: "$sans",
134
+ fontWeight: "$regular",
135
+ margin: 0,
136
+ color: "$on_surface_high",
137
+ variants: {
138
+ variant: textVariants,
139
+ color: {
140
+ white: {
141
+ color: "$on_surface_high"
142
+ }
143
+ },
144
+ inline: {
145
+ true: {
146
+ display: "inline"
147
+ }
148
+ }
149
+ },
150
+ defaultVariants: {
151
+ variant: "md"
152
+ }
153
+ });
154
+
155
+ // src/Text/index.tsx
156
+ init_define_process_env();
157
+
158
+ export {
159
+ Text
160
+ };
161
+ //# sourceMappingURL=chunk-BXBPZGSP.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Text/Text.tsx", "../src/Text/index.tsx"],
4
+ "sourcesContent": ["import { styled } from '../Theme';\n\nexport const textVariants = {\n h1: {\n fontWeight: '$semiBold',\n letterSpacing: '-1.5px',\n fontSize: '$h1',\n lineHeight: '$h1',\n '@md': {\n fontSize: '4.5rem',\n lineHeight: '4.75rem',\n },\n },\n h2: {\n fontSize: '$h2',\n lineHeight: '$h2',\n fontWeight: '$semiBold',\n letterSpacing: '-0.5px',\n '@md': {\n fontSize: '3rem',\n lineHeight: '3.25rem',\n },\n },\n h3: {\n fontSize: '$h3',\n lineHeight: '$h3',\n fontWeight: '$semiBold',\n '@md': {\n fontSize: '2.5rem',\n lineHeight: '2.75rem',\n },\n },\n h4: {\n fontSize: '$h4',\n lineHeight: '$h4',\n fontWeight: '$semiBold',\n letterSpacing: '0.25px',\n '@md': {\n fontSize: '1.75rem',\n lineHeight: '2rem',\n },\n },\n h5: {\n fontSize: '$h5',\n lineHeight: '$h5',\n fontWeight: '$semiBold',\n '@md': {\n fontSize: '1.5rem',\n lineHeight: '1.75rem',\n },\n },\n h6: {\n fontSize: '$h6',\n lineHeight: '$h6',\n fontWeight: '$semiBold',\n letterSpacing: '0.15px',\n '@md': {\n fontSize: '1.25rem',\n lineHeight: '1.5rem',\n },\n },\n sub1: {\n fontSize: '$md',\n lineHeight: '$h5',\n fontWeight: '$medium',\n letterSpacing: '0.15px',\n },\n sub2: {\n fontSize: '$sm',\n lineHeight: '$sm',\n fontWeight: '$medium',\n letterSpacing: '0.1px',\n },\n body1: {\n fontSize: '$md',\n lineHeight: '$h6',\n fontWeight: '$medium',\n letterSpacing: '0.1px',\n },\n body2: {\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n fontWeight: '$medium',\n letterSpacing: '0.25px',\n },\n button: {\n fontSize: '1rem',\n lineHeight: '1.5rem',\n fontWeight: '$semiBold',\n letterSpacing: '0.5px',\n },\n caption: {\n fontSize: '0.75rem',\n lineHeight: '1rem',\n letterSpacing: '0.4px',\n fontWeight: '$regular',\n },\n overline: {\n fontSize: '0.625rem',\n lineHeight: '1rem',\n letterSpacing: '1.5px',\n fontWeight: '$medium',\n },\n tiny: {\n fontSize: '$tiny',\n lineHeight: '$tiny',\n },\n xs: {\n fontSize: '$xs',\n lineHeight: '$xs',\n },\n sm: {\n fontSize: '$sm',\n lineHeight: '$sm',\n },\n md: {\n fontSize: '$md',\n lineHeight: '$md',\n },\n lg: {\n fontSize: '$lg',\n lineHeight: '$md',\n fontWeight: '$semiBold',\n letterSpacing: '0.15px',\n },\n};\n\nexport const Text = styled('p', {\n fontFamily: '$sans',\n fontWeight: '$regular',\n margin: 0,\n color: '$on_surface_high',\n variants: {\n variant: textVariants,\n color: {\n white: {\n color: '$on_surface_high',\n },\n },\n inline: {\n true: {\n display: 'inline',\n },\n },\n },\n defaultVariants: {\n variant: 'md',\n },\n});\n", "export { Text } from './Text';\n"],
5
+ "mappings": ";;;;;;AAAA;AAEO,IAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,UAAU;AAAA,MACV,YAAY;AAAA,IACd;AAAA,EACF;AAAA,EACA,IAAI;AAAA,IACF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