@wix/agent-skills 1.19.2 → 1.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/references/SERVICE_PLUGIN.md +14 -1
  3. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +7 -6
  4. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +4 -0
  5. package/skills/wix-app/references/service-plugin/AVAILABILITY-TIME-SLOTS-CONFIGURATION.md +118 -0
  6. package/skills/wix-app/references/service-plugin/BOOKING-POLICY.md +65 -0
  7. package/skills/wix-app/references/service-plugin/BOOKINGS-PRICING.md +71 -0
  8. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +11 -3
  9. package/skills/wix-app/references/service-plugin/BOOKINGS-VALIDATION.md +137 -0
  10. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +23 -16
  11. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
  12. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +4 -2
  13. package/skills/wix-app/references/service-plugin/REALTIME-PERMISSIONS.md +45 -0
  14. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +15 -0
  15. package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +4 -0
  16. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +4 -0
  17. package/skills/wix-headless/references/CAPABILITIES.md +2 -2
  18. package/skills/wix-headless/references/inline-recipes/experience-store.md +4 -3
  19. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +98 -18
  20. package/skills/wix-headless/references/managed/DEPLOYMENT.md +8 -8
  21. package/skills/wix-headless-fast/SKILL.md +200 -34
  22. package/skills/wix-headless-fast/entry/skill.md +10 -2
  23. package/skills/wix-headless-fast/install/attach.mjs +253 -0
  24. package/skills/wix-headless-fast/install/deploy.mjs +109 -9
  25. package/skills/wix-headless-fast/install/fast-path.mjs +28 -31
  26. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +224 -60
  27. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +2 -3
  28. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +2 -3
  29. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +24 -116
  30. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +16 -64
  31. package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +137 -0
  32. package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +78 -0
  33. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +117 -0
  34. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +13 -60
  35. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +47 -0
  36. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +10 -28
  37. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +2 -4
  38. package/skills/wix-headless-fast/references/blog/rest/posts.ts +42 -0
  39. package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +62 -0
  40. package/skills/wix-headless-fast/references/blog/seed/SEED.md +9 -0
  41. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +179 -33
  42. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +2 -1
  43. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +26 -132
  44. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +18 -49
  45. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +218 -0
  46. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +169 -0
  47. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +57 -142
  48. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +92 -0
  49. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +90 -0
  50. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +22 -61
  51. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +3 -1
  52. package/skills/wix-headless-fast/references/bookings/rest/booking.ts +113 -0
  53. package/skills/wix-headless-fast/references/bookings/rest/services.ts +55 -0
  54. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +10 -0
  55. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +236 -62
  56. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +19 -52
  57. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +16 -36
  58. package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +158 -0
  59. package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +93 -0
  60. package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +177 -0
  61. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +13 -41
  62. package/skills/wix-headless-fast/references/cms/rest/items.ts +125 -0
  63. package/skills/wix-headless-fast/references/cms/seed/SEED.md +9 -0
  64. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +239 -83
  65. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +1 -1
  66. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +7 -5
  67. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +2 -2
  68. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +28 -110
  69. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +19 -54
  70. package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +130 -0
  71. package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +97 -0
  72. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +13 -94
  73. package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +113 -0
  74. package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +156 -0
  75. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +38 -69
  76. package/skills/wix-headless-fast/references/events/rest/events.ts +57 -0
  77. package/skills/wix-headless-fast/references/events/rest/registration.ts +83 -0
  78. package/skills/wix-headless-fast/references/events/seed/SEED.md +9 -0
  79. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +214 -26
  80. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +35 -267
  81. package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +332 -0
  82. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +238 -0
  83. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +28 -243
  84. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +216 -0
  85. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +32 -204
  86. package/skills/wix-headless-fast/references/forms/rest/forms.ts +34 -0
  87. package/skills/wix-headless-fast/references/forms/rest/submissions.ts +56 -0
  88. package/skills/wix-headless-fast/references/forms/seed/SEED.md +8 -0
  89. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +15 -8
  90. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +314 -63
  91. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +1 -1
  92. package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +105 -0
  93. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +36 -65
  94. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +1 -1
  95. package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +43 -0
  96. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +11 -32
  97. package/skills/wix-headless-fast/references/members/rest/auth.ts +215 -0
  98. package/skills/wix-headless-fast/references/members/rest/members.ts +26 -0
  99. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +238 -59
  100. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +2 -2
  101. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +2 -2
  102. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
  103. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +8 -38
  104. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +23 -50
  105. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +16 -34
  106. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +22 -49
  107. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
  108. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +58 -0
  109. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
  110. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +31 -118
  111. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
  112. package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +75 -0
  113. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +8 -0
  114. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +212 -51
  115. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +9 -20
  116. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +7 -32
  117. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
  118. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +12 -33
  119. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +17 -34
  120. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
  121. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +106 -0
  122. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
  123. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +7 -55
  124. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
  125. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +11 -34
  126. package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +31 -0
  127. package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +20 -0
  128. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +8 -0
  129. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +240 -47
  130. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +2 -2
  131. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +2 -2
  132. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +14 -35
  133. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +28 -171
  134. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +155 -0
  135. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +89 -0
  136. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +23 -117
  137. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +124 -0
  138. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +45 -114
  139. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +193 -0
  140. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +94 -0
  141. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +15 -87
  142. package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +60 -0
  143. package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +169 -0
  144. package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +68 -0
  145. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +8 -0
  146. package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +23 -0
  147. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +55 -1
  148. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +13 -0
  149. package/skills/wix-headless-fast/references/shared/rest/client.ts +155 -0
  150. package/skills/wix-headless-fast/references/shared/rest/config.ts +3 -0
  151. package/skills/wix-headless-fast/references/shared/rest/media.ts +65 -0
  152. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +371 -81
  153. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +37 -3
  154. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +266 -0
  155. package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +95 -0
  156. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +136 -0
  157. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +29 -130
  158. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +26 -182
  159. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +121 -0
  160. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +53 -136
  161. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +309 -0
  162. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +73 -230
  163. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +147 -0
  164. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +289 -0
  165. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +62 -4
  166. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +21 -2
  167. package/skills/wix-headless-fast/references/storefront/rest/cart.ts +132 -0
  168. package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +123 -0
  169. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +25 -5
  170. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +24 -0
  171. package/skills/wix-manage/SKILL.md +4 -1
  172. package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
  173. package/skills/wix-manage/references/events/create-wix-event.md +46 -0
  174. package/skills/wix-manage/references/events/manage-wix-events.md +51 -1
  175. package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +6 -6
  176. package/skills/wix-manage/references/seo/manage-seo-suggestions.md +351 -0
  177. package/skills/wix-vibe-headless/install/deploy.cjs +33 -2
  178. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +1 -1
  179. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -4
  180. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +1 -1
  181. package/skills/wix-vibe-headless/platforms/base44.md +19 -4
  182. package/skills/wix-vibe-headless/platforms/generic.md +6 -0
  183. package/skills/wix-vibe-headless/references/_shared/nav/nav.tanstack.js +30 -0
  184. package/skills/wix-vibe-headless/references/_shared/routing.md +86 -0
  185. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +44 -0
  186. package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +1 -1
  187. package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +1 -1
  188. package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +1 -1
  189. package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +1 -1
  190. package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +1 -1
  191. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +42 -0
  192. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +1 -1
  193. package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +1 -1
  194. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +42 -0
  195. package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +1 -1
  196. package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +1 -1
  197. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +42 -0
  198. package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +1 -1
  199. package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +1 -1
  200. package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +1 -1
  201. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +43 -0
  202. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +1 -1
  203. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +1 -1
  204. package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +1 -1
  205. package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +1 -1
  206. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +43 -0
  207. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +1 -1
  208. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +1 -1
  209. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +36 -0
  210. package/skills/wix-vibe-headless/references/shared/app/lib/nav.js +9 -0
  211. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +42 -41
  212. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +7 -1
  213. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +3 -0
  214. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.cjs +6 -0
  215. package/skills/wix-headless-fast/install/pin-agents-md.mjs +0 -57
