@apple-pie/slice 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/README.md +89 -27
  2. package/dist/cjs/chunks/{Button-TfMwGVI5.js → Button-krf4dQeL.js} +4 -2
  3. package/dist/cjs/chunks/{ButtonBar-BqGC6sad.js → ButtonBar-C9Nm9faU.js} +1 -1
  4. package/dist/cjs/chunks/{Camera-om1AA2D0.js → Camera-Dx_PT3pS.js} +63 -46
  5. package/dist/cjs/chunks/{Card-Ctwbhu26.js → Card-AgEMKJ4O.js} +1 -1
  6. package/dist/cjs/chunks/{CheckBox-CeDIiSvi.js → CheckBox-CLMxlUff.js} +1 -1
  7. package/dist/cjs/chunks/{Chip-DdTtB57x.js → Chip-CIy_Xe3i.js} +1 -1
  8. package/dist/cjs/chunks/{DropDown-CC90XfyD.js → DropDown-FZb52YxR.js} +1 -1
  9. package/dist/cjs/chunks/{FileList-ClTfGKIL.js → FileList-CkpMj-os.js} +1 -1
  10. package/dist/cjs/chunks/{Grouper-jiYhVC82.js → Grouper-Bgc1wrQM.js} +1 -1
  11. package/dist/cjs/chunks/{IconButton-BiUfqoPb.js → IconButton-CBWmUZxR.js} +1 -1
  12. package/dist/cjs/chunks/{ProgressIndicator-B3-OxGYF.js → ProgressIndicator-DVD-gD3T.js} +1 -1
  13. package/dist/cjs/chunks/{PromptInput-Dsziepzs.js → PromptInput-DULf5ock.js} +1 -1
  14. package/dist/cjs/chunks/{RadioButton-i5n_nNV5.js → RadioButton-Ce9uf54a.js} +1 -1
  15. package/dist/cjs/chunks/{RadioButtonList-BCdk-5aD.js → RadioButtonList-dhPr-Uhs.js} +1 -1
  16. package/dist/cjs/chunks/SSEConnection-B_yE8cXz.js +140 -0
  17. package/dist/cjs/chunks/{TabBar-BF5CvZ-v.js → TabBar-DuwypMB6.js} +1 -1
  18. package/dist/cjs/chunks/{TextArea-BmOomEKp.js → TextArea-BJCjRUEG.js} +1 -1
  19. package/dist/cjs/chunks/{TextField-CXMyCClp.js → TextField-CjT26H_6.js} +18 -16
  20. package/dist/cjs/chunks/{Toast-CQ0-yuzl.js → Toast-DMUM1wuL.js} +1 -1
  21. package/dist/cjs/chunks/{UploadArea-B5Xvp0H4.js → UploadArea-BE6but3t.js} +1 -1
  22. package/dist/cjs/chunks/WSConnection-DCBuJGmb.js +206 -0
  23. package/dist/cjs/chunks/{_types-Cxk9tRiB.js → _types-C_zOsCbB.js} +57 -50
  24. package/dist/cjs/chunks/colors-uej0anrN.js +27 -0
  25. package/dist/cjs/chunks/sseStore-CIIeshjm.js +59 -0
  26. package/dist/cjs/chunks/windowStore-CCxCOUqa.js +156 -0
  27. package/dist/cjs/components/Button/index.js +3 -3
  28. package/dist/cjs/components/ButtonBar/index.js +3 -3
  29. package/dist/cjs/components/Camera/index.js +4 -4
  30. package/dist/cjs/components/Card/index.js +2 -2
  31. package/dist/cjs/components/CheckBox/index.js +2 -2
  32. package/dist/cjs/components/Chip/index.js +2 -2
  33. package/dist/cjs/components/DropDown/index.js +2 -2
  34. package/dist/cjs/components/FileList/index.js +3 -3
  35. package/dist/cjs/components/Grouper/index.js +2 -2
  36. package/dist/cjs/components/Icon/index.js +1 -1
  37. package/dist/cjs/components/IconButton/index.js +2 -2
  38. package/dist/cjs/components/Progress/index.js +2 -2
  39. package/dist/cjs/components/PromptInput/index.js +5 -5
  40. package/dist/cjs/components/RadioButton/index.js +2 -2
  41. package/dist/cjs/components/RadioButtonList/index.js +3 -3
  42. package/dist/cjs/components/TabBar/index.js +3 -3
  43. package/dist/cjs/components/TextArea/index.js +4 -4
  44. package/dist/cjs/components/Textfield/index.js +5 -5
  45. package/dist/cjs/components/Toast/index.js +2 -2
  46. package/dist/cjs/components/UploadArea/index.js +4 -4
  47. package/dist/cjs/hooks/useWindow.js +46 -11
  48. package/dist/cjs/index.js +2 -2
  49. package/dist/cjs/stores/SSE.js +9 -0
  50. package/dist/cjs/stores/WS.js +62 -0
  51. package/dist/cjs/stores/window.js +14 -3
  52. package/dist/cjs/stores.js +20 -5
  53. package/dist/cjs/utils/index.js +4 -26
  54. package/dist/cjs/utils/objects/index.js +6 -0
  55. package/dist/esm/chunks/{Avatar-BQT1r-Ge.mjs → Avatar-CDMV6f9w.mjs} +1 -1
  56. package/dist/esm/chunks/{AvatarGroup-B787aNtD.mjs → AvatarGroup-BZ18GwhK.mjs} +1 -1
  57. package/dist/esm/chunks/{Button-1MgE-kl9.mjs → Button-kXFJmcKv.mjs} +5 -3
  58. package/dist/esm/chunks/{ButtonBar-Eahfd-40.mjs → ButtonBar-DIsqJmrS.mjs} +1 -1
  59. package/dist/esm/chunks/{Camera-Bvoug1KF.mjs → Camera-BvJJ5cd-.mjs} +65 -48
  60. package/dist/esm/chunks/{Card-RSZhXncV.mjs → Card-DjHdCav5.mjs} +1 -1
  61. package/dist/esm/chunks/{CheckBox-CfLedK0e.mjs → CheckBox-C1LPehvl.mjs} +1 -1
  62. package/dist/esm/chunks/{Chip-Db4N0WVH.mjs → Chip-ByaaWpFx.mjs} +1 -1
  63. package/dist/esm/chunks/{DivInput-BEpjdfu4.mjs → DivInput-B7BliU1p.mjs} +1 -1
  64. package/dist/esm/chunks/{DrggablePanel-DJm1Mx5u.mjs → DrggablePanel-DvactFf5.mjs} +1 -1
  65. package/dist/esm/chunks/{DropDown-ryz3GK81.mjs → DropDown-CM01mO_W.mjs} +1 -1
  66. package/dist/esm/chunks/{FileIcon-_mK2EcB2.mjs → FileIcon-CC_k5dUW.mjs} +1 -1
  67. package/dist/esm/chunks/{FileList-hCMTALyN.mjs → FileList-Bon537-t.mjs} +4 -4
  68. package/dist/esm/chunks/{Grouper-B1gjd3Sx.mjs → Grouper-DNmAYWdR.mjs} +1 -1
  69. package/dist/esm/chunks/{IconButton-SyRu990z.mjs → IconButton-C8RBNFzh.mjs} +1 -1
  70. package/dist/esm/chunks/{Label-DGOkB_Px.mjs → Label-DOvquc82.mjs} +1 -1
  71. package/dist/esm/chunks/{Pager-BA0lD9mI.mjs → Pager-BX4TMwD_.mjs} +1 -1
  72. package/dist/esm/chunks/{ProgressIndicator-BayyosKr.mjs → ProgressIndicator-D2eairZl.mjs} +1 -1
  73. package/dist/esm/chunks/{PromptInput-CUXCuYVA.mjs → PromptInput-DXFAZspz.mjs} +2 -2
  74. package/dist/esm/chunks/{RadioButton-BRFSVtmm.mjs → RadioButton-_lo_FJ8g.mjs} +2 -2
  75. package/dist/esm/chunks/{RadioButtonList-D6a_EcB6.mjs → RadioButtonList-CLHJxrI_.mjs} +1 -1
  76. package/dist/esm/chunks/SSEConnection-Dj9P0SWE.mjs +140 -0
  77. package/dist/esm/chunks/{Slider-D2XVyi2g.mjs → Slider-Bih21QiT.mjs} +1 -1
  78. package/dist/esm/chunks/{TabBar-BqajqueL.mjs → TabBar-CDDzA_m1.mjs} +2 -2
  79. package/dist/esm/chunks/{TextArea-C5EbLAN1.mjs → TextArea-DBmM6aQm.mjs} +1 -1
  80. package/dist/esm/chunks/{TextField-DnQxDxus.mjs → TextField-DyUTMegV.mjs} +20 -18
  81. package/dist/esm/chunks/{Tip-B64Pa9eq.mjs → Tip-B-cDOFvV.mjs} +1 -1
  82. package/dist/esm/chunks/{Toast-B3GgzcTW.mjs → Toast-ovxR12_-.mjs} +2 -2
  83. package/dist/esm/chunks/{UploadArea-DpWT-5DA.mjs → UploadArea-tT5V8q23.mjs} +4 -4
  84. package/dist/esm/chunks/WSConnection-DlYSitff.mjs +206 -0
  85. package/dist/esm/chunks/{_types-DGDKmYIh.mjs → _types-CTmvSEX0.mjs} +36 -29
  86. package/dist/esm/chunks/colors-DR9fLI5X.mjs +30 -0
  87. package/dist/esm/chunks/{misc-Osk7tIah.mjs → misc-cg9I7drO.mjs} +1 -1
  88. package/dist/esm/chunks/sseStore-DdqmnAAf.mjs +56 -0
  89. package/dist/esm/chunks/windowStore-BOTh1g37.mjs +148 -0
  90. package/dist/esm/components/Avatar/index.mjs +2 -2
  91. package/dist/esm/components/AvatarGroup/index.mjs +3 -3
  92. package/dist/esm/components/Button/index.mjs +4 -4
  93. package/dist/esm/components/ButtonBar/index.mjs +4 -4
  94. package/dist/esm/components/Camera/index.mjs +5 -5
  95. package/dist/esm/components/Card/index.mjs +3 -3
  96. package/dist/esm/components/CheckBox/index.mjs +3 -3
  97. package/dist/esm/components/Chip/index.mjs +3 -3
  98. package/dist/esm/components/DivInput/index.mjs +2 -2
  99. package/dist/esm/components/DraggablePanel/index.mjs +2 -2
  100. package/dist/esm/components/DropDown/index.mjs +3 -3
  101. package/dist/esm/components/FileIcon/index.mjs +2 -2
  102. package/dist/esm/components/FileList/index.mjs +5 -5
  103. package/dist/esm/components/Grouper/index.mjs +3 -3
  104. package/dist/esm/components/Icon/index.mjs +2 -2
  105. package/dist/esm/components/IconButton/index.mjs +3 -3
  106. package/dist/esm/components/Label/index.mjs +2 -2
  107. package/dist/esm/components/Pager/index.mjs +2 -2
  108. package/dist/esm/components/Progress/index.mjs +3 -3
  109. package/dist/esm/components/PromptInput/index.mjs +7 -7
  110. package/dist/esm/components/RadioButton/index.mjs +3 -3
  111. package/dist/esm/components/RadioButtonList/index.mjs +4 -4
  112. package/dist/esm/components/Slider/index.mjs +2 -2
  113. package/dist/esm/components/TabBar/index.mjs +4 -4
  114. package/dist/esm/components/TextArea/index.mjs +5 -5
  115. package/dist/esm/components/Textfield/index.mjs +6 -6
  116. package/dist/esm/components/Tip/index.mjs +2 -2
  117. package/dist/esm/components/Toast/index.mjs +3 -3
  118. package/dist/esm/components/UploadArea/index.mjs +6 -6
  119. package/dist/esm/hooks/useTrackRenders.mjs +1 -1
  120. package/dist/esm/hooks/useWindow.mjs +47 -11
  121. package/dist/esm/index.mjs +31 -31
  122. package/dist/esm/stores/SSE.mjs +7 -0
  123. package/dist/esm/stores/WS.mjs +59 -0
  124. package/dist/esm/stores/window.mjs +3 -1
  125. package/dist/esm/stores.mjs +6 -2
  126. package/dist/esm/utils/index.mjs +6 -30
  127. package/dist/esm/utils/objects/index.mjs +5 -0
  128. package/dist/types/components/Camera/_types.d.ts +1 -0
  129. package/dist/types/components/Icon/_types.d.ts +1 -0
  130. package/dist/types/hooks/index.d.ts +1 -1
  131. package/dist/types/hooks/useWindow/useWindow.d.ts +19 -0
  132. package/dist/types/index.d.ts +1 -1
  133. package/dist/types/stores/SSE/_types.d.ts +17 -0
  134. package/dist/types/stores/SSE/index.d.ts +2 -0
  135. package/dist/types/stores/SSE/sseStore.d.ts +28 -0
  136. package/dist/types/stores/WS/_types.d.ts +17 -0
  137. package/dist/types/stores/WS/index.d.ts +2 -0
  138. package/dist/types/stores/WS/wsStore.d.ts +19 -0
  139. package/dist/types/stores/index.d.ts +1 -0
  140. package/dist/types/stores/window/_types.d.ts +5 -0
  141. package/dist/types/stores/window/index.d.ts +3 -2
  142. package/dist/types/stores/window/windowStore.d.ts +8 -0
  143. package/dist/types/utils/index.d.ts +2 -0
  144. package/dist/types/utils/objects/SSEConnection/SSEConnection.d.ts +166 -0
  145. package/dist/types/utils/objects/WSConnection/WSConnection.d.ts +147 -0
  146. package/dist/types/utils/objects/index.d.ts +4 -0
  147. package/package.json +6 -1
  148. package/dist/cjs/chunks/windowStore-RaJswiHM.js +0 -70
  149. package/dist/esm/chunks/windowStore-CwW0i_le.mjs +0 -71
