@apple-pie/slice 0.1.21 → 0.1.23
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 +25 -1
- package/dist/cjs/chunks/AudioBubble-v4xKclI8.js +54 -0
- package/dist/cjs/chunks/{Button-DXvjvGtY.js → Button-DmWbooXb.js} +1 -1
- package/dist/cjs/chunks/{ButtonBar-BZ6sme27.js → ButtonBar-RSBwFaU-.js} +1 -1
- package/dist/cjs/chunks/{Camera-rVC4KI4v.js → Camera-CLm3aQR8.js} +6 -2
- package/dist/cjs/chunks/{CheckBox-DQRLqTAK.js → CheckBox-DDINn56u.js} +1 -1
- package/dist/cjs/chunks/{Chip-Pv9-KTnh.js → Chip-DRSg6kLh.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-CkhCXqKv.js → DrggablePanel-CERavfv3.js} +6 -2
- package/dist/cjs/chunks/{DropDown-C3AZ5b_b.js → DropDown-CJH-Y6Z5.js} +1 -1
- package/dist/cjs/chunks/{ErrorSummary-BTgAd3sK.js → ErrorSummary-BfVHS893.js} +6 -2
- package/dist/cjs/chunks/{FileIcon-CZLe2S2l.js → FileIcon-xoD-xIme.js} +2 -2
- package/dist/cjs/chunks/{FileList-BHwBIics.js → FileList-DjTXjXnK.js} +1 -1
- package/dist/cjs/chunks/{Grouper-D4yyHHkM.js → Grouper-RYRxazG9.js} +1 -1
- package/dist/cjs/chunks/{Icon-D1EB8S5r.js → Icon-BB-t50Yt.js} +6 -2
- package/dist/cjs/chunks/{IconButton-B07Ttxbr.js → IconButton-BUw3YUsI.js} +1 -1
- package/dist/cjs/chunks/{Label-CTzvGcds.js → Label-NzMpkZo2.js} +1 -1
- package/dist/cjs/chunks/MdStreamBuffer-DObxjnAm.js +381 -0
- package/dist/cjs/chunks/{ProgressIndicator-BGqIwycX.js → ProgressIndicator-8QZwTSyY.js} +9 -4
- package/dist/cjs/chunks/{PromptInput-z6TuhHsG.js → PromptInput-D1wP5-uN.js} +2 -2
- package/dist/cjs/chunks/{RadioButton-DuIsM4lu.js → RadioButton-Cvqum7dU.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-bu11ILyw.js → RadioButtonList-CPHTioGa.js} +1 -1
- package/dist/cjs/chunks/{TabBar-Bcq_n4Mk.js → TabBar-CnD3E-qa.js} +1 -1
- package/dist/cjs/chunks/{TextArea-BSKbDOEt.js → TextArea-rWqDDui3.js} +6 -6
- package/dist/cjs/chunks/{TextField-BNacOZVx.js → TextField-C6U-qhDt.js} +20 -22
- package/dist/cjs/chunks/{Toast-CZzAWG0S.js → Toast-D2fpwdjF.js} +6 -2
- package/dist/cjs/chunks/{UploadArea-CKuE4rtg.js → UploadArea-BS2BPuhZ.js} +1 -1
- package/dist/cjs/chunks/audioVisualizer-EIfIjWH7.js +60 -0
- package/dist/cjs/components/AudioBubble/index.js +10 -0
- package/dist/cjs/components/Button/index.js +4 -4
- package/dist/cjs/components/ButtonBar/index.js +2 -2
- package/dist/cjs/components/Camera/index.js +4 -4
- package/dist/cjs/components/CheckBox/index.js +2 -2
- package/dist/cjs/components/Chip/index.js +2 -2
- package/dist/cjs/components/DraggablePanel/index.js +3 -3
- package/dist/cjs/components/DropDown/index.js +2 -2
- package/dist/cjs/components/ErrorSummary/index.js +2 -2
- package/dist/cjs/components/FileIcon/index.js +3 -4
- package/dist/cjs/components/FileList/index.js +4 -4
- package/dist/cjs/components/Grouper/index.js +2 -2
- package/dist/cjs/components/Icon/index.js +3 -3
- package/dist/cjs/components/IconButton/index.js +4 -4
- package/dist/cjs/components/Label/index.js +1 -1
- package/dist/cjs/components/Progress/index.js +5 -5
- package/dist/cjs/components/PromptInput/index.js +7 -7
- 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 +5 -5
- package/dist/cjs/hooks/useAudioRecorder.js +70 -0
- package/dist/cjs/hooks/useMdStreamBuffer.js +41 -0
- package/dist/cjs/hooks/useMicrophone.js +132 -0
- package/dist/cjs/hooks.js +4 -2
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/utils/index.js +2 -1
- package/dist/cjs/utils/objects/index.js +2 -1
- package/dist/esm/chunks/AudioBubble-Dvsrq1dZ.mjs +62 -0
- package/dist/esm/chunks/{Avatar-CSLVUF_y.mjs → Avatar-C8uV7ROZ.mjs} +2 -2
- package/dist/esm/chunks/{AvatarGroup--ELW-bO1.mjs → AvatarGroup-Bt1Lkn5S.mjs} +2 -2
- package/dist/esm/chunks/{Badge-DyICxZP2.mjs → Badge-D-U1jomY.mjs} +1 -1
- package/dist/esm/chunks/{Button-daLv0i7S.mjs → Button-sEYjFcR2.mjs} +5 -5
- package/dist/esm/chunks/{ButtonBar-DXK8meQq.mjs → ButtonBar-DSR2lhhN.mjs} +3 -3
- package/dist/esm/chunks/{Camera-BqmVsVKy.mjs → Camera-DSSiOeJd.mjs} +6 -6
- package/dist/esm/chunks/{CheckBox-BsaYFNC6.mjs → CheckBox-B6zWSySW.mjs} +3 -3
- package/dist/esm/chunks/{Chip-BRZeD1OX.mjs → Chip-BBKJ6wG4.mjs} +3 -3
- package/dist/esm/chunks/{DivInput-DeSpC8Wm.mjs → DivInput-cIMIH07H.mjs} +2 -2
- package/dist/esm/chunks/{Dot-CLGwQu-i.mjs → Dot-Cj6gWj4_.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-Ddi0vPRp.mjs → DrggablePanel-CQcIbxpX.mjs} +3 -3
- package/dist/esm/chunks/{DropDown-DOJvg96J.mjs → DropDown-B98ZoY1x.mjs} +3 -3
- package/dist/esm/chunks/{ErrorSummary-CHLkvdHk.mjs → ErrorSummary-Mz9siVxm.mjs} +3 -3
- package/dist/esm/chunks/{FileIcon-ePouoJpT.mjs → FileIcon-DeW-ZBiv.mjs} +3 -3
- package/dist/esm/chunks/{FileList-5LElsgoE.mjs → FileList-0Dzx15hl.mjs} +5 -5
- package/dist/esm/chunks/{Grouper-DR14qDXP.mjs → Grouper-B04WxD6K.mjs} +3 -3
- package/dist/esm/chunks/{Icon-CUSQtytG.mjs → Icon-KDwlMXzH.mjs} +3 -3
- package/dist/esm/chunks/{IconButton-DG69Vlhj.mjs → IconButton-oAB8ZFTf.mjs} +4 -4
- package/dist/esm/chunks/{IndexedDB-CJgzPHPB.mjs → IndexedDB-Dk7a4fPS.mjs} +1 -1
- package/dist/esm/chunks/{Label-CRsE7o3D.mjs → Label-BD7VlTDw.mjs} +3 -3
- package/dist/esm/chunks/MdStreamBuffer-DNXE4XbN.mjs +381 -0
- package/dist/esm/chunks/{Overlay-TOzZXnwF.mjs → Overlay-3KkyDm1f.mjs} +1 -1
- package/dist/esm/chunks/{Pager-BYT7_mCb.mjs → Pager-DmiwYLl5.mjs} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-D7paCpgY.mjs → ProgressIndicator-CxsZm_As.mjs} +6 -5
- package/dist/esm/chunks/{PromptInput-CpxUcInZ.mjs → PromptInput-D4Q-DWjz.mjs} +4 -2
- package/dist/esm/chunks/{RadioButton-B5ZF5oJ_.mjs → RadioButton-B0jvM5VW.mjs} +3 -3
- package/dist/esm/chunks/{RadioButtonList-D9ZAZgkK.mjs → RadioButtonList-DBRAv87_.mjs} +3 -3
- package/dist/esm/chunks/{Slider-DL2iuNlh.mjs → Slider-CONGTXUE.mjs} +2 -2
- package/dist/esm/chunks/{Spacer-BlgEdKEM.mjs → Spacer-C5fcJYq-.mjs} +1 -1
- package/dist/esm/chunks/{Switch-BhCOo5Lu.mjs → Switch-CyoaJwSX.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-BK7OcjPl.mjs → TabBar-DmO1ixBz.mjs} +4 -4
- package/dist/esm/chunks/{TextArea-BmsEj6IA.mjs → TextArea-Bd_obSSH.mjs} +7 -7
- package/dist/esm/chunks/{TextField-DWPpevsj.mjs → TextField-CZnUNhFe.mjs} +20 -26
- package/dist/esm/chunks/{Tip-BnKB9qMi.mjs → Tip-DrQvxDsH.mjs} +2 -2
- package/dist/esm/chunks/{Toast-DPHLwDES.mjs → Toast-C5XSDgno.mjs} +4 -4
- package/dist/esm/chunks/{UploadArea-DPiOaNpc.mjs → UploadArea-Gpq-MhqB.mjs} +4 -4
- package/dist/esm/chunks/{WSConnection-D9mpsVdc.mjs → WSConnection-DV7k84B4.mjs} +1 -1
- package/dist/esm/chunks/{_types-CPrEyJX9.mjs → _types-DOQAaLqq.mjs} +1 -1
- package/dist/esm/chunks/audioVisualizer-ZgT77nUw.mjs +60 -0
- package/dist/esm/chunks/{localDBStore-B4jkR5Jx.mjs → localDBStore-Dnpo5nSv.mjs} +2 -2
- package/dist/esm/chunks/{misc-N8KLjOXc.mjs → misc-BeEWwOaJ.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-2JIpEKfz.mjs → sseStore-DjrfpNAS.mjs} +1 -1
- package/dist/esm/chunks/{tslib.es6-c-7TIv71.mjs → tslib.es6-C-olHjXV.mjs} +1 -1
- package/dist/esm/chunks/{uploads-worker-Dv-4zGnC.mjs → uploads-worker-7X9EwX9N.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-D69fEXMY.mjs → uploadsStore-B7VECR5Q.mjs} +1 -1
- package/dist/esm/chunks/{windowStore-BOTh1g37.mjs → windowStore-CAzx2-QV.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +31 -0
- package/dist/esm/components/Avatar/index.mjs +3 -3
- package/dist/esm/components/AvatarGroup/index.mjs +4 -4
- package/dist/esm/components/Badge/index.mjs +2 -2
- package/dist/esm/components/Button/index.mjs +8 -8
- package/dist/esm/components/ButtonBar/index.mjs +4 -4
- package/dist/esm/components/Camera/index.mjs +7 -7
- package/dist/esm/components/CheckBox/index.mjs +4 -4
- package/dist/esm/components/Chip/index.mjs +4 -4
- package/dist/esm/components/DivInput/index.mjs +3 -3
- package/dist/esm/components/Dot/index.mjs +2 -2
- package/dist/esm/components/DraggablePanel/index.mjs +4 -4
- package/dist/esm/components/DropDown/index.mjs +4 -4
- package/dist/esm/components/ErrorSummary/index.mjs +4 -4
- package/dist/esm/components/FileIcon/index.mjs +4 -4
- package/dist/esm/components/FileList/index.mjs +6 -6
- package/dist/esm/components/FlexDiv/index.mjs +2 -2
- package/dist/esm/components/Grouper/index.mjs +5 -5
- package/dist/esm/components/Icon/index.mjs +4 -4
- package/dist/esm/components/IconButton/index.mjs +7 -7
- package/dist/esm/components/Label/index.mjs +3 -3
- package/dist/esm/components/Overlay/index.mjs +2 -2
- package/dist/esm/components/Pager/index.mjs +3 -3
- package/dist/esm/components/Progress/index.mjs +5 -5
- package/dist/esm/components/PromptInput/index.mjs +11 -11
- package/dist/esm/components/RadioButton/index.mjs +4 -4
- package/dist/esm/components/RadioButtonList/index.mjs +5 -5
- package/dist/esm/components/Slider/index.mjs +3 -3
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -2
- package/dist/esm/components/TabBar/index.mjs +7 -7
- package/dist/esm/components/TextArea/index.mjs +9 -9
- package/dist/esm/components/Textfield/index.mjs +10 -10
- package/dist/esm/components/Tip/index.mjs +3 -3
- package/dist/esm/components/Toast/index.mjs +5 -5
- package/dist/esm/components/UploadArea/index.mjs +7 -7
- package/dist/esm/hooks/useAudioRecorder.mjs +74 -0
- package/dist/esm/hooks/useMdStreamBuffer.mjs +42 -0
- package/dist/esm/hooks/useMicrophone.mjs +134 -0
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +10 -0
- package/dist/esm/index.mjs +51 -39
- package/dist/esm/stores/LocalDB.mjs +3 -3
- package/dist/esm/stores/SSE.mjs +2 -2
- package/dist/esm/stores/WS.mjs +2 -2
- package/dist/esm/stores/uploads.mjs +3 -3
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +7 -7
- package/dist/esm/utils/index.mjs +8 -4
- package/dist/esm/utils/objects/index.mjs +7 -3
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/types/components/AudioBubble/AudioBubble.d.ts +3 -0
- package/dist/types/components/AudioBubble/_types.d.ts +18 -0
- package/dist/types/components/AudioBubble/index.d.ts +2 -0
- package/dist/types/components/Textfield/_types.d.ts +1 -3
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/hooks/useAudioRecorder/useAudioRecorder.d.ts +14 -0
- package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.d.ts +10 -0
- package/dist/types/hooks/useMicrophone/useMicrophone.d.ts +19 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +63 -0
- package/dist/types/utils/objects/MDStreamBuffer/_defaults.d.ts +3 -0
- package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +25 -0
- package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +86 -0
- package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +11 -0
- package/dist/types/utils/objects/audioVisualizer/audioVisualizer.d.ts +40 -0
- package/dist/types/utils/objects/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const DEFAULT_WATCHED_MARKERS = [ {
|
|
4
|
+
name: "fenced code block",
|
|
5
|
+
open: "```",
|
|
6
|
+
close: "```"
|
|
7
|
+
}, {
|
|
8
|
+
name: "bold",
|
|
9
|
+
open: "**",
|
|
10
|
+
close: "**"
|
|
11
|
+
}, {
|
|
12
|
+
name: "double underscore emphasis",
|
|
13
|
+
open: "__",
|
|
14
|
+
close: "__"
|
|
15
|
+
}, {
|
|
16
|
+
name: "strikethrough",
|
|
17
|
+
open: "~~",
|
|
18
|
+
close: "~~"
|
|
19
|
+
}, {
|
|
20
|
+
name: "inline code",
|
|
21
|
+
open: "`",
|
|
22
|
+
close: "`"
|
|
23
|
+
}, {
|
|
24
|
+
name: "italic",
|
|
25
|
+
open: "*",
|
|
26
|
+
close: "*"
|
|
27
|
+
}, {
|
|
28
|
+
name: "underscore emphasis",
|
|
29
|
+
open: "_",
|
|
30
|
+
close: "_"
|
|
31
|
+
}, {
|
|
32
|
+
name: "heading - ie #, ##, etc.",
|
|
33
|
+
open: "",
|
|
34
|
+
close: "\n",
|
|
35
|
+
mode: "line",
|
|
36
|
+
linePattern: /^#{1,6}\s+\S.*/,
|
|
37
|
+
partialLinePattern: /^#{1,6}\s*$/
|
|
38
|
+
}, {
|
|
39
|
+
name: "blockquote",
|
|
40
|
+
open: "",
|
|
41
|
+
close: "\n",
|
|
42
|
+
mode: "line",
|
|
43
|
+
linePattern: /^>\s+\S.*/,
|
|
44
|
+
partialLinePattern: /^>\s*$/
|
|
45
|
+
}, {
|
|
46
|
+
name: 'horizontal rule with "-"',
|
|
47
|
+
open: "",
|
|
48
|
+
close: "\n",
|
|
49
|
+
mode: "line",
|
|
50
|
+
linePattern: /^-{3,}\s*$/,
|
|
51
|
+
partialLinePattern: /^-{1,2}\s*$/
|
|
52
|
+
}, {
|
|
53
|
+
name: "task list",
|
|
54
|
+
open: "",
|
|
55
|
+
close: "\n",
|
|
56
|
+
mode: "line",
|
|
57
|
+
linePattern: /^[-*+]\s+\[(?: |x|X)\]\s+\S.*/,
|
|
58
|
+
partialLinePattern: /^[-*+]\s+\[(?:\s|x|X)?\]?\s*$/
|
|
59
|
+
}, {
|
|
60
|
+
name: 'unordered list "-"',
|
|
61
|
+
open: "",
|
|
62
|
+
close: "\n",
|
|
63
|
+
mode: "line",
|
|
64
|
+
linePattern: /^-\s+\S.*/,
|
|
65
|
+
partialLinePattern: /^-\s*$/
|
|
66
|
+
}, {
|
|
67
|
+
name: 'unordered list with "*"',
|
|
68
|
+
open: "",
|
|
69
|
+
close: "\n",
|
|
70
|
+
mode: "line",
|
|
71
|
+
linePattern: /^\*\s+\S.*/,
|
|
72
|
+
partialLinePattern: /^\*\s*$/
|
|
73
|
+
}, {
|
|
74
|
+
name: 'unordered list with "+"',
|
|
75
|
+
open: "",
|
|
76
|
+
close: "\n",
|
|
77
|
+
mode: "line",
|
|
78
|
+
linePattern: /^\+\s+\S.*/,
|
|
79
|
+
partialLinePattern: /^\+\s*$/
|
|
80
|
+
}, {
|
|
81
|
+
name: "ordered list",
|
|
82
|
+
open: "",
|
|
83
|
+
close: "\n",
|
|
84
|
+
mode: "line",
|
|
85
|
+
linePattern: /^\d+\.\s+\S.*/,
|
|
86
|
+
partialLinePattern: /^\d+\.\s*$/
|
|
87
|
+
} ];
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Buffer streamed Markdown and emit parser-safe snapshots on animation frames.
|
|
91
|
+
*/ function isEscaped(value, index) {
|
|
92
|
+
let slashCount = 0;
|
|
93
|
+
for (let cursor = index - 1; cursor >= 0 && "\\" === value[cursor]; cursor -= 1) slashCount += 1;
|
|
94
|
+
return slashCount % 2 != 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function isStarListMarker(value, index) {
|
|
98
|
+
return (0 === index || "\n" === value[index - 1]) && " " === value[index + 1];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function getRepeatedTokenCharacter(token) {
|
|
102
|
+
return 0 === token.length ? null : token.split("").every(character => character === token[0]) ? token[0] : null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function countTrailingRepeatedCharacter(value, character) {
|
|
106
|
+
let count = 0;
|
|
107
|
+
for (let index = value.length - 1; index >= 0 && value[index] === character; index -= 1) count += 1;
|
|
108
|
+
return count;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function shouldIgnoreSymmetricToken(value, token, index) {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
if (!token.includes("_")) return !1;
|
|
114
|
+
const previousCharacter = null !== (_a = value[index - 1]) && void 0 !== _a ? _a : "", nextCharacter = null !== (_b = value[index + token.length]) && void 0 !== _b ? _b : "";
|
|
115
|
+
return isWordCharacter(previousCharacter) || isWordCharacter(nextCharacter);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function isWordCharacter(value) {
|
|
119
|
+
return /[A-Za-z0-9]/.test(value);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function findLastUnmatchedSymmetricOpen(value, token) {
|
|
123
|
+
let occurrenceCount = 0, lastIndex = -1;
|
|
124
|
+
for (let index = 0; index <= value.length - token.length; index += 1) isEscaped(value, index) || value.slice(index, index + token.length) === token && (shouldIgnoreSymmetricToken(value, token, index) || (occurrenceCount += 1,
|
|
125
|
+
lastIndex = index, index += token.length - 1));
|
|
126
|
+
return occurrenceCount % 2 == 0 ? -1 : lastIndex;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function hasMeaningfulInlineContent(value, repeatedCharacter) {
|
|
130
|
+
if (0 === value.trim().length) return !1;
|
|
131
|
+
if (!repeatedCharacter) return !0;
|
|
132
|
+
return value.replaceAll(repeatedCharacter, "").trim().length > 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
exports.MdBuffer = class {
|
|
136
|
+
constructor(options) {
|
|
137
|
+
var _a, _b, _c, _d, _e, rules;
|
|
138
|
+
this.committedRaw = "", this.activeRaw = "", this.frameHandle = null, this.completeSignal = !1,
|
|
139
|
+
this.endOfStreamToken = null == options ? void 0 : options.endOfStreamToken, this.htmlHandling = null !== (_a = null == options ? void 0 : options.htmlHandling) && void 0 !== _a ? _a : "ignore",
|
|
140
|
+
this.includeLinksAndImages = null !== (_b = null == options ? void 0 : options.includeLinksAndImages) && void 0 !== _b && _b,
|
|
141
|
+
this.onFlush = null == options ? void 0 : options.onFlush, this.requestFrame = null !== (_c = null == options ? void 0 : options.requestFrame) && void 0 !== _c ? _c : function() {
|
|
142
|
+
if ("undefined" != typeof globalThis && "function" == typeof globalThis.requestAnimationFrame) return globalThis.requestAnimationFrame.bind(globalThis);
|
|
143
|
+
return callback => globalThis.setTimeout(() => callback(Date.now()), 16);
|
|
144
|
+
}(), this.cancelFrame = null !== (_d = null == options ? void 0 : options.cancelFrame) && void 0 !== _d ? _d : function() {
|
|
145
|
+
if ("undefined" != typeof globalThis && "function" == typeof globalThis.cancelAnimationFrame) return globalThis.cancelAnimationFrame.bind(globalThis);
|
|
146
|
+
return handle => globalThis.clearTimeout(handle);
|
|
147
|
+
}(), this.watchedMarkers = (rules = null !== (_e = null == options ? void 0 : options.watchedMarkers) && void 0 !== _e ? _e : DEFAULT_WATCHED_MARKERS,
|
|
148
|
+
[ ...rules ].sort((left, right) => right.open.length - left.open.length));
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The raw Markdown accumulated so far.
|
|
152
|
+
*/ get raw() {
|
|
153
|
+
return `${this.committedRaw}${this.activeRaw}`;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The current parser-safe preview derived from the raw buffer.
|
|
157
|
+
*/ get healthy() {
|
|
158
|
+
return this.buildHealthyOutput();
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Append a streamed Markdown token and schedule a frame flush.
|
|
162
|
+
*/ append(chunk) {
|
|
163
|
+
const eosSnapshot = this.handleEndOfStreamToken(chunk);
|
|
164
|
+
if (eosSnapshot) return eosSnapshot;
|
|
165
|
+
chunk && (this.activeRaw += chunk, this.commitStableLines(), this.scheduleFlush());
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Emit the current snapshot immediately.
|
|
169
|
+
*/ flush(reason = "manual") {
|
|
170
|
+
var _a;
|
|
171
|
+
const snapshot = {
|
|
172
|
+
raw: this.committedRaw + this.activeRaw,
|
|
173
|
+
healthy: this.buildHealthyOutput(),
|
|
174
|
+
reason: reason,
|
|
175
|
+
isComplete: this.completeSignal
|
|
176
|
+
};
|
|
177
|
+
return null === (_a = this.onFlush) || void 0 === _a || _a.call(this, snapshot),
|
|
178
|
+
snapshot;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Mark the stream as complete and flush one final snapshot.
|
|
182
|
+
*/ complete() {
|
|
183
|
+
return null !== this.frameHandle && (this.cancelFrame(this.frameHandle), this.frameHandle = null),
|
|
184
|
+
this.completeSignal = !0, this.flush("complete");
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Clear the buffered state and cancel any pending frame.
|
|
188
|
+
*/ reset() {
|
|
189
|
+
null !== this.frameHandle && (this.cancelFrame(this.frameHandle), this.frameHandle = null),
|
|
190
|
+
this.committedRaw = "", this.activeRaw = "", this.completeSignal = !1;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Cancel future work and release the retained state.
|
|
194
|
+
*/ dispose() {
|
|
195
|
+
this.reset();
|
|
196
|
+
}
|
|
197
|
+
handleEndOfStreamToken(chunk) {
|
|
198
|
+
if (!this.endOfStreamToken) return null;
|
|
199
|
+
if (!chunk.includes(this.endOfStreamToken)) return null;
|
|
200
|
+
const [beforeToken] = chunk.split(this.endOfStreamToken);
|
|
201
|
+
beforeToken && (this.activeRaw += beforeToken, this.commitStableLines());
|
|
202
|
+
const snapshot = this.complete();
|
|
203
|
+
return this.dispose(), snapshot;
|
|
204
|
+
}
|
|
205
|
+
scheduleFlush() {
|
|
206
|
+
null === this.frameHandle && (this.frameHandle = this.requestFrame(() => {
|
|
207
|
+
this.frameHandle = null, this.flush("raf");
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
commitStableLines() {
|
|
211
|
+
if (this.buildHealthyTail(this.activeRaw) !== this.activeRaw) return;
|
|
212
|
+
const lastNewlineIndex = this.activeRaw.lastIndexOf("\n");
|
|
213
|
+
if (-1 === lastNewlineIndex) return;
|
|
214
|
+
const stablePrefix = this.activeRaw.slice(0, lastNewlineIndex + 1);
|
|
215
|
+
this.committedRaw += stablePrefix, this.activeRaw = this.activeRaw.slice(lastNewlineIndex + 1);
|
|
216
|
+
}
|
|
217
|
+
buildHealthyOutput() {
|
|
218
|
+
return `${this.committedRaw}${this.buildHealthyTail(this.activeRaw)}`;
|
|
219
|
+
}
|
|
220
|
+
buildHealthyTail(value) {
|
|
221
|
+
const withHtmlHandling = "strip" === this.htmlHandling ? function(value) {
|
|
222
|
+
let stripped = value.replaceAll(/<\/?[a-zA-Z][^>]*>/g, "");
|
|
223
|
+
const lastOpenTag = stripped.lastIndexOf("<"), lastCloseBracket = stripped.lastIndexOf(">");
|
|
224
|
+
if (lastOpenTag > lastCloseBracket) {
|
|
225
|
+
const trailingSegment = stripped.slice(lastOpenTag);
|
|
226
|
+
/^<\/?[a-zA-Z][^>]*$/.test(trailingSegment) && (stripped = stripped.slice(0, lastOpenTag));
|
|
227
|
+
}
|
|
228
|
+
return stripped;
|
|
229
|
+
}(value) : value, withLinksAndImages = this.includeLinksAndImages ? this.closeLinksAndImages(withHtmlHandling) : withHtmlHandling;
|
|
230
|
+
return this.closeInlineMarkdown(withLinksAndImages);
|
|
231
|
+
}
|
|
232
|
+
closeInlineMarkdown(value) {
|
|
233
|
+
const counts = function(value, rules) {
|
|
234
|
+
var _a;
|
|
235
|
+
const counts = {}, tokens = new Set;
|
|
236
|
+
for (const rule of rules) tokens.add(rule.open), tokens.add(rule.close);
|
|
237
|
+
const sortedTokens = [ ...tokens ].sort((left, right) => right.length - left.length);
|
|
238
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
239
|
+
if (isEscaped(value, index)) continue;
|
|
240
|
+
const matchedToken = sortedTokens.find(token => token.length > 0 && value.slice(index, index + token.length) === token);
|
|
241
|
+
matchedToken && (shouldIgnoreSymmetricToken(value, matchedToken, index) || "*" === matchedToken && isStarListMarker(value, index) || (counts[matchedToken] = (null !== (_a = counts[matchedToken]) && void 0 !== _a ? _a : 0) + 1,
|
|
242
|
+
index += matchedToken.length - 1));
|
|
243
|
+
}
|
|
244
|
+
return counts;
|
|
245
|
+
}(value, this.getPairedRules()), withSymmetricClosers = this.closeSymmetricPairedMarkers(value), withAsymmetricClosers = this.closeAsymmetricPairedMarkers(withSymmetricClosers, counts);
|
|
246
|
+
return this.closeLineMarkers(withAsymmetricClosers);
|
|
247
|
+
}
|
|
248
|
+
closeLinksAndImages(value) {
|
|
249
|
+
const withImageSignalHandled = this.closeTrailingImageSignal(value);
|
|
250
|
+
if (withImageSignalHandled !== value) return withImageSignalHandled;
|
|
251
|
+
const trailingImage = this.findTrailingImage(value);
|
|
252
|
+
if (trailingImage) return this.closeTrailingImage(value, trailingImage);
|
|
253
|
+
const trailingLink = this.findTrailingLink(value);
|
|
254
|
+
return trailingLink ? this.closeTrailingLink(value, trailingLink) : value;
|
|
255
|
+
}
|
|
256
|
+
getPairedRules() {
|
|
257
|
+
return this.watchedMarkers.filter(rule => {
|
|
258
|
+
var _a;
|
|
259
|
+
return "paired" === (null !== (_a = rule.mode) && void 0 !== _a ? _a : "paired");
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
closeSymmetricPairedMarkers(value) {
|
|
263
|
+
let nextValue = value;
|
|
264
|
+
const suppressedCharacters = new Set, symmetricRules = this.getPairedRules().filter(rule => rule.open === rule.close);
|
|
265
|
+
for (const rule of symmetricRules) {
|
|
266
|
+
const repeatedCharacter = getRepeatedTokenCharacter(rule.open);
|
|
267
|
+
if (repeatedCharacter && suppressedCharacters.has(repeatedCharacter)) continue;
|
|
268
|
+
const unmatchedOpenIndex = findLastUnmatchedSymmetricOpen(nextValue, rule.open);
|
|
269
|
+
if (-1 !== unmatchedOpenIndex) if (hasMeaningfulInlineContent(nextValue.slice(unmatchedOpenIndex + rule.open.length), repeatedCharacter)) {
|
|
270
|
+
if (repeatedCharacter) {
|
|
271
|
+
const trailingRunLength = countTrailingRepeatedCharacter(nextValue, repeatedCharacter), remainingCharacters = Math.max(rule.close.length - trailingRunLength, 0);
|
|
272
|
+
nextValue += repeatedCharacter.repeat(remainingCharacters);
|
|
273
|
+
} else nextValue += rule.close;
|
|
274
|
+
repeatedCharacter && suppressedCharacters.add(repeatedCharacter);
|
|
275
|
+
} else nextValue = nextValue.slice(0, unmatchedOpenIndex), repeatedCharacter && suppressedCharacters.add(repeatedCharacter);
|
|
276
|
+
}
|
|
277
|
+
return nextValue;
|
|
278
|
+
}
|
|
279
|
+
closeAsymmetricPairedMarkers(value, counts) {
|
|
280
|
+
var _a, _b;
|
|
281
|
+
let nextValue = value;
|
|
282
|
+
const asymmetricRules = this.getPairedRules().filter(rule => rule.open !== rule.close);
|
|
283
|
+
for (const rule of asymmetricRules) {
|
|
284
|
+
const openCount = null !== (_a = counts[rule.open]) && void 0 !== _a ? _a : 0, closeCount = null !== (_b = counts[rule.close]) && void 0 !== _b ? _b : 0;
|
|
285
|
+
openCount > closeCount && (nextValue += rule.close.repeat(openCount - closeCount));
|
|
286
|
+
}
|
|
287
|
+
return nextValue;
|
|
288
|
+
}
|
|
289
|
+
closeLineMarkers(value) {
|
|
290
|
+
var _a, _b, _c, _d;
|
|
291
|
+
let nextValue = value;
|
|
292
|
+
const trailingLine = null !== (_a = nextValue.split("\n").at(-1)) && void 0 !== _a ? _a : "";
|
|
293
|
+
if (0 === trailingLine.trim().length) return nextValue;
|
|
294
|
+
const trailingLineStart = nextValue.length - trailingLine.length, lineRules = this.watchedMarkers.filter(rule => {
|
|
295
|
+
var _a;
|
|
296
|
+
return "line" === (null !== (_a = rule.mode) && void 0 !== _a ? _a : "paired");
|
|
297
|
+
});
|
|
298
|
+
for (const rule of lineRules) {
|
|
299
|
+
if (rule.linePattern) {
|
|
300
|
+
if (!rule.linePattern.test(trailingLine)) continue;
|
|
301
|
+
nextValue += rule.close;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
if (rule.requiresLineStart && !trailingLine.startsWith(rule.open)) continue;
|
|
305
|
+
const remaining = trailingLine.slice(rule.open.length).trim();
|
|
306
|
+
if (!(null === (_b = rule.requiresContent) || void 0 === _b || _b) || 0 !== remaining.length) {
|
|
307
|
+
nextValue += rule.close;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
for (const rule of lineRules) {
|
|
312
|
+
if (null === (_c = rule.partialLinePattern) || void 0 === _c ? void 0 : _c.test(trailingLine)) return nextValue.slice(0, trailingLineStart);
|
|
313
|
+
if (!rule.requiresLineStart || !trailingLine.startsWith(rule.open)) continue;
|
|
314
|
+
if (null !== (_d = rule.requiresContent) && void 0 !== _d && !_d) continue;
|
|
315
|
+
if (0 === trailingLine.slice(rule.open.length).trim().length) return nextValue.slice(0, trailingLineStart);
|
|
316
|
+
}
|
|
317
|
+
return nextValue;
|
|
318
|
+
}
|
|
319
|
+
closeTrailingLink(value, construct) {
|
|
320
|
+
if (!construct.labelClosed) return value.slice(0, construct.start);
|
|
321
|
+
if (construct.parenOpened) {
|
|
322
|
+
const linkPreview = `${value.slice(construct.start, construct.labelEnd + 1)}()`;
|
|
323
|
+
return `${value.slice(0, construct.start)}${linkPreview}`;
|
|
324
|
+
}
|
|
325
|
+
return construct.labelEnd === value.length - 1 ? value.slice(0, construct.start) : value;
|
|
326
|
+
}
|
|
327
|
+
closeTrailingImage(value, construct) {
|
|
328
|
+
return construct.labelClosed ? construct.parenOpened || construct.labelEnd === value.length - 1 ? value.slice(0, construct.start) : `${value.slice(0, construct.start)}${value.slice(construct.labelEnd + 1)}` : value.slice(0, construct.start);
|
|
329
|
+
}
|
|
330
|
+
closeTrailingImageSignal(value) {
|
|
331
|
+
const lastBangIndex = value.lastIndexOf("!");
|
|
332
|
+
return -1 === lastBangIndex || lastBangIndex !== value.length - 1 || isEscaped(value, lastBangIndex) ? value : value.slice(0, lastBangIndex);
|
|
333
|
+
}
|
|
334
|
+
findTrailingLink(value) {
|
|
335
|
+
const construct = this.findTrailingInlineConstruct(value, !1);
|
|
336
|
+
return construct ? construct.labelClosed ? construct.parenOpened || construct.labelEnd === value.length - 1 ? construct : null : construct : null;
|
|
337
|
+
}
|
|
338
|
+
findTrailingImage(value) {
|
|
339
|
+
return this.findTrailingInlineConstruct(value, !0);
|
|
340
|
+
}
|
|
341
|
+
findTrailingInlineConstruct(value, isImage) {
|
|
342
|
+
var _a;
|
|
343
|
+
const stack = [];
|
|
344
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
345
|
+
if (isEscaped(value, index)) continue;
|
|
346
|
+
const character = value[index];
|
|
347
|
+
if ("[" === character) {
|
|
348
|
+
const isImage = index > 0 && "!" === value[index - 1] && !isEscaped(value, index - 1);
|
|
349
|
+
stack.push({
|
|
350
|
+
start: isImage ? index - 1 : index,
|
|
351
|
+
isImage: isImage,
|
|
352
|
+
labelClosed: !1,
|
|
353
|
+
labelEnd: -1,
|
|
354
|
+
parenOpened: !1
|
|
355
|
+
});
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
if ("]" === character) {
|
|
359
|
+
const target = [ ...stack ].reverse().find(item => !item.labelClosed);
|
|
360
|
+
if (!target) continue;
|
|
361
|
+
target.labelClosed = !0, target.labelEnd = index;
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
if ("(" === character) {
|
|
365
|
+
const target = [ ...stack ].reverse().find(item => item.labelClosed && !item.parenOpened && item.labelEnd === index - 1);
|
|
366
|
+
if (!target) continue;
|
|
367
|
+
target.parenOpened = !0;
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
if (")" === character) {
|
|
371
|
+
const targetIndex = null === (_a = [ ...stack ].map((item, stackIndex) => ({
|
|
372
|
+
item: item,
|
|
373
|
+
stackIndex: stackIndex
|
|
374
|
+
})).reverse().find(({item: item}) => item.parenOpened)) || void 0 === _a ? void 0 : _a.stackIndex;
|
|
375
|
+
"number" == typeof targetIndex && stack.splice(targetIndex, 1);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
const trailingConstruct = stack.findLast(item => item.isImage === isImage);
|
|
379
|
+
return null != trailingConstruct ? trailingConstruct : null;
|
|
380
|
+
}
|
|
381
|
+
};
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
4
4
|
|
|
5
|
-
require("../theme/colors.js")
|
|
5
|
+
require("../theme/colors.js");
|
|
6
6
|
|
|
7
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js")
|
|
7
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js");
|
|
8
|
+
|
|
9
|
+
require("../hooks/useWindow.js");
|
|
10
|
+
|
|
11
|
+
var Icon = require("./Icon-BB-t50Yt.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), react = require("motion/react"), css$1_wrapper = "DoneCheck-module_wrapper__AlISD flexBox-module_row__z24tF", css$1_icon = "DoneCheck-module_icon__bKaFp flexBox-module_row__z24tF";
|
|
8
12
|
|
|
9
13
|
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.DoneCheck-module_wrapper__AlISD {\n\theight: var(--icon-height);\n\tmax-height: var(--icon-height);\n\twidth: var(--icon-width);\n\tmax-width: var(--icon-width);\n\toverflow: visible;\n}\n\n.DoneCheck-module_icon__bKaFp {\n\theight: var(--icon-height);\n\tmax-height: var(--icon-height);\n\twidth: var(--icon-width);\n\tmax-width: var(--icon-width);\n\tscale: var(--icon-scale);\n\ttransition: var(--icon-transition);\n}\n");
|
|
10
14
|
|
|
@@ -47,7 +51,7 @@ const DoneCheck = React.memo(props => {
|
|
|
47
51
|
|
|
48
52
|
var css_container = "ProgressIndicator-module_container__pW2gW flexBox-module_column__ezvMq";
|
|
49
53
|
|
|
50
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.ProgressIndicator-module_container__pW2gW {\n\tposition: var(--pi-position);\n\ttop: var(--pi-inset);\n\tbottom: var(--pi-inset);\n\tleft: var(--pi-inset);\n\tright: var(--pi-inset);\n\tcolor: var(--core-text-disabled);\n\tz-index: var(--elevation-status);\n}\n\n.ProgressIndicator-module_iconWrapper__puIt4 {\n\tmin-width: var(--pi-icon-size);\n\tmax-width: var(--pi-icon-size);\n\tmax-height: var(--pi-icon-size);\n\tmin-height: var(--pi-icon-size);\n\theight: var(--pi-icon-size);\n\twidth: var(--pi-icon-size);\n\tpadding: 0;\n\tbackground: none;\n\tborder-radius: 100%;\n}\n");
|
|
54
|
+
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.ProgressIndicator-module_container__pW2gW {\n\tdisplay: var(--pi-display) !important;\n\tposition: var(--pi-position);\n\ttop: var(--pi-inset);\n\tbottom: var(--pi-inset);\n\tleft: var(--pi-inset);\n\tright: var(--pi-inset);\n\tcolor: var(--core-text-disabled);\n\tz-index: var(--elevation-status);\n}\n\n.ProgressIndicator-module_iconWrapper__puIt4 {\n\tmin-width: var(--pi-icon-size);\n\tmax-width: var(--pi-icon-size);\n\tmax-height: var(--pi-icon-size);\n\tmin-height: var(--pi-icon-size);\n\theight: var(--pi-icon-size);\n\twidth: var(--pi-icon-size);\n\tpadding: 0;\n\tbackground: none;\n\tborder-radius: 100%;\n}\n");
|
|
51
55
|
|
|
52
56
|
const OpenCircle = (size, secondsPerSpin, color, stroke = 1.5, playing = !1) => jsxRuntime.jsxs(react.motion.svg, {
|
|
53
57
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -108,7 +112,8 @@ exports.DoneCheck = DoneCheck, exports.ProgressIndicator = function(props) {
|
|
|
108
112
|
const cssVars = React.useMemo(() => ({
|
|
109
113
|
"--pi-position": inline ? "relative" : "absolute",
|
|
110
114
|
"--pi-inset": inline ? "unset" : "0",
|
|
111
|
-
"--pi-icon-size": `${null != size ? size : 0}px
|
|
115
|
+
"--pi-icon-size": `${null != size ? size : 0}px`,
|
|
116
|
+
"--pi-display": inline ? "inline-flex" : "flex"
|
|
112
117
|
}), [ inline, size ]), openCircle = React.useMemo(() => OpenCircle(size, secondsPerSpin, color, stroke, playing), [ size, secondsPerSpin, color, stroke, playing ]);
|
|
113
118
|
return jsxRuntime.jsx(react.AnimatePresence, {
|
|
114
119
|
initial: !0,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
4
4
|
|
|
5
|
-
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
5
|
+
require("../theme/colors.js"), require("./tslib.es6-C8dZW5nY.js"), require("../hooks/useWindow.js");
|
|
6
6
|
|
|
7
|
-
var Button = require("./Button-
|
|
7
|
+
var Button = require("./Button-DmWbooXb.js"), FileList = require("./FileList-DjTXjXnK.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
8
8
|
wrapperBg: "PromptInput-module_wrapperBg__zabZq flexBox-module_columnStart__C7P44",
|
|
9
9
|
bgRotate: "PromptInput-module_bgRotate__Um720",
|
|
10
10
|
textareaWrapper: "PromptInput-module_textareaWrapper__KusiV flexBox-module_columnStart__C7P44",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), Icon = require("./Icon-
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), Icon = require("./Icon-BB-t50Yt.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "RadioButton-module_wrapper__-pWRe flexBox-module_row__z24tF", css_radioIcon = "RadioButton-module_radioIcon__I27Xv flexBox-module_column__ezvMq", css_radioTitle = "RadioButton-module_radioTitle__zCQII flexBox-module_rowStart__4tcxS type-module_body-m-regular__LuQBA", css_radioContent = "RadioButton-module_radioContent__38xVx flexBox-module_columnStart__C7P44";
|
|
4
4
|
|
|
5
5
|
function RadioButtonComponent(props) {
|
|
6
6
|
const {label: label, children: children, fieldName: fieldName, value: value, selected: selected = !1, controlType: controlType = "radio", deselect: deselect = !0, tabIndex: tabIndex = 0, wrap: wrap = !1, list: list = !1, hideRadio: hideRadio = !1, noFrame: noFrame = !0, icon: icon = "circle", checkedIcon: checkedIcon = "check circle", iconColor: iconColor, gap: gap = 6, onChange: onChange = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "label", "children", "fieldName", "value", "selected", "controlType", "deselect", "tabIndex", "wrap", "list", "hideRadio", "noFrame", "icon", "checkedIcon", "iconColor", "gap", "onChange" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [isSelected, setIsSelected] = React.useState(selected);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), RadioButton = require("./RadioButton-
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), RadioButton = require("./RadioButton-Cvqum7dU.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "RadioButtonList-module_wrapper__wnq1-", css_column = "RadioButtonList-module_column__Bq16e flexBox-module_columnStart__C7P44", css_row = "RadioButtonList-module_row__D3szq flexBox-module_rowStart__4tcxS";
|
|
4
4
|
|
|
5
5
|
function RadioButtonListComponent(props) {
|
|
6
6
|
const {width: width = "min-content", options: options = [], selectedIndexes: selectedIndexes = null, selectedOptions: selectedOptions = null, label: label = null, deselect: deselect = !1, multiSelect: multiSelect = !1, wrap: wrap = !1, tabIndexSeed: tabIndexSeed = 0, spacer: spacer = "none", custom: custom = 0, gap: gap = 16, hideRadio: hideRadio = !1, noFrame: noFrame = !0, toggleIcon: toggleIcon = !0, iconColor: iconColor, icon: icon = "circle", checkedIcon: checkedIcon = "check circle", iconSelectedColor: iconSelectedColor, onChange: onChange = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "width", "options", "selectedIndexes", "selectedOptions", "label", "deselect", "multiSelect", "wrap", "tabIndexSeed", "spacer", "custom", "gap", "hideRadio", "noFrame", "toggleIcon", "iconColor", "icon", "checkedIcon", "iconSelectedColor", "onChange" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", labelId = React.useId(), [selected, setSelected] = React.useState(selectedIndexes);
|
|
@@ -4,7 +4,7 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
4
4
|
|
|
5
5
|
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
6
6
|
|
|
7
|
-
var Badge = require("./Badge-CY_DG6cD.js"), Icon = require("./Icon-
|
|
7
|
+
var Badge = require("./Badge-CY_DG6cD.js"), Icon = require("./Icon-BB-t50Yt.js"), IconButton = require("./IconButton-BUw3YUsI.js"), sharedTypes = require("./sharedTypes-gCECyn2N.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "TabBar-module_wrapper__cyOR1 flexBox-module_rowStart__4tcxS", css_option = "TabBar-module_option__gYjDf flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_icon = "TabBar-module_icon__JDgG3 flexBox-module_row__z24tF", css_close = "TabBar-module_close__bvSBh flexBox-module_row__z24tF";
|
|
8
8
|
|
|
9
9
|
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TabBar-module_wrapper__cyOR1 {\n\tgap: var(--tab-bar-gap);\n\tborder-bottom: var(--tab-bar-border-bottom) solid var(--core-outline-primary);\n\theight: var(--tab-bar-height);\n\twidth: var(--tab-bar-width);\n\tcursor: pointer;\n}\n\n.TabBar-module_option__gYjDf {\n\tgap: var(--tab-bar-option-gap);\n\tcolor: var(--tab-bar-option-color);\n\tpadding: var(--tab-bar-option-padding) !important;\n\theight: 100%;\n\twidth: var(--tab-bar-option-width);\n\tflex: var(--tab-bar-option-flex);\n\twhite-space: nowrap;\n\tbox-shadow: 0 var(--tab-bar-option-border) 0 0 var(--core-text-special);\n\tcursor: var(--tab-bar-option-cursor);\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tappearance: none;\n\t-webkit-appearance: none;\n\tbackground-image: none;\n\tbackground-color: transparent;\n\tborder: 0;\n\toutline: none;\n\ttext-align: left;\n}\n\n.TabBar-module_icon__JDgG3 {\n\tmax-height: var(--tab-bar-icon-size);\n\tmin-height: var(--tab-bar-icon-size);\n\tmax-width: var(--tab-bar-icon-size);\n\tmin-width: var(--tab-bar-icon-size);\n}\n\n.TabBar-module_close__bvSBh {\n\theight: 100%;\n\tpadding: var(--tab-bar-close-padding) !important;\n\tborder-left: 1px solid var(--core-outline-primary);\n\twidth: min-content;\n}\n");
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), Button = require("./Button-
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), Button = require("./Button-DmWbooXb.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "TextArea-module_wrapper__O0sWP flexBox-module_columnStart__C7P44", css_textarea = "TextArea-module_textarea__-R2n0", css_send = "TextArea-module_send__Cub13", css_xs = "TextArea-module_xs__5e748 type-module_body-xs-regular__ZAFft", css_s = "TextArea-module_s__Ac-fq type-module_body-s-regular__vRHSP", css_m = "TextArea-module_m__dod4R type-module_body-m-regular__LuQBA", css_l = "TextArea-module_l__-uLCG type-module_body-l-regular__lOYbg";
|
|
4
4
|
|
|
5
5
|
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextArea-module_wrapper__O0sWP {\n\tposition: relative;\n\tpadding: var(--ta-padding) !important;\n\twidth: var(--ta-width);\n\theight: auto;\n\tborder-radius: var(--ta-border-radius);\n\tbackground-color: var(--ta-bg-color);\n\tbox-shadow: 0 0 0 1px var(--ta-border-color);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextArea-module_textarea__-R2n0 {\n\tborder: 0;\n\toutline: 0;\n\tpadding: 0 16px 0 0;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--core-text-primary);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\tresize: var(--ta-resize);\n\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\t&::placeholder {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\toverflow-y: auto;\n\n\t&::-webkit-scrollbar {\n\t\tbackground-color: transparent;\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: transparent;\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t\tcursor: default;\n\t}\n}\n\n.TextArea-module_actions__yunQx {\n\twidth: 100%;\n\tmin-height: 30px;\n\tcolor: var(--core-text-disabled);\n\tgap: 16px;\n}\n\n.TextArea-module_option__2SFx5 {\n\tgap: 4px;\n\twhite-space: nowrap;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tcursor: default;\n}\n\n.TextArea-module_send__Cub13 {\n\tposition: absolute;\n\tbottom: var(--ta-send-icon-offset-bottom);\n\tright: var(--ta-send-icon-offset-right);\n}\n\n.TextArea-module_xs__5e748 {\n}\n\n.TextArea-module_s__Ac-fq {\n}\n\n.TextArea-module_m__dod4R {\n}\n\n.TextArea-module_l__-uLCG {\n}\n");
|
|
6
6
|
|
|
@@ -20,16 +20,16 @@ const TextArea = React.memo(props => {
|
|
|
20
20
|
}, [ onChange ]), handleFocus = React.useCallback(() => {
|
|
21
21
|
var _a, _b;
|
|
22
22
|
(null == ref ? void 0 : ref.current) && ref.current.focus(), setIsFocused(!0), onFocus(null !== (_b = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.value) && void 0 !== _b ? _b : "");
|
|
23
|
-
}, [ onFocus ]), handleBlur = React.useCallback(
|
|
23
|
+
}, [ onFocus ]), handleBlur = React.useCallback(() => {
|
|
24
24
|
var _a, _b;
|
|
25
|
-
|
|
26
|
-
}, [
|
|
25
|
+
setIsFocused(!1), onBlur(null !== (_b = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.value) && void 0 !== _b ? _b : "");
|
|
26
|
+
}, [ onBlur ]), handleSubmit = React.useCallback(e => {
|
|
27
27
|
null == e || e.preventDefault(), handleFocus(), onSubmit(text), submitClears && setText(""),
|
|
28
28
|
(null == ref ? void 0 : ref.current) && (ref.current.value = ""), handleResize();
|
|
29
29
|
}, [ handleFocus, onSubmit, text, submitClears, handleResize ]), handleKeyDownWrapper = React.useCallback(e => {
|
|
30
30
|
returnSubmits && "Enter" === e.key && (e.preventDefault(), e.stopPropagation(),
|
|
31
31
|
handleSubmit(void 0)), onKeyDown(e);
|
|
32
|
-
}, [ returnSubmits, handleSubmit, onKeyDown ]), setStyleValue = React.useCallback(value => "string" == typeof value ? value : `${value}px`, []), setBorderColor = React.useMemo(() => isFocused ? "var(--core-link-primary)" : error ? "var(--feedback-warning)" : border ? "var(--core-outline-primary)" : "transparent", [ isFocused, error, border ]), textClassName = React.useMemo(() => "xs" === textSize ? css_xs : "l" === textSize ? css_l : "m" === textSize ? css_m : css_s, [ textSize ]), cssVars = React.useMemo(() => ({
|
|
32
|
+
}, [ returnSubmits, handleSubmit, onKeyDown ]), setStyleValue = React.useCallback(value => "string" == typeof value ? value : `${value}px`, []), setBorderColor = React.useMemo(() => border && isFocused ? "var(--core-link-primary)" : border && error ? "var(--feedback-warning)" : border ? "var(--core-outline-primary)" : "transparent", [ isFocused, error, border ]), textClassName = React.useMemo(() => "xs" === textSize ? css_xs : "l" === textSize ? css_l : "m" === textSize ? css_m : css_s, [ textSize ]), cssVars = React.useMemo(() => ({
|
|
33
33
|
"--ta-border-radius": `${borderRadius}px`,
|
|
34
34
|
"--ta-width": `${setStyleValue(width)}`,
|
|
35
35
|
"--ta-min-width": minWidth ? `${minWidth}px` : "unset",
|
|
@@ -45,7 +45,7 @@ const TextArea = React.memo(props => {
|
|
|
45
45
|
id: divId,
|
|
46
46
|
className: `${css_wrapper}${divClass}`,
|
|
47
47
|
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
48
|
-
onBlur: () => handleBlur(
|
|
48
|
+
onBlur: () => handleBlur(),
|
|
49
49
|
onFocus: () => handleFocus()
|
|
50
50
|
}, rest, {
|
|
51
51
|
children: [ hasSend && jsxRuntime.jsx("div", {
|