@apple-pie/slice 0.1.23 → 0.1.24
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.
- package/dist/cjs/chunks/{AudioBubble-v4xKclI8.js → AudioBubble-C8HdYBY8.js} +1 -1
- package/dist/cjs/chunks/{DropDown-CJH-Y6Z5.js → DropDown-Cy2o78yw.js} +3 -3
- package/dist/cjs/chunks/{TextArea-rWqDDui3.js → TextArea-CtJi771p.js} +1 -1
- package/dist/cjs/chunks/{TextField-C6U-qhDt.js → TextField-B2u_CZKk.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +1 -1
- package/dist/cjs/components/DropDown/index.js +1 -1
- package/dist/cjs/components/TextArea/index.js +1 -1
- package/dist/cjs/components/Textfield/index.js +1 -1
- package/dist/cjs/hooks/useMicrophone.js +32 -22
- package/dist/cjs/index.js +1 -1
- package/dist/esm/chunks/{AudioBubble-Dvsrq1dZ.mjs → AudioBubble-DFh3Vxl6.mjs} +1 -1
- package/dist/esm/chunks/{DropDown-B98ZoY1x.mjs → DropDown-DFUc_rjP.mjs} +3 -3
- package/dist/esm/chunks/{TextArea-Bd_obSSH.mjs → TextArea-DaB8g-fZ.mjs} +1 -1
- package/dist/esm/chunks/{TextField-CZnUNhFe.mjs → TextField-BGeEJXUJ.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +1 -1
- package/dist/esm/components/DropDown/index.mjs +1 -1
- package/dist/esm/components/TextArea/index.mjs +1 -1
- package/dist/esm/components/Textfield/index.mjs +1 -1
- package/dist/esm/hooks/useMicrophone.mjs +32 -22
- package/dist/esm/index.mjs +4 -4
- package/dist/types/components/DropDown/_types.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useMicrophone/useMicrophone.d.ts +7 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/functions/files.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ require("../hooks/useWindow.js");
|
|
|
10
10
|
|
|
11
11
|
var styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "AudioBubble-module_wrapper__f2yKg flexBox-module_row__z24tF", css_bubble = "AudioBubble-module_bubble__bpPT3 flexBox-module_row__z24tF";
|
|
12
12
|
|
|
13
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.AudioBubble-module_wrapper__f2yKg {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\toverflow: visible;\n}\n\n.AudioBubble-module_bubble__bpPT3 {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\tborder-radius: 100%;\n\tbackground: var(--ab-bg-color);\n\tbox-shadow: var(--ab-box-shadow);\n\ttransition: transform 40ms linear 0s;\n}\n");
|
|
13
|
+
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.AudioBubble-module_wrapper__f2yKg {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\toverflow: visible;\n\tz-index: var(--elevation-status);\n}\n\n.AudioBubble-module_bubble__bpPT3 {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\tborder-radius: 100%;\n\tbackground: var(--ab-bg-color);\n\tbox-shadow: var(--ab-box-shadow);\n\ttransition: transform 40ms linear 0s;\n}\n");
|
|
14
14
|
|
|
15
15
|
const AudioBubble = React.memo(props => {
|
|
16
16
|
const lightColor = hooks_useTheme.useTheme().current.colors["core-text-light"], {audioStream: audioStream, playing: playing = !1, size: size = 64, backgroundColor: backgroundColor = lightColor, glow: glow = !0, glowColor: glowColor = colors.addOpacity(lightColor, .1), glowSize: glowSize = 48, glowOffset: glowOffset = 18, minScale: minScale = 1, maxScale: maxScale = 3, intensity: intensity = 2.2, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, ReleasePerSeconds: ReleasePerSeconds = 1.5} = props, divAttributes = tslib_es6.__rest(props, [ "audioStream", "playing", "size", "backgroundColor", "glow", "glowColor", "glowSize", "glowOffset", "minScale", "maxScale", "intensity", "peakIntensity", "risePerSeconds", "ReleasePerSeconds" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", visualizerRef = React.useRef(null), [scale, setScale] = React.useState(minScale), visualizerSettings = React.useMemo(() => ({
|
|
@@ -17,7 +17,7 @@ function resolveValueKey(value, valueKey) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function DropDownComponent(props) {
|
|
20
|
-
const {name: name = "drop-down-select", label: label, labelColor: labelColor = "var(--core-text-primary)", size: size = "m", width: width = "100%", height: height = "auto", selectedIndex: selectedIndex, selectedValue: selectedValue, valueKey: valueKey, options: options = [], placeholder: placeholder = !0, borderRadius: borderRadius = 4, backgroundColor: backgroundColor, bgColor: bgColor = "
|
|
20
|
+
const {name: name = "drop-down-select", label: label, labelColor: labelColor = "var(--core-text-primary)", size: size = "m", width: width = "100%", height: height = "auto", selectedIndex: selectedIndex, selectedValue: selectedValue, valueKey: valueKey, options: options = [], placeholder: placeholder = !0, borderRadius: borderRadius = 4, backgroundColor: backgroundColor = "var(--core-surface-secondary)", bgColor: bgColor = "var(--core-surface-secondary)", iconColor: iconColor = "var(--core-text-primary)", textColor: textColor = "var(--core-text-primary)", borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-outline-primary)", paddingLeft: paddingLeft = "8px", paddingRight: paddingRight = "12px", paddingTop: paddingTop = "8px", paddingBottom: paddingBottom = "8px", borderStyle: borderStyle = "box", iconSize: iconSize = 20, disabled: disabled = !1, error: error = !1, gap: gap = 8, onChange: onChange = () => null, onOption: onOption = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "name", "label", "labelColor", "size", "width", "height", "selectedIndex", "selectedValue", "valueKey", "options", "placeholder", "borderRadius", "backgroundColor", "bgColor", "iconColor", "textColor", "borderWidth", "borderSize", "borderColor", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderStyle", "iconSize", "disabled", "error", "gap", "onChange", "onOption" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, [index, setIndex] = React.useState(null != selectedIndex ? selectedIndex : 0), [selectedText, setSelectedText] = React.useState("Select an option"), ref = React.useRef(null);
|
|
21
21
|
React.useEffect(() => {
|
|
22
22
|
if (null == selectedValue && void 0 !== selectedIndex && (null == ref ? void 0 : ref.current)) {
|
|
23
23
|
if (!(null == options ? void 0 : options[selectedIndex])) return;
|
|
@@ -38,8 +38,8 @@ function DropDownComponent(props) {
|
|
|
38
38
|
const handleChange = React.useCallback(i => {
|
|
39
39
|
if (!options) return;
|
|
40
40
|
const label = options[i].label || "Select an option";
|
|
41
|
-
setIndex(i), setSelectedText(label), index !== i && onChange(i, options[i]);
|
|
42
|
-
}, [ options, index, onChange ]), renderedOptions = React.useMemo(() => options ? options.map((option, i) => jsxRuntime.jsx("option", {
|
|
41
|
+
setIndex(i), setSelectedText(label), index !== i && (onChange(i, options[i]), onOption(options[i]));
|
|
42
|
+
}, [ options, index, onChange, onOption ]), renderedOptions = React.useMemo(() => options ? options.map((option, i) => jsxRuntime.jsx("option", {
|
|
43
43
|
value: i,
|
|
44
44
|
onMouseUp: () => handleChange(i),
|
|
45
45
|
children: null == option ? void 0 : option.label
|
|
@@ -5,7 +5,7 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
5
5
|
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextArea-module_wrapper__O0sWP {\n\tposition: relative;\n\tpadding: var(--ta-padding) !important;\n\twidth: var(--ta-width);\n\theight: auto;\n\tborder-radius: var(--ta-border-radius);\n\tbackground-color: var(--ta-bg-color);\n\tbox-shadow: 0 0 0 1px var(--ta-border-color);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextArea-module_textarea__-R2n0 {\n\tborder: 0;\n\toutline: 0;\n\tpadding: 0 16px 0 0;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--core-text-primary);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\tresize: var(--ta-resize);\n\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\t&::placeholder {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\toverflow-y: auto;\n\n\t&::-webkit-scrollbar {\n\t\tbackground-color: transparent;\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: transparent;\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t\tcursor: default;\n\t}\n}\n\n.TextArea-module_actions__yunQx {\n\twidth: 100%;\n\tmin-height: 30px;\n\tcolor: var(--core-text-disabled);\n\tgap: 16px;\n}\n\n.TextArea-module_option__2SFx5 {\n\tgap: 4px;\n\twhite-space: nowrap;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tcursor: default;\n}\n\n.TextArea-module_send__Cub13 {\n\tposition: absolute;\n\tbottom: var(--ta-send-icon-offset-bottom);\n\tright: var(--ta-send-icon-offset-right);\n}\n\n.TextArea-module_xs__5e748 {\n}\n\n.TextArea-module_s__Ac-fq {\n}\n\n.TextArea-module_m__dod4R {\n}\n\n.TextArea-module_l__-uLCG {\n}\n");
|
|
6
6
|
|
|
7
7
|
const TextArea = React.memo(props => {
|
|
8
|
-
const {value: value = "", name: name = "text_area", width: width = "100%", focused: focused = !1, placeholder: placeholder = "Enter text here...", rows: rows = 6, border: border = !
|
|
8
|
+
const {value: value = "", name: name = "text_area", width: width = "100%", focused: focused = !1, placeholder: placeholder = "Enter text here...", rows: rows = 6, border: border = !0, borderRadius: borderRadius = 4, padding: padding = "16px 4px 16px 16px", error: error = !1, resizable: resizable = !0, hasSend: hasSend = !1, sendOffset: sendOffset = {
|
|
9
9
|
bottom: 10,
|
|
10
10
|
right: 10
|
|
11
11
|
}, sendSize: sendSize = 36, returnSubmits: returnSubmits = !1, backgroundColor: backgroundColor, bgColor: bgColor, minWidth: minWidth, textSize: textSize = "m", disabled: disabled = !1, submitClears: submitClears = !0, onChange: onChange = () => null, onFocus: onFocus = () => null, onBlur: onBlur = () => null, onSubmit: onSubmit = () => null, onKeyDown: onKeyDown = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "value", "name", "width", "focused", "placeholder", "rows", "border", "borderRadius", "padding", "error", "resizable", "hasSend", "sendOffset", "sendSize", "returnSubmits", "backgroundColor", "bgColor", "minWidth", "textSize", "disabled", "submitClears", "onChange", "onFocus", "onBlur", "onSubmit", "onKeyDown" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, [isFocused, setIsFocused] = React.useState(focused), [text, setText] = React.useState(value), ref = React.useRef(null), handleResize = React.useCallback(() => {
|
|
@@ -21,7 +21,7 @@ var Button = require("./Button-DmWbooXb.js"), Icon = require("./Icon-BB-t50Yt.js
|
|
|
21
21
|
l: "TextField-module_l__gbNRz type-module_body-l-regular__lOYbg"
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextField-module_wrapper__qZ-p- {\n\tposition: relative;\n\tpadding: var(--tf-padding) !important;\n\tpadding-right: var(--tf-padding-right) !important;\n\tgap: 8px;\n\toverflow: visible;\n\twidth: var(--tf-width);\n\theight: var(--tf-height);\n\tborder-radius: var(--tf-border-radius);\n\tbackground: var(--tf-bg);\n\tbox-shadow: var(--tf-box-shadow);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextField-module_container__5U9yK {\n\tflex: 1;\n\theight: 100%;\n\tgap: 8px;\n}\n\n.TextField-module_label__jD8MR {\n\tcolor: var(--tf-label-color);\n\theight: auto;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.TextField-module_input__AkWBQ {\n\tcolor: var(--tf-text-color);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\toutline: none;\n\tborder: 0;\n\theight: 100%;\n\twidth: var(--tf-input-width);\n\tfield-sizing: var(--tf-field-size);\n\ttext-align: var(--tf-text-align);\n\t&::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:focus::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\t&:-webkit-autofill,\n\t&:-webkit-autofill:hover,\n\t&:-webkit-autofill:focus,\n\t&:-webkit-autofill:active {\n\t\tbox-shadow: 0 0 0 50px var(--core-button-disabled) inset !important;\n\t\t-webkit-text-fill-color: var(--core-text-primary);\n\t}\n}\n\n.TextField-module_showPassword__4Ecfo {\n\tmin-height: 18px;\n\tmin-width: 18px;\n\tmax-height: 18px;\n\tmax-width: 18px;\n\topacity: var(--tf-show-opacity);\n\t&:hover {\n\t\topacity: var(--tf-show-opacity-hover);\n\t}\n}\n\n.TextField-module_clearButton__O9ed3 {\n\tborder: 0;\n\tbackground: transparent;\n\tappearance: none;\n\t-webkit-appearance: none;\n\toutline: none;\n\tcursor: pointer;\n}\n\n.TextField-module_xs__vyt2t {\n}\n\n.TextField-module_s__0qm83 {\n}\n\n.TextField-module_m__M-tLl {\n}\n\n.TextField-module_l__gbNRz {\n}\n");
|
|
24
|
+
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextField-module_wrapper__qZ-p- {\n\tposition: relative;\n\tpadding: var(--tf-padding) !important;\n\tpadding-right: var(--tf-padding-right) !important;\n\tgap: 8px;\n\toverflow: visible;\n\twidth: var(--tf-width);\n\theight: var(--tf-height);\n\tborder-radius: var(--tf-border-radius);\n\tbackground: var(--tf-bg-color);\n\tbox-shadow: var(--tf-box-shadow);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextField-module_container__5U9yK {\n\tflex: 1;\n\theight: 100%;\n\tgap: 8px;\n}\n\n.TextField-module_label__jD8MR {\n\tcolor: var(--tf-label-color);\n\theight: auto;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.TextField-module_input__AkWBQ {\n\tcolor: var(--tf-text-color);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\toutline: none;\n\tborder: 0;\n\theight: 100%;\n\twidth: var(--tf-input-width);\n\tfield-sizing: var(--tf-field-size);\n\ttext-align: var(--tf-text-align);\n\t&::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:focus::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\t&:-webkit-autofill,\n\t&:-webkit-autofill:hover,\n\t&:-webkit-autofill:focus,\n\t&:-webkit-autofill:active {\n\t\tbox-shadow: 0 0 0 50px var(--core-button-disabled) inset !important;\n\t\t-webkit-text-fill-color: var(--core-text-primary);\n\t}\n}\n\n.TextField-module_showPassword__4Ecfo {\n\tmin-height: 18px;\n\tmin-width: 18px;\n\tmax-height: 18px;\n\tmax-width: 18px;\n\topacity: var(--tf-show-opacity);\n\t&:hover {\n\t\topacity: var(--tf-show-opacity-hover);\n\t}\n}\n\n.TextField-module_clearButton__O9ed3 {\n\tborder: 0;\n\tbackground: transparent;\n\tappearance: none;\n\t-webkit-appearance: none;\n\toutline: none;\n\tcursor: pointer;\n}\n\n.TextField-module_xs__vyt2t {\n}\n\n.TextField-module_s__0qm83 {\n}\n\n.TextField-module_m__M-tLl {\n}\n\n.TextField-module_l__gbNRz {\n}\n");
|
|
25
25
|
|
|
26
26
|
const MOTION_CONFIG = {
|
|
27
27
|
variants: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var AudioBubble = require("../../chunks/AudioBubble-
|
|
3
|
+
var AudioBubble = require("../../chunks/AudioBubble-C8HdYBY8.js");
|
|
4
4
|
|
|
5
5
|
require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("react"),
|
|
6
6
|
require("../../hooks/useTheme.js"), require("../../theme/themes.js"), require("../../theme/colors.js"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var DropDown = require("../../chunks/DropDown-
|
|
3
|
+
var DropDown = require("../../chunks/DropDown-Cy2o78yw.js");
|
|
4
4
|
|
|
5
5
|
require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("react"),
|
|
6
6
|
require("../../chunks/misc-BTF7BCZW.js"), require("../../chunks/Icon-BB-t50Yt.js"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var TextArea = require("../../chunks/TextArea-
|
|
3
|
+
var TextArea = require("../../chunks/TextArea-CtJi771p.js");
|
|
4
4
|
|
|
5
5
|
require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("react"),
|
|
6
6
|
require("../../chunks/Button-DmWbooXb.js"), require("motion/react"), require("../../chunks/Badge-CY_DG6cD.js"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var TextField = require("../../chunks/TextField-
|
|
3
|
+
var TextField = require("../../chunks/TextField-B2u_CZKk.js");
|
|
4
4
|
|
|
5
5
|
require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("motion/react"),
|
|
6
6
|
require("react"), require("../../hooks/useTheme.js"), require("../../theme/themes.js"),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var tslib_es6 = require("../chunks/tslib.es6-C8dZW5nY.js"), React = require("react");
|
|
4
4
|
|
|
5
5
|
exports.useMicrophone = function(startMuted = !0, microphoneDeviceId) {
|
|
6
|
-
const micStream = React.useRef(null), micTrack = React.useRef(null), mutedRef = React.useRef(startMuted), mountedRef = React.useRef(!0), initializedRef = React.useRef(!1), [microphones, setMicrophones] = React.useState([]), [muted, setMuted] = React.useState(startMuted), [isRequesting, setIsRequesting] = React.useState(!1), [error, setError] = React.useState(null), waitForPaint = React.useCallback(() => tslib_es6.__awaiter(this, void 0, void 0, function*() {
|
|
6
|
+
const micStream = React.useRef(null), micTrack = React.useRef(null), mutedRef = React.useRef(startMuted), mountedRef = React.useRef(!0), initializedRef = React.useRef(!1), [microphones, setMicrophones] = React.useState([]), [micOptions, setMicOptions] = React.useState([]), [muted, setMuted] = React.useState(startMuted), [isRequesting, setIsRequesting] = React.useState(!1), [error, setError] = React.useState(null), waitForPaint = React.useCallback(() => tslib_es6.__awaiter(this, void 0, void 0, function*() {
|
|
7
7
|
yield new Promise(resolve => {
|
|
8
8
|
requestAnimationFrame(() => resolve());
|
|
9
9
|
});
|
|
@@ -31,9 +31,9 @@ exports.useMicrophone = function(startMuted = !0, microphoneDeviceId) {
|
|
|
31
31
|
return audioTrack;
|
|
32
32
|
}, []), muteMic = React.useCallback(() => (getMicTrack().enabled = !1, mutedRef.current = !0,
|
|
33
33
|
setMuted(!0), !0), [ getMicTrack ]), unmuteMic = React.useCallback(() => (getMicTrack().enabled = !0,
|
|
34
|
-
mutedRef.current = !1, setMuted(!1), !0), [ getMicTrack ]), constraints = React.useCallback(deviceId => {
|
|
34
|
+
mutedRef.current = !1, setMuted(!1), !0), [ getMicTrack ]), constraints = React.useCallback((deviceId, usePreferredDevice = !0) => {
|
|
35
35
|
var _a;
|
|
36
|
-
const id = null !== (_a = null != deviceId ? deviceId : microphoneDeviceId) && void 0 !== _a ? _a : void 0;
|
|
36
|
+
const id = usePreferredDevice ? null !== (_a = null != deviceId ? deviceId : microphoneDeviceId) && void 0 !== _a ? _a : void 0 : deviceId;
|
|
37
37
|
return {
|
|
38
38
|
audio: {
|
|
39
39
|
deviceId: id ? {
|
|
@@ -41,51 +41,54 @@ exports.useMicrophone = function(startMuted = !0, microphoneDeviceId) {
|
|
|
41
41
|
} : void 0
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
}, [ microphoneDeviceId ]),
|
|
44
|
+
}, [ microphoneDeviceId ]), requestStream = React.useCallback((deviceId_1, ...args_1) => tslib_es6.__awaiter(this, [ deviceId_1, ...args_1 ], void 0, function*(deviceId, usePreferredDevice = !0) {
|
|
45
|
+
return micStream.current = yield navigator.mediaDevices.getUserMedia(constraints(deviceId, usePreferredDevice)),
|
|
46
|
+
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
47
|
+
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current)), micStream.current;
|
|
48
|
+
}), [ constraints, getMicTrack, waitForTrackToBecomeActive ]), requestMicrophone = React.useCallback(() => tslib_es6.__awaiter(this, void 0, void 0, function*() {
|
|
45
49
|
if (setIsRequesting(!0), yield waitForPaint(), !hasMediaSupport) {
|
|
46
50
|
const nextError = new Error("Microphone access is not supported");
|
|
47
51
|
return setError(nextError), mountedRef.current && setIsRequesting(!1), null;
|
|
48
52
|
}
|
|
49
53
|
setError(null), stopMicStream();
|
|
50
54
|
try {
|
|
51
|
-
return
|
|
52
|
-
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
53
|
-
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current)), micStream.current;
|
|
55
|
+
return yield requestStream();
|
|
54
56
|
} catch (error) {
|
|
55
57
|
if (!(error instanceof DOMException && "OverconstrainedError" === error.name || error instanceof DOMException && "NotFoundError" === error.name)) {
|
|
56
58
|
const nextError = error instanceof Error ? error : new Error("Failed to access microphone");
|
|
57
59
|
throw setError(nextError), nextError;
|
|
58
60
|
}
|
|
59
|
-
return
|
|
60
|
-
audio: !0
|
|
61
|
-
}), micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
62
|
-
micStream.current;
|
|
61
|
+
return yield requestStream(void 0, !1);
|
|
63
62
|
} finally {
|
|
64
63
|
setIsRequesting(!1);
|
|
65
64
|
}
|
|
66
|
-
}), [
|
|
65
|
+
}), [ hasMediaSupport, requestStream, stopMicStream, waitForPaint ]), refreshMicrophones = React.useCallback(() => tslib_es6.__awaiter(this, void 0, void 0, function*() {
|
|
67
66
|
if (!hasMediaSupport) return [];
|
|
68
67
|
try {
|
|
69
|
-
const devices = yield navigator.mediaDevices.enumerateDevices(), mics = devices.filter(device => "audioinput" === device.kind)
|
|
70
|
-
|
|
68
|
+
const devices = yield navigator.mediaDevices.enumerateDevices(), mics = devices.filter(device => "audioinput" === device.kind), options = mics.map(mic => ({
|
|
69
|
+
value: {
|
|
70
|
+
id: mic.deviceId
|
|
71
|
+
},
|
|
72
|
+
label: mic.label
|
|
73
|
+
}));
|
|
74
|
+
return setMicrophones(mics), setMicOptions(options), devices.filter(device => "audioinput" === device.kind);
|
|
71
75
|
} catch (error) {
|
|
72
76
|
return console.warn("Error getting microphone devices:", error), setMicrophones([]),
|
|
73
|
-
[];
|
|
77
|
+
setMicOptions([]), [];
|
|
74
78
|
}
|
|
75
79
|
}), [ hasMediaSupport ]), setMicrophone = React.useCallback(deviceId => tslib_es6.__awaiter(this, void 0, void 0, function*() {
|
|
80
|
+
var _a;
|
|
76
81
|
setIsRequesting(!0), yield waitForPaint();
|
|
82
|
+
const id = "string" == typeof deviceId ? deviceId : null === (_a = deviceId.value) || void 0 === _a ? void 0 : _a.id;
|
|
77
83
|
try {
|
|
78
|
-
|
|
79
|
-
setError(null), stopMicStream(), micStream.current = yield navigator.mediaDevices.getUserMedia(constraints(deviceId)),
|
|
80
|
-
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
81
|
-
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current));
|
|
84
|
+
setError(null), stopMicStream(), yield requestStream(id, !1);
|
|
82
85
|
} catch (err) {
|
|
83
86
|
setError(err instanceof Error ? err : new Error("Error switching microphone")),
|
|
84
87
|
console.warn("Error switching microphone:", err);
|
|
85
88
|
} finally {
|
|
86
89
|
setIsRequesting(!1);
|
|
87
90
|
}
|
|
88
|
-
}), [
|
|
91
|
+
}), [ requestStream, stopMicStream, waitForPaint ]), toggleMute = React.useCallback(() => {
|
|
89
92
|
try {
|
|
90
93
|
muted ? unmuteMic() : muteMic();
|
|
91
94
|
} catch (error) {
|
|
@@ -107,13 +110,19 @@ exports.useMicrophone = function(startMuted = !0, microphoneDeviceId) {
|
|
|
107
110
|
if (!hasMediaSupport || !(null === (_a = navigator.mediaDevices) || void 0 === _a ? void 0 : _a.addEventListener)) return;
|
|
108
111
|
refreshMicrophones();
|
|
109
112
|
const handleDeviceChange = () => {
|
|
110
|
-
refreshMicrophones()
|
|
113
|
+
refreshMicrophones().then(nextMicrophones => {
|
|
114
|
+
var _a;
|
|
115
|
+
const currentDeviceId = null === (_a = micTrack.current) || void 0 === _a ? void 0 : _a.getSettings().deviceId, selectedDeviceId = null != microphoneDeviceId ? microphoneDeviceId : currentDeviceId;
|
|
116
|
+
if (!selectedDeviceId) return;
|
|
117
|
+
nextMicrophones.some(mic => mic.deviceId === selectedDeviceId) || requestMicrophone();
|
|
118
|
+
});
|
|
111
119
|
};
|
|
112
120
|
return navigator.mediaDevices.addEventListener("devicechange", handleDeviceChange),
|
|
113
121
|
() => {
|
|
114
122
|
navigator.mediaDevices.removeEventListener("devicechange", handleDeviceChange);
|
|
115
123
|
};
|
|
116
|
-
}, [ hasMediaSupport, refreshMicrophones ]),
|
|
124
|
+
}, [ hasMediaSupport, microphoneDeviceId, refreshMicrophones, requestMicrophone ]),
|
|
125
|
+
{
|
|
117
126
|
micStream: micStream,
|
|
118
127
|
micTrack: micTrack,
|
|
119
128
|
muted: muted,
|
|
@@ -121,6 +130,7 @@ exports.useMicrophone = function(startMuted = !0, microphoneDeviceId) {
|
|
|
121
130
|
isRequesting: isRequesting,
|
|
122
131
|
error: error,
|
|
123
132
|
microphones: microphones,
|
|
133
|
+
micOptions: micOptions,
|
|
124
134
|
requestMicrophone: requestMicrophone,
|
|
125
135
|
stopMicrophone: stopMicStream,
|
|
126
136
|
muteMic: muteMic,
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var sharedTypes = require("./chunks/sharedTypes-gCECyn2N.js"), theme_themes = require("./theme/themes.js"), theme_colors = require("./theme/colors.js"), theme_elevations = require("./theme/elevations.js"), theme_motion = require("./theme/motion.js"), hooks_useTheme = require("./hooks/useTheme.js"), hooks_useObserveTheme = require("./hooks/useObserveTheme.js"), hooks_useDoubleClick = require("./hooks/useDoubleClick.js"), hooks_useToolTip = require("./hooks/useToolTip.js"), hooks_useKeyboardShortcuts = require("./hooks/useKeyboardShortcuts.js"), hooks_useLastUpdated = require("./hooks/useLastUpdated.js"), hooks_useLocalStore = require("./hooks/useLocalStore.js"), hooks_useMdStreamBuffer = require("./hooks/useMdStreamBuffer.js"), hooks_useMicrophone = require("./hooks/useMicrophone.js"), hooks_useAudioRecorder = require("./hooks/useAudioRecorder.js"), hooks_useWindow = require("./hooks/useWindow.js"), hooks_useObserveResize = require("./hooks/useObserveResize.js"), AudioBubble = require("./chunks/AudioBubble-
|
|
3
|
+
var sharedTypes = require("./chunks/sharedTypes-gCECyn2N.js"), theme_themes = require("./theme/themes.js"), theme_colors = require("./theme/colors.js"), theme_elevations = require("./theme/elevations.js"), theme_motion = require("./theme/motion.js"), hooks_useTheme = require("./hooks/useTheme.js"), hooks_useObserveTheme = require("./hooks/useObserveTheme.js"), hooks_useDoubleClick = require("./hooks/useDoubleClick.js"), hooks_useToolTip = require("./hooks/useToolTip.js"), hooks_useKeyboardShortcuts = require("./hooks/useKeyboardShortcuts.js"), hooks_useLastUpdated = require("./hooks/useLastUpdated.js"), hooks_useLocalStore = require("./hooks/useLocalStore.js"), hooks_useMdStreamBuffer = require("./hooks/useMdStreamBuffer.js"), hooks_useMicrophone = require("./hooks/useMicrophone.js"), hooks_useAudioRecorder = require("./hooks/useAudioRecorder.js"), hooks_useWindow = require("./hooks/useWindow.js"), hooks_useObserveResize = require("./hooks/useObserveResize.js"), AudioBubble = require("./chunks/AudioBubble-C8HdYBY8.js"), Avatar = require("./chunks/Avatar-CUaQ3kN1.js"), AvatarGroup = require("./chunks/AvatarGroup-B3M7o4Hh.js"), Badge = require("./chunks/Badge-CY_DG6cD.js"), IconButton = require("./chunks/IconButton-BUw3YUsI.js"), Camera = require("./chunks/Camera-CLm3aQR8.js"), CheckBox = require("./chunks/CheckBox-DDINn56u.js"), DivInput = require("./chunks/DivInput-DO3Dgbjp.js"), Dot = require("./chunks/Dot-_HCJ3qxd.js"), DrggablePanel = require("./chunks/DrggablePanel-CERavfv3.js"), DropDown = require("./chunks/DropDown-Cy2o78yw.js"), ErrorSummary = require("./chunks/ErrorSummary-BfVHS893.js"), Grouper = require("./chunks/Grouper-RYRxazG9.js"), Overlay = require("./chunks/Overlay-BX6vXX9F.js"), _types = require("./chunks/_types-Sa2RAJ2U.js"), Pager = require("./chunks/Pager-BN37VYEC.js"), PromptInput = require("./chunks/PromptInput-D1wP5-uN.js"), ProgressIndicator = require("./chunks/ProgressIndicator-8QZwTSyY.js"), RadioButton = require("./chunks/RadioButton-Cvqum7dU.js"), RadioButtonList = require("./chunks/RadioButtonList-CPHTioGa.js"), Slider = require("./chunks/Slider-CnXBacf-.js"), Spacer = require("./chunks/Spacer-CtxV2Pww.js"), Switch = require("./chunks/Switch-Cbn0ql3B.js"), TabBar = require("./chunks/TabBar-CnD3E-qa.js"), TextArea = require("./chunks/TextArea-CtJi771p.js"), TextField = require("./chunks/TextField-B2u_CZKk.js"), providers_ThemeProvider = require("./providers/ThemeProvider.js"), Tip = require("./chunks/Tip-DAxoyMyA.js"), Toast = require("./chunks/Toast-D2fpwdjF.js"), Button = require("./chunks/Button-DmWbooXb.js"), Chip = require("./chunks/Chip-DRSg6kLh.js"), FileIcon = require("./chunks/FileIcon-xoD-xIme.js"), Icon = require("./chunks/Icon-BB-t50Yt.js"), _types$1 = require("./chunks/_types-BD6txsj1.js"), ButtonBar = require("./chunks/ButtonBar-RSBwFaU-.js"), Label = require("./chunks/Label-NzMpkZo2.js"), UploadArea = require("./chunks/UploadArea-BS2BPuhZ.js");
|
|
4
4
|
|
|
5
5
|
require("./theme/corners.js"), require("./theme/type.js"), require("react"), require("./chunks/tslib.es6-C8dZW5nY.js"),
|
|
6
6
|
require("./chunks/MdStreamBuffer-DObxjnAm.js"), require("react/jsx-runtime"), require("./chunks/colors-njquvHkx.js"),
|
|
@@ -18,7 +18,7 @@ import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
|
18
18
|
|
|
19
19
|
var css_wrapper = "AudioBubble-module_wrapper__f2yKg flexBox-module_row__z24tF", css_bubble = "AudioBubble-module_bubble__bpPT3 flexBox-module_row__z24tF";
|
|
20
20
|
|
|
21
|
-
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.AudioBubble-module_wrapper__f2yKg {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\toverflow: visible;\n}\n\n.AudioBubble-module_bubble__bpPT3 {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\tborder-radius: 100%;\n\tbackground: var(--ab-bg-color);\n\tbox-shadow: var(--ab-box-shadow);\n\ttransition: transform 40ms linear 0s;\n}\n");
|
|
21
|
+
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.AudioBubble-module_wrapper__f2yKg {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\toverflow: visible;\n\tz-index: var(--elevation-status);\n}\n\n.AudioBubble-module_bubble__bpPT3 {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\tborder-radius: 100%;\n\tbackground: var(--ab-bg-color);\n\tbox-shadow: var(--ab-box-shadow);\n\ttransition: transform 40ms linear 0s;\n}\n");
|
|
22
22
|
|
|
23
23
|
const AudioBubble = React.memo(props => {
|
|
24
24
|
const lightColor = useTheme().current.colors["core-text-light"], {audioStream: audioStream, playing: playing = !1, size: size = 64, backgroundColor: backgroundColor = lightColor, glow: glow = !0, glowColor: glowColor = addOpacity(lightColor, .1), glowSize: glowSize = 48, glowOffset: glowOffset = 18, minScale: minScale = 1, maxScale: maxScale = 3, intensity: intensity = 2.2, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, ReleasePerSeconds: ReleasePerSeconds = 1.5} = props, divAttributes = __rest(props, [ "audioStream", "playing", "size", "backgroundColor", "glow", "glowColor", "glowSize", "glowOffset", "minScale", "maxScale", "intensity", "peakIntensity", "risePerSeconds", "ReleasePerSeconds" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", visualizerRef = useRef(null), [scale, setScale] = useState(minScale), visualizerSettings = useMemo(() => ({
|
|
@@ -27,7 +27,7 @@ function resolveValueKey(value, valueKey) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function DropDownComponent(props) {
|
|
30
|
-
const {name: name = "drop-down-select", label: label, labelColor: labelColor = "var(--core-text-primary)", size: size = "m", width: width = "100%", height: height = "auto", selectedIndex: selectedIndex, selectedValue: selectedValue, valueKey: valueKey, options: options = [], placeholder: placeholder = !0, borderRadius: borderRadius = 4, backgroundColor: backgroundColor, bgColor: bgColor = "
|
|
30
|
+
const {name: name = "drop-down-select", label: label, labelColor: labelColor = "var(--core-text-primary)", size: size = "m", width: width = "100%", height: height = "auto", selectedIndex: selectedIndex, selectedValue: selectedValue, valueKey: valueKey, options: options = [], placeholder: placeholder = !0, borderRadius: borderRadius = 4, backgroundColor: backgroundColor = "var(--core-surface-secondary)", bgColor: bgColor = "var(--core-surface-secondary)", iconColor: iconColor = "var(--core-text-primary)", textColor: textColor = "var(--core-text-primary)", borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-outline-primary)", paddingLeft: paddingLeft = "8px", paddingRight: paddingRight = "12px", paddingTop: paddingTop = "8px", paddingBottom: paddingBottom = "8px", borderStyle: borderStyle = "box", iconSize: iconSize = 20, disabled: disabled = !1, error: error = !1, gap: gap = 8, onChange: onChange = () => null, onOption: onOption = () => null} = props, divAttributes = __rest(props, [ "name", "label", "labelColor", "size", "width", "height", "selectedIndex", "selectedValue", "valueKey", "options", "placeholder", "borderRadius", "backgroundColor", "bgColor", "iconColor", "textColor", "borderWidth", "borderSize", "borderColor", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderStyle", "iconSize", "disabled", "error", "gap", "onChange", "onOption" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, [index, setIndex] = useState(null != selectedIndex ? selectedIndex : 0), [selectedText, setSelectedText] = useState("Select an option"), ref = useRef(null);
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
if (null == selectedValue && void 0 !== selectedIndex && (null == ref ? void 0 : ref.current)) {
|
|
33
33
|
if (!(null == options ? void 0 : options[selectedIndex])) return;
|
|
@@ -48,8 +48,8 @@ function DropDownComponent(props) {
|
|
|
48
48
|
const handleChange = useCallback(i => {
|
|
49
49
|
if (!options) return;
|
|
50
50
|
const label = options[i].label || "Select an option";
|
|
51
|
-
setIndex(i), setSelectedText(label), index !== i && onChange(i, options[i]);
|
|
52
|
-
}, [ options, index, onChange ]), renderedOptions = useMemo(() => options ? options.map((option, i) => jsx("option", {
|
|
51
|
+
setIndex(i), setSelectedText(label), index !== i && (onChange(i, options[i]), onOption(options[i]));
|
|
52
|
+
}, [ options, index, onChange, onOption ]), renderedOptions = useMemo(() => options ? options.map((option, i) => jsx("option", {
|
|
53
53
|
value: i,
|
|
54
54
|
onMouseUp: () => handleChange(i),
|
|
55
55
|
children: null == option ? void 0 : option.label
|
|
@@ -13,7 +13,7 @@ var css_wrapper = "TextArea-module_wrapper__O0sWP flexBox-module_columnStart__C7
|
|
|
13
13
|
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextArea-module_wrapper__O0sWP {\n\tposition: relative;\n\tpadding: var(--ta-padding) !important;\n\twidth: var(--ta-width);\n\theight: auto;\n\tborder-radius: var(--ta-border-radius);\n\tbackground-color: var(--ta-bg-color);\n\tbox-shadow: 0 0 0 1px var(--ta-border-color);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextArea-module_textarea__-R2n0 {\n\tborder: 0;\n\toutline: 0;\n\tpadding: 0 16px 0 0;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--core-text-primary);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\tresize: var(--ta-resize);\n\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\t&::placeholder {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\toverflow-y: auto;\n\n\t&::-webkit-scrollbar {\n\t\tbackground-color: transparent;\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: transparent;\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t\tcursor: default;\n\t}\n}\n\n.TextArea-module_actions__yunQx {\n\twidth: 100%;\n\tmin-height: 30px;\n\tcolor: var(--core-text-disabled);\n\tgap: 16px;\n}\n\n.TextArea-module_option__2SFx5 {\n\tgap: 4px;\n\twhite-space: nowrap;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tcursor: default;\n}\n\n.TextArea-module_send__Cub13 {\n\tposition: absolute;\n\tbottom: var(--ta-send-icon-offset-bottom);\n\tright: var(--ta-send-icon-offset-right);\n}\n\n.TextArea-module_xs__5e748 {\n}\n\n.TextArea-module_s__Ac-fq {\n}\n\n.TextArea-module_m__dod4R {\n}\n\n.TextArea-module_l__-uLCG {\n}\n");
|
|
14
14
|
|
|
15
15
|
const TextArea = React.memo(props => {
|
|
16
|
-
const {value: value = "", name: name = "text_area", width: width = "100%", focused: focused = !1, placeholder: placeholder = "Enter text here...", rows: rows = 6, border: border = !
|
|
16
|
+
const {value: value = "", name: name = "text_area", width: width = "100%", focused: focused = !1, placeholder: placeholder = "Enter text here...", rows: rows = 6, border: border = !0, borderRadius: borderRadius = 4, padding: padding = "16px 4px 16px 16px", error: error = !1, resizable: resizable = !0, hasSend: hasSend = !1, sendOffset: sendOffset = {
|
|
17
17
|
bottom: 10,
|
|
18
18
|
right: 10
|
|
19
19
|
}, sendSize: sendSize = 36, returnSubmits: returnSubmits = !1, backgroundColor: backgroundColor, bgColor: bgColor, minWidth: minWidth, textSize: textSize = "m", disabled: disabled = !1, submitClears: submitClears = !0, onChange: onChange = () => null, onFocus: onFocus = () => null, onBlur: onBlur = () => null, onSubmit: onSubmit = () => null, onKeyDown: onKeyDown = () => null} = props, divAttributes = __rest(props, [ "value", "name", "width", "focused", "placeholder", "rows", "border", "borderRadius", "padding", "error", "resizable", "hasSend", "sendOffset", "sendSize", "returnSubmits", "backgroundColor", "bgColor", "minWidth", "textSize", "disabled", "submitClears", "onChange", "onFocus", "onBlur", "onSubmit", "onKeyDown" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, [isFocused, setIsFocused] = useState(focused), [text, setText] = useState(value), ref = useRef(null), handleResize = useCallback(() => {
|
|
@@ -35,7 +35,7 @@ var css = {
|
|
|
35
35
|
l: "TextField-module_l__gbNRz type-module_body-l-regular__lOYbg"
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextField-module_wrapper__qZ-p- {\n\tposition: relative;\n\tpadding: var(--tf-padding) !important;\n\tpadding-right: var(--tf-padding-right) !important;\n\tgap: 8px;\n\toverflow: visible;\n\twidth: var(--tf-width);\n\theight: var(--tf-height);\n\tborder-radius: var(--tf-border-radius);\n\tbackground: var(--tf-bg);\n\tbox-shadow: var(--tf-box-shadow);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextField-module_container__5U9yK {\n\tflex: 1;\n\theight: 100%;\n\tgap: 8px;\n}\n\n.TextField-module_label__jD8MR {\n\tcolor: var(--tf-label-color);\n\theight: auto;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.TextField-module_input__AkWBQ {\n\tcolor: var(--tf-text-color);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\toutline: none;\n\tborder: 0;\n\theight: 100%;\n\twidth: var(--tf-input-width);\n\tfield-sizing: var(--tf-field-size);\n\ttext-align: var(--tf-text-align);\n\t&::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:focus::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\t&:-webkit-autofill,\n\t&:-webkit-autofill:hover,\n\t&:-webkit-autofill:focus,\n\t&:-webkit-autofill:active {\n\t\tbox-shadow: 0 0 0 50px var(--core-button-disabled) inset !important;\n\t\t-webkit-text-fill-color: var(--core-text-primary);\n\t}\n}\n\n.TextField-module_showPassword__4Ecfo {\n\tmin-height: 18px;\n\tmin-width: 18px;\n\tmax-height: 18px;\n\tmax-width: 18px;\n\topacity: var(--tf-show-opacity);\n\t&:hover {\n\t\topacity: var(--tf-show-opacity-hover);\n\t}\n}\n\n.TextField-module_clearButton__O9ed3 {\n\tborder: 0;\n\tbackground: transparent;\n\tappearance: none;\n\t-webkit-appearance: none;\n\toutline: none;\n\tcursor: pointer;\n}\n\n.TextField-module_xs__vyt2t {\n}\n\n.TextField-module_s__0qm83 {\n}\n\n.TextField-module_m__M-tLl {\n}\n\n.TextField-module_l__gbNRz {\n}\n");
|
|
38
|
+
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextField-module_wrapper__qZ-p- {\n\tposition: relative;\n\tpadding: var(--tf-padding) !important;\n\tpadding-right: var(--tf-padding-right) !important;\n\tgap: 8px;\n\toverflow: visible;\n\twidth: var(--tf-width);\n\theight: var(--tf-height);\n\tborder-radius: var(--tf-border-radius);\n\tbackground: var(--tf-bg-color);\n\tbox-shadow: var(--tf-box-shadow);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextField-module_container__5U9yK {\n\tflex: 1;\n\theight: 100%;\n\tgap: 8px;\n}\n\n.TextField-module_label__jD8MR {\n\tcolor: var(--tf-label-color);\n\theight: auto;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.TextField-module_input__AkWBQ {\n\tcolor: var(--tf-text-color);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\toutline: none;\n\tborder: 0;\n\theight: 100%;\n\twidth: var(--tf-input-width);\n\tfield-sizing: var(--tf-field-size);\n\ttext-align: var(--tf-text-align);\n\t&::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:focus::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\t&:-webkit-autofill,\n\t&:-webkit-autofill:hover,\n\t&:-webkit-autofill:focus,\n\t&:-webkit-autofill:active {\n\t\tbox-shadow: 0 0 0 50px var(--core-button-disabled) inset !important;\n\t\t-webkit-text-fill-color: var(--core-text-primary);\n\t}\n}\n\n.TextField-module_showPassword__4Ecfo {\n\tmin-height: 18px;\n\tmin-width: 18px;\n\tmax-height: 18px;\n\tmax-width: 18px;\n\topacity: var(--tf-show-opacity);\n\t&:hover {\n\t\topacity: var(--tf-show-opacity-hover);\n\t}\n}\n\n.TextField-module_clearButton__O9ed3 {\n\tborder: 0;\n\tbackground: transparent;\n\tappearance: none;\n\t-webkit-appearance: none;\n\toutline: none;\n\tcursor: pointer;\n}\n\n.TextField-module_xs__vyt2t {\n}\n\n.TextField-module_s__0qm83 {\n}\n\n.TextField-module_m__M-tLl {\n}\n\n.TextField-module_l__gbNRz {\n}\n");
|
|
39
39
|
|
|
40
40
|
const MOTION_CONFIG = {
|
|
41
41
|
variants: {
|
|
@@ -3,7 +3,7 @@ import { _ as __awaiter } from "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
|
3
3
|
import { useRef, useState, useCallback, useMemo, useEffect } from "react";
|
|
4
4
|
|
|
5
5
|
function useMicrophone(startMuted = !0, microphoneDeviceId) {
|
|
6
|
-
const micStream = useRef(null), micTrack = useRef(null), mutedRef = useRef(startMuted), mountedRef = useRef(!0), initializedRef = useRef(!1), [microphones, setMicrophones] = useState([]), [muted, setMuted] = useState(startMuted), [isRequesting, setIsRequesting] = useState(!1), [error, setError] = useState(null), waitForPaint = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
6
|
+
const micStream = useRef(null), micTrack = useRef(null), mutedRef = useRef(startMuted), mountedRef = useRef(!0), initializedRef = useRef(!1), [microphones, setMicrophones] = useState([]), [micOptions, setMicOptions] = useState([]), [muted, setMuted] = useState(startMuted), [isRequesting, setIsRequesting] = useState(!1), [error, setError] = useState(null), waitForPaint = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
7
7
|
yield new Promise(resolve => {
|
|
8
8
|
requestAnimationFrame(() => resolve());
|
|
9
9
|
});
|
|
@@ -31,9 +31,9 @@ function useMicrophone(startMuted = !0, microphoneDeviceId) {
|
|
|
31
31
|
return audioTrack;
|
|
32
32
|
}, []), muteMic = useCallback(() => (getMicTrack().enabled = !1, mutedRef.current = !0,
|
|
33
33
|
setMuted(!0), !0), [ getMicTrack ]), unmuteMic = useCallback(() => (getMicTrack().enabled = !0,
|
|
34
|
-
mutedRef.current = !1, setMuted(!1), !0), [ getMicTrack ]), constraints = useCallback(deviceId => {
|
|
34
|
+
mutedRef.current = !1, setMuted(!1), !0), [ getMicTrack ]), constraints = useCallback((deviceId, usePreferredDevice = !0) => {
|
|
35
35
|
var _a;
|
|
36
|
-
const id = null !== (_a = null != deviceId ? deviceId : microphoneDeviceId) && void 0 !== _a ? _a : void 0;
|
|
36
|
+
const id = usePreferredDevice ? null !== (_a = null != deviceId ? deviceId : microphoneDeviceId) && void 0 !== _a ? _a : void 0 : deviceId;
|
|
37
37
|
return {
|
|
38
38
|
audio: {
|
|
39
39
|
deviceId: id ? {
|
|
@@ -41,51 +41,54 @@ function useMicrophone(startMuted = !0, microphoneDeviceId) {
|
|
|
41
41
|
} : void 0
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
}, [ microphoneDeviceId ]),
|
|
44
|
+
}, [ microphoneDeviceId ]), requestStream = useCallback((deviceId_1, ...args_1) => __awaiter(this, [ deviceId_1, ...args_1 ], void 0, function*(deviceId, usePreferredDevice = !0) {
|
|
45
|
+
return micStream.current = yield navigator.mediaDevices.getUserMedia(constraints(deviceId, usePreferredDevice)),
|
|
46
|
+
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
47
|
+
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current)), micStream.current;
|
|
48
|
+
}), [ constraints, getMicTrack, waitForTrackToBecomeActive ]), requestMicrophone = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
45
49
|
if (setIsRequesting(!0), yield waitForPaint(), !hasMediaSupport) {
|
|
46
50
|
const nextError = new Error("Microphone access is not supported");
|
|
47
51
|
return setError(nextError), mountedRef.current && setIsRequesting(!1), null;
|
|
48
52
|
}
|
|
49
53
|
setError(null), stopMicStream();
|
|
50
54
|
try {
|
|
51
|
-
return
|
|
52
|
-
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
53
|
-
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current)), micStream.current;
|
|
55
|
+
return yield requestStream();
|
|
54
56
|
} catch (error) {
|
|
55
57
|
if (!(error instanceof DOMException && "OverconstrainedError" === error.name || error instanceof DOMException && "NotFoundError" === error.name)) {
|
|
56
58
|
const nextError = error instanceof Error ? error : new Error("Failed to access microphone");
|
|
57
59
|
throw setError(nextError), nextError;
|
|
58
60
|
}
|
|
59
|
-
return
|
|
60
|
-
audio: !0
|
|
61
|
-
}), micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
62
|
-
micStream.current;
|
|
61
|
+
return yield requestStream(void 0, !1);
|
|
63
62
|
} finally {
|
|
64
63
|
setIsRequesting(!1);
|
|
65
64
|
}
|
|
66
|
-
}), [
|
|
65
|
+
}), [ hasMediaSupport, requestStream, stopMicStream, waitForPaint ]), refreshMicrophones = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
67
66
|
if (!hasMediaSupport) return [];
|
|
68
67
|
try {
|
|
69
|
-
const devices = yield navigator.mediaDevices.enumerateDevices(), mics = devices.filter(device => "audioinput" === device.kind)
|
|
70
|
-
|
|
68
|
+
const devices = yield navigator.mediaDevices.enumerateDevices(), mics = devices.filter(device => "audioinput" === device.kind), options = mics.map(mic => ({
|
|
69
|
+
value: {
|
|
70
|
+
id: mic.deviceId
|
|
71
|
+
},
|
|
72
|
+
label: mic.label
|
|
73
|
+
}));
|
|
74
|
+
return setMicrophones(mics), setMicOptions(options), devices.filter(device => "audioinput" === device.kind);
|
|
71
75
|
} catch (error) {
|
|
72
76
|
return console.warn("Error getting microphone devices:", error), setMicrophones([]),
|
|
73
|
-
[];
|
|
77
|
+
setMicOptions([]), [];
|
|
74
78
|
}
|
|
75
79
|
}), [ hasMediaSupport ]), setMicrophone = useCallback(deviceId => __awaiter(this, void 0, void 0, function*() {
|
|
80
|
+
var _a;
|
|
76
81
|
setIsRequesting(!0), yield waitForPaint();
|
|
82
|
+
const id = "string" == typeof deviceId ? deviceId : null === (_a = deviceId.value) || void 0 === _a ? void 0 : _a.id;
|
|
77
83
|
try {
|
|
78
|
-
|
|
79
|
-
setError(null), stopMicStream(), micStream.current = yield navigator.mediaDevices.getUserMedia(constraints(deviceId)),
|
|
80
|
-
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
81
|
-
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current));
|
|
84
|
+
setError(null), stopMicStream(), yield requestStream(id, !1);
|
|
82
85
|
} catch (err) {
|
|
83
86
|
setError(err instanceof Error ? err : new Error("Error switching microphone")),
|
|
84
87
|
console.warn("Error switching microphone:", err);
|
|
85
88
|
} finally {
|
|
86
89
|
setIsRequesting(!1);
|
|
87
90
|
}
|
|
88
|
-
}), [
|
|
91
|
+
}), [ requestStream, stopMicStream, waitForPaint ]), toggleMute = useCallback(() => {
|
|
89
92
|
try {
|
|
90
93
|
muted ? unmuteMic() : muteMic();
|
|
91
94
|
} catch (error) {
|
|
@@ -107,13 +110,19 @@ function useMicrophone(startMuted = !0, microphoneDeviceId) {
|
|
|
107
110
|
if (!hasMediaSupport || !(null === (_a = navigator.mediaDevices) || void 0 === _a ? void 0 : _a.addEventListener)) return;
|
|
108
111
|
refreshMicrophones();
|
|
109
112
|
const handleDeviceChange = () => {
|
|
110
|
-
refreshMicrophones()
|
|
113
|
+
refreshMicrophones().then(nextMicrophones => {
|
|
114
|
+
var _a;
|
|
115
|
+
const currentDeviceId = null === (_a = micTrack.current) || void 0 === _a ? void 0 : _a.getSettings().deviceId, selectedDeviceId = null != microphoneDeviceId ? microphoneDeviceId : currentDeviceId;
|
|
116
|
+
if (!selectedDeviceId) return;
|
|
117
|
+
nextMicrophones.some(mic => mic.deviceId === selectedDeviceId) || requestMicrophone();
|
|
118
|
+
});
|
|
111
119
|
};
|
|
112
120
|
return navigator.mediaDevices.addEventListener("devicechange", handleDeviceChange),
|
|
113
121
|
() => {
|
|
114
122
|
navigator.mediaDevices.removeEventListener("devicechange", handleDeviceChange);
|
|
115
123
|
};
|
|
116
|
-
}, [ hasMediaSupport, refreshMicrophones ]),
|
|
124
|
+
}, [ hasMediaSupport, microphoneDeviceId, refreshMicrophones, requestMicrophone ]),
|
|
125
|
+
{
|
|
117
126
|
micStream: micStream,
|
|
118
127
|
micTrack: micTrack,
|
|
119
128
|
muted: muted,
|
|
@@ -121,6 +130,7 @@ function useMicrophone(startMuted = !0, microphoneDeviceId) {
|
|
|
121
130
|
isRequesting: isRequesting,
|
|
122
131
|
error: error,
|
|
123
132
|
microphones: microphones,
|
|
133
|
+
micOptions: micOptions,
|
|
124
134
|
requestMicrophone: requestMicrophone,
|
|
125
135
|
stopMicrophone: stopMicStream,
|
|
126
136
|
muteMic: muteMic,
|
package/dist/esm/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ export { useWindow } from "./hooks/useWindow.mjs";
|
|
|
32
32
|
|
|
33
33
|
export { useObserveResize } from "./hooks/useObserveResize.mjs";
|
|
34
34
|
|
|
35
|
-
export { A as AudioBubble } from "./chunks/AudioBubble-
|
|
35
|
+
export { A as AudioBubble } from "./chunks/AudioBubble-DFh3Vxl6.mjs";
|
|
36
36
|
|
|
37
37
|
export { A as Avatar } from "./chunks/Avatar-C8uV7ROZ.mjs";
|
|
38
38
|
|
|
@@ -52,7 +52,7 @@ export { D as Dot } from "./chunks/Dot-Cj6gWj4_.mjs";
|
|
|
52
52
|
|
|
53
53
|
export { D as DraggablePanel } from "./chunks/DrggablePanel-CQcIbxpX.mjs";
|
|
54
54
|
|
|
55
|
-
export { D as DropDown } from "./chunks/DropDown-
|
|
55
|
+
export { D as DropDown } from "./chunks/DropDown-DFUc_rjP.mjs";
|
|
56
56
|
|
|
57
57
|
export { E as ErrorSummary } from "./chunks/ErrorSummary-Mz9siVxm.mjs";
|
|
58
58
|
|
|
@@ -80,9 +80,9 @@ export { S as Switch } from "./chunks/Switch-CyoaJwSX.mjs";
|
|
|
80
80
|
|
|
81
81
|
export { T as TabBar } from "./chunks/TabBar-DmO1ixBz.mjs";
|
|
82
82
|
|
|
83
|
-
export { T as TextArea } from "./chunks/TextArea-
|
|
83
|
+
export { T as TextArea } from "./chunks/TextArea-DaB8g-fZ.mjs";
|
|
84
84
|
|
|
85
|
-
export { T as TextField } from "./chunks/TextField-
|
|
85
|
+
export { T as TextField } from "./chunks/TextField-BGeEJXUJ.mjs";
|
|
86
86
|
|
|
87
87
|
export { ThemeProvider } from "./providers/ThemeProvider.mjs";
|
|
88
88
|
|
|
@@ -35,6 +35,7 @@ type DropDownBaseProps<T = string> = {
|
|
|
35
35
|
gap?: number;
|
|
36
36
|
size?: 'xs' | 's' | 'm' | 'l';
|
|
37
37
|
onChange?: (index: number, option: DropDownOption<T>) => void;
|
|
38
|
+
onOption?: (option: DropDownOption<T>) => void;
|
|
38
39
|
};
|
|
39
40
|
export type DropDownProps<T = string> = Omit<React.HTMLAttributes<HTMLDivElement>, keyof DropDownBaseProps<T>> & DropDownBaseProps<T>;
|
|
40
41
|
export {};
|
|
@@ -7,6 +7,7 @@ export { useLastUpdated } from './useLastUpdated/useLastUpdated';
|
|
|
7
7
|
export { useLocalStore } from './useLocalStore/useLocalStore';
|
|
8
8
|
export { useMDStreamBuffer } from './useMdStreamBuffer/useMdStreamBuffer';
|
|
9
9
|
export { useMicrophone } from './useMicrophone/useMicrophone';
|
|
10
|
+
export type { MicOption, UseMicrophoneReturn, } from './useMicrophone/useMicrophone';
|
|
10
11
|
export { useAudioRecorder } from './useAudioRecorder/useAudioRecorder';
|
|
11
12
|
export { useWindow, FormFactor, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, } from './useWindow/useWindow';
|
|
12
13
|
export { useObserveResize } from './useObserveResize/useObserveResize';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
|
-
type
|
|
2
|
+
import type { DropDownOption } from '../../components/DropDown';
|
|
3
|
+
export type MicOption = {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
export type UseMicrophoneReturn = {
|
|
3
7
|
micStream: RefObject<MediaStream | null>;
|
|
4
8
|
micTrack: RefObject<MediaStreamTrack | null>;
|
|
5
9
|
muted: boolean;
|
|
@@ -7,13 +11,13 @@ type UseMicrophoneReturn = {
|
|
|
7
11
|
isRequesting: boolean;
|
|
8
12
|
error: Error | null;
|
|
9
13
|
microphones: MediaDeviceInfo[];
|
|
14
|
+
micOptions: DropDownOption<MicOption>[];
|
|
10
15
|
requestMicrophone: () => Promise<MediaStream | null>;
|
|
11
16
|
stopMicrophone: () => void;
|
|
12
17
|
muteMic: () => boolean;
|
|
13
18
|
unmuteMic: () => boolean;
|
|
14
19
|
toggleMute: () => void;
|
|
15
20
|
refreshMicrophones: () => Promise<MediaDeviceInfo[]>;
|
|
16
|
-
setMicrophone: (deviceId: string) => Promise<void>;
|
|
21
|
+
setMicrophone: (deviceId: string | DropDownOption<MicOption>) => Promise<void>;
|
|
17
22
|
};
|
|
18
23
|
export declare function useMicrophone(startMuted?: boolean, microphoneDeviceId?: string): UseMicrophoneReturn;
|
|
19
|
-
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export type { ToolTip, ToolTipInfo } from './components/sharedTypes';
|
|
|
2
2
|
export { ToolTipType } from './components/sharedTypes';
|
|
3
3
|
export { light, dark, lightTheme, darkTheme, motion, elevations, Elevation, } from './theme';
|
|
4
4
|
export type { SliceTheme, Colors, Type, Corners, Elevations, } from './theme';
|
|
5
|
-
export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useAudioRecorder, useMicrophone, useWindow, useDoubleClick, useObserveResize, } from './hooks';
|
|
5
|
+
export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, type MicOption, type UseMicrophoneReturn, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useAudioRecorder, useMicrophone, useWindow, useDoubleClick, useObserveResize, } from './hooks';
|
|
6
6
|
export { AudioBubble } from './components/AudioBubble/index';
|
|
7
7
|
export type { AudioBubbleProps } from './components/AudioBubble/index';
|
|
8
8
|
export { Avatar } from './components/Avatar/index';
|
|
@@ -8,7 +8,7 @@ export declare function nameAndExtension(fileName: string): {
|
|
|
8
8
|
/**
|
|
9
9
|
* Map a file extension to the corresponding file icon name.
|
|
10
10
|
*/
|
|
11
|
-
export declare function fileIconName(extension: string): "other" | "
|
|
11
|
+
export declare function fileIconName(extension: string): "other" | "video" | "text" | "sheet" | "image" | "audio" | "md" | "code" | "preso" | "pdf" | "clipboard";
|
|
12
12
|
/**
|
|
13
13
|
* Create a clipboard-text file with a guaranteed `.clipboard` extension.
|
|
14
14
|
*/
|