@@ -1,4 +1,4 @@
1
- export { R as RadioButton } from "../../chunks/RadioButton-BRFSVtmm.mjs";
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-Osk7tIah.mjs";
9
+ import "../../chunks/misc-cg9I7drO.mjs";
10
10
 
11
- import "../../chunks/_types-DGDKmYIh.mjs";
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-D6a_EcB6.mjs";
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-BRFSVtmm.mjs";
9
+ import "../../chunks/RadioButton-_lo_FJ8g.mjs";
10
10
 
11
- import "../../chunks/misc-Osk7tIah.mjs";
11
+ import "../../chunks/misc-cg9I7drO.mjs";
12
12
 
13
- import "../../chunks/_types-DGDKmYIh.mjs";
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-D2XVyi2g.mjs";
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-Osk7tIah.mjs";
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-BqajqueL.mjs";
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-DGDKmYIh.mjs";
31
+ import "../../chunks/_types-CTmvSEX0.mjs";
32
32
 
33
- import "../../chunks/misc-Osk7tIah.mjs";
33
+ import "../../chunks/misc-cg9I7drO.mjs";
34
34
 
35
- import "../../chunks/IconButton-SyRu990z.mjs";
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-C5EbLAN1.mjs";
1
+ export { T as TextArea } from "../../chunks/TextArea-DBmM6aQm.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-1MgE-kl9.mjs";
9
+ import "../../chunks/Button-kXFJmcKv.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-DGDKmYIh.mjs";
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-Osk7tIah.mjs";
39
+ import "../../chunks/misc-cg9I7drO.mjs";
40
40
 