@@ -39,12 +39,29 @@ real fallback — a runtime error, or a field the snippets don't cover (see "Fal
39
39
  end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
40
40
  `references/blog/app/` → `src/`.)
41
41
 
42
+ **Their `Link`/`useParams` imports come from `@/lib/nav`**, so the same sources run on either
43
+ template. That adapter is installed at `src/lib/nav.js` with the rest of the deployed tree — use
44
+ the file that is there, and on TanStack check it first ([which template?](../_shared/routing.md)).
45
+ Import from `@/lib/nav` in the pages you write too, and they stay portable the same way.
46
+
47
+
42
48
 
43
49
  ## STEP 2 — Theme
44
50
  Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
45
51
  share the same colors and typography.
46
52
 
47
53
  ## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
54
+
55
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
56
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
57
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
58
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
59
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
60
+ > [both patterns](../_shared/routing.md).
61
+ >
62
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
63
+ > names as the router exports, and nothing you write is pinned to one template.
64
+
48
65
  **No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
49
66
  `App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
50
67
  replace it.
@@ -108,6 +125,33 @@ function Layout() {
108
125
  </TaxonomyProvider>
109
126
  ```
110
127
 
128
+
129
+ ### TanStack Start template — the same pages, mounted as files
130
+
131
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
132
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
133
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
134
+
135
+ | route | file | component |
136
+ |---|---|---|
137
+ | `/` | `src/routes/index.jsx` | `Home` |
138
+ | `/blog` | `src/routes/blog.index.jsx` | `Blog` |
139
+ | `/blog/:slug` | `src/routes/blog.$slug.jsx` | `PostDetail` |
140
+ | `/blog/category/:slug` | `src/routes/blog.category.$slug.jsx` | `CategoryPage` |
141
+ | `/blog/tag/:slug` | `src/routes/blog.tag.$slug.jsx` | `TagPage` |
142
+
143
+ ```jsx
144
+ // src/routes/blog.index.jsx
145
+ import { createFileRoute } from "@tanstack/react-router";
146
+ import Blog from "@/pages/Blog";
147
+
148
+ export const Route = createFileRoute("/blog")({ component: Blog });
149
+ ```
150
+
151
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
152
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
153
+ [`../_shared/routing.md`](../_shared/routing.md).
154
+
111
155
  ## What you build (not shipped)
