@apple-pie/slice 0.0.3 → 0.0.5
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 +132 -58
- package/dist/cjs/chunks/{Avatar-8-wPWe0V.js → Avatar-z2YcOAoP.js} +1 -1
- package/dist/cjs/chunks/{AvatarGroup-CVKmgBbD.js → AvatarGroup-Cz8369zI.js} +1 -1
- package/dist/cjs/chunks/{Badge-CMapJCij.js → Badge-COSg__VJ.js} +1 -1
- package/dist/cjs/chunks/{UIButton-CH4p-8yq.js → Button-BNXqiA13.js} +30 -35
- package/dist/cjs/chunks/{UIButtonBar-0fHPB0ww.js → ButtonBar-CeDdAOlH.js} +5 -5
- package/dist/cjs/chunks/{UICard-DBDSyT7E.js → Card-Cc_c-S7i.js} +5 -5
- package/dist/cjs/chunks/{CheckBox-7AACxrdZ.js → CheckBox-hTWIPqV_.js} +2 -2
- package/dist/cjs/chunks/{UIChip-kjhvRrOV.js → Chip-CLKVldi4.js} +5 -5
- package/dist/cjs/chunks/{DivInput-BKKJTFeV.js → DivInput-DnY2emt-.js} +2 -2
- package/dist/cjs/chunks/{Dot-Dnr9M9na.js → Dot-B5dO8kSS.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-C6TPsDB-.js → DrggablePanel-BtsURL9o.js} +1 -1
- package/dist/cjs/chunks/{DropDown-D9sf_m2I.js → DropDown-COr9u96t.js} +2 -2
- package/dist/cjs/chunks/{ErrorSummary-Dv44onsV.js → ErrorSummary-BrSHbGpk.js} +1 -1
- package/dist/cjs/chunks/FileIcon-CEMQK_Je.js +132 -0
- package/dist/cjs/chunks/FileList-DWIm4o46.js +163 -0
- package/dist/cjs/chunks/{FlexDiv-DZBpswHV.js → FlexDiv-BHl29ywz.js} +1 -1
- package/dist/cjs/chunks/{Grouper-_kd2nU78.js → Grouper-EyHoeA8w.js} +3 -3
- package/dist/cjs/chunks/{IconButton-BfsPlKTb.js → IconButton-9QZ4eKBZ.js} +4 -4
- package/dist/cjs/chunks/{UILabel-DkBE2AIt.js → Label-DZJ_YDtD.js} +26 -8
- package/dist/cjs/chunks/{Overlay-DwCPvGB5.js → Overlay-DV3C5NDO.js} +1 -1
- package/dist/cjs/chunks/{Pager-CFtZ0IIW.js → Pager-CRjpl1FZ.js} +2 -2
- package/dist/cjs/chunks/{ProgressIndicator-C5oB7Mky.js → ProgressIndicator-BAwAaw58.js} +2 -2
- package/dist/cjs/chunks/PromptInput-DmO8a3oX.js +212 -0
- package/dist/cjs/chunks/{RadioButton-e_y2qiPE.js → RadioButton-DA9YUGEF.js} +2 -2
- package/dist/cjs/chunks/{RadioButtonList-I81UwHmM.js → RadioButtonList-BtsT7GJc.js} +1 -1
- package/dist/cjs/chunks/{Slider-C-gn7Sby.js → Slider-CqrIwn-L.js} +1 -1
- package/dist/cjs/chunks/{TabBar-D3bj4pjj.js → TabBar-WsNlr-aZ.js} +4 -4
- package/dist/cjs/chunks/{TextArea-B1oKK3_b.js → TextArea-BMJWUH2H.js} +3 -3
- package/dist/cjs/chunks/{TextField-CiQdPP5E.js → TextField-mfwz79cD.js} +5 -5
- package/dist/cjs/chunks/{Tip-C2pzExut.js → Tip-Af6FMEDi.js} +2 -2
- package/dist/cjs/chunks/{Toast-DrijUwoL.js → Toast-CxAEOW4z.js} +27 -10
- package/dist/cjs/chunks/{_types-CoWzQFsT.js → _types-BNlHsGMQ.js} +2 -2
- package/dist/cjs/chunks/{utils-CbayehuI.js → utils-BwNacfBU.js} +2 -0
- package/dist/cjs/chunks/windowStore-CPcVHJq6.js +93 -0
- package/dist/cjs/hooks/useKeyboardShortcuts.js +3 -1
- package/dist/cjs/hooks/useObserveTheme.js +14 -8
- package/dist/cjs/hooks/useTrackRenders.js +2 -1
- package/dist/cjs/hooks/useWindow.js +29 -7
- package/dist/cjs/index.js +48 -41
- package/dist/cjs/providers/ThemeProvider.js +6 -3
- package/dist/cjs/stores/window.js +12 -0
- package/dist/cjs/stores.js +6 -0
- package/dist/cjs/theme/type.js +103 -22
- package/dist/cjs/uikit/Avatar.js +1 -1
- package/dist/cjs/uikit/AvatarGroup.js +2 -2
- package/dist/cjs/uikit/Badge.js +1 -1
- package/dist/cjs/uikit/{UIButton.js → Button.js} +8 -8
- package/dist/cjs/uikit/{UIButtonBar.js → ButtonBar.js} +7 -7
- package/dist/cjs/uikit/{UICard.js → Card.js} +4 -4
- package/dist/cjs/uikit/CheckBox.js +3 -3
- package/dist/cjs/uikit/{UIChip.js → Chip.js} +4 -4
- package/dist/cjs/uikit/DivInput.js +2 -2
- package/dist/cjs/uikit/Dot.js +1 -1
- package/dist/cjs/uikit/DraggablePanel.js +2 -2
- package/dist/cjs/uikit/DropDown.js +3 -3
- package/dist/cjs/uikit/ErrorSummary.js +1 -1
- package/dist/cjs/uikit/{UIFileIcon.js → FileIcon.js} +7 -2
- package/dist/cjs/uikit/FileList.js +24 -0
- package/dist/cjs/uikit/FlexDiv.js +1 -1
- package/dist/cjs/uikit/Grouper.js +4 -4
- package/dist/cjs/uikit/Icon.js +2 -2
- package/dist/cjs/uikit/IconButton.js +5 -5
- package/dist/cjs/uikit/{UILabel.js → Label.js} +3 -2
- package/dist/cjs/uikit/Overlay.js +1 -1
- package/dist/cjs/uikit/Pager.js +2 -2
- package/dist/cjs/uikit/Progress.js +1 -1
- package/dist/cjs/uikit/{EditorButtonBar.js → PromptInput.js} +12 -11
- package/dist/cjs/uikit/RadioButton.js +6 -6
- package/dist/cjs/uikit/RadioButtonList.js +7 -7
- package/dist/cjs/uikit/Slider.js +2 -2
- package/dist/cjs/uikit/TabBar.js +6 -6
- package/dist/cjs/uikit/TextArea.js +8 -8
- package/dist/cjs/uikit/Textfield.js +8 -8
- package/dist/cjs/uikit/Tip.js +2 -2
- package/dist/cjs/uikit/Toast.js +3 -3
- package/dist/css/type.module.css +55 -10
- package/dist/esm/chunks/{Avatar-D_muqPrW.js → Avatar-BtkvMV1v.js} +1 -1
- package/dist/esm/chunks/{AvatarGroup-D8Xmrn52.js → AvatarGroup-pbqdS56o.js} +1 -1
- package/dist/esm/chunks/{Badge-PPf5Uvw3.js → Badge-DtxDLSO0.js} +1 -1
- package/dist/esm/chunks/{UIButton-DKx-_O8h.js → Button-BUJkJqdO.js} +30 -35
- package/dist/esm/chunks/{UIButtonBar-BNdA5eVq.js → ButtonBar-Bl0oCxd8.js} +5 -5
- package/dist/esm/chunks/{UICard-Dn5f3wg8.js → Card-Bjk0kgQh.js} +5 -5
- package/dist/esm/chunks/{CheckBox-CswFI0Xc.js → CheckBox-CvkZuSeB.js} +2 -2
- package/dist/esm/chunks/{UIChip-DqnGeVyR.js → Chip-o-YG_HAf.js} +5 -5
- package/dist/esm/chunks/{DivInput-iKFkeU2F.js → DivInput-D6ORPrkT.js} +2 -2
- package/dist/esm/chunks/{Dot-B84UVs2e.js → Dot-BZcEZbnm.js} +1 -1
- package/dist/esm/chunks/{DrggablePanel-CYYwTmFd.js → DrggablePanel-DWrTjXvf.js} +1 -1
- package/dist/esm/chunks/{DropDown-D4t6EhKL.js → DropDown-BDIvYWI-.js} +2 -2
- package/dist/esm/chunks/{ErrorSummary-DhU5SKPt.js → ErrorSummary-DzDnacH0.js} +1 -1
- package/dist/esm/chunks/FileIcon-Cxh-QsYb.js +130 -0
- package/dist/esm/chunks/FileList-yo_u1Kvw.js +161 -0
- package/dist/esm/chunks/{FlexDiv-CmMpORgn.js → FlexDiv-CFyndG99.js} +1 -1
- package/dist/esm/chunks/{Grouper-BbreOXI9.js → Grouper-NJbpaaQG.js} +3 -3
- package/dist/esm/chunks/{IconButton-CguHGkBM.js → IconButton-3m9ugITV.js} +4 -4
- package/dist/esm/chunks/{UILabel-RnbodPCS.js → Label-CgntsR3g.js} +26 -8
- package/dist/esm/chunks/{Overlay-CCBy7n7H.js → Overlay-BolsHW9S.js} +1 -1
- package/dist/esm/chunks/{Pager-BsSti93V.js → Pager-BHLyXq9p.js} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-BVukxMU6.js → ProgressIndicator-uI9BZwBB.js} +2 -2
- package/dist/esm/chunks/PromptInput-C_qj6kGp.js +210 -0
- package/dist/esm/chunks/{RadioButton-B5BxQI0R.js → RadioButton-D8otD_Jj.js} +2 -2
- package/dist/esm/chunks/{RadioButtonList-C2z8McAD.js → RadioButtonList-CtX1j7rO.js} +1 -1
- package/dist/esm/chunks/{Slider-C-PcWqTz.js → Slider-O6UelMjh.js} +1 -1
- package/dist/esm/chunks/{TabBar-BSBcgTbd.js → TabBar-C0NgwRa2.js} +4 -4
- package/dist/esm/chunks/{TextArea-COM0UPo2.js → TextArea-DK0giDGR.js} +3 -3
- package/dist/esm/chunks/{TextField-Bh24bRWs.js → TextField-CQ4XYYNm.js} +5 -5
- package/dist/esm/chunks/{Tip-Ct19Ljul.js → Tip-iFECDhwN.js} +2 -2
- package/dist/esm/chunks/{Toast-BR0oMX6z.js → Toast-ZxMZtbd0.js} +27 -10
- package/dist/esm/chunks/{_types-BaYeLEWK.js → _types-RJ7q8S0B.js} +2 -2
- package/dist/esm/chunks/{utils-BRZK2Drn.js → utils-CZ1LWeN6.js} +2 -0
- package/dist/esm/chunks/windowStore-Cu4W4zJM.js +91 -0
- package/dist/esm/hooks/useKeyboardShortcuts.js +3 -1
- package/dist/esm/hooks/useObserveTheme.js +14 -8
- package/dist/esm/hooks/useTrackRenders.js +2 -1
- package/dist/esm/hooks/useWindow.js +30 -8
- package/dist/esm/index.js +33 -33
- package/dist/esm/providers/ThemeProvider.js +6 -3
- package/dist/esm/stores/window.js +2 -0
- package/dist/esm/stores.js +1 -0
- package/dist/esm/theme/type.js +103 -22
- package/dist/esm/uikit/Avatar.js +1 -1
- package/dist/esm/uikit/AvatarGroup.js +2 -2
- package/dist/esm/uikit/Badge.js +1 -1
- package/dist/esm/uikit/{UIButtonBar.js → Button.js} +8 -8
- package/dist/esm/uikit/{UIButton.js → ButtonBar.js} +7 -7
- package/dist/esm/uikit/{UICard.js → Card.js} +3 -3
- package/dist/esm/uikit/CheckBox.js +3 -3
- package/dist/esm/uikit/{UIChip.js → Chip.js} +3 -3
- package/dist/esm/uikit/DivInput.js +2 -2
- package/dist/esm/uikit/Dot.js +1 -1
- package/dist/esm/uikit/DraggablePanel.js +2 -2
- package/dist/esm/uikit/DropDown.js +3 -3
- package/dist/esm/uikit/ErrorSummary.js +1 -1
- package/dist/esm/uikit/{UIFileIcon.js → FileIcon.js} +2 -1
- package/dist/esm/uikit/FileList.js +18 -0
- package/dist/esm/uikit/FlexDiv.js +1 -1
- package/dist/esm/uikit/Grouper.js +4 -4
- package/dist/esm/uikit/Icon.js +2 -2
- package/dist/esm/uikit/IconButton.js +5 -5
- package/dist/esm/uikit/{UILabel.js → Label.js} +2 -1
- package/dist/esm/uikit/Overlay.js +1 -1
- package/dist/esm/uikit/Pager.js +2 -2
- package/dist/esm/uikit/Progress.js +1 -1
- package/dist/esm/uikit/{EditorButtonBar.js → PromptInput.js} +11 -10
- package/dist/esm/uikit/RadioButton.js +6 -6
- package/dist/esm/uikit/RadioButtonList.js +7 -7
- package/dist/esm/uikit/Slider.js +2 -2
- package/dist/esm/uikit/TabBar.js +6 -6
- package/dist/esm/uikit/TextArea.js +8 -8
- package/dist/esm/uikit/Textfield.js +8 -8
- package/dist/esm/uikit/Tip.js +2 -2
- package/dist/esm/uikit/Toast.js +3 -3
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/types/hooks/useKeyboardShortcuts/useKeyboardShortcuts.d.ts +1 -0
- package/dist/types/hooks/useWindow/useWindow.d.ts +11 -2
- package/dist/types/index.d.ts +17 -21
- package/dist/types/providers/ThemeProvider.d.ts +1 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/window/_types.d.ts +28 -0
- package/dist/types/stores/window/index.d.ts +2 -0
- package/dist/types/stores/window/windowStore.d.ts +17 -0
- package/dist/types/theme/type/types.d.ts +5 -0
- package/dist/types/uikit/{UIButton/UIButton.d.ts → Button/Button.d.ts} +3 -3
- package/dist/types/uikit/{UIButton → Button}/_types.d.ts +3 -3
- package/dist/types/uikit/Button/index.d.ts +2 -0
- package/dist/types/uikit/ButtonBar/ButtonBar.d.ts +2 -0
- package/dist/types/uikit/{UIButtonBar → ButtonBar}/_types.d.ts +2 -2
- package/dist/types/uikit/ButtonBar/index.d.ts +2 -0
- package/dist/types/uikit/Card/Card.d.ts +3 -0
- package/dist/types/uikit/{UICard → Card}/_types.d.ts +2 -2
- package/dist/types/uikit/Card/index.d.ts +2 -0
- package/dist/types/uikit/Chip/Chip.d.ts +3 -0
- package/dist/types/uikit/{UIChip → Chip}/_types.d.ts +2 -2
- package/dist/types/uikit/Chip/index.d.ts +3 -0
- package/dist/types/uikit/FileIcon/FileIcon.d.ts +3 -0
- package/dist/types/uikit/FileIcon/_types.d.ts +27 -0
- package/dist/types/uikit/FileIcon/fileIconRegistry.d.ts +4 -0
- package/dist/types/uikit/FileIcon/index.d.ts +3 -0
- package/dist/types/uikit/FileList/FileList.d.ts +3 -0
- package/dist/types/uikit/FileList/_types.d.ts +23 -0
- package/dist/types/uikit/FileList/index.d.ts +2 -0
- package/dist/types/uikit/Label/Label.d.ts +2 -0
- package/dist/types/uikit/Label/_types.d.ts +16 -0
- package/dist/types/uikit/Label/index.d.ts +2 -0
- package/dist/types/uikit/PromptInput/PromptInput.d.ts +63 -0
- package/dist/types/uikit/PromptInput/_types.d.ts +35 -0
- package/dist/types/uikit/PromptInput/index.d.ts +2 -0
- package/dist/types/uikit/Toast/_types.d.ts +1 -1
- package/dist/types/util/files.d.ts +9 -0
- package/dist/types/util/utils.d.ts +4 -0
- package/package.json +5 -2
- package/dist/cjs/chunks/EditorButtonBar-CUNDgRQd.js +0 -244
- package/dist/cjs/chunks/MessageInput-CiHFo2j8.js +0 -399
- package/dist/cjs/chunks/UIFileIcon-ZrbDIeYz.js +0 -54
- package/dist/cjs/uikit/MessageInput.js +0 -30
- package/dist/esm/chunks/EditorButtonBar-FnMa8Zv2.js +0 -242
- package/dist/esm/chunks/MessageInput-DMHzCwjO.js +0 -397
- package/dist/esm/chunks/UIFileIcon-qGxIPsJJ.js +0 -52
- package/dist/esm/uikit/MessageInput.js +0 -24
- package/dist/types/theme/components/BrandColors.d.ts +0 -1
- package/dist/types/theme/components/ColorTile.d.ts +0 -6
- package/dist/types/theme/components/ColorTileGroup.d.ts +0 -6
- package/dist/types/theme/components/ThemeColors.d.ts +0 -2
- package/dist/types/theme/components/_types.d.ts +0 -15
- package/dist/types/uikit/EditorButtonBar/EditorButtonBar.d.ts +0 -4
- package/dist/types/uikit/EditorButtonBar/_Data.d.ts +0 -12
- package/dist/types/uikit/EditorButtonBar/_types.d.ts +0 -61
- package/dist/types/uikit/EditorButtonBar/index.d.ts +0 -2
- package/dist/types/uikit/MessageInput/ExcerptList/ExcerptList.d.ts +0 -2
- package/dist/types/uikit/MessageInput/ExcerptList/_types.d.ts +0 -15
- package/dist/types/uikit/MessageInput/FileList/FileList.d.ts +0 -2
- package/dist/types/uikit/MessageInput/FileList/_types.d.ts +0 -6
- package/dist/types/uikit/MessageInput/InputField/MessageInput.d.ts +0 -2
- package/dist/types/uikit/MessageInput/InputField/_types.d.ts +0 -39
- package/dist/types/uikit/MessageInput/UserList/UserList.d.ts +0 -5
- package/dist/types/uikit/MessageInput/UserList/_types.d.ts +0 -40
- package/dist/types/uikit/MessageInput/_Data.d.ts +0 -6
- package/dist/types/uikit/MessageInput/_types.d.ts +0 -42
- package/dist/types/uikit/MessageInput/index.d.ts +0 -4
- package/dist/types/uikit/UIButton/index.d.ts +0 -2
- package/dist/types/uikit/UIButtonBar/UIButtonBar.d.ts +0 -2
- package/dist/types/uikit/UIButtonBar/index.d.ts +0 -2
- package/dist/types/uikit/UICard/UICard.d.ts +0 -3
- package/dist/types/uikit/UICard/index.d.ts +0 -2
- package/dist/types/uikit/UIChip/UIChip.d.ts +0 -3
- package/dist/types/uikit/UIChip/index.d.ts +0 -3
- package/dist/types/uikit/UIFileIcon/UIFileIcon.d.ts +0 -3
- package/dist/types/uikit/UIFileIcon/_types.d.ts +0 -19
- package/dist/types/uikit/UIFileIcon/index.d.ts +0 -2
- package/dist/types/uikit/UILabel/UILabel.d.ts +0 -2
- package/dist/types/uikit/UILabel/_types.d.ts +0 -11
- package/dist/types/uikit/UILabel/index.d.ts +0 -2
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import { _ as __rest } from './tslib.es6-0pkUdtrF.js';
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { AnimatePresence } from 'motion/react';
|
|
4
|
-
import { memo, useCallback, useMemo, useState, useEffect, useRef } from 'react';
|
|
5
|
-
import { useTheme } from '../hooks/useTheme.js';
|
|
6
|
-
import '../theme/colors.js';
|
|
7
|
-
import '../hooks/useWindow.js';
|
|
8
|
-
import { U as UIButton } from './UIButton-DKx-_O8h.js';
|
|
9
|
-
import { I as Icon } from './_types-BaYeLEWK.js';
|
|
10
|
-
import { I as IconButton } from './IconButton-CguHGkBM.js';
|
|
11
|
-
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
12
|
-
import { U as UIFileIcon } from './UIFileIcon-qGxIPsJJ.js';
|
|
13
|
-
import { A as Avatar } from './Avatar-D_muqPrW.js';
|
|
14
|
-
|
|
15
|
-
var css_248z$3 = ".flexBox-module_row__PWxbe {\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__27lKK {\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__nJZnW {\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__dHcOU {\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__MP2Xd {\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__Kg8cV {\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__zcmtk {\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__157yI {\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__u2nwI {\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__QWEzl {\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__FxEAv {\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__rf7AV {\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__8-FO- {\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__qyYq- {\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__7GQ5Z {\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__Qtp5G {\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__Ieh9K {\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__0lZ3I {\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__Ar4d3 {\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__6tV1n {\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__I8Q1v {\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_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.ExcerptList-module_excerptList__1tvcr {\n\talign-items: flex-start;\n\twidth: 100%;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n\n.ExcerptList-module_excerptButton__A3ZJh {\n\talign-items: flex-start;\n\tpadding: 10px 16px 14px 12px;\n\tbackground: var(--core-surface-primary);\n\tborder: 1px solid var(--core-outline-primary);\n\tborder-radius: 24px;\n\tmin-height: 48px;\n\tcursor: default;\n}\n\n.ExcerptList-module_icon__E8d4K {\n\theight: 20px;\n\twidth: 20px;\n}\n\n.ExcerptList-module_content__TBPjX {\n\tmax-width: 300px;\n\tpadding: 0px 16px 0px 8px;\n\tgap: 4px;\n}\n\n.ExcerptList-module_label__xv7up {\n\tcolor: var(--core-text-primary);\n\tmax-width: 300px;\n\tline-height: 1.5em;\n\toverflow: hidden;\n\tword-break: normal;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 3;\n\t-webkit-box-orient: vertical;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.ExcerptList-module_type__i9e14 {\n\tpadding-top: 4px;\n\tcolor: var(--core-text-disabled);\n\tgap: 4px;\n}\n\n.ExcerptList-module_typeIcon__WwWEY {\n\theight: 16px;\n\twidth: 16px;\n\toverflow: hidden;\n}\n";
|
|
16
|
-
var css$3 = {"excerptList":"ExcerptList-module_excerptList__1tvcr flexBox-module_rowStart__nJZnW","excerptButton":"ExcerptList-module_excerptButton__A3ZJh flexBox-module_rowStart__nJZnW","icon":"ExcerptList-module_icon__E8d4K flexBox-module_row__PWxbe","content":"ExcerptList-module_content__TBPjX flexBox-module_columnStart__Kg8cV","label":"ExcerptList-module_label__xv7up type-module_body-m-regular__Qtp5G","type":"ExcerptList-module_type__i9e14 flexBox-module_rowStart__nJZnW type-module_body-xs-regular__QWEzl"};
|
|
17
|
-
styleInject(css_248z$3);
|
|
18
|
-
|
|
19
|
-
const ExcerptList = memo(function ExcerptList(props) {
|
|
20
|
-
const { excerpts = [], onChange = () => null, onToolTip = () => null, } = props;
|
|
21
|
-
const theme = useTheme();
|
|
22
|
-
// memo remove file
|
|
23
|
-
const handleRemoveFile = useCallback((content) => {
|
|
24
|
-
const updatedList = excerpts.filter((excerpt) => {
|
|
25
|
-
return content !== excerpt.content;
|
|
26
|
-
});
|
|
27
|
-
onChange(updatedList);
|
|
28
|
-
}, [excerpts, onChange]);
|
|
29
|
-
const excerptItems = useMemo(() => {
|
|
30
|
-
return excerpts.map((excerpt, index) => {
|
|
31
|
-
return (jsxs("div", { className: css$3.excerptButton, children: [jsxs("div", { className: css$3.content, children: [jsxs("div", { className: css$3.type, children: [jsx(Icon, { name: "recent chats", size: 16, strokeColor: theme.current.colors['core-text-disabled'] }), excerpt.docTitle ? excerpt.docTitle : 'Document excerpt'] }), jsx("div", { className: css$3.label, children: excerpt.content })] }), jsx("div", { className: css$3.icon, children: jsx(IconButton, { icon: 'x', hover: false, toggle: false, frameSize: 20, iconSize: 20, onClick: (e) => {
|
|
32
|
-
e.stopPropagation();
|
|
33
|
-
handleRemoveFile(excerpt.content);
|
|
34
|
-
}, tooltip: 'remove excerpt', onToolTip: (tip) => onToolTip(tip) }) })] }, `${excerpt.content}-${index}`));
|
|
35
|
-
});
|
|
36
|
-
}, [excerpts, theme.current.colors, onToolTip, handleRemoveFile]);
|
|
37
|
-
return (jsx("div", { className: css$3.excerptList, onKeyDown: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation(), children: excerptItems }));
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
var UIFileIcons;
|
|
41
|
-
(function (UIFileIcons) {
|
|
42
|
-
UIFileIcons["Pdf"] = "pdf";
|
|
43
|
-
UIFileIcons["Document"] = "document";
|
|
44
|
-
UIFileIcons["Spreadhseet"] = "spreadsheet";
|
|
45
|
-
})(UIFileIcons || (UIFileIcons = {}));
|
|
46
|
-
|
|
47
|
-
var css_248z$2 = ".flexBox-module_row__PWxbe {\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__27lKK {\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__nJZnW {\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__dHcOU {\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__MP2Xd {\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__Kg8cV {\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__zcmtk {\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__157yI {\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__u2nwI {\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__QWEzl {\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__FxEAv {\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__rf7AV {\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__8-FO- {\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__qyYq- {\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__7GQ5Z {\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__Qtp5G {\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__Ieh9K {\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__0lZ3I {\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__Ar4d3 {\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__6tV1n {\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__I8Q1v {\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_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.FileList-module_fileList__uw9o6 {\n\talign-items: flex-start;\n\twidth: 100%;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n\n.FileList-module_fileButton__XnXaN {\n\talign-items: flex-start;\n\tpadding: 10px 16px 14px 12px;\n\tbackground: var(--core-surface-primary);\n\tborder: 1px solid var(--core-outline-primary);\n\tborder-radius: 24px;\n\tmin-height: 48px;\n\tcursor: default;\n}\n\n.FileList-module_icon__fiu9M {\n\theight: 20px;\n\twidth: 20px;\n}\n\n.FileList-module_content__Kb8mh {\n\tmax-width: 300px;\n\tpadding: 0px 16px 0px 8px;\n\tgap: 4px;\n}\n\n.FileList-module_label__hoDXY {\n\tcolor: var(--core-text-primary);\n\tmax-width: 300px;\n\tline-height: 1.5em;\n\toverflow: hidden;\n\tword-break: normal;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 3;\n\t-webkit-box-orient: vertical;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.FileList-module_type__zOO2e {\n\tpadding-top: 4px;\n\tcolor: var(--core-text-disabled);\n\tgap: 4px;\n}\n\n.FileList-module_typeIcon__8SvkW {\n\theight: 16px;\n\twidth: 16px;\n\toverflow: hidden;\n}\n";
|
|
48
|
-
var css$2 = {"fileList":"FileList-module_fileList__uw9o6 flexBox-module_rowStart__nJZnW","fileButton":"FileList-module_fileButton__XnXaN flexBox-module_rowStart__nJZnW","icon":"FileList-module_icon__fiu9M flexBox-module_row__PWxbe","content":"FileList-module_content__Kb8mh flexBox-module_columnStart__Kg8cV","label":"FileList-module_label__hoDXY type-module_body-m-regular__Qtp5G","type":"FileList-module_type__zOO2e flexBox-module_rowStart__nJZnW type-module_body-xs-regular__QWEzl"};
|
|
49
|
-
styleInject(css_248z$2);
|
|
50
|
-
|
|
51
|
-
const FileList = memo(function FileList(props) {
|
|
52
|
-
const { files = [], onChange = () => null, onToolTip = () => null } = props;
|
|
53
|
-
const handleRemoveFile = useCallback((fileName) => {
|
|
54
|
-
const updatedList = files.filter((file) => {
|
|
55
|
-
return file.name !== fileName;
|
|
56
|
-
});
|
|
57
|
-
onChange(updatedList);
|
|
58
|
-
}, [files, onChange]);
|
|
59
|
-
const fileType = useCallback((file) => {
|
|
60
|
-
switch (file.type) {
|
|
61
|
-
case 'text/plain':
|
|
62
|
-
return 'Text file';
|
|
63
|
-
case 'text/html':
|
|
64
|
-
return 'Web HTML file';
|
|
65
|
-
case 'text/csv':
|
|
66
|
-
return 'CSV spread shseet';
|
|
67
|
-
case 'application/pdf':
|
|
68
|
-
return 'PDF document';
|
|
69
|
-
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
|
70
|
-
case 'application/docx':
|
|
71
|
-
return 'Word document';
|
|
72
|
-
default:
|
|
73
|
-
return 'Unknown file type';
|
|
74
|
-
}
|
|
75
|
-
}, []);
|
|
76
|
-
const fileIcon = useCallback((file) => {
|
|
77
|
-
switch (file.type) {
|
|
78
|
-
case 'text/plain':
|
|
79
|
-
case 'text/html':
|
|
80
|
-
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
|
81
|
-
return UIFileIcons.Document;
|
|
82
|
-
case 'text/csv':
|
|
83
|
-
return UIFileIcons.Spreadhseet;
|
|
84
|
-
case 'application/pdf':
|
|
85
|
-
return UIFileIcons.Pdf;
|
|
86
|
-
default:
|
|
87
|
-
return UIFileIcons.Document;
|
|
88
|
-
}
|
|
89
|
-
}, []);
|
|
90
|
-
const handleRemoveClick = useCallback((e, fileName) => {
|
|
91
|
-
e.stopPropagation();
|
|
92
|
-
handleRemoveFile(fileName);
|
|
93
|
-
}, [handleRemoveFile]);
|
|
94
|
-
return (jsx("div", { className: css$2.fileList, children: files.map((file, index) => {
|
|
95
|
-
return (jsxs("div", { className: css$2.fileButton, children: [jsxs("div", { className: css$2.content, children: [jsxs("div", { className: css$2.type, children: [jsx(UIFileIcon, { name: fileIcon(file), size: 18 }), fileType(file)] }), jsx("div", { className: css$2.label, children: file.name })] }), jsx("div", { className: css$2.icon, children: jsx(IconButton, { icon: 'x', hover: false, toggle: false, frameSize: 20, iconSize: 20, onClick: (e) => handleRemoveClick(e, file.name), tooltip: 'remove file', onToolTip: (tip) => onToolTip(tip) }) })] }, `${file.name}-${index}`));
|
|
96
|
-
}) }));
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
var css_248z$1 = ".flexBox-module_row__PWxbe {\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__27lKK {\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__nJZnW {\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__dHcOU {\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__MP2Xd {\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__Kg8cV {\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__zcmtk {\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__157yI {\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__u2nwI {\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__QWEzl {\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__FxEAv {\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__rf7AV {\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__8-FO- {\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__qyYq- {\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__7GQ5Z {\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__Qtp5G {\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__Ieh9K {\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__0lZ3I {\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__Ar4d3 {\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__6tV1n {\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__I8Q1v {\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_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.UserList-module_promptList__M6-D9 {\n\twidth: 100%;\n\tgap: 8px;\n}\n\n@keyframes UserList-module_blink__695OA {\n\t0% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n\n.UserList-module_userPrompt__YyVU5 {\n\talign-items: flex-start;\n\tpadding: 10px 12px;\n\tborder-radius: 24px;\n\tbackground: var(--core-surface-primary);\n\tborder: 1px solid var(--core-outline-primary);\n\tcursor: default;\n}\n\n.UserList-module_avatar__WvAyh {\n\theight: 24px;\n\twidth: 24px;\n}\n\n.UserList-module_prompt__2on5a {\n\tflex: 1;\n\tpadding: 0px 16px 0px 8px;\n\tcolor: var(--core-text-tertiary);\n\tfont-weight: 380;\n\tline-height: 1.5em;\n\tmin-height: 24px;\n}\n\n.UserList-module_promptStrong__-2WPf {\n\tfont-size: inherit;\n\tfont-weight: inherit;\n\tline-height: inherit;\n\tcolor: var(--core-text-primary);\n}\n\n.UserList-module_promptParagraph__L6phk {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.UserList-module_control__iBmvg {\n\tborder-radius: 100%;\n\tborder: 1px solid var(--control-border-color);\n\theight: 24px;\n\twidth: 24px;\n\tcursor: pointer;\n}\n\n.UserList-module_cursor__xmRjh {\n\tdisplay: block;\n\tbackground: var(--cursor-background);\n\tmin-width: 0.5em;\n\tmin-height: 0.5em;\n\twidth: 0.5em;\n\theight: 0.5em;\n\tborder-radius: var(--cursor-border-radius);\n\tanimation: var(--cursor-animation);\n}\n";
|
|
100
|
-
var css$1 = {"promptList":"UserList-module_promptList__M6-D9 flexBox-module_columnStart__Kg8cV","userPrompt":"UserList-module_userPrompt__YyVU5 flexBox-module_rowStart__nJZnW","avatar":"UserList-module_avatar__WvAyh flexBox-module_row__PWxbe","prompt":"UserList-module_prompt__2on5a flexBox-module_rowStart__nJZnW type-module_body-s-regular__8-FO-","promptStrong":"UserList-module_promptStrong__-2WPf","promptParagraph":"UserList-module_promptParagraph__L6phk","control":"UserList-module_control__iBmvg flexBox-module_row__PWxbe","cursor":"UserList-module_cursor__xmRjh"};
|
|
101
|
-
styleInject(css_248z$1);
|
|
102
|
-
|
|
103
|
-
var PrompState;
|
|
104
|
-
(function (PrompState) {
|
|
105
|
-
PrompState["Idle"] = "idle";
|
|
106
|
-
PrompState["Disabled"] = "disabled";
|
|
107
|
-
PrompState["Enabled"] = "enabled";
|
|
108
|
-
})(PrompState || (PrompState = {}));
|
|
109
|
-
var Role$1;
|
|
110
|
-
(function (Role) {
|
|
111
|
-
Role["Owner"] = "owner";
|
|
112
|
-
Role["Editor"] = "editor";
|
|
113
|
-
Role["Viewer"] = "viewer";
|
|
114
|
-
})(Role$1 || (Role$1 = {}));
|
|
115
|
-
|
|
116
|
-
function UserListComponent(props) {
|
|
117
|
-
const theme = useTheme();
|
|
118
|
-
const { userPresence = [], onTogglePrompt = () => null, owner = '', currentUser = '', presenceID = '', } = props;
|
|
119
|
-
const [userList, setUserList] = useState(userPresence);
|
|
120
|
-
useEffect(() => setUserList(userPresence), [userPresence]);
|
|
121
|
-
const handleTogglePrompt = useCallback((user) => {
|
|
122
|
-
if (currentUser !== owner)
|
|
123
|
-
return;
|
|
124
|
-
let promptState = PrompState.Disabled;
|
|
125
|
-
if (user.promptState) {
|
|
126
|
-
promptState =
|
|
127
|
-
user.promptState === PrompState.Disabled
|
|
128
|
-
? PrompState.Enabled
|
|
129
|
-
: PrompState.Disabled;
|
|
130
|
-
}
|
|
131
|
-
const presenceUpdate = Object.assign(Object.assign({}, user), { promptState });
|
|
132
|
-
onTogglePrompt(presenceUpdate);
|
|
133
|
-
}, [currentUser, owner, onTogglePrompt]);
|
|
134
|
-
const getCssVars = useCallback((enabled) => ({
|
|
135
|
-
'--control-border-color': enabled
|
|
136
|
-
? theme.current.colors['core-outline-primary']
|
|
137
|
-
: theme.current.colors['feedback-warning'],
|
|
138
|
-
'--cursor-background': enabled
|
|
139
|
-
? theme.current.colors['core-icon-primary']
|
|
140
|
-
: theme.current.colors['feedback-warning'],
|
|
141
|
-
'--cursor-border-radius': enabled ? '100px' : '2px',
|
|
142
|
-
'--cursor-animation': enabled ? 'blink 2s infinite' : 'none',
|
|
143
|
-
}), [theme.current.colors]);
|
|
144
|
-
const renderedUserList = useMemo(() => userList.map((user, index) => {
|
|
145
|
-
if (user.id === presenceID)
|
|
146
|
-
return null;
|
|
147
|
-
if (!user.promptContent || user.promptContent === '')
|
|
148
|
-
return null;
|
|
149
|
-
const enabled = user.promptState !== PrompState.Disabled;
|
|
150
|
-
const cssVars = getCssVars(enabled);
|
|
151
|
-
return (jsxs("div", { className: css$1.userPrompt, onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), children: [jsx("div", { className: css$1.avatar, children: jsx(Avatar, { size: 20, first: user.first, last: user.last, image: user.avatar, bgColor: user.bgColor, color: user.color, border: 0 }) }), jsx("div", { className: css$1.prompt, children: jsxs("p", { className: css$1.promptParagraph, children: [jsxs("strong", { className: css$1.promptStrong, children: [user.first, ":"] }), ' ', user.promptContent] }) }), currentUser === owner &&
|
|
152
|
-
currentUser !== user.email &&
|
|
153
|
-
user.promptContent !== '' && (jsx("div", { className: css$1.control, style: cssVars, role: 'button', "aria-label": 'Stop/Play', onKeyDown: () => handleTogglePrompt(user), onClick: () => handleTogglePrompt(user), tabIndex: 0, children: jsx("span", { className: css$1.cursor }) }))] }, `${user.email}-${index}`));
|
|
154
|
-
}), [userList, presenceID, currentUser, owner, getCssVars, handleTogglePrompt]);
|
|
155
|
-
return jsx("div", { className: css$1.promptList, children: renderedUserList });
|
|
156
|
-
}
|
|
157
|
-
const UserList = memo(UserListComponent);
|
|
158
|
-
|
|
159
|
-
var PromptType;
|
|
160
|
-
(function (PromptType) {
|
|
161
|
-
PromptType[PromptType["none"] = -1] = "none";
|
|
162
|
-
PromptType[PromptType["text"] = 0] = "text";
|
|
163
|
-
PromptType[PromptType["expand"] = 1] = "expand";
|
|
164
|
-
PromptType[PromptType["summarize"] = 2] = "summarize";
|
|
165
|
-
PromptType[PromptType["research"] = 3] = "research";
|
|
166
|
-
PromptType[PromptType["translate"] = 4] = "translate";
|
|
167
|
-
PromptType[PromptType["shorten"] = 5] = "shorten";
|
|
168
|
-
PromptType[PromptType["file"] = 6] = "file";
|
|
169
|
-
PromptType[PromptType["compliance"] = 7] = "compliance";
|
|
170
|
-
})(PromptType || (PromptType = {}));
|
|
171
|
-
var Role;
|
|
172
|
-
(function (Role) {
|
|
173
|
-
Role["USER"] = "user";
|
|
174
|
-
Role["ASSISTANT"] = "assistant";
|
|
175
|
-
Role["TOOL"] = "tool";
|
|
176
|
-
Role["SYSTEM"] = "system";
|
|
177
|
-
})(Role || (Role = {}));
|
|
178
|
-
|
|
179
|
-
var css_248z = ".flexBox-module_row__PWxbe {\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__27lKK {\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__nJZnW {\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__dHcOU {\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__MP2Xd {\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__Kg8cV {\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__zcmtk {\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__157yI {\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__u2nwI {\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__QWEzl {\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__FxEAv {\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__rf7AV {\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__8-FO- {\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__qyYq- {\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__7GQ5Z {\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__Qtp5G {\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__Ieh9K {\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__0lZ3I {\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__Ar4d3 {\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__6tV1n {\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__I8Q1v {\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_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.MessageInput-module_wrapper__CDukE {\n\talign-self: center;\n\twidth: 100%;\n\tmin-width: 300px;\n\toverflow: visible;\n\toverflow-y: hidden;\n\tpadding: var(--wrapper-padding);\n\tborder-radius: 16px;\n\tbackground: var(--core-surface-primary);\n\tbox-shadow: var(--wrapper-shadow);\n\toutline: none;\n\ttransition: all 0.3s ease-in-out 0s;\n}\n\n.MessageInput-module_wrapper__CDukE.MessageInput-module_focused__DTxPV {\n\tbox-shadow: var(--wrapper-shadow-focused);\n}\n\n.MessageInput-module_textarea__p5ot8 {\n\twidth: 100%;\n\toverflow-y: hidden;\n\tresize: none;\n\tborder: 0;\n\toutline: none;\n\tcolor: var(--core-text-primary);\n\tbackground: transparent;\n\tpadding: 0 0 5px;\n}\n\n.MessageInput-module_textarea__p5ot8::placeholder {\n\tcolor: var(--core-text-disabled);\n}\n\n.MessageInput-module_buttonRow__cbSNm {\n\twidth: 100%;\n\tpadding: 0;\n}\n\n.MessageInput-module_actionButtons__mtfoV {\n\tcolor: var(--core-text-disabled);\n\tz-index: 1;\n\tgap: 12px;\n}\n\n.MessageInput-module_send__UksvP {\n\tposition: relative;\n}\n\n.MessageInput-module_inputWrapper__sB-l0 {\n\talign-items: flex-end;\n\twidth: 100%;\n\tpadding: var(--input-wrapper-padding);\n}\n";
|
|
180
|
-
var css = {"wrapper":"MessageInput-module_wrapper__CDukE flexBox-module_columnEnd__u2nwI","textarea":"MessageInput-module_textarea__p5ot8 type-module_body-m-regular__Qtp5G","buttonRow":"MessageInput-module_buttonRow__cbSNm flexBox-module_rowBetween__27lKK","actionButtons":"MessageInput-module_actionButtons__mtfoV flexBox-module_row__PWxbe type-module_body-m-regular__Qtp5G","send":"MessageInput-module_send__UksvP flexBox-module_row__PWxbe","inputWrapper":"MessageInput-module_inputWrapper__sB-l0 flexBox-module_columnEnd__u2nwI"};
|
|
181
|
-
styleInject(css_248z);
|
|
182
|
-
|
|
183
|
-
function MessageInput(props) {
|
|
184
|
-
var _a, _b, _c, _d;
|
|
185
|
-
const { maxHeight = 300, focused = false, error = null, value = '', placeholder = 'Ask me anytning HR compliance', isStreaming = false, isFetching = false, isShort = true, jurisdiction = null, files = [], excerpts = [], users = [], currentUser, presenceID, owner, jurisdictionClick = () => null, attachClick = () => null, onChangeFiles = () => null, onChangeExcerpts = () => null, onTogglePrompt = () => null, onChange = () => null, onBlur = () => null, onFocus = () => null, onStop = () => null, onSend = () => null, onToolTip = () => null } = props, divAttributes = __rest(props, ["maxHeight", "focused", "error", "value", "placeholder", "isStreaming", "isFetching", "isShort", "jurisdiction", "files", "excerpts", "users", "currentUser", "presenceID", "owner", "jurisdictionClick", "attachClick", "onChangeFiles", "onChangeExcerpts", "onTogglePrompt", "onChange", "onBlur", "onFocus", "onStop", "onSend", "onToolTip"]);
|
|
186
|
-
const { id: divId, className, style } = divAttributes, rest = __rest(divAttributes, ["id", "className", "style"]);
|
|
187
|
-
const divStyle = style !== null && style !== void 0 ? style : {};
|
|
188
|
-
const divClass = className ? ` ${className}` : '';
|
|
189
|
-
const theme = useTheme();
|
|
190
|
-
const ref = useRef(null);
|
|
191
|
-
const wrapperRef = useRef(null);
|
|
192
|
-
const [message, setMessage] = useState(value);
|
|
193
|
-
const [isFocused, setIsFocused] = useState(focused);
|
|
194
|
-
const [promptType, setPromptType] = useState(PromptType.text);
|
|
195
|
-
const [invalid, setInvalid] = useState(error);
|
|
196
|
-
const [remoteDisabled, setRemoteDisabled] = useState(false);
|
|
197
|
-
// reset size if the wrapper size changes
|
|
198
|
-
useEffect(() => {
|
|
199
|
-
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
|
200
|
-
ref.current.style.height = '0px';
|
|
201
|
-
ref.current.style.height = `${Math.min(ref.current.scrollHeight, maxHeight)}px`;
|
|
202
|
-
}
|
|
203
|
-
}, [maxHeight]);
|
|
204
|
-
// reset the message text of the active document is changed
|
|
205
|
-
useEffect(() => setMessage(value), [value]);
|
|
206
|
-
// enable setting focus byt changing the focus prop
|
|
207
|
-
useEffect(() => {
|
|
208
|
-
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
|
209
|
-
if (focused)
|
|
210
|
-
ref.current.focus();
|
|
211
|
-
else
|
|
212
|
-
ref.current.blur();
|
|
213
|
-
setIsFocused(focused);
|
|
214
|
-
}
|
|
215
|
-
}, [focused]);
|
|
216
|
-
// disabled prompt if remote owner disabled the user
|
|
217
|
-
useEffect(() => {
|
|
218
|
-
if (users.length > 0) {
|
|
219
|
-
const myPresensce = users.filter((user) => {
|
|
220
|
-
return user.email === currentUser;
|
|
221
|
-
});
|
|
222
|
-
if (myPresensce && myPresensce.length > 0) {
|
|
223
|
-
setRemoteDisabled(myPresensce[0].promptState === PrompState.Disabled);
|
|
224
|
-
}
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
setRemoteDisabled(false);
|
|
228
|
-
}, [users, currentUser]);
|
|
229
|
-
// update error is prop changes
|
|
230
|
-
useEffect(() => setInvalid(error), [error]);
|
|
231
|
-
const resetHeight = useCallback(() => {
|
|
232
|
-
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
|
233
|
-
ref.current.style.height = '0px';
|
|
234
|
-
ref.current.style.height = `${Math.min(ref.current.scrollHeight, maxHeight)}px`;
|
|
235
|
-
}
|
|
236
|
-
}, [maxHeight]);
|
|
237
|
-
const doSubmit = useCallback((e) => {
|
|
238
|
-
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
239
|
-
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
240
|
-
onToolTip(null);
|
|
241
|
-
if (message !== '' && ref.current) {
|
|
242
|
-
const newMessage = {
|
|
243
|
-
id: crypto.randomUUID(),
|
|
244
|
-
content: message,
|
|
245
|
-
timestamp: new Date().toISOString(),
|
|
246
|
-
promptType,
|
|
247
|
-
role: Role.USER,
|
|
248
|
-
htmlContent: '',
|
|
249
|
-
files,
|
|
250
|
-
excerpts,
|
|
251
|
-
done: false,
|
|
252
|
-
};
|
|
253
|
-
onSend(newMessage);
|
|
254
|
-
setMessage('');
|
|
255
|
-
onChange('');
|
|
256
|
-
resetHeight();
|
|
257
|
-
setIsFocused(false);
|
|
258
|
-
ref.current.blur();
|
|
259
|
-
ref.current.value = '';
|
|
260
|
-
}
|
|
261
|
-
}, [
|
|
262
|
-
message,
|
|
263
|
-
promptType,
|
|
264
|
-
files,
|
|
265
|
-
excerpts,
|
|
266
|
-
onSend,
|
|
267
|
-
onChange,
|
|
268
|
-
resetHeight,
|
|
269
|
-
onToolTip,
|
|
270
|
-
]);
|
|
271
|
-
const handleKeyDown = useCallback((e) => {
|
|
272
|
-
if (!e.shiftKey && e.key === 'Enter' && message !== '')
|
|
273
|
-
doSubmit(e);
|
|
274
|
-
else
|
|
275
|
-
return;
|
|
276
|
-
}, [message, doSubmit]);
|
|
277
|
-
const setFocus = useCallback(() => {
|
|
278
|
-
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
|
279
|
-
ref.current.focus();
|
|
280
|
-
setIsFocused(true);
|
|
281
|
-
onFocus();
|
|
282
|
-
}
|
|
283
|
-
}, [onFocus]);
|
|
284
|
-
const setBlur = useCallback(() => {
|
|
285
|
-
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
|
286
|
-
ref.current.blur();
|
|
287
|
-
setIsFocused(false);
|
|
288
|
-
onBlur();
|
|
289
|
-
}
|
|
290
|
-
}, [onBlur]);
|
|
291
|
-
const setDisabled = useCallback(() => {
|
|
292
|
-
if (remoteDisabled)
|
|
293
|
-
return 'disabled';
|
|
294
|
-
if (isStreaming)
|
|
295
|
-
return 'normal';
|
|
296
|
-
if (!isStreaming && files.length > 0)
|
|
297
|
-
return 'normal';
|
|
298
|
-
if (invalid && invalid !== '')
|
|
299
|
-
return 'disabled';
|
|
300
|
-
if (!isStreaming && isFetching)
|
|
301
|
-
return 'disabled';
|
|
302
|
-
if (!isStreaming && message === '')
|
|
303
|
-
return 'disabled';
|
|
304
|
-
return 'normal';
|
|
305
|
-
}, [remoteDisabled, isStreaming, files.length, invalid, isFetching, message]);
|
|
306
|
-
const iconColor = useCallback(() => {
|
|
307
|
-
var _a, _b, _c, _d;
|
|
308
|
-
if (isFetching || isStreaming) {
|
|
309
|
-
if (theme.current.name === 'lightMode')
|
|
310
|
-
return (_a = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _a === void 0 ? void 0 : _a['core-text-light'];
|
|
311
|
-
return (_b = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _b === void 0 ? void 0 : _b['core-surface-primary'];
|
|
312
|
-
}
|
|
313
|
-
if (message === '') {
|
|
314
|
-
return (_c = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _c === void 0 ? void 0 : _c['core-surface-secondary'];
|
|
315
|
-
}
|
|
316
|
-
return (_d = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _d === void 0 ? void 0 : _d['core-text-light'];
|
|
317
|
-
}, [
|
|
318
|
-
isFetching,
|
|
319
|
-
isStreaming,
|
|
320
|
-
theme.current.name,
|
|
321
|
-
theme === null || theme === void 0 ? void 0 : theme.current.colors,
|
|
322
|
-
message,
|
|
323
|
-
]);
|
|
324
|
-
const handleUpload = useCallback((e, type) => {
|
|
325
|
-
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
326
|
-
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
327
|
-
setPromptType(type);
|
|
328
|
-
attachClick(e);
|
|
329
|
-
}, [attachClick]);
|
|
330
|
-
const handleChange = useCallback((input) => {
|
|
331
|
-
if (message !== input)
|
|
332
|
-
onChange(input);
|
|
333
|
-
setMessage(input);
|
|
334
|
-
}, [message, onChange]);
|
|
335
|
-
const handleStop = useCallback((e) => {
|
|
336
|
-
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
337
|
-
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
338
|
-
onToolTip(null);
|
|
339
|
-
setBlur();
|
|
340
|
-
onStop();
|
|
341
|
-
}, [onToolTip, setBlur, onStop]);
|
|
342
|
-
const working = useCallback(() => {
|
|
343
|
-
if (isStreaming)
|
|
344
|
-
return false;
|
|
345
|
-
if (isFetching)
|
|
346
|
-
return true;
|
|
347
|
-
return false;
|
|
348
|
-
}, [isStreaming, isFetching]);
|
|
349
|
-
const toolTip = useCallback(() => {
|
|
350
|
-
if (isStreaming)
|
|
351
|
-
return 'Stop';
|
|
352
|
-
if (isFetching)
|
|
353
|
-
return 'Working ...';
|
|
354
|
-
return 'Send';
|
|
355
|
-
}, [isStreaming, isFetching]);
|
|
356
|
-
const setJurisdiction = useCallback(() => {
|
|
357
|
-
const country = jurisdiction === null || jurisdiction === void 0 ? void 0 : jurisdiction.country;
|
|
358
|
-
const state = jurisdiction === null || jurisdiction === void 0 ? void 0 : jurisdiction.state;
|
|
359
|
-
if (!country || country === 'None')
|
|
360
|
-
return 'None';
|
|
361
|
-
if (state !== 'None')
|
|
362
|
-
return state;
|
|
363
|
-
return country;
|
|
364
|
-
}, [jurisdiction === null || jurisdiction === void 0 ? void 0 : jurisdiction.country, jurisdiction === null || jurisdiction === void 0 ? void 0 : jurisdiction.state]);
|
|
365
|
-
// memo css vars
|
|
366
|
-
const cssVars = useMemo(() => {
|
|
367
|
-
const shadowValue = isShort ? 0 : 1;
|
|
368
|
-
return {
|
|
369
|
-
'--wrapper-padding': isShort
|
|
370
|
-
? '16px 12px 8px 16px'
|
|
371
|
-
: '16px 12px 16px 16px',
|
|
372
|
-
'--wrapper-shadow': `0 0 1px ${shadowValue}px transparent`,
|
|
373
|
-
// biome-ignore lint/style/noUnusedTemplateLiteral: <explanation>
|
|
374
|
-
'--wrapper-shadow-focused': `0 0 1px 2px var(--core-outline-special)`,
|
|
375
|
-
'--input-wrapper-padding': isShort
|
|
376
|
-
? '4px 4px 0px 4px'
|
|
377
|
-
: '4px 4px 16px 4px',
|
|
378
|
-
};
|
|
379
|
-
}, [isShort]);
|
|
380
|
-
const wrapperClassName = [css.wrapper, isFocused ? 'focused' : '']
|
|
381
|
-
.filter(Boolean)
|
|
382
|
-
.join(' ');
|
|
383
|
-
return (jsxs("div", Object.assign({ id: divId, className: `${wrapperClassName}${divClass}`, style: Object.assign(Object.assign({}, divStyle), cssVars), onKeyDown: () => null, onClick: () => {
|
|
384
|
-
if (!isFocused)
|
|
385
|
-
setFocus();
|
|
386
|
-
}, ref: wrapperRef }, rest, { children: [jsx(AnimatePresence, { initial: false, children: excerpts.length > 0 && (jsx(ExcerptList, { excerpts: excerpts, onChange: (excerpts) => onChangeExcerpts(excerpts), onToolTip: (tip) => onToolTip(tip) })) }), jsx(AnimatePresence, { initial: false, children: files.length > 0 && (jsx(FileList, { files: files, onChange: (items) => onChangeFiles(items), onToolTip: (tip) => onToolTip(tip) })) }), jsx("div", { className: css.inputWrapper, style: cssVars, children: jsx("textarea", { id: 'messageInput', name: 'messageInput', className: css.textarea, ref: ref, value: message, onChange: ({ target }) => handleChange(target.value), onInput: () => resetHeight(), onKeyDown: (e) => handleKeyDown(e), placeholder: placeholder, disabled: isStreaming, onFocus: () => setFocus(), onBlur: () => setBlur(), rows: 1 }) }), jsx(AnimatePresence, { initial: false, children: users.length > 0 && (jsx(UserList, { userPresence: users, owner: owner, currentUser: currentUser, presenceID: presenceID, onTogglePrompt: (presence) => onTogglePrompt(presence), onToolTip: (tip) => onToolTip(tip) })) }), jsxs("div", { className: css.buttonRow, children: [jsxs("div", { className: css.actionButtons, children: [jsx(UIButton, { variant: 'outline', iconLeft: 'plus', tooltip: 'Attach file', onClick: (e) => handleUpload(e, PromptType.file), size: 'medium', iconColor: theme.current.colors['core-icon-primary'], round: true, onToolTip: (tip) => onToolTip(tip) }), jsx(UIButton, { paddingRight: 18, paddingLeft: 8, variant: 'outline', label: `Focus: ${setJurisdiction()}`, tooltip: 'Jurisdication Focus', onClick: (_e) => jurisdictionClick(), iconLeft: 'focus', size: 'medium', iconColor: theme.current.colors['core-icon-primary'], labelColor: (_a = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _a === void 0 ? void 0 : _a['core-text-secondary'], onToolTip: (tip) => onToolTip(tip) })] }), jsx("div", { className: css.send, children: jsx(UIButton, { variant: 'solid', iconLeft: isStreaming ? 'stop' : 'arrow up', bgColorDisabled: (_b = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _b === void 0 ? void 0 : _b['core-badge-secondary'], bgColor: isFetching || isStreaming
|
|
387
|
-
? (_c = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _c === void 0 ? void 0 : _c['core-text-primary']
|
|
388
|
-
: (_d = theme === null || theme === void 0 ? void 0 : theme.current.colors) === null || _d === void 0 ? void 0 : _d['core-button-primary'], iconColor: iconColor(), state: setDisabled(), size: 'medium', progress: true, working: working(), round: true, onClick: (e) => {
|
|
389
|
-
if (isStreaming)
|
|
390
|
-
handleStop(e);
|
|
391
|
-
if (isFetching)
|
|
392
|
-
return;
|
|
393
|
-
doSubmit(e);
|
|
394
|
-
}, tooltip: toolTip(), onToolTip: (tip) => onToolTip(tip) }) })] })] })));
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export { MessageInput as M };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { _ as __rest } from './tslib.es6-0pkUdtrF.js';
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import React, { useCallback, useMemo } from 'react';
|
|
4
|
-
import { useTheme } from '../hooks/useTheme.js';
|
|
5
|
-
import '../theme/colors.js';
|
|
6
|
-
import '../hooks/useWindow.js';
|
|
7
|
-
|
|
8
|
-
const UIFileIcon = React.memo((props) => {
|
|
9
|
-
var _a, _b;
|
|
10
|
-
const { name = 'document', size = 20, pointer = false, disabled = false, onClick = () => null } = props, svgAttributes = __rest(props, ["name", "size", "pointer", "disabled", "onClick"]);
|
|
11
|
-
const { id: svgId, className, style } = svgAttributes, rest = __rest(svgAttributes, ["id", "className", "style"]);
|
|
12
|
-
const theme = useTheme();
|
|
13
|
-
const handleKeyDown = useCallback((e) => {
|
|
14
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
onClick(e);
|
|
17
|
-
}
|
|
18
|
-
}, [onClick]);
|
|
19
|
-
const FileIcon = useMemo(() => {
|
|
20
|
-
return [
|
|
21
|
-
{
|
|
22
|
-
name: 'pdf',
|
|
23
|
-
icon: (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", style: {
|
|
24
|
-
cursor: disabled ? 'default' : pointer ? 'pointer' : 'inherit',
|
|
25
|
-
}, onClick: (e) => onClick(e), onKeyDown: handleKeyDown, tabIndex: pointer ? 0 : -1, fill: "none", role: "img", "aria-label": "PDF document icon", children: [jsx("title", { children: "PDF document" }), jsx("path", { d: "M 4.5 19 L 15.5 19 C 16.328 19 17 18.328 17 17.5 L 17 5 L 14.5 5 C 13.672 5 13 4.328 13 3.5 L 13 1 L 4.5 1 C 3.672 1 3 1.672 3 2.5 L 3 17.5 C 3 18.328 3.672 19 4.5 19 Z", fill: "rgb(250,15,0)" }), jsx("path", { d: "M 5.516 9.416 L 7.237 9.416 C 7.485 9.416 7.7 9.464 7.884 9.56 C 8.068 9.654 8.21 9.788 8.309 9.96 C 8.409 10.133 8.458 10.334 8.458 10.563 C 8.458 10.79 8.408 10.99 8.309 11.164 C 8.209 11.338 8.067 11.474 7.882 11.572 C 7.682 11.673 7.461 11.723 7.237 11.718 L 6.502 11.718 L 6.502 13 L 5.516 13 Z M 7.069 10.932 C 7.175 10.937 7.278 10.902 7.359 10.834 C 7.432 10.764 7.471 10.665 7.467 10.564 C 7.467 10.446 7.431 10.357 7.359 10.294 C 7.277 10.229 7.174 10.196 7.069 10.202 L 6.502 10.202 L 6.502 10.932 Z M 8.836 9.416 L 10.248 9.416 C 10.618 9.416 10.941 9.489 11.214 9.636 C 11.489 9.781 11.701 9.988 11.849 10.258 C 11.997 10.527 12.071 10.843 12.071 11.208 C 12.071 11.573 11.997 11.89 11.849 12.16 C 11.704 12.426 11.483 12.643 11.214 12.783 C 10.915 12.934 10.583 13.008 10.248 13 L 8.836 13 Z M 10.223 12.214 C 10.389 12.214 10.533 12.174 10.653 12.097 C 10.778 12.013 10.875 11.894 10.931 11.755 C 11 11.581 11.034 11.395 11.029 11.208 C 11.034 11.022 11.001 10.837 10.931 10.664 C 10.875 10.524 10.778 10.403 10.653 10.319 C 10.524 10.239 10.375 10.198 10.223 10.202 L 9.823 10.202 L 9.823 12.214 Z M 12.53 9.416 L 15.182 9.416 L 15.182 10.202 L 13.517 10.202 L 13.517 10.759 L 14.715 10.759 L 14.715 11.545 L 13.517 11.545 L 13.517 13 L 12.53 13 Z", fill: theme.current.colors['core-icon-light'] }), jsx("path", { d: "M 13 1 L 15 3 L 17 5 L 14 5 C 13.448 5 13 4.552 13 4 Z", fill: theme.current.coreColors['brand-purple-300'] })] })),
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'spreadsheet',
|
|
29
|
-
icon: (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", style: {
|
|
30
|
-
cursor: disabled ? 'default' : pointer ? 'pointer' : 'inherit',
|
|
31
|
-
}, onClick: (e) => onClick(e), onKeyDown: handleKeyDown, tabIndex: pointer ? 0 : -1, fill: "none", role: "img", "aria-label": "Spreadsheet document icon", children: [jsx("title", { children: "Spreadsheet document" }), jsx("path", { d: "M 4.5 19 L 15.5 19 C 16.328 19 17 18.328 17 17.5 L 17 5 L 14.5 5 C 13.672 5 13 4.328 13 3.5 L 13 1 L 4.5 1 C 3.672 1 3 1.672 3 2.5 L 3 17.5 C 3 18.328 3.672 19 4.5 19 Z", fill: theme.current.coreColors['brand-land-700'] }), jsx("path", { d: "M 5 8 L 11 8 L 11 9.5 L 5 9.5 Z M 12 8 L 15 8 L 15 9.5 L 12 9.5 Z M 5 11 L 11 11 L 11 12.5 L 5 12.5 Z M 12 11 L 15 11 L 15 12.5 L 12 12.5 Z M 5 14 L 11 14 L 11 15.5 L 5 15.5 Z M 12 14 L 15 14 L 15 15.5 L 12 15.5 Z", fill: theme.current.colors['core-icon-light'] }), jsx("path", { d: "M 13 1 L 15 3 L 17 5 L 14 5 C 13.448 5 13 4.552 13 4 Z", fill: theme.current.coreColors['brand-purple-300'] })] })),
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'document',
|
|
35
|
-
icon: (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", style: {
|
|
36
|
-
cursor: disabled ? 'default' : pointer ? 'pointer' : 'inherit',
|
|
37
|
-
}, onClick: (e) => onClick(e), onKeyDown: handleKeyDown, tabIndex: pointer ? 0 : -1, fill: "none", role: "img", "aria-label": "Document icon", children: [jsx("title", { children: "Document" }), jsx("path", { d: "M 4.5 19 L 15.5 19 C 16.328 19 17 18.328 17 17.5 L 17 5 L 14.5 5 C 13.672 5 13 4.328 13 3.5 L 13 1 L 4.5 1 C 3.672 1 3 1.672 3 2.5 L 3 17.5 C 3 18.328 3.672 19 4.5 19 Z", fill: theme.current.colors['core-badge-primary'] }), jsx("path", { d: "M 6 14 L 14 14 M 6 10 L 12 10", fill: "transparent", strokeWidth: "1.5", stroke: theme.current.colors['core-icon-light'], strokeMiterlimit: "10", strokeDasharray: "" }), jsx("path", { d: "M 13 1 L 15 3 L 17 5 L 14 5 C 13.448 5 13 4.552 13 4 Z", fill: theme.current.coreColors['brand-purple-300'] })] })),
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
}, [size, disabled, onClick, pointer, theme, handleKeyDown]);
|
|
41
|
-
// get the right icon in the array
|
|
42
|
-
const svgElement = FileIcon.filter((icon) => {
|
|
43
|
-
return icon.name.toLowerCase() === name.toLowerCase();
|
|
44
|
-
});
|
|
45
|
-
if (svgElement.length > 0) {
|
|
46
|
-
const iconNode = svgElement[0].icon;
|
|
47
|
-
return React.cloneElement(iconNode, Object.assign({ id: svgId, className, style: Object.assign(Object.assign({}, (style !== null && style !== void 0 ? style : {})), ((_b = (_a = iconNode.props) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {})), onClick: (e) => onClick(e) }, rest));
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
export { UIFileIcon as U };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export { M as MessageInput } from '../chunks/MessageInput-DMHzCwjO.js';
|
|
2
|
-
import '../chunks/tslib.es6-0pkUdtrF.js';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'motion/react';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../hooks/useTheme.js';
|
|
7
|
-
import '../theme/themes.js';
|
|
8
|
-
import '../theme/colors.js';
|
|
9
|
-
import '../theme/corners.js';
|
|
10
|
-
import '../theme/elevations.js';
|
|
11
|
-
import '../theme/type.js';
|
|
12
|
-
import '../hooks/useObserveTheme.js';
|
|
13
|
-
import '../hooks/useWindow.js';
|
|
14
|
-
import '../chunks/UIButton-DKx-_O8h.js';
|
|
15
|
-
import '../chunks/Badge-PPf5Uvw3.js';
|
|
16
|
-
import '../chunks/style-inject.es-tgCJW-Cu.js';
|
|
17
|
-
import '../chunks/Dot-B84UVs2e.js';
|
|
18
|
-
import '../chunks/_types-BaYeLEWK.js';
|
|
19
|
-
import '../chunks/utils-BRZK2Drn.js';
|
|
20
|
-
import '../chunks/ProgressIndicator-BVukxMU6.js';
|
|
21
|
-
import '../chunks/sharedTypes-BfZzG1KX.js';
|
|
22
|
-
import '../chunks/IconButton-CguHGkBM.js';
|
|
23
|
-
import '../chunks/UIFileIcon-qGxIPsJJ.js';
|
|
24
|
-
import '../chunks/Avatar-D_muqPrW.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function BrandColors(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ToolTip } from '../../uikit/sharedTypes';
|
|
2
|
-
import type { SliceTheme } from '../themes';
|
|
3
|
-
export interface ColorTileProps {
|
|
4
|
-
token?: string;
|
|
5
|
-
core?: string;
|
|
6
|
-
hex?: string;
|
|
7
|
-
width?: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
onCopy?: (token: string, hex: string) => void;
|
|
10
|
-
onTooltip?: (tip: ToolTip | null) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface ColorTileGroupProps {
|
|
13
|
-
pattern?: string | string[];
|
|
14
|
-
theme?: SliceTheme;
|
|
15
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { EditorButtonBarProps, RenderGroupProps } from './_types';
|
|
3
|
-
export declare const EditorButtonBar: React.MemoExoticComponent<(props: EditorButtonBarProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
-
export declare const RenderGroup: React.MemoExoticComponent<(props: RenderGroupProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { DropDownOption } from '../DropDown';
|
|
2
|
-
import { type ButtonBarButton, type ButtonBarGroup, type EditControls } from './_types';
|
|
3
|
-
export declare const coreButtons: {
|
|
4
|
-
[key: string]: ButtonBarButton;
|
|
5
|
-
};
|
|
6
|
-
export declare const styles: DropDownOption[];
|
|
7
|
-
export declare const buttonGroups: {
|
|
8
|
-
[key: string]: ButtonBarGroup;
|
|
9
|
-
};
|
|
10
|
-
export declare const editControls: {
|
|
11
|
-
[key: string]: EditControls;
|
|
12
|
-
};
|