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,209 @@
|
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
import { u as useCallbackRef } from "./vendor-radix-ui-react-use-callback-ref-BynBgohw.js";
|
|
3
|
+
import { u as useLayoutEffect2 } from "./vendor-radix-ui-react-use-layout-effect-1LNLXAjr.js";
|
|
4
|
+
import "./vendor-react-dom-yvMLPM0j.js";
|
|
5
|
+
import { c as createSlot } from "./vendor-radix-ui-react-slot-DUhZbzoH.js";
|
|
6
|
+
import { u as useIsHydrated } from "./vendor-radix-ui-react-use-is-hydrated-D_LcBPXY.js";
|
|
7
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
8
|
+
let defaultContexts = [];
|
|
9
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
10
|
+
const BaseContext = reactExports.createContext(defaultContext);
|
|
11
|
+
BaseContext.displayName = rootComponentName + "Context";
|
|
12
|
+
const index = defaultContexts.length;
|
|
13
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
14
|
+
const Provider = (props) => {
|
|
15
|
+
const { scope, children, ...context } = props;
|
|
16
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
17
|
+
const value = reactExports.useMemo(() => context, Object.values(context));
|
|
18
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
|
|
19
|
+
};
|
|
20
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
21
|
+
function useContext2(consumerName, scope) {
|
|
22
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
23
|
+
const context = reactExports.useContext(Context);
|
|
24
|
+
if (context) return context;
|
|
25
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
26
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
27
|
+
}
|
|
28
|
+
return [Provider, useContext2];
|
|
29
|
+
}
|
|
30
|
+
const createScope = () => {
|
|
31
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
32
|
+
return reactExports.createContext(defaultContext);
|
|
33
|
+
});
|
|
34
|
+
return function useScope(scope) {
|
|
35
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
36
|
+
return reactExports.useMemo(
|
|
37
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
38
|
+
[scope, contexts]
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
createScope.scopeName = scopeName;
|
|
43
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
44
|
+
}
|
|
45
|
+
function composeContextScopes(...scopes) {
|
|
46
|
+
const baseScope = scopes[0];
|
|
47
|
+
if (scopes.length === 1) return baseScope;
|
|
48
|
+
const createScope = () => {
|
|
49
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
50
|
+
useScope: createScope2(),
|
|
51
|
+
scopeName: createScope2.scopeName
|
|
52
|
+
}));
|
|
53
|
+
return function useComposedScopes(overrideScopes) {
|
|
54
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
55
|
+
const scopeProps = useScope(overrideScopes);
|
|
56
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
57
|
+
return { ...nextScopes2, ...currentScope };
|
|
58
|
+
}, {});
|
|
59
|
+
return reactExports.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
createScope.scopeName = baseScope.scopeName;
|
|
63
|
+
return createScope;
|
|
64
|
+
}
|
|
65
|
+
var NODES = [
|
|
66
|
+
"a",
|
|
67
|
+
"button",
|
|
68
|
+
"div",
|
|
69
|
+
"form",
|
|
70
|
+
"h2",
|
|
71
|
+
"h3",
|
|
72
|
+
"img",
|
|
73
|
+
"input",
|
|
74
|
+
"label",
|
|
75
|
+
"li",
|
|
76
|
+
"nav",
|
|
77
|
+
"ol",
|
|
78
|
+
"p",
|
|
79
|
+
"select",
|
|
80
|
+
"span",
|
|
81
|
+
"svg",
|
|
82
|
+
"ul"
|
|
83
|
+
];
|
|
84
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
85
|
+
const Slot = createSlot(`Primitive.${node}`);
|
|
86
|
+
const Node = reactExports.forwardRef((props, forwardedRef) => {
|
|
87
|
+
const { asChild, ...primitiveProps } = props;
|
|
88
|
+
const Comp = asChild ? Slot : node;
|
|
89
|
+
if (typeof window !== "undefined") {
|
|
90
|
+
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
91
|
+
}
|
|
92
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
93
|
+
});
|
|
94
|
+
Node.displayName = `Primitive.${node}`;
|
|
95
|
+
return { ...primitive, [node]: Node };
|
|
96
|
+
}, {});
|
|
97
|
+
var AVATAR_NAME = "Avatar";
|
|
98
|
+
var [createAvatarContext] = createContextScope(AVATAR_NAME);
|
|
99
|
+
var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
|
|
100
|
+
var Avatar = reactExports.forwardRef(
|
|
101
|
+
(props, forwardedRef) => {
|
|
102
|
+
const { __scopeAvatar, ...avatarProps } = props;
|
|
103
|
+
const [imageLoadingStatus, setImageLoadingStatus] = reactExports.useState("idle");
|
|
104
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
105
|
+
AvatarProvider,
|
|
106
|
+
{
|
|
107
|
+
scope: __scopeAvatar,
|
|
108
|
+
imageLoadingStatus,
|
|
109
|
+
onImageLoadingStatusChange: setImageLoadingStatus,
|
|
110
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
Avatar.displayName = AVATAR_NAME;
|
|
116
|
+
var IMAGE_NAME = "AvatarImage";
|
|
117
|
+
var AvatarImage = reactExports.forwardRef(
|
|
118
|
+
(props, forwardedRef) => {
|
|
119
|
+
const { __scopeAvatar, src, onLoadingStatusChange = () => {
|
|
120
|
+
}, ...imageProps } = props;
|
|
121
|
+
const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
|
|
122
|
+
const imageLoadingStatus = useImageLoadingStatus(src, imageProps);
|
|
123
|
+
const handleLoadingStatusChange = useCallbackRef((status) => {
|
|
124
|
+
onLoadingStatusChange(status);
|
|
125
|
+
context.onImageLoadingStatusChange(status);
|
|
126
|
+
});
|
|
127
|
+
useLayoutEffect2(() => {
|
|
128
|
+
if (imageLoadingStatus !== "idle") {
|
|
129
|
+
handleLoadingStatusChange(imageLoadingStatus);
|
|
130
|
+
}
|
|
131
|
+
}, [imageLoadingStatus, handleLoadingStatusChange]);
|
|
132
|
+
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
AvatarImage.displayName = IMAGE_NAME;
|
|
136
|
+
var FALLBACK_NAME = "AvatarFallback";
|
|
137
|
+
var AvatarFallback = reactExports.forwardRef(
|
|
138
|
+
(props, forwardedRef) => {
|
|
139
|
+
const { __scopeAvatar, delayMs, ...fallbackProps } = props;
|
|
140
|
+
const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);
|
|
141
|
+
const [canRender, setCanRender] = reactExports.useState(delayMs === void 0);
|
|
142
|
+
reactExports.useEffect(() => {
|
|
143
|
+
if (delayMs !== void 0) {
|
|
144
|
+
const timerId = window.setTimeout(() => setCanRender(true), delayMs);
|
|
145
|
+
return () => window.clearTimeout(timerId);
|
|
146
|
+
}
|
|
147
|
+
}, [delayMs]);
|
|
148
|
+
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
AvatarFallback.displayName = FALLBACK_NAME;
|
|
152
|
+
function resolveLoadingStatus(image, src) {
|
|
153
|
+
if (!image) {
|
|
154
|
+
return "idle";
|
|
155
|
+
}
|
|
156
|
+
if (!src) {
|
|
157
|
+
return "error";
|
|
158
|
+
}
|
|
159
|
+
if (image.src !== src) {
|
|
160
|
+
image.src = src;
|
|
161
|
+
}
|
|
162
|
+
return image.complete && image.naturalWidth > 0 ? "loaded" : "loading";
|
|
163
|
+
}
|
|
164
|
+
function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {
|
|
165
|
+
const isHydrated = useIsHydrated();
|
|
166
|
+
const imageRef = reactExports.useRef(null);
|
|
167
|
+
const image = (() => {
|
|
168
|
+
if (!isHydrated) return null;
|
|
169
|
+
if (!imageRef.current) {
|
|
170
|
+
imageRef.current = new window.Image();
|
|
171
|
+
}
|
|
172
|
+
return imageRef.current;
|
|
173
|
+
})();
|
|
174
|
+
const [loadingStatus, setLoadingStatus] = reactExports.useState(
|
|
175
|
+
() => resolveLoadingStatus(image, src)
|
|
176
|
+
);
|
|
177
|
+
useLayoutEffect2(() => {
|
|
178
|
+
setLoadingStatus(resolveLoadingStatus(image, src));
|
|
179
|
+
}, [image, src]);
|
|
180
|
+
useLayoutEffect2(() => {
|
|
181
|
+
const updateStatus = (status) => () => {
|
|
182
|
+
setLoadingStatus(status);
|
|
183
|
+
};
|
|
184
|
+
if (!image) return;
|
|
185
|
+
const handleLoad = updateStatus("loaded");
|
|
186
|
+
const handleError = updateStatus("error");
|
|
187
|
+
image.addEventListener("load", handleLoad);
|
|
188
|
+
image.addEventListener("error", handleError);
|
|
189
|
+
if (referrerPolicy) {
|
|
190
|
+
image.referrerPolicy = referrerPolicy;
|
|
191
|
+
}
|
|
192
|
+
if (typeof crossOrigin === "string") {
|
|
193
|
+
image.crossOrigin = crossOrigin;
|
|
194
|
+
}
|
|
195
|
+
return () => {
|
|
196
|
+
image.removeEventListener("load", handleLoad);
|
|
197
|
+
image.removeEventListener("error", handleError);
|
|
198
|
+
};
|
|
199
|
+
}, [image, crossOrigin, referrerPolicy]);
|
|
200
|
+
return loadingStatus;
|
|
201
|
+
}
|
|
202
|
+
var Root = Avatar;
|
|
203
|
+
var Image = AvatarImage;
|
|
204
|
+
var Fallback = AvatarFallback;
|
|
205
|
+
export {
|
|
206
|
+
Fallback as F,
|
|
207
|
+
Image as I,
|
|
208
|
+
Root as R
|
|
209
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
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 { a as createContextScope } from "./vendor-radix-ui-react-context-BVoNDLue.js";
|
|
4
|
+
import { u as useControllableState } from "./vendor-radix-ui-react-use-controllable-state-C9KpT6DG.js";
|
|
5
|
+
import { u as useLayoutEffect2 } from "./vendor-radix-ui-react-use-layout-effect-1LNLXAjr.js";
|
|
6
|
+
import { u as useComposedRefs } from "./vendor-radix-ui-react-compose-refs-D3qsKVk1.js";
|
|
7
|
+
import { P as Primitive } from "./vendor-radix-ui-react-primitive-BeOk3UYa.js";
|
|
8
|
+
import { P as Presence } from "./vendor-radix-ui-react-presence-CaAULlDU.js";
|
|
9
|
+
import { u as useId } from "./vendor-radix-ui-react-id-DFFpgh6m.js";
|
|
10
|
+
var COLLAPSIBLE_NAME = "Collapsible";
|
|
11
|
+
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
12
|
+
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
13
|
+
var Collapsible = reactExports.forwardRef(
|
|
14
|
+
(props, forwardedRef) => {
|
|
15
|
+
const {
|
|
16
|
+
__scopeCollapsible,
|
|
17
|
+
open: openProp,
|
|
18
|
+
defaultOpen,
|
|
19
|
+
disabled,
|
|
20
|
+
onOpenChange,
|
|
21
|
+
...collapsibleProps
|
|
22
|
+
} = props;
|
|
23
|
+
const [open, setOpen] = useControllableState({
|
|
24
|
+
prop: openProp,
|
|
25
|
+
defaultProp: defaultOpen ?? false,
|
|
26
|
+
onChange: onOpenChange,
|
|
27
|
+
caller: COLLAPSIBLE_NAME
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30
|
+
CollapsibleProvider,
|
|
31
|
+
{
|
|
32
|
+
scope: __scopeCollapsible,
|
|
33
|
+
disabled,
|
|
34
|
+
contentId: useId(),
|
|
35
|
+
open,
|
|
36
|
+
onOpenToggle: reactExports.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
37
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38
|
+
Primitive.div,
|
|
39
|
+
{
|
|
40
|
+
"data-state": getState(open),
|
|
41
|
+
"data-disabled": disabled ? "" : void 0,
|
|
42
|
+
...collapsibleProps,
|
|
43
|
+
ref: forwardedRef
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
51
|
+
var TRIGGER_NAME = "CollapsibleTrigger";
|
|
52
|
+
var CollapsibleTrigger = reactExports.forwardRef(
|
|
53
|
+
(props, forwardedRef) => {
|
|
54
|
+
const { __scopeCollapsible, ...triggerProps } = props;
|
|
55
|
+
const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);
|
|
56
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
57
|
+
Primitive.button,
|
|
58
|
+
{
|
|
59
|
+
type: "button",
|
|
60
|
+
"aria-controls": context.contentId,
|
|
61
|
+
"aria-expanded": context.open || false,
|
|
62
|
+
"data-state": getState(context.open),
|
|
63
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
64
|
+
disabled: context.disabled,
|
|
65
|
+
...triggerProps,
|
|
66
|
+
ref: forwardedRef,
|
|
67
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
CollapsibleTrigger.displayName = TRIGGER_NAME;
|
|
73
|
+
var CONTENT_NAME = "CollapsibleContent";
|
|
74
|
+
var CollapsibleContent = reactExports.forwardRef(
|
|
75
|
+
(props, forwardedRef) => {
|
|
76
|
+
const { forceMount, ...contentProps } = props;
|
|
77
|
+
const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);
|
|
78
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
CollapsibleContent.displayName = CONTENT_NAME;
|
|
82
|
+
var CollapsibleContentImpl = reactExports.forwardRef((props, forwardedRef) => {
|
|
83
|
+
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
84
|
+
const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);
|
|
85
|
+
const [isPresent, setIsPresent] = reactExports.useState(present);
|
|
86
|
+
const ref = reactExports.useRef(null);
|
|
87
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
88
|
+
const heightRef = reactExports.useRef(0);
|
|
89
|
+
const height = heightRef.current;
|
|
90
|
+
const widthRef = reactExports.useRef(0);
|
|
91
|
+
const width = widthRef.current;
|
|
92
|
+
const isOpen = context.open || isPresent;
|
|
93
|
+
const isMountAnimationPreventedRef = reactExports.useRef(isOpen);
|
|
94
|
+
const originalStylesRef = reactExports.useRef(void 0);
|
|
95
|
+
reactExports.useEffect(() => {
|
|
96
|
+
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
97
|
+
return () => cancelAnimationFrame(rAF);
|
|
98
|
+
}, []);
|
|
99
|
+
useLayoutEffect2(() => {
|
|
100
|
+
const node = ref.current;
|
|
101
|
+
if (node) {
|
|
102
|
+
originalStylesRef.current = originalStylesRef.current || {
|
|
103
|
+
transitionDuration: node.style.transitionDuration,
|
|
104
|
+
animationName: node.style.animationName
|
|
105
|
+
};
|
|
106
|
+
node.style.transitionDuration = "0s";
|
|
107
|
+
node.style.animationName = "none";
|
|
108
|
+
const rect = node.getBoundingClientRect();
|
|
109
|
+
heightRef.current = rect.height;
|
|
110
|
+
widthRef.current = rect.width;
|
|
111
|
+
if (!isMountAnimationPreventedRef.current) {
|
|
112
|
+
node.style.transitionDuration = originalStylesRef.current.transitionDuration;
|
|
113
|
+
node.style.animationName = originalStylesRef.current.animationName;
|
|
114
|
+
}
|
|
115
|
+
setIsPresent(present);
|
|
116
|
+
}
|
|
117
|
+
}, [context.open, present]);
|
|
118
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
119
|
+
Primitive.div,
|
|
120
|
+
{
|
|
121
|
+
"data-state": getState(context.open),
|
|
122
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
123
|
+
id: context.contentId,
|
|
124
|
+
hidden: !isOpen,
|
|
125
|
+
...contentProps,
|
|
126
|
+
ref: composedRefs,
|
|
127
|
+
style: {
|
|
128
|
+
[`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,
|
|
129
|
+
[`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,
|
|
130
|
+
...props.style
|
|
131
|
+
},
|
|
132
|
+
children: isOpen && children
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
});
|
|
136
|
+
function getState(open) {
|
|
137
|
+
return open ? "open" : "closed";
|
|
138
|
+
}
|
|
139
|
+
var Root = Collapsible;
|
|
140
|
+
var Trigger = CollapsibleTrigger;
|
|
141
|
+
var Content = CollapsibleContent;
|
|
142
|
+
export {
|
|
143
|
+
Content as C,
|
|
144
|
+
Root as R,
|
|
145
|
+
Trigger as T,
|
|
146
|
+
createCollapsibleScope as c
|
|
147
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports, R as React } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
import { a as createContextScope } from "./vendor-radix-ui-react-context-BVoNDLue.js";
|
|
3
|
+
import { c as composeRefs, u as useComposedRefs } from "./vendor-radix-ui-react-compose-refs-D3qsKVk1.js";
|
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function createSlot(ownerName) {
|
|
6
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
7
|
+
const Slot2 = reactExports.forwardRef((props, forwardedRef) => {
|
|
8
|
+
const { children, ...slotProps } = props;
|
|
9
|
+
const childrenArray = reactExports.Children.toArray(children);
|
|
10
|
+
const slottable = childrenArray.find(isSlottable);
|
|
11
|
+
if (slottable) {
|
|
12
|
+
const newElement = slottable.props.children;
|
|
13
|
+
const newChildren = childrenArray.map((child) => {
|
|
14
|
+
if (child === slottable) {
|
|
15
|
+
if (reactExports.Children.count(newElement) > 1) return reactExports.Children.only(null);
|
|
16
|
+
return reactExports.isValidElement(newElement) ? newElement.props.children : null;
|
|
17
|
+
} else {
|
|
18
|
+
return child;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: reactExports.isValidElement(newElement) ? reactExports.cloneElement(newElement, void 0, newChildren) : null });
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
24
|
+
});
|
|
25
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
26
|
+
return Slot2;
|
|
27
|
+
}
|
|
28
|
+
// @__NO_SIDE_EFFECTS__
|
|
29
|
+
function createSlotClone(ownerName) {
|
|
30
|
+
const SlotClone = reactExports.forwardRef((props, forwardedRef) => {
|
|
31
|
+
const { children, ...slotProps } = props;
|
|
32
|
+
if (reactExports.isValidElement(children)) {
|
|
33
|
+
const childrenRef = getElementRef(children);
|
|
34
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
35
|
+
if (children.type !== reactExports.Fragment) {
|
|
36
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
37
|
+
}
|
|
38
|
+
return reactExports.cloneElement(children, props2);
|
|
39
|
+
}
|
|
40
|
+
return reactExports.Children.count(children) > 1 ? reactExports.Children.only(null) : null;
|
|
41
|
+
});
|
|
42
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
43
|
+
return SlotClone;
|
|
44
|
+
}
|
|
45
|
+
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
46
|
+
function isSlottable(child) {
|
|
47
|
+
return reactExports.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
48
|
+
}
|
|
49
|
+
function mergeProps(slotProps, childProps) {
|
|
50
|
+
const overrideProps = { ...childProps };
|
|
51
|
+
for (const propName in childProps) {
|
|
52
|
+
const slotPropValue = slotProps[propName];
|
|
53
|
+
const childPropValue = childProps[propName];
|
|
54
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
55
|
+
if (isHandler) {
|
|
56
|
+
if (slotPropValue && childPropValue) {
|
|
57
|
+
overrideProps[propName] = (...args) => {
|
|
58
|
+
const result = childPropValue(...args);
|
|
59
|
+
slotPropValue(...args);
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
} else if (slotPropValue) {
|
|
63
|
+
overrideProps[propName] = slotPropValue;
|
|
64
|
+
}
|
|
65
|
+
} else if (propName === "style") {
|
|
66
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
67
|
+
} else if (propName === "className") {
|
|
68
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return { ...slotProps, ...overrideProps };
|
|
72
|
+
}
|
|
73
|
+
function getElementRef(element) {
|
|
74
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
75
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
76
|
+
if (mayWarn) {
|
|
77
|
+
return element.ref;
|
|
78
|
+
}
|
|
79
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
80
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
81
|
+
if (mayWarn) {
|
|
82
|
+
return element.props.ref;
|
|
83
|
+
}
|
|
84
|
+
return element.props.ref || element.ref;
|
|
85
|
+
}
|
|
86
|
+
function createCollection(name) {
|
|
87
|
+
const PROVIDER_NAME = name + "CollectionProvider";
|
|
88
|
+
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
|
89
|
+
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
90
|
+
PROVIDER_NAME,
|
|
91
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
92
|
+
);
|
|
93
|
+
const CollectionProvider = (props) => {
|
|
94
|
+
const { scope, children } = props;
|
|
95
|
+
const ref = React.useRef(null);
|
|
96
|
+
const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
|
|
97
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
98
|
+
};
|
|
99
|
+
CollectionProvider.displayName = PROVIDER_NAME;
|
|
100
|
+
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
101
|
+
const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
|
|
102
|
+
const CollectionSlot = React.forwardRef(
|
|
103
|
+
(props, forwardedRef) => {
|
|
104
|
+
const { scope, children } = props;
|
|
105
|
+
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
106
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
107
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionSlotImpl, { ref: composedRefs, children });
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
111
|
+
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
112
|
+
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
113
|
+
const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
|
|
114
|
+
const CollectionItemSlot = React.forwardRef(
|
|
115
|
+
(props, forwardedRef) => {
|
|
116
|
+
const { scope, children, ...itemData } = props;
|
|
117
|
+
const ref = React.useRef(null);
|
|
118
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
119
|
+
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
120
|
+
React.useEffect(() => {
|
|
121
|
+
context.itemMap.set(ref, { ref, ...itemData });
|
|
122
|
+
return () => void context.itemMap.delete(ref);
|
|
123
|
+
});
|
|
124
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
128
|
+
function useCollection(scope) {
|
|
129
|
+
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
130
|
+
const getItems = React.useCallback(() => {
|
|
131
|
+
const collectionNode = context.collectionRef.current;
|
|
132
|
+
if (!collectionNode) return [];
|
|
133
|
+
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
134
|
+
const items = Array.from(context.itemMap.values());
|
|
135
|
+
const orderedItems = items.sort(
|
|
136
|
+
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
137
|
+
);
|
|
138
|
+
return orderedItems;
|
|
139
|
+
}, [context.collectionRef, context.itemMap]);
|
|
140
|
+
return getItems;
|
|
141
|
+
}
|
|
142
|
+
return [
|
|
143
|
+
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
144
|
+
useCollection,
|
|
145
|
+
createCollectionScope
|
|
146
|
+
];
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
createCollection as c
|
|
150
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { r as reactExports } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
function setRef(ref, value) {
|
|
3
|
+
if (typeof ref === "function") {
|
|
4
|
+
return ref(value);
|
|
5
|
+
} else if (ref !== null && ref !== void 0) {
|
|
6
|
+
ref.current = value;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function composeRefs(...refs) {
|
|
10
|
+
return (node) => {
|
|
11
|
+
let hasCleanup = false;
|
|
12
|
+
const cleanups = refs.map((ref) => {
|
|
13
|
+
const cleanup = setRef(ref, node);
|
|
14
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
15
|
+
hasCleanup = true;
|
|
16
|
+
}
|
|
17
|
+
return cleanup;
|
|
18
|
+
});
|
|
19
|
+
if (hasCleanup) {
|
|
20
|
+
return () => {
|
|
21
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
22
|
+
const cleanup = cleanups[i];
|
|
23
|
+
if (typeof cleanup == "function") {
|
|
24
|
+
cleanup();
|
|
25
|
+
} else {
|
|
26
|
+
setRef(refs[i], null);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function useComposedRefs(...refs) {
|
|
34
|
+
return reactExports.useCallback(composeRefs(...refs), refs);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
composeRefs as c,
|
|
38
|
+
useComposedRefs as u
|
|
39
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports } from "./vendor-react-DvBrY0qp.js";
|
|
2
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
3
|
+
const Context = reactExports.createContext(defaultContext);
|
|
4
|
+
const Provider = (props) => {
|
|
5
|
+
const { children, ...context } = props;
|
|
6
|
+
const value = reactExports.useMemo(() => context, Object.values(context));
|
|
7
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
|
|
8
|
+
};
|
|
9
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
10
|
+
function useContext2(consumerName) {
|
|
11
|
+
const context = reactExports.useContext(Context);
|
|
12
|
+
if (context) return context;
|
|
13
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
14
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
15
|
+
}
|
|
16
|
+
return [Provider, useContext2];
|
|
17
|
+
}
|
|
18
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
19
|
+
let defaultContexts = [];
|
|
20
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
21
|
+
const BaseContext = reactExports.createContext(defaultContext);
|
|
22
|
+
const index = defaultContexts.length;
|
|
23
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
24
|
+
const Provider = (props) => {
|
|
25
|
+
const { scope, children, ...context } = props;
|
|
26
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
27
|
+
const value = reactExports.useMemo(() => context, Object.values(context));
|
|
28
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
|
|
29
|
+
};
|
|
30
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
31
|
+
function useContext2(consumerName, scope) {
|
|
32
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
33
|
+
const context = reactExports.useContext(Context);
|
|
34
|
+
if (context) return context;
|
|
35
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
36
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
37
|
+
}
|
|
38
|
+
return [Provider, useContext2];
|
|
39
|
+
}
|
|
40
|
+
const createScope = () => {
|
|
41
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
42
|
+
return reactExports.createContext(defaultContext);
|
|
43
|
+
});
|
|
44
|
+
return function useScope(scope) {
|
|
45
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
46
|
+
return reactExports.useMemo(
|
|
47
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
48
|
+
[scope, contexts]
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
createScope.scopeName = scopeName;
|
|
53
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
54
|
+
}
|
|
55
|
+
function composeContextScopes(...scopes) {
|
|
56
|
+
const baseScope = scopes[0];
|
|
57
|
+
if (scopes.length === 1) return baseScope;
|
|
58
|
+
const createScope = () => {
|
|
59
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
60
|
+
useScope: createScope2(),
|
|
61
|
+
scopeName: createScope2.scopeName
|
|
62
|
+
}));
|
|
63
|
+
return function useComposedScopes(overrideScopes) {
|
|
64
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
65
|
+
const scopeProps = useScope(overrideScopes);
|
|
66
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
67
|
+
return { ...nextScopes2, ...currentScope };
|
|
68
|
+
}, {});
|
|
69
|
+
return reactExports.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
createScope.scopeName = baseScope.scopeName;
|
|
73
|
+
return createScope;
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
createContextScope as a,
|
|
77
|
+
createContext2 as c
|
|
78
|
+
};
|