41
- import "../../chunks/ProgressIndicator-BayyosKr.mjs";
41
+ import "../../chunks/ProgressIndicator-D2eairZl.mjs";
42
42
 
43
43
  import "../../chunks/sharedTypes-tn9-uJvb.mjs";
@@ -1,4 +1,4 @@
1
- export { T as TextField } from "../../chunks/TextField-DnQxDxus.mjs";
1
+ export { T as TextField } from "../../chunks/TextField-DyUTMegV.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-1MgE-kl9.mjs";
29
+ import "../../chunks/Button-kXFJmcKv.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-DGDKmYIh.mjs";
37
+ import "../../chunks/_types-CTmvSEX0.mjs";
38
38
 
39
- import "../../chunks/misc-Osk7tIah.mjs";
39
+ import "../../chunks/misc-cg9I7drO.mjs";
40
40
 
41
- import "../../chunks/ProgressIndicator-BayyosKr.mjs";
41
+ import "../../chunks/ProgressIndicator-D2eairZl.mjs";
42
42
 
43
43
  import "../../chunks/sharedTypes-tn9-uJvb.mjs";
44
44
 
45
- import "../../chunks/IconButton-SyRu990z.mjs";
45
+ import "../../chunks/IconButton-C8RBNFzh.mjs";
@@ -1,4 +1,4 @@
1
- export { T as Tip } from "../../chunks/Tip-B64Pa9eq.mjs";
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-Osk7tIah.mjs";
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-B3GgzcTW.mjs";
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-Osk7tIah.mjs";
29
+ import "../../chunks/misc-cg9I7drO.mjs";
30
30
 
