@jenesei-software/jenesei-kit-react 1.3.9 → 1.3.11

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 (347) hide show
  1. package/build/{area-BC64nSGj.js → area-BWxBop5m.js} +2 -2
  2. package/build/area-BWxBop5m.js.map +1 -0
  3. package/build/{area-DRqAofd0.js → area-CD8KKIM0.js} +2 -2
  4. package/build/area-CD8KKIM0.js.map +1 -0
  5. package/build/{area-Dnq78ow6.js → area-CT83tDk-.js} +10 -8
  6. package/build/area-CT83tDk-.js.map +1 -0
  7. package/build/{area-C6QOr2Kd.cjs → area-CmCMHnRA.cjs} +2 -2
  8. package/build/area-CmCMHnRA.cjs.map +1 -0
  9. package/build/{area-C3wR_pPr.cjs → area-DRsIULcw.cjs} +2 -2
  10. package/build/{area-C3wR_pPr.cjs.map → area-DRsIULcw.cjs.map} +1 -1
  11. package/build/{area-D7906bXA.cjs → area-Dup_lUb9.cjs} +2 -2
  12. package/build/area-Dup_lUb9.cjs.map +1 -0
  13. package/build/area-outside.cjs.js +1 -1
  14. package/build/area-outside.es.js +1 -1
  15. package/build/area-preview.cjs.js +1 -1
  16. package/build/area-preview.es.js +1 -1
  17. package/build/{area-CFZW3T1g.js → area-sDVSuS3G.js} +3 -3
  18. package/build/{area-CFZW3T1g.js.map → area-sDVSuS3G.js.map} +1 -1
  19. package/build/area-scroll.cjs.js +1 -1
  20. package/build/area-scroll.d.ts +1 -1
  21. package/build/area-scroll.es.js +1 -1
  22. package/build/area-skeleton.cjs.js +1 -1
  23. package/build/area-skeleton.d.ts +1 -1
  24. package/build/area-skeleton.es.js +1 -1
  25. package/build/area-smooth.cjs.js +1 -1
  26. package/build/area-smooth.d.ts +1 -1
  27. package/build/area-smooth.es.js +1 -1
  28. package/build/area-t259bohc.cjs +2 -0
  29. package/build/area-t259bohc.cjs.map +1 -0
  30. package/build/area.hooks-Bk04M7mk.js.map +1 -1
  31. package/build/area.hooks-C_UKZzcb.cjs.map +1 -1
  32. package/build/build-info.txt +3 -3
  33. package/build/component--jGdo2yq.cjs +2 -0
  34. package/build/component--jGdo2yq.cjs.map +1 -0
  35. package/build/{component--Oo5_3xq.cjs → component-8NOxwZJO.cjs} +2 -2
  36. package/build/component-8NOxwZJO.cjs.map +1 -0
  37. package/build/component-BVnHSTJd.cjs +245 -0
  38. package/build/component-BVnHSTJd.cjs.map +1 -0
  39. package/build/{component-DHq4T6Ku.cjs → component-BhPckvLk.cjs} +2 -2
  40. package/build/component-BhPckvLk.cjs.map +1 -0
  41. package/build/component-CLqcB5mM.cjs.map +1 -1
  42. package/build/{component-C4ULY0c6.js → component-CN6att4f.js} +20 -9
  43. package/build/component-CN6att4f.js.map +1 -0
  44. package/build/component-DHM9pbab.js.map +1 -1
  45. package/build/{component-Bzw_uobM.js → component-DaXKDHnc.js} +48 -7
  46. package/build/component-DaXKDHnc.js.map +1 -0
  47. package/build/component-DnJo66DS.cjs +90 -0
  48. package/build/component-DnJo66DS.cjs.map +1 -0
  49. package/build/{component-BcHiCCC9.js → component-DpVp9dB1.js} +2 -2
  50. package/build/component-DpVp9dB1.js.map +1 -0
  51. package/build/{component-DfxlJBGv.js → component-G5QqAuDV.js} +3 -3
  52. package/build/component-G5QqAuDV.js.map +1 -0
  53. package/build/component-GKvpOWlO.cjs +28 -0
  54. package/build/component-GKvpOWlO.cjs.map +1 -0
  55. package/build/component-GtWqnaqk.js +710 -0
  56. package/build/component-GtWqnaqk.js.map +1 -0
  57. package/build/component-accordion.cjs.js +1 -1
  58. package/build/component-accordion.d.ts +1 -1
  59. package/build/component-accordion.es.js +1 -1
  60. package/build/component-button-group.cjs.js +1 -1
  61. package/build/component-button-group.d.ts +18 -1
  62. package/build/component-button-group.es.js +1 -1
  63. package/build/component-button.cjs.js +1 -1
  64. package/build/component-button.d.ts +21 -2
  65. package/build/component-button.es.js +1 -1
  66. package/build/{component-BiNPQpCQ.cjs → component-cRmWWDr_.cjs} +2 -2
  67. package/build/component-cRmWWDr_.cjs.map +1 -0
  68. package/build/component-checkbox-group.cjs.js +1 -1
  69. package/build/component-checkbox-group.d.ts +20 -3
  70. package/build/component-checkbox-group.es.js +1 -1
  71. package/build/component-checkbox.cjs.js +1 -1
  72. package/build/component-checkbox.d.ts +21 -2
  73. package/build/component-checkbox.es.js +1 -1
  74. package/build/component-date-picker.cjs.js +1 -1
  75. package/build/component-date-picker.d.ts +35 -37
  76. package/build/component-date-picker.es.js +1 -1
  77. package/build/{component-CQ8fy2gK.js → component-feWPgACX.js} +2 -2
  78. package/build/component-feWPgACX.js.map +1 -0
  79. package/build/component-icon.cjs.js +1 -1
  80. package/build/component-icon.es.js +1 -1
  81. package/build/component-image-button.cjs.js +1 -1
  82. package/build/component-image-button.d.ts +18 -1
  83. package/build/component-image-button.es.js +1 -1
  84. package/build/component-image-select.cjs.js +1 -1
  85. package/build/component-image-select.d.ts +18 -1
  86. package/build/component-image-select.es.js +1 -1
  87. package/build/component-image-slider.cjs.js +1 -1
  88. package/build/component-image-slider.d.ts +1 -1
  89. package/build/component-image-slider.es.js +1 -1
  90. package/build/component-image.cjs.js +1 -1
  91. package/build/component-image.es.js +1 -1
  92. package/build/component-input-otp.cjs.js +1 -1
  93. package/build/component-input-otp.d.ts +51 -5
  94. package/build/component-input-otp.es.js +1 -1
  95. package/build/component-input.cjs.js +1 -1
  96. package/build/component-input.d.ts +62 -14
  97. package/build/component-input.es.js +2 -2
  98. package/build/component-map.cjs.js +1 -1
  99. package/build/component-map.es.js +1 -1
  100. package/build/{component-jPZYT5iL.js → component-mzzOCXSx.js} +12 -12
  101. package/build/component-mzzOCXSx.js.map +1 -0
  102. package/build/component-pagination.cjs.js +1 -1
  103. package/build/component-pagination.d.ts +18 -1
  104. package/build/component-pagination.es.js +1 -1
  105. package/build/component-range.cjs.js +1 -1
  106. package/build/component-range.d.ts +50 -4
  107. package/build/component-range.es.js +1 -1
  108. package/build/component-select.cjs.js +1 -1
  109. package/build/component-select.d.ts +48 -7
  110. package/build/component-select.es.js +1 -1
  111. package/build/component-stack.cjs.js +1 -1
  112. package/build/component-stack.d.ts +5 -7
  113. package/build/component-stack.es.js +1 -1
  114. package/build/component-textarea.cjs.js +1 -1
  115. package/build/component-textarea.d.ts +50 -7
  116. package/build/component-textarea.es.js +1 -1
  117. package/build/component-toggle.cjs.js +1 -1
  118. package/build/component-toggle.d.ts +51 -2
  119. package/build/component-toggle.es.js +1 -1
  120. package/build/component-tooltip.cjs.js +1 -1
  121. package/build/component-tooltip.d.ts +14 -2
  122. package/build/component-tooltip.es.js +1 -1
  123. package/build/component-typography.cjs.js +1 -1
  124. package/build/component-typography.d.ts +27 -13
  125. package/build/component-typography.es.js +7 -6
  126. package/build/component-typography.es.js.map +1 -1
  127. package/build/{component.components-DX0DVix5.js → component.components-C-EEYFsd.js} +4 -4
  128. package/build/{component.components-DX0DVix5.js.map → component.components-C-EEYFsd.js.map} +1 -1
  129. package/build/{component.components-H_qAeBHw.cjs → component.components-CC3IeZon.cjs} +2 -2
  130. package/build/{component.components-H_qAeBHw.cjs.map → component.components-CC3IeZon.cjs.map} +1 -1
  131. package/build/{component.constants-DjYLZpyY.js → component.constants-34RZJIiQ.js} +3 -3
  132. package/build/component.constants-34RZJIiQ.js.map +1 -0
  133. package/build/{component.constants-C7DGbAC8.js → component.constants-BxnfHAYp.js} +8 -8
  134. package/build/component.constants-BxnfHAYp.js.map +1 -0
  135. package/build/{component.constants-DwRduxMm.cjs → component.constants-CpRgeAIu.cjs} +3 -3
  136. package/build/component.constants-CpRgeAIu.cjs.map +1 -0
  137. package/build/{component.constants-veAUxKBd.cjs → component.constants-D6AJ1xmO.cjs} +2 -2
  138. package/build/component.constants-D6AJ1xmO.cjs.map +1 -0
  139. package/build/component.functions-D9ffjEok.cjs +8 -0
  140. package/build/component.functions-D9ffjEok.cjs.map +1 -0
  141. package/build/component.functions-DNW6h8kk.js +12 -0
  142. package/build/component.functions-DNW6h8kk.js.map +1 -0
  143. package/build/{component.styles--Ug3PJQ6.cjs → component.styles-4ycgapiT.cjs} +7 -7
  144. package/build/component.styles-4ycgapiT.cjs.map +1 -0
  145. package/build/{component.styles-DLU0S0KI.cjs → component.styles-B-bndnRM.cjs} +2 -2
  146. package/build/component.styles-B-bndnRM.cjs.map +1 -0
  147. package/build/{component.styles-C3hYZJGh.js → component.styles-B0FFHGeN.js} +26 -20
  148. package/build/component.styles-B0FFHGeN.js.map +1 -0
  149. package/build/component.styles-B0L4jbOO.js.map +1 -1
  150. package/build/{component.styles-C1p3V7H6.js → component.styles-BDKsgd6y.js} +32 -19
  151. package/build/component.styles-BDKsgd6y.js.map +1 -0
  152. package/build/{component.styles-Cje8zTpf.cjs → component.styles-BELwxHxh.cjs} +7 -7
  153. package/build/component.styles-BELwxHxh.cjs.map +1 -0
  154. package/build/{component.styles-BirbSbuD.js → component.styles-BEaqQuF_.js} +4 -4
  155. package/build/{component.styles-BirbSbuD.js.map → component.styles-BEaqQuF_.js.map} +1 -1
  156. package/build/{component.styles-DpgkACgI.js → component.styles-BGYbrzvh.js} +2 -2
  157. package/build/component.styles-BGYbrzvh.js.map +1 -0
  158. package/build/{component.styles-DSle6iuF.cjs → component.styles-BKnUDWqO.cjs} +2 -2
  159. package/build/component.styles-BKnUDWqO.cjs.map +1 -0
  160. package/build/component.styles-Bb7_KygZ.cjs +73 -0
  161. package/build/component.styles-Bb7_KygZ.cjs.map +1 -0
  162. package/build/{component.styles-DYS_AJ9F.js → component.styles-BbwS_Ekx.js} +9 -10
  163. package/build/{component.styles-DYS_AJ9F.js.map → component.styles-BbwS_Ekx.js.map} +1 -1
  164. package/build/component.styles-BeRVOt5T.cjs +137 -0
  165. package/build/{component.styles-Crx4pACx.cjs.map → component.styles-BeRVOt5T.cjs.map} +1 -1
  166. package/build/{component.styles-DX_3POUD.js → component.styles-CJC0h3Ed.js} +4 -4
  167. package/build/component.styles-CJC0h3Ed.js.map +1 -0
  168. package/build/{component.styles-CggIUAVx.js → component.styles-CZyAhUtW.js} +21 -10
  169. package/build/component.styles-CZyAhUtW.js.map +1 -0
  170. package/build/component.styles-CsB9986a.cjs +99 -0
  171. package/build/component.styles-CsB9986a.cjs.map +1 -0
  172. package/build/{component.styles-Bm3Ec-Kd.js → component.styles-DS0ofW1Y.js} +3 -3
  173. package/build/{component.styles-Bm3Ec-Kd.js.map → component.styles-DS0ofW1Y.js.map} +1 -1
  174. package/build/component.styles-DTnknwt_.js +94 -0
  175. package/build/component.styles-DTnknwt_.js.map +1 -0
  176. package/build/{component.styles-5Xz_H-fR.js → component.styles-DWS6xT-y.js} +32 -11
  177. package/build/component.styles-DWS6xT-y.js.map +1 -0
  178. package/build/component.styles-DbWj2stq.cjs +21 -0
  179. package/build/component.styles-DbWj2stq.cjs.map +1 -0
  180. package/build/component.styles-Dpg-__rn.cjs.map +1 -1
  181. package/build/component.styles-PNgt36ZD.cjs +225 -0
  182. package/build/component.styles-PNgt36ZD.cjs.map +1 -0
  183. package/build/{component.styles-Bfhg18CX.cjs → component.styles-Py-IeQ2q.cjs} +2 -2
  184. package/build/component.styles-Py-IeQ2q.cjs.map +1 -0
  185. package/build/{component.styles-v0YYECwW.js → component.styles-VrNFgg1_.js} +32 -12
  186. package/build/component.styles-VrNFgg1_.js.map +1 -0
  187. package/build/{component.styles-DhAMCZ71.cjs → component.styles-ZU_GyVub.cjs} +2 -2
  188. package/build/component.styles-ZU_GyVub.cjs.map +1 -0
  189. package/build/component.styles-gZHy-64x.cjs +13 -0
  190. package/build/component.styles-gZHy-64x.cjs.map +1 -0
  191. package/build/{component.styles-5CVyEjEh.js → component.styles-mcm1LgEr.js} +51 -23
  192. package/build/component.styles-mcm1LgEr.js.map +1 -0
  193. package/build/component.types-BBQ18Npa.js.map +1 -1
  194. package/build/{component.types-BzBjcohg.js → component.types-BhmQrqBu.js} +95 -68
  195. package/build/component.types-BhmQrqBu.js.map +1 -0
  196. package/build/component.types-CfR3RBsV.cjs +171 -0
  197. package/build/component.types-CfR3RBsV.cjs.map +1 -0
  198. package/build/component.types-DraGq1j_.cjs.map +1 -1
  199. package/build/context-app.cjs.js +1 -1
  200. package/build/context-app.es.js +1 -1
  201. package/build/context-dialog.cjs.js +1 -1
  202. package/build/context-dialog.d.ts +11 -4
  203. package/build/context-dialog.es.js +1 -1
  204. package/build/context-permission.d.ts +4 -4
  205. package/build/context-sonner.cjs.js +1 -1
  206. package/build/context-sonner.d.ts +42 -7
  207. package/build/context-sonner.es.js +1 -1
  208. package/build/{context.constants-B9Yk6CGe.js → context.constants-BCpaUfFz.js} +9 -6
  209. package/build/context.constants-BCpaUfFz.js.map +1 -0
  210. package/build/context.constants-BLQ_1jZI.cjs +32 -0
  211. package/build/context.constants-BLQ_1jZI.cjs.map +1 -0
  212. package/build/{context.constants-Bz_5itIx.js → context.constants-DOMoMUoD.js} +26 -9
  213. package/build/context.constants-DOMoMUoD.js.map +1 -0
  214. package/build/context.constants-cm50ZUiS.cjs +98 -0
  215. package/build/context.constants-cm50ZUiS.cjs.map +1 -0
  216. package/build/context.functions-80N-5MqM.cjs.map +1 -1
  217. package/build/context.functions-B8FDl7nJ.js.map +1 -1
  218. package/build/context.functions-BD15C8_y.js.map +1 -1
  219. package/build/context.functions-CQ9GerPb.js.map +1 -1
  220. package/build/context.functions-ar41xFVo.cjs.map +1 -1
  221. package/build/context.functions-ohI9H54j.cjs.map +1 -1
  222. package/build/context.hooks-7ydA7mGj.js.map +1 -1
  223. package/build/context.hooks-BIsapq-0.cjs.map +1 -1
  224. package/build/context.hooks-BmwyZ1p3.js.map +1 -1
  225. package/build/context.hooks-BzMTkJNv.js.map +1 -1
  226. package/build/{context.hooks-DTdppyho.js → context.hooks-CI5aQmpr.js} +4 -4
  227. package/build/context.hooks-CI5aQmpr.js.map +1 -0
  228. package/build/{context.hooks-BDEwJHqB.cjs → context.hooks-Ci37RyLf.cjs} +3 -3
  229. package/build/context.hooks-Ci37RyLf.cjs.map +1 -0
  230. package/build/context.hooks-D13tbrva.cjs.map +1 -1
  231. package/build/context.hooks-u408Pxw8.cjs.map +1 -1
  232. package/build/floating-ui.react--v70Xky9.cjs +2 -0
  233. package/build/floating-ui.react--v70Xky9.cjs.map +1 -0
  234. package/build/{component-BoHvC24Q.js → floating-ui.react-Byi6bLb1.js} +17 -704
  235. package/build/floating-ui.react-Byi6bLb1.js.map +1 -0
  236. package/build/index.cjs.js +1 -1
  237. package/build/index.d.ts +92 -100
  238. package/build/index.es.js +59 -57
  239. package/build/index.es.js.map +1 -1
  240. package/build/motion-CIQfrLky.js.map +1 -1
  241. package/build/motion-DgB7M2Hn.cjs.map +1 -1
  242. package/build/style-D3Lbn1EL.cjs +32 -0
  243. package/build/style-D3Lbn1EL.cjs.map +1 -0
  244. package/build/{style-mc2ST5fY.cjs → style-Df37KnoJ.cjs} +47 -18
  245. package/build/style-Df37KnoJ.cjs.map +1 -0
  246. package/build/{style-BgcnmVAY.js → style-RL73t3JD.js} +63 -20
  247. package/build/style-RL73t3JD.js.map +1 -0
  248. package/build/style-add.cjs.js +1 -1
  249. package/build/style-add.d.ts +57 -5
  250. package/build/style-add.es.js +11 -10
  251. package/build/style-error.cjs.js +1 -1
  252. package/build/style-error.d.ts +48 -7
  253. package/build/style-error.es.js +1 -1
  254. package/build/style-fRZ6xrVp.cjs.map +1 -1
  255. package/build/style-plT9Ah7t.js.map +1 -1
  256. package/build/style-theme.cjs.js +1 -1
  257. package/build/style-theme.d.ts +2 -2
  258. package/build/style-theme.es.js +1 -1
  259. package/build/{style-BQ653xOS.js → style-uVTmdhsH.js} +14 -5
  260. package/build/style-uVTmdhsH.js.map +1 -0
  261. package/build/{theme.global-CFUz5Asg.js → theme.global-BgERDJ4e.js} +36 -1
  262. package/build/theme.global-BgERDJ4e.js.map +1 -0
  263. package/build/{theme.global-B9t2Fi10.cjs → theme.global-CcoD5bPP.cjs} +2 -2
  264. package/build/theme.global-CcoD5bPP.cjs.map +1 -0
  265. package/build/{use-DTZ8c8_g.js → use-Bp4KNVye.js} +7 -7
  266. package/build/{use-DTZ8c8_g.js.map → use-Bp4KNVye.js.map} +1 -1
  267. package/build/use-Bp8UVw4Y.js.map +1 -1
  268. package/build/use-C1l0O0Qo.cjs.map +1 -1
  269. package/build/{use-D7IsSb34.cjs → use-DQDxWjzu.cjs} +2 -2
  270. package/build/{use-D7IsSb34.cjs.map → use-DQDxWjzu.cjs.map} +1 -1
  271. package/build/use-DT0XgvJT.js.map +1 -1
  272. package/build/use-IhzeVumv.cjs.map +1 -1
  273. package/package.json +4 -3
  274. package/build/area-BC64nSGj.js.map +0 -1
  275. package/build/area-C6QOr2Kd.cjs.map +0 -1
  276. package/build/area-D7906bXA.cjs.map +0 -1
  277. package/build/area-DRqAofd0.js.map +0 -1
  278. package/build/area-DnAf310m.cjs +0 -2
  279. package/build/area-DnAf310m.cjs.map +0 -1
  280. package/build/area-Dnq78ow6.js.map +0 -1
  281. package/build/component--Oo5_3xq.cjs.map +0 -1
  282. package/build/component-BV_7tGiu.cjs +0 -28
  283. package/build/component-BV_7tGiu.cjs.map +0 -1
  284. package/build/component-BcHiCCC9.js.map +0 -1
  285. package/build/component-BiNPQpCQ.cjs.map +0 -1
  286. package/build/component-BoHvC24Q.js.map +0 -1
  287. package/build/component-Bzw_uobM.js.map +0 -1
  288. package/build/component-C4ULY0c6.js.map +0 -1
  289. package/build/component-CACoGUK9.cjs +0 -251
  290. package/build/component-CACoGUK9.cjs.map +0 -1
  291. package/build/component-CQ8fy2gK.js.map +0 -1
  292. package/build/component-DHq4T6Ku.cjs.map +0 -1
  293. package/build/component-DfxlJBGv.js.map +0 -1
  294. package/build/component-Dn-VRY7-.cjs +0 -2
  295. package/build/component-Dn-VRY7-.cjs.map +0 -1
  296. package/build/component-jPZYT5iL.js.map +0 -1
  297. package/build/component-u_42PteJ.cjs +0 -90
  298. package/build/component-u_42PteJ.cjs.map +0 -1
  299. package/build/component.constants-C7DGbAC8.js.map +0 -1
  300. package/build/component.constants-DjYLZpyY.js.map +0 -1
  301. package/build/component.constants-DwRduxMm.cjs.map +0 -1
  302. package/build/component.constants-veAUxKBd.cjs.map +0 -1
  303. package/build/component.styles--Ug3PJQ6.cjs.map +0 -1
  304. package/build/component.styles-5CVyEjEh.js.map +0 -1
  305. package/build/component.styles-5Xz_H-fR.js.map +0 -1
  306. package/build/component.styles-8tkaznu_.cjs +0 -21
  307. package/build/component.styles-8tkaznu_.cjs.map +0 -1
  308. package/build/component.styles-Bfhg18CX.cjs.map +0 -1
  309. package/build/component.styles-BuzZQhqS.cjs +0 -73
  310. package/build/component.styles-BuzZQhqS.cjs.map +0 -1
  311. package/build/component.styles-C1p3V7H6.js.map +0 -1
  312. package/build/component.styles-C3hYZJGh.js.map +0 -1
  313. package/build/component.styles-CISd4naT.cjs +0 -13
  314. package/build/component.styles-CISd4naT.cjs.map +0 -1
  315. package/build/component.styles-CggIUAVx.js.map +0 -1
  316. package/build/component.styles-Cje8zTpf.cjs.map +0 -1
  317. package/build/component.styles-CpFA5YrM.js +0 -71
  318. package/build/component.styles-CpFA5YrM.js.map +0 -1
  319. package/build/component.styles-Crx4pACx.cjs +0 -137
  320. package/build/component.styles-DLU0S0KI.cjs.map +0 -1
  321. package/build/component.styles-DSle6iuF.cjs.map +0 -1
  322. package/build/component.styles-DX_3POUD.js.map +0 -1
  323. package/build/component.styles-Db3HLiuV.cjs +0 -99
  324. package/build/component.styles-Db3HLiuV.cjs.map +0 -1
  325. package/build/component.styles-DhAMCZ71.cjs.map +0 -1
  326. package/build/component.styles-DpgkACgI.js.map +0 -1
  327. package/build/component.styles-o7GmI4Ap.cjs +0 -225
  328. package/build/component.styles-o7GmI4Ap.cjs.map +0 -1
  329. package/build/component.styles-v0YYECwW.js.map +0 -1
  330. package/build/component.types-BzBjcohg.js.map +0 -1
  331. package/build/component.types-ydMLhabS.cjs +0 -174
  332. package/build/component.types-ydMLhabS.cjs.map +0 -1
  333. package/build/context.constants-B9Yk6CGe.js.map +0 -1
  334. package/build/context.constants-Bz_5itIx.js.map +0 -1
  335. package/build/context.constants-CTfUKury.cjs +0 -32
  336. package/build/context.constants-CTfUKury.cjs.map +0 -1
  337. package/build/context.constants-CV8ycctl.cjs +0 -100
  338. package/build/context.constants-CV8ycctl.cjs.map +0 -1
  339. package/build/context.hooks-BDEwJHqB.cjs.map +0 -1
  340. package/build/context.hooks-DTdppyho.js.map +0 -1
  341. package/build/style-B5u4pW5G.cjs +0 -32
  342. package/build/style-B5u4pW5G.cjs.map +0 -1
  343. package/build/style-BQ653xOS.js.map +0 -1
  344. package/build/style-BgcnmVAY.js.map +0 -1
  345. package/build/style-mc2ST5fY.cjs.map +0 -1
  346. package/build/theme.global-B9t2Fi10.cjs.map +0 -1
  347. package/build/theme.global-CFUz5Asg.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-BmwyZ1p3.js","sources":["../src/contexts/context-screen-width/context.tsx","../src/contexts/context-screen-width/context.hooks.ts"],"sourcesContent":["import { FC, createContext, useEffect, useMemo, useState } from 'react'\nimport { useTheme } from 'styled-components'\n\nimport { ProviderScreenWidthProps, ScreenWidthContextProps, Screens } from '.'\n\nexport const ScreenWidthContext = createContext<ScreenWidthContextProps | null>(null)\n\nexport const ProviderScreenWidth: FC<ProviderScreenWidthProps> = props => {\n const theme = useTheme()\n const [screenWidth, setScreenWidth] = useState<Screens>('default')\n\n const screens: ScreenWidthContextProps['screens'] = useMemo(() => {\n const allSizes = Object.entries(theme.screens).map(([key]) => {\n return {\n isScreen: screenWidth === key,\n value: key as Screens\n }\n })\n return allSizes\n }, [screenWidth, theme.screens])\n\n const screenActual: ScreenWidthContextProps['screenActual'] = useMemo(() => {\n const find = screens.find(item => item.isScreen)\n return find?.value ?? 'default'\n }, [screens])\n\n useEffect(() => {\n const sortedScreens = Object.entries(theme.screens)\n .map(([key, value]) => ({\n key: key as Screens,\n bp: (value as { width: number }).width\n }))\n .sort((a, b) => a.bp - b.bp)\n\n const queries = sortedScreens.map(({ key, bp }) => {\n return { key, mq: window.matchMedia(`(max-width: ${bp}px)`) }\n })\n const updateScreen = () => {\n for (const { key, mq } of queries) {\n if (mq.matches) {\n setScreenWidth(key)\n return\n }\n }\n // На всякий случай fallback\n setScreenWidth('default')\n }\n\n queries.forEach(({ mq }) => mq.addEventListener('change', updateScreen))\n updateScreen()\n\n return () => {\n queries.forEach(({ mq }) => mq.removeEventListener('change', updateScreen))\n }\n }, [theme.screens])\n return (\n <ScreenWidthContext.Provider\n value={{\n screens,\n screenActual,\n screenWidth\n }}\n >\n {props.children}\n </ScreenWidthContext.Provider>\n )\n}\n","import { useContext } from 'react'\n\nimport { ScreenWidthContext, ScreenWidthContextProps } from '.'\n\nexport const useScreenWidth = (): ScreenWidthContextProps => {\n const context = useContext(ScreenWidthContext)\n if (!context) {\n throw new Error('useScreenWidth must be used within an ProviderScreenWidth')\n }\n return context\n}\n"],"names":["jsx"],"mappings":";;;AAKO,MAAM,qBAAqB,cAA8C,IAAI;AAE7E,MAAM,sBAAoD,CAAA,UAAS;AACxE,QAAM,QAAQ,SAAA;AACd,QAAM,CAAC,aAAa,cAAc,IAAI,SAAkB,SAAS;AAEjE,QAAM,UAA8C,QAAQ,MAAM;AAChE,UAAM,WAAW,OAAO,QAAQ,MAAM,OAAO,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM;AAC5D,aAAO;AAAA,QACL,UAAU,gBAAgB;AAAA,QAC1B,OAAO;AAAA,MAAA;AAAA,IACT,CACD;AACD,WAAO;AAAA,EAAA,GACN,CAAC,aAAa,MAAM,OAAO,CAAC;AAE/B,QAAM,eAAwD,QAAQ,MAAM;AAC1E,UAAM,OAAO,QAAQ,KAAK,CAAA,SAAQ,KAAK,QAAQ;AAC/C,YAAO,6BAAM,UAAS;AAAA,EAAA,GACrB,CAAC,OAAO,CAAC;AAEZ,YAAU,MAAM;AACd,UAAM,gBAAgB,OAAO,QAAQ,MAAM,OAAO,EAC/C,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO;AAAA,MACtB;AAAA,MACA,IAAK,MAA4B;AAAA,IAAA,EACjC,EACD,KAAK,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE;AAE7B,UAAM,UAAU,cAAc,IAAI,CAAC,EAAE,KAAK,SAAS;AACjD,aAAO,EAAE,KAAK,IAAI,OAAO,WAAW,eAAe,EAAE,KAAK,EAAA;AAAA,IAAE,CAC7D;AACD,UAAM,eAAe,MAAM;AACzB,iBAAW,EAAE,KAAK,GAAA,KAAQ,SAAS;AACjC,YAAI,GAAG,SAAS;AACd,yBAAe,GAAG;AAClB;AAAA,QAAA;AAAA,MACF;AAGF,qBAAe,SAAS;AAAA,IAAA;AAG1B,YAAQ,QAAQ,CAAC,EAAE,GAAA,MAAS,GAAG,iBAAiB,UAAU,YAAY,CAAC;AACvE,iBAAA;AAEA,WAAO,MAAM;AACX,cAAQ,QAAQ,CAAC,EAAE,GAAA,MAAS,GAAG,oBAAoB,UAAU,YAAY,CAAC;AAAA,IAAA;AAAA,EAC5E,GACC,CAAC,MAAM,OAAO,CAAC;AAClB,SACEA,kCAAAA;AAAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAGD,UAAA,MAAM;AAAA,IAAA;AAAA,EAAA;AAGb;AC9DO,MAAM,iBAAiB,MAA+B;AAC3D,QAAM,UAAU,WAAW,kBAAkB;AAC7C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAAA;AAE7E,SAAO;AACT;"}
1
+ {"version":3,"file":"context.hooks-BmwyZ1p3.js","sources":["../src/contexts/context-screen-width/context.tsx","../src/contexts/context-screen-width/context.hooks.ts"],"sourcesContent":["import { FC, createContext, useEffect, useMemo, useState } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ProviderScreenWidthProps, ScreenWidthContextProps, Screens } from '.';\n\nexport const ScreenWidthContext = createContext<ScreenWidthContextProps | null>(null);\n\nexport const ProviderScreenWidth: FC<ProviderScreenWidthProps> = (props) => {\n const theme = useTheme();\n const [screenWidth, setScreenWidth] = useState<Screens>('default');\n\n const screens: ScreenWidthContextProps['screens'] = useMemo(() => {\n const allSizes = Object.entries(theme.screens).map(([key]) => {\n return {\n isScreen: screenWidth === key,\n value: key as Screens,\n };\n });\n return allSizes;\n }, [screenWidth, theme.screens]);\n\n const screenActual: ScreenWidthContextProps['screenActual'] = useMemo(() => {\n const find = screens.find((item) => item.isScreen);\n return find?.value ?? 'default';\n }, [screens]);\n\n useEffect(() => {\n const sortedScreens = Object.entries(theme.screens)\n .map(([key, value]) => ({\n key: key as Screens,\n bp: (value as { width: number }).width,\n }))\n .sort((a, b) => a.bp - b.bp);\n\n const queries = sortedScreens.map(({ key, bp }) => {\n return { key, mq: window.matchMedia(`(max-width: ${bp}px)`) };\n });\n const updateScreen = () => {\n for (const { key, mq } of queries) {\n if (mq.matches) {\n setScreenWidth(key);\n return;\n }\n }\n // На всякий случай fallback\n setScreenWidth('default');\n };\n\n queries.forEach(({ mq }) => mq.addEventListener('change', updateScreen));\n updateScreen();\n\n return () => {\n queries.forEach(({ mq }) => mq.removeEventListener('change', updateScreen));\n };\n }, [theme.screens]);\n return (\n <ScreenWidthContext.Provider\n value={{\n screens,\n screenActual,\n screenWidth,\n }}\n >\n {props.children}\n </ScreenWidthContext.Provider>\n );\n};\n","import { useContext } from 'react';\n\nimport { ScreenWidthContext, ScreenWidthContextProps } from '.';\n\nexport const useScreenWidth = (): ScreenWidthContextProps => {\n const context = useContext(ScreenWidthContext);\n if (!context) {\n throw new Error('useScreenWidth must be used within an ProviderScreenWidth');\n }\n return context;\n};\n"],"names":["jsx"],"mappings":";;;AAKO,MAAM,qBAAqB,cAA8C,IAAI;AAE7E,MAAM,sBAAoD,CAAC,UAAU;AAC1E,QAAM,QAAQ,SAAA;AACd,QAAM,CAAC,aAAa,cAAc,IAAI,SAAkB,SAAS;AAEjE,QAAM,UAA8C,QAAQ,MAAM;AAChE,UAAM,WAAW,OAAO,QAAQ,MAAM,OAAO,EAAE,IAAI,CAAC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AAAA,EAAA;AAGb;AC9DO,MAAM,iBAAiB,MAA+B;AAC3D,QAAM,UAAU,WAAW,kBAAkB;AAC7C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAAA;AAE7E,SAAO;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-BzMTkJNv.js","sources":["../src/contexts/context-geolocation/context.tsx","../src/contexts/context-geolocation/context.hooks.ts"],"sourcesContent":["import { FC, createContext, useEffect, useState } from 'react'\n\nimport { usePermission } from '@local/contexts/context-permission'\n\nimport { GeolocationContextProps, ProviderGeolocationProps } from '.'\n\nexport const GeolocationContext = createContext<GeolocationContextProps | null>(null)\n\nexport const ProviderGeolocation: FC<ProviderGeolocationProps> = props => {\n const { geolocationPermission, requestGeolocationPermission } = usePermission()\n\n const [location, setLocation] = useState<GeolocationPosition | null>(null)\n const [error, setError] = useState<GeolocationPositionError | null>(null)\n\n useEffect(() => {\n const handleSuccess = (position: GeolocationPosition) => {\n setLocation(position)\n }\n\n const handleError = (error: GeolocationPositionError) => {\n setError(error)\n }\n\n if (geolocationPermission === 'granted') {\n navigator.geolocation.getCurrentPosition(handleSuccess, handleError)\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission])\n\n useEffect(() => {\n if (props.isAskEntrance) {\n if (geolocationPermission !== 'granted') {\n requestGeolocationPermission()\n }\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission])\n return (\n <GeolocationContext.Provider\n value={{\n requestGeolocationPermission,\n geolocationPermission,\n location,\n error\n }}\n >\n {props.children}\n </GeolocationContext.Provider>\n )\n}\n","import { useContext } from 'react'\n\nimport { GeolocationContext, GeolocationContextProps } from '.'\n\nexport const useGeolocation = (): GeolocationContextProps => {\n const context = useContext(GeolocationContext)\n if (!context) {\n throw new Error('useGeolocation must be used within an ProviderGeolocation')\n }\n return context\n}\n"],"names":["error","jsx"],"mappings":";;;AAMO,MAAM,qBAAqB,cAA8C,IAAI;AAE7E,MAAM,sBAAoD,CAAA,UAAS;AACxE,QAAM,EAAE,uBAAuB,6BAAA,IAAiC,cAAA;AAEhE,QAAM,CAAC,UAAU,WAAW,IAAI,SAAqC,IAAI;AACzE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA0C,IAAI;AAExE,YAAU,MAAM;AACd,UAAM,gBAAgB,CAAC,aAAkC;AACvD,kBAAY,QAAQ;AAAA,IAAA;AAGtB,UAAM,cAAc,CAACA,WAAoC;AACvD,eAASA,MAAK;AAAA,IAAA;AAGhB,QAAI,0BAA0B,WAAW;AACvC,gBAAU,YAAY,mBAAmB,eAAe,WAAW;AAAA,IAAA;AAAA,EACrE,GACC,CAAC,uBAAuB,MAAM,eAAe,4BAA4B,CAAC;AAE7E,YAAU,MAAM;AACd,QAAI,MAAM,eAAe;AACvB,UAAI,0BAA0B,WAAW;AACvC,qCAAA;AAAA,MAA6B;AAAA,IAC/B;AAAA,EACF,GACC,CAAC,uBAAuB,MAAM,eAAe,4BAA4B,CAAC;AAC7E,SACEC,kCAAAA;AAAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAGD,UAAA,MAAM;AAAA,IAAA;AAAA,EAAA;AAGb;AC3CO,MAAM,iBAAiB,MAA+B;AAC3D,QAAM,UAAU,WAAW,kBAAkB;AAC7C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAAA;AAE7E,SAAO;AACT;"}
1
+ {"version":3,"file":"context.hooks-BzMTkJNv.js","sources":["../src/contexts/context-geolocation/context.tsx","../src/contexts/context-geolocation/context.hooks.ts"],"sourcesContent":["import { FC, createContext, useEffect, useState } from 'react';\n\nimport { usePermission } from '@local/contexts/context-permission';\n\nimport { GeolocationContextProps, ProviderGeolocationProps } from '.';\n\nexport const GeolocationContext = createContext<GeolocationContextProps | null>(null);\n\nexport const ProviderGeolocation: FC<ProviderGeolocationProps> = (props) => {\n const { geolocationPermission, requestGeolocationPermission } = usePermission();\n\n const [location, setLocation] = useState<GeolocationPosition | null>(null);\n const [error, setError] = useState<GeolocationPositionError | null>(null);\n\n useEffect(() => {\n const handleSuccess = (position: GeolocationPosition) => {\n setLocation(position);\n };\n\n const handleError = (error: GeolocationPositionError) => {\n setError(error);\n };\n\n if (geolocationPermission === 'granted') {\n navigator.geolocation.getCurrentPosition(handleSuccess, handleError);\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission]);\n\n useEffect(() => {\n if (props.isAskEntrance) {\n if (geolocationPermission !== 'granted') {\n requestGeolocationPermission();\n }\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission]);\n return (\n <GeolocationContext.Provider\n value={{\n requestGeolocationPermission,\n geolocationPermission,\n location,\n error,\n }}\n >\n {props.children}\n </GeolocationContext.Provider>\n );\n};\n","import { useContext } from 'react';\n\nimport { GeolocationContext, GeolocationContextProps } from '.';\n\nexport const useGeolocation = (): GeolocationContextProps => {\n const context = useContext(GeolocationContext);\n if (!context) {\n throw new Error('useGeolocation must be used within an ProviderGeolocation');\n }\n return context;\n};\n"],"names":["error","jsx"],"mappings":";;;AAMO,MAAM,qBAAqB,cAA8C,IAAI;AAE7E,MAAM,sBAAoD,CAAC,UAAU;AAC1E,QAAM,EAAE,uBAAuB,6BAAA,IAAiC,cAAA;AAEhE,QAAM,CAAC,UAAU,WAAW,IAAI,SAAqC,IAAI;AACzE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA0C,IAAI;AAExE,YAAU,MAAM;AACd,UAAM,gBAAgB,CAAC,aAAkC;AACvD,kBAAY,QAAQ;AAAA,IAAA;AAGtB,UAAM,cAAc,CAACA,WAAoC;AACvD,eAASA,MAAK;AAAA,IAAA;AAGhB,QAAI,0BAA0B,WAAW;AACvC,gBAAU,YAAY,mBAAmB,eAAe,WAAW;AAAA,IAAA;AAAA,EACrE,GACC,CAAC,uBAAuB,MAAM,eAAe,4BAA4B,CAAC;AAE7E,YAAU,MAAM;AACd,QAAI,MAAM,eAAe;AACvB,UAAI,0BAA0B,WAAW;AACvC,qCAAA;AAAA,MAA6B;AAAA,IAC/B;AAAA,EACF,GACC,CAAC,uBAAuB,MAAM,eAAe,4BAA4B,CAAC;AAC7E,SACEC,kCAAAA;AAAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAGD,UAAA,MAAM;AAAA,IAAA;AAAA,EAAA;AAGb;AC3CO,MAAM,iBAAiB,MAA+B;AAC3D,QAAM,UAAU,WAAW,kBAAkB;AAC7C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAAA;AAE7E,SAAO;AACT;"}
@@ -1,9 +1,9 @@
1
1
  import { createContext, useState, useCallback, useEffect, useContext } from "react";
2
2
  import { j as jsxRuntimeExports } from "./jsx-runtime-BrDlu8eK.js";
3
- import { P as Preview } from "./area-Dnq78ow6.js";
4
- import { J as JeneseiPalette } from "./theme.global-CFUz5Asg.js";
3
+ import { P as Preview } from "./area-CT83tDk-.js";
4
+ import { J as JeneseiPalette } from "./theme.global-BgERDJ4e.js";
5
5
  import { u as useScreenWidth } from "./context.hooks-BmwyZ1p3.js";
6
- import { d as addGridTransition } from "./style-BgcnmVAY.js";
6
+ import { e as addGridTransition } from "./style-RL73t3JD.js";
7
7
  import { styled, css } from "styled-components";
8
8
  const AppContext = createContext(null);
9
9
  const ProviderApp = (props) => {
@@ -524,4 +524,4 @@ export {
524
524
  useApp as m,
525
525
  useBgColor as u
526
526
  };
527
- //# sourceMappingURL=context.hooks-DTdppyho.js.map
527
+ //# sourceMappingURL=context.hooks-CI5aQmpr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.hooks-CI5aQmpr.js","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview';\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme';\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react';\n\nimport { useScreenWidth } from '../context-screen-width';\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper,\n} from '.';\n\nexport const AppContext = createContext<AppContextProps | null>(null);\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = (props) => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor);\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor,\n );\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null);\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null);\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription,\n );\n const { changePreview, previewProps } = usePreview(props.defaultPreview);\n const { screenActual } = useScreenWidth();\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription,\n }}\n >\n <title>{title}</title>\n <meta name='description' content={description} />\n <meta name='theme-color' content={JeneseiPalette[statusBarColor]} />\n <meta name='apple-mobile-web-app-status-bar-style' content='default' />\n <meta name='mobile-web-app-capable' content='yes' />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>\n {props.children}\n </ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n );\n};\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true });\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps);\n }, []);\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview);\n }, [defaultPreview]);\n\n return { previewProps, changePreview };\n};\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys;\n bgColorHistory: IThemePaletteKeys[];\n bgColorIndex: number;\n};\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color];\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex,\n };\n};\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys;\n statusBarColorHistory: IThemePaletteKeys[];\n statusBarColorIndex: number;\n};\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color];\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.statusBarColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex,\n };\n};\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null;\n bgImageHistory: (string | null)[];\n bgImageIndex: number;\n};\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n\n const changeBgImage = useCallback((image: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image];\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgImage = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgImageIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex,\n };\n};\n\ntype TitleState = {\n title: string | null;\n titleHistory: (string | null)[];\n titleIndex: number;\n};\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle];\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.titleIndex + steps;\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle,\n };\n};\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string;\n descriptionHistory: string[];\n descriptionIndex: number;\n};\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n\n const changeDescription = useCallback((newDescription: string) => {\n setState((prev) => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription];\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyDescription = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.descriptionIndex + steps;\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex,\n };\n};\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react';\n\nimport { AppContext } from '.';\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext);\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp');\n }\n return context;\n};\n"],"names":["jsxs","jsx","_a"],"mappings":";;;;;;;AAoBO,MAAM,aAAa,cAAsC,IAAI;AA0B7D,MAAM,cAAoC,CAAC,UAAU;;AAC1D,QAAM,EAAE,SAAS,eAA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8BAA8B,OAAO;AAAA,aACrC,CAAC,UAAA;;AAAU,+CAAO,gBAAP,mBAAoB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AC7JrD,MAAM,SAAS,MAAM;AAC1B,QAAM,UAAU,WAAW,UAAU;AACrC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAAA;AAE7D,SAAO;AACT;"}
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react"),t=require("./jsx-runtime-BcGej2Kr.cjs"),i=require("./area-DnAf310m.cjs"),o=require("./theme.global-B9t2Fi10.cjs"),r=require("./context.hooks-BIsapq-0.cjs"),l=require("./style-mc2ST5fY.cjs"),n=require("styled-components"),s=e.createContext(null),a=t=>{const[i,o]=e.useState(t||{visible:!0,defaultVisible:!0}),r=e.useCallback(e=>{o(e)},[]);return e.useEffect(()=>{t&&o(t)},[t]),{previewProps:i,changePreview:r}},d=t=>{const[i,o]=e.useState({bgColor:t,bgColorHistory:[t],bgColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgColorHistory.slice(0,t.bgColorIndex+1),e];return{bgColor:e,bgColorHistory:i,bgColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgColorIndex+e;return i>=0&&i<t.bgColorHistory.length?{...t,bgColor:t.bgColorHistory[i],bgColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]);return e.useEffect(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]),{bgColor:i.bgColor,changeBgColor:r,historyBgColor:l,setDefaultBgColor:n,bgColorIndex:i.bgColorIndex}},u=t=>{const[i,o]=e.useState({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.statusBarColorHistory.slice(0,t.statusBarColorIndex+1),e];return{statusBarColor:e,statusBarColorHistory:i,statusBarColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.statusBarColorIndex+e;return i>=0&&i<t.statusBarColorHistory.length?{...t,statusBarColor:t.statusBarColorHistory[i],statusBarColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]);return e.useEffect(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]),{statusBarColor:i.statusBarColor,changeStatusBarColor:r,historyStatusBarColor:l,setDefaultStatusBarColor:n,statusBarColorIndex:i.statusBarColorIndex}},g=t=>{const[i,o]=e.useState({bgImage:t,bgImageHistory:[t],bgImageIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgImageHistory.slice(0,t.bgImageIndex+1),e];return{bgImage:e,bgImageHistory:i,bgImageIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgImageIndex+e;return i>=0&&i<t.bgImageHistory.length?{...t,bgImage:t.bgImageHistory[i],bgImageIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]);return e.useEffect(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]),{bgImage:i.bgImage,changeBgImage:r,historyBgImage:l,setDefaultBgImage:n,bgImageIndex:i.bgImageIndex}},c=t=>{const[i,o]=e.useState({title:t,titleHistory:[t],titleIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.titleHistory.slice(0,t.titleIndex+1),e];return{title:e,titleHistory:i,titleIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.titleIndex+e;return i>=0&&i<t.titleHistory.length?{...t,title:t.titleHistory[i],titleIndex:i}:t})},[]),n=e.useCallback(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]);return e.useEffect(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]),{title:i.title,titleIndex:i.titleIndex,titleHistory:i.titleHistory,changeTitle:r,setHistoryTitle:l,setDefaultTitle:n}},h=t=>{const[i,o]=e.useState({description:t,descriptionHistory:[t],descriptionIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.descriptionHistory.slice(0,t.descriptionIndex+1),e];return{description:e,descriptionHistory:i,descriptionIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.descriptionIndex+e;return i>=0&&i<t.descriptionHistory.length?{...t,description:t.descriptionHistory[i],descriptionIndex:i}:t})},[]),n=e.useCallback(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]);return e.useEffect(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]),{description:i.description,changeDescription:r,historyDescription:l,setDefaultDescription:n,descriptionIndex:i.descriptionIndex}},x=n.styled.div`
1
+ "use strict";const e=require("react"),t=require("./jsx-runtime-BcGej2Kr.cjs"),i=require("./area-t259bohc.cjs"),o=require("./theme.global-CcoD5bPP.cjs"),r=require("./context.hooks-BIsapq-0.cjs"),l=require("./style-Df37KnoJ.cjs"),n=require("styled-components"),s=e.createContext(null),a=t=>{const[i,o]=e.useState(t||{visible:!0,defaultVisible:!0}),r=e.useCallback(e=>{o(e)},[]);return e.useEffect(()=>{t&&o(t)},[t]),{previewProps:i,changePreview:r}},d=t=>{const[i,o]=e.useState({bgColor:t,bgColorHistory:[t],bgColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgColorHistory.slice(0,t.bgColorIndex+1),e];return{bgColor:e,bgColorHistory:i,bgColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgColorIndex+e;return i>=0&&i<t.bgColorHistory.length?{...t,bgColor:t.bgColorHistory[i],bgColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]);return e.useEffect(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]),{bgColor:i.bgColor,changeBgColor:r,historyBgColor:l,setDefaultBgColor:n,bgColorIndex:i.bgColorIndex}},u=t=>{const[i,o]=e.useState({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.statusBarColorHistory.slice(0,t.statusBarColorIndex+1),e];return{statusBarColor:e,statusBarColorHistory:i,statusBarColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.statusBarColorIndex+e;return i>=0&&i<t.statusBarColorHistory.length?{...t,statusBarColor:t.statusBarColorHistory[i],statusBarColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]);return e.useEffect(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]),{statusBarColor:i.statusBarColor,changeStatusBarColor:r,historyStatusBarColor:l,setDefaultStatusBarColor:n,statusBarColorIndex:i.statusBarColorIndex}},g=t=>{const[i,o]=e.useState({bgImage:t,bgImageHistory:[t],bgImageIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgImageHistory.slice(0,t.bgImageIndex+1),e];return{bgImage:e,bgImageHistory:i,bgImageIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgImageIndex+e;return i>=0&&i<t.bgImageHistory.length?{...t,bgImage:t.bgImageHistory[i],bgImageIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]);return e.useEffect(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]),{bgImage:i.bgImage,changeBgImage:r,historyBgImage:l,setDefaultBgImage:n,bgImageIndex:i.bgImageIndex}},c=t=>{const[i,o]=e.useState({title:t,titleHistory:[t],titleIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.titleHistory.slice(0,t.titleIndex+1),e];return{title:e,titleHistory:i,titleIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.titleIndex+e;return i>=0&&i<t.titleHistory.length?{...t,title:t.titleHistory[i],titleIndex:i}:t})},[]),n=e.useCallback(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]);return e.useEffect(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]),{title:i.title,titleIndex:i.titleIndex,titleHistory:i.titleHistory,changeTitle:r,setHistoryTitle:l,setDefaultTitle:n}},h=t=>{const[i,o]=e.useState({description:t,descriptionHistory:[t],descriptionIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.descriptionHistory.slice(0,t.descriptionIndex+1),e];return{description:e,descriptionHistory:i,descriptionIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.descriptionIndex+e;return i>=0&&i<t.descriptionHistory.length?{...t,description:t.descriptionHistory[i],descriptionIndex:i}:t})},[]),n=e.useCallback(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]);return e.useEffect(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]),{description:i.description,changeDescription:r,historyDescription:l,setDefaultDescription:n,descriptionIndex:i.descriptionIndex}},x=n.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  max-width: 100dvw;
@@ -68,5 +68,5 @@
68
68
  z-index: ${e=>{var t;return(null==(t=null==e?void 0:e.$rightAside)?void 0:t.zIndex)??"auto"}};