112
156
  The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the `Layout`
113
157
  (STEP 3) so they wrap every route — plus the overall brand story, styled with the same base44
@@ -1,7 +1,7 @@
1
1
  // Feed tile. Styled with base44 design tokens (shadcn Tailwind classes) — re-skin via those tokens, not this
2
2
  // JSX. The cover-image path (post.media.wixMedia.image.url) and the text-only fallback are
3
3
  // load-bearing: never substitute a stock/placeholder image. Routes to the detail page by slug.
4
- import { Link } from "react-router-dom";
4
+ import { Link } from "@/lib/nav";
5
5
 
6
6
  function coverImage(post) {
7
7
  const url = post?.media?.wixMedia?.image?.url; // ready-to-use https url; //-fix is defensive
@@ -1,7 +1,7 @@
1
1
  // Category + tag chips for a post. Resolves the post's categoryIds/tagIds against the SHARED
2
2
  // taxonomy maps (fetched once by TaxonomyProvider — never re-query here), displays each by .label
3
3
  // (NOT .name), and routes by .slug. Styled with base44 design tokens (shadcn Tailwind classes).
4
- import { Link } from "react-router-dom";
4
+ import { Link } from "@/lib/nav";
5
5
  import { useTaxonomy } from "@/context/TaxonomyContext";
6
6
 
7
7
  const chip = "inline-flex items-center py-1 px-2.5 text-[12px] no-underline text-foreground bg-card border border-border rounded-full";
@@ -3,7 +3,7 @@
3
3
  // feed, so paging is identical). Displays the category by .label; cover from category.coverImage.url
4
4
  // (a DIFFERENT path from the post cover). Styled with base44 design tokens (shadcn Tailwind classes).
5
5
  import { useEffect, useState } from "react";
6
- import { useParams } from "react-router-dom";
6
+ import { useParams } from "@/lib/nav";
7
7
  import { getCategoryBySlug, queryPostsByCategory } from "@/rest/wix-blog";
8
8
  import PostGrid from "@/components/PostGrid";
9
9
 
@@ -2,7 +2,7 @@
2
2
  // category/tag chips, and the plain-text body as paragraphs. For a faithful render of embeds/images/
3
3
  // formatting, render `d.post.richContent` with a Ricos renderer (see INSTRUCTIONS "Extending").
4
4
  // Styled with base44 design tokens (shadcn Tailwind classes).
5
- import { useParams } from "react-router-dom";
5
+ import { useParams } from "@/lib/nav";
6
6
  import { usePostDetail } from "@/hooks/usePostDetail";
7
7
  import PostChips from "@/components/PostChips";
8
8
 
@@ -2,7 +2,7 @@
2
2
  // tag's posts via queryPostsByTag (same { posts, nextCursor } shape as the feed). Displays the tag by
3
3
  // .label (per-tag count is publishedPostCount). Styled with base44 design tokens (shadcn Tailwind classes).
4
4
  import { useEffect, useState } from "react";
5
- import { useParams } from "react-router-dom";
5
+ import { useParams } from "@/lib/nav";
6
6
  import { getTagBySlug, queryPostsByTag } from "@/rest/wix-blog";
7
7
  import PostGrid from "@/components/PostGrid";
8
8
 
@@ -50,12 +50,29 @@ on a real fallback — a runtime error, or a field the snippets don't cover (see
50
50
  the end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
51
51
  `references/bookings/app/` → `src/`.)