31
- import "../../chunks/_types-DGDKmYIh.mjs";
31
+ import "../../chunks/_types-CTmvSEX0.mjs";
32
32
 
33
33
  import "../../chunks/style-inject.es-D0BjEaN8.mjs";
@@ -1,14 +1,14 @@
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-DpWT-5DA.mjs";
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-tT5V8q23.mjs";
2
2
 
3
3
  import "react/jsx-runtime";
4
4
 
5
5
  import "react";
6
6
 
7
- import "../../chunks/misc-Osk7tIah.mjs";
7
+ import "../../chunks/misc-cg9I7drO.mjs";
8
8
 
9
9
  import "../../chunks/tslib.es6-c-7TIv71.mjs";
10
10
 
11
- import "../../chunks/_types-DGDKmYIh.mjs";
11
+ import "../../chunks/_types-CTmvSEX0.mjs";
12
12
 
13
13
  import "../../hooks/useTheme.mjs";
14
14
 
@@ -30,10 +30,10 @@ import "../../hooks/useWindow.mjs";
30
30
 
31
31
  import "../../chunks/style-inject.es-D0BjEaN8.mjs";
32
32
 
33
- import "../../chunks/ProgressIndicator-BayyosKr.mjs";
33
+ import "../../chunks/ProgressIndicator-D2eairZl.mjs";
34
34
 
35
35
  import "motion/react";
36
36
 
37
- import "../../chunks/FileList-hCMTALyN.mjs";
37
+ import "../../chunks/FileList-Bon537-t.mjs";
38
38
 
39
- import "../../chunks/FileIcon-_mK2EcB2.mjs";
39
+ import "../../chunks/FileIcon-CC_k5dUW.mjs";
@@ -1,6 +1,6 @@
1
1
  import { useRef, useEffect } from "react";
2
2
 
3
- import { d as debug } from "../chunks/misc-Osk7tIah.mjs";
3
+ import { d as debug } from "../chunks/misc-cg9I7drO.mjs";
4
4
 
5
5
  import "../chunks/tslib.es6-c-7TIv71.mjs";
6
6
 
@@ -1,10 +1,10 @@
1
1
  import { useState, useEffect, useCallback } from "react";
2
2
 
