tanstack_start_ts 1.0.0
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/.wrangler/deploy/config.json +1 -0
- package/bunfig.toml +6 -0
- package/components.json +22 -0
- package/config.json +0 -0
- package/dist/client/.assetsignore +2 -0
- package/dist/client/assets/ProductCard-DbIkJAE-.js +1 -0
- package/dist/client/assets/about-AskxOruL.js +1 -0
- package/dist/client/assets/admin-BZVcAQM3.js +1 -0
- package/dist/client/assets/admin.functions--RdVcuBx.js +1 -0
- package/dist/client/assets/admin.login-QgrF_9Fp.js +1 -0
- package/dist/client/assets/affiliate-disclosure-BIAsA-HO.js +1 -0
- package/dist/client/assets/categories-D0N418mK.js +1 -0
- package/dist/client/assets/category._slug-aCaQm14E.js +1 -0
- package/dist/client/assets/contact-PhvO-V15.js +1 -0
- package/dist/client/assets/faq-BsiHWPM8.js +1 -0
- package/dist/client/assets/hero-bg-BP2eVUIX.jpg +0 -0
- package/dist/client/assets/index-BU9rnkF3.js +1 -0
- package/dist/client/assets/index-BpJWZkva.js +1 -0
- package/dist/client/assets/index-vRX-zAyq.js +1 -0
- package/dist/client/assets/login-DteE0ZGp.js +1 -0
- package/dist/client/assets/logo-pSNfLJQk.png +0 -0
- package/dist/client/assets/privacy-B_Pu7040.js +1 -0
- package/dist/client/assets/product-links-BkZ41Gv3.js +1 -0
- package/dist/client/assets/product._id-BVUysCW-.js +1 -0
- package/dist/client/assets/products.functions-cGzRziKO.js +1 -0
- package/dist/client/assets/profile-CveRcKq2.js +1 -0
- package/dist/client/assets/reset-password-ySEjItX_.js +1 -0
- package/dist/client/assets/saved-CHtdQDJF.js +1 -0
- package/dist/client/assets/search-CXWfET1y.js +1 -0
- package/dist/client/assets/signup-CEx90iuV.js +1 -0
- package/dist/client/assets/styles-DrNJG0BO.css +1 -0
- package/dist/client/assets/terms-VqJ9kX9b.js +1 -0
- package/dist/client/assets/update-password-C-d0ix5e.js +1 -0
- package/dist/client/assets/vendor-aria-hidden-DvXkyWUv.js +1 -0
- package/dist/client/assets/vendor-class-variance-authority-5VPnzWs2.js +1 -0
- package/dist/client/assets/vendor-clsx-B-dksMZM.js +1 -0
- package/dist/client/assets/vendor-cookie-es-CS0aJGDi.js +1 -0
- package/dist/client/assets/vendor-detect-node-es-l0sNRNKZ.js +1 -0
- package/dist/client/assets/vendor-floating-ui-core-BlUy28sp.js +1 -0
- package/dist/client/assets/vendor-floating-ui-dom-BxK0hn2R.js +1 -0
- package/dist/client/assets/vendor-floating-ui-react-dom-Bas3975S.js +1 -0
- package/dist/client/assets/vendor-floating-ui-utils-BfYUAVcw.js +1 -0
- package/dist/client/assets/vendor-framer-motion-BMdL-cuX.js +9 -0
- package/dist/client/assets/vendor-get-nonce-C-Z93AgS.js +1 -0
- package/dist/client/assets/vendor-iceberg-js-tWD4K6Lg.js +1 -0
- package/dist/client/assets/vendor-lovable.dev-cloud-auth-js-VuzqtJVg.js +1 -0
- package/dist/client/assets/vendor-lucide-react-b5K2fehp.js +1 -0
- package/dist/client/assets/vendor-motion-dom-BETJamZt.js +1 -0
- package/dist/client/assets/vendor-motion-utils-BuWewJbj.js +1 -0
- package/dist/client/assets/vendor-radix-ui-primitive-Dc_FVRD7.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-accordion-C22Rgxe9.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-arrow-DMHj2mKI.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-avatar-CVPBkFXg.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-collapsible-BvM-4sKX.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-collection-D9KtqmHm.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-context-CAqqn5Nx.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-dialog-DZ01vOLq.js +5 -0
- package/dist/client/assets/vendor-radix-ui-react-direction-DxZwNuei.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-focus-guards-DgWoZ-fP.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-focus-scope-BLIu5QaL.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-id-bpga_rLa.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-menu-D0qf2r6_.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-popper-BafIylxU.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-portal-BnAsfNCS.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-presence-C-f3UKQ2.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-primitive-zTHwXNoz.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-roving-focus-jyJB8K2E.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-slot-6LXHJrHl.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-use-callback-ref-E91aPc6s.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-use-effect-event-CPeX4A3c.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js +1 -0
- package/dist/client/assets/vendor-radix-ui-react-use-size-CXS04sct.js +1 -0
- package/dist/client/assets/vendor-react-dom-BnNs-kzm.js +9 -0
- package/dist/client/assets/vendor-react-gJPiVnX5.js +1 -0
- package/dist/client/assets/vendor-react-remove-scroll-DHKl-IMP.js +4 -0
- package/dist/client/assets/vendor-react-remove-scroll-bar-CSjdInc2.js +38 -0
- package/dist/client/assets/vendor-react-style-singleton-BqHpkgXn.js +1 -0
- package/dist/client/assets/vendor-scheduler-7OC5HNn7.js +1 -0
- package/dist/client/assets/vendor-seroval-B_Fur-nl.js +3 -0
- package/dist/client/assets/vendor-seroval-plugins-CBHnPkZJ.js +1 -0
- package/dist/client/assets/vendor-sonner-71-LdGG1.js +1 -0
- package/dist/client/assets/vendor-supabase-auth-js-DWrN-bIx.js +18 -0
- package/dist/client/assets/vendor-supabase-functions-js-uY_V-TxC.js +1 -0
- package/dist/client/assets/vendor-supabase-phoenix-BzEf37Ve.js +2 -0
- package/dist/client/assets/vendor-supabase-postgrest-js-C4rBWbCx.js +4 -0
- package/dist/client/assets/vendor-supabase-realtime-js-D6BlOYKE.js +23 -0
- package/dist/client/assets/vendor-supabase-storage-js-BG98L3Zz.js +1 -0
- package/dist/client/assets/vendor-supabase-supabase-js-DCCzdwBJ.js +1 -0
- package/dist/client/assets/vendor-tailwind-merge-Ct12j0u0.js +1 -0
- package/dist/client/assets/vendor-tanstack-history-C617CaxG.js +1 -0
- package/dist/client/assets/vendor-tanstack-query-core-7wuJJ5ZL.js +1 -0
- package/dist/client/assets/vendor-tanstack-react-query-HImzo8sX.js +1 -0
- package/dist/client/assets/vendor-tanstack-react-router-sIZLK-LU.js +1 -0
- package/dist/client/assets/vendor-tanstack-react-start-client-GiYCfWmf.js +1 -0
- package/dist/client/assets/vendor-tanstack-react-store-EvTi3ahh.js +1 -0
- package/dist/client/assets/vendor-tanstack-router-core-Cr7bYUZv.js +1 -0
- package/dist/client/assets/vendor-tanstack-start-client-core-C-00BBOu.js +2 -0
- package/dist/client/assets/vendor-tanstack-start-fn-stubs-l0sNRNKZ.js +1 -0
- package/dist/client/assets/vendor-tanstack-store-BC7mA7pq.js +1 -0
- package/dist/client/assets/vendor-tslib-Du-meQkk.js +1 -0
- package/dist/client/assets/vendor-use-callback-ref-C_fIAtot.js +1 -0
- package/dist/client/assets/vendor-use-sidecar-Bh0DDN6h.js +1 -0
- package/dist/client/assets/vendor-use-sync-external-store-ZvKHXaIn.js +1 -0
- package/dist/client/assets/vendor-vercel-analytics-DwPM5BWs.js +1 -0
- package/dist/client/assets/vendor-zod-By9teAtI.js +1 -0
- package/dist/client/robots.txt +2 -0
- package/dist/server/.dev.vars +5 -0
- package/dist/server/.vite/manifest.json +2528 -0
- package/dist/server/assets/ProductCard-CUPXy5Eo.js +149 -0
- package/dist/server/assets/_tanstack-start-manifest_v-do7vTWFD.js +4 -0
- package/dist/server/assets/about-TfKQw0Ga.js +28 -0
- package/dist/server/assets/admin-DspfJOJk.js +578 -0
- package/dist/server/assets/admin.functions-B78ppWLR.js +645 -0
- package/dist/server/assets/admin.functions-BWlKBoTL.js +93 -0
- package/dist/server/assets/admin.login-CV7QfeA6.js +139 -0
- package/dist/server/assets/affiliate-disclosure-B1wI1cDb.js +86 -0
- package/dist/server/assets/auth-middleware-Cn49MidW.js +62 -0
- package/dist/server/assets/categories-Z7jnAYZP.js +108 -0
- package/dist/server/assets/category._slug-D0XY3FGK.js +112 -0
- package/dist/server/assets/contact-IzyONsXs.js +104 -0
- package/dist/server/assets/faq-aRhB_CR3.js +133 -0
- package/dist/server/assets/hero-bg-BP2eVUIX.jpg +0 -0
- package/dist/server/assets/index-BTPHbXw9.js +221 -0
- package/dist/server/assets/index-ByJkHkrU.js +30 -0
- package/dist/server/assets/login-Dvy5Dm0f.js +175 -0
- package/dist/server/assets/logo-pSNfLJQk.png +0 -0
- package/dist/server/assets/privacy-B6Wiez1P.js +93 -0
- package/dist/server/assets/product-links-CGYEPP56.js +16 -0
- package/dist/server/assets/product._id-BpRa-1z0.js +231 -0
- package/dist/server/assets/products.functions-DSlmibYN.js +209 -0
- package/dist/server/assets/products.functions-DlHkRiqi.js +24 -0
- package/dist/server/assets/profile-B0NWzVAZ.js +314 -0
- package/dist/server/assets/reset-password-CY-rmqMr.js +115 -0
- package/dist/server/assets/saved-7FA6Dbom.js +126 -0
- package/dist/server/assets/search-Yw5c_fZa.js +329 -0
- package/dist/server/assets/signup-UPzgZo4i.js +143 -0
- package/dist/server/assets/styles-DrNJG0BO.css +1 -0
- package/dist/server/assets/terms-CMnX95bP.js +89 -0
- package/dist/server/assets/update-password-Cr94ea8n.js +131 -0
- package/dist/server/assets/vendor-aria-hidden-DPa16MWu.js +122 -0
- package/dist/server/assets/vendor-class-variance-authority-0YxJPB9Y.js +44 -0
- package/dist/server/assets/vendor-cloudflare-unenv-preset-ya0VEFBz.js +250 -0
- package/dist/server/assets/vendor-clsx-DgYk2OaC.js +16 -0
- package/dist/server/assets/vendor-cookie-es-DAoofYiI.js +44 -0
- package/dist/server/assets/vendor-detect-node-es-l0sNRNKZ.js +1 -0
- package/dist/server/assets/vendor-floating-ui-core-3tkK0THV.js +726 -0
- package/dist/server/assets/vendor-floating-ui-dom-C-cPtgJv.js +626 -0
- package/dist/server/assets/vendor-floating-ui-react-dom-CRG6gBpH.js +319 -0
- package/dist/server/assets/vendor-floating-ui-utils-DmXANH-E.js +320 -0
- package/dist/server/assets/vendor-framer-motion-X4zAkX3J.js +1979 -0
- package/dist/server/assets/vendor-get-nonce-DiSj3EHl.js +9 -0
- package/dist/server/assets/vendor-h3-v2-CCobnLY5.js +287 -0
- package/dist/server/assets/vendor-iceberg-js-bHCkXyJn.js +534 -0
- package/dist/server/assets/vendor-isbot-CZ7WjwVs.js +21 -0
- package/dist/server/assets/vendor-lovable.dev-cloud-auth-js-BE03njZw.js +180 -0
- package/dist/server/assets/vendor-lucide-react-Ddew6HYb.js +458 -0
- package/dist/server/assets/vendor-motion-dom-D2MTwGIG.js +5983 -0
- package/dist/server/assets/vendor-motion-utils-LJlIFN6m.js +161 -0
- package/dist/server/assets/vendor-radix-ui-primitive-B-mNdDrH.js +11 -0
- package/dist/server/assets/vendor-radix-ui-react-accordion-1Izf6x00.js +308 -0
- package/dist/server/assets/vendor-radix-ui-react-arrow-B882lnFK.js +23 -0
- package/dist/server/assets/vendor-radix-ui-react-avatar-BVgZt2Ab.js +209 -0
- package/dist/server/assets/vendor-radix-ui-react-collapsible-DCBbMZiS.js +147 -0
- package/dist/server/assets/vendor-radix-ui-react-collection-BZ2srfgU.js +150 -0
- package/dist/server/assets/vendor-radix-ui-react-compose-refs-D3qsKVk1.js +39 -0
- package/dist/server/assets/vendor-radix-ui-react-context-BVoNDLue.js +78 -0
- package/dist/server/assets/vendor-radix-ui-react-dialog-DlxMaNYK.js +406 -0
- package/dist/server/assets/vendor-radix-ui-react-direction-Dt_WDL1t.js +9 -0
- package/dist/server/assets/vendor-radix-ui-react-dismissable-layer-CjsuPohV.js +210 -0
- package/dist/server/assets/vendor-radix-ui-react-dropdown-menu-DVxKumY8.js +263 -0
- package/dist/server/assets/vendor-radix-ui-react-focus-guards-D_6NoePE.js +29 -0
- package/dist/server/assets/vendor-radix-ui-react-focus-scope-DEIhTJJH.js +206 -0
- package/dist/server/assets/vendor-radix-ui-react-id-DFFpgh6m.js +14 -0
- package/dist/server/assets/vendor-radix-ui-react-menu-CiTMLwjT.js +893 -0
- package/dist/server/assets/vendor-radix-ui-react-popper-23Ye2Vyc.js +286 -0
- package/dist/server/assets/vendor-radix-ui-react-portal-CZCH5uPk.js +16 -0
- package/dist/server/assets/vendor-radix-ui-react-presence-CaAULlDU.js +128 -0
- package/dist/server/assets/vendor-radix-ui-react-primitive-BeOk3UYa.js +124 -0
- package/dist/server/assets/vendor-radix-ui-react-roving-focus-DES9GR8l.js +224 -0
- package/dist/server/assets/vendor-radix-ui-react-slot-DUhZbzoH.js +103 -0
- package/dist/server/assets/vendor-radix-ui-react-use-callback-ref-BynBgohw.js +11 -0
- package/dist/server/assets/vendor-radix-ui-react-use-controllable-state-C9KpT6DG.js +69 -0
- package/dist/server/assets/vendor-radix-ui-react-use-effect-event-gpNY2xjS.js +1 -0
- package/dist/server/assets/vendor-radix-ui-react-use-escape-keydown-CcYRQ2pp.js +17 -0
- package/dist/server/assets/vendor-radix-ui-react-use-is-hydrated-D_LcBPXY.js +15 -0
- package/dist/server/assets/vendor-radix-ui-react-use-layout-effect-1LNLXAjr.js +6 -0
- package/dist/server/assets/vendor-radix-ui-react-use-size-D6fiKJQo.js +39 -0
- package/dist/server/assets/vendor-react-DvBrY0qp.js +511 -0
- package/dist/server/assets/vendor-react-dom-yvMLPM0j.js +10484 -0
- package/dist/server/assets/vendor-react-remove-scroll-BNtiEvVN.js +328 -0
- package/dist/server/assets/vendor-react-remove-scroll-bar-hLqRASRk.js +82 -0
- package/dist/server/assets/vendor-react-style-singleton-BXjcXskB.js +69 -0
- package/dist/server/assets/vendor-rou3-3NaGPdI8.js +8 -0
- package/dist/server/assets/vendor-seroval-dJyC-Zhz.js +1775 -0
- package/dist/server/assets/vendor-seroval-plugins-Pq_U2meB.js +58 -0
- package/dist/server/assets/vendor-sonner-CqbjhsRh.js +1086 -0
- package/dist/server/assets/vendor-srvx-BA-baEX9.js +6 -0
- package/dist/server/assets/vendor-supabase-auth-js-D4xjVprw.js +7602 -0
- package/dist/server/assets/vendor-supabase-functions-js-sWy4UYn1.js +322 -0
- package/dist/server/assets/vendor-supabase-phoenix-Bw3Uh2Nn.js +1777 -0
- package/dist/server/assets/vendor-supabase-postgrest-js-AO-BXa7I.js +4938 -0
- package/dist/server/assets/vendor-supabase-realtime-js-BtdNgJbm.js +2111 -0
- package/dist/server/assets/vendor-supabase-storage-js-Dk_MrPYO.js +2679 -0
- package/dist/server/assets/vendor-supabase-supabase-js-D1EEtG3j.js +697 -0
- package/dist/server/assets/vendor-tailwind-merge-BHb_obmC.js +3255 -0
- package/dist/server/assets/vendor-tanstack-history-C4pKJmkt.js +204 -0
- package/dist/server/assets/vendor-tanstack-query-core-PwwTR5ld.js +2552 -0
- package/dist/server/assets/vendor-tanstack-react-query-hhHzXAK1.js +190 -0
- package/dist/server/assets/vendor-tanstack-react-router-XzqpA65A.js +1120 -0
- package/dist/server/assets/vendor-tanstack-react-start-RvWUpvat.js +37 -0
- package/dist/server/assets/vendor-tanstack-react-start-client-gpNY2xjS.js +1 -0
- package/dist/server/assets/vendor-tanstack-react-start-server-uj_Y9pEN.js +15 -0
- package/dist/server/assets/vendor-tanstack-react-store-gpNY2xjS.js +1 -0
- package/dist/server/assets/vendor-tanstack-router-core-6wywV3KN.js +4252 -0
- package/dist/server/assets/vendor-tanstack-start-client-core-DoOKV2pA.js +1741 -0
- package/dist/server/assets/vendor-tanstack-start-fn-stubs-l0sNRNKZ.js +1 -0
- package/dist/server/assets/vendor-tanstack-start-server-core-CsAstXv7.js +1421 -0
- package/dist/server/assets/vendor-tanstack-start-storage-context-DgH9hIJT.js +17 -0
- package/dist/server/assets/vendor-tanstack-store-l0sNRNKZ.js +1 -0
- package/dist/server/assets/vendor-tslib-_8ICaZ64.js +67 -0
- package/dist/server/assets/vendor-unenv-DUvF4YIF.js +544 -0
- package/dist/server/assets/vendor-use-callback-ref-DMFDRvmi.js +66 -0
- package/dist/server/assets/vendor-use-sidecar-DG1tHua4.js +106 -0
- package/dist/server/assets/vendor-use-sync-external-store-rZ8vi0It.js +64 -0
- package/dist/server/assets/vendor-vercel-analytics-oP8BDp0L.js +168 -0
- package/dist/server/assets/vendor-zod-BRyQdbC-.js +3580 -0
- package/dist/server/index.js +158 -0
- package/dist/server/wrangler.json +1 -0
- package/enable-powershell.ps1 +7 -0
- package/eslint.config.js +41 -0
- package/lint.bat +4 -0
- package/package.json +95 -0
- package/public/robots.txt +2 -0
- package/run-npm-build.cjs +20 -0
- package/run-npm-build.js +20 -0
- package/src/assets/hero-bg.jpg +0 -0
- package/src/assets/logo.png +0 -0
- package/src/components/scrollsy/Footer.tsx +68 -0
- package/src/components/scrollsy/LiveTicker.tsx +31 -0
- package/src/components/scrollsy/Logo.tsx +28 -0
- package/src/components/scrollsy/Nav.tsx +255 -0
- package/src/components/scrollsy/ProductCard.tsx +190 -0
- package/src/components/scrollsy/ProductFilters.tsx +226 -0
- package/src/components/scrollsy/SupportWidget.tsx +197 -0
- package/src/components/ui/accordion.tsx +51 -0
- package/src/components/ui/alert-dialog.tsx +115 -0
- package/src/components/ui/alert.tsx +49 -0
- package/src/components/ui/aspect-ratio.tsx +5 -0
- package/src/components/ui/avatar.tsx +47 -0
- package/src/components/ui/badge.tsx +32 -0
- package/src/components/ui/breadcrumb.tsx +101 -0
- package/src/components/ui/button.tsx +49 -0
- package/src/components/ui/calendar.tsx +177 -0
- package/src/components/ui/card.tsx +55 -0
- package/src/components/ui/carousel.tsx +240 -0
- package/src/components/ui/chart.tsx +331 -0
- package/src/components/ui/checkbox.tsx +26 -0
- package/src/components/ui/collapsible.tsx +11 -0
- package/src/components/ui/command.tsx +143 -0
- package/src/components/ui/context-menu.tsx +187 -0
- package/src/components/ui/dialog.tsx +104 -0
- package/src/components/ui/drawer.tsx +98 -0
- package/src/components/ui/dropdown-menu.tsx +188 -0
- package/src/components/ui/form.tsx +171 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/input-otp.tsx +69 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +21 -0
- package/src/components/ui/menubar.tsx +229 -0
- package/src/components/ui/navigation-menu.tsx +120 -0
- package/src/components/ui/pagination.tsx +98 -0
- package/src/components/ui/popover.tsx +31 -0
- package/src/components/ui/progress.tsx +25 -0
- package/src/components/ui/radio-group.tsx +36 -0
- package/src/components/ui/resizable.tsx +37 -0
- package/src/components/ui/scroll-area.tsx +44 -0
- package/src/components/ui/select.tsx +152 -0
- package/src/components/ui/separator.tsx +24 -0
- package/src/components/ui/sheet.tsx +122 -0
- package/src/components/ui/sidebar.tsx +744 -0
- package/src/components/ui/skeleton.tsx +7 -0
- package/src/components/ui/slider.tsx +23 -0
- package/src/components/ui/sonner.tsx +23 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +94 -0
- package/src/components/ui/tabs.tsx +53 -0
- package/src/components/ui/textarea.tsx +21 -0
- package/src/components/ui/toggle-group.tsx +57 -0
- package/src/components/ui/toggle.tsx +42 -0
- package/src/components/ui/tooltip.tsx +32 -0
- package/src/hooks/use-auth.ts +26 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/integrations/lovable/index.ts +41 -0
- package/src/lib/admin.functions.ts +564 -0
- package/src/lib/error-capture.ts +27 -0
- package/src/lib/error-page.ts +30 -0
- package/src/lib/product-links.ts +39 -0
- package/src/lib/products.functions.ts +101 -0
- package/src/lib/utils.ts +6 -0
- package/src/routeTree.gen.ts +480 -0
- package/src/router.tsx +16 -0
- package/src/routes/__root.tsx +177 -0
- package/src/routes/about.tsx +66 -0
- package/src/routes/admin.login.tsx +95 -0
- package/src/routes/admin.tsx +811 -0
- package/src/routes/affiliate-disclosure.tsx +35 -0
- package/src/routes/categories.tsx +57 -0
- package/src/routes/category.$slug.tsx +51 -0
- package/src/routes/contact.tsx +69 -0
- package/src/routes/faq.tsx +63 -0
- package/src/routes/index.tsx +269 -0
- package/src/routes/login.tsx +160 -0
- package/src/routes/privacy.tsx +39 -0
- package/src/routes/product.$id.tsx +212 -0
- package/src/routes/profile.tsx +393 -0
- package/src/routes/reset-password.tsx +71 -0
- package/src/routes/saved.tsx +83 -0
- package/src/routes/search.tsx +136 -0
- package/src/routes/signup.tsx +108 -0
- package/src/routes/sitemap[.]xml.ts +34 -0
- package/src/routes/terms.tsx +40 -0
- package/src/routes/update-password.tsx +91 -0
- package/src/server.ts +80 -0
- package/src/start.ts +24 -0
- package/src/styles.css +333 -0
- package/terminal-test-output.txt +1 -0
- package/tsconfig.json +27 -0
- package/vercel.json +26 -0
- package/vite.config.ts +38 -0
- package/wrangler.jsonc +7 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
import { c as composeEventHandlers } from "./vendor-radix-ui-primitive-B-mNdDrH.js";
|
|
3
|
+
import { c as createCollection } from "./vendor-radix-ui-react-collection-BZ2srfgU.js";
|
|
4
|
+
import { u as useComposedRefs } from "./vendor-radix-ui-react-compose-refs-D3qsKVk1.js";
|
|
5
|
+
import { a as createContextScope } from "./vendor-radix-ui-react-context-BVoNDLue.js";
|
|
6
|
+
import { u as useId } from "./vendor-radix-ui-react-id-DFFpgh6m.js";
|
|
7
|
+
import { P as Primitive } from "./vendor-radix-ui-react-primitive-BeOk3UYa.js";
|
|
8
|
+
import { u as useCallbackRef } from "./vendor-radix-ui-react-use-callback-ref-BynBgohw.js";
|
|
9
|
+
import { u as useControllableState } from "./vendor-radix-ui-react-use-controllable-state-C9KpT6DG.js";
|
|
10
|
+
import { u as useDirection } from "./vendor-radix-ui-react-direction-Dt_WDL1t.js";
|
|
11
|
+
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
12
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
13
|
+
var GROUP_NAME = "RovingFocusGroup";
|
|
14
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
15
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
16
|
+
GROUP_NAME,
|
|
17
|
+
[createCollectionScope]
|
|
18
|
+
);
|
|
19
|
+
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
20
|
+
var RovingFocusGroup = reactExports.forwardRef(
|
|
21
|
+
(props, forwardedRef) => {
|
|
22
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntimeExports.jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
RovingFocusGroup.displayName = GROUP_NAME;
|
|
26
|
+
var RovingFocusGroupImpl = reactExports.forwardRef((props, forwardedRef) => {
|
|
27
|
+
const {
|
|
28
|
+
__scopeRovingFocusGroup,
|
|
29
|
+
orientation,
|
|
30
|
+
loop = false,
|
|
31
|
+
dir,
|
|
32
|
+
currentTabStopId: currentTabStopIdProp,
|
|
33
|
+
defaultCurrentTabStopId,
|
|
34
|
+
onCurrentTabStopIdChange,
|
|
35
|
+
onEntryFocus,
|
|
36
|
+
preventScrollOnEntryFocus = false,
|
|
37
|
+
...groupProps
|
|
38
|
+
} = props;
|
|
39
|
+
const ref = reactExports.useRef(null);
|
|
40
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
41
|
+
const direction = useDirection(dir);
|
|
42
|
+
const [currentTabStopId, setCurrentTabStopId] = useControllableState({
|
|
43
|
+
prop: currentTabStopIdProp,
|
|
44
|
+
defaultProp: defaultCurrentTabStopId ?? null,
|
|
45
|
+
onChange: onCurrentTabStopIdChange,
|
|
46
|
+
caller: GROUP_NAME
|
|
47
|
+
});
|
|
48
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = reactExports.useState(false);
|
|
49
|
+
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
50
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
51
|
+
const isClickFocusRef = reactExports.useRef(false);
|
|
52
|
+
const [focusableItemsCount, setFocusableItemsCount] = reactExports.useState(0);
|
|
53
|
+
reactExports.useEffect(() => {
|
|
54
|
+
const node = ref.current;
|
|
55
|
+
if (node) {
|
|
56
|
+
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
57
|
+
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
58
|
+
}
|
|
59
|
+
}, [handleEntryFocus]);
|
|
60
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
61
|
+
RovingFocusProvider,
|
|
62
|
+
{
|
|
63
|
+
scope: __scopeRovingFocusGroup,
|
|
64
|
+
orientation,
|
|
65
|
+
dir: direction,
|
|
66
|
+
loop,
|
|
67
|
+
currentTabStopId,
|
|
68
|
+
onItemFocus: reactExports.useCallback(
|
|
69
|
+
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
70
|
+
[setCurrentTabStopId]
|
|
71
|
+
),
|
|
72
|
+
onItemShiftTab: reactExports.useCallback(() => setIsTabbingBackOut(true), []),
|
|
73
|
+
onFocusableItemAdd: reactExports.useCallback(
|
|
74
|
+
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
75
|
+
[]
|
|
76
|
+
),
|
|
77
|
+
onFocusableItemRemove: reactExports.useCallback(
|
|
78
|
+
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
79
|
+
[]
|
|
80
|
+
),
|
|
81
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82
|
+
Primitive.div,
|
|
83
|
+
{
|
|
84
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
85
|
+
"data-orientation": orientation,
|
|
86
|
+
...groupProps,
|
|
87
|
+
ref: composedRefs,
|
|
88
|
+
style: { outline: "none", ...props.style },
|
|
89
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
90
|
+
isClickFocusRef.current = true;
|
|
91
|
+
}),
|
|
92
|
+
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
93
|
+
const isKeyboardFocus = !isClickFocusRef.current;
|
|
94
|
+
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
95
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
96
|
+
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
97
|
+
if (!entryFocusEvent.defaultPrevented) {
|
|
98
|
+
const items = getItems().filter((item) => item.focusable);
|
|
99
|
+
const activeItem = items.find((item) => item.active);
|
|
100
|
+
const currentItem = items.find((item) => item.id === currentTabStopId);
|
|
101
|
+
const candidateItems = [activeItem, currentItem, ...items].filter(
|
|
102
|
+
Boolean
|
|
103
|
+
);
|
|
104
|
+
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
105
|
+
focusFirst(candidateNodes, preventScrollOnEntryFocus);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
isClickFocusRef.current = false;
|
|
109
|
+
}),
|
|
110
|
+
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
var ITEM_NAME = "RovingFocusGroupItem";
|
|
117
|
+
var RovingFocusGroupItem = reactExports.forwardRef(
|
|
118
|
+
(props, forwardedRef) => {
|
|
119
|
+
const {
|
|
120
|
+
__scopeRovingFocusGroup,
|
|
121
|
+
focusable = true,
|
|
122
|
+
active = false,
|
|
123
|
+
tabStopId,
|
|
124
|
+
children,
|
|
125
|
+
...itemProps
|
|
126
|
+
} = props;
|
|
127
|
+
const autoId = useId();
|
|
128
|
+
const id = tabStopId || autoId;
|
|
129
|
+
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
|
|
130
|
+
const isCurrentTabStop = context.currentTabStopId === id;
|
|
131
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
132
|
+
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
133
|
+
reactExports.useEffect(() => {
|
|
134
|
+
if (focusable) {
|
|
135
|
+
onFocusableItemAdd();
|
|
136
|
+
return () => onFocusableItemRemove();
|
|
137
|
+
}
|
|
138
|
+
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
139
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
140
|
+
Collection.ItemSlot,
|
|
141
|
+
{
|
|
142
|
+
scope: __scopeRovingFocusGroup,
|
|
143
|
+
id,
|
|
144
|
+
focusable,
|
|
145
|
+
active,
|
|
146
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147
|
+
Primitive.span,
|
|
148
|
+
{
|
|
149
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
150
|
+
"data-orientation": context.orientation,
|
|
151
|
+
...itemProps,
|
|
152
|
+
ref: forwardedRef,
|
|
153
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
154
|
+
if (!focusable) event.preventDefault();
|
|
155
|
+
else context.onItemFocus(id);
|
|
156
|
+
}),
|
|
157
|
+
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
158
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
159
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
160
|
+
context.onItemShiftTab();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (event.target !== event.currentTarget) return;
|
|
164
|
+
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
165
|
+
if (focusIntent !== void 0) {
|
|
166
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
167
|
+
event.preventDefault();
|
|
168
|
+
const items = getItems().filter((item) => item.focusable);
|
|
169
|
+
let candidateNodes = items.map((item) => item.ref.current);
|
|
170
|
+
if (focusIntent === "last") candidateNodes.reverse();
|
|
171
|
+
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
172
|
+
if (focusIntent === "prev") candidateNodes.reverse();
|
|
173
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
174
|
+
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
175
|
+
}
|
|
176
|
+
setTimeout(() => focusFirst(candidateNodes));
|
|
177
|
+
}
|
|
178
|
+
}),
|
|
179
|
+
children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
187
|
+
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
188
|
+
ArrowLeft: "prev",
|
|
189
|
+
ArrowUp: "prev",
|
|
190
|
+
ArrowRight: "next",
|
|
191
|
+
ArrowDown: "next",
|
|
192
|
+
PageUp: "first",
|
|
193
|
+
Home: "first",
|
|
194
|
+
PageDown: "last",
|
|
195
|
+
End: "last"
|
|
196
|
+
};
|
|
197
|
+
function getDirectionAwareKey(key, dir) {
|
|
198
|
+
if (dir !== "rtl") return key;
|
|
199
|
+
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
200
|
+
}
|
|
201
|
+
function getFocusIntent(event, orientation, dir) {
|
|
202
|
+
const key = getDirectionAwareKey(event.key, dir);
|
|
203
|
+
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
204
|
+
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
205
|
+
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
206
|
+
}
|
|
207
|
+
function focusFirst(candidates, preventScroll = false) {
|
|
208
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
209
|
+
for (const candidate of candidates) {
|
|
210
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
211
|
+
candidate.focus({ preventScroll });
|
|
212
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function wrapArray(array, startIndex) {
|
|
216
|
+
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
217
|
+
}
|
|
218
|
+
var Root = RovingFocusGroup;
|
|
219
|
+
var Item = RovingFocusGroupItem;
|
|
220
|
+
export {
|
|
221
|
+
Item as I,
|
|
222
|
+
Root as R,
|
|
223
|
+
createRovingFocusGroupScope as c
|
|
224
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports, a as React } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
import { c as composeRefs } from "./vendor-radix-ui-react-compose-refs-D3qsKVk1.js";
|
|
3
|
+
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
4
|
+
var use = React[" use ".trim().toString()];
|
|
5
|
+
function isPromiseLike(value) {
|
|
6
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
7
|
+
}
|
|
8
|
+
function isLazyComponent(element) {
|
|
9
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
10
|
+
}
|
|
11
|
+
// @__NO_SIDE_EFFECTS__
|
|
12
|
+
function createSlot(ownerName) {
|
|
13
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
14
|
+
const Slot2 = reactExports.forwardRef((props, forwardedRef) => {
|
|
15
|
+
let { children, ...slotProps } = props;
|
|
16
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
17
|
+
children = use(children._payload);
|
|
18
|
+
}
|
|
19
|
+
const childrenArray = reactExports.Children.toArray(children);
|
|
20
|
+
const slottable = childrenArray.find(isSlottable);
|
|
21
|
+
if (slottable) {
|
|
22
|
+
const newElement = slottable.props.children;
|
|
23
|
+
const newChildren = childrenArray.map((child) => {
|
|
24
|
+
if (child === slottable) {
|
|
25
|
+
if (reactExports.Children.count(newElement) > 1) return reactExports.Children.only(null);
|
|
26
|
+
return reactExports.isValidElement(newElement) ? newElement.props.children : null;
|
|
27
|
+
} else {
|
|
28
|
+
return child;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: reactExports.isValidElement(newElement) ? reactExports.cloneElement(newElement, void 0, newChildren) : null });
|
|
32
|
+
}
|
|
33
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
34
|
+
});
|
|
35
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
36
|
+
return Slot2;
|
|
37
|
+
}
|
|
38
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
39
|
+
// @__NO_SIDE_EFFECTS__
|
|
40
|
+
function createSlotClone(ownerName) {
|
|
41
|
+
const SlotClone = reactExports.forwardRef((props, forwardedRef) => {
|
|
42
|
+
let { children, ...slotProps } = props;
|
|
43
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
44
|
+
children = use(children._payload);
|
|
45
|
+
}
|
|
46
|
+
if (reactExports.isValidElement(children)) {
|
|
47
|
+
const childrenRef = getElementRef(children);
|
|
48
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
49
|
+
if (children.type !== reactExports.Fragment) {
|
|
50
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
51
|
+
}
|
|
52
|
+
return reactExports.cloneElement(children, props2);
|
|
53
|
+
}
|
|
54
|
+
return reactExports.Children.count(children) > 1 ? reactExports.Children.only(null) : null;
|
|
55
|
+
});
|
|
56
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
57
|
+
return SlotClone;
|
|
58
|
+
}
|
|
59
|
+
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
60
|
+
function isSlottable(child) {
|
|
61
|
+
return reactExports.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
62
|
+
}
|
|
63
|
+
function mergeProps(slotProps, childProps) {
|
|
64
|
+
const overrideProps = { ...childProps };
|
|
65
|
+
for (const propName in childProps) {
|
|
66
|
+
const slotPropValue = slotProps[propName];
|
|
67
|
+
const childPropValue = childProps[propName];
|
|
68
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
69
|
+
if (isHandler) {
|
|
70
|
+
if (slotPropValue && childPropValue) {
|
|
71
|
+
overrideProps[propName] = (...args) => {
|
|
72
|
+
const result = childPropValue(...args);
|
|
73
|
+
slotPropValue(...args);
|
|
74
|
+
return result;
|
|
75
|
+
};
|
|
76
|
+
} else if (slotPropValue) {
|
|
77
|
+
overrideProps[propName] = slotPropValue;
|
|
78
|
+
}
|
|
79
|
+
} else if (propName === "style") {
|
|
80
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
81
|
+
} else if (propName === "className") {
|
|
82
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return { ...slotProps, ...overrideProps };
|
|
86
|
+
}
|
|
87
|
+
function getElementRef(element) {
|
|
88
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
89
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
90
|
+
if (mayWarn) {
|
|
91
|
+
return element.ref;
|
|
92
|
+
}
|
|
93
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
94
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
95
|
+
if (mayWarn) {
|
|
96
|
+
return element.props.ref;
|
|
97
|
+
}
|
|
98
|
+
return element.props.ref || element.ref;
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
Slot as S,
|
|
102
|
+
createSlot as c
|
|
103
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { r as reactExports } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
function useCallbackRef(callback) {
|
|
3
|
+
const callbackRef = reactExports.useRef(callback);
|
|
4
|
+
reactExports.useEffect(() => {
|
|
5
|
+
callbackRef.current = callback;
|
|
6
|
+
});
|
|
7
|
+
return reactExports.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
useCallbackRef as u
|
|
11
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { r as reactExports, a as React } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
import { u as useLayoutEffect2 } from "./vendor-radix-ui-react-use-layout-effect-1LNLXAjr.js";
|
|
3
|
+
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
4
|
+
function useControllableState({
|
|
5
|
+
prop,
|
|
6
|
+
defaultProp,
|
|
7
|
+
onChange = () => {
|
|
8
|
+
},
|
|
9
|
+
caller
|
|
10
|
+
}) {
|
|
11
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
12
|
+
defaultProp,
|
|
13
|
+
onChange
|
|
14
|
+
});
|
|
15
|
+
const isControlled = prop !== void 0;
|
|
16
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
17
|
+
{
|
|
18
|
+
const isControlledRef = reactExports.useRef(prop !== void 0);
|
|
19
|
+
reactExports.useEffect(() => {
|
|
20
|
+
const wasControlled = isControlledRef.current;
|
|
21
|
+
if (wasControlled !== isControlled) {
|
|
22
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
23
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
24
|
+
console.warn(
|
|
25
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
isControlledRef.current = isControlled;
|
|
29
|
+
}, [isControlled, caller]);
|
|
30
|
+
}
|
|
31
|
+
const setValue = reactExports.useCallback(
|
|
32
|
+
(nextValue) => {
|
|
33
|
+
if (isControlled) {
|
|
34
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
35
|
+
if (value2 !== prop) {
|
|
36
|
+
onChangeRef.current?.(value2);
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
setUncontrolledProp(nextValue);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
43
|
+
);
|
|
44
|
+
return [value, setValue];
|
|
45
|
+
}
|
|
46
|
+
function useUncontrolledState({
|
|
47
|
+
defaultProp,
|
|
48
|
+
onChange
|
|
49
|
+
}) {
|
|
50
|
+
const [value, setValue] = reactExports.useState(defaultProp);
|
|
51
|
+
const prevValueRef = reactExports.useRef(value);
|
|
52
|
+
const onChangeRef = reactExports.useRef(onChange);
|
|
53
|
+
useInsertionEffect(() => {
|
|
54
|
+
onChangeRef.current = onChange;
|
|
55
|
+
}, [onChange]);
|
|
56
|
+
reactExports.useEffect(() => {
|
|
57
|
+
if (prevValueRef.current !== value) {
|
|
58
|
+
onChangeRef.current?.(value);
|
|
59
|
+
prevValueRef.current = value;
|
|
60
|
+
}
|
|
61
|
+
}, [value, prevValueRef]);
|
|
62
|
+
return [value, setValue, onChangeRef];
|
|
63
|
+
}
|
|
64
|
+
function isFunction(value) {
|
|
65
|
+
return typeof value === "function";
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
useControllableState as u
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./vendor-react-DvBrY0qp.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { r as reactExports } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
import { u as useCallbackRef } from "./vendor-radix-ui-react-use-callback-ref-BynBgohw.js";
|
|
3
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
4
|
+
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
5
|
+
reactExports.useEffect(() => {
|
|
6
|
+
const handleKeyDown = (event) => {
|
|
7
|
+
if (event.key === "Escape") {
|
|
8
|
+
onEscapeKeyDown(event);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
12
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
13
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
useEscapeKeydown as u
|
|
17
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { s as shimExports } from "./vendor-use-sync-external-store-rZ8vi0It.js";
|
|
2
|
+
function useIsHydrated() {
|
|
3
|
+
return shimExports.useSyncExternalStore(
|
|
4
|
+
subscribe,
|
|
5
|
+
() => true,
|
|
6
|
+
() => false
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
function subscribe() {
|
|
10
|
+
return () => {
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
useIsHydrated as u
|
|
15
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { r as reactExports } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
import { u as useLayoutEffect2 } from "./vendor-radix-ui-react-use-layout-effect-1LNLXAjr.js";
|
|
3
|
+
function useSize(element) {
|
|
4
|
+
const [size, setSize] = reactExports.useState(void 0);
|
|
5
|
+
useLayoutEffect2(() => {
|
|
6
|
+
if (element) {
|
|
7
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
8
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
9
|
+
if (!Array.isArray(entries)) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (!entries.length) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const entry = entries[0];
|
|
16
|
+
let width;
|
|
17
|
+
let height;
|
|
18
|
+
if ("borderBoxSize" in entry) {
|
|
19
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
20
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
21
|
+
width = borderSize["inlineSize"];
|
|
22
|
+
height = borderSize["blockSize"];
|
|
23
|
+
} else {
|
|
24
|
+
width = element.offsetWidth;
|
|
25
|
+
height = element.offsetHeight;
|
|
26
|
+
}
|
|
27
|
+
setSize({ width, height });
|
|
28
|
+
});
|
|
29
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
30
|
+
return () => resizeObserver.unobserve(element);
|
|
31
|
+
} else {
|
|
32
|
+
setSize(void 0);
|
|
33
|
+
}
|
|
34
|
+
}, [element]);
|
|
35
|
+
return size;
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
useSize as u
|
|
39
|
+
};
|