52
52
 
53
+ **Their `Link`/`useParams` imports come from `@/lib/nav`**, so the same sources run on either
54
+ template. That adapter is installed at `src/lib/nav.js` with the rest of the deployed tree — use
55
+ the file that is there, and on TanStack check it first ([which template?](../_shared/routing.md)).
56
+ Import from `@/lib/nav` in the pages you write too, and they stay portable the same way.
57
+
58
+
53
59
 
54
60
  ## STEP 2 — Theme
55
61
  Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
56
62
  share the same colors and typography.
57
63
 
58
64
  ## STEP 3 — Wire routes (surgical `find_replace` on `src/App.jsx`, never a rewrite)
65
+
66
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
67
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
68
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
69
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
70
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
71
+ > [both patterns](../_shared/routing.md).
72
+ >
73
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
74
+ > names as the router exports, and nothing you write is pinned to one template.
75
+
59
76
  **No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
60
77
  `App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
61
78
  replace it. Bookings needs **no cross-page provider** (there's no cart — each booking completes on
@@ -111,6 +128,31 @@ function Layout() {
111
128
  </Routes>
112
129
  ```
113
130
 
131
+
132
+ ### TanStack Start template — the same pages, mounted as files
133
+
134
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
135
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
136
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
137
+
138
+ | route | file | component |
139
+ |---|---|---|
140
+ | `/` | `src/routes/index.jsx` | `Home` |
141
+ | `/services` | `src/routes/services.jsx` | `Services` |
142
+ | `/service/:serviceId` | `src/routes/service.$serviceId.jsx` | `ServiceDetail` |
143
+
144
+ ```jsx
145
+ // src/routes/services.jsx
146
+ import { createFileRoute } from "@tanstack/react-router";
147
+ import Services from "@/pages/Services";
148
+
149
+ export const Route = createFileRoute("/services")({ component: Services });
150
+ ```
151
+
152
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
153
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
154
+ [`../_shared/routing.md`](../_shared/routing.md).
155
+
114
156
  ## What you build (not shipped)
115
157
  The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the
116
158
  `Layout` (STEP 3) so they wrap every route — plus the overall brand story, styled with the same
@@ -3,7 +3,7 @@
3
3
  // (src/index.css :root/.dark), not this JSX. Load-bearing: the image goes through mediaUrl() (Wix
4
4
  // media can be a bare handle), the link uses `service.id`, and every price/duration/capacity label
5
5
  // comes from lib/serviceFacts.js so the card and the detail page can't disagree.
6
- import { Link } from "react-router-dom";
6
+ import { Link } from "@/lib/nav";
7
7
  import { mediaUrl } from "@/rest/wix-bookings-services";
8
8
  import { serviceCapacityLabel, serviceDuration, servicePriceLabel } from "@/lib/serviceFacts";
9
9
 
@@ -2,7 +2,7 @@
2
2
  // pick a slot, enter details, book → hosted checkout. Two columns: what you're booking on the left,
3
3
  // the booking panel on the right, sticky on desktop so the times stay in reach while reading.
4
4
  // Styled with base44 design tokens (shadcn Tailwind classes).
5
- import { useParams } from "react-router-dom";
5
+ import { useParams } from "@/lib/nav";
6
6
  import { useServiceDetail } from "@/hooks/useServiceDetail";
7
7
  import { mediaUrl } from "@/rest/wix-bookings-services";
8
8
  import SlotPicker from "@/components/SlotPicker";
@@ -46,12 +46,29 @@ real fallback — a runtime error, or a field the snippets don't cover (see "Fal
46
46
  end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
47
47
  `references/events/app/` → `src/`.)
48
48
 
49
+ **Their `Link`/`useParams` imports come from `@/lib/nav`**, so the same sources run on either
50
+ template. That adapter is installed at `src/lib/nav.js` with the rest of the deployed tree — use
51
+ the file that is there, and on TanStack check it first ([which template?](../_shared/routing.md)).
52
+ Import from `@/lib/nav` in the pages you write too, and they stay portable the same way.
53
+
54
+
49
55
 
50
56
  ## STEP 2 — Theme
51
57
  Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