3
- var _a, FormFactor;
4
-
5
3
  /**
6
4
  * Form factor names
7
- */ !function(FormFactor) {
5
+ */ var FormFactor;
6
+
7
+ !function(FormFactor) {
8
8
  FormFactor.Mobile = "mobile", FormFactor.Tablet = "tablet", FormFactor.Desktop = "desktop",
9
9
  FormFactor.DesktopL = "desktopL", FormFactor.DesktopXL = "desktopXL";
10
10
  }(FormFactor || (FormFactor = {}));
@@ -18,19 +18,50 @@ const bootstrapBreakPoints = {
18
18
  [FormFactor.Desktop]: 992,
19
19
  [FormFactor.DesktopL]: 1200,
20
20
  [FormFactor.DesktopXL]: 1400
21
- };
22
-
23
- const isElectron = navigator.userAgent.toLowerCase().includes("electron/"), isAppleDevice = navigator.platform.startsWith("Mac") || "iPhone" === navigator.platform, dpr = null !== (_a = Math.min(Math.ceil(window.devicePixelRatio), 3)) && void 0 !== _a ? _a : 1, isTouchDevice = "ontouchstart" in globalThis || navigator.maxTouchPoints > 0, orderedBps = Object.entries(bootstrapBreakPoints).sort((a, b) => -b[1] - a[1]);
21
+ }, isBrowser = "undefined" != typeof window && "undefined" != typeof navigator;
24
22
 
25
23
  function useWindow(breakpoints = bootstrapBreakPoints, top = !0) {
26
- const [viewportWidth, setViewportWidth] = useState(null), [viewportHeight, setViewportHeight] = useState(null), [height, setHeight] = useState("100vh"), [formFactor, setFormFactor] = useState(FormFactor.Desktop);
27
- useEffect(() => (handleResize(), window.addEventListener("resize", handleResize, !1),
28
- () => window.removeEventListener("resize", handleResize, !1)), []);
24
+ const isElectron = !!isBrowser && navigator.userAgent.toLowerCase().includes("electron/"), isAppleDevice = !!isBrowser && (navigator.platform.startsWith("Mac") || "iPhone" === navigator.platform), isTouchDevice = !!isBrowser && ("ontouchstart" in globalThis || navigator.maxTouchPoints > 0), dpr = isBrowser && null !== (_a = Math.min(Math.ceil(window.devicePixelRatio), 3)) && void 0 !== _a ? _a : 1;
25
+ var _a;
26
+ const [viewportWidth, setViewportWidth] = useState(null), [viewportHeight, setViewportHeight] = useState(null), [height, setHeight] = useState("100vh"), [formFactor, setFormFactor] = useState(FormFactor.Desktop), [location, setLocation] = useState(null), [locationError, setLocationError] = useState(null), [gettingLocation, setGettingLocation] = useState(!1), geolocationSupported = "undefined" != typeof navigator && "geolocation" in navigator;
27
+ useEffect(() => {
28
+ if (isBrowser) return handleResize(), window.addEventListener("resize", handleResize, !1),
29
+ () => window.removeEventListener("resize", handleResize, !1);
30
+ }, []);
29
31
  const getFormFactor = useCallback(width => {
30
32
  if (!width || width <= 0) return FormFactor.Mobile;
33
+ const orderedBps = Object.entries(breakpoints).sort((a, b) => b[1] - a[1]);
31
34
  for (const [formFactor, breakpoint] of orderedBps) if (width >= breakpoint) return formFactor;
32
35
  return FormFactor.Mobile;
33
- }, []);
36
+ }, [ breakpoints ]), requestGeolocation = useCallback(() => {
37
+ if (!geolocationSupported) {
38
+ const error = new Error("Geolocation is not supported in this browser.", {
39
+ cause: {
40
+ code: 0
41
+ }
42
+ });
43
+ return void setLocationError(error);
44
+ }
45
+ setGettingLocation(!0), setLocationError(null), navigator.geolocation.getCurrentPosition(position => {
46
+ setLocation({
47
+ latitude: position.coords.latitude,
48
+ longitude: position.coords.longitude,
49
+ accuracy: position.coords.accuracy,
50
+ altitude: position.coords.altitude,
51
+ altitudeAccuracy: position.coords.altitudeAccuracy,
52
+ heading: position.coords.heading,
53
+ speed: position.coords.speed,
54
+ timestamp: position.timestamp
55
+ }), setGettingLocation(!1);
56
+ }, err => {
57
+ const error = new Error(err.message, {
58
+ cause: {
59
+ code: err.code
60
+ }
61
+ });
62
+ setLocationError(error), setGettingLocation(!1);
63
+ });
64
+ }, [ geolocationSupported ]);
34
65
  function handleResize() {
35
66
  var _a, _b, _c, _d;
36
67
  const windowWidth = top && null !== (_b = null === (_a = window.top) || void 0 === _a ? void 0 : _a.innerWidth) && void 0 !== _b ? _b : window.innerWidth, windowHeight = top && null !== (_d = null === (_c = window.top) || void 0 === _c ? void 0 : _c.innerHeight) && void 0 !== _d ? _d : window.innerHeight;
@@ -45,7 +76,12 @@ function useWindow(breakpoints = bootstrapBreakPoints, top = !0) {
45
76
  isElectron: isElectron,
46
77
  isAppleDevice: isAppleDevice,
47
78
  formFactor: formFactor,
48
- dpr: dpr
79
+ dpr: dpr,
80
+ geolocationSupported: geolocationSupported,
81
+ location: location,
82
+ locationError: locationError,
83
+ gettingLocation: gettingLocation,
84
+ requestGeolocation: requestGeolocation
49
85
  };
50
86
  }
