@jenesei-software/jenesei-kit-react 1.3.32 → 1.3.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -10
- package/build/{area-BG04bpxi.cjs → area-0BNtBqG8.cjs} +2 -2
- package/build/{area-BG04bpxi.cjs.map → area-0BNtBqG8.cjs.map} +1 -1
- package/build/{area-D4BoNEmX.js → area-B6xxVQ87.js} +3 -3
- package/build/{area-D4BoNEmX.js.map → area-B6xxVQ87.js.map} +1 -1
- package/build/{area-occQcGnD.js → area-B7-4IFQB.js} +3 -3
- package/build/{area-occQcGnD.js.map → area-B7-4IFQB.js.map} +1 -1
- package/build/{area-pCo19R2g.cjs → area-DxKLtDFZ.cjs} +2 -2
- package/build/{area-pCo19R2g.cjs.map → area-DxKLtDFZ.cjs.map} +1 -1
- package/build/area-outside.cjs.js +1 -1
- package/build/area-outside.es.js +1 -1
- package/build/area-preview.cjs.js +1 -1
- package/build/area-preview.es.js +1 -1
- package/build/area-scroll.cjs.js +1 -1
- package/build/area-scroll.d.ts +3 -4
- package/build/area-scroll.es.js +2 -2
- package/build/area-skeleton.cjs.js +1 -1
- package/build/area-skeleton.d.ts +3 -4
- package/build/area-skeleton.es.js +1 -1
- package/build/area-smooth.cjs.js +1 -1
- package/build/area-smooth.es.js +1 -1
- package/build/area.hooks-Bk04M7mk.js.map +1 -1
- package/build/{area.styles-BuceLNra.cjs → area.styles-Cpx4H0gc.cjs} +2 -2
- package/build/{area.styles-BuceLNra.cjs.map → area.styles-Cpx4H0gc.cjs.map} +1 -1
- package/build/{area.styles-BSqCfPE4.js → area.styles-DhCCEhuq.js} +2 -2
- package/build/{area.styles-BSqCfPE4.js.map → area.styles-DhCCEhuq.js.map} +1 -1
- package/build/build-info.txt +3 -3
- package/build/{component-DrTBbu8u.js → component-34--WtCE.js} +8 -8
- package/build/{component-DrTBbu8u.js.map → component-34--WtCE.js.map} +1 -1
- package/build/{component-BybwN9H4.js → component-9fzcSAV7.js} +4 -4
- package/build/{component-BybwN9H4.js.map → component-9fzcSAV7.js.map} +1 -1
- package/build/{component-DNVmU44U.cjs → component-BGAYOt_R.cjs} +2 -2
- package/build/{component-DNVmU44U.cjs.map → component-BGAYOt_R.cjs.map} +1 -1
- package/build/{component-CUiqQLEQ.js → component-BMIqhbpK.js} +3 -3
- package/build/{component-CUiqQLEQ.js.map → component-BMIqhbpK.js.map} +1 -1
- package/build/{component-DbRG0dzX.cjs → component-BPtJjkt0.cjs} +2 -2
- package/build/{component-DbRG0dzX.cjs.map → component-BPtJjkt0.cjs.map} +1 -1
- package/build/{component-CATlnN8o.js → component-BTPma8cy.js} +4 -4
- package/build/{component-CATlnN8o.js.map → component-BTPma8cy.js.map} +1 -1
- package/build/{component-DpX5Qw3i.js → component-BWvIUzNG.js} +3 -3
- package/build/{component-DpX5Qw3i.js.map → component-BWvIUzNG.js.map} +1 -1
- package/build/{component-DAocGHCP.js → component-C6JGm-CG.js} +3 -3
- package/build/{component-DAocGHCP.js.map → component-C6JGm-CG.js.map} +1 -1
- package/build/{component-CGPZf0Mx.js → component-C9Uf5Bc0.js} +3 -3
- package/build/{component-CGPZf0Mx.js.map → component-C9Uf5Bc0.js.map} +1 -1
- package/build/{component-CM4bf3RV.cjs → component-CAWbX2_9.cjs} +2 -2
- package/build/{component-CM4bf3RV.cjs.map → component-CAWbX2_9.cjs.map} +1 -1
- package/build/{component-B8kWtTfs.cjs → component-CEZKgFH6.cjs} +2 -2
- package/build/{component-B8kWtTfs.cjs.map → component-CEZKgFH6.cjs.map} +1 -1
- package/build/{component-DJDXAzlq.js → component-CHp7GYey.js} +4 -4
- package/build/{component-DJDXAzlq.js.map → component-CHp7GYey.js.map} +1 -1
- package/build/{component-C8ueaiSO.cjs → component-COXlMHO8.cjs} +2 -2
- package/build/{component-C8ueaiSO.cjs.map → component-COXlMHO8.cjs.map} +1 -1
- package/build/{component-DIk87lHF.cjs → component-Cao-X0at.cjs} +2 -2
- package/build/{component-DIk87lHF.cjs.map → component-Cao-X0at.cjs.map} +1 -1
- package/build/{component-Cp8VTqb2.js → component-Cfs39n8Q.js} +2 -2
- package/build/{component-Cp8VTqb2.js.map → component-Cfs39n8Q.js.map} +1 -1
- package/build/{component-BzWpboBU.cjs → component-Co53yylj.cjs} +2 -2
- package/build/{component-BzWpboBU.cjs.map → component-Co53yylj.cjs.map} +1 -1
- package/build/{component-5Utdcc2G.cjs → component-CoOTSdM5.cjs} +2 -2
- package/build/{component-5Utdcc2G.cjs.map → component-CoOTSdM5.cjs.map} +1 -1
- package/build/component-Cu2i_-RT.cjs +2 -0
- package/build/{component-Cc8X-Z80.cjs.map → component-Cu2i_-RT.cjs.map} +1 -1
- package/build/{component-DwVvs3yX.cjs → component-CwKwQY3p.cjs} +2 -2
- package/build/{component-DwVvs3yX.cjs.map → component-CwKwQY3p.cjs.map} +1 -1
- package/build/{component-DHM9pbab.js → component-D-HMYzXU.js} +3 -3
- package/build/{component-DHM9pbab.js.map → component-D-HMYzXU.js.map} +1 -1
- package/build/{component-Duwta9MT.js → component-D3jtUpu3.js} +3 -3
- package/build/{component-Duwta9MT.js.map → component-D3jtUpu3.js.map} +1 -1
- package/build/{component-C0354Xwu.js → component-DHwK4xEP.js} +4 -4
- package/build/{component-C0354Xwu.js.map → component-DHwK4xEP.js.map} +1 -1
- package/build/{component-86oA9dYz.cjs → component-DJAq34yj.cjs} +2 -2
- package/build/{component-86oA9dYz.cjs.map → component-DJAq34yj.cjs.map} +1 -1
- package/build/{component-DHXjnBNp.cjs → component-DZbtSeCS.cjs} +2 -2
- package/build/{component-DHXjnBNp.cjs.map → component-DZbtSeCS.cjs.map} +1 -1
- package/build/{component-BD3FCIT8.js → component-DcOrj2ff.js} +4 -4
- package/build/{component-BD3FCIT8.js.map → component-DcOrj2ff.js.map} +1 -1
- package/build/{component-DIA35EVR.js → component-Dcn4OKm7.js} +5 -5
- package/build/{component-DIA35EVR.js.map → component-Dcn4OKm7.js.map} +1 -1
- package/build/{component-CLqcB5mM.cjs → component-DqV_-YxZ.cjs} +2 -2
- package/build/{component-CLqcB5mM.cjs.map → component-DqV_-YxZ.cjs.map} +1 -1
- package/build/{component-CANbSEA3.cjs → component-DsLJSX6q.cjs} +2 -2
- package/build/{component-CANbSEA3.cjs.map → component-DsLJSX6q.cjs.map} +1 -1
- package/build/component-accordion.cjs.js +1 -1
- package/build/component-accordion.d.ts +26 -6
- package/build/component-accordion.es.js +2 -2
- package/build/component-button-group.cjs.js +1 -1
- package/build/component-button-group.es.js +2 -2
- package/build/component-button.cjs.js +1 -1
- package/build/component-button.d.ts +5 -4
- package/build/component-button.es.js +1 -1
- package/build/component-checkbox-group.cjs.js +1 -1
- package/build/component-checkbox-group.es.js +2 -2
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.es.js +2 -2
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.d.ts +9 -8
- package/build/component-date-picker.es.js +2 -2
- package/build/{component-DEZX8aBs.js → component-gcvwlILJ.js} +3 -3
- package/build/{component-DEZX8aBs.js.map → component-gcvwlILJ.js.map} +1 -1
- package/build/component-icon.cjs.js +1 -1
- package/build/component-icon.d.ts +37 -4
- package/build/component-icon.es.js +1 -1
- package/build/component-image-button.cjs.js +1 -1
- package/build/component-image-button.es.js +1 -1
- package/build/component-image-select.cjs.js +1 -1
- package/build/component-image-select.d.ts +8 -6
- package/build/component-image-select.es.js +2 -2
- package/build/component-image-slider.cjs.js +1 -1
- package/build/component-image-slider.d.ts +1 -1
- package/build/component-image-slider.es.js +2 -2
- package/build/component-image.cjs.js +1 -1
- package/build/component-image.es.js +2 -2
- package/build/component-input-otp.cjs.js +1 -1
- package/build/component-input-otp.d.ts +6 -4
- package/build/component-input-otp.es.js +2 -2
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.d.ts +7 -6
- package/build/component-input.es.js +2 -2
- package/build/component-pagination.cjs.js +1 -1
- package/build/component-pagination.es.js +1 -1
- package/build/{component-skAuX4C8.cjs → component-qR0HPUpL.cjs} +2 -2
- package/build/{component-skAuX4C8.cjs.map → component-qR0HPUpL.cjs.map} +1 -1
- package/build/component-range.cjs.js +1 -1
- package/build/component-range.d.ts +6 -4
- package/build/component-range.es.js +5 -5
- package/build/component-ripple.cjs.js +1 -1
- package/build/component-ripple.d.ts +6 -4
- package/build/component-ripple.es.js +2 -2
- package/build/component-select.cjs.js +1 -1
- package/build/component-select.d.ts +115 -32
- package/build/component-select.es.js +17 -18
- package/build/component-separator.cjs.js +1 -1
- package/build/component-separator.d.ts +5 -3
- package/build/component-separator.es.js +1 -1
- package/build/component-stack.cjs.js +1 -1
- package/build/component-stack.d.ts +6 -4
- package/build/component-stack.es.js +1 -1
- package/build/component-textarea.cjs.js +1 -1
- package/build/component-textarea.d.ts +7 -5
- package/build/component-textarea.es.js +5 -5
- package/build/component-toggle.cjs.js +1 -1
- package/build/component-toggle.es.js +4 -4
- package/build/component-tooltip.cjs.js +1 -1
- package/build/component-tooltip.d.ts +71 -9
- package/build/component-tooltip.es.js +9 -9
- package/build/component-typography.cjs.js +1 -1
- package/build/component-typography.d.ts +5 -3
- package/build/component-typography.es.js +6 -6
- package/build/{component.constants-BgV35uxo.cjs → component.constants-CuYFwf5W.cjs} +2 -2
- package/build/{component.constants-BgV35uxo.cjs.map → component.constants-CuYFwf5W.cjs.map} +1 -1
- package/build/{component.constants-C4Du7oRP.cjs → component.constants-D80V6i-m.cjs} +2 -2
- package/build/{component.constants-C4Du7oRP.cjs.map → component.constants-D80V6i-m.cjs.map} +1 -1
- package/build/{component.constants-Be7PPP03.js → component.constants-Dulpp7av.js} +4 -4
- package/build/{component.constants-Be7PPP03.js.map → component.constants-Dulpp7av.js.map} +1 -1
- package/build/{component.constants-DbWj5l8e.js → component.constants-DybDxNgw.js} +7 -7
- package/build/{component.constants-DbWj5l8e.js.map → component.constants-DybDxNgw.js.map} +1 -1
- package/build/{component.styles-Dpg-__rn.cjs → component.styles-BX2Aiqp_.cjs} +2 -2
- package/build/{component.styles-Dpg-__rn.cjs.map → component.styles-BX2Aiqp_.cjs.map} +1 -1
- package/build/{component.styles-B0L4jbOO.js → component.styles-C0oU5oX_.js} +2 -2
- package/build/{component.styles-B0L4jbOO.js.map → component.styles-C0oU5oX_.js.map} +1 -1
- package/build/{component.types-B3IQzYHq.js → component.types-BbfCiww_.js} +19 -18
- package/build/component.types-BbfCiww_.js.map +1 -0
- package/build/component.types-KTSAVZtM.cjs +2 -0
- package/build/component.types-KTSAVZtM.cjs.map +1 -0
- package/build/consts.cjs.js +1 -1
- package/build/consts.cjs.js.map +1 -1
- package/build/consts.d.ts +2 -13
- package/build/consts.es.js +1 -29
- package/build/consts.es.js.map +1 -1
- package/build/{context-q6vhN54o.cjs → context-B1id3uai.cjs} +2 -2
- package/build/{context-q6vhN54o.cjs.map → context-B1id3uai.cjs.map} +1 -1
- package/build/{context-Cr9zS5ai.cjs → context-B8kTBKjt.cjs} +2 -2
- package/build/{context-Cr9zS5ai.cjs.map → context-B8kTBKjt.cjs.map} +1 -1
- package/build/{context-B1DS5U6M.js → context-BkovkNHQ.js} +2 -2
- package/build/{context-B1DS5U6M.js.map → context-BkovkNHQ.js.map} +1 -1
- package/build/context-C0_RNFp_.js +195 -0
- package/build/context-C0_RNFp_.js.map +1 -0
- package/build/context-DyTE2I_6.cjs +4 -0
- package/build/context-DyTE2I_6.cjs.map +1 -0
- package/build/{context-CU_dgoUl.js → context-LBih45kv.js} +3 -3
- package/build/{context-CU_dgoUl.js.map → context-LBih45kv.js.map} +1 -1
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.d.ts +13 -12
- package/build/context-app.es.js +17 -17
- package/build/context-cookie.cjs.js +1 -1
- package/build/context-cookie.es.js +2 -2
- package/build/context-dialog.cjs.js +1 -1
- package/build/context-dialog.d.ts +5 -3
- package/build/context-dialog.es.js +2 -2
- package/build/context-geolocation.cjs.js +1 -1
- package/build/context-geolocation.es.js +2 -2
- package/build/context-local-storage.cjs.js +1 -1
- package/build/context-local-storage.es.js +2 -2
- package/build/context-permission.cjs.js +1 -1
- package/build/context-permission.es.js +1 -1
- package/build/context-screen-width.cjs.js +1 -1
- package/build/context-screen-width.es.js +1 -1
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.d.ts +8 -7
- package/build/context-sonner.es.js +18 -18
- package/build/context.constants-BWZS-di6.cjs +32 -0
- package/build/context.constants-BWZS-di6.cjs.map +1 -0
- package/build/{context.constants-YlWOZAd7.js → context.constants-Bh-ajJM2.js} +4385 -457
- package/build/context.constants-Bh-ajJM2.js.map +1 -0
- package/build/context.constants-CDgzMcxb.cjs +1742 -0
- package/build/context.constants-CDgzMcxb.cjs.map +1 -0
- package/build/{context.constants-CZykW9B3.js → context.constants-Nfy-8Qzj.js} +39 -5
- package/build/context.constants-Nfy-8Qzj.js.map +1 -0
- package/build/context.functions-B8FDl7nJ.js.map +1 -1
- package/build/{context.functions-Bk5xMi0w.cjs → context.functions-BqeTmcmr.cjs} +2 -2
- package/build/{context.functions-Bk5xMi0w.cjs.map → context.functions-BqeTmcmr.cjs.map} +1 -1
- package/build/{context.functions-54_96FIi.js → context.functions-D2K4Xk47.js} +4 -5
- package/build/{context.functions-54_96FIi.js.map → context.functions-D2K4Xk47.js.map} +1 -1
- package/build/context.functions-Duwzgcga.cjs +2 -0
- package/build/{context.functions-BoRkDnCa.cjs.map → context.functions-Duwzgcga.cjs.map} +1 -1
- package/build/{context.functions-X5gRRpKi.js → context.functions-ObfwvEVG.js} +2 -2
- package/build/{context.functions-X5gRRpKi.js.map → context.functions-ObfwvEVG.js.map} +1 -1
- package/build/{context.hooks-7ydA7mGj.js → context.hooks-B9dsW2kz.js} +2 -2
- package/build/{context.hooks-7ydA7mGj.js.map → context.hooks-B9dsW2kz.js.map} +1 -1
- package/build/{context.hooks-CnqRriMa.js → context.hooks-BG1tp2nc.js} +2 -2
- package/build/{context.hooks-CnqRriMa.js.map → context.hooks-BG1tp2nc.js.map} +1 -1
- package/build/{context.hooks-B1QdI16d.cjs → context.hooks-BIfYPHOA.cjs} +2 -2
- package/build/{context.hooks-B1QdI16d.cjs.map → context.hooks-BIfYPHOA.cjs.map} +1 -1
- package/build/context.hooks-Biv8ZMzm.cjs +2 -0
- package/build/{context.hooks-DDtUqE34.cjs.map → context.hooks-Biv8ZMzm.cjs.map} +1 -1
- package/build/{context.hooks-D23gzlbO.cjs → context.hooks-BpQriPdQ.cjs} +2 -2
- package/build/{context.hooks-D23gzlbO.cjs.map → context.hooks-BpQriPdQ.cjs.map} +1 -1
- package/build/{context.hooks-uRILnzQk.js → context.hooks-CXJ-eM6d.js} +2 -2
- package/build/{context.hooks-uRILnzQk.js.map → context.hooks-CXJ-eM6d.js.map} +1 -1
- package/build/context.hooks-CYJnoIrt.cjs +2 -0
- package/build/{context.hooks-OTo7Znss.cjs.map → context.hooks-CYJnoIrt.cjs.map} +1 -1
- package/build/{context.hooks-BIsapq-0.cjs → context.hooks-DDD8ffJI.cjs} +2 -2
- package/build/{context.hooks-BIsapq-0.cjs.map → context.hooks-DDD8ffJI.cjs.map} +1 -1
- package/build/{context.hooks-D0OtRPb7.js → context.hooks-DGYU76JL.js} +2 -3
- package/build/{context.hooks-D0OtRPb7.js.map → context.hooks-DGYU76JL.js.map} +1 -1
- package/build/{context.hooks-D13tbrva.cjs → context.hooks-DpwnIiRj.cjs} +2 -2
- package/build/{context.hooks-D13tbrva.cjs.map → context.hooks-DpwnIiRj.cjs.map} +1 -1
- package/build/{context.hooks-Bl4gTFVP.js → context.hooks-Dx80dbrI.js} +2 -2
- package/build/{context.hooks-Bl4gTFVP.js.map → context.hooks-Dx80dbrI.js.map} +1 -1
- package/build/{context.hooks-BmwyZ1p3.js → context.hooks-oclt34zD.js} +2 -2
- package/build/{context.hooks-BmwyZ1p3.js.map → context.hooks-oclt34zD.js.map} +1 -1
- package/build/functions.es.js.map +1 -1
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +71 -212
- package/build/index.es.js +144 -161
- package/build/index.es.js.map +1 -1
- package/build/jsx-runtime-C6yv_9g1.cjs +11 -0
- package/build/jsx-runtime-C6yv_9g1.cjs.map +1 -0
- package/build/{jsx-runtime-BrDlu8eK.js → jsx-runtime-DZS36FSE.js} +16 -20
- package/build/jsx-runtime-DZS36FSE.js.map +1 -0
- package/build/{motion-DgB7M2Hn.cjs → motion-DrSN18V7.cjs} +2 -2
- package/build/{motion-DgB7M2Hn.cjs.map → motion-DrSN18V7.cjs.map} +1 -1
- package/build/{motion-CIQfrLky.js → motion-K7hUU4gL.js} +2 -2
- package/build/{motion-CIQfrLky.js.map → motion-K7hUU4gL.js.map} +1 -1
- package/build/style-error.cjs.js +1 -1
- package/build/style-error.d.ts +5 -3
- package/build/style-error.es.js +4 -4
- package/build/style-motion.cjs.js +1 -1
- package/build/style-motion.es.js +1 -1
- package/build/style-plT9Ah7t.js.map +1 -1
- package/build/style-sx.d.ts +5 -3
- package/build/style-theme.cjs.js +1 -1
- package/build/style-theme.es.js +13 -13
- package/build/use-Bp8UVw4Y.js.map +1 -1
- package/build/{use-JWHe9gP5.js → use-CGZzVbz2.js} +28 -11
- package/build/use-CGZzVbz2.js.map +1 -0
- package/build/use-DEkooQyB.cjs +16 -0
- package/build/use-DEkooQyB.cjs.map +1 -0
- package/build/use-DT0XgvJT.js.map +1 -1
- package/package.json +3 -29
- package/build/component-Cc8X-Z80.cjs +0 -2
- package/build/component-map.cjs.js +0 -2
- package/build/component-map.cjs.js.map +0 -1
- package/build/component-map.d.ts +0 -96
- package/build/component-map.es.js +0 -19
- package/build/component-map.es.js.map +0 -1
- package/build/component.components-83DbC_hw.js +0 -336
- package/build/component.components-83DbC_hw.js.map +0 -1
- package/build/component.components-BjdoMO5R.cjs +0 -2
- package/build/component.components-BjdoMO5R.cjs.map +0 -1
- package/build/component.types-B3IQzYHq.js.map +0 -1
- package/build/component.types-C6Zrax1A.cjs +0 -2
- package/build/component.types-C6Zrax1A.cjs.map +0 -1
- package/build/context-BxU5kwVR.js +0 -98
- package/build/context-BxU5kwVR.js.map +0 -1
- package/build/context-_4lcMeym.cjs +0 -2
- package/build/context-_4lcMeym.cjs.map +0 -1
- package/build/context.constants-BMJ3rLa_.cjs +0 -1748
- package/build/context.constants-BMJ3rLa_.cjs.map +0 -1
- package/build/context.constants-CZykW9B3.js.map +0 -1
- package/build/context.constants-YlWOZAd7.js.map +0 -1
- package/build/context.constants-wztrdG5Q.cjs +0 -32
- package/build/context.constants-wztrdG5Q.cjs.map +0 -1
- package/build/context.functions-BoRkDnCa.cjs +0 -2
- package/build/context.hooks-DDtUqE34.cjs +0 -2
- package/build/context.hooks-OTo7Znss.cjs +0 -2
- package/build/jsx-runtime-BcGej2Kr.cjs +0 -11
- package/build/jsx-runtime-BcGej2Kr.cjs.map +0 -1
- package/build/jsx-runtime-BrDlu8eK.js.map +0 -1
- package/build/style.css +0 -1
- package/build/use-DZU4NdpU.cjs +0 -16
- package/build/use-DZU4NdpU.cjs.map +0 -1
- package/build/use-JWHe9gP5.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-
|
|
2
|
-
//# sourceMappingURL=context-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-C6yv_9g1.cjs"),o=require("react"),t=require("./context.hooks-DpwnIiRj.cjs"),r=o.createContext(null);exports.GeolocationContext=r,exports.ProviderGeolocation=n=>{const{geolocationPermission:s,requestGeolocationPermission:i}=t.usePermission(),[c,a]=o.useState(null),[u,l]=o.useState(null);return o.useEffect(()=>{const e=e=>{a(e)},o=e=>{l(e)};"granted"===s&&navigator.geolocation.getCurrentPosition(e,o)},[s,n.isAskEntrance,i]),o.useEffect(()=>{n.isAskEntrance&&"granted"!==s&&i()},[s,n.isAskEntrance,i]),e.jsxRuntimeExports.jsx(r.Provider,{value:{requestGeolocationPermission:i,geolocationPermission:s,location:c,error:u},children:n.children})};
|
|
2
|
+
//# sourceMappingURL=context-B8kTBKjt.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-
|
|
1
|
+
{"version":3,"file":"context-B8kTBKjt.cjs","sources":["../src/contexts/context-geolocation/context.tsx"],"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"],"names":["GeolocationContext","createContext","props","geolocationPermission","requestGeolocationPermission","usePermission","location","setLocation","useState","error","setError","useEffect","handleSuccess","position","handleError","navigator","geolocation","getCurrentPosition","isAskEntrance","jsx","Provider","value","children"],"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as jsxRuntimeExports } from "./jsx-runtime-
|
|
1
|
+
import { j as jsxRuntimeExports } from "./jsx-runtime-DZS36FSE.js";
|
|
2
2
|
import { createContext, useState, useCallback, useEffect } from "react";
|
|
3
3
|
const LocalStorageContext = createContext(null);
|
|
4
4
|
const ProviderLocalStorage = (props) => {
|
|
@@ -114,4 +114,4 @@ export {
|
|
|
114
114
|
LocalStorageContext as L,
|
|
115
115
|
ProviderLocalStorage as P
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=context-
|
|
117
|
+
//# sourceMappingURL=context-BkovkNHQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-
|
|
1
|
+
{"version":3,"file":"context-BkovkNHQ.js","sources":["../src/contexts/context-local-storage/context.tsx"],"sourcesContent":["import { FC, createContext, useCallback, useEffect, useState } from 'react';\n\nimport { LocalStorageContextProps, ProviderLocalStorageProps, ValidLocalStorageObject } from '.';\n\nexport const LocalStorageContext = createContext<LocalStorageContextProps | null>(null);\n\n/**\n * Provider component for managing local storage.\n *\n * @remarks\n * The local storage is typed using the `jenesei-kit-react.d.ts` file:\n *\n * ```typescript\n * import '@jenesei-software/jenesei-kit-react'\n *\n * declare module '@jenesei-software/jenesei-kit-react' {\n * export interface ValidLocalStorageObject {\n * access_token: string\n * refresh_token: string\n * }\n * }\n * ```\n */\nexport const ProviderLocalStorage: FC<ProviderLocalStorageProps> = (props) => {\n const {\n getLocalStorage,\n setLocalStorage,\n removeLocalStorageValue,\n removeLocalStorageValues,\n checkLocalStorage,\n localStorageValues,\n } = useProviderLocalStorage(props);\n\n return (\n <LocalStorageContext.Provider\n value={{\n getLocalStorage,\n setLocalStorage,\n removeLocalStorageValue,\n removeLocalStorageValues,\n checkLocalStorage,\n localStorageValues,\n }}\n >\n {props.children}\n </LocalStorageContext.Provider>\n );\n};\n\nconst useProviderLocalStorage = (props: ProviderLocalStorageProps) => {\n const [localStorageValues, setLocalStorageValues] = useState<ValidLocalStorageObject>();\n\n const getLocalStorage = useCallback(\n <K extends keyof ValidLocalStorageObject>(name: K): ValidLocalStorageObject[K] | undefined => {\n const localStorageValue = localStorage.getItem(name);\n setLocalStorageValues((prevState) => ({\n ...prevState,\n [name]: localStorageValue ? JSON.parse(localStorageValue) : undefined,\n }));\n return localStorageValue ? JSON.parse(localStorageValue) : undefined;\n },\n [],\n );\n\n const changeLocalStorage = useCallback(\n <K extends keyof ValidLocalStorageObject>(name: K, value: ValidLocalStorageObject[K]) => {\n try {\n localStorage.setItem(String(name), JSON.stringify(value));\n setLocalStorageValues((prevState) => ({ ...prevState, [name]: value }));\n } catch {\n console.info(`Provider LocalStorage. ChangeLocalStorage error - key:${name}, value:${value}.`);\n }\n },\n [],\n );\n\n const removeLocalStorageValue = useCallback(<K extends keyof ValidLocalStorageObject>(name: K) => {\n try {\n localStorage.removeItem(String(name));\n setLocalStorageValues((prevState) => ({\n ...prevState,\n [name]: undefined,\n }));\n } catch {\n console.info(`Provider LocalStorage. RemoveLocalStorageValue error - key:${name}.`);\n }\n }, []);\n\n const removeLocalStorageValues = useCallback(() => {\n if (props.validate && props.validate.validateKeys) {\n props.validate?.validateKeys.forEach((key) => {\n removeLocalStorageValue(String(key) as never);\n });\n } else {\n console.info('Provider LocalStorage. RemoveLocalStorageValues - validate is not defined.');\n }\n }, [props.validate, removeLocalStorageValue]);\n\n const checkLocalStorage = useCallback(() => {\n if (props.validate && props.validate.validateKeys && props.validate.getValidateLocalStorageValue) {\n props.validate?.validateKeys.forEach((key) => {\n const localStorageValue = localStorage.getItem(key);\n if (localStorageValue) {\n try {\n const parsedValue = JSON.parse(localStorageValue);\n if (!props.validate?.getValidateLocalStorageValue(String(key) as never, parsedValue as never)) {\n removeLocalStorageValue(String(key) as never);\n } else {\n setLocalStorageValues((prevState) => ({\n ...prevState,\n [key]: parsedValue,\n }));\n }\n } catch {\n removeLocalStorageValue(String(key) as never);\n }\n } else {\n removeLocalStorageValue(String(key) as never);\n }\n });\n } else {\n console.info('Provider LocalStorage. CheckLocalStorage - validate is not defined.');\n }\n }, [props.validate, removeLocalStorageValue]);\n\n useEffect(() => {\n checkLocalStorage();\n }, [checkLocalStorage]);\n\n return {\n getLocalStorage,\n setLocalStorage: changeLocalStorage,\n removeLocalStorageValue,\n removeLocalStorageValues,\n checkLocalStorage,\n localStorageValues,\n };\n};\n"],"names":["jsx","_a"],"mappings":";;AAIO,MAAM,sBAAsB,cAA+C,IAAI;AAmB/E,MAAM,uBAAsD,CAAC,UAAU;AAC5E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,wBAAwB,KAAK;AAEjC,SACEA,kCAAAA;AAAAA,IAAC,oBAAoB;AAAA,IAApB;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAGD,UAAA,MAAM;AAAA,IAAA;AAAA,EAAA;AAGb;AAEA,MAAM,0BAA0B,CAAC,UAAqC;AACpE,QAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAAA;AAEpD,QAAM,kBAAkB;AAAA,IACtB,CAA0C,SAAoD;AAC5F,YAAM,oBAAoB,aAAa,QAAQ,IAAI;AACnD,4BAAsB,CAAC,eAAe;AAAA,QACpC,GAAG;AAAA,QACH,CAAC,IAAI,GAAG,oBAAoB,KAAK,MAAM,iBAAiB,IAAI;AAAA,MAAA,EAC5D;A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iBAAiB;AAChD,gBAAI,GAACC,MAAA,MAAM,aAAN,gBAAAA,IAAgB,6BAA6B,OAAO,GAAG,GAAY,eAAuB;AAC7F,sCAAwB,OAAO,GAAG,CAAU;AAAA,YAC9C,OAAO;AACL,oCAAsB,CAAC,eAAe;AAAA,gBACpC,GAAG;AAAA,gBACH,CAAC,GAAG,GAAG;AAAA,cAAA,EACP;AAAA,YACJ;AAAA,UACF,QAAQ;AACN,oCAAwB,OAAO,GAAG,CAAU;AAAA,UAC9C;AAAA,QACF,OAAO;AACL,kCAAwB,OAAO,GAAG,CAAU;AAAA,QAC9C;AAAA,MACF;AAAA,IACF,OAAO;AACL,cAAQ,KAAK,qEAAqE;AAAA,IACpF;AAAA,EACF,GAAG,CAAC,MAAM,UAAU,uBAAuB,CAAC;AAE5C,YAAU,MAAM;AACd,sBAAA;AAAA,EACF,GAAG,CAAC,iBAAiB,CAAC;AAEtB,SAAO;AAAA,IACL;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "./jsx-runtime-DZS36FSE.js";
|
|
2
|
+
import { createContext, useState, useCallback, useEffect } from "react";
|
|
3
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
4
|
+
function assign(target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
target[key] = source[key];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return target;
|
|
12
|
+
}
|
|
13
|
+
var defaultConverter = {
|
|
14
|
+
read: function(value) {
|
|
15
|
+
if (value[0] === '"') {
|
|
16
|
+
value = value.slice(1, -1);
|
|
17
|
+
}
|
|
18
|
+
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
19
|
+
},
|
|
20
|
+
write: function(value) {
|
|
21
|
+
return encodeURIComponent(value).replace(
|
|
22
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
23
|
+
decodeURIComponent
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function init(converter, defaultAttributes) {
|
|
28
|
+
function set(name, value, attributes) {
|
|
29
|
+
if (typeof document === "undefined") {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
attributes = assign({}, defaultAttributes, attributes);
|
|
33
|
+
if (typeof attributes.expires === "number") {
|
|
34
|
+
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
35
|
+
}
|
|
36
|
+
if (attributes.expires) {
|
|
37
|
+
attributes.expires = attributes.expires.toUTCString();
|
|
38
|
+
}
|
|
39
|
+
name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
40
|
+
var stringifiedAttributes = "";
|
|
41
|
+
for (var attributeName in attributes) {
|
|
42
|
+
if (!attributes[attributeName]) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
stringifiedAttributes += "; " + attributeName;
|
|
46
|
+
if (attributes[attributeName] === true) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
|
|
50
|
+
}
|
|
51
|
+
return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes;
|
|
52
|
+
}
|
|
53
|
+
function get(name) {
|
|
54
|
+
if (typeof document === "undefined" || arguments.length && !name) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
var cookies = document.cookie ? document.cookie.split("; ") : [];
|
|
58
|
+
var jar = {};
|
|
59
|
+
for (var i = 0; i < cookies.length; i++) {
|
|
60
|
+
var parts = cookies[i].split("=");
|
|
61
|
+
var value = parts.slice(1).join("=");
|
|
62
|
+
try {
|
|
63
|
+
var found = decodeURIComponent(parts[0]);
|
|
64
|
+
jar[found] = converter.read(value, found);
|
|
65
|
+
if (name === found) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
} catch (e) {
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return name ? jar[name] : jar;
|
|
72
|
+
}
|
|
73
|
+
return Object.create(
|
|
74
|
+
{
|
|
75
|
+
set,
|
|
76
|
+
get,
|
|
77
|
+
remove: function(name, attributes) {
|
|
78
|
+
set(
|
|
79
|
+
name,
|
|
80
|
+
"",
|
|
81
|
+
assign({}, attributes, {
|
|
82
|
+
expires: -1
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
withAttributes: function(attributes) {
|
|
87
|
+
return init(this.converter, assign({}, this.attributes, attributes));
|
|
88
|
+
},
|
|
89
|
+
withConverter: function(converter2) {
|
|
90
|
+
return init(assign({}, this.converter, converter2), this.attributes);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
attributes: { value: Object.freeze(defaultAttributes) },
|
|
95
|
+
converter: { value: Object.freeze(converter) }
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
var api = init(defaultConverter, { path: "/" });
|
|
100
|
+
const CookieContext = createContext(null);
|
|
101
|
+
const ProviderCookie = (props) => {
|
|
102
|
+
const { getCookie, setCookie, removeCookieValue, removeCookieValues, checkCookie, cookieValues } = useProviderCookie(props);
|
|
103
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
104
|
+
CookieContext.Provider,
|
|
105
|
+
{
|
|
106
|
+
value: {
|
|
107
|
+
getCookie,
|
|
108
|
+
setCookie,
|
|
109
|
+
removeCookieValue,
|
|
110
|
+
removeCookieValues,
|
|
111
|
+
checkCookie,
|
|
112
|
+
cookieValues
|
|
113
|
+
},
|
|
114
|
+
children: props.children
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
const useProviderCookie = (props) => {
|
|
119
|
+
const [cookieValues, setCookieValues] = useState();
|
|
120
|
+
const getCookie = useCallback((name) => {
|
|
121
|
+
const cookie = api.get(String(name));
|
|
122
|
+
setCookieValues((prevState) => ({
|
|
123
|
+
...prevState,
|
|
124
|
+
[name]: cookie ? JSON.parse(cookie) : void 0
|
|
125
|
+
}));
|
|
126
|
+
return cookie ? JSON.parse(cookie) : void 0;
|
|
127
|
+
}, []);
|
|
128
|
+
const changeCookie = useCallback(
|
|
129
|
+
(name, value, options) => {
|
|
130
|
+
try {
|
|
131
|
+
api.set(String(name), JSON.stringify(value), options);
|
|
132
|
+
setCookieValues((prevState) => ({ ...prevState, [name]: value }));
|
|
133
|
+
} catch {
|
|
134
|
+
console.info(`Provider Cookie. ChangeCookie error - key:${name}, value:${value}.`);
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
[]
|
|
138
|
+
);
|
|
139
|
+
const removeCookieValue = useCallback((name, options) => {
|
|
140
|
+
try {
|
|
141
|
+
api.remove(String(name), options);
|
|
142
|
+
setCookieValues((prevState) => ({ ...prevState, [name]: void 0 }));
|
|
143
|
+
} catch {
|
|
144
|
+
console.info(`Provider Cookie. RemoveCookieValue error - key:${name}.`);
|
|
145
|
+
}
|
|
146
|
+
}, []);
|
|
147
|
+
const removeCookieValues = useCallback(() => {
|
|
148
|
+
var _a;
|
|
149
|
+
if (props.validate && props.validate.validateKeys) {
|
|
150
|
+
(_a = props.validate) == null ? void 0 : _a.validateKeys.forEach((key) => {
|
|
151
|
+
removeCookieValue(String(key));
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
console.info("Provider Cookie. Validate is not defined.");
|
|
155
|
+
}
|
|
156
|
+
}, [props.validate, removeCookieValue]);
|
|
157
|
+
const checkCookie = useCallback(() => {
|
|
158
|
+
var _a;
|
|
159
|
+
if (props.validate && props.validate.validateKeys && props.validate.getValidateCookieValue) {
|
|
160
|
+
(_a = props.validate) == null ? void 0 : _a.validateKeys.forEach((key) => {
|
|
161
|
+
var _a2;
|
|
162
|
+
const cookieValue = api.get(String(key));
|
|
163
|
+
if (cookieValue) {
|
|
164
|
+
try {
|
|
165
|
+
const parsedValue = JSON.parse(cookieValue);
|
|
166
|
+
if (!((_a2 = props.validate) == null ? void 0 : _a2.getValidateCookieValue(String(key), parsedValue))) {
|
|
167
|
+
removeCookieValue(String(key));
|
|
168
|
+
} else {
|
|
169
|
+
setCookieValues((prevState) => ({
|
|
170
|
+
...prevState,
|
|
171
|
+
[key]: parsedValue
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
} catch {
|
|
175
|
+
removeCookieValue(String(key));
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
removeCookieValue(String(key));
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
} else {
|
|
182
|
+
console.info("Provider Cookie. Validate is not defined.");
|
|
183
|
+
}
|
|
184
|
+
}, [props.validate, removeCookieValue]);
|
|
185
|
+
useEffect(() => {
|
|
186
|
+
checkCookie();
|
|
187
|
+
}, [checkCookie]);
|
|
188
|
+
return { getCookie, setCookie: changeCookie, removeCookieValue, removeCookieValues, checkCookie, cookieValues };
|
|
189
|
+
};
|
|
190
|
+
export {
|
|
191
|
+
CookieContext as C,
|
|
192
|
+
ProviderCookie as P,
|
|
193
|
+
api as a
|
|
194
|
+
};
|
|
195
|
+
//# sourceMappingURL=context-C0_RNFp_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-C0_RNFp_.js","sources":["../node_modules/js-cookie/dist/js.cookie.mjs","../src/contexts/context-cookie/context.tsx"],"sourcesContent":["/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import Cookies from 'js-cookie';\nimport { FC, createContext, useCallback, useEffect, useState } from 'react';\n\nimport { CookieAttributes, CookieContextProps, ProviderCookieProps, ValidCookieObject } from '.';\n\n/**\n * Context for managing cookies.\n */\nexport const CookieContext = createContext<CookieContextProps | null>(null);\n\n/**\n * Provider component for managing cookies.\n *\n * @remarks\n * You should understand which cookies you are changing and whether you have access to them.\n *\n * @remarks\n * The local storage is typed using the `jenesei-kit-react.d.ts` file:\n *\n * ```typescript\n * import '@jenesei-software/jenesei-kit-react'\n *\n * declare module '@jenesei-software/jenesei-kit-react' {\n * export interface ValidCookieObject {\n * access_token: string\n * refresh_token: string\n * }\n * }\n * ```\n */\nexport const ProviderCookie: FC<ProviderCookieProps> = (props) => {\n const { getCookie, setCookie, removeCookieValue, removeCookieValues, checkCookie, cookieValues } =\n useProviderCookie(props);\n\n return (\n <CookieContext.Provider\n value={{\n getCookie,\n setCookie,\n removeCookieValue,\n removeCookieValues,\n checkCookie,\n cookieValues,\n }}\n >\n {props.children}\n </CookieContext.Provider>\n );\n};\n\nconst useProviderCookie = (props: ProviderCookieProps) => {\n const [cookieValues, setCookieValues] = useState<ValidCookieObject>();\n\n const getCookie = useCallback(<K extends keyof ValidCookieObject>(name: K): ValidCookieObject[K] | undefined => {\n const cookie = Cookies.get(String(name));\n setCookieValues((prevState) => ({\n ...prevState,\n [name]: cookie ? JSON.parse(cookie) : undefined,\n }));\n return cookie ? JSON.parse(cookie) : undefined;\n }, []);\n\n const changeCookie = useCallback(\n <K extends keyof ValidCookieObject>(name: K, value: ValidCookieObject[K], options?: CookieAttributes) => {\n try {\n Cookies.set(String(name), JSON.stringify(value), options);\n setCookieValues((prevState) => ({ ...prevState, [name]: value }));\n } catch {\n console.info(`Provider Cookie. ChangeCookie error - key:${name}, value:${value}.`);\n }\n },\n [],\n );\n\n const removeCookieValue = useCallback(<K extends keyof ValidCookieObject>(name: K, options?: CookieAttributes) => {\n try {\n Cookies.remove(String(name), options);\n setCookieValues((prevState) => ({ ...prevState, [name]: undefined }));\n } catch {\n console.info(`Provider Cookie. RemoveCookieValue error - key:${name}.`);\n }\n }, []);\n\n const removeCookieValues = useCallback(() => {\n if (props.validate && props.validate.validateKeys) {\n props.validate?.validateKeys.forEach((key) => {\n removeCookieValue(String(key) as never);\n });\n } else {\n console.info('Provider Cookie. Validate is not defined.');\n }\n }, [props.validate, removeCookieValue]);\n\n const checkCookie = useCallback(() => {\n if (props.validate && props.validate.validateKeys && props.validate.getValidateCookieValue) {\n props.validate?.validateKeys.forEach((key) => {\n const cookieValue = Cookies.get(String(key));\n if (cookieValue) {\n try {\n const parsedValue = JSON.parse(cookieValue);\n if (!props.validate?.getValidateCookieValue(String(key) as never, parsedValue as never)) {\n removeCookieValue(String(key) as never);\n } else {\n setCookieValues((prevState) => ({\n ...prevState,\n [key]: parsedValue,\n }));\n }\n } catch {\n removeCookieValue(String(key) as never);\n }\n } else {\n removeCookieValue(String(key) as never);\n }\n });\n } else {\n console.info('Provider Cookie. Validate is not defined.');\n }\n }, [props.validate, removeCookieValue]);\n\n useEffect(() => {\n checkCookie();\n }, [checkCookie]);\n\n return { getCookie, setCookie: changeCookie, removeCookieValue, removeCookieValues, checkCookie, cookieValues };\n};\n"],"names":["converter","jsx","Cookies","_a"],"mappings":";;AAAA;AAEA,SAAS,OAAQ,QAAQ;AACvB,WAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AACzC,QAAI,SAAS,UAAU,CAAC;AACxB,aAAS,OAAO,QAAQ;AACtB,aAAO,GAAG,IAAI,OAAO,GAAG;AAAA,IAC1B;AAAA,EACF;AACA,SAAO;AACT;AAIA,IAAI,mBAAm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){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var i in t)e[i]=t[i]}return e}var i=function e(o,i){function r(e,r,n){if("undefined"!=typeof document){"number"==typeof(n=t({},i,n)).expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in n)n[c]&&(a+="; "+c,!0!==n[c]&&(a+="="+n[c].split(";")[0]));return document.cookie=e+"="+o.write(r,e)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],i={},r=0;r<t.length;r++){var n=t[r].split("="),a=n.slice(1).join("=");try{var c=decodeURIComponent(n[0]);if(i[c]=o.read(a,c),e===c)break}catch(l){}}return e?i[e]:i}},remove:function(e,o){r(e,"",t({},o,{expires:-1}))},withAttributes:function(o){return e(this.converter,t({},this.attributes,o))},withConverter:function(o){return e(t({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(o)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const r=o.createContext(null),n=e=>{const[t,r]=o.useState(),n=o.useCallback(e=>{const o=i.get(String(e));return r(t=>({...t,[e]:o?JSON.parse(o):void 0})),o?JSON.parse(o):void 0},[]),a=o.useCallback((e,o,t)=>{try{i.set(String(e),JSON.stringify(o),t),r(t=>({...t,[e]:o}))}catch{console.info(`Provider Cookie. ChangeCookie error - key:${e}, value:${o}.`)}},[]),c=o.useCallback((e,o)=>{try{i.remove(String(e),o),r(o=>({...o,[e]:void 0}))}catch{console.info(`Provider Cookie. RemoveCookieValue error - key:${e}.`)}},[]),l=o.useCallback(()=>{var o;e.validate&&e.validate.validateKeys?null==(o=e.validate)||o.validateKeys.forEach(e=>{c(String(e))}):console.info("Provider Cookie. Validate is not defined.")},[e.validate,c]),s=o.useCallback(()=>{var o;e.validate&&e.validate.validateKeys&&e.validate.getValidateCookieValue?null==(o=e.validate)||o.validateKeys.forEach(o=>{var t;const n=i.get(String(o));if(n)try{const i=JSON.parse(n);(null==(t=e.validate)?void 0:t.getValidateCookieValue(String(o),i))?r(e=>({...e,[o]:i})):c(String(o))}catch{c(String(o))}else c(String(o))}):console.info("Provider Cookie. Validate is not defined.")},[e.validate,c]);return o.useEffect(()=>{s()},[s]),{getCookie:n,setCookie:a,removeCookieValue:c,removeCookieValues:l,checkCookie:s,cookieValues:t}};exports.CookieContext=r,exports.ProviderCookie=o=>{const{getCookie:t,setCookie:i,removeCookieValue:a,removeCookieValues:c,checkCookie:l,cookieValues:s}=n(o);return e.jsxRuntimeExports.jsx(r.Provider,{value:{getCookie:t,setCookie:i,removeCookieValue:a,removeCookieValues:c,checkCookie:l,cookieValues:s},children:o.children})},exports.api=i;
|
|
4
|
+
//# sourceMappingURL=context-DyTE2I_6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-DyTE2I_6.cjs","sources":["../node_modules/js-cookie/dist/js.cookie.mjs","../src/contexts/context-cookie/context.tsx"],"sourcesContent":["/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import Cookies from 'js-cookie';\nimport { FC, createContext, useCallback, useEffect, useState } from 'react';\n\nimport { CookieAttributes, CookieContextProps, ProviderCookieProps, ValidCookieObject } from '.';\n\n/**\n * Context for managing cookies.\n */\nexport const CookieContext = createContext<CookieContextProps | null>(null);\n\n/**\n * Provider component for managing cookies.\n *\n * @remarks\n * You should understand which cookies you are changing and whether you have access to them.\n *\n * @remarks\n * The local storage is typed using the `jenesei-kit-react.d.ts` file:\n *\n * ```typescript\n * import '@jenesei-software/jenesei-kit-react'\n *\n * declare module '@jenesei-software/jenesei-kit-react' {\n * export interface ValidCookieObject {\n * access_token: string\n * refresh_token: string\n * }\n * }\n * ```\n */\nexport const ProviderCookie: FC<ProviderCookieProps> = (props) => {\n const { getCookie, setCookie, removeCookieValue, removeCookieValues, checkCookie, cookieValues } =\n useProviderCookie(props);\n\n return (\n <CookieContext.Provider\n value={{\n getCookie,\n setCookie,\n removeCookieValue,\n removeCookieValues,\n checkCookie,\n cookieValues,\n }}\n >\n {props.children}\n </CookieContext.Provider>\n );\n};\n\nconst useProviderCookie = (props: ProviderCookieProps) => {\n const [cookieValues, setCookieValues] = useState<ValidCookieObject>();\n\n const getCookie = useCallback(<K extends keyof ValidCookieObject>(name: K): ValidCookieObject[K] | undefined => {\n const cookie = Cookies.get(String(name));\n setCookieValues((prevState) => ({\n ...prevState,\n [name]: cookie ? JSON.parse(cookie) : undefined,\n }));\n return cookie ? JSON.parse(cookie) : undefined;\n }, []);\n\n const changeCookie = useCallback(\n <K extends keyof ValidCookieObject>(name: K, value: ValidCookieObject[K], options?: CookieAttributes) => {\n try {\n Cookies.set(String(name), JSON.stringify(value), options);\n setCookieValues((prevState) => ({ ...prevState, [name]: value }));\n } catch {\n console.info(`Provider Cookie. ChangeCookie error - key:${name}, value:${value}.`);\n }\n },\n [],\n );\n\n const removeCookieValue = useCallback(<K extends keyof ValidCookieObject>(name: K, options?: CookieAttributes) => {\n try {\n Cookies.remove(String(name), options);\n setCookieValues((prevState) => ({ ...prevState, [name]: undefined }));\n } catch {\n console.info(`Provider Cookie. RemoveCookieValue error - key:${name}.`);\n }\n }, []);\n\n const removeCookieValues = useCallback(() => {\n if (props.validate && props.validate.validateKeys) {\n props.validate?.validateKeys.forEach((key) => {\n removeCookieValue(String(key) as never);\n });\n } else {\n console.info('Provider Cookie. Validate is not defined.');\n }\n }, [props.validate, removeCookieValue]);\n\n const checkCookie = useCallback(() => {\n if (props.validate && props.validate.validateKeys && props.validate.getValidateCookieValue) {\n props.validate?.validateKeys.forEach((key) => {\n const cookieValue = Cookies.get(String(key));\n if (cookieValue) {\n try {\n const parsedValue = JSON.parse(cookieValue);\n if (!props.validate?.getValidateCookieValue(String(key) as never, parsedValue as never)) {\n removeCookieValue(String(key) as never);\n } else {\n setCookieValues((prevState) => ({\n ...prevState,\n [key]: parsedValue,\n }));\n }\n } catch {\n removeCookieValue(String(key) as never);\n }\n } else {\n removeCookieValue(String(key) as never);\n }\n });\n } else {\n console.info('Provider Cookie. Validate is not defined.');\n }\n }, [props.validate, removeCookieValue]);\n\n useEffect(() => {\n checkCookie();\n }, [checkCookie]);\n\n return { getCookie, setCookie: changeCookie, removeCookieValue, removeCookieValues, checkCookie, cookieValues };\n};\n"],"names":["assign","target","i","arguments","length","source","key","api","init","converter","defaultAttributes","set","name","value","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","Object","create","get","cookies","jar","parts","slice","join","found","read","e","remove","withAttributes","this","withConverter","freeze","path","CookieContext","createContext","useProviderCookie","props","cookieValues","setCookieValues","useState","getCookie","useCallback","Cookies","String","prevState","JSON","parse","changeCookie","options","stringify","console","info","removeCookieValue","removeCookieValues","validate","validateKeys","_a","forEach","checkCookie","getValidateCookieValue","cookieValue","parsedValue","useEffect","setCookie","jsx","Provider","children"],"mappings":";;AAEA,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BAGD6B,SAAA9B,EAAM8B","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as jsxRuntimeExports } from "./jsx-runtime-
|
|
1
|
+
import { j as jsxRuntimeExports } from "./jsx-runtime-DZS36FSE.js";
|
|
2
2
|
import { createContext, useState, useEffect } from "react";
|
|
3
|
-
import { u as usePermission } from "./context.hooks-
|
|
3
|
+
import { u as usePermission } from "./context.hooks-B9dsW2kz.js";
|
|
4
4
|
const GeolocationContext = createContext(null);
|
|
5
5
|
const ProviderGeolocation = (props) => {
|
|
6
6
|
const { geolocationPermission, requestGeolocationPermission } = usePermission();
|
|
@@ -41,4 +41,4 @@ export {
|
|
|
41
41
|
GeolocationContext as G,
|
|
42
42
|
ProviderGeolocation as P
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=context-
|
|
44
|
+
//# sourceMappingURL=context-LBih45kv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-
|
|
1
|
+
{"version":3,"file":"context-LBih45kv.js","sources":["../src/contexts/context-geolocation/context.tsx"],"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"],"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,IACtB;AAEA,UAAM,cAAc,CAACA,WAAoC;AACvD,eAASA,MAAK;AAAA,IAChB;AAEA,QAAI,0BAA0B,WAAW;AACvC,gBAAU,YAAY,mBAAmB,eAAe,WAAW;AAAA,IACrE;AAAA,EACF,GAAG,CAAC,uBAAuB,MAAM,eAAe,4BAA4B,CAAC;AAE7E,YAAU,MAAM;AACd,QAAI,MAAM,eAAe;AACvB,UAAI,0BAA0B,WAAW;AACvC,qCAAA;AAAA,MACF;AAAA,IACF;AAAA,EACF,GAAG,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;"}
|
package/build/context-app.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.constants-CDgzMcxb.cjs"),r=require("./context.hooks-BIfYPHOA.cjs");exports.AppContext=e.AppContext,exports.ProviderApp=e.ProviderApp,exports.ProviderAppOutlet=e.ProviderAppOutlet,exports.ProviderAppOutletChildren=e.ProviderAppOutletChildren,exports.ProviderAppOutletFooter=e.ProviderAppOutletFooter,exports.ProviderAppOutletHeader=e.ProviderAppOutletHeader,exports.ProviderAppOutletLeftAside=e.ProviderAppOutletLeftAside,exports.ProviderAppOutletNav=e.ProviderAppOutletNav,exports.ProviderAppOutletNotification=e.ProviderAppOutletNotification,exports.ProviderAppOutletRightAside=e.ProviderAppOutletRightAside,exports.ProviderAppWrapper=e.ProviderAppWrapper,exports.useBgColor=e.useBgColor,exports.useBgImage=e.useBgImage,exports.useDescription=e.useDescription,exports.useStatusBarColor=e.useStatusBarColor,exports.useApp=r.useApp;
|
|
2
2
|
//# sourceMappingURL=context-app.cjs.js.map
|
package/build/context-app.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { AddDollarSign as AddDollarSign_2 } from '../..';
|
|
2
|
-
import { AppContextProps as AppContextProps_2 } from './context.types';
|
|
3
1
|
import { Context } from 'react';
|
|
4
2
|
import { CSSObject } from 'styled-components';
|
|
5
3
|
import { DefaultTheme } from 'styled-components';
|
|
@@ -8,7 +6,6 @@ import { FC } from 'react';
|
|
|
8
6
|
import { HTMLAttributes } from 'react';
|
|
9
7
|
import { IStyledComponentBase } from 'styled-components/dist/types';
|
|
10
8
|
import { PropsWithChildren } from 'react';
|
|
11
|
-
import { ProviderAppProps as ProviderAppProps_2 } from './context.types';
|
|
12
9
|
import { ReactElement } from 'react';
|
|
13
10
|
import { ReactNode } from 'react';
|
|
14
11
|
import { Substitute } from 'styled-components/dist/types';
|
|
@@ -17,6 +14,10 @@ declare type AddDollarSign<T> = {
|
|
|
17
14
|
[K in keyof T as `$${string & K}`]: T[K];
|
|
18
15
|
};
|
|
19
16
|
|
|
17
|
+
declare type AddDollarSign_2<T> = {
|
|
18
|
+
[K in keyof T as `$${string & K}`]: T[K];
|
|
19
|
+
};
|
|
20
|
+
|
|
20
21
|
declare interface addSXProps {
|
|
21
22
|
sx?: SXProps;
|
|
22
23
|
}
|
|
@@ -93,25 +94,25 @@ export declare const ProviderApp: FC<ProviderAppProps>;
|
|
|
93
94
|
|
|
94
95
|
export declare type ProviderAppElementProps = Partial<AddDollarSign<Pick<ProviderAppProps, 'notification' | 'header' | 'nav' | 'footer' | 'leftAside' | 'rightAside'>>>;
|
|
95
96
|
|
|
96
|
-
export declare const ProviderAppOutlet: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Partial<AddDollarSign_2<Pick<
|
|
97
|
+
export declare const ProviderAppOutlet: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
97
98
|
|
|
98
|
-
export declare const ProviderAppOutletChildren: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, AddDollarSign_2<Pick<
|
|
99
|
+
export declare const ProviderAppOutletChildren: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, AddDollarSign_2<Pick<ProviderAppProps, "main" | "isScrollOutlet">>>> & string;
|
|
99
100
|
|
|
100
101
|
export declare type ProviderAppOutletChildrenProps = AddDollarSign<Pick<ProviderAppProps, 'main' | 'isScrollOutlet'>>;
|
|
101
102
|
|
|
102
|
-
export declare const ProviderAppOutletFooter: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<
|
|
103
|
+
export declare const ProviderAppOutletFooter: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
103
104
|
|
|
104
|
-
export declare const ProviderAppOutletHeader: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<
|
|
105
|
+
export declare const ProviderAppOutletHeader: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
105
106
|
|
|
106
|
-
export declare const ProviderAppOutletLeftAside: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<
|
|
107
|
+
export declare const ProviderAppOutletLeftAside: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
107
108
|
|
|
108
|
-
export declare const ProviderAppOutletNav: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<
|
|
109
|
+
export declare const ProviderAppOutletNav: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
109
110
|
|
|
110
|
-
export declare const ProviderAppOutletNotification: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<
|
|
111
|
+
export declare const ProviderAppOutletNotification: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
111
112
|
|
|
112
113
|
export declare type ProviderAppOutletProps = Partial<AddDollarSign<Pick<ProviderAppProps, 'isScrollOutlet' | 'notification' | 'header' | 'nav' | 'footer' | 'leftAside' | 'rightAside'>>>;
|
|
113
114
|
|
|
114
|
-
export declare const ProviderAppOutletRightAside: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<
|
|
115
|
+
export declare const ProviderAppOutletRightAside: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
115
116
|
|
|
116
117
|
export declare interface ProviderAppProps extends PropsWithChildren {
|
|
117
118
|
defaultPreview?: PreviewAdditionalProps;
|
|
@@ -186,7 +187,7 @@ declare type SXProps = ({
|
|
|
186
187
|
/**
|
|
187
188
|
* Custom hook to access the AppContext.
|
|
188
189
|
*/
|
|
189
|
-
export declare const useApp: () =>
|
|
190
|
+
export declare const useApp: () => AppContextProps;
|
|
190
191
|
|
|
191
192
|
export declare const useBgColor: (defaultColor: IThemePaletteKeys) => {
|
|
192
193
|
bgColor: IThemePaletteKeys;
|
package/build/context-app.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u } from "./context.hooks-
|
|
1
|
+
import { aP, aQ, aW, aX, a_, aZ, b0, a$, aY, b1, aV, aR, aT, aU, aS } from "./context.constants-Bh-ajJM2.js";
|
|
2
|
+
import { u } from "./context.hooks-BG1tp2nc.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
aP as AppContext,
|
|
5
|
+
aQ as ProviderApp,
|
|
6
|
+
aW as ProviderAppOutlet,
|
|
7
|
+
aX as ProviderAppOutletChildren,
|
|
8
|
+
a_ as ProviderAppOutletFooter,
|
|
9
|
+
aZ as ProviderAppOutletHeader,
|
|
10
|
+
b0 as ProviderAppOutletLeftAside,
|
|
11
|
+
a$ as ProviderAppOutletNav,
|
|
12
|
+
aY as ProviderAppOutletNotification,
|
|
13
|
+
b1 as ProviderAppOutletRightAside,
|
|
14
|
+
aV as ProviderAppWrapper,
|
|
15
15
|
u as useApp,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
aR as useBgColor,
|
|
17
|
+
aT as useBgImage,
|
|
18
|
+
aU as useDescription,
|
|
19
|
+
aS as useStatusBarColor
|
|
20
20
|
};
|
|
21
21
|
//# sourceMappingURL=context-app.es.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./context-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./context-DyTE2I_6.cjs"),e=require("./context.functions-Duwzgcga.cjs");exports.CookieContext=o.CookieContext,exports.ProviderCookie=o.ProviderCookie,exports.getFromCookie=e.getFromCookie,exports.setToCookie=e.setToCookie,exports.useCookie=e.useCookie;
|
|
2
2
|
//# sourceMappingURL=context-cookie.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C, P } from "./context-
|
|
2
|
-
import { g, s, u } from "./context.functions-
|
|
1
|
+
import { C, P } from "./context-C0_RNFp_.js";
|
|
2
|
+
import { g, s, u } from "./context.functions-D2K4Xk47.js";
|
|
3
3
|
export {
|
|
4
4
|
C as CookieContext,
|
|
5
5
|
P as ProviderCookie,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./context.constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./context.constants-BWZS-di6.cjs"),E=require("./context.hooks-Biv8ZMzm.cjs");exports.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT=D.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT,exports.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT=D.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING,exports.DialogContent=D.DialogContent,exports.DialogContext=D.DialogContext,exports.DialogElementWrapper=D.DialogElementWrapper,exports.DialogLayout=D.DialogLayout,exports.ProviderDialog=D.ProviderDialog,exports.useDialog=E.useDialog,exports.useDialogs=E.useDialogs;
|
|
2
2
|
//# sourceMappingURL=context-dialog.cjs.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AddDollarSign as AddDollarSign_2 } from '../..';
|
|
2
1
|
import { Component } from 'react';
|
|
3
2
|
import { Context } from 'react';
|
|
4
3
|
import { FastOmit } from 'styled-components';
|
|
@@ -7,7 +6,6 @@ import { ForwardRefComponent } from 'framer-motion';
|
|
|
7
6
|
import { HTMLMotionProps } from 'framer-motion';
|
|
8
7
|
import { IStyledComponentBase } from 'styled-components/dist/types';
|
|
9
8
|
import { PropsWithChildren } from 'react';
|
|
10
|
-
import { ProviderDialogProps as ProviderDialogProps_2 } from './context.types';
|
|
11
9
|
import { ReactNode } from 'react';
|
|
12
10
|
import { RefAttributes } from 'react';
|
|
13
11
|
import { Substitute } from 'styled-components/dist/types';
|
|
@@ -16,6 +14,10 @@ declare type AddDollarSign<T> = {
|
|
|
16
14
|
[K in keyof T as `$${string & K}`]: T[K];
|
|
17
15
|
};
|
|
18
16
|
|
|
17
|
+
declare type AddDollarSign_2<T> = {
|
|
18
|
+
[K in keyof T as `$${string & K}`]: T[K];
|
|
19
|
+
};
|
|
20
|
+
|
|
19
21
|
declare type addOutlineProps = {
|
|
20
22
|
isReadOnly?: boolean;
|
|
21
23
|
isDisabledOutline?: boolean;
|
|
@@ -78,7 +80,7 @@ export declare const DialogElementWrapper: IStyledComponentBase<"web", Substitut
|
|
|
78
80
|
|
|
79
81
|
export declare type DialogElementWrapperProps = AddDollarSign<useDialogProps<object>> & addOutlinePropsDollar;
|
|
80
82
|
|
|
81
|
-
export declare const DialogLayout: IStyledComponentBase<"web", Substitute<Omit<HTMLMotionProps<"div">, "ref"> & RefAttributes<HTMLDivElement>, AddDollarSign_2<Pick<
|
|
83
|
+
export declare const DialogLayout: IStyledComponentBase<"web", Substitute<Omit<HTMLMotionProps<"div">, "ref"> & RefAttributes<HTMLDivElement>, AddDollarSign_2<Pick<ProviderDialogProps, "zIndex">>>> & string & Omit<ForwardRefComponent<HTMLDivElement, HTMLMotionProps<"div">>, keyof Component<any, {}, any>>;
|
|
82
84
|
|
|
83
85
|
export declare type DialogLayoutProps = AddDollarSign<Pick<ProviderDialogProps, 'zIndex'>>;
|
|
84
86
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d, e, j, h, f, g, i, c, D, b, a, P } from "./context.constants-
|
|
2
|
-
import { a as a2, u } from "./context.hooks-
|
|
1
|
+
import { d, e, j, h, f, g, i, c, D, b, a, P } from "./context.constants-Nfy-8Qzj.js";
|
|
2
|
+
import { a as a2, u } from "./context.hooks-DGYU76JL.js";
|
|
3
3
|
export {
|
|
4
4
|
d as DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT,
|
|
5
5
|
e as DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./context-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./context-B8kTBKjt.cjs"),e=require("./context.hooks-CYJnoIrt.cjs");exports.GeolocationContext=o.GeolocationContext,exports.ProviderGeolocation=o.ProviderGeolocation,exports.useGeolocation=e.useGeolocation;
|
|
2
2
|
//# sourceMappingURL=context-geolocation.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./context-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./context-B1id3uai.cjs"),e=require("./context.functions-BqeTmcmr.cjs");exports.LocalStorageContext=o.LocalStorageContext,exports.ProviderLocalStorage=o.ProviderLocalStorage,exports.getFromLocalStorage=e.getFromLocalStorage,exports.setToLocalStorage=e.setToLocalStorage,exports.useLocalStorage=e.useLocalStorage;
|
|
2
2
|
//# sourceMappingURL=context-local-storage.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L, P } from "./context-
|
|
2
|
-
import { g, s, u } from "./context.functions-
|
|
1
|
+
import { L, P } from "./context-BkovkNHQ.js";
|
|
2
|
+
import { g, s, u } from "./context.functions-ObfwvEVG.js";
|
|
3
3
|
export {
|
|
4
4
|
L as LocalStorageContext,
|
|
5
5
|
P as ProviderLocalStorage,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.functions-ar41xFVo.cjs"),r=require("./context.hooks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.functions-ar41xFVo.cjs"),r=require("./context.hooks-DpwnIiRj.cjs");exports.urlBase64ToUint8Array=e.urlBase64ToUint8Array,exports.PermissionContext=r.PermissionContext,exports.ProviderPermission=r.ProviderPermission,exports.usePermission=r.usePermission;
|
|
2
2
|
//# sourceMappingURL=context-permission.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.hooks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.hooks-DDD8ffJI.cjs");exports.ProviderScreenWidth=e.ProviderScreenWidth,exports.ScreenWidthContext=e.ScreenWidthContext,exports.useScreenWidth=e.useScreenWidth;
|
|
2
2
|
//# sourceMappingURL=context-screen-width.cjs.js.map
|