52
58
  share the same colors and typography.
53
59
 
54
60
  ## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
61
+
62
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
63
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
64
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
65
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
66
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
67
+ > [both patterns](../_shared/routing.md).
68
+ >
69
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
70
+ > names as the router exports, and nothing you write is pinned to one template.
71
+
55
72
  **No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
56
73
  `App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
57
74
  replace it. (Events needs no cross-page provider — there's no cart; the RSVP/ticketing state is local
@@ -107,6 +124,31 @@ function Layout() {
107
124
  </Routes>
108
125
  ```
109
126
 
127
+
128
+ ### TanStack Start template — the same pages, mounted as files
129
+
130
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
131
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
132
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
133
+
134
+ | route | file | component |
135
+ |---|---|---|
136
+ | `/` | `src/routes/index.jsx` | `Home` |
137
+ | `/events` | `src/routes/events.index.jsx` | `Events` |
138
+ | `/events/:slug` | `src/routes/events.$slug.jsx` | `EventDetail` |
139
+
140
+ ```jsx
141
+ // src/routes/events.index.jsx
142
+ import { createFileRoute } from "@tanstack/react-router";
143
+ import Events from "@/pages/Events";
144
+
145
+ export const Route = createFileRoute("/events")({ component: Events });
146
+ ```
147
+
148
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
149
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
150
+ [`../_shared/routing.md`](../_shared/routing.md).
151
+
110
152
  ## What you build (not shipped)
111
153
  The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the `Layout`
112
154
  (STEP 3) so they wrap every route — plus the overall brand story, styled with the same base44
@@ -4,7 +4,7 @@
4
4
  // formattedValue } — render formattedValue, NEVER the raw object (React "objects are not valid as a
5
5
  // child" crash). This is a different shape from the ticket-definition price (pricing.fixedPrice.amount)
6
6
  // used in the picker.
7
- import { Link } from "react-router-dom";
7
+ import { Link } from "@/lib/nav";
8
8
 
9
9
  export default function EventCard({ event }) {
10
10
  const when = event.dateAndTimeSettings?.formatted?.dateAndTime;
@@ -4,7 +4,7 @@
4
4
  // shortDescription is a PLAIN string (safe to render). event.description is Ricos rich content
5
5
  // { nodes: [...] } — NOT a string; to show the full body render it with @wix/ricos or walk `nodes`.
6
6
  // NEVER call string methods (.slice/.substring/.split) on event.description — that crashes the page.
7
- import { useParams } from "react-router-dom";
7
+ import { useParams } from "@/lib/nav";
8
8
  import { useEventDetail } from "@/hooks/useEventDetail";
9
9
  import EventRegistration from "@/components/EventRegistration";
10
10
 
@@ -65,6 +65,12 @@ fallback — a runtime error, or a field the snippets don't cover (see "Fallback
65
65
  (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
66
66
  `references/members/app/` → `src/`.)
67
67
 
68
+ **Their `Link`/`useParams` imports come from `@/lib/nav`**, so the same sources run on either
69
+ template. That adapter is installed at `src/lib/nav.js` with the rest of the deployed tree — use
70
+ the file that is there, and on TanStack check it first ([which template?](../_shared/routing.md)).
71
+ Import from `@/lib/nav` in the pages you write too, and they stay portable the same way.
72
+
73
+
68
74
  > **⚠️ Copy `wix-members-auth.js` verbatim — do NOT rewrite its internals.** The OAuth wire shapes are
69
75
  > exact and unforgiving: the `createRedirectSession` body needs the `auth.authRequest` wrapper, flat
70
76
  > PKCE fields, and `responseType`/`scope` — "simplifying" it returns **400** and login dies. Extend by
@@ -77,6 +83,17 @@ Use the existing Base44 theme in `src/index.css` so your pages and the shipped c
77
83
  share the same colors and typography.
78
84
 
79
85
  ## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
86
+
87
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
88
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
89
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
90
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
91
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
92
+ > [both patterns](../_shared/routing.md).
93
+ >
94
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
95
+ > names as the router exports, and nothing you write is pinned to one template.
96
+
80
97
  **No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
81
98
  `App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`, the **Base44 builder
82
99
  account**) — edit it in, don't replace it. The Wix member session is separate and ships under its own