51
87
 
@@ -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-BQT1r-Ge.mjs";
29
+ export { A as Avatar } from "./chunks/Avatar-CDMV6f9w.mjs";
30
30
 
31
- export { A as AvatarGroup } from "./chunks/AvatarGroup-B787aNtD.mjs";
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-SyRu990z.mjs";
35
+ export { I as IconButton } from "./chunks/IconButton-C8RBNFzh.mjs";
36
36
 
37
- export { C as Camera } from "./chunks/Camera-Bvoug1KF.mjs";
37
+ export { C as Camera } from "./chunks/Camera-BvJJ5cd-.mjs";
38
38
 
39
- export { C as CheckBox } from "./chunks/CheckBox-CfLedK0e.mjs";
39
+ export { C as CheckBox } from "./chunks/CheckBox-C1LPehvl.mjs";
40
40
 
41
- export { D as DivInput } from "./chunks/DivInput-BEpjdfu4.mjs";
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-DJm1Mx5u.mjs";
47
+ export { D as DraggablePanel } from "./chunks/DrggablePanel-DvactFf5.mjs";
48
48
 
49
- export { D as DropDown } from "./chunks/DropDown-ryz3GK81.mjs";
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-B1gjd3Sx.mjs";
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-BA0lD9mI.mjs";
59
+ export { P as Pager } from "./chunks/Pager-BX4TMwD_.mjs";
60
60
 
61
- export { P as PromptInput } from "./chunks/PromptInput-CUXCuYVA.mjs";
61
+ export { P as PromptInput } from "./chunks/PromptInput-DXFAZspz.mjs";
62
62
 
63
- export { D as DoneCheck, P as ProgressIndicator } from "./chunks/ProgressIndicator-BayyosKr.mjs";
63
+ export { D as DoneCheck, P as ProgressIndicator } from "./chunks/ProgressIndicator-D2eairZl.mjs";
64
64
 
65
- export { R as RadioButton } from "./chunks/RadioButton-BRFSVtmm.mjs";
65
+ export { R as RadioButton } from "./chunks/RadioButton-_lo_FJ8g.mjs";
66
66
 
67
- export { R as RadioButtonList } from "./chunks/RadioButtonList-D6a_EcB6.mjs";
67
+ export { R as RadioButtonList } from "./chunks/RadioButtonList-CLHJxrI_.mjs";
68
68
 
69
- export { S as Slider } from "./chunks/Slider-D2XVyi2g.mjs";
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-BqajqueL.mjs";
75
+ export { T as TabBar } from "./chunks/TabBar-CDDzA_m1.mjs";
76
76
 
77
- export { T as TextArea } from "./chunks/TextArea-C5EbLAN1.mjs";
77
+ export { T as TextArea } from "./chunks/TextArea-DBmM6aQm.mjs";
78
78
 
79
- export { T as TextField } from "./chunks/TextField-DnQxDxus.mjs";
79
+ export { T as TextField } from "./chunks/TextField-DyUTMegV.mjs";
80
80
 
81
81
  export { ThemeProvider } from "./providers/ThemeProvider.mjs";
82
82
 
83
- export { T as Tip } from "./chunks/Tip-B64Pa9eq.mjs";
83
+ export { T as Tip } from "./chunks/Tip-B-cDOFvV.mjs";
84
84
 
85
- export { T as Toast, a as ToastType } from "./chunks/Toast-B3GgzcTW.mjs";
85
+ export { T as Toast, a as ToastType } from "./chunks/Toast-ovxR12_-.mjs";
86
86
 
87
- export { B as Button } from "./chunks/Button-1MgE-kl9.mjs";
87
+ export { B as Button } from "./chunks/Button-kXFJmcKv.mjs";
88
88
 
89
- export { C as Chip } from "./chunks/Chip-Db4N0WVH.mjs";
89
+ export { C as Chip } from "./chunks/Chip-ByaaWpFx.mjs";
90
90
 
91
- export { F as FileIcon, a as FileIconNames } from "./chunks/FileIcon-_mK2EcB2.mjs";
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-DGDKmYIh.mjs";
93
+ export { I as Icon, a as IconNames } from "./chunks/_types-CTmvSEX0.mjs";
94
94
 
95
- export { B as ButtonBar } from "./chunks/ButtonBar-Eahfd-40.mjs";
95
+ export { B as ButtonBar } from "./chunks/ButtonBar-DIsqJmrS.mjs";
96
96
 
97
- export { C as Card } from "./chunks/Card-RSZhXncV.mjs";
97
+ export { C as Card } from "./chunks/Card-DjHdCav5.mjs";
98
98
 
