@apple-pie/slice 0.1.2 → 0.1.3
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 +105 -13
- package/dist/cjs/chunks/{Button-TfMwGVI5.js → Button-hg5kGC1P.js} +1 -1
- package/dist/cjs/chunks/{ButtonBar-BqGC6sad.js → ButtonBar-C9Nm9faU.js} +1 -1
- package/dist/cjs/chunks/{Camera-om1AA2D0.js → Camera-Dx_PT3pS.js} +63 -46
- package/dist/cjs/chunks/{Card-Ctwbhu26.js → Card-AgEMKJ4O.js} +1 -1
- package/dist/cjs/chunks/{CheckBox-CeDIiSvi.js → CheckBox-CLMxlUff.js} +1 -1
- package/dist/cjs/chunks/{Chip-DdTtB57x.js → Chip-CIy_Xe3i.js} +1 -1
- package/dist/cjs/chunks/{DropDown-CC90XfyD.js → DropDown-FZb52YxR.js} +1 -1
- package/dist/cjs/chunks/{FileList-ClTfGKIL.js → FileList-BQgcnKPP.js} +1 -1
- package/dist/cjs/chunks/{Grouper-jiYhVC82.js → Grouper-Bgc1wrQM.js} +1 -1
- package/dist/cjs/chunks/{IconButton-BiUfqoPb.js → IconButton-CBWmUZxR.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-B3-OxGYF.js → ProgressIndicator-qjya_Yb5.js} +1 -1
- package/dist/cjs/chunks/{PromptInput-Dsziepzs.js → PromptInput-ZqHQUfXw.js} +1 -1
- package/dist/cjs/chunks/{RadioButton-i5n_nNV5.js → RadioButton-Ce9uf54a.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-BCdk-5aD.js → RadioButtonList-dhPr-Uhs.js} +1 -1
- package/dist/cjs/chunks/{TabBar-BF5CvZ-v.js → TabBar-DuwypMB6.js} +1 -1
- package/dist/cjs/chunks/{TextArea-BmOomEKp.js → TextArea-BhzVGfKA.js} +1 -1
- package/dist/cjs/chunks/{TextField-CXMyCClp.js → TextField-hIjxrOG9.js} +1 -1
- package/dist/cjs/chunks/{Toast-CQ0-yuzl.js → Toast-DMUM1wuL.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-B5Xvp0H4.js → UploadArea-B4GA06LW.js} +1 -1
- package/dist/cjs/chunks/{_types-Cxk9tRiB.js → _types-C_zOsCbB.js} +57 -50
- package/dist/cjs/chunks/colors-uej0anrN.js +27 -0
- package/dist/cjs/chunks/sseStore-Dg0WuXsI.js +59 -0
- package/dist/cjs/components/Button/index.js +3 -3
- package/dist/cjs/components/ButtonBar/index.js +3 -3
- package/dist/cjs/components/Camera/index.js +4 -4
- package/dist/cjs/components/Card/index.js +2 -2
- package/dist/cjs/components/CheckBox/index.js +2 -2
- package/dist/cjs/components/Chip/index.js +2 -2
- package/dist/cjs/components/DropDown/index.js +2 -2
- package/dist/cjs/components/FileList/index.js +3 -3
- package/dist/cjs/components/Grouper/index.js +2 -2
- package/dist/cjs/components/Icon/index.js +1 -1
- package/dist/cjs/components/IconButton/index.js +2 -2
- package/dist/cjs/components/Progress/index.js +2 -2
- package/dist/cjs/components/PromptInput/index.js +5 -5
- package/dist/cjs/components/RadioButton/index.js +2 -2
- package/dist/cjs/components/RadioButtonList/index.js +3 -3
- package/dist/cjs/components/TabBar/index.js +3 -3
- package/dist/cjs/components/TextArea/index.js +4 -4
- package/dist/cjs/components/Textfield/index.js +5 -5
- package/dist/cjs/components/Toast/index.js +2 -2
- package/dist/cjs/components/UploadArea/index.js +8 -7
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/stores/SSE.js +9 -0
- package/dist/cjs/stores.js +7 -3
- package/dist/cjs/utils/index.js +4 -26
- package/dist/cjs/utils/objects/index.js +140 -0
- package/dist/esm/chunks/{Avatar-BQT1r-Ge.mjs → Avatar-CDMV6f9w.mjs} +1 -1
- package/dist/esm/chunks/{AvatarGroup-B787aNtD.mjs → AvatarGroup-BZ18GwhK.mjs} +1 -1
- package/dist/esm/chunks/{Button-1MgE-kl9.mjs → Button-DJDS7Yad.mjs} +2 -2
- package/dist/esm/chunks/{ButtonBar-Eahfd-40.mjs → ButtonBar-DIsqJmrS.mjs} +1 -1
- package/dist/esm/chunks/{Camera-Bvoug1KF.mjs → Camera-BvJJ5cd-.mjs} +65 -48
- package/dist/esm/chunks/{Card-RSZhXncV.mjs → Card-DjHdCav5.mjs} +1 -1
- package/dist/esm/chunks/{CheckBox-CfLedK0e.mjs → CheckBox-C1LPehvl.mjs} +1 -1
- package/dist/esm/chunks/{Chip-Db4N0WVH.mjs → Chip-ByaaWpFx.mjs} +1 -1
- package/dist/esm/chunks/{DivInput-BEpjdfu4.mjs → DivInput-B7BliU1p.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-DJm1Mx5u.mjs → DrggablePanel-DvactFf5.mjs} +1 -1
- package/dist/esm/chunks/{DropDown-ryz3GK81.mjs → DropDown-CM01mO_W.mjs} +1 -1
- package/dist/esm/chunks/{FileIcon-_mK2EcB2.mjs → FileIcon-CC_k5dUW.mjs} +1 -1
- package/dist/esm/chunks/{FileList-hCMTALyN.mjs → FileList-CmlXqPXl.mjs} +4 -4
- package/dist/esm/chunks/{Grouper-B1gjd3Sx.mjs → Grouper-DNmAYWdR.mjs} +1 -1
- package/dist/esm/chunks/{IconButton-SyRu990z.mjs → IconButton-C8RBNFzh.mjs} +1 -1
- package/dist/esm/chunks/{Label-DGOkB_Px.mjs → Label-DOvquc82.mjs} +1 -1
- package/dist/esm/chunks/{Pager-BA0lD9mI.mjs → Pager-BX4TMwD_.mjs} +1 -1
- package/dist/esm/chunks/{ProgressIndicator-BayyosKr.mjs → ProgressIndicator-h11R3FG1.mjs} +3 -3
- package/dist/esm/chunks/{PromptInput-CUXCuYVA.mjs → PromptInput-DSHVUuEf.mjs} +3 -3
- package/dist/esm/chunks/{RadioButton-BRFSVtmm.mjs → RadioButton-_lo_FJ8g.mjs} +2 -2
- package/dist/esm/chunks/{RadioButtonList-D6a_EcB6.mjs → RadioButtonList-CLHJxrI_.mjs} +1 -1
- package/dist/esm/chunks/{Slider-D2XVyi2g.mjs → Slider-Bih21QiT.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-BqajqueL.mjs → TabBar-CDDzA_m1.mjs} +2 -2
- package/dist/esm/chunks/{TextArea-C5EbLAN1.mjs → TextArea-CyVBzMoN.mjs} +1 -1
- package/dist/esm/chunks/{TextField-DnQxDxus.mjs → TextField-CYI2vbvO.mjs} +3 -3
- package/dist/esm/chunks/{Tip-B64Pa9eq.mjs → Tip-B-cDOFvV.mjs} +1 -1
- package/dist/esm/chunks/{Toast-B3GgzcTW.mjs → Toast-ovxR12_-.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea-DpWT-5DA.mjs → UploadArea-Kez3VD4d.mjs} +5 -5
- package/dist/esm/chunks/{_types-DGDKmYIh.mjs → _types-CTmvSEX0.mjs} +36 -29
- package/dist/esm/chunks/colors-DR9fLI5X.mjs +30 -0
- package/dist/esm/chunks/{misc-Osk7tIah.mjs → misc-cg9I7drO.mjs} +1 -1
- package/dist/esm/chunks/sseStore-m3IPyLwJ.mjs +56 -0
- package/dist/esm/components/Avatar/index.mjs +2 -2
- package/dist/esm/components/AvatarGroup/index.mjs +3 -3
- package/dist/esm/components/Button/index.mjs +4 -4
- package/dist/esm/components/ButtonBar/index.mjs +4 -4
- package/dist/esm/components/Camera/index.mjs +5 -5
- package/dist/esm/components/Card/index.mjs +3 -3
- package/dist/esm/components/CheckBox/index.mjs +3 -3
- package/dist/esm/components/Chip/index.mjs +3 -3
- package/dist/esm/components/DivInput/index.mjs +2 -2
- package/dist/esm/components/DraggablePanel/index.mjs +2 -2
- package/dist/esm/components/DropDown/index.mjs +3 -3
- package/dist/esm/components/FileIcon/index.mjs +2 -2
- package/dist/esm/components/FileList/index.mjs +5 -5
- package/dist/esm/components/Grouper/index.mjs +3 -3
- package/dist/esm/components/Icon/index.mjs +2 -2
- package/dist/esm/components/IconButton/index.mjs +3 -3
- package/dist/esm/components/Label/index.mjs +2 -2
- package/dist/esm/components/Pager/index.mjs +2 -2
- package/dist/esm/components/Progress/index.mjs +4 -4
- package/dist/esm/components/PromptInput/index.mjs +7 -7
- package/dist/esm/components/RadioButton/index.mjs +3 -3
- package/dist/esm/components/RadioButtonList/index.mjs +4 -4
- package/dist/esm/components/Slider/index.mjs +2 -2
- package/dist/esm/components/TabBar/index.mjs +4 -4
- package/dist/esm/components/TextArea/index.mjs +5 -5
- package/dist/esm/components/Textfield/index.mjs +6 -6
- package/dist/esm/components/Tip/index.mjs +2 -2
- package/dist/esm/components/Toast/index.mjs +3 -3
- package/dist/esm/components/UploadArea/index.mjs +8 -8
- package/dist/esm/hooks/useTrackRenders.mjs +1 -1
- package/dist/esm/index.mjs +31 -31
- package/dist/esm/stores/SSE.mjs +7 -0
- package/dist/esm/stores.mjs +4 -0
- package/dist/esm/utils/index.mjs +4 -30
- package/dist/esm/utils/objects/index.mjs +140 -0
- package/dist/types/components/Camera/_types.d.ts +1 -0
- package/dist/types/components/Icon/_types.d.ts +1 -0
- package/dist/types/stores/SSE/_types.d.ts +17 -0
- package/dist/types/stores/SSE/index.d.ts +2 -0
- package/dist/types/stores/SSE/sseStore.d.ts +28 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/objects/SSEConnection/SSEConnection.d.ts +166 -0
- package/dist/types/utils/objects/WSConnection/WSConnection.d.ts +0 -0
- package/dist/types/utils/objects/index.d.ts +2 -0
- package/package.json +6 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { R as RadioButton } from "../../chunks/RadioButton-
|
|
1
|
+
export { R as RadioButton } from "../../chunks/RadioButton-_lo_FJ8g.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -6,9 +6,9 @@ import "react/jsx-runtime";
|
|
|
6
6
|
|
|
7
7
|
import "react";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/misc-
|
|
9
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/_types-
|
|
11
|
+
import "../../chunks/_types-CTmvSEX0.mjs";
|
|
12
12
|
|
|
13
13
|
import "../../hooks/useTheme.mjs";
|
|
14
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { R as RadioButtonList } from "../../chunks/RadioButtonList-
|
|
1
|
+
export { R as RadioButtonList } from "../../chunks/RadioButtonList-CLHJxrI_.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -6,11 +6,11 @@ import "react/jsx-runtime";
|
|
|
6
6
|
|
|
7
7
|
import "react";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/RadioButton-
|
|
9
|
+
import "../../chunks/RadioButton-_lo_FJ8g.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/misc-
|
|
11
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
12
12
|
|
|
13
|
-
import "../../chunks/_types-
|
|
13
|
+
import "../../chunks/_types-CTmvSEX0.mjs";
|
|
14
14
|
|
|
15
15
|
import "../../hooks/useTheme.mjs";
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as Slider } from "../../chunks/Slider-
|
|
1
|
+
export { S as Slider } from "../../chunks/Slider-Bih21QiT.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -8,6 +8,6 @@ import "react";
|
|
|
8
8
|
|
|
9
9
|
import "../../hooks/useObserveResize.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/misc-
|
|
11
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
12
12
|
|
|
13
13
|
import "../../chunks/style-inject.es-D0BjEaN8.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as TabBar } from "../../chunks/TabBar-
|
|
1
|
+
export { T as TabBar } from "../../chunks/TabBar-CDDzA_m1.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -28,11 +28,11 @@ import "../../chunks/Badge-DyICxZP2.mjs";
|
|
|
28
28
|
|
|
29
29
|
import "../../chunks/style-inject.es-D0BjEaN8.mjs";
|
|
30
30
|
|
|
31
|
-
import "../../chunks/_types-
|
|
31
|
+
import "../../chunks/_types-CTmvSEX0.mjs";
|
|
32
32
|
|
|
33
|
-
import "../../chunks/misc-
|
|
33
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
34
34
|
|
|
35
|
-
import "../../chunks/IconButton-
|
|
35
|
+
import "../../chunks/IconButton-C8RBNFzh.mjs";
|
|
36
36
|
|
|
37
37
|
import "motion/react";
|
|
38
38
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as TextArea } from "../../chunks/TextArea-
|
|
1
|
+
export { T as TextArea } from "../../chunks/TextArea-CyVBzMoN.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ import "react/jsx-runtime";
|
|
|
6
6
|
|
|
7
7
|
import "react";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/Button-
|
|
9
|
+
import "../../chunks/Button-DJDS7Yad.mjs";
|
|
10
10
|
|
|
11
11
|
import "motion/react";
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ import "../../chunks/style-inject.es-D0BjEaN8.mjs";
|
|
|
16
16
|
|
|
17
17
|
import "../../chunks/Dot-CLGwQu-i.mjs";
|
|
18
18
|
|
|
19
|
-
import "../../chunks/_types-
|
|
19
|
+
import "../../chunks/_types-CTmvSEX0.mjs";
|
|
20
20
|
|
|
21
21
|
import "../../hooks/useTheme.mjs";
|
|
22
22
|
|
|
@@ -36,8 +36,8 @@ import "../../hooks/useObserveTheme.mjs";
|
|
|
36
36
|
|
|
37
37
|
import "../../hooks/useWindow.mjs";
|
|
38
38
|
|
|
39
|
-
import "../../chunks/misc-
|
|
39
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
40
40
|
|
|
41
|
-
import "../../chunks/ProgressIndicator-
|
|
41
|
+
import "../../chunks/ProgressIndicator-h11R3FG1.mjs";
|
|
42
42
|
|
|
43
43
|
import "../../chunks/sharedTypes-tn9-uJvb.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as TextField } from "../../chunks/TextField-
|
|
1
|
+
export { T as TextField } from "../../chunks/TextField-CYI2vbvO.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -26,7 +26,7 @@ import "../../hooks/useObserveTheme.mjs";
|
|
|
26
26
|
|
|
27
27
|
import "../../hooks/useWindow.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/Button-
|
|
29
|
+
import "../../chunks/Button-DJDS7Yad.mjs";
|
|
30
30
|
|
|
31
31
|
import "../../chunks/Badge-DyICxZP2.mjs";
|
|
32
32
|
|
|
@@ -34,12 +34,12 @@ import "../../chunks/style-inject.es-D0BjEaN8.mjs";
|
|
|
34
34
|
|
|
35
35
|
import "../../chunks/Dot-CLGwQu-i.mjs";
|
|
36
36
|
|
|
37
|
-
import "../../chunks/_types-
|
|
37
|
+
import "../../chunks/_types-CTmvSEX0.mjs";
|
|
38
38
|
|
|
39
|
-
import "../../chunks/misc-
|
|
39
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
40
40
|
|
|
41
|
-
import "../../chunks/ProgressIndicator-
|
|
41
|
+
import "../../chunks/ProgressIndicator-h11R3FG1.mjs";
|
|
42
42
|
|
|
43
43
|
import "../../chunks/sharedTypes-tn9-uJvb.mjs";
|
|
44
44
|
|
|
45
|
-
import "../../chunks/IconButton-
|
|
45
|
+
import "../../chunks/IconButton-C8RBNFzh.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as Tip } from "../../chunks/Tip-
|
|
1
|
+
export { T as Tip } from "../../chunks/Tip-B-cDOFvV.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -8,6 +8,6 @@ import "motion/react";
|
|
|
8
8
|
|
|
9
9
|
import "react";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/misc-
|
|
11
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
12
12
|
|
|
13
13
|
import "../../chunks/style-inject.es-D0BjEaN8.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as Toast, a as ToastType } from "../../chunks/Toast-
|
|
1
|
+
export { T as Toast, a as ToastType } from "../../chunks/Toast-ovxR12_-.mjs";
|
|
2
2
|
|
|
3
3
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
4
4
|
|
|
@@ -26,8 +26,8 @@ import "../../hooks/useObserveTheme.mjs";
|
|
|
26
26
|
|
|
27
27
|
import "../../hooks/useWindow.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/misc-
|
|
29
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
30
30
|
|
|
31
|
-
import "../../chunks/_types-
|
|
31
|
+
import "../../chunks/_types-CTmvSEX0.mjs";
|
|
32
32
|
|
|
33
33
|
import "../../chunks/style-inject.es-D0BjEaN8.mjs";
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "../../chunks/UploadArea-
|
|
1
|
+
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "../../chunks/UploadArea-Kez3VD4d.mjs";
|
|
2
2
|
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
import "react";
|
|
6
6
|
|
|
7
|
-
import "../../chunks/misc-
|
|
7
|
+
import "../../chunks/misc-cg9I7drO.mjs";
|
|
8
8
|
|
|
9
9
|
import "../../chunks/tslib.es6-c-7TIv71.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/
|
|
11
|
+
import "../../chunks/FileList-CmlXqPXl.mjs";
|
|
12
|
+
|
|
13
|
+
import "../../chunks/FileIcon-CC_k5dUW.mjs";
|
|
12
14
|
|
|
13
15
|
import "../../hooks/useTheme.mjs";
|
|
14
16
|
|
|
@@ -28,12 +30,10 @@ import "../../hooks/useObserveTheme.mjs";
|
|
|
28
30
|
|
|
29
31
|
import "../../hooks/useWindow.mjs";
|
|
30
32
|
|
|
33
|
+
import "../../chunks/_types-CTmvSEX0.mjs";
|
|
34
|
+
|
|
31
35
|
import "../../chunks/style-inject.es-D0BjEaN8.mjs";
|
|
32
36
|
|
|
33
|
-
import "../../chunks/ProgressIndicator-
|
|
37
|
+
import "../../chunks/ProgressIndicator-h11R3FG1.mjs";
|
|
34
38
|
|
|
35
39
|
import "motion/react";
|
|
36
|
-
|
|
37
|
-
import "../../chunks/FileList-hCMTALyN.mjs";
|
|
38
|
-
|
|
39
|
-
import "../../chunks/FileIcon-_mK2EcB2.mjs";
|
package/dist/esm/index.mjs
CHANGED
|
@@ -26,79 +26,79 @@ export { useWindow } from "./hooks/useWindow.mjs";
|
|
|
26
26
|
|
|
27
27
|
export { useObserveResize } from "./hooks/useObserveResize.mjs";
|
|
28
28
|
|
|
29
|
-
export { A as Avatar } from "./chunks/Avatar-
|
|
29
|
+
export { A as Avatar } from "./chunks/Avatar-CDMV6f9w.mjs";
|
|
30
30
|
|
|
31
|
-
export { A as AvatarGroup } from "./chunks/AvatarGroup-
|
|
31
|
+
export { A as AvatarGroup } from "./chunks/AvatarGroup-BZ18GwhK.mjs";
|
|
32
32
|
|
|
33
33
|
export { B as Badge } from "./chunks/Badge-DyICxZP2.mjs";
|
|
34
34
|
|
|
35
|
-
export { I as IconButton } from "./chunks/IconButton-
|
|
35
|
+
export { I as IconButton } from "./chunks/IconButton-C8RBNFzh.mjs";
|
|
36
36
|
|
|
37
|
-
export { C as Camera } from "./chunks/Camera-
|
|
37
|
+
export { C as Camera } from "./chunks/Camera-BvJJ5cd-.mjs";
|
|
38
38
|
|
|
39
|
-
export { C as CheckBox } from "./chunks/CheckBox-
|
|
39
|
+
export { C as CheckBox } from "./chunks/CheckBox-C1LPehvl.mjs";
|
|
40
40
|
|
|
41
|
-
export { D as DivInput } from "./chunks/DivInput-
|
|
41
|
+
export { D as DivInput } from "./chunks/DivInput-B7BliU1p.mjs";
|
|
42
42
|
|
|
43
43
|
export { D as DocIcons } from "./chunks/DocIcons-BxtcXsWI.mjs";
|
|
44
44
|
|
|
45
45
|
export { D as Dot } from "./chunks/Dot-CLGwQu-i.mjs";
|
|
46
46
|
|
|
47
|
-
export { D as DraggablePanel } from "./chunks/DrggablePanel-
|
|
47
|
+
export { D as DraggablePanel } from "./chunks/DrggablePanel-DvactFf5.mjs";
|
|
48
48
|
|
|
49
|
-
export { D as DropDown } from "./chunks/DropDown-
|
|
49
|
+
export { D as DropDown } from "./chunks/DropDown-CM01mO_W.mjs";
|
|
50
50
|
|
|
51
51
|
export { E as ErrorSummary } from "./chunks/ErrorSummary-S0shes-m.mjs";
|
|
52
52
|
|
|
53
|
-
export { G as Grouper } from "./chunks/Grouper-
|
|
53
|
+
export { G as Grouper } from "./chunks/Grouper-DNmAYWdR.mjs";
|
|
54
54
|
|
|
55
55
|
export { O as Overlay } from "./chunks/Overlay-Cw9o1fHb.mjs";
|
|
56
56
|
|
|
57
57
|
export { F as FlexDiv } from "./chunks/FlexDiv-LGEGGrT0.mjs";
|
|
58
58
|
|
|
59
|
-
export { P as Pager } from "./chunks/Pager-
|
|
59
|
+
export { P as Pager } from "./chunks/Pager-BX4TMwD_.mjs";
|
|
60
60
|
|
|
61
|
-
export { P as PromptInput } from "./chunks/PromptInput-
|
|
61
|
+
export { P as PromptInput } from "./chunks/PromptInput-DSHVUuEf.mjs";
|
|
62
62
|
|
|
63
|
-
export { D as DoneCheck, P as ProgressIndicator } from "./chunks/ProgressIndicator-
|
|
63
|
+
export { D as DoneCheck, P as ProgressIndicator } from "./chunks/ProgressIndicator-h11R3FG1.mjs";
|
|
64
64
|
|
|
65
|
-
export { R as RadioButton } from "./chunks/RadioButton-
|
|
65
|
+
export { R as RadioButton } from "./chunks/RadioButton-_lo_FJ8g.mjs";
|
|
66
66
|
|
|
67
|
-
export { R as RadioButtonList } from "./chunks/RadioButtonList-
|
|
67
|
+
export { R as RadioButtonList } from "./chunks/RadioButtonList-CLHJxrI_.mjs";
|
|
68
68
|
|
|
69
|
-
export { S as Slider } from "./chunks/Slider-
|
|
69
|
+
export { S as Slider } from "./chunks/Slider-Bih21QiT.mjs";
|
|
70
70
|
|
|
71
71
|
export { S as Spacer } from "./chunks/Spacer-BlgEdKEM.mjs";
|
|
72
72
|
|
|
73
73
|
export { S as Switch } from "./chunks/Switch-nWg2Ykea.mjs";
|
|
74
74
|
|
|
75
|
-
export { T as TabBar } from "./chunks/TabBar-
|
|
75
|
+
export { T as TabBar } from "./chunks/TabBar-CDDzA_m1.mjs";
|
|
76
76
|
|
|
77
|
-
export { T as TextArea } from "./chunks/TextArea-
|
|
77
|
+
export { T as TextArea } from "./chunks/TextArea-CyVBzMoN.mjs";
|
|
78
78
|
|
|
79
|
-
export { T as TextField } from "./chunks/TextField-
|
|
79
|
+
export { T as TextField } from "./chunks/TextField-CYI2vbvO.mjs";
|
|
80
80
|
|
|
81
81
|
export { ThemeProvider } from "./providers/ThemeProvider.mjs";
|
|
82
82
|
|
|
83
|
-
export { T as Tip } from "./chunks/Tip-
|
|
83
|
+
export { T as Tip } from "./chunks/Tip-B-cDOFvV.mjs";
|
|
84
84
|
|
|
85
|
-
export { T as Toast, a as ToastType } from "./chunks/Toast-
|
|
85
|
+
export { T as Toast, a as ToastType } from "./chunks/Toast-ovxR12_-.mjs";
|
|
86
86
|
|
|
87
|
-
export { B as Button } from "./chunks/Button-
|
|
87
|
+
export { B as Button } from "./chunks/Button-DJDS7Yad.mjs";
|
|
88
88
|
|
|
89
|
-
export { C as Chip } from "./chunks/Chip-
|
|
89
|
+
export { C as Chip } from "./chunks/Chip-ByaaWpFx.mjs";
|
|
90
90
|
|
|
91
|
-
export { F as FileIcon, a as FileIconNames } from "./chunks/FileIcon-
|
|
91
|
+
export { F as FileIcon, a as FileIconNames } from "./chunks/FileIcon-CC_k5dUW.mjs";
|
|
92
92
|
|
|
93
|
-
export { I as Icon, a as IconNames } from "./chunks/_types-
|
|
93
|
+
export { I as Icon, a as IconNames } from "./chunks/_types-CTmvSEX0.mjs";
|
|
94
94
|
|
|
95
|
-
export { B as ButtonBar } from "./chunks/ButtonBar-
|
|
95
|
+
export { B as ButtonBar } from "./chunks/ButtonBar-DIsqJmrS.mjs";
|
|
96
96
|
|
|
97
|
-
export { C as Card } from "./chunks/Card-
|
|
97
|
+
export { C as Card } from "./chunks/Card-DjHdCav5.mjs";
|
|
98
98
|
|
|
99
|
-
export { L as Label } from "./chunks/Label-
|
|
99
|
+
export { L as Label } from "./chunks/Label-DOvquc82.mjs";
|
|
100
100
|
|
|
101
|
-
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "./chunks/UploadArea-
|
|
101
|
+
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "./chunks/UploadArea-Kez3VD4d.mjs";
|
|
102
102
|
|
|
103
103
|
import "./theme/corners.mjs";
|
|
104
104
|
|
|
@@ -110,12 +110,12 @@ import "./chunks/tslib.es6-c-7TIv71.mjs";
|
|
|
110
110
|
|
|
111
111
|
import "react/jsx-runtime";
|
|
112
112
|
|
|
113
|
-
import "./chunks/misc-
|
|
113
|
+
import "./chunks/misc-cg9I7drO.mjs";
|
|
114
114
|
|
|
115
115
|
import "./chunks/style-inject.es-D0BjEaN8.mjs";
|
|
116
116
|
|
|
117
117
|
import "motion/react";
|
|
118
118
|
|
|
119
|
-
import "./
|
|
119
|
+
import "./chunks/colors-DR9fLI5X.mjs";
|
|
120
120
|
|
|
121
|
-
import "./chunks/FileList-
|
|
121
|
+
import "./chunks/FileList-CmlXqPXl.mjs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { u as useConnectionClose, a as useConnectionMessage, b as useIsConnected, c as useLastSSEMessage, d as useMessage, e as useSSE, f as useSSEActions, g as useSSEStore } from "../chunks/sseStore-m3IPyLwJ.mjs";
|
|
2
|
+
|
|
3
|
+
import "zustand";
|
|
4
|
+
|
|
5
|
+
import "../chunks/tslib.es6-c-7TIv71.mjs";
|
|
6
|
+
|
|
7
|
+
import "../utils/objects/index.mjs";
|
package/dist/esm/stores.mjs
CHANGED
|
@@ -6,8 +6,12 @@ export { g as getTip, t as tipActions, u as useTip, a as useTipActions, b as use
|
|
|
6
6
|
|
|
7
7
|
export { g as getToast, t as toastActions, u as useToast, a as useToastActions, b as useToastStore } from "./chunks/toastStore-D2PEIqCo.mjs";
|
|
8
8
|
|
|
9
|
+
export { u as useConnectionClose, a as useConnectionMessage, b as useIsConnected, c as useLastSSEMessage, d as useMessage, e as useSSE, f as useSSEActions, g as useSSEStore } from "./chunks/sseStore-m3IPyLwJ.mjs";
|
|
10
|
+
|
|
9
11
|
import "zustand";
|
|
10
12
|
|
|
11
13
|
import "./chunks/uploads-worker-Dv-4zGnC.mjs";
|
|
12
14
|
|
|
13
15
|
import "./chunks/tslib.es6-c-7TIv71.mjs";
|
|
16
|
+
|
|
17
|
+
import "./utils/objects/index.mjs";
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { c as copyToClipboard } from "../chunks/misc-cg9I7drO.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export { a as addOpacity, t as tintFromColor } from "../chunks/colors-DR9fLI5X.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
* Create a tint value from a hex color
|
|
7
|
-
*/ const tintFromColor = (hex, percent) => {
|
|
8
|
-
const normalizedHex = hex.trim().replace("#", "");
|
|
9
|
-
if (!(3 === normalizedHex.length || 6 === normalizedHex.length) || !/^[0-9a-fA-F]+$/.test(normalizedHex)) return hex;
|
|
10
|
-
const fullHex = 3 === normalizedHex.length ? normalizedHex.split("").map(char => `${char}${char}`).join("") : normalizedHex, ratio = Math.max(-1, Math.min(1, Math.abs(percent) > 1 ? percent / 100 : percent)), mixTo = ratio >= 0 ? 255 : 0, mix = Math.abs(ratio);
|
|
11
|
-
return `#${[ 0, 2, 4 ].map(start => Number.parseInt(fullHex.slice(start, start + 2), 16)).map(channel => {
|
|
12
|
-
const next = Math.round(channel + (mixTo - channel) * mix);
|
|
13
|
-
return Math.max(0, Math.min(255, next));
|
|
14
|
-
}).map(channel => channel.toString(16).padStart(2, "0")).join("")}`;
|
|
15
|
-
}, addOpacity = (color, opacity) => {
|
|
16
|
-
if (!color) return "";
|
|
17
|
-
const alpha = Number.isFinite(opacity) ? Math.max(0, Math.min(1, opacity)) : 1, trimmed = color.trim();
|
|
18
|
-
if (trimmed.startsWith("#")) {
|
|
19
|
-
const normalized = trimmed.slice(1), fullHex = 3 === normalized.length ? normalized.split("").map(char => `${char}${char}`).join("") : normalized;
|
|
20
|
-
if (!/^[0-9a-fA-F]{6}$/.test(fullHex)) return color;
|
|
21
|
-
return `rgba(${Number.parseInt(fullHex.slice(0, 2), 16)}, ${Number.parseInt(fullHex.slice(2, 4), 16)}, ${Number.parseInt(fullHex.slice(4, 6), 16)}, ${alpha})`;
|
|
22
|
-
}
|
|
23
|
-
const rgbMatch = trimmed.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*[\d.]+\s*)?\)$/);
|
|
24
|
-
if (rgbMatch) {
|
|
25
|
-
const [, r, g, b] = rgbMatch;
|
|
26
|
-
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
27
|
-
}
|
|
28
|
-
return color;
|
|
29
|
-
};
|
|
5
|
+
export { SSEConnection } from "./objects/index.mjs";
|
|
30
6
|
|
|
31
|
-
|
|
32
|
-
* Adds the desired opacity level to a hex or RGB color string
|
|
33
|
-
*/ export { addOpacity, tintFromColor };
|
|
7
|
+
import "../chunks/tslib.es6-c-7TIv71.mjs";
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
class SSEConnection {
|
|
2
|
+
/**
|
|
3
|
+
* Whether the underlying EventSource is currently open.
|
|
4
|
+
*/
|
|
5
|
+
get connected() {
|
|
6
|
+
var _a;
|
|
7
|
+
return (null === (_a = this.sseConnection) || void 0 === _a ? void 0 : _a.readyState) === EventSource.OPEN;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Direct access to the underlying EventSource instance.
|
|
11
|
+
*/ get connection() {
|
|
12
|
+
return this.sseConnection;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create an SEE connection instance
|
|
16
|
+
*/ constructor(options) {
|
|
17
|
+
var _a, _b, _c;
|
|
18
|
+
this.sseConnection = null, this.customEventHandlers = new Map, this.unifiedOnMessage = !1,
|
|
19
|
+
/**
|
|
20
|
+
* One message received
|
|
21
|
+
*/
|
|
22
|
+
this.onMessage = event => {
|
|
23
|
+
const data = this.parseEventData(event.data);
|
|
24
|
+
this.emitUnifiedMessage({
|
|
25
|
+
type: "message",
|
|
26
|
+
data: data,
|
|
27
|
+
event: event
|
|
28
|
+
}), this.emitParsedMessage(data), this.shouldCloseFromMessage(event.data, data) && this.closeFromConnectionEvent();
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* On error event
|
|
32
|
+
*/
|
|
33
|
+
this.onError = event => {
|
|
34
|
+
var _a;
|
|
35
|
+
null === (_a = this.onErrorCallback) || void 0 === _a || _a.call(this, event), this.emitUnifiedMessage({
|
|
36
|
+
type: "error",
|
|
37
|
+
event: event
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* On open event
|
|
42
|
+
*/
|
|
43
|
+
this.onOpen = event => {
|
|
44
|
+
var _a;
|
|
45
|
+
null === (_a = this.onOpenCallback) || void 0 === _a || _a.call(this, event), this.emitUnifiedMessage({
|
|
46
|
+
type: "open",
|
|
47
|
+
event: event
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Close the SSE connection and release resources.
|
|
52
|
+
*/
|
|
53
|
+
this.close = () => {
|
|
54
|
+
this.sseConnection && (this.detachAllEventListeners(this.sseConnection), this.sseConnection.close(),
|
|
55
|
+
this.sseConnection = null);
|
|
56
|
+
}, this.url = null !== (_a = null == options ? void 0 : options.url) && void 0 !== _a ? _a : "",
|
|
57
|
+
this.options = null !== (_b = null == options ? void 0 : options.options) && void 0 !== _b ? _b : void 0,
|
|
58
|
+
this.unifiedOnMessage = null !== (_c = null == options ? void 0 : options.unifiedOnMessage) && void 0 !== _c && _c,
|
|
59
|
+
this.onMessageCallback = null == options ? void 0 : options.onMessageCallback, this.onErrorCallback = null == options ? void 0 : options.onErrorCallback,
|
|
60
|
+
this.onOpenCallback = null == options ? void 0 : options.onOpenCallback, this.onCloseCallback = null == options ? void 0 : options.onCloseCallback,
|
|
61
|
+
this.connectionClose = null == options ? void 0 : options.connectionClose, (null == options ? void 0 : options.customEvents) ? this.customEvents = Array.isArray(null == options ? void 0 : options.customEvents) ? options.customEvents : [ options.customEvents ] : this.customEvents = [],
|
|
62
|
+
this.sseConnection = new EventSource(this.url, this.options), this.attachDefaultEventListeners(this.sseConnection),
|
|
63
|
+
this.customEvents.length > 0 && this.attachCustomEventListeners(this.customEvents);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Safely parse SSE event data. Falls back to the raw string when the payload is not JSON.
|
|
67
|
+
*/ parseEventData(rawData) {
|
|
68
|
+
try {
|
|
69
|
+
return JSON.parse(rawData);
|
|
70
|
+
} catch (_a) {
|
|
71
|
+
return rawData;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Attach default SEE events
|
|
76
|
+
*/ attachDefaultEventListeners(connection) {
|
|
77
|
+
connection.addEventListener("message", this.onMessage), connection.addEventListener("error", this.onError),
|
|
78
|
+
connection.addEventListener("open", this.onOpen);
|
|
79
|
+
}
|
|
80
|
+
emitParsedMessage(data) {
|
|
81
|
+
var _a;
|
|
82
|
+
this.unifiedOnMessage || null === (_a = this.onMessageCallback) || void 0 === _a || _a.call(this, data);
|
|
83
|
+
}
|
|
84
|
+
emitUnifiedMessage(message) {
|
|
85
|
+
var _a;
|
|
86
|
+
this.unifiedOnMessage && (null === (_a = this.onMessageCallback) || void 0 === _a || _a.call(this, message));
|
|
87
|
+
}
|
|
88
|
+
emitCloseEvent(event) {
|
|
89
|
+
var _a;
|
|
90
|
+
null === (_a = this.onCloseCallback) || void 0 === _a || _a.call(this, event), this.emitUnifiedMessage({
|
|
91
|
+
type: "close",
|
|
92
|
+
event: event
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
closeFromConnectionEvent() {
|
|
96
|
+
const closeEvent = new Event("close");
|
|
97
|
+
this.emitCloseEvent(closeEvent), this.close();
|
|
98
|
+
}
|
|
99
|
+
shouldCloseFromMessage(rawData, data) {
|
|
100
|
+
var _a;
|
|
101
|
+
return !!(null === (_a = this.connectionClose) || void 0 === _a ? void 0 : _a.message) && (rawData === this.connectionClose.message || data === this.connectionClose.message);
|
|
102
|
+
}
|
|
103
|
+
emitUnifiedCustomMessage(customEvent, data, event) {
|
|
104
|
+
this.emitUnifiedMessage({
|
|
105
|
+
type: customEvent.name,
|
|
106
|
+
data: data,
|
|
107
|
+
event: event
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Attach custom event listeners to the SSE connection
|
|
112
|
+
*/ attachCustomEventListener(customEvent) {
|
|
113
|
+
var _a;
|
|
114
|
+
if (!this.sseConnection) return;
|
|
115
|
+
const handler = eventInfo => {
|
|
116
|
+
var _a, _b;
|
|
117
|
+
const data = this.parseEventData(eventInfo.data);
|
|
118
|
+
null === (_a = customEvent.handler) || void 0 === _a || _a.call(customEvent, data),
|
|
119
|
+
this.emitUnifiedCustomMessage(customEvent, data, eventInfo), (null === (_b = this.connectionClose) || void 0 === _b ? void 0 : _b.event) === customEvent.name && this.closeFromConnectionEvent();
|
|
120
|
+
}, currentHandlers = null !== (_a = this.customEventHandlers.get(customEvent.name)) && void 0 !== _a ? _a : [];
|
|
121
|
+
currentHandlers.push(handler), this.customEventHandlers.set(customEvent.name, currentHandlers),
|
|
122
|
+
this.sseConnection.addEventListener(customEvent.name, handler);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Attach custom event listeners to the SSE connection
|
|
126
|
+
*/ attachCustomEventListeners(customEvents) {
|
|
127
|
+
const events = Array.isArray(customEvents) ? customEvents : [ customEvents ];
|
|
128
|
+
for (const event of events) this.attachCustomEventListener(event);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Clean up listeners
|
|
132
|
+
*/ detachAllEventListeners(connection) {
|
|
133
|
+
connection.removeEventListener("message", this.onMessage), connection.removeEventListener("error", this.onError),
|
|
134
|
+
connection.removeEventListener("open", this.onOpen);
|
|
135
|
+
for (const [eventName, handlers] of this.customEventHandlers.entries()) for (const handler of handlers) connection.removeEventListener(eventName, handler);
|
|
136
|
+
this.customEventHandlers.clear();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export { SSEConnection };
|
|
@@ -11,6 +11,7 @@ export interface ToolbarButtonProps {
|
|
|
11
11
|
active?: boolean;
|
|
12
12
|
label?: string;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
onMouseOver?: (e: React.MouseEvent<HTMLDivElement> | React.FocusEvent<HTMLDivElement>) => void;
|
|
14
15
|
}
|
|
15
16
|
export interface CameraElement {
|
|
16
17
|
container?: HTMLDivElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SSEConnection, SSEConnectionOptions, SSEEventMap, SSEUnifiedMessage } from '../../utils';
|
|
2
|
+
export type SSEStoreConnectionOptions = Omit<SSEConnectionOptions<unknown, SSEEventMap>, 'unifiedOnMessage'> & {
|
|
3
|
+
onMessageCallback?: (message: SSEUnifiedMessage<unknown, SSEEventMap>) => void;
|
|
4
|
+
};
|
|
5
|
+
export interface SSEStoreConnection {
|
|
6
|
+
name: string;
|
|
7
|
+
connection: SSEConnection<unknown, SSEEventMap>;
|
|
8
|
+
}
|
|
9
|
+
export interface SSEStore {
|
|
10
|
+
connections: SSEStoreConnection[];
|
|
11
|
+
message: SSEUnifiedMessage<unknown, SSEEventMap> | null;
|
|
12
|
+
closedConnection: string | null;
|
|
13
|
+
actions: {
|
|
14
|
+
addConnection: (name: string, options: SSEStoreConnectionOptions) => SSEStoreConnection;
|
|
15
|
+
removeConnection: (name: string) => void;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type SSEEventMap, type SSEUnifiedMessage } from '../../utils';
|
|
2
|
+
import type { SSEStore, SSEStoreConnectionOptions } from './_types';
|
|
3
|
+
export declare const useSSEStore: import("zustand").UseBoundStore<import("zustand").StoreApi<SSEStore>>;
|
|
4
|
+
export declare const useSSE: () => {
|
|
5
|
+
addConnection: (name: string, options: SSEStoreConnectionOptions) => import("./_types").SSEStoreConnection;
|
|
6
|
+
removeConnection: (name: string) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const useConnectionClose: () => string | null;
|
|
9
|
+
export declare const useConnectionMessage: (connection: string) => {
|
|
10
|
+
type: "error";
|
|
11
|
+
event: Event;
|
|
12
|
+
} | {
|
|
13
|
+
type: "open";
|
|
14
|
+
event: Event;
|
|
15
|
+
} | {
|
|
16
|
+
type: "close";
|
|
17
|
+
event: Event;
|
|
18
|
+
} | import("../../utils").SSEUnifiedCustomMessage<SSEEventMap, string> | null;
|
|
19
|
+
export declare const useIsConnected: (connection?: string) => boolean;
|
|
20
|
+
export declare function useMessage(): SSEUnifiedMessage<unknown, SSEEventMap> | null;
|
|
21
|
+
export declare function useMessage<T = unknown>(type: 'message', connection?: string): T | string | null;
|
|
22
|
+
export declare function useMessage(type: 'open' | 'error' | 'close', connection?: string): Event | null;
|
|
23
|
+
export declare function useMessage<T = unknown>(type: string, connection?: string): T | string | null;
|
|
24
|
+
export declare const useSSEActions: {
|
|
25
|
+
addConnection: (name: string, options: SSEStoreConnectionOptions) => import("./_types").SSEStoreConnection;
|
|
26
|
+
removeConnection: (name: string) => void;
|
|
27
|
+
};
|
|
28
|
+
export declare const useLastSSEMessage: () => SSEUnifiedMessage<unknown, SSEEventMap> | null;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { copyToClipboard } from './functions/misc';
|
|
2
2
|
export { tintFromColor, addOpacity } from './functions/colors';
|
|
3
|
+
export { SSEConnection } from './objects';
|
|
4
|
+
export type { SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, } from './objects';
|