@@ -140,6 +157,31 @@ function Layout() {
140
157
  </MemberProvider>
141
158
  ```
142
159
 
160
+
161
+ ### TanStack Start template — the same pages, mounted as files
162
+
163
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
164
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
165
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
166
+
167
+ | route | file | component |
168
+ |---|---|---|
169
+ | `/` | `src/routes/index.jsx` | `Home` |
170
+ | `/login` | `src/routes/login.jsx` | `Login` |
171
+ | `/callback` | `src/routes/callback.jsx` | `Callback` |
172
+
173
+ ```jsx
174
+ // src/routes/login.jsx
175
+ import { createFileRoute } from "@tanstack/react-router";
176
+ import Login from "@/pages/Login";
177
+
178
+ export const Route = createFileRoute("/login")({ component: Login });
179
+ ```
180
+
181
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
182
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
183
+ [`../_shared/routing.md`](../_shared/routing.md).
184
+
143
185
  ## What you build (not shipped)
144
186
  The **home / landing page**, the **`Header`** (mount `<MemberMenu/>` in it) and a **`Footer`** — the
145
187
  two you drop into the `Layout` (STEP 3) so they wrap every route — plus the overall brand story,
@@ -2,7 +2,7 @@
2
2
  // session state: a "Log in" link for a visitor, or the member's name + a log-out button once signed
3
3
  // in. Drop it into the Header you build (STEP 4), same as the storefront's CartButton. Pure UI reading
4
4
  // useMember + base44 design tokens (shadcn Tailwind classes) — render it as-is; don't wrap it in your own auth logic.
5
- import { Link } from "react-router-dom";
5
+ import { Link } from "@/lib/nav";
6
6
  import { useMember } from "@/context/MemberContext";
7
7
 
8
8
  export default function MemberMenu() {
@@ -2,7 +2,7 @@
2
2
  // children only for a logged-in member, otherwise redirects to /login (carrying the attempted path so
3
3
  // login can return there). This is the gate the shipped Account page uses; reuse it for your own
4
4
  // member-only routes ("my orders", "my plans", …). Reads useMember; no styling of its own.
5
- import { Navigate, useLocation } from "react-router-dom";
5
+ import { Navigate, useLocation } from "@/lib/nav";
6
6
  import { useMember } from "@/context/MemberContext";
7
7
 
8
8
  export default function RequireAuth({ children, fallback = "/login" }) {
@@ -3,7 +3,7 @@
3
3
  // they came from (RequireAuth stashes it in location.state.from) or home. Social login returns via
4
4
  // /callback instead. Styled with base44 design tokens (shadcn Tailwind classes) — don't rewrite this page to add chrome
5
5
  // (the Header/Footer live in the Layout).
6
- import { useNavigate, useLocation } from "react-router-dom";
6
+ import { useNavigate, useLocation } from "@/lib/nav";
7
7
  import LoginForm from "@/components/LoginForm";
8
8
  import SocialButtons from "@/components/SocialButtons";
9
9
 
@@ -47,12 +47,29 @@ a real fallback — a runtime error, or a field the snippets don't cover (see "F
47
47
  end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
48
48
  `references/portfolio/app/` → `src/`.)
49
49
 
50
+ **Their `Link`/`useParams` imports come from `@/lib/nav`**, so the same sources run on either
51
+ template. That adapter is installed at `src/lib/nav.js` with the rest of the deployed tree — use
52
+ the file that is there, and on TanStack check it first ([which template?](../_shared/routing.md)).
53
+ Import from `@/lib/nav` in the pages you write too, and they stay portable the same way.
54
+
55
+
50
56
 
51
57
  ## STEP 2 — Theme
52
58
  Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
53
59
  share the same colors and typography.
54
60
 
55
61
  ## STEP 3 — Wire routes (surgical `find_replace` on `src/App.jsx`, never a rewrite)
62
+
63
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
64
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
65
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
66
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
67
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
68
+ > [both patterns](../_shared/routing.md).
69
+ >
70
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
71
+ > names as the router exports, and nothing you write is pinned to one template.
72
+
56
73
  **No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
57
74
  `App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
58
75
  replace it. Portfolio is read-only with no cross-page state, so there's **no provider to wrap** (no
@@ -110,6 +127,32 @@ function Layout() {
110
127
  </Routes>
111
128
  ```
112
129
 
130
+
131
+ ### TanStack Start template — the same pages, mounted as files
132
+
133
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
134
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
135
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
136
+
137
+ | route | file | component |
138
+ |---|---|---|
139
+ | `/` | `src/routes/index.jsx` | `Home` |
140
+ | `/portfolio` | `src/routes/portfolio.jsx` | `Portfolio` |
141
+ | `/collection/:slug` | `src/routes/collection.$slug.jsx` | `CollectionPage` |
142
+ | `/project/:slug` | `src/routes/project.$slug.jsx` | `ProjectDetail` |
143
+
144
+ ```jsx
145
+ // src/routes/portfolio.jsx
146
+ import { createFileRoute } from "@tanstack/react-router";
147
+ import Portfolio from "@/pages/Portfolio";
148
+
149
+ export const Route = createFileRoute("/portfolio")({ component: Portfolio });
150
+ ```
151
+
152
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
153
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
154
+ [`../_shared/routing.md`](../_shared/routing.md).
155
+
113
156
  ## What you build (not shipped)
114
157
  The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the `Layout`
115
158
  (STEP 3) so they wrap every route — plus the overall brand story, styled with the same base44
@@ -1,7 +1,7 @@
1
1
  // Collection tile → links to /collection/:slug. Styled with base44 design tokens (shadcn Tailwind
2
2
  // classes) — re-skin via the app's design tokens (src/index.css :root/.dark), not this JSX. The
3
3
  // `//`-protocol image fix and the coverImage.imageInfo.url field path are load-bearing.
4
- import { Link } from "react-router-dom";
4
+ import { Link } from "@/lib/nav";
5
5
 
6
6
  function coverUrl(collection) {
7
7
  const url = collection?.coverImage?.imageInfo?.url;
@@ -2,7 +2,7 @@
2
2
  // — re-skin via the app's design tokens (src/index.css :root/.dark), not this JSX. The cover is a
3
3
  // one-of: image when present, else the video's poster / first resolution. The `//`-protocol fix and
4
4
  // these field paths are load-bearing.
5
- import { Link } from "react-router-dom";
5
+ import { Link } from "@/lib/nav";
6
6
 
7
7
  function https(url) {
8
8
  return url ? (url.startsWith("//") ? `https:${url}` : url) : null;
@@ -1,6 +1,6 @@
1
1
  // Collection page — collection header + its project grid (paged). Thin view over
2
2
  // useCollectionProjects (all data logic lives in the hook). Styled with base44 design tokens (shadcn Tailwind classes).
3
- import { useParams } from "react-router-dom";
3
+ import { useParams } from "@/lib/nav";
4
4
  import { useCollectionProjects } from "@/hooks/useCollectionProjects";
5
5
  import ProjectGrid from "@/components/ProjectGrid";
6
6
 
@@ -1,7 +1,7 @@
1
1
  // Project detail — thin view over useProjectDetail (all data logic lives in the hook). Renders the
2
2
  // header, the details[] rows (text OR link), and the media gallery (each item via ProjectMedia,
3
3
  // which branches on item.type). Styled with base44 design tokens (shadcn Tailwind classes).
4
- import { useParams } from "react-router-dom";
4
+ import { useParams } from "@/lib/nav";
5
5
  import { useProjectDetail } from "@/hooks/useProjectDetail";
6
6
  import ProjectMedia from "@/components/ProjectMedia";
7
7
 
@@ -50,12 +50,29 @@ a real fallback — a runtime error, or a field the snippets don't cover (see "F
50
50
  end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
51
51
  `references/pricing-plans/app/` → `src/`.)
52
52
 
53
+ **Their `Link`/`useParams` imports come from `@/lib/nav`**, so the same sources run on either
54
+ template. That adapter is installed at `src/lib/nav.js` with the rest of the deployed tree — use
55
+ the file that is there, and on TanStack check it first ([which template?](../_shared/routing.md)).
56
+ Import from `@/lib/nav` in the pages you write too, and they stay portable the same way.
57
+
58
+
53
59
 
54
60
  ## STEP 2 — Theme
55
61
  Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
56
62
  share the same colors and typography.
57
63
 
58
64
  ## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
65
+
66
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
67
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
68
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
69
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
70
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
71
+ > [both patterns](../_shared/routing.md).
72
+ >
73
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
74
+ > names as the router exports, and nothing you write is pinned to one template.
75
+
59
76
  **No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
60
77
  `App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
61
78
  replace it. Pricing Plans needs **no** cross-page provider (checkout is a redirect, not client
@@ -113,6 +130,32 @@ function Layout() {
113
130
  </Routes>
114
131
  ```
115
132
 
133
+
134
+ ### TanStack Start template — the same pages, mounted as files
135
+
136
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
137
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
138
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
139
+
140
+ | route | file | component |
141
+ |---|---|---|
142
+ | `/` | `src/routes/index.jsx` | `Home` |
143
+ | `/plans` | `src/routes/plans.index.jsx` | `Plans` |
144
+ | `/plans/:slug` | `src/routes/plans.$slug.jsx` | `PlanDetail` |
145
+ | `/my-plans` | `src/routes/my-plans.jsx` | `MyPlans` |
146
+
147
+ ```jsx
148
+ // src/routes/plans.index.jsx
149
+ import { createFileRoute } from "@tanstack/react-router";
150
+ import Plans from "@/pages/Plans";
151
+
152
+ export const Route = createFileRoute("/plans")({ component: Plans });
153
+ ```
154
+
155
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
156
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
157
+ [`../_shared/routing.md`](../_shared/routing.md).
158
+
116
159
  ## What you build (not shipped)
117
160
  The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the
118
161
  `Layout` (STEP 3) so they wrap every route — plus the overall brand story, styled with the same
@@ -7,7 +7,7 @@
7
7
  // plan.image is a WixMedia object { id, width, height, altText } with NO .url — its id must be
8
8
  // resolved to a URL before it can render. Rendering plan text only here avoids that trap; see
9
9
  // INSTRUCTIONS ("Plan image") for the resolve-or-omit fallback if you want the image.
10
- import { Link } from "react-router-dom";
10
+ import { Link } from "@/lib/nav";
11
11
  import PlanPrice from "./PlanPrice";
12
12
 
13
13
  export default function PlanCard({ plan, onSubscribe, featured = false }) {
@@ -2,7 +2,7 @@
2
2
  // price/billing summary, perks, terms & conditions if present, and a Subscribe button (only when
3
3
  // plan.buyable). Not-found state on a bad slug — never invent a plan. Styled with base44 design
4
4
  // tokens (shadcn Tailwind classes). termsAndConditions is plain text; render as-is.
5
- import { useParams } from "react-router-dom";
5
+ import { useParams } from "@/lib/nav";
6
6
  import { usePlanDetail } from "@/hooks/usePlanDetail";
7
7
  import PlanPrice from "@/components/PlanPrice";
8
8
 
@@ -56,6 +56,17 @@ Use the existing Base44 theme in `src/index.css` so your pages and the shipped c
56
56
  share the same colors and typography.
57
57
 
58
58
  ## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
59
+
60
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
61
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
62
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
63
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
64
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
65
+ > [both patterns](../_shared/routing.md).
66
+ >
67
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
68
+ > names as the router exports, and nothing you write is pinned to one template.
69
+
59
70
  **No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
60
71
  `App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
61
72
  replace it.
@@ -116,6 +127,31 @@ function Layout() {
116
127
  </OrderCartProvider>
117
128
  ```
118
129
 
130
+
131
+ ### TanStack Start template — the same pages, mounted as files
132
+
133
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
134
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
135
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
136
+
137
+ | route | file | component |
138
+ |---|---|---|
139
+ | `/` | `src/routes/index.jsx` | `Home` |
140
+ | `/menu` | `src/routes/menu.jsx` | `Menu` |
141
+ | `/reservations` | `src/routes/reservations.jsx` | `Reservations` |
142
+
143
+ ```jsx
144
+ // src/routes/menu.jsx
145
+ import { createFileRoute } from "@tanstack/react-router";
146
+ import Menu from "@/pages/Menu";
147
+
148
+ export const Route = createFileRoute("/menu")({ component: Menu });
149
+ ```
150
+
151
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
152
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
153
+ [`../_shared/routing.md`](../_shared/routing.md).
154
+
119
155
  ## What you build (not shipped)
120
156
  The **home / landing page**, the **`Header`** (mount `<OrderCartButton/>` in it) and a **`Footer`** —
121
157
  the two you drop into the `Layout` (STEP 3) so they wrap every route — plus the overall brand story,
@@ -0,0 +1,9 @@
1
+ // Navigation adapter — React Router template (src/App.jsx + react-router-dom).
2
+ // Shipped components import Link/useParams/etc from "@/lib/nav" so the same files run on either
3
+ // Base44 template; this file is the only place the router is named.
4
+ //
5
+ // It rides in the deployed tree, so every install path lands it — including the ones that copy
6
+ // `shared/app/` directly instead of running install/deploy.cjs. On the TanStack Start template
7
+ // (src/routes/__root.jsx present) `_shared/nav/nav.tanstack.js` replaces it; deploy.cjs does that
8
+ // swap on its own. See `_shared/routing.md`.
9
+ export { Link, useParams, useNavigate, useLocation, Navigate } from "react-router-dom";