@apple-pie/slice 0.1.2 → 0.1.4
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/README.md +89 -27
- package/dist/cjs/chunks/{Button-TfMwGVI5.js → Button-krf4dQeL.js} +4 -2
- package/dist/cjs/chunks/{ButtonBar-BqGC6sad.js → ButtonBar-C9Nm9faU.js} +1 -1
- package/dist/cjs/chunks/{Camera-om1AA2D0.js → Camera-Dx_PT3pS.js} +63 -46
- package/dist/cjs/chunks/{Card-Ctwbhu26.js → Card-AgEMKJ4O.js} +1 -1
- package/dist/cjs/chunks/{CheckBox-CeDIiSvi.js → CheckBox-CLMxlUff.js} +1 -1
- package/dist/cjs/chunks/{Chip-DdTtB57x.js → Chip-CIy_Xe3i.js} +1 -1
- package/dist/cjs/chunks/{DropDown-CC90XfyD.js → DropDown-FZb52YxR.js} +1 -1
- package/dist/cjs/chunks/{FileList-ClTfGKIL.js → FileList-CkpMj-os.js} +1 -1
- package/dist/cjs/chunks/{Grouper-jiYhVC82.js → Grouper-Bgc1wrQM.js} +1 -1
- package/dist/cjs/chunks/{IconButton-BiUfqoPb.js → IconButton-CBWmUZxR.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-B3-OxGYF.js → ProgressIndicator-DVD-gD3T.js} +1 -1
- package/dist/cjs/chunks/{PromptInput-Dsziepzs.js → PromptInput-DULf5ock.js} +1 -1
- package/dist/cjs/chunks/{RadioButton-i5n_nNV5.js → RadioButton-Ce9uf54a.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-BCdk-5aD.js → RadioButtonList-dhPr-Uhs.js} +1 -1
- package/dist/cjs/chunks/SSEConnection-B_yE8cXz.js +140 -0
- package/dist/cjs/chunks/{TabBar-BF5CvZ-v.js → TabBar-DuwypMB6.js} +1 -1
- package/dist/cjs/chunks/{TextArea-BmOomEKp.js → TextArea-BJCjRUEG.js} +1 -1
- package/dist/cjs/chunks/{TextField-CXMyCClp.js → TextField-CjT26H_6.js} +18 -16
- package/dist/cjs/chunks/{Toast-CQ0-yuzl.js → Toast-DMUM1wuL.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-B5Xvp0H4.js → UploadArea-BE6but3t.js} +1 -1
- package/dist/cjs/chunks/WSConnection-DCBuJGmb.js +206 -0
- package/dist/cjs/chunks/{_types-Cxk9tRiB.js → _types-C_zOsCbB.js} +57 -50
- package/dist/cjs/chunks/colors-uej0anrN.js +27 -0
- package/dist/cjs/chunks/sseStore-CIIeshjm.js +59 -0
- package/dist/cjs/chunks/windowStore-CCxCOUqa.js +156 -0
- package/dist/cjs/components/Button/index.js +3 -3
- package/dist/cjs/components/ButtonBar/index.js +3 -3
- package/dist/cjs/components/Camera/index.js +4 -4
- package/dist/cjs/components/Card/index.js +2 -2
- package/dist/cjs/components/CheckBox/index.js +2 -2
- package/dist/cjs/components/Chip/index.js +2 -2
- package/dist/cjs/components/DropDown/index.js +2 -2
- package/dist/cjs/components/FileList/index.js +3 -3
- package/dist/cjs/components/Grouper/index.js +2 -2
- package/dist/cjs/components/Icon/index.js +1 -1
- package/dist/cjs/components/IconButton/index.js +2 -2
- package/dist/cjs/components/Progress/index.js +2 -2
- package/dist/cjs/components/PromptInput/index.js +5 -5
- package/dist/cjs/components/RadioButton/index.js +2 -2
- package/dist/cjs/components/RadioButtonList/index.js +3 -3
- package/dist/cjs/components/TabBar/index.js +3 -3
- package/dist/cjs/components/TextArea/index.js +4 -4
- package/dist/cjs/components/Textfield/index.js +5 -5
- package/dist/cjs/components/Toast/index.js +2 -2
- package/dist/cjs/components/UploadArea/index.js +4 -4
- package/dist/cjs/hooks/useWindow.js +46 -11
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/stores/SSE.js +9 -0
- package/dist/cjs/stores/WS.js +62 -0
- package/dist/cjs/stores/window.js +14 -3
- package/dist/cjs/stores.js +20 -5
- package/dist/cjs/utils/index.js +4 -26
- package/dist/cjs/utils/objects/index.js +6 -0
- package/dist/esm/chunks/{Avatar-BQT1r-Ge.mjs → Avatar-CDMV6f9w.mjs} +1 -1
- package/dist/esm/chunks/{AvatarGroup-B787aNtD.mjs → AvatarGroup-BZ18GwhK.mjs} +1 -1
- package/dist/esm/chunks/{Button-1MgE-kl9.mjs → Button-kXFJmcKv.mjs} +5 -3
- package/dist/esm/chunks/{ButtonBar-Eahfd-40.mjs → ButtonBar-DIsqJmrS.mjs} +1 -1
- package/dist/esm/chunks/{Camera-Bvoug1KF.mjs → Camera-BvJJ5cd-.mjs} +65 -48
- package/dist/esm/chunks/{Card-RSZhXncV.mjs → Card-DjHdCav5.mjs} +1 -1
- package/dist/esm/chunks/{CheckBox-CfLedK0e.mjs → CheckBox-C1LPehvl.mjs} +1 -1
- package/dist/esm/chunks/{Chip-Db4N0WVH.mjs → Chip-ByaaWpFx.mjs} +1 -1
- package/dist/esm/chunks/{DivInput-BEpjdfu4.mjs → DivInput-B7BliU1p.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-DJm1Mx5u.mjs → DrggablePanel-DvactFf5.mjs} +1 -1
- package/dist/esm/chunks/{DropDown-ryz3GK81.mjs → DropDown-CM01mO_W.mjs} +1 -1
- package/dist/esm/chunks/{FileIcon-_mK2EcB2.mjs → FileIcon-CC_k5dUW.mjs} +1 -1
- package/dist/esm/chunks/{FileList-hCMTALyN.mjs → FileList-Bon537-t.mjs} +4 -4
- package/dist/esm/chunks/{Grouper-B1gjd3Sx.mjs → Grouper-DNmAYWdR.mjs} +1 -1
- package/dist/esm/chunks/{IconButton-SyRu990z.mjs → IconButton-C8RBNFzh.mjs} +1 -1
- package/dist/esm/chunks/{Label-DGOkB_Px.mjs → Label-DOvquc82.mjs} +1 -1
- package/dist/esm/chunks/{Pager-BA0lD9mI.mjs → Pager-BX4TMwD_.mjs} +1 -1
- package/dist/esm/chunks/{ProgressIndicator-BayyosKr.mjs → ProgressIndicator-D2eairZl.mjs} +1 -1
- package/dist/esm/chunks/{PromptInput-CUXCuYVA.mjs → PromptInput-DXFAZspz.mjs} +2 -2
- package/dist/esm/chunks/{RadioButton-BRFSVtmm.mjs → RadioButton-_lo_FJ8g.mjs} +2 -2
- package/dist/esm/chunks/{RadioButtonList-D6a_EcB6.mjs → RadioButtonList-CLHJxrI_.mjs} +1 -1
- package/dist/esm/chunks/SSEConnection-Dj9P0SWE.mjs +140 -0
- package/dist/esm/chunks/{Slider-D2XVyi2g.mjs → Slider-Bih21QiT.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-BqajqueL.mjs → TabBar-CDDzA_m1.mjs} +2 -2
- package/dist/esm/chunks/{TextArea-C5EbLAN1.mjs → TextArea-DBmM6aQm.mjs} +1 -1
- package/dist/esm/chunks/{TextField-DnQxDxus.mjs → TextField-DyUTMegV.mjs} +20 -18
- package/dist/esm/chunks/{Tip-B64Pa9eq.mjs → Tip-B-cDOFvV.mjs} +1 -1
- package/dist/esm/chunks/{Toast-B3GgzcTW.mjs → Toast-ovxR12_-.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea-DpWT-5DA.mjs → UploadArea-tT5V8q23.mjs} +4 -4
- package/dist/esm/chunks/WSConnection-DlYSitff.mjs +206 -0
- package/dist/esm/chunks/{_types-DGDKmYIh.mjs → _types-CTmvSEX0.mjs} +36 -29
- package/dist/esm/chunks/colors-DR9fLI5X.mjs +30 -0
- package/dist/esm/chunks/{misc-Osk7tIah.mjs → misc-cg9I7drO.mjs} +1 -1
- package/dist/esm/chunks/sseStore-DdqmnAAf.mjs +56 -0
- package/dist/esm/chunks/windowStore-BOTh1g37.mjs +148 -0
- package/dist/esm/components/Avatar/index.mjs +2 -2
- package/dist/esm/components/AvatarGroup/index.mjs +3 -3
- package/dist/esm/components/Button/index.mjs +4 -4
- package/dist/esm/components/ButtonBar/index.mjs +4 -4
- package/dist/esm/components/Camera/index.mjs +5 -5
- package/dist/esm/components/Card/index.mjs +3 -3
- package/dist/esm/components/CheckBox/index.mjs +3 -3
- package/dist/esm/components/Chip/index.mjs +3 -3
- package/dist/esm/components/DivInput/index.mjs +2 -2
- package/dist/esm/components/DraggablePanel/index.mjs +2 -2
- package/dist/esm/components/DropDown/index.mjs +3 -3
- package/dist/esm/components/FileIcon/index.mjs +2 -2
- package/dist/esm/components/FileList/index.mjs +5 -5
- package/dist/esm/components/Grouper/index.mjs +3 -3
- package/dist/esm/components/Icon/index.mjs +2 -2
- package/dist/esm/components/IconButton/index.mjs +3 -3
- package/dist/esm/components/Label/index.mjs +2 -2
- package/dist/esm/components/Pager/index.mjs +2 -2
- package/dist/esm/components/Progress/index.mjs +3 -3
- package/dist/esm/components/PromptInput/index.mjs +7 -7
- package/dist/esm/components/RadioButton/index.mjs +3 -3
- package/dist/esm/components/RadioButtonList/index.mjs +4 -4
- package/dist/esm/components/Slider/index.mjs +2 -2
- package/dist/esm/components/TabBar/index.mjs +4 -4
- package/dist/esm/components/TextArea/index.mjs +5 -5
- package/dist/esm/components/Textfield/index.mjs +6 -6
- package/dist/esm/components/Tip/index.mjs +2 -2
- package/dist/esm/components/Toast/index.mjs +3 -3
- package/dist/esm/components/UploadArea/index.mjs +6 -6
- package/dist/esm/hooks/useTrackRenders.mjs +1 -1
- package/dist/esm/hooks/useWindow.mjs +47 -11
- package/dist/esm/index.mjs +31 -31
- package/dist/esm/stores/SSE.mjs +7 -0
- package/dist/esm/stores/WS.mjs +59 -0
- package/dist/esm/stores/window.mjs +3 -1
- package/dist/esm/stores.mjs +6 -2
- package/dist/esm/utils/index.mjs +6 -30
- package/dist/esm/utils/objects/index.mjs +5 -0
- package/dist/types/components/Camera/_types.d.ts +1 -0
- package/dist/types/components/Icon/_types.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/types/hooks/useWindow/useWindow.d.ts +19 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/stores/SSE/_types.d.ts +17 -0
- package/dist/types/stores/SSE/index.d.ts +2 -0
- package/dist/types/stores/SSE/sseStore.d.ts +28 -0
- package/dist/types/stores/WS/_types.d.ts +17 -0
- package/dist/types/stores/WS/index.d.ts +2 -0
- package/dist/types/stores/WS/wsStore.d.ts +19 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/window/_types.d.ts +5 -0
- package/dist/types/stores/window/index.d.ts +3 -2
- package/dist/types/stores/window/windowStore.d.ts +8 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/objects/SSEConnection/SSEConnection.d.ts +166 -0
- package/dist/types/utils/objects/WSConnection/WSConnection.d.ts +147 -0
- package/dist/types/utils/objects/index.d.ts +4 -0
- package/package.json +6 -1
- package/dist/cjs/chunks/windowStore-RaJswiHM.js +0 -70
- package/dist/esm/chunks/windowStore-CwW0i_le.mjs +0 -71
package/dist/cjs/utils/index.js
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var misc = require("../chunks/misc-C-M6KKsH.js");
|
|
3
|
+
var misc = require("../chunks/misc-C-M6KKsH.js"), colors = require("../chunks/colors-uej0anrN.js"), SSEConnection = require("../chunks/SSEConnection-B_yE8cXz.js"), WSConnection = require("../chunks/WSConnection-DCBuJGmb.js");
|
|
4
4
|
|
|
5
|
-
require("../chunks/tslib.es6-C8dZW5nY.js")
|
|
6
|
-
|
|
7
|
-
exports.
|
|
8
|
-
if (!color) return "";
|
|
9
|
-
const alpha = Number.isFinite(opacity) ? Math.max(0, Math.min(1, opacity)) : 1, trimmed = color.trim();
|
|
10
|
-
if (trimmed.startsWith("#")) {
|
|
11
|
-
const normalized = trimmed.slice(1), fullHex = 3 === normalized.length ? normalized.split("").map(char => `${char}${char}`).join("") : normalized;
|
|
12
|
-
if (!/^[0-9a-fA-F]{6}$/.test(fullHex)) return color;
|
|
13
|
-
return `rgba(${Number.parseInt(fullHex.slice(0, 2), 16)}, ${Number.parseInt(fullHex.slice(2, 4), 16)}, ${Number.parseInt(fullHex.slice(4, 6), 16)}, ${alpha})`;
|
|
14
|
-
}
|
|
15
|
-
const rgbMatch = trimmed.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*[\d.]+\s*)?\)$/);
|
|
16
|
-
if (rgbMatch) {
|
|
17
|
-
const [, r, g, b] = rgbMatch;
|
|
18
|
-
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
19
|
-
}
|
|
20
|
-
return color;
|
|
21
|
-
}, exports.tintFromColor = (hex, percent) => {
|
|
22
|
-
const normalizedHex = hex.trim().replace("#", "");
|
|
23
|
-
if (!(3 === normalizedHex.length || 6 === normalizedHex.length) || !/^[0-9a-fA-F]+$/.test(normalizedHex)) return hex;
|
|
24
|
-
const fullHex = 3 === normalizedHex.length ? normalizedHex.split("").map(char => `${char}${char}`).join("") : normalizedHex, ratio = Math.max(-1, Math.min(1, Math.abs(percent) > 1 ? percent / 100 : percent)), mixTo = ratio >= 0 ? 255 : 0, mix = Math.abs(ratio);
|
|
25
|
-
return `#${[ 0, 2, 4 ].map(start => Number.parseInt(fullHex.slice(start, start + 2), 16)).map(channel => {
|
|
26
|
-
const next = Math.round(channel + (mixTo - channel) * mix);
|
|
27
|
-
return Math.max(0, Math.min(255, next));
|
|
28
|
-
}).map(channel => channel.toString(16).padStart(2, "0")).join("")}`;
|
|
29
|
-
};
|
|
5
|
+
require("../chunks/tslib.es6-C8dZW5nY.js"), exports.copyToClipboard = misc.copyToClipboard,
|
|
6
|
+
exports.addOpacity = colors.addOpacity, exports.tintFromColor = colors.tintFromColor,
|
|
7
|
+
exports.SSEConnection = SSEConnection.SSEConnection, exports.WSConnection = WSConnection.WSConnection;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var SSEConnection = require("../../chunks/SSEConnection-B_yE8cXz.js"), WSConnection = require("../../chunks/WSConnection-DCBuJGmb.js");
|
|
4
|
+
|
|
5
|
+
require("../../chunks/tslib.es6-C8dZW5nY.js"), exports.SSEConnection = SSEConnection.SSEConnection,
|
|
6
|
+
exports.WSConnection = WSConnection.WSConnection;
|
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
import React, { useState, useRef, useMemo, useEffect, useCallback } from "react";
|
|
6
6
|
|
|
7
|
-
import { n as normalizedPercent, s as setStyle } from "./misc-
|
|
7
|
+
import { n as normalizedPercent, s as setStyle } from "./misc-cg9I7drO.mjs";
|
|
8
8
|
|
|
9
9
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
import React, { useMemo } from "react";
|
|
6
6
|
|
|
7
|
-
import { A as Avatar } from "./Avatar-
|
|
7
|
+
import { A as Avatar } from "./Avatar-CDMV6f9w.mjs";
|
|
8
8
|
|
|
9
9
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
10
10
|
|
|
@@ -10,9 +10,9 @@ import { B as Badge } from "./Badge-DyICxZP2.mjs";
|
|
|
10
10
|
|
|
11
11
|
import { D as Dot } from "./Dot-CLGwQu-i.mjs";
|
|
12
12
|
|
|
13
|
-
import { I as Icon } from "./_types-
|
|
13
|
+
import { I as Icon } from "./_types-CTmvSEX0.mjs";
|
|
14
14
|
|
|
15
|
-
import { P as ProgressIndicator } from "./ProgressIndicator-
|
|
15
|
+
import { P as ProgressIndicator } from "./ProgressIndicator-D2eairZl.mjs";
|
|
16
16
|
|
|
17
17
|
import { T as ToolTipType } from "./sharedTypes-tn9-uJvb.mjs";
|
|
18
18
|
|
|
@@ -31,7 +31,7 @@ var css = {
|
|
|
31
31
|
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.Button-module_button__2ZuB7 {\n\tposition: relative;\n\tuser-select: none;\n\tmin-width: var(--ui-button-min-width);\n\t-webkit-user-select: none;\n}\n\n.Button-module_label__UJ3Zt {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\tword-break: break-all;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 1;\n\t-webkit-box-orient: vertical;\n\t&:hover {\n\t\ttext-decoration: var(--ui-button-decoration);\n\t}\n}\n\n.Button-module_count__DFxVB {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\ttransform: translateX(10px) translateY(-2px);\n}\n\n.Button-module_icon__-43u5 {\n\tmin-width: var(--ui-button-icon-size);\n\tmin-height: var(--ui-button-icon-size);\n\theight: var(--ui-button-icon-size);\n\twidth: var(--ui-button-icon-size);\n}\n\n.Button-module_m__DR-gs {\n}\n\n.Button-module_l__0E0yI {\n}\n\n.Button-module_s__dSKOL {\n}\n");
|
|
32
32
|
|
|
33
33
|
const ButtonComponent = forwardRef((props, buttonRef) => {
|
|
34
|
-
const {size: size = "medium", variant: variant = "outline", label: label, labelSize: labelSize = "m", iconRight: iconRight, iconLeft: iconLeft, count: count = (void 0 === props.count ? void 0 : Number(props.count)), showDot: showDot, tooltip: tooltip, round: round = !1, state: state = "normal", fill: fill = !1, iconSize: iconSize = (void 0 === props.iconSize ? 20 : Number(props.iconSize)), width: width = "
|
|
34
|
+
const {size: size = "medium", variant: variant = "outline", label: label, labelSize: labelSize = "m", iconRight: iconRight, iconLeft: iconLeft, count: count = (void 0 === props.count ? void 0 : Number(props.count)), showDot: showDot, tooltip: tooltip, round: round = !1, state: state = "normal", fill: fill = !1, iconSize: iconSize = (void 0 === props.iconSize ? 20 : Number(props.iconSize)), width: width = "min-content", underline: underline = !1, borderRadius: borderRadius, iconColor: iconColor, bgColor: bgColor, bgColorDisabled: bgColorDisabled, labelColor: labelColor, transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, paddingRight: paddingRight, paddingLeft: paddingLeft, progress: progress = !1, working: working = !1, duration: duration, trigger: trigger = !1, destructive: destructive = !1, onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = __rest(props, [ "size", "variant", "label", "labelSize", "iconRight", "iconLeft", "count", "showDot", "tooltip", "round", "state", "fill", "iconSize", "width", "underline", "borderRadius", "iconColor", "bgColor", "bgColorDisabled", "labelColor", "transition", "variants", "initial", "animate", "exit", "paddingRight", "paddingLeft", "progress", "working", "duration", "trigger", "destructive", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [btnState, setBtnState] = useState(state), [btnWidth, setBtnWidth] = useState(void 0), [playing, setPlaying] = useState(working), ref = useRef(null), handleClick = useCallback(e => {
|
|
35
35
|
onToolTip(null), "disabled" !== btnState && (progress && duration ? setPlaying(!0) : onClick(e));
|
|
36
36
|
}, [ onToolTip, btnState, progress, duration, onClick ]);
|
|
37
37
|
useEffect(() => setBtnState(state), [ state ]), useEffect(() => setPlaying(working), [ working ]),
|
|
@@ -171,6 +171,8 @@ const ButtonComponent = forwardRef((props, buttonRef) => {
|
|
|
171
171
|
maxHeight: sizingStyles[size].height,
|
|
172
172
|
minHeight: sizingStyles[size].height,
|
|
173
173
|
flex: "fill" === width ? 1 : "unset",
|
|
174
|
+
width: width && "fill" !== width ? width : "min-content",
|
|
175
|
+
maxWidth: width && "fill" !== width ? width : "min-content",
|
|
174
176
|
gap: sizingStyles[size].gap,
|
|
175
177
|
borderWidth: colorStyles[variant].border,
|
|
176
178
|
borderStyle: "solid",
|
|
@@ -10,7 +10,7 @@ import "../theme/colors.mjs";
|
|
|
10
10
|
|
|
11
11
|
import "../hooks/useWindow.mjs";
|
|
12
12
|
|
|
13
|
-
import { I as IconButton } from "./IconButton-
|
|
13
|
+
import { I as IconButton } from "./IconButton-C8RBNFzh.mjs";
|
|
14
14
|
|
|
15
15
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
16
16
|
|
|
@@ -10,19 +10,19 @@ import "../theme/colors.mjs";
|
|
|
10
10
|
|
|
11
11
|
import "../hooks/useWindow.mjs";
|
|
12
12
|
|
|
13
|
-
import { a as accessibleKeyDown } from "./misc-
|
|
13
|
+
import { a as accessibleKeyDown } from "./misc-cg9I7drO.mjs";
|
|
14
14
|
|
|
15
|
-
import { addOpacity } from "
|
|
15
|
+
import { a as addOpacity } from "./colors-DR9fLI5X.mjs";
|
|
16
16
|
|
|
17
|
-
import { A as Avatar } from "./Avatar-
|
|
17
|
+
import { A as Avatar } from "./Avatar-CDMV6f9w.mjs";
|
|
18
18
|
|
|
19
|
-
import { I as Icon } from "./_types-
|
|
19
|
+
import { I as Icon } from "./_types-CTmvSEX0.mjs";
|
|
20
20
|
|
|
21
21
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
22
22
|
|
|
23
23
|
var css_wrapper = "Camera-module_wrapper__GOsKp flexBox-module_column__ezvMq", css_video = "Camera-module_video__Q2r9B", css_controls = "Camera-module_controls__qXYoL flexBox-module_rowBetween__5FEvi", css_controlsRight = "Camera-module_controlsRight__VcIz7 flexBox-module_rowEnd__rVdVm", css_controlsCenter = "Camera-module_controlsCenter__e-erq flexBox-module_row__z24tF", css_controlsLeft = "Camera-module_controlsLeft__bR4TN flexBox-module_rowStart__4tcxS", css_error = "Camera-module_error__t0w-d flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_poster = "Camera-module_poster__Gun-v flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_snapshotFrame = "Camera-module_snapshotFrame__YM6Eu flexBox-module_row__z24tF", css_clear = "Camera-module_clear__aaCfT", css_snapshot = "Camera-module_snapshot__odQH0", css_toolbarButton = "Camera-module_toolbarButton__mnmoF flexBox-module_columnStartCenter__PKcrG", css_buttonIcon = "Camera-module_buttonIcon__a-VBR flexBox-module_row__z24tF", css_buttonLabel = "Camera-module_buttonLabel__6BEs1 flexBox-module_row__z24tF type-module_body-xs-regular__ZAFft";
|
|
24
24
|
|
|
25
|
-
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.Camera-module_wrapper__GOsKp {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: var(--core-surface-secondary);\n\toverflow: hidden;\n\tborder-radius: 4px;\n}\n\n.Camera-module_video__Q2r9B {\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n}\n\n.Camera-module_controls__qXYoL {\n\tposition: absolute;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tpadding: 16px !important;\n\tgap: 16px;\n\tbackground-color: var(--camera-controls-bg);\n\ttransform: var(--camera-controls-transform);\n\ttransition: transform var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.Camera-module_controlsRight__VcIz7 {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsCenter__e-erq {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsLeft__bR4TN {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_error__t0w-d {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n\tcolor: var(--feedback-warning);\n}\n\n.Camera-module_poster__Gun-v {\n\tposition: absolute;\n\taspect-ratio: 1 / 1;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tcolor: var(--core-text-primary);\n}\n\n.Camera-module_snapshotFrame__YM6Eu {\n\tposition: absolute;\n\tmax-width: 25%;\n\theight: min-content;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 1;\n}\n\n.Camera-module_clear__aaCfT {\n\tposition: absolute;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 3;\n}\n\n.Camera-module_snapshot__odQH0 {\n\twidth: 100%;\n\tborder: 1px solid var(--core-outline-special);\n\tz-index: 2;\n}\n\n.Camera-module_toolbarButton__mnmoF {\n\tgap: 4px;\n\tcursor: pointer;\n}\n\n.Camera-module_buttonIcon__a-VBR {\n\tmin-height: var(--toolbar-button-size);\n\tmax-height: var(--toolbar-button-size);\n\tmin-width: var(--toolbar-button-size);\n\tmax-width: var(--toolbar-button-size);\n\tbackground: var(--toolbar-button-bg-color);\n\tborder: 1px solid transparent;\n\tborder-radius: 100%;\n\topacity: var(--toolbar-button-opacity);\n\ttransition: background, border var(--motion-water-duration)\n\t\tvar(--motion-water) 0s;\n}\n\n.Camera-module_buttonIcon__a-VBR:hover {\n\tborder: 1px solid var(--core-outline-special);\n}\n\n.Camera-module_buttonLabel__6BEs1 {\n\tcolor: var(--toolbar-button-label-color);\n}\n");
|
|
25
|
+
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.Camera-module_wrapper__GOsKp {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: var(--core-surface-secondary);\n\toverflow: hidden;\n\tborder-radius: 4px;\n}\n\n.Camera-module_video__Q2r9B {\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n}\n\n.Camera-module_controls__qXYoL {\n\tposition: absolute;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tpadding: 16px !important;\n\tgap: 16px;\n\tbackground-color: var(--camera-controls-bg);\n\ttransform: var(--camera-controls-transform);\n\ttransition: transform var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.Camera-module_controlsRight__VcIz7 {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsCenter__e-erq {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsLeft__bR4TN {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_error__t0w-d {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n\tcolor: var(--feedback-warning);\n}\n\n.Camera-module_poster__Gun-v {\n\tposition: absolute;\n\taspect-ratio: 1 / 1;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tcolor: var(--core-text-primary);\n}\n\n.Camera-module_snapshotFrame__YM6Eu {\n\tposition: absolute;\n\tmax-width: 25%;\n\theight: min-content;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 1;\n}\n\n.Camera-module_clear__aaCfT {\n\tposition: absolute;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 3;\n}\n\n.Camera-module_snapshot__odQH0 {\n\twidth: 100%;\n\tborder: 1px solid var(--core-outline-special);\n\tz-index: 2;\n}\n\n.Camera-module_toolbarButton__mnmoF {\n\tgap: 4px;\n\tcursor: pointer;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.Camera-module_buttonIcon__a-VBR {\n\tmin-height: var(--toolbar-button-size);\n\tmax-height: var(--toolbar-button-size);\n\tmin-width: var(--toolbar-button-size);\n\tmax-width: var(--toolbar-button-size);\n\tbackground: var(--toolbar-button-bg-color);\n\tborder: 1px solid transparent;\n\tborder-radius: 100%;\n\topacity: var(--toolbar-button-opacity);\n\ttransition: background, border var(--motion-water-duration)\n\t\tvar(--motion-water) 0s;\n}\n\n.Camera-module_buttonIcon__a-VBR:hover {\n\tborder: 1px solid var(--core-outline-special);\n}\n\n.Camera-module_buttonLabel__6BEs1 {\n\tcolor: var(--toolbar-button-label-color);\n}\n");
|
|
26
26
|
|
|
27
27
|
const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
28
28
|
const videoElement = useRef(null), containerElement = useRef(null), controlsTimer = useRef(null), {noVideoPoster: noVideoPoster, width: width, height: height, showControlBar: showControlBar = !0, autoHideControlBar: autoHideControlBar = !0, startCameraOff: startCameraOff = !1, startAudioMuted: startAudioMuted = !1, pipSnapshot: pipSnapshot = !0, userProfile: userProfile, sessionSettings: sessionSettings, onChangeProfile: onChangeProfile, onChangeSettings: onChangeSettings, onSnapshot: onSnapshot, onVideoStream: onVideoStream, onNoVideo: onNoVideo, onNoAudio: onNoAudio} = props, theme = useTheme(), [cameraSupport, setCameraSupport] = useState(void 0), [cameraError, setCameraError] = useState(void 0), [hovered, setHovered] = useState(!1), [cameraOn, setCameraOn] = useState(!1), [micMuted, setMicMuted] = useState(startAudioMuted), [snapshot, setSnapshot] = useState(void 0), [settings, setSettings] = useState(!1), [profile, setProfile] = useState(!1), [deviceList, setDeviceList] = useState([]), constraints = useMemo(() => {
|
|
@@ -42,7 +42,10 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
42
42
|
}, [ null == sessionSettings ? void 0 : sessionSettings.micDeviceId, null == sessionSettings ? void 0 : sessionSettings.videoDeviceId ]), getStream = useCallback(() => {
|
|
43
43
|
var _a;
|
|
44
44
|
const srcObject = null === (_a = videoElement.current) || void 0 === _a ? void 0 : _a.srcObject;
|
|
45
|
-
|
|
45
|
+
if (!srcObject) return;
|
|
46
|
+
if ("undefined" != typeof MediaStream && srcObject instanceof MediaStream) return srcObject;
|
|
47
|
+
const possibleStream = srcObject;
|
|
48
|
+
return "function" == typeof possibleStream.getTracks && "function" == typeof possibleStream.getVideoTracks && "function" == typeof possibleStream.getAudioTracks ? possibleStream : void 0;
|
|
46
49
|
}, []), getTrack = useCallback(type => {
|
|
47
50
|
var _a, _b;
|
|
48
51
|
const stream = getStream();
|
|
@@ -73,7 +76,7 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
73
76
|
const url = canvas.toDataURL("image/png"), [header, data] = url.split(",");
|
|
74
77
|
if (!header || !data) return;
|
|
75
78
|
const mimeType = null !== (_d = null === (_c = new RegExp(/data:(.*?);base64/).exec(header)) || void 0 === _c ? void 0 : _c[1]) && void 0 !== _d ? _d : "image/png", binary = atob(data), bytes = new Uint8Array(binary.length);
|
|
76
|
-
for (let index = 0; index < binary.length; index += 1) bytes[index] = binary.
|
|
79
|
+
for (let index = 0; index < binary.length; index += 1) bytes[index] = binary.codePointAt(index);
|
|
77
80
|
return new Blob([ bytes ], {
|
|
78
81
|
type: mimeType
|
|
79
82
|
});
|
|
@@ -100,46 +103,53 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
100
103
|
const videoTrack = getTrack("video");
|
|
101
104
|
return videoTrack ? "live" !== videoTrack.readyState ? new Error("Video track is no longer live") : (videoTrack.enabled = !0,
|
|
102
105
|
setCameraOn(!0), stream) : new Error("No video track found");
|
|
103
|
-
}, [ getStream, getTrack ]),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
new Error("Camera not supported");
|
|
106
|
+
}, [ getStream, getTrack ]), markCameraReady = useCallback(() => {
|
|
107
|
+
setCameraSupport(!0), setCameraError(void 0), syncMediaState();
|
|
108
|
+
}, [ syncMediaState ]), reuseExistingStream = useCallback(() => {
|
|
107
109
|
const existingStream = getStream(), existingVideoTrack = null == existingStream ? void 0 : existingStream.getVideoTracks()[0];
|
|
108
110
|
if ("live" === (null == existingVideoTrack ? void 0 : existingVideoTrack.readyState) && !existingVideoTrack.enabled) {
|
|
109
111
|
const enabledStream = enableVideo();
|
|
110
112
|
return enabledStream instanceof Error || (null == onVideoStream || onVideoStream(enabledStream),
|
|
111
|
-
|
|
113
|
+
markCameraReady()), enabledStream;
|
|
112
114
|
}
|
|
113
|
-
if ((null == existingStream ? void 0 : existingStream.active) && "live" === (null == existingVideoTrack ? void 0 : existingVideoTrack.readyState)) return
|
|
114
|
-
|
|
115
|
+
if ((null == existingStream ? void 0 : existingStream.active) && "live" === (null == existingVideoTrack ? void 0 : existingVideoTrack.readyState)) return markCameraReady(),
|
|
116
|
+
existingStream;
|
|
117
|
+
}, [ enableVideo, getStream, markCameraReady, onVideoStream ]), requestMediaStream = useCallback(() => __awaiter(void 0, void 0, void 0, function*() {
|
|
115
118
|
try {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
return yield navigator.mediaDevices.getUserMedia(constraints);
|
|
120
|
+
} catch (error) {
|
|
121
|
+
if (!(error instanceof DOMException && "OverconstrainedError" === error.name || error instanceof DOMException && "NotFoundError" === error.name)) throw error;
|
|
122
|
+
return yield navigator.mediaDevices.getUserMedia({
|
|
123
|
+
video: !0,
|
|
124
|
+
audio: !0
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}), [ constraints ]), attachStreamToVideo = useCallback(stream => __awaiter(void 0, void 0, void 0, function*() {
|
|
128
|
+
const audioTrack = stream.getAudioTracks()[0], videoTrack = stream.getVideoTracks()[0], devices = yield getMediaDevices();
|
|
129
|
+
if (!videoTrack) {
|
|
130
|
+
null == onNoVideo || onNoVideo("No video track available");
|
|
131
|
+
for (const track of stream.getTracks()) track.stop();
|
|
132
|
+
return new Error("No video track available");
|
|
133
|
+
}
|
|
134
|
+
return audioTrack || null == onNoAudio || onNoAudio("No audio track available"),
|
|
135
|
+
audioTrack && (audioTrack.enabled = !startAudioMuted), videoElement.current ? (videoElement.current.srcObject = stream,
|
|
136
|
+
yield videoElement.current.play(), null == onVideoStream || onVideoStream(stream),
|
|
137
|
+
setDeviceList(devices), markCameraReady(), stream) : new Error("Video element not found");
|
|
138
|
+
}), [ getMediaDevices, markCameraReady, onNoAudio, onNoVideo, onVideoStream, startAudioMuted ]), startCamera = useCallback(() => __awaiter(void 0, void 0, void 0, function*() {
|
|
139
|
+
if (!videoElement.current) return new Error("Video element not found");
|
|
140
|
+
if (!hasMediaSupport) return setCameraSupport(!1), setCameraError("Camera not supported"),
|
|
141
|
+
new Error("Camera not supported");
|
|
142
|
+
const existingStream = reuseExistingStream();
|
|
143
|
+
if (existingStream) return existingStream;
|
|
144
|
+
try {
|
|
145
|
+
const stream = yield requestMediaStream();
|
|
146
|
+
return yield attachStreamToVideo(stream);
|
|
137
147
|
} catch (error) {
|
|
138
148
|
const defaultError = new Error("Could not access the camera. Ensure permissions are correct"), resolvedError = error instanceof Error ? error : defaultError;
|
|
139
149
|
return null == onNoVideo || onNoVideo(resolvedError), null == onNoAudio || onNoAudio(resolvedError),
|
|
140
150
|
setCameraSupport(!0), setCameraError(resolvedError.message), setCameraOn(!1), resolvedError;
|
|
141
151
|
}
|
|
142
|
-
}), [
|
|
152
|
+
}), [ attachStreamToVideo, hasMediaSupport, onNoAudio, onNoVideo, requestMediaStream, reuseExistingStream ]), toggleVideo = useCallback(() => __awaiter(void 0, void 0, void 0, function*() {
|
|
143
153
|
const stream = getStream();
|
|
144
154
|
if (!stream) return yield startCamera();
|
|
145
155
|
const videoTrack = stream.getVideoTracks()[0];
|
|
@@ -194,9 +204,7 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
194
204
|
"--camera-height": height,
|
|
195
205
|
"--camera-controls-bg": controlsBg,
|
|
196
206
|
"--camera-controls-transform": setControlBarVisible
|
|
197
|
-
}), [ controlsBg, height, setControlBarVisible, width ])
|
|
198
|
-
controlsTimer.current && clearTimeout(controlsTimer.current), setHovered(!0), controlsTimer.current = setTimeout(() => setHovered(!1), 3e3);
|
|
199
|
-
};
|
|
207
|
+
}), [ controlsBg, height, setControlBarVisible, width ]);
|
|
200
208
|
return useEffect(() => {
|
|
201
209
|
startCameraOff ? stopCamera().then(() => null) : startCamera().then(() => null);
|
|
202
210
|
}, [ startCamera, startCameraOff, stopCamera ]), useEffect(() => () => {
|
|
@@ -209,11 +217,16 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
209
217
|
ref: containerElement,
|
|
210
218
|
className: css_wrapper,
|
|
211
219
|
style: cssVars,
|
|
212
|
-
onMouseEnter:
|
|
220
|
+
onMouseEnter: () => {
|
|
221
|
+
controlsTimer.current && clearTimeout(controlsTimer.current), setHovered(!0), controlsTimer.current = setTimeout(() => setHovered(!1), 3e3);
|
|
222
|
+
},
|
|
213
223
|
onMouseLeave: () => {
|
|
214
224
|
controlsTimer.current && clearTimeout(controlsTimer.current), setHovered(!1);
|
|
215
225
|
},
|
|
216
|
-
onMouseMove:
|
|
226
|
+
onMouseMove: e => {
|
|
227
|
+
hovered || (setHovered(!0), controlsTimer.current && clearTimeout(controlsTimer.current),
|
|
228
|
+
controlsTimer.current = setTimeout(() => setHovered(!1), 3e3));
|
|
229
|
+
},
|
|
217
230
|
children: [ pipSnapshot && snapshot && jsxs("div", {
|
|
218
231
|
className: css_snapshotFrame,
|
|
219
232
|
children: [ jsx("div", {
|
|
@@ -251,11 +264,13 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
251
264
|
children: cameraError
|
|
252
265
|
}), jsxs("div", {
|
|
253
266
|
className: css_controls,
|
|
254
|
-
onMouseEnter:
|
|
255
|
-
controlsTimer.current && clearTimeout(controlsTimer.current),
|
|
267
|
+
onMouseEnter: e => {
|
|
268
|
+
e.stopPropagation(), controlsTimer.current && clearTimeout(controlsTimer.current),
|
|
269
|
+
setHovered(!0);
|
|
256
270
|
},
|
|
257
|
-
onMouseLeave:
|
|
258
|
-
controlsTimer.current && clearTimeout(controlsTimer.current),
|
|
271
|
+
onMouseLeave: e => {
|
|
272
|
+
e.stopPropagation(), controlsTimer.current && clearTimeout(controlsTimer.current),
|
|
273
|
+
controlsTimer.current = setTimeout(() => setHovered(!1), 3e3);
|
|
259
274
|
},
|
|
260
275
|
children: [ jsx("div", {
|
|
261
276
|
className: css_controlsLeft,
|
|
@@ -273,7 +288,7 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
273
288
|
className: css_controlsCenter,
|
|
274
289
|
children: [ jsx(ToolbarButton, {
|
|
275
290
|
icon: "video",
|
|
276
|
-
iconActive: "video",
|
|
291
|
+
iconActive: "video off",
|
|
277
292
|
active: !cameraOn,
|
|
278
293
|
label: cameraOn ? "Video" : "Off",
|
|
279
294
|
onClick: () => {
|
|
@@ -315,7 +330,7 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
315
330
|
/**
|
|
316
331
|
* Custom toolbar button with labels for controlling video / audio / etc.
|
|
317
332
|
*/ function ToolbarButton(props) {
|
|
318
|
-
const {icon: icon, iconActive: iconActive, active: active, label: label, disabled: disabled, onClick: onClick} = props, iconColor = useMemo(() => active ? "var(--core-surface-primary)" : "var(--core-text-special)", [ active ]), labelColor = useMemo(() => active ? "var(--core-text-primary)" : disabled ? "var(--core-text-disabled)" : "var(--core-text-special)", [ active, disabled ]), cssVars = useMemo(() => ({
|
|
333
|
+
const {icon: icon, iconActive: iconActive, active: active, label: label, disabled: disabled, onClick: onClick, onMouseOver: onMouseOver} = props, iconColor = useMemo(() => active ? "var(--core-surface-primary)" : "var(--core-text-special)", [ active ]), labelColor = useMemo(() => active ? "var(--core-text-primary)" : disabled ? "var(--core-text-disabled)" : "var(--core-text-special)", [ active, disabled ]), cssVars = useMemo(() => ({
|
|
319
334
|
"--toolbar-button-size": "56px",
|
|
320
335
|
"--toolbar-button-border": "none",
|
|
321
336
|
"--toolbar-button-bg-color": active ? "var(--core-text-primary)" : "var(--core-surface-primary)",
|
|
@@ -328,6 +343,8 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
328
343
|
role: "button",
|
|
329
344
|
"aria-label": label,
|
|
330
345
|
"aria-disabled": disabled,
|
|
346
|
+
onFocus: onMouseOver,
|
|
347
|
+
onMouseOver: onMouseOver,
|
|
331
348
|
onKeyDown: e => {
|
|
332
349
|
disabled || accessibleKeyDown(e, () => onClick());
|
|
333
350
|
},
|
|
@@ -336,7 +353,7 @@ const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
|
336
353
|
children: [ jsx("div", {
|
|
337
354
|
className: css_buttonIcon,
|
|
338
355
|
children: jsx(Icon, {
|
|
339
|
-
size:
|
|
356
|
+
size: 26,
|
|
340
357
|
name: active ? iconActive : icon,
|
|
341
358
|
strokeColor: iconColor
|
|
342
359
|
})
|
|
@@ -4,7 +4,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo } from "react";
|
|
6
6
|
|
|
7
|
-
import { I as Icon } from "./_types-
|
|
7
|
+
import { I as Icon } from "./_types-CTmvSEX0.mjs";
|
|
8
8
|
|
|
9
9
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@ import { motion } from "motion/react";
|
|
|
6
6
|
|
|
7
7
|
import React, { useRef, useState, useCallback, useEffect, useMemo } from "react";
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { b as cleanString } from "./misc-cg9I7drO.mjs";
|
|
10
10
|
|
|
11
11
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
12
12
|
|
|
@@ -12,7 +12,7 @@ import "../hooks/useWindow.mjs";
|
|
|
12
12
|
|
|
13
13
|
import { useObserveResize } from "../hooks/useObserveResize.mjs";
|
|
14
14
|
|
|
15
|
-
import { p as pointerPosition } from "./misc-
|
|
15
|
+
import { p as pointerPosition } from "./misc-cg9I7drO.mjs";
|
|
16
16
|
|
|
17
17
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
18
18
|
|
|
@@ -4,13 +4,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo } from "react";
|
|
6
6
|
|
|
7
|
-
import { s as setStyle, a as accessibleKeyDown } from "./misc-
|
|
7
|
+
import { s as setStyle, a as accessibleKeyDown } from "./misc-cg9I7drO.mjs";
|
|
8
8
|
|
|
9
|
-
import { F as FileIcon } from "./FileIcon-
|
|
9
|
+
import { F as FileIcon } from "./FileIcon-CC_k5dUW.mjs";
|
|
10
10
|
|
|
11
|
-
import { I as Icon } from "./_types-
|
|
11
|
+
import { I as Icon } from "./_types-CTmvSEX0.mjs";
|
|
12
12
|
|
|
13
|
-
import { P as ProgressIndicator } from "./ProgressIndicator-
|
|
13
|
+
import { P as ProgressIndicator } from "./ProgressIndicator-D2eairZl.mjs";
|
|
14
14
|
|
|
15
15
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
16
16
|
|
|
@@ -14,7 +14,7 @@ import "../hooks/useWindow.mjs";
|
|
|
14
14
|
|
|
15
15
|
import { B as Badge } from "./Badge-DyICxZP2.mjs";
|
|
16
16
|
|
|
17
|
-
import { I as Icon } from "./_types-
|
|
17
|
+
import { I as Icon } from "./_types-CTmvSEX0.mjs";
|
|
18
18
|
|
|
19
19
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
20
20
|
|
|
@@ -10,7 +10,7 @@ import { B as Badge } from "./Badge-DyICxZP2.mjs";
|
|
|
10
10
|
|
|
11
11
|
import { D as Dot } from "./Dot-CLGwQu-i.mjs";
|
|
12
12
|
|
|
13
|
-
import { I as Icon } from "./_types-
|
|
13
|
+
import { I as Icon } from "./_types-CTmvSEX0.mjs";
|
|
14
14
|
|
|
15
15
|
import { T as ToolTipType } from "./sharedTypes-tn9-uJvb.mjs";
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
import React, { useState, useMemo, useEffect, useCallback } from "react";
|
|
6
6
|
|
|
7
|
-
import { a as accessibleKeyDown } from "./misc-
|
|
7
|
+
import { a as accessibleKeyDown } from "./misc-cg9I7drO.mjs";
|
|
8
8
|
|
|
9
9
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
10
10
|
|
|
@@ -8,11 +8,11 @@ import "../theme/colors.mjs";
|
|
|
8
8
|
|
|
9
9
|
import "../hooks/useWindow.mjs";
|
|
10
10
|
|
|
11
|
-
import { B as Button } from "./Button-
|
|
11
|
+
import { B as Button } from "./Button-kXFJmcKv.mjs";
|
|
12
12
|
|
|
13
13
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
14
14
|
|
|
15
|
-
import { F as FileList } from "./FileList-
|
|
15
|
+
import { F as FileList } from "./FileList-Bon537-t.mjs";
|
|
16
16
|
|
|
17
17
|
var css = {
|
|
18
18
|
wrapperBg: "PromptInput-module_wrapperBg__zabZq flexBox-module_columnStart__C7P44",
|
|
@@ -4,9 +4,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
import React, { useState, useEffect, useCallback, useMemo } from "react";
|
|
6
6
|
|
|
7
|
-
import { s as setStyle } from "./misc-
|
|
7
|
+
import { s as setStyle } from "./misc-cg9I7drO.mjs";
|
|
8
8
|
|
|
9
|
-
import { I as Icon } from "./_types-
|
|
9
|
+
import { I as Icon } from "./_types-CTmvSEX0.mjs";
|
|
10
10
|
|
|
11
11
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
import React, { useState, useEffect, useCallback, useMemo } from "react";
|
|
6
6
|
|
|
7
|
-
import { R as RadioButton } from "./RadioButton-
|
|
7
|
+
import { R as RadioButton } from "./RadioButton-_lo_FJ8g.mjs";
|
|
8
8
|
|
|
9
9
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
10
10
|
|