fimo 0.6.0 → 0.7.0-experimental.10

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 (297) hide show
  1. package/assets/skills/fimo/SKILL.md +2 -2
  2. package/assets/skills/fimo/references/locales.md +0 -8
  3. package/assets/skills/fimo/references/setup-react-router.md +2 -2
  4. package/assets/skills/fimo/references/ui.md +1 -1
  5. package/assets/skills/fimo-cli/references/content.md +0 -3
  6. package/assets/skills/fimo-cli/references/locales.md +0 -6
  7. package/assets/skills/fimo-migration/SKILL.md +22 -2
  8. package/assets/skills/fimo-migration/references/content.md +8 -0
  9. package/assets/skills/fimo-migration/references/manifest.md +35 -0
  10. package/assets/skills/fimo-migration/references/qa.md +24 -2
  11. package/assets/skills/fimo-migration/references/workflow.md +12 -1
  12. package/assets/skills/fimo-migration/references/wrap.md +617 -0
  13. package/assets/skills/fimo-studio/references/visual-editing.md +5 -3
  14. package/dist/build/vite/plugins/translations.d.ts +2 -8
  15. package/dist/build/vite/plugins/translations.d.ts.map +1 -1
  16. package/dist/build/vite/plugins/translations.js +3 -121
  17. package/dist/cli/bundle.json +1 -1
  18. package/dist/cli/index.js +29490 -21165
  19. package/dist/runtime/app/FimoProviders.d.ts +1 -11
  20. package/dist/runtime/app/FimoProviders.d.ts.map +1 -1
  21. package/dist/runtime/app/FimoProviders.js +2 -23
  22. package/dist/runtime/astro/index.d.ts +2 -0
  23. package/dist/runtime/astro/index.d.ts.map +1 -0
  24. package/dist/runtime/astro/index.js +3 -0
  25. package/dist/runtime/astro/server.d.ts +3 -0
  26. package/dist/runtime/astro/server.d.ts.map +1 -0
  27. package/dist/runtime/astro/server.js +6 -0
  28. package/dist/runtime/i18n/FimoLocaleContext.d.ts.map +1 -1
  29. package/dist/runtime/i18n/FimoLocaleContext.js +1 -0
  30. package/dist/runtime/next/FimoNextProviders.d.ts +24 -0
  31. package/dist/runtime/next/FimoNextProviders.d.ts.map +1 -0
  32. package/dist/runtime/next/FimoNextProviders.js +20 -0
  33. package/dist/runtime/next/FimoNextScripts.d.ts +10 -0
  34. package/dist/runtime/next/FimoNextScripts.d.ts.map +1 -0
  35. package/dist/runtime/next/FimoNextScripts.js +19 -0
  36. package/dist/runtime/next/index.d.ts +14 -0
  37. package/dist/runtime/next/index.d.ts.map +1 -0
  38. package/dist/runtime/next/index.js +14 -0
  39. package/dist/runtime/next/server.d.ts +2 -0
  40. package/dist/runtime/next/server.d.ts.map +1 -0
  41. package/dist/runtime/next/server.js +4 -0
  42. package/dist/runtime/nuxt/composables.d.ts +9 -0
  43. package/dist/runtime/nuxt/composables.d.ts.map +1 -0
  44. package/dist/runtime/nuxt/composables.js +57 -0
  45. package/dist/runtime/nuxt/index.d.ts +3 -0
  46. package/dist/runtime/nuxt/index.d.ts.map +1 -0
  47. package/dist/runtime/nuxt/index.js +6 -0
  48. package/dist/runtime/nuxt/server.d.ts +3 -0
  49. package/dist/runtime/nuxt/server.d.ts.map +1 -0
  50. package/dist/runtime/nuxt/server.js +6 -0
  51. package/dist/runtime/paths/get-fimo-paths.d.ts.map +1 -1
  52. package/dist/runtime/paths/get-fimo-paths.js +5 -15
  53. package/dist/runtime/primitives/labels-hook.d.ts +33 -0
  54. package/dist/runtime/primitives/labels-hook.d.ts.map +1 -0
  55. package/dist/runtime/primitives/labels-hook.js +41 -0
  56. package/dist/runtime/primitives/labels-store.d.ts +12 -0
  57. package/dist/runtime/primitives/labels-store.d.ts.map +1 -0
  58. package/dist/runtime/primitives/labels-store.js +60 -0
  59. package/dist/runtime/primitives/labels-store.test.d.ts +2 -0
  60. package/dist/runtime/primitives/labels-store.test.d.ts.map +1 -0
  61. package/dist/runtime/primitives/labels-store.test.js +66 -0
  62. package/dist/runtime/primitives/lib/useFimoLiveValue.d.ts +5 -3
  63. package/dist/runtime/primitives/lib/useFimoLiveValue.d.ts.map +1 -1
  64. package/dist/runtime/primitives/lib/useFimoLiveValue.js +11 -4
  65. package/dist/runtime/primitives/translations.d.ts +1 -27
  66. package/dist/runtime/primitives/translations.d.ts.map +1 -1
  67. package/dist/runtime/primitives/translations.js +7 -85
  68. package/dist/runtime/react/FimoSpaProviders.d.ts +36 -0
  69. package/dist/runtime/react/FimoSpaProviders.d.ts.map +1 -0
  70. package/dist/runtime/react/FimoSpaProviders.js +63 -0
  71. package/dist/runtime/react/index.d.ts +33 -0
  72. package/dist/runtime/react/index.d.ts.map +1 -0
  73. package/dist/runtime/react/index.js +39 -0
  74. package/dist/runtime/remix/FimoRemixProviders.d.ts +16 -0
  75. package/dist/runtime/remix/FimoRemixProviders.d.ts.map +1 -0
  76. package/dist/runtime/remix/FimoRemixProviders.js +12 -0
  77. package/dist/runtime/remix/FimoRemixScripts.d.ts +10 -0
  78. package/dist/runtime/remix/FimoRemixScripts.d.ts.map +1 -0
  79. package/dist/runtime/remix/FimoRemixScripts.js +19 -0
  80. package/dist/runtime/remix/index.d.ts +12 -0
  81. package/dist/runtime/remix/index.d.ts.map +1 -0
  82. package/dist/runtime/remix/index.js +11 -0
  83. package/dist/runtime/remix/server.d.ts +2 -0
  84. package/dist/runtime/remix/server.d.ts.map +1 -0
  85. package/dist/runtime/remix/server.js +2 -0
  86. package/dist/runtime/seo/buildSeoForPath.d.ts +3 -1
  87. package/dist/runtime/seo/buildSeoForPath.d.ts.map +1 -1
  88. package/dist/runtime/seo/buildSeoForPath.js +1 -4
  89. package/dist/runtime/shared/display-routes.d.ts +14 -0
  90. package/dist/runtime/shared/display-routes.d.ts.map +1 -0
  91. package/dist/runtime/shared/display-routes.js +25 -0
  92. package/dist/runtime/shared/fimo-config.server.d.ts.map +1 -1
  93. package/dist/runtime/shared/fimo-config.server.js +1 -0
  94. package/dist/runtime/shared/fimo-config.types.d.ts +2 -0
  95. package/dist/runtime/shared/fimo-config.types.d.ts.map +1 -1
  96. package/dist/runtime/shared/i18n-messages.d.ts +29 -0
  97. package/dist/runtime/shared/i18n-messages.d.ts.map +1 -0
  98. package/dist/runtime/shared/i18n-messages.js +79 -0
  99. package/dist/runtime/shared/i18n-messages.test.d.ts +2 -0
  100. package/dist/runtime/shared/i18n-messages.test.d.ts.map +1 -0
  101. package/dist/runtime/shared/i18n-messages.test.js +39 -0
  102. package/dist/runtime/shared/labels-fetch.pure.d.ts +17 -0
  103. package/dist/runtime/shared/labels-fetch.pure.d.ts.map +1 -0
  104. package/dist/runtime/shared/labels-fetch.pure.js +71 -0
  105. package/dist/runtime/shared/labels-fetch.server.d.ts +7 -0
  106. package/dist/runtime/shared/labels-fetch.server.d.ts.map +1 -0
  107. package/dist/runtime/shared/labels-fetch.server.js +97 -0
  108. package/dist/runtime/shared/labels-t.pure.d.ts +2 -0
  109. package/dist/runtime/shared/labels-t.pure.d.ts.map +1 -0
  110. package/dist/runtime/shared/labels-t.pure.js +10 -0
  111. package/dist/runtime/strapi/client.d.ts +26 -0
  112. package/dist/runtime/strapi/client.d.ts.map +1 -0
  113. package/dist/runtime/strapi/client.js +88 -0
  114. package/dist/runtime/strapi/client.test.d.ts +2 -0
  115. package/dist/runtime/strapi/client.test.d.ts.map +1 -0
  116. package/dist/runtime/strapi/client.test.js +64 -0
  117. package/dist/runtime/strapi/index.d.ts +5 -0
  118. package/dist/runtime/strapi/index.d.ts.map +1 -0
  119. package/dist/runtime/strapi/index.js +6 -0
  120. package/dist/runtime/strapi/reshape.d.ts +28 -0
  121. package/dist/runtime/strapi/reshape.d.ts.map +1 -0
  122. package/dist/runtime/strapi/reshape.js +79 -0
  123. package/dist/runtime/strapi/reshape.test.d.ts +2 -0
  124. package/dist/runtime/strapi/reshape.test.d.ts.map +1 -0
  125. package/dist/runtime/strapi/reshape.test.js +33 -0
  126. package/dist/runtime/svelte/index.d.ts +3 -0
  127. package/dist/runtime/svelte/index.d.ts.map +1 -0
  128. package/dist/runtime/svelte/index.js +7 -0
  129. package/dist/runtime/svelte/server.d.ts +3 -0
  130. package/dist/runtime/svelte/server.d.ts.map +1 -0
  131. package/dist/runtime/svelte/server.js +6 -0
  132. package/dist/runtime/vue/index.d.ts +3 -0
  133. package/dist/runtime/vue/index.d.ts.map +1 -0
  134. package/dist/runtime/vue/index.js +5 -0
  135. package/dist/runtime/vue/server.d.ts +3 -0
  136. package/dist/runtime/vue/server.d.ts.map +1 -0
  137. package/dist/runtime/vue/server.js +6 -0
  138. package/dist/runtime/wrapped/FimoFileLink.d.ts +17 -0
  139. package/dist/runtime/wrapped/FimoFileLink.d.ts.map +1 -0
  140. package/dist/runtime/wrapped/FimoFileLink.js +19 -0
  141. package/dist/runtime/wrapped/FimoMediaImage.d.ts +14 -0
  142. package/dist/runtime/wrapped/FimoMediaImage.d.ts.map +1 -0
  143. package/dist/runtime/wrapped/FimoMediaImage.js +20 -0
  144. package/dist/runtime/wrapped/FimoMediaVideo.d.ts +14 -0
  145. package/dist/runtime/wrapped/FimoMediaVideo.d.ts.map +1 -0
  146. package/dist/runtime/wrapped/FimoMediaVideo.js +20 -0
  147. package/dist/runtime/wrapped/FimoRichTextBlock.d.ts +23 -0
  148. package/dist/runtime/wrapped/FimoRichTextBlock.d.ts.map +1 -0
  149. package/dist/runtime/wrapped/FimoRichTextBlock.js +22 -0
  150. package/dist/runtime/wrapped/FimoText.d.ts +22 -0
  151. package/dist/runtime/wrapped/FimoText.d.ts.map +1 -0
  152. package/dist/runtime/wrapped/FimoText.js +20 -0
  153. package/dist/runtime/wrapped/WrappedContentContext.d.ts +28 -0
  154. package/dist/runtime/wrapped/WrappedContentContext.d.ts.map +1 -0
  155. package/dist/runtime/wrapped/WrappedContentContext.js +30 -0
  156. package/dist/runtime/wrapped/WrappedProviders.d.ts +33 -0
  157. package/dist/runtime/wrapped/WrappedProviders.d.ts.map +1 -0
  158. package/dist/runtime/wrapped/WrappedProviders.js +101 -0
  159. package/dist/runtime/wrapped/dom.d.ts +4 -0
  160. package/dist/runtime/wrapped/dom.d.ts.map +1 -0
  161. package/dist/runtime/wrapped/dom.js +23 -0
  162. package/dist/runtime/wrapped/dom.test.d.ts +2 -0
  163. package/dist/runtime/wrapped/dom.test.d.ts.map +1 -0
  164. package/dist/runtime/wrapped/dom.test.js +16 -0
  165. package/dist/runtime/wrapped/server.d.ts +77 -0
  166. package/dist/runtime/wrapped/server.d.ts.map +1 -0
  167. package/dist/runtime/wrapped/server.js +237 -0
  168. package/dist/runtime/wrapped/server.test.d.ts +2 -0
  169. package/dist/runtime/wrapped/server.test.d.ts.map +1 -0
  170. package/dist/runtime/wrapped/server.test.js +91 -0
  171. package/dist/scripts/apply-wrap-templates.d.ts +61 -0
  172. package/dist/scripts/apply-wrap-templates.js +132 -0
  173. package/dist/scripts/apply-wrap-templates.test.d.ts +1 -0
  174. package/dist/scripts/apply-wrap-templates.test.js +199 -0
  175. package/dist/scripts/apply-wrap.d.ts +46 -0
  176. package/dist/scripts/apply-wrap.js +278 -0
  177. package/dist/scripts/apply-wrap.test.d.ts +1 -0
  178. package/dist/scripts/apply-wrap.test.js +226 -0
  179. package/dist/scripts/cms/discover.d.ts +2 -0
  180. package/dist/scripts/cms/discover.js +17 -0
  181. package/dist/scripts/cms/example-content.d.ts +32 -0
  182. package/dist/scripts/cms/example-content.js +108 -0
  183. package/dist/scripts/cms/example-content.test.d.ts +1 -0
  184. package/dist/scripts/cms/example-content.test.js +66 -0
  185. package/dist/scripts/cms/strapi/detect.d.ts +2 -0
  186. package/dist/scripts/cms/strapi/detect.js +186 -0
  187. package/dist/scripts/cms/strapi/detect.test.d.ts +1 -0
  188. package/dist/scripts/cms/strapi/detect.test.js +56 -0
  189. package/dist/scripts/cms/strapi/index.d.ts +3 -0
  190. package/dist/scripts/cms/strapi/index.js +25 -0
  191. package/dist/scripts/cms/strapi/list-source.d.ts +17 -0
  192. package/dist/scripts/cms/strapi/list-source.js +90 -0
  193. package/dist/scripts/cms/strapi/list-source.test.d.ts +1 -0
  194. package/dist/scripts/cms/strapi/list-source.test.js +33 -0
  195. package/dist/scripts/cms/strapi/schema-map.d.ts +9 -0
  196. package/dist/scripts/cms/strapi/schema-map.js +149 -0
  197. package/dist/scripts/cms/strapi/schema-map.test.d.ts +1 -0
  198. package/dist/scripts/cms/strapi/schema-map.test.js +91 -0
  199. package/dist/scripts/cms/strapi/touchpoints.d.ts +31 -0
  200. package/dist/scripts/cms/strapi/touchpoints.js +145 -0
  201. package/dist/scripts/cms/strapi/touchpoints.test.d.ts +1 -0
  202. package/dist/scripts/cms/strapi/touchpoints.test.js +62 -0
  203. package/dist/scripts/cms/strapi/wire-client.d.ts +15 -0
  204. package/dist/scripts/cms/strapi/wire-client.js +107 -0
  205. package/dist/scripts/cms/strapi/wire-client.test.d.ts +1 -0
  206. package/dist/scripts/cms/strapi/wire-client.test.js +51 -0
  207. package/dist/scripts/cms/strapi/wiring.d.ts +17 -0
  208. package/dist/scripts/cms/strapi/wiring.js +36 -0
  209. package/dist/scripts/cms/strapi/wiring.test.d.ts +1 -0
  210. package/dist/scripts/cms/strapi/wiring.test.js +27 -0
  211. package/dist/scripts/cms/types.d.ts +117 -0
  212. package/dist/scripts/cms/types.js +11 -0
  213. package/dist/scripts/detect-framework.d.ts +39 -0
  214. package/dist/scripts/detect-framework.js +133 -0
  215. package/dist/scripts/detect-framework.test.d.ts +1 -0
  216. package/dist/scripts/detect-framework.test.js +122 -0
  217. package/dist/scripts/draft-rows.d.ts +19 -0
  218. package/dist/scripts/draft-rows.js +135 -0
  219. package/dist/scripts/draft-rows.test.d.ts +1 -0
  220. package/dist/scripts/draft-rows.test.js +113 -0
  221. package/dist/scripts/draft-schemas.d.ts +27 -0
  222. package/dist/scripts/draft-schemas.js +188 -0
  223. package/dist/scripts/draft-schemas.test.d.ts +1 -0
  224. package/dist/scripts/draft-schemas.test.js +152 -0
  225. package/dist/scripts/extract-translations.js +16 -11
  226. package/dist/scripts/extract-translations.test.d.ts +1 -0
  227. package/dist/scripts/extract-translations.test.js +66 -0
  228. package/dist/scripts/frameworks/astro/routes.d.ts +3 -0
  229. package/dist/scripts/frameworks/astro/routes.js +55 -0
  230. package/dist/scripts/frameworks/astro/template-style.d.ts +7 -0
  231. package/dist/scripts/frameworks/astro/template-style.js +19 -0
  232. package/dist/scripts/frameworks/discover.d.ts +70 -0
  233. package/dist/scripts/frameworks/discover.js +178 -0
  234. package/dist/scripts/frameworks/next/rewire.d.ts +30 -0
  235. package/dist/scripts/frameworks/next/rewire.js +258 -0
  236. package/dist/scripts/frameworks/next/rewire.test.d.ts +1 -0
  237. package/dist/scripts/frameworks/next/rewire.test.js +134 -0
  238. package/dist/scripts/frameworks/next/routes.d.ts +17 -0
  239. package/dist/scripts/frameworks/next/routes.js +134 -0
  240. package/dist/scripts/frameworks/next/routes.test.d.ts +1 -0
  241. package/dist/scripts/frameworks/next/routes.test.js +64 -0
  242. package/dist/scripts/frameworks/next/wiring.d.ts +33 -0
  243. package/dist/scripts/frameworks/next/wiring.js +186 -0
  244. package/dist/scripts/frameworks/next/wiring.test.d.ts +1 -0
  245. package/dist/scripts/frameworks/next/wiring.test.js +174 -0
  246. package/dist/scripts/frameworks/nuxt/routes.d.ts +3 -0
  247. package/dist/scripts/frameworks/nuxt/routes.js +54 -0
  248. package/dist/scripts/frameworks/nuxt/template-style.d.ts +9 -0
  249. package/dist/scripts/frameworks/nuxt/template-style.js +27 -0
  250. package/dist/scripts/frameworks/remix/routes.d.ts +3 -0
  251. package/dist/scripts/frameworks/remix/routes.js +50 -0
  252. package/dist/scripts/frameworks/support.d.ts +75 -0
  253. package/dist/scripts/frameworks/support.js +165 -0
  254. package/dist/scripts/frameworks/support.test.d.ts +1 -0
  255. package/dist/scripts/frameworks/support.test.js +87 -0
  256. package/dist/scripts/frameworks/sveltekit/routes.d.ts +3 -0
  257. package/dist/scripts/frameworks/sveltekit/routes.js +50 -0
  258. package/dist/scripts/frameworks/sveltekit/template-style.d.ts +9 -0
  259. package/dist/scripts/frameworks/sveltekit/template-style.js +54 -0
  260. package/dist/scripts/frameworks/vite/routes.d.ts +15 -0
  261. package/dist/scripts/frameworks/vite/routes.js +93 -0
  262. package/dist/scripts/frameworks/vite/routes.test.d.ts +1 -0
  263. package/dist/scripts/frameworks/vite/routes.test.js +73 -0
  264. package/dist/scripts/frameworks/vite/wiring.d.ts +10 -0
  265. package/dist/scripts/frameworks/vite/wiring.js +99 -0
  266. package/dist/scripts/frameworks/vite/wiring.test.d.ts +1 -0
  267. package/dist/scripts/frameworks/vite/wiring.test.js +88 -0
  268. package/dist/scripts/i18n-namespace.d.ts +25 -0
  269. package/dist/scripts/i18n-namespace.js +53 -0
  270. package/dist/scripts/lib/validation-report.d.ts +1 -0
  271. package/dist/scripts/lib/validation-report.js +3 -0
  272. package/dist/scripts/render-parity/capture.d.ts +56 -0
  273. package/dist/scripts/render-parity/capture.js +366 -0
  274. package/dist/scripts/render-parity/capture.test.d.ts +1 -0
  275. package/dist/scripts/render-parity/capture.test.js +306 -0
  276. package/dist/scripts/render-parity/compare.d.ts +59 -0
  277. package/dist/scripts/render-parity/compare.js +0 -0
  278. package/dist/scripts/render-parity/compare.test.d.ts +1 -0
  279. package/dist/scripts/render-parity/compare.test.js +98 -0
  280. package/dist/scripts/render-parity/normalize-html.d.ts +13 -0
  281. package/dist/scripts/render-parity/normalize-html.js +223 -0
  282. package/dist/scripts/render-parity/normalize-html.test.d.ts +1 -0
  283. package/dist/scripts/render-parity/normalize-html.test.js +58 -0
  284. package/dist/scripts/render-parity/types.d.ts +41 -0
  285. package/dist/scripts/render-parity/types.js +1 -0
  286. package/dist/scripts/resolve-routes.js +1 -1
  287. package/dist/scripts/scan-wrappable.d.ts +196 -0
  288. package/dist/scripts/scan-wrappable.js +1227 -0
  289. package/dist/scripts/scan-wrappable.test.d.ts +1 -0
  290. package/dist/scripts/scan-wrappable.test.js +521 -0
  291. package/dist/scripts/validate-route-metadata.js +11 -0
  292. package/package.json +92 -5
  293. package/release.json +2 -2
  294. package/templates/react-router/package.json +7 -10
  295. package/dist/runtime/paths/get-fimo-paths.test.d.ts +0 -2
  296. package/dist/runtime/paths/get-fimo-paths.test.d.ts.map +0 -1
  297. package/dist/runtime/paths/get-fimo-paths.test.js +0 -69