99
- export { L as Label } from "./chunks/Label-DGOkB_Px.mjs";
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-DpWT-5DA.mjs";
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-tT5V8q23.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-Osk7tIah.mjs";
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 "./utils/index.mjs";
119
+ import "./chunks/colors-DR9fLI5X.mjs";
120
120
 
121
- import "./chunks/FileList-hCMTALyN.mjs";
121
+ import "./chunks/FileList-Bon537-t.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-DdqmnAAf.mjs";
2
+
3
+ import "zustand";
4
+
5
+ import "../chunks/tslib.es6-c-7TIv71.mjs";
6
+
7
+ import "../chunks/SSEConnection-Dj9P0SWE.mjs";
@@ -0,0 +1,59 @@
1
+ import { create } from "zustand";
2
+
3
+ import "../chunks/tslib.es6-c-7TIv71.mjs";
4
+
5
+ import { W as WSConnection } from "../chunks/WSConnection-DlYSitff.mjs";
6
+
7
+ const useWSStore = create((set, get) => ({
8
+ connections: [],
9
+ message: null,
10
+ closedConnection: null,
11
+ actions: {
12
+ addConnection: (name, options) => {
13
+ const existingConnection = get().connections.find(c => c.name === name);
14
+ null == existingConnection || existingConnection.connection.close({
15
+ code: 1e3,
16
+ reason: "Connection replaced"
17
+ });
18
+ const userOnMessageCallback = options.onMessageCallback, connection = new WSConnection(Object.assign(Object.assign({}, options), {
19
+ unifiedMessages: !0,
20
+ onMessageCallback: message => {
21
+ set({
22
+ message: message
23
+ }), null == userOnMessageCallback || userOnMessageCallback(message), "close" === message.type && set({
24
+ closedConnection: name
25
+ });
26
+ }
27
+ })), nextConnection = {
28
+ name: name,
29
+ connection: connection
30
+ };
31
+ return set(state => ({
32
+ connections: [ ...state.connections.filter(connection => connection.name !== name), nextConnection ]
33
+ })), nextConnection;
34
+ },
35
+ removeConnection: name => {
36
+ const existingConnection = get().connections.find(c => c.name === name);
37
+ existingConnection && (existingConnection.connection.close({
38
+ code: 1e3,
39
+ reason: "Connection removed"
40
+ }), set(state => ({
41
+ connections: state.connections.filter(connection => connection.name !== name)
42
+ })));
43
+ }
44
+ }
45
+ })), useWS = () => useWSStore(state => state.actions), useConnectionClose = () => useWSStore(state => state.closedConnection), useConnectionMessage = connection => useWSStore(state => state.connections.some(entry => entry.name === connection) ? state.message : null), useIsConnected = connection => useWSStore(state => {
46
+ var _a, _b;
47
+ return connection ? null !== (_b = null === (_a = state.connections.find(entry => entry.name === connection)) || void 0 === _a ? void 0 : _a.connection.connected) && void 0 !== _b && _b : state.connections.some(entry => entry.connection.connected);
48
+ });
49
+
50
+ function useMessage(type, connection) {
51
+ return useWSStore(state => {
52
+ const sourceMessage = connection && !state.connections.some(c => c.name === connection) ? null : state.message;
53
+ return type ? (null == sourceMessage ? void 0 : sourceMessage.type) !== type ? null : "open" === type || "error" === type || "close" === type ? "event" in sourceMessage ? sourceMessage.event : null : "data" in sourceMessage ? sourceMessage.data : null : sourceMessage;
54
+ });
55
+ }
56
+
57
+ const useWSActions = useWSStore.getState().actions, useLastWSMessage = () => useWSStore.getState().message;
58
+
59
+ export { useConnectionClose, useConnectionMessage, useIsConnected, useLastWSMessage, useMessage, useWS, useWSActions, useWSStore };
@@ -1,3 +1,5 @@
1
- export { F as FormFactor, u as useWindowStore } from "../chunks/windowStore-CwW0i_le.mjs";
1
+ export { F as FormFactor, d as dpr, f as formFactor, g as gettingLocation, i as isAppleDevice, a as isElectron, b as isTouchDevice, l as location, c as locationError, u as useDpr, e as useFormFactor, h as useGetLocation, j as useGettingLocation, k as useInitializeWindow, m as useIsAppleDevice, n as useIsElectron, o as useIsTouchDevice, p as useLocation, q as useLocationError, r as useViewportHeight, s as useViewportWidth, t as useWindowStore, v as viewportHeight, w as viewportWidth } from "../chunks/windowStore-BOTh1g37.mjs";
2
+
3
+ import "../chunks/tslib.es6-c-7TIv71.mjs";
2
4
 
3
5
  import "zustand";