69
69
  grid-area: rightAside;
70
70
  display: flex;
71
- `;exports.AppContext=s,exports.ProviderApp=e=>{var l,n,p,v,B,H,j,D,w,E,S,P,k,T,R,z,O,W,q,N,F,J,G,L;const{bgColor:M,changeBgColor:V,historyBgColor:K,setDefaultBgColor:Q}=d(e.defaultBgColor),{statusBarColor:U,changeStatusBarColor:X,historyStatusBarColor:Y,setDefaultStatusBarColor:Z}=u(e.defaultStatusBarColor),{bgImage:_,changeBgImage:ee,historyBgImage:te,setDefaultBgImage:ie}=g(e.defaultBgImage||null),{title:oe,changeTitle:re,setHistoryTitle:le,setDefaultTitle:ne}=c(e.defaultTitle||null),{description:se,changeDescription:ae,historyDescription:de,setDefaultDescription:ue}=h(e.defaultDescription),{changePreview:ge,previewProps:ce}=a(e.defaultPreview),{screenActual:he}=r.useScreenWidth();return t.jsxRuntimeExports.jsxs(s.Provider,{value:{changePreview:ge,changeStatusBarColor:X,changeBgColor:V,changeBgImage:ee,changeTitle:re,changeDescription:ae,historyStatusBarColor:Y,historyBgColor:K,historyBgImage:te,setHistoryTitle:le,historyDescription:de,setDefaultStatusBarColor:Z,setDefaultBgColor:Q,setDefaultBgImage:ie,setDefaultTitle:ne,setDefaultDescription:ue},children:[t.jsxRuntimeExports.jsx("title",{children:oe}),t.jsxRuntimeExports.jsx("meta",{name:"description",content:se}),t.jsxRuntimeExports.jsx("meta",{name:"theme-color",content:o.JeneseiPalette[U]}),t.jsxRuntimeExports.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),t.jsxRuntimeExports.jsx("meta",{name:"mobile-web-app-capable",content:"yes"}),t.jsxRuntimeExports.jsx(i.Preview,{...ce,children:t.jsxRuntimeExports.jsx(x,{$bgColor:M,$bgImage:_,children:t.jsxRuntimeExports.jsxs(f,{$isScrollOutlet:e.isScrollOutlet,$footer:e.footer,$notification:e.notification,$header:e.header,$nav:e.nav,$leftAside:e.leftAside,$rightAside:e.rightAside,children:[(null==(l=e.notification)?void 0:l.length)&&(null==(p=null==(n=e.notification)?void 0:n.length)?void 0:p[he])?t.jsxRuntimeExports.jsx(C,{$notification:e.notification,children:(null==(v=e.notification)?void 0:v.component)||null}):null,(null==(B=e.header)?void 0:B.length)&&(null==(j=null==(H=e.header)?void 0:H.length)?void 0:j[he])?t.jsxRuntimeExports.jsx(I,{$header:e.header,children:(null==(D=e.header)?void 0:D.component)||null}):null,(null==(w=e.nav)?void 0:w.length)&&(null==(S=null==(E=e.nav)?void 0:E.length)?void 0:S[he])?t.jsxRuntimeExports.jsx($,{$nav:e.nav,children:(null==(P=e.nav)?void 0:P.component)||null}):null,(null==(k=e.leftAside)?void 0:k.length)&&(null==(R=null==(T=e.leftAside)?void 0:T.length)?void 0:R[he])?t.jsxRuntimeExports.jsx(y,{$leftAside:e.leftAside,children:(null==(z=e.leftAside)?void 0:z.component)||null}):null,t.jsxRuntimeExports.jsx(m,{$isScrollOutlet:e.isScrollOutlet,$main:e.main,children:e.children}),(null==(O=e.rightAside)?void 0:O.length)&&(null==(q=null==(W=e.rightAside)?void 0:W.length)?void 0:q[he])?t.jsxRuntimeExports.jsx(A,{$rightAside:e.rightAside,children:(null==(N=e.rightAside)?void 0:N.component)||null}):null,(null==(F=e.footer)?void 0:F.length)&&(null==(G=null==(J=e.footer)?void 0:J.length)?void 0:G[he])?t.jsxRuntimeExports.jsx(b,{$footer:e.footer,children:(null==(L=e.footer)?void 0:L.component)||null}):null]})})})]})},exports.ProviderAppOutlet=f,exports.ProviderAppOutletChildren=m,exports.ProviderAppOutletFooter=b,exports.ProviderAppOutletHeader=I,exports.ProviderAppOutletLeftAside=y,exports.ProviderAppOutletNav=$,exports.ProviderAppOutletNotification=C,exports.ProviderAppOutletRightAside=A,exports.ProviderAppWrapper=x,exports.useApp=()=>{const t=e.useContext(s);if(!t)throw new Error("useApp must be used within an ProviderApp");return t},exports.useBgColor=d,exports.useBgImage=g,exports.useDescription=h,exports.useStatusBarColor=u;
72
- //# sourceMappingURL=context.hooks-BDEwJHqB.cjs.map
71
+ `;exports.AppContext=s,exports.ProviderApp=e=>{var l,n,p,v,B,H,j,D,w,E,S,P,k,T,R,O,z,W,q,N,F,J,G,L;const{bgColor:V,changeBgColor:K,historyBgColor:M,setDefaultBgColor:Q}=d(e.defaultBgColor),{statusBarColor:U,changeStatusBarColor:X,historyStatusBarColor:Y,setDefaultStatusBarColor:Z}=u(e.defaultStatusBarColor),{bgImage:_,changeBgImage:ee,historyBgImage:te,setDefaultBgImage:ie}=g(e.defaultBgImage||null),{title:oe,changeTitle:re,setHistoryTitle:le,setDefaultTitle:ne}=c(e.defaultTitle||null),{description:se,changeDescription:ae,historyDescription:de,setDefaultDescription:ue}=h(e.defaultDescription),{changePreview:ge,previewProps:ce}=a(e.defaultPreview),{screenActual:he}=r.useScreenWidth();return t.jsxRuntimeExports.jsxs(s.Provider,{value:{changePreview:ge,changeStatusBarColor:X,changeBgColor:K,changeBgImage:ee,changeTitle:re,changeDescription:ae,historyStatusBarColor:Y,historyBgColor:M,historyBgImage:te,setHistoryTitle:le,historyDescription:de,setDefaultStatusBarColor:Z,setDefaultBgColor:Q,setDefaultBgImage:ie,setDefaultTitle:ne,setDefaultDescription:ue},children:[t.jsxRuntimeExports.jsx("title",{children:oe}),t.jsxRuntimeExports.jsx("meta",{name:"description",content:se}),t.jsxRuntimeExports.jsx("meta",{name:"theme-color",content:o.JeneseiPalette[U]}),t.jsxRuntimeExports.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),t.jsxRuntimeExports.jsx("meta",{name:"mobile-web-app-capable",content:"yes"}),t.jsxRuntimeExports.jsx(i.Preview,{...ce,children:t.jsxRuntimeExports.jsx(x,{$bgColor:V,$bgImage:_,children:t.jsxRuntimeExports.jsxs(f,{$isScrollOutlet:e.isScrollOutlet,$footer:e.footer,$notification:e.notification,$header:e.header,$nav:e.nav,$leftAside:e.leftAside,$rightAside:e.rightAside,children:[(null==(l=e.notification)?void 0:l.length)&&(null==(p=null==(n=e.notification)?void 0:n.length)?void 0:p[he])?t.jsxRuntimeExports.jsx(C,{$notification:e.notification,children:(null==(v=e.notification)?void 0:v.component)||null}):null,(null==(B=e.header)?void 0:B.length)&&(null==(j=null==(H=e.header)?void 0:H.length)?void 0:j[he])?t.jsxRuntimeExports.jsx(I,{$header:e.header,children:(null==(D=e.header)?void 0:D.component)||null}):null,(null==(w=e.nav)?void 0:w.length)&&(null==(S=null==(E=e.nav)?void 0:E.length)?void 0:S[he])?t.jsxRuntimeExports.jsx($,{$nav:e.nav,children:(null==(P=e.nav)?void 0:P.component)||null}):null,(null==(k=e.leftAside)?void 0:k.length)&&(null==(R=null==(T=e.leftAside)?void 0:T.length)?void 0:R[he])?t.jsxRuntimeExports.jsx(y,{$leftAside:e.leftAside,children:(null==(O=e.leftAside)?void 0:O.component)||null}):null,t.jsxRuntimeExports.jsx(m,{$isScrollOutlet:e.isScrollOutlet,$main:e.main,children:e.children}),(null==(z=e.rightAside)?void 0:z.length)&&(null==(q=null==(W=e.rightAside)?void 0:W.length)?void 0:q[he])?t.jsxRuntimeExports.jsx(A,{$rightAside:e.rightAside,children:(null==(N=e.rightAside)?void 0:N.component)||null}):null,(null==(F=e.footer)?void 0:F.length)&&(null==(G=null==(J=e.footer)?void 0:J.length)?void 0:G[he])?t.jsxRuntimeExports.jsx(b,{$footer:e.footer,children:(null==(L=e.footer)?void 0:L.component)||null}):null]})})})]})},exports.ProviderAppOutlet=f,exports.ProviderAppOutletChildren=m,exports.ProviderAppOutletFooter=b,exports.ProviderAppOutletHeader=I,exports.ProviderAppOutletLeftAside=y,exports.ProviderAppOutletNav=$,exports.ProviderAppOutletNotification=C,exports.ProviderAppOutletRightAside=A,exports.ProviderAppWrapper=x,exports.useApp=()=>{const t=e.useContext(s);if(!t)throw new Error("useApp must be used within an ProviderApp");return t},exports.useBgColor=d,exports.useBgImage=g,exports.useDescription=h,exports.useStatusBarColor=u;
72
+ //# sourceMappingURL=context.hooks-Ci37RyLf.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.hooks-Ci37RyLf.cjs","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview';\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme';\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react';\n\nimport { useScreenWidth } from '../context-screen-width';\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper,\n} from '.';\n\nexport const AppContext = createContext<AppContextProps | null>(null);\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = (props) => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor);\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor,\n );\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null);\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null);\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription,\n );\n const { changePreview, previewProps } = usePreview(props.defaultPreview);\n const { screenActual } = useScreenWidth();\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription,\n }}\n >\n <title>{title}</title>\n <meta name='description' content={description} />\n <meta name='theme-color' content={JeneseiPalette[statusBarColor]} />\n <meta name='apple-mobile-web-app-status-bar-style' content='default' />\n <meta name='mobile-web-app-capable' content='yes' />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>\n {props.children}\n </ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n );\n};\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true });\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps);\n }, []);\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview);\n }, [defaultPreview]);\n\n return { previewProps, changePreview };\n};\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys;\n bgColorHistory: IThemePaletteKeys[];\n bgColorIndex: number;\n};\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color];\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex,\n };\n};\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys;\n statusBarColorHistory: IThemePaletteKeys[];\n statusBarColorIndex: number;\n};\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color];\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.statusBarColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex,\n };\n};\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null;\n bgImageHistory: (string | null)[];\n bgImageIndex: number;\n};\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n\n const changeBgImage = useCallback((image: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image];\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgImage = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgImageIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex,\n };\n};\n\ntype TitleState = {\n title: string | null;\n titleHistory: (string | null)[];\n titleIndex: number;\n};\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle];\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.titleIndex + steps;\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle,\n };\n};\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string;\n descriptionHistory: string[];\n descriptionIndex: number;\n};\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n\n const changeDescription = useCallback((newDescription: string) => {\n setState((prev) => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription];\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyDescription = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.descriptionIndex + steps;\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex,\n };\n};\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react';\n\nimport { AppContext } from '.';\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext);\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp');\n }\n return context;\n};\n"],"names":["AppContext","createContext","usePreview","defaultPreview","previewProps","setPreviewProps","useState","visible","defaultVisible","changePreview","useCallback","newPreviewProps","useEffect","useBgColor","defaultColor","state","setState","bgColor","bgColorHistory","bgColorIndex","changeBgColor","color","prev","newHistory","slice","length","historyBgColor","steps","newIndex","setDefaultBgColor","useStatusBarColor","statusBarColor","statusBarColorHistory","statusBarColorIndex","changeStatusBarColor","historyStatusBarColor","setDefaultStatusBarColor","useBgImage","defaultImage","bgImage","bgImageHistory","bgImageIndex","changeBgImage","image","historyBgImage","setDefaultBgImage","useTitle","defaultTitle","title","titleHistory","titleIndex","changeTitle","newTitle","setHistoryTitle","setDefaultTitle","useDescription","defaultDescription","description","descriptionHistory","descriptionIndex","changeDescription","newDescription","historyDescription","setDefaultDescription","ProviderAppWrapper","styled","div","props","JeneseiPalette","$bgColor","$bgImage","toStyledAppOutletCSS","css","leftAsideWidth","rightAsideWidth","notificationHeight","headerHeight","navHeight","footerHeight","addSXAppOutlet","_b","_a","$leftAside","default","_d","_c","$rightAside","_f","_e","$notification","_h","_g","$header","_j","_i","$nav","_l","_k","$footer","Object","entries","theme","screens","filter","key","map","deviceKey","screenWidth","width","ProviderAppOutlet","addGridTransition","templateAreas","isTopHeader","isTopNav","isTopFooter","generateGridTemplateAreas","ProviderAppOutletChildren","main","$main","zIndex","$isScrollOutlet","ProviderAppOutletNotification","section","ProviderAppOutletHeader","header","ProviderAppOutletFooter","footer","ProviderAppOutletNav","nav","ProviderAppOutletLeftAside","aside","ProviderAppOutletRightAside","defaultBgColor","defaultStatusBarColor","defaultBgImage","screenActual","useScreenWidth","jsxs","Provider","value","children","jsx","name","content","Preview","isScrollOutlet","notification","leftAside","rightAside","component","_m","_o","_n","_q","_s","_r","_u","_w","_v","context","useContext","Error"],"mappings":"mQAoBaA,EAAaC,EAAAA,cAAsC,MA2H1DC,EAAcC,IAClB,MAAOC,EAAcC,GAAmBC,WAASH,GAAkB,CAAEI,SAAS,EAAMC,gBAAgB,IAE9FC,EAAgBC,cAAaC,IACjCN,EAAgBM,IACf,IAMH,OAJAC,EAAAA,UAAU,KACJT,KAAgCA,IACnC,CAACA,IAEG,CAAEC,eAAcK,kBAYZI,EAAcC,IACzB,MAAOC,EAAOC,GAAYV,WAAuB,CAC/CW,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,IAGVC,EAAgBV,cAAaW,IACjCL,EAAUM,IACR,MAAMC,EAAa,IAAID,EAAKJ,eAAeM,MAAM,EAAGF,EAAKH,aAAe,GAAIE,GAC5E,MAAO,CACLJ,QAASI,EACTH,eAAgBK,EAChBJ,aAAcI,EAAWE,OAAS,MAGrC,IAEGC,EAAiBhB,cAAaiB,IAClCX,EAAUM,IACR,MAAMM,EAAWN,EAAKH,aAAeQ,EACrC,OAAIC,GAAY,GAAKA,EAAWN,EAAKJ,eA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EAAM2D,aAAN,EAAAgC,EAAcrI,aAAd,EAAAoI,EAAuBtB,KAC9CM,wBAAChB,EAAA,CAAwB3B,QAAS/B,EAAM2D,OACrCc,qBAAMd,iBAAQuB,YAAa,OAE5B,kVE7HM,KACpB,MAAMU,EAAUC,EAAAA,WAAWhK,GAC3B,IAAK+J,EACH,MAAM,IAAIE,MAAM,6CAElB,OAAOF"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-D13tbrva.cjs","sources":["../src/contexts/context-permission/context.tsx","../src/contexts/context-permission/context.hooks.ts"],"sourcesContent":["import { createContext, useCallback, useEffect, useState } from 'react'\n\nimport { PermissionContextProps, ProviderPermissionProps } from '.'\n\nexport const PermissionContext = createContext<PermissionContextProps | null>(null)\n\nexport const ProviderPermission = (props: ProviderPermissionProps) => {\n const { pushNotificationSupported } = usePushNotificationSupported()\n const { isBiometricSupported } = useBiometricSupported()\n const { notificationPermission, requestNotificationPermission, isNotificationPermissionLoading } =\n useNotificationPermission()\n const { geolocationPermission, requestGeolocationPermission } = useGeolocationPermission()\n\n return (\n <PermissionContext.Provider\n value={{\n isBiometricSupported,\n geolocationPermission,\n pushNotificationSupported,\n requestGeolocationPermission,\n notificationPermission,\n requestNotificationPermission,\n isNotificationPermissionLoading\n }}\n >\n {props.children}\n </PermissionContext.Provider>\n )\n}\n\nconst useBiometricSupported = () => {\n const [isBiometricSupported, setIsBiometricSupported] = useState(false)\n\n useEffect(() => {\n const checkBiometricAvailability = async () => {\n try {\n if (\n window.PublicKeyCredential &&\n typeof window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable === 'function'\n ) {\n const available = await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()\n setIsBiometricSupported(available)\n } else {\n setIsBiometricSupported(false)\n }\n } catch (error) {\n console.error('Error checking biometric availability:', error)\n setIsBiometricSupported(false)\n }\n }\n\n checkBiometricAvailability()\n }, [])\n\n return { isBiometricSupported }\n}\n\nconst useGeolocationPermission = () => {\n // eslint-disable-next-line no-undef\n const [geolocationPermission, setGeolocationPermission] = useState<PermissionState | null>(null)\n\n useEffect(() => {\n if ('permissions' in window.navigator) {\n window.navigator.permissions.query({ name: 'geolocation' }).then(permissionStatus => {\n setGeolocationPermission(permissionStatus.state)\n permissionStatus.onchange = () => {\n setGeolocationPermission(permissionStatus.state)\n }\n })\n }\n }, [])\n\n const requestGeolocationPermission = useCallback(() => {\n if ('geolocation' in window.navigator) {\n window.navigator.geolocation.getCurrentPosition(\n () => setGeolocationPermission('granted'),\n () => setGeolocationPermission('denied')\n )\n } else {\n console.warn('Provider Permission. Geolocation is not supported in this browser.')\n }\n }, [])\n\n return { geolocationPermission, requestGeolocationPermission }\n}\n\nconst useNotificationPermission = () => {\n // eslint-disable-next-line no-undef\n const [notificationPermission, setNotificationPermission] = useState<NotificationPermission | null>(null)\n const [isNotificationPermissionLoading, setIsNotificationPermissionLoading] = useState<boolean>(false)\n\n const requestNotificationPermission = useCallback(async () => {\n setIsNotificationPermissionLoading(true)\n if ('Notification' in window) {\n try {\n setIsNotificationPermissionLoading(true)\n const permission = await window.Notification.requestPermission()\n setNotificationPermission(permission)\n setIsNotificationPermissionLoading(false)\n return permission\n } catch (error) {\n console.error('Provider Permission. Failed to request notification permission:', error)\n }\n } else {\n console.warn('Provider Permission. Notifications are not supported in this browser.')\n }\n setIsNotificationPermissionLoading(false)\n }, [])\n\n useEffect(() => {\n if ('Notification' in window) {\n setNotificationPermission(window.Notification.permission)\n }\n }, [])\n\n return { notificationPermission, requestNotificationPermission, isNotificationPermissionLoading }\n}\n\nconst usePushNotificationSupported = () => {\n const [pushNotificationSupported, setPushNotificationSupported] = useState<boolean>(false)\n\n useEffect(() => {\n if ('PushManager' in window) {\n setPushNotificationSupported(true)\n }\n }, [])\n\n return { pushNotificationSupported }\n}\n","import { useContext } from 'react'\n\nimport { PermissionContext, PermissionContextProps } from '.'\n\n/**\n * Custom hook to access the PermissionContext.\n */\nexport const usePermission = (): PermissionContextProps => {\n const context = useContext(PermissionContext)\n if (!context) {\n throw new Error('usePermission must be used within an PermissionProvider')\n }\n return context\n}\n"],"names":["PermissionContext","createContext","useBiometricSupported","isBiometricSupported","setIsBiometricSupported","useState","useEffect","async","window","PublicKeyCredential","isUserVerifyingPlatformAuthenticatorAvailable","available","error","console","checkBiometricAvailability","useGeolocationPermission","geolocationPermission","setGeolocationPermission","navigator","permissions","query","name","then","permissionStatus","state","onchange","requestGeolocationPermission","useCallback","geolocation","getCurrentPosition","warn","useNotificationPermission","notificationPermission","setNotificationPermission","isNotificationPermissionLoading","setIsNotificationPermissionLoading","requestNotificationPermission","permission","Notification","requestPermission","usePushNotificationSupported","pushNotificationSupported","setPushNotificationSupported","props","jsx","Provider","value","children","context","useContext","Error"],"mappings":"8EAIaA,EAAoBC,EAAAA,cAA6C,MA0BxEC,EAAwB,KAC5B,MAAOC,EAAsBC,GAA2BC,EAAAA,UAAS,GAuBjE,OArBAC,EAAAA,UAAU,KAC2BC,WACjC,IACE,GACEC,OAAOC,qBAC6E,mBAA7ED,OAAOC,oBAAoBC,8CAClC,CACA,MAAMC,QAAkBH,OAAOC,oBAAoBC,gDACnDN,EAAwBO,EAAS,MAEjCP,GAAwB,EAC1B,OACOQ,GACPC,QAAQD,MAAM,yCAA0CA,GACxDR,GAAwB,EAAK,GAIjCU,IACC,IAEI,CAAEX,yBAGLY,EAA2B,KAE/B,MAAOC,EAAuBC,GAA4BZ,EAAAA,SAAiC,MAE3FC,EAAAA,UAAU,KACJ,gBAAiBE,OAAOU,WAC1BV,OAAOU,UAAUC,YAAYC,MAAM,CAAEC,KAAM,gBAAiBC,KAAKC,IAC/DN,EAAyBM,EAAiBC,OAC1CD,EAAiBE,SAAW,KAC1BR,EAAyBM,EAAiBC,WAI/C,IAaH,MAAO,CAAER,wBAAuBU,6BAXKC,EAAAA,YAAY,KAC3C,gBAAiBnB,OAAOU,UAC1BV,OAAOU,UAAUU,YAAYC,mBAC3B,IAAMZ,EAAyB,WAC/B,IAAMA,EAAyB,WAGjCJ,QAAQiB,KAAK,uEAEd,MAKCC,EAA4B,KAEhC,MAAOC,EAAwBC,GAA6B5B,EAAAA,SAAwC,OAC7F6B,EAAiCC,GAAsC9B,EAAAA,UAAkB,GAE1F+B,EAAgCT,EAAAA,YAAYpB,UAEhD,GADA4B,GAAmC,GAC/B,iBAAkB3B,OACpB,IACE2B,GAAmC,GACnC,MAAME,QAAmB7B,OAAO8B,aAAaC,oBAG7C,OAFAN,EAA0BI,GAC1BF,GAAmC,GAC5BE,CAAA,OACAzB,GACPC,QAAQD,MAAM,kEAAmEA,EAAK,MAGxFC,QAAQiB,KAAK,yEAEfK,GAAmC,IAClC,IAQH,OANA7B,EAAAA,UAAU,KACJ,iBAAkBE,QACpByB,EAA0BzB,OAAO8B,aAAaD,aAE/C,IAEI,CAAEL,yBAAwBI,gCAA+BF,oCAG5DM,EAA+B,KACnC,MAAOC,EAA2BC,GAAgCrC,EAAAA,UAAkB,GAQpF,OANAC,EAAAA,UAAU,KACJ,gBAAiBE,QACnBkC,GAA6B,IAE9B,IAEI,CAAED,qFAzHwBE,IACjC,MAAMF,0BAAEA,GAA8BD,KAChCrC,qBAAEA,GAAyBD,KAC3B8B,uBAAEA,EAAAI,8BAAwBA,EAAAF,gCAA+BA,GAC7DH,KACIf,sBAAEA,EAAAU,6BAAuBA,GAAiCX,IAEhE,SACE6B,kBAAAA,IAAC5C,EAAkB6C,SAAlB,CACCC,MAAO,CACL3C,uBACAa,wBACAyB,4BACAf,+BACAM,yBACAI,gCACAF,mCAGDa,SAAAJ,EAAMI,kCClBgB,KAC3B,MAAMC,EAAUC,EAAAA,WAAWjD,GAC3B,IAAKgD,EACH,MAAM,IAAIE,MAAM,2DAElB,OAAOF"}
1
+ {"version":3,"file":"context.hooks-D13tbrva.cjs","sources":["../src/contexts/context-permission/context.tsx","../src/contexts/context-permission/context.hooks.ts"],"sourcesContent":["import { createContext, useCallback, useEffect, useState } from 'react';\n\nimport { PermissionContextProps, ProviderPermissionProps } from '.';\n\nexport const PermissionContext = createContext<PermissionContextProps | null>(null);\n\nexport const ProviderPermission = (props: ProviderPermissionProps) => {\n const { pushNotificationSupported } = usePushNotificationSupported();\n const { isBiometricSupported } = useBiometricSupported();\n const { notificationPermission, requestNotificationPermission, isNotificationPermissionLoading } =\n useNotificationPermission();\n const { geolocationPermission, requestGeolocationPermission } = useGeolocationPermission();\n\n return (\n <PermissionContext.Provider\n value={{\n isBiometricSupported,\n geolocationPermission,\n pushNotificationSupported,\n requestGeolocationPermission,\n notificationPermission,\n requestNotificationPermission,\n isNotificationPermissionLoading,\n }}\n >\n {props.children}\n </PermissionContext.Provider>\n );\n};\n\nconst useBiometricSupported = () => {\n const [isBiometricSupported, setIsBiometricSupported] = useState(false);\n\n useEffect(() => {\n const checkBiometricAvailability = async () => {\n try {\n if (\n window.PublicKeyCredential &&\n typeof window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable === 'function'\n ) {\n const available = await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();\n setIsBiometricSupported(available);\n } else {\n setIsBiometricSupported(false);\n }\n } catch (error) {\n console.error('Error checking biometric availability:', error);\n setIsBiometricSupported(false);\n }\n };\n\n checkBiometricAvailability();\n }, []);\n\n return { isBiometricSupported };\n};\n\nconst useGeolocationPermission = () => {\n // eslint-disable-next-line no-undef\n const [geolocationPermission, setGeolocationPermission] = useState<PermissionState | null>(null);\n\n useEffect(() => {\n if ('permissions' in window.navigator) {\n window.navigator.permissions.query({ name: 'geolocation' }).then((permissionStatus) => {\n setGeolocationPermission(permissionStatus.state);\n permissionStatus.onchange = () => {\n setGeolocationPermission(permissionStatus.state);\n };\n });\n }\n }, []);\n\n const requestGeolocationPermission = useCallback(() => {\n if ('geolocation' in window.navigator) {\n window.navigator.geolocation.getCurrentPosition(\n () => setGeolocationPermission('granted'),\n () => setGeolocationPermission('denied'),\n );\n } else {\n console.warn('Provider Permission. Geolocation is not supported in this browser.');\n }\n }, []);\n\n return { geolocationPermission, requestGeolocationPermission };\n};\n\nconst useNotificationPermission = () => {\n // eslint-disable-next-line no-undef\n const [notificationPermission, setNotificationPermission] = useState<NotificationPermission | null>(null);\n const [isNotificationPermissionLoading, setIsNotificationPermissionLoading] = useState<boolean>(false);\n\n const requestNotificationPermission = useCallback(async () => {\n setIsNotificationPermissionLoading(true);\n if ('Notification' in window) {\n try {\n setIsNotificationPermissionLoading(true);\n const permission = await window.Notification.requestPermission();\n setNotificationPermission(permission);\n setIsNotificationPermissionLoading(false);\n return permission;\n } catch (error) {\n console.error('Provider Permission. Failed to request notification permission:', error);\n }\n } else {\n console.warn('Provider Permission. Notifications are not supported in this browser.');\n }\n setIsNotificationPermissionLoading(false);\n }, []);\n\n useEffect(() => {\n if ('Notification' in window) {\n setNotificationPermission(window.Notification.permission);\n }\n }, []);\n\n return { notificationPermission, requestNotificationPermission, isNotificationPermissionLoading };\n};\n\nconst usePushNotificationSupported = () => {\n const [pushNotificationSupported, setPushNotificationSupported] = useState<boolean>(false);\n\n useEffect(() => {\n if ('PushManager' in window) {\n setPushNotificationSupported(true);\n }\n }, []);\n\n return { pushNotificationSupported };\n};\n","import { useContext } from 'react';\n\nimport { PermissionContext, PermissionContextProps } from '.';\n\n/**\n * Custom hook to access the PermissionContext.\n */\nexport const usePermission = (): PermissionContextProps => {\n const context = useContext(PermissionContext);\n if (!context) {\n throw new Error('usePermission must be used within an PermissionProvider');\n }\n return context;\n};\n"],"names":["PermissionContext","createContext","useBiometricSupported","isBiometricSupported","setIsBiometricSupported","useState","useEffect","async","window","PublicKeyCredential","isUserVerifyingPlatformAuthenticatorAvailable","available","error","console","checkBiometricAvailability","useGeolocationPermission","geolocationPermission","setGeolocationPermission","navigator","permissions","query","name","then","permissionStatus","state","onchange","requestGeolocationPermission","useCallback","geolocation","getCurrentPosition","warn","useNotificationPermission","notificationPermission","setNotificationPermission","isNotificationPermissionLoading","setIsNotificationPermissionLoading","requestNotificationPermission","permission","Notification","requestPermission","usePushNotificationSupported","pushNotificationSupported","setPushNotificationSupported","props","jsx","Provider","value","children","context","useContext","Error"],"mappings":"8EAIaA,EAAoBC,EAAAA,cAA6C,MA0BxEC,EAAwB,KAC5B,MAAOC,EAAsBC,GAA2BC,EAAAA,UAAS,GAuBjE,OArBAC,EAAAA,UAAU,KAC2BC,WACjC,IACE,GACEC,OAAOC,qBAC6E,mBAA7ED,OAAOC,oBAAoBC,8CAClC,CACA,MAAMC,QAAkBH,OAAOC,oBAAoBC,gDACnDN,EAAwBO,EAAS,MAEjCP,GAAwB,EAC1B,OACOQ,GACPC,QAAQD,MAAM,yCAA0CA,GACxDR,GAAwB,EAAK,GAIjCU,IACC,IAEI,CAAEX,yBAGLY,EAA2B,KAE/B,MAAOC,EAAuBC,GAA4BZ,EAAAA,SAAiC,MAE3FC,EAAAA,UAAU,KACJ,gBAAiBE,OAAOU,WAC1BV,OAAOU,UAAUC,YAAYC,MAAM,CAAEC,KAAM,gBAAiBC,KAAMC,IAChEN,EAAyBM,EAAiBC,OAC1CD,EAAiBE,SAAW,KAC1BR,EAAyBM,EAAiBC,WAI/C,IAaH,MAAO,CAAER,wBAAuBU,6BAXKC,EAAAA,YAAY,KAC3C,gBAAiBnB,OAAOU,UAC1BV,OAAOU,UAAUU,YAAYC,mBAC3B,IAAMZ,EAAyB,WAC/B,IAAMA,EAAyB,WAGjCJ,QAAQiB,KAAK,uEAEd,MAKCC,EAA4B,KAEhC,MAAOC,EAAwBC,GAA6B5B,EAAAA,SAAwC,OAC7F6B,EAAiCC,GAAsC9B,EAAAA,UAAkB,GAE1F+B,EAAgCT,EAAAA,YAAYpB,UAEhD,GADA4B,GAAmC,GAC/B,iBAAkB3B,OACpB,IACE2B,GAAmC,GACnC,MAAME,QAAmB7B,OAAO8B,aAAaC,oBAG7C,OAFAN,EAA0BI,GAC1BF,GAAmC,GAC5BE,CAAA,OACAzB,GACPC,QAAQD,MAAM,kEAAmEA,EAAK,MAGxFC,QAAQiB,KAAK,yEAEfK,GAAmC,IAClC,IAQH,OANA7B,EAAAA,UAAU,KACJ,iBAAkBE,QACpByB,EAA0BzB,OAAO8B,aAAaD,aAE/C,IAEI,CAAEL,yBAAwBI,gCAA+BF,oCAG5DM,EAA+B,KACnC,MAAOC,EAA2BC,GAAgCrC,EAAAA,UAAkB,GAQpF,OANAC,EAAAA,UAAU,KACJ,gBAAiBE,QACnBkC,GAA6B,IAE9B,IAEI,CAAED,qFAzHwBE,IACjC,MAAMF,0BAAEA,GAA8BD,KAChCrC,qBAAEA,GAAyBD,KAC3B8B,uBAAEA,EAAAI,8BAAwBA,EAAAF,gCAA+BA,GAC7DH,KACIf,sBAAEA,EAAAU,6BAAuBA,GAAiCX,IAEhE,SACE6B,kBAAAA,IAAC5C,EAAkB6C,SAAlB,CACCC,MAAO,CACL3C,uBACAa,wBACAyB,4BACAf,+BACAM,yBACAI,gCACAF,mCAGDa,SAAAJ,EAAMI,kCClBgB,KAC3B,MAAMC,EAAUC,EAAAA,WAAWjD,GAC3B,IAAKgD,EACH,MAAM,IAAIE,MAAM,2DAElB,OAAOF"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-u408Pxw8.cjs","sources":["../src/contexts/context-geolocation/context.tsx","../src/contexts/context-geolocation/context.hooks.ts"],"sourcesContent":["import { FC, createContext, useEffect, useState } from 'react'\n\nimport { usePermission } from '@local/contexts/context-permission'\n\nimport { GeolocationContextProps, ProviderGeolocationProps } from '.'\n\nexport const GeolocationContext = createContext<GeolocationContextProps | null>(null)\n\nexport const ProviderGeolocation: FC<ProviderGeolocationProps> = props => {\n const { geolocationPermission, requestGeolocationPermission } = usePermission()\n\n const [location, setLocation] = useState<GeolocationPosition | null>(null)\n const [error, setError] = useState<GeolocationPositionError | null>(null)\n\n useEffect(() => {\n const handleSuccess = (position: GeolocationPosition) => {\n setLocation(position)\n }\n\n const handleError = (error: GeolocationPositionError) => {\n setError(error)\n }\n\n if (geolocationPermission === 'granted') {\n navigator.geolocation.getCurrentPosition(handleSuccess, handleError)\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission])\n\n useEffect(() => {\n if (props.isAskEntrance) {\n if (geolocationPermission !== 'granted') {\n requestGeolocationPermission()\n }\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission])\n return (\n <GeolocationContext.Provider\n value={{\n requestGeolocationPermission,\n geolocationPermission,\n location,\n error\n }}\n >\n {props.children}\n </GeolocationContext.Provider>\n )\n}\n","import { useContext } from 'react'\n\nimport { GeolocationContext, GeolocationContextProps } from '.'\n\nexport const useGeolocation = (): GeolocationContextProps => {\n const context = useContext(GeolocationContext)\n if (!context) {\n throw new Error('useGeolocation must be used within an ProviderGeolocation')\n }\n return context\n}\n"],"names":["GeolocationContext","createContext","props","geolocationPermission","requestGeolocationPermission","usePermission","location","setLocation","useState","error","setError","useEffect","handleSuccess","position","handleError","navigator","geolocation","getCurrentPosition","isAskEntrance","jsx","Provider","value","children","context","useContext","Error"],"mappings":"wHAMaA,EAAqBC,EAAAA,cAA8C,+DAEfC,IAC/D,MAAMC,sBAAEA,EAAAC,6BAAuBA,GAAiCC,mBAEzDC,EAAUC,GAAeC,EAAAA,SAAqC,OAC9DC,EAAOC,GAAYF,EAAAA,SAA0C,MAuBpE,OArBAG,EAAAA,UAAU,KACR,MAAMC,EAAiBC,IACrBN,EAAYM,IAGRC,EAAeL,IACnBC,EAASD,IAGmB,YAA1BN,GACFY,UAAUC,YAAYC,mBAAmBL,EAAeE,IAEzD,CAACX,EAAuBD,EAAMgB,cAAed,IAEhDO,EAAAA,UAAU,KACJT,EAAMgB,eACsB,YAA1Bf,GACFC,KAGH,CAACD,EAAuBD,EAAMgB,cAAed,MAE9Ce,kBAAAA,IAACnB,EAAmBoB,SAAnB,CACCC,MAAO,CACLjB,+BACAD,wBACAG,WACAG,SAGDa,SAAApB,EAAMoB,mCCxCiB,KAC5B,MAAMC,EAAUC,EAAAA,WAAWxB,GAC3B,IAAKuB,EACH,MAAM,IAAIE,MAAM,6DAElB,OAAOF"}
1
+ {"version":3,"file":"context.hooks-u408Pxw8.cjs","sources":["../src/contexts/context-geolocation/context.tsx","../src/contexts/context-geolocation/context.hooks.ts"],"sourcesContent":["import { FC, createContext, useEffect, useState } from 'react';\n\nimport { usePermission } from '@local/contexts/context-permission';\n\nimport { GeolocationContextProps, ProviderGeolocationProps } from '.';\n\nexport const GeolocationContext = createContext<GeolocationContextProps | null>(null);\n\nexport const ProviderGeolocation: FC<ProviderGeolocationProps> = (props) => {\n const { geolocationPermission, requestGeolocationPermission } = usePermission();\n\n const [location, setLocation] = useState<GeolocationPosition | null>(null);\n const [error, setError] = useState<GeolocationPositionError | null>(null);\n\n useEffect(() => {\n const handleSuccess = (position: GeolocationPosition) => {\n setLocation(position);\n };\n\n const handleError = (error: GeolocationPositionError) => {\n setError(error);\n };\n\n if (geolocationPermission === 'granted') {\n navigator.geolocation.getCurrentPosition(handleSuccess, handleError);\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission]);\n\n useEffect(() => {\n if (props.isAskEntrance) {\n if (geolocationPermission !== 'granted') {\n requestGeolocationPermission();\n }\n }\n }, [geolocationPermission, props.isAskEntrance, requestGeolocationPermission]);\n return (\n <GeolocationContext.Provider\n value={{\n requestGeolocationPermission,\n geolocationPermission,\n location,\n error,\n }}\n >\n {props.children}\n </GeolocationContext.Provider>\n );\n};\n","import { useContext } from 'react';\n\nimport { GeolocationContext, GeolocationContextProps } from '.';\n\nexport const useGeolocation = (): GeolocationContextProps => {\n const context = useContext(GeolocationContext);\n if (!context) {\n throw new Error('useGeolocation must be used within an ProviderGeolocation');\n }\n return context;\n};\n"],"names":["GeolocationContext","createContext","props","geolocationPermission","requestGeolocationPermission","usePermission","location","setLocation","useState","error","setError","useEffect","handleSuccess","position","handleError","navigator","geolocation","getCurrentPosition","isAskEntrance","jsx","Provider","value","children","context","useContext","Error"],"mappings":"wHAMaA,EAAqBC,EAAAA,cAA8C,+DAEdC,IAChE,MAAMC,sBAAEA,EAAAC,6BAAuBA,GAAiCC,mBAEzDC,EAAUC,GAAeC,EAAAA,SAAqC,OAC9DC,EAAOC,GAAYF,EAAAA,SAA0C,MAuBpE,OArBAG,EAAAA,UAAU,KACR,MAAMC,EAAiBC,IACrBN,EAAYM,IAGRC,EAAeL,IACnBC,EAASD,IAGmB,YAA1BN,GACFY,UAAUC,YAAYC,mBAAmBL,EAAeE,IAEzD,CAACX,EAAuBD,EAAMgB,cAAed,IAEhDO,EAAAA,UAAU,KACJT,EAAMgB,eACsB,YAA1Bf,GACFC,KAGH,CAACD,EAAuBD,EAAMgB,cAAed,MAE9Ce,kBAAAA,IAACnB,EAAmBoB,SAAnB,CACCC,MAAO,CACLjB,+BACAD,wBACAG,WACAG,SAGDa,SAAApB,EAAMoB,mCCxCiB,KAC5B,MAAMC,EAAUC,EAAAA,WAAWxB,GAC3B,IAAKuB,EACH,MAAM,IAAIE,MAAM,6DAElB,OAAOF"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react");require("./jsx-runtime-BcGej2Kr.cjs");const t=require("react-dom");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const o=n(e),r=n(t);function i(){return"undefined"!=typeof window}function l(e){return u(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(u(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function u(e){return!!i()&&(e instanceof Node||e instanceof c(e).Node)}function f(e){return!!i()&&(e instanceof Element||e instanceof c(e).Element)}function a(e){return!!i()&&(e instanceof HTMLElement||e instanceof c(e).HTMLElement)}function d(e){return!(!i()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}function m(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=w(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function p(e){return["table","td","th"].includes(l(e))}function g(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function h(e){const t=y(),n=f(e)?w(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function x(e){return["html","body","#document"].includes(l(e))}function w(e){return c(e).getComputedStyle(e)}function v(e){return f(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function b(e){if("html"===l(e))return e;const t=e.assignedSlot||e.parentNode||d(e)&&e.host||s(e);return d(t)?t.host:t}function R(e){const t=b(e);return x(t)?e.ownerDocument?e.ownerDocument.body:e.body:a(t)&&m(t)?t:R(t)}function E(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=R(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=c(r);if(i){const e=C(l);return t.concat(l,l.visualViewport||[],m(r)?r:[],e&&n?E(e):[])}return t.concat(r,E(r,[],n))}function C(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const S=Math.min,L=Math.max,T=Math.round,O=Math.floor,A=e=>({x:e,y:e}),M={left:"right",right:"left",bottom:"top",top:"bottom"},P={start:"end",end:"start"};function D(e,t,n){return L(e,S(t,n))}function k(e,t){return"function"==typeof e?e(t):e}function F(e){return e.split("-")[0]}function B(e){return e.split("-")[1]}function V(e){return"x"===e?"y":"x"}function j(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(F(e))?"y":"x"}function H(e){return V(N(e))}function W(e){return e.replace(/start|end/g,e=>P[e])}function I(e){return e.replace(/left|right|bottom|top/g,e=>M[e])}function z(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}var _="undefined"!=typeof document?e.useLayoutEffect:function(){};const q={...o}.useInsertionEffect||(e=>e());function $(e,t,n){let{reference:o,floating:r}=e;const i=N(t),l=H(t),c=j(l),s=F(t),u="y"===i,f=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2,d=o[c]/2-r[c]/2;let m;switch(s){case"top":m={x:f,y:o.y-r.height};break;case"bottom":m={x:f,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:a};break;case"left":m={x:o.x-r.width,y:a};break;default:m={x:o.x,y:o.y}}switch(B(t)){case"start":m[l]-=d*(n&&u?-1:1);break;case"end":m[l]+=d*(n&&u?-1:1)}return m}async function U(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:c,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:a="floating",altBoundary:d=!1,padding:m=0}=k(t,e),p=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(m),g=c[d?"floating"===a?"reference":"floating":a],h=z(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:s})),y="floating"===a?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),w=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},v=z(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:s}):y);return{top:(h.top-v.top+p.top)/w.y,bottom:(v.bottom-h.bottom+p.bottom)/w.y,left:(h.left-v.left+p.left)/w.x,right:(v.right-h.right+p.right)/w.x}}function X(e){const t=w(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=a(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,c=T(n)!==i||T(o)!==l;return c&&(n=i,o=l),{width:n,height:o,$:c}}function Y(e){return f(e)?e:e.contextElement}function G(e){const t=Y(e);if(!a(t))return A(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=X(t);let l=(i?T(n.width):n.width)/o,c=(i?T(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const J=A(0);function K(e){const t=c(e);return y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function Q(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Y(e);let l=A(1);t&&(o?f(o)&&(l=G(o)):l=G(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==c(e))&&t}(i,n,o)?K(i):A(0);let u=(r.left+s.x)/l.x,a=(r.top+s.y)/l.y,d=r.width/l.x,m=r.height/l.y;if(i){const e=c(i),t=o&&f(o)?c(o):o;let n=e,r=C(n);for(;r&&o&&t!==n;){const e=G(r),t=r.getBoundingClientRect(),o=w(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;u*=e.x,a*=e.y,d*=e.x,m*=e.y,u+=i,a+=l,n=c(r),r=C(n)}}return z({width:d,height:m,x:u,y:a})}function Z(e,t){const n=v(e).scrollLeft;return t?t.left+n:Q(s(e)).left+n}function ee(e,t,n){void 0===n&&(n=!1);const o=e.getBoundingClientRect();return{x:o.left+t.scrollLeft-(n?0:Z(e,o)),y:o.top+t.scrollTop}}function te(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=c(e),o=s(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,u=0,f=0;if(r){i=r.width,l=r.height;const e=y();(!e||e&&"fixed"===t)&&(u=r.offsetLeft,f=r.offsetTop)}return{width:i,height:l,x:u,y:f}}(e,n);else if("document"===t)o=function(e){const t=s(e),n=v(e),o=e.ownerDocument.body,r=L(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=L(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Z(e);const c=-n.scrollTop;return"rtl"===w(o).direction&&(l+=L(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:c}}(s(e));else if(f(t))o=function(e,t){const n=Q(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=a(e)?G(e):A(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=K(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return z(o)}function ne(e,t){const n=b(e);return!(n===t||!f(n)||x(n))&&("fixed"===w(n).position||ne(n,t))}function oe(e,t,n){const o=a(t),r=s(t),i="fixed"===n,c=Q(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const f=A(0);function d(){f.x=Z(r)}if(o||!o&&!i)if(("body"!==l(t)||m(r))&&(u=v(t)),o){const e=Q(t,!0,i,t);f.x=e.x+t.clientLeft,f.y=e.y+t.clientTop}else r&&d();i&&!o&&r&&d();const p=!r||o||i?A(0):ee(r,u);return{x:c.left+u.scrollLeft-f.x-p.x,y:c.top+u.scrollTop-f.y-p.y,width:c.width,height:c.height}}function re(e){return"static"===w(e).position}function ie(e,t){if(!a(e)||"fixed"===w(e).position)return null;if(t)return t(e);let n=e.offsetParent;return s(e)===n&&(n=n.ownerDocument.body),n}function le(e,t){const n=c(e);if(g(e))return n;if(!a(e)){let t=b(e);for(;t&&!x(t);){if(f(t)&&!re(t))return t;t=b(t)}return n}let o=ie(e,t);for(;o&&p(o)&&re(o);)o=ie(o,t);return o&&x(o)&&re(o)&&!h(o)?n:o||function(e){let t=b(e);for(;a(t)&&!x(t);){if(h(t))return t;if(g(t))return null;t=b(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,c=s(o),u=!!t&&g(t.floating);if(o===c||u&&i)return n;let f={scrollLeft:0,scrollTop:0},d=A(1);const p=A(0),h=a(o);if((h||!h&&!i)&&(("body"!==l(o)||m(c))&&(f=v(o)),a(o))){const e=Q(o);d=G(o),p.x=e.x+o.clientLeft,p.y=e.y+o.clientTop}const y=!c||h||i?A(0):ee(c,f,!0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+p.x+y.x,y:n.y*d.y-f.scrollTop*d.y+p.y+y.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?g(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=E(e,[],!1).filter(e=>f(e)&&"body"!==l(e)),r=null;const i="fixed"===w(e).position;let c=i?b(e):e;for(;f(c)&&!x(c);){const t=w(c),n=h(c);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||m(c)&&!n&&ne(e,c))?o=o.filter(e=>e!==c):r=t,c=b(c)}return t.set(e,o),o}(t,this._c):[].concat(n),o],c=i[0],s=i.reduce((e,n)=>{const o=te(t,n,r);return e.top=L(o.top,e.top),e.right=S(o.right,e.right),e.bottom=S(o.bottom,e.bottom),e.left=L(o.left,e.left),e},te(t,c,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,n=this.getDimensions,o=await n(e.floating);return{reference:oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=X(e);return{width:t,height:n}},getScale:G,isElement:f,isRTL:function(e){return"rtl"===w(e).direction}};function se(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const ue=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:c}=t,s=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=F(n),c=B(n),s="y"===N(n),u=["left","top"].includes(l)?-1:1,f=i&&s?-1:1,a=k(t,e);let{mainAxis:d,crossAxis:m,alignmentAxis:p}="number"==typeof a?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return c&&"number"==typeof p&&(m="end"===c?-1*p:p),s?{x:m*f,y:d*u}:{x:d*u,y:m*f}}(t,e);return l===(null==(n=c.offset)?void 0:n.placement)&&null!=(o=c.arrow)&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},fe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=k(e,t),u={x:n,y:o},f=await U(t,s),a=N(F(r)),d=V(a);let m=u[d],p=u[a];if(i){const e="y"===d?"bottom":"right";m=D(m+f["y"===d?"top":"left"],m,m-f[e])}if(l){const e="y"===a?"bottom":"right";p=D(p+f["y"===a?"top":"left"],p,p-f[e])}const g=c.fn({...t,[d]:m,[a]:p});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:i,[a]:l}}}}}},ae=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:c,platform:s,elements:u}=t,{mainAxis:f=!0,crossAxis:a=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...h}=k(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=F(r),x=N(c),w=F(c)===c,v=await(null==s.isRTL?void 0:s.isRTL(u.floating)),b=d||(w||!g?[I(c)]:function(e){const t=I(e);return[W(e),t,W(t)]}(c)),R="none"!==p;!d&&R&&b.push(...function(e,t,n,o){const r=B(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(F(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(W)))),i}(c,g,p,v));const E=[c,...b],C=await U(t,h),S=[];let L=(null==(o=i.flip)?void 0:o.overflows)||[];if(f&&S.push(C[y]),a){const e=function(e,t,n){void 0===n&&(n=!1);const o=B(e),r=H(e),i=j(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=I(l)),[l,I(l)]}(r,l,v);S.push(C[e[0]],C[e[1]])}if(L=[...L,{placement:r,overflows:S}],!S.every(e=>e<=0)){var T,O;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=E[e];if(t){if(!("alignment"===a&&x!==N(t))||L.every(e=>e.overflows[0]>0&&N(e.placement)===x))return{data:{index:e,overflows:L},reset:{placement:t}}}let n=null==(O=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:O.placement;if(!n)switch(m){case"bestFit":{var A;const e=null==(A=L.filter(e=>{if(R){const t=N(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=c}if(r!==n)return{reset:{placement:n}}}return{}}}},de=(e,t,n)=>{const o=new Map,r={platform:ce,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,c=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:a}=$(u,o,s),d=o,m={},p=0;for(let g=0;g<c.length;g++){const{name:n,fn:i}=c[g],{x:h,y:y,data:x,reset:w}=await i({x:f,y:a,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=h?h:f,a=null!=y?y:a,m={...m,[n]:{...m[n],...x}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(u=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):w.rects),({x:f,y:a}=$(u,d,s))),g=-1)}return{x:f,y:a,placement:d,strategy:r,middlewareData:m}})(e,t,{...r,platform:i})};var me="undefined"!=typeof document?e.useLayoutEffect:function(){};function pe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;0!==o--;)if(!pe(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;0!==o--;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!==o--;){const n=r[o];if(("_owner"!==n||!e.$$typeof)&&!pe(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ge(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function he(e,t){const n=ge(e);return Math.round(t*n)/n}function ye(e){const t=o.useRef(e);return me(()=>{t.current=e}),t}const xe={...o};let we=!1,ve=0;const be=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ve++;const Re=xe.useId||function(){const[e,t]=o.useState(()=>we?be():void 0);return _(()=>{null==e&&t(be())},[]),o.useEffect(()=>{we=!0},[]),e};let Ee;"production"!==process.env.NODE_ENV&&(Ee=new Set);const Ce=o.createContext(null),Se=o.createContext(null);function Le(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Re(),l=o.useRef({}),[c]=o.useState(()=>function(){const e=new Map;return{emit(t,n){var o;null==(o=e.get(t))||o.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;null==(o=e.get(t))||o.delete(n)}}}()),s=null!=((null==(u=o.useContext(Ce))?void 0:u.id)||null);var u;if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!f(e)&&function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const r="Floating UI: "+n.join(" ");var i;null!=(e=Ee)&&e.has(r)||(null==(i=Ee)||i.add(r),console.error(r))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,d]=o.useState(r.reference),m=function(e){const t=o.useRef(()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")});return q(()=>{t.current=e}),o.useCallback(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)},[])}((e,t,o)=>{l.current.openEvent=e?t:void 0,c.emit("openchange",{open:e,event:t,reason:o,nested:s}),null==n||n(e,t,o)}),p=o.useMemo(()=>({setPositionReference:d}),[]),g=o.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return o.useMemo(()=>({dataRef:l,open:t,onOpenChange:m,elements:g,events:c,floatingId:i,refs:p}),[t,m,g,c,i,p])}exports.autoUpdate=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=Y(e),a=r||i?[...f?E(f):[],...E(t)]:[];a.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=f&&c?function(e,t){let n,o=null;const r=s(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function l(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),i();const u=e.getBoundingClientRect(),{left:f,top:a,width:d,height:m}=u;if(c||t(),!d||!m)return;const p={rootMargin:-O(a)+"px "+-O(r.clientWidth-(f+d))+"px "+-O(r.clientHeight-(a+m))+"px "+-O(f)+"px",threshold:L(0,S(1,s))||1};let g=!0;function h(t){const o=t[0].intersectionRatio;if(o!==s){if(!g)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||se(u,e.getBoundingClientRect())||l(),g=!1}try{o=new IntersectionObserver(h,{...p,root:r.ownerDocument})}catch(y){o=new IntersectionObserver(h,p)}o.observe(e)}(!0),i}(f,n):null;let m,p=-1,g=null;l&&(g=new ResizeObserver(e=>{let[o]=e;o&&o.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),f&&!u&&g.observe(f),g.observe(t));let h=u?Q(e):null;return u&&function t(){const o=Q(e);h&&!se(h,o)&&n();h=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;a.forEach(e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=g)||e.disconnect(),g=null,u&&cancelAnimationFrame(m)}},exports.flip=(e,t)=>({...ae(e),options:[e,t]}),exports.offset=(e,t)=>({...ue(e),options:[e,t]}),exports.shift=(e,t)=>({...fe(e),options:[e,t]}),exports.useFloating=function(e){void 0===e&&(e={});const{nodeId:t}=e,n=Le({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||n,l=i.elements,[c,s]=o.useState(null),[u,a]=o.useState(null),d=(null==l?void 0:l.domReference)||c,m=o.useRef(null),p=o.useContext(Se);_(()=>{d&&(m.current=d)},[d]);const g=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:l,elements:{reference:c,floating:s}={},transform:u=!0,whileElementsMounted:f,open:a}=e,[d,m]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=o.useState(i);pe(p,i)||g(i);const[h,y]=o.useState(null),[x,w]=o.useState(null),v=o.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),b=o.useCallback(e=>{e!==S.current&&(S.current=e,w(e))},[]),R=c||h,E=s||x,C=o.useRef(null),S=o.useRef(null),L=o.useRef(d),T=null!=f,O=ye(f),A=ye(l),M=ye(a),P=o.useCallback(()=>{if(!C.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};A.current&&(e.platform=A.current),de(C.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==M.current};D.current&&!pe(L.current,t)&&(L.current=t,r.flushSync(()=>{m(t)}))})},[p,t,n,A,M]);me(()=>{!1===a&&L.current.isPositioned&&(L.current.isPositioned=!1,m(e=>({...e,isPositioned:!1})))},[a]);const D=o.useRef(!1);me(()=>(D.current=!0,()=>{D.current=!1}),[]),me(()=>{if(R&&(C.current=R),E&&(S.current=E),R&&E){if(O.current)return O.current(R,E,P);P()}},[R,E,P,O,T]);const k=o.useMemo(()=>({reference:C,floating:S,setReference:v,setFloating:b}),[v,b]),F=o.useMemo(()=>({reference:R,floating:E}),[R,E]),B=o.useMemo(()=>{const e={position:n,left:0,top:0};if(!F.floating)return e;const t=he(F.floating,d.x),o=he(F.floating,d.y);return u?{...e,transform:"translate("+t+"px, "+o+"px)",...ge(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:o}},[n,u,F.floating,d.x,d.y]);return o.useMemo(()=>({...d,update:P,refs:k,elements:F,floatingStyles:B}),[d,P,k,F,B])}({...e,elements:{...l,...u&&{reference:u}}}),h=o.useCallback(e=>{const t=f(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;a(t),g.refs.setReference(t)},[g.refs]),y=o.useCallback(e=>{(f(e)||null===e)&&(m.current=e,s(e)),(f(g.refs.reference.current)||null===g.refs.reference.current||null!==e&&!f(e))&&g.refs.setReference(e)},[g.refs]),x=o.useMemo(()=>({...g.refs,setReference:y,setPositionReference:h,domReference:m}),[g.refs,y,h]),w=o.useMemo(()=>({...g.elements,domReference:d}),[g.elements,d]),v=o.useMemo(()=>({...g,...i,refs:x,elements:w,nodeId:t}),[g,x,w,t,i]);return _(()=>{i.dataRef.current.floatingContext=v;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),o.useMemo(()=>({...g,context:v,refs:x,elements:w}),[g,x,w,v])},exports.useMergeRefs=function(e){const t=o.useRef(void 0),n=o.useCallback(t=>{const n=e.map(e=>{if(null!=e){if("function"==typeof e){const n=e,o=n(t);return"function"==typeof o?o:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return o.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)};
2
+ //# sourceMappingURL=floating-ui.react--v70Xky9.cjs.map