@@ -14,7 +14,7 @@ You are writing code in a Fimo project — a content + media + forms + analytics
14
14
 
15
15
  This skill is version-locked to this project's installed `fimo` package — the shapes here match what your code can actually use.
16
16
 
17
- For CLI commands and workflows (creating a project, pushing schemas/forms, deploying, managing labels, etc.), the **`fimo-cli`** skill is the source of truth. Run every CLI command as `npx fimo@latest <command>` (always the latest, no global install). If `fimo-cli` isn't loaded for your AI tool, register it with `npx fimo@latest skills install --mode=copy`.
17
+ For CLI commands and workflows (creating a project, pushing schemas/forms, deploying, managing labels, etc.), the **`fimo-cli`** skill is the source of truth. Run every CLI command as `npx fimo <command>` when the project declares a `fimo` dependency (it pins the version matching the project's backend); otherwise use `npx fimo@latest`. If `fimo-cli` isn't loaded for your AI tool, register it with `npx fimo skills install --mode=copy`.
18
18
 
19
19
  ## Critical: NEVER hardcode user-facing things
20
20
 
@@ -43,7 +43,7 @@ Workflow / CLI-side concerns (pushing schemas, generating images, managing label
43
43
  ## Decision Tree (specific tasks)
44
44
 
45
45
  - **Setting up Fimo in a new project** — pick the framework:
46
- - React Router framework mode (new projects use React Router 8) → `references/setup-react-router.md`
46
+ - React Router 7 framework mode → `references/setup-react-router.md`
47
47
  - Plain Vite + React (or upgrading a legacy v3 project) → `references/setup-plain-vite.md`
48
48
  - Writing schema JSON / picking field types / Tiptap richtext → `references/content.md`
49
49
  - Writing form JSON / generated form client / form code → `references/forms.md`
@@ -67,14 +67,6 @@ This helper exists so the Fimo UI route selector, preview navigation, labels, an
67
67
 
68
68
  Copyable examples live in `assets/react-router-locales/routes.ts` and `assets/react-router-locales/navigation.tsx`.
69
69
 
70
- ## Existing Custom Locale Systems
71
-
72
- Before changing a multilingual app, inspect its locale provider, route table, language switcher, redirects, and current public URLs. Preserve that behavior while migrating.
73
-
74
- For React Router projects, prefer converging on one locale contract owned by `fimo-config.json`, `fimoRoutes()`, and `FimoLink`. Move existing providers and language-switcher UI into the framework root instead of replacing them or adding a second locale context. Keep route metadata canonical and reuse page modules across locales.
75
-
76
- If adopting the standard helper would change established public URLs, do not silently rewrite them. Keep the custom router temporarily, pass its resolved locale to `<FimoProviders locale={locale}>`, and ask the user to choose the canonical URLs and redirects before normalizing the route table.
77
-
78
70
  ## Links
79
71
 
80
72
  Use `FimoLink` for internal links that should preserve or switch locale:
@@ -1,4 +1,4 @@
1
- # Setup Fimo on React Router 8
1
+ # Setup Fimo on React Router 7
2
2
 
3
3
  This recipe describes the canonical Fimo + React Router framework-mode setup.
4
4
  It mirrors what `fimo init` scaffolds today; you can also apply it to an
@@ -6,7 +6,7 @@ existing RR project.
6
6
 
7
7
  ## Prerequisites
8
8
 
9
- - Node 22.22+
9
+ - Node 20+
10
10
  - A Fimo project created via `fimo init` (gives you `projectId`,
11
11
  `organizationId`, and an `apiUrl`).
12
12
 
@@ -42,7 +42,7 @@ The template uses **Vite + React 19 + TypeScript + Tailwind v4 + shadcn/ui + rea
42
42
 
43
43
  ### Routing
44
44
 
45
- - This template uses React Router 8 framework mode (file-based route config in `src/routes.ts`). Use `<FimoLink>` from `fimo/react-router` for locale-aware internal links, especially in projects with more than one configured locale. Use React Router `<Link>` / `<NavLink>` only when you intentionally do not want Fimo's locale behavior. Never raw `<a href="/...">` for internal navigation because it causes full page reloads.
45
+ - This template uses React Router v7 framework mode (file-based route config in `src/routes.ts`). Use `<FimoLink>` from `fimo/react-router` for locale-aware internal links, especially in projects with more than one configured locale. Use React Router `<Link>` / `<NavLink>` only when you intentionally do not want Fimo's locale behavior. Never raw `<a href="/...">` for internal navigation because it causes full page reloads.
46
46
  - Reserve `<a>` for external links, with `target="_blank" rel="noreferrer"`.
47
47
 
48
48
  ### Loading states
@@ -20,9 +20,6 @@ Steps 1, 3, and 5 reference the project skill (`fimo`) for shape and React API.
20
20
 
21
21
  ```bash
22
22
  fimo schemas push [TypeName] # push JSON to API (create or update). Omit TypeName to push all.
23
- # Pushing all sends every schema as ONE atomic batch, so types that
24
- # reference each other (even cycles) can be added in a single push.
25
- # Files not present are never deleted — use `schemas delete` for that.
26
23
  fimo schemas list # list all registered schemas
27
24
  fimo schemas get <TypeName> # get a single schema
28
25
  fimo schemas delete <TypeName> # delete a schema
@@ -67,12 +67,6 @@ import { fimoRoutes } from 'fimo/react-router/routes';
67
67
 
68
68
  For custom frameworks, the project may implement its own URL scheme, but it still needs to pass the active locale into Fimo and keep canonical route metadata if it wants Fimo Studio route selection to work.
69
69
 
70
- ## Migrate An Existing Locale System
71
-
72
- Inspect the existing locale provider, route table, switcher, redirects, and public URLs before editing configuration. Preserve working URL behavior during the migration.
73
-
74
- For React Router projects, prefer one contract based on `fimo-config.json`, `fimoRoutes()`, and `FimoLink`; migrate existing wrappers into the framework root instead of layering a second locale context. If that would change established URLs, keep the custom router temporarily, pass its active locale to `FimoProviders`, and ask the user to choose canonical URLs and redirects before rewriting routes.
75
-
76
70
  ## Labels And Content
77
71
 
78
72
  Labels and content are separate translated surfaces:
@@ -17,7 +17,10 @@ exports, source repositories, CMS exports, media folders, or any hybrid of those
17
17
  It owns intake, source inventory, URL crawl bootstrapping, ledger normalization,
18
18
  imports, and QA so any LLM can run the work without silently dropping content.
19
19
 
20
- > Run every `fimo` command as `npx fimo@latest <command>` — always the latest CLI, no global install.
20
+ > Run every `fimo` command as `npx fimo <command>` when the project declares a
21
+ > `fimo` dependency (adopted/wrapped projects pin an exact version tied to their
22
+ > backend — never override it with `@latest`). Only fall back to
23
+ > `npx fimo@latest` when the project has no `fimo` dependency.
21
24
 
22
25
  ## Non-Negotiables
23
26
 
@@ -30,6 +33,13 @@ imports, and QA so any LLM can run the work without silently dropping content.
30
33
  ledger.
31
34
  - Source exports beat inferred crawls. If CSV/XML/JSON exports, media folders, or
32
35
  source code exist, treat the public URL as visual/SEO reference only.
36
+ - A working JS codebase is wrapped, not rewritten. Wrap mode
37
+ (`references/wrap.md`) keeps the user's routing, styling, and components
38
+ untouched; the diff is wiring + wrappers + config only. As the coding
39
+ agent you own the whole wrap loop — run `npx fimo migrate` yourself and
40
+ follow `references/wrap.md` § W0 (relay the recorded data-source
41
+ decisions to the user, then loop `npx fimo migrate wrap --check` to
42
+ exit 0).
33
43
  - Builder HTML is evidence, not the final runtime. Rebuild with Fimo conventions,
34
44
  schemas, forms, media primitives, translations, and routes.
35
45
  - Do not report completion until the QA gate passes or every failed check is
@@ -59,7 +69,15 @@ imports, and QA so any LLM can run the work without silently dropping content.
59
69
  pack.
60
70
  - **hybrid**: source files plus public URL. Use source-backed as truth and URL
61
71
  for route, SEO, visual, and behavior comparison.
62
- 4. Create or update the canonical ledger described in
72
+ 4. Pick the mode:
73
+ - **wrap** (default for a source-backed, working JS codebase — Next.js,
74
+ Vite/React, React Router): keep the user's stack, adopt the repo with
75
+ `fimo init`, and make content editable by wrapping it in place. Never
76
+ rewrite routing, styling, or components. Follow `references/wrap.md`.
77
+ - **rebuild**: url-only sources, builder exports/HTML dumps, non-JS
78
+ backends, or codebases that do not build. Follow the standard workflow
79
+ phases.
80
+ 5. Create or update the canonical ledger described in
63
81
  `references/manifest.md`.
64
82
 
65
83
  ## Workflow
@@ -96,6 +114,8 @@ node <this-skill>/scripts/write-migration-report.mjs <project-root>
96
114
  ## References
97
115
 
98
116
  - `references/workflow.md` - full decision tree and phase order.
117
+ - `references/wrap.md` - wrap mode: adopt a working JS codebase and wrap its
118
+ content in place (default for source-backed JS sites).
99
119
  - `references/manifest.md` - canonical migration ledger schema.
100
120
  - `references/content.md` - CMS, entries, references, and source value rules.
101
121
  - `references/media.md` - media inventory, upload, dedupe, and replacement rules.
@@ -18,6 +18,14 @@ ways:
18
18
  news teasers, and feature lists are almost always collections even when the
19
19
  source renders them inside one page.
20
20
 
21
+ > **Rebuild path only.** These rules apply when Fimo re-authors the site
22
+ > (URL/export migrations): the rebuilt code is disposable, so content belongs
23
+ > in collections aggressively. **Wrap mode is deliberately stricter** — the
24
+ > user's code stays primary, page furniture and nav stay in code with `t()`
25
+ > labels, and every collection candidate is confirmed with the user first.
26
+ > See `wrap.md` (W0 and the generated agent-prompt) — in wrap mode that
27
+ > guidance overrides this section.
28
+
21
29
  After the source-faithful rebuild, treat **any hardcoded array of 3+ items with
22
30
  the same shape** as a collection candidate. Do not leave it hardcoded.
23
31
 
@@ -34,6 +34,7 @@ follow-up agents, and import/QA checks.
34
34
  "seo": [],
35
35
  "unsupported": [],
36
36
  "unresolved": [],
37
+ "wrap": null,
37
38
  "qa": {
38
39
  "status": "not-run|passed|failed|passed-with-unresolved",
39
40
  "checks": []
@@ -41,6 +42,40 @@ follow-up agents, and import/QA checks.
41
42
  }
42
43
  ```
43
44
 
45
+ ## Wrap Block (wrap mode only)
46
+
47
+ When the migration is a wrap (see `references/wrap.md`), set
48
+ `source.mode: "source-backed"` and fill the `wrap` block; leave it `null` for
49
+ rebuild migrations:
50
+
51
+ ```json
52
+ {
53
+ "wrap": {
54
+ "mode": "wrap",
55
+ "framework": "next|react-router|vite",
56
+ "adopted": true,
57
+ "wired": true,
58
+ "coverage": {
59
+ "wrappable": 0,
60
+ "wrapped": 25,
61
+ "ignored": 0,
62
+ "unresolvedItems": 0
63
+ },
64
+ "seeded": {
65
+ "labels": 21,
66
+ "wrappedMedia": 3,
67
+ "wrappedRichText": 1
68
+ },
69
+ "planPath": ".fimo/migration/plan.json"
70
+ }
71
+ }
72
+ ```
73
+
74
+ `coverage` mirrors the final `fimo migrate wrap --check` output: `wrappable`
75
+ must be 0 (or fully accounted for by `ignored` + `unresolvedItems`, each with a
76
+ ledger entry). `seeded` counts must match what `fimo labels list` /
77
+ `fimo entries list` report — fallback-only content is not seeded.
78
+
44
79
  ## Required Item Fields
45
80
 
46
81
  Every route, content type, entry batch, media asset, form, redirect, locale, SEO
@@ -18,8 +18,11 @@ Run this gate before reporting completion.
18
18
  ## Behavior
19
19
 
20
20
  - Dependencies are installed in the target project.
21
- - The project builds successfully.
22
- - Local dev starts without Vite loader/schema/form generation errors.
21
+ - The project builds successfully **with its own toolchain** (`next build`,
22
+ `vite build`, …) — wrapped sites are not Vite/React-Router projects; never
23
+ assume Fimo-template tooling.
24
+ - Local dev starts without loader/schema/form generation errors (Vite errors
25
+ apply to rebuild-mode projects only).
23
26
  - Primary routes render without console/runtime errors.
24
27
  - Collection listing/detail pages work with imported data, seed data, or explicit
25
28
  empty states.
@@ -33,6 +36,25 @@ Run this gate before reporting completion.
33
36
  - Remove generated placeholder copy from visible UI.
34
37
  - Verify media aspect ratios and no broken images on primary routes.
35
38
 
39
+ ## Wrap Mode (additional blocking checks)
40
+
41
+ When the manifest says `mode: "wrap"`:
42
+
43
+ - `fimo migrate wrap --check` exits zero — it enforces coverage (zero
44
+ unwrapped items), render parity (rendered text/marks/media/links identical
45
+ to the pre-wrap baseline), and seeding (every wrapped key exists in the
46
+ database) — or every remaining item is an explicit ignored/unresolved
47
+ ledger entry with a reason.
48
+ - Labels are seeded: every `FimoText`/`t()` key exists in `fimo labels list`
49
+ with the original string. Fallback-only content fails the gate.
50
+ - Wrapped media/rich text have their `WrappedMedia`/`WrappedRichText` entries
51
+ created and assets uploaded.
52
+ - Render parity: pages render identically to pre-migration — same text, same
53
+ formatting marks (bold/italic/underline/links), same media.
54
+ - Diff audit: the migration diff contains only wiring, wrappers, label calls,
55
+ config, and dependency changes. Any routing/styling/component rewrite fails
56
+ the gate.
57
+
36
58
  ## Import Verification
37
59
 
38
60
  Record:
@@ -2,6 +2,14 @@
2
2
 
3
3
  Use this as the phase contract for complete migrations.
4
4
 
5
+ > **Mode fork.** For a source-backed, WORKING JS codebase (Next.js, Vite/React,
6
+ > React Router), wrap mode is the default: skip Phases 0 and 6 below and follow
7
+ > `references/wrap.md` (adopt via `fimo init`, scan via `fimo migrate wrap`,
8
+ > wrap in place, seed, verify). Phases 3–5 (content model, media/forms, import)
9
+ > and Phase 8 (QA + report) still apply — wrap changes how content becomes
10
+ > editable, not the accounting obligations. Everything else here is the rebuild
11
+ > path.
12
+
5
13
  ## Phase 0: Target Safety
6
14
 
7
15
  1. Confirm the target path.
@@ -119,7 +127,10 @@ Required order:
119
127
  Record target IDs, import counts, failures, and unresolved items in the
120
128
  canonical ledger. Generated JSON without import counts is still draft state.
121
129
 
122
- ## Phase 6: Fimo Implementation
130
+ ## Phase 6: Fimo Implementation (rebuild mode)
131
+
132
+ In wrap mode this phase is replaced by `references/wrap.md` phases W3–W5
133
+ (wire, wrap, seed); do not rebuild pages for a wrapped site.
123
134
 
124
135
  Implement routes, schemas, forms, entries, media, redirects, translations, and
125
136
  React pages with Fimo conventions.