@@ -1,4 +1,4 @@
1
- export { F as FormFactor, u as useWindowStore } from "./chunks/windowStore-CwW0i_le.mjs";
1
+ export { F as FormFactor, d as dpr, f as formFactor, g as gettingLocation, i as isAppleDevice, a as isElectron, b as isTouchDevice, l as location, c as locationError, u as useDpr, e as useFormFactor, h as useGetLocation, j as useGettingLocation, k as useInitializeWindow, m as useIsAppleDevice, n as useIsElectron, o as useIsTouchDevice, p as useLocation, q as useLocationError, r as useViewportHeight, s as useViewportWidth, t as useWindowStore, v as viewportHeight, w as viewportWidth } from "./chunks/windowStore-BOTh1g37.mjs";
2
2
 
3
3
  export { c as createUploadsWorker, g as getUploads, a as getUploadsError, b as getUploadsWorkerStatus, u as uploadsActions, d as uploadsInitialized, e as useUploads, f as useUploadsActions, h as useUploadsError, i as useUploadsInitialized, j as useUploadsStore, k as useUploadsWorkerStatus } from "./chunks/uploadsStore-D69fEXMY.mjs";
4
4
 
@@ -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-DdqmnAAf.mjs";
10
+
11
+ import "./chunks/tslib.es6-c-7TIv71.mjs";
12
+
9
13
  import "zustand";
10
14
 
11
15
  import "./chunks/uploads-worker-Dv-4zGnC.mjs";
12
16
 
13
- import "./chunks/tslib.es6-c-7TIv71.mjs";
17
+ import "./chunks/SSEConnection-Dj9P0SWE.mjs";
@@ -1,33 +1,9 @@
1
- export { b as copyToClipboard } from "../chunks/misc-Osk7tIah.mjs";
1
+ export { c as copyToClipboard } from "../chunks/misc-cg9I7drO.mjs";
2
2
 
3
- import "../chunks/tslib.es6-c-7TIv71.mjs";
3
+ export { a as addOpacity, t as tintFromColor } from "../chunks/colors-DR9fLI5X.mjs";
4
+
5
+ export { S as SSEConnection } from "../chunks/SSEConnection-Dj9P0SWE.mjs";
4
6
 
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
- };
7
+ export { W as WSConnection } from "../chunks/WSConnection-DlYSitff.mjs";
30
8
 
31
- /**
32
- * Adds the desired opacity level to a hex or RGB color string
33
- */ export { addOpacity, tintFromColor };
9
+ import "../chunks/tslib.es6-c-7TIv71.mjs";
@@ -0,0 +1,5 @@
1
+ export { S as SSEConnection } from "../../chunks/SSEConnection-Dj9P0SWE.mjs";
2
+
3
+ export { W as WSConnection } from "../../chunks/WSConnection-DlYSitff.mjs";
4
+
5
+ import "../../chunks/tslib.es6-c-7TIv71.mjs";
@@ -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;
@@ -17,6 +17,7 @@ export declare enum IconNames {
17
17
  mic = "mic",
18
18
  micMuted = "mic muted",
19
19
  camera = "camera",
20
+ videoOff = "video off",
20
21
  home = "home",
21
22
  inbox = "inbox",
22
23
  sparkle = "sparkle",
@@ -5,5 +5,5 @@ export { useToolTip } from './useToolTip/useToolTip';
5
5
  export { type KeyboardShortcut, type KeyboardShortcuts, useKeyboardShortcuts, } from './useKeyboardShortcuts/useKeyboardShortcuts';
6
6
  export { useLastUpdated } from './useLastUpdated/useLastUpdated';
7
7
  export { useLocalStore } from './useLocalStore/useLocalStore';
8
- export { useWindow, FormFactor, type BreakPoints } from './useWindow/useWindow';
8
+ export { useWindow, FormFactor, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, } from './useWindow/useWindow';
9
9
  export { useObserveResize } from './useObserveResize/useObserveResize';
@@ -12,6 +12,20 @@ export declare enum FormFactor {
12
12
  * Breakpoint type matching form factor to width value
13
13
  */
14
14
  export type BreakPoints = Record<FormFactor, number>;
15
+ export type WindowGeolocation = {
16
+ latitude: number;
17
+ longitude: number;
18
+ accuracy: number;
19
+ altitude: number | null;
20
+ altitudeAccuracy: number | null;
21
+ heading: number | null;
22
+ speed: number | null;
23
+ timestamp: number;
24
+ };
25
+ export type WindowGeolocationError = {
26
+ code: number;
27
+ message: string;
28
+ };
15
29
  export declare function useWindow(breakpoints?: BreakPoints, top?: boolean): {
16
30
  viewportWidth: number | null;
17
31
  viewportHeight: number | null;
@@ -21,4 +35,9 @@ export declare function useWindow(breakpoints?: BreakPoints, top?: boolean): {
21
35
  isAppleDevice: boolean;
22
36
  formFactor: FormFactor;
23
37
  dpr: 2 | 1 | 3;
38
+ geolocationSupported: boolean;
39
+ location: WindowGeolocation | null;
40
+ locationError: Error | null;
41
+ gettingLocation: boolean;
42
+ requestGeolocation: () => void;
24
43
  };