fimo 0.21.0-staging.4 → 0.21.0-staging.6

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 (310) hide show
  1. package/assets/skills/fimo/SKILL.md +1 -1
  2. package/assets/skills/fimo-cli/SKILL.md +1 -1
  3. package/assets/skills/fimo-cli/references/assets.md +25 -1
  4. package/assets/skills/fimo-cli/references/branches.md +4 -1
  5. package/assets/skills/fimo-cli/references/forms.md +1 -1
  6. package/assets/skills/fimo-cli/references/init.md +17 -5
  7. package/assets/skills/fimo-cli/references/integrations.md +24 -0
  8. package/assets/skills/fimo-cli/references/mcp.md +98 -57
  9. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +3 -1
  10. package/assets/skills/fimo-cli/references/projects.md +2 -2
  11. package/assets/skills/fimo-code/assets/react-router-locales/navigation.tsx +1 -1
  12. package/assets/skills/fimo-code/references/assets.md +2 -2
  13. package/assets/skills/fimo-code/references/best-practices/next.md +1 -1
  14. package/assets/skills/fimo-code/references/forms.md +1 -1
  15. package/assets/skills/fimo-code/references/frameworks/astro.md +8 -2
  16. package/assets/skills/fimo-code/references/frameworks/compatibility.md +9 -9
  17. package/assets/skills/fimo-code/references/frameworks/hosting.md +17 -13
  18. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +8 -9
  19. package/assets/skills/fimo-code/references/frameworks/next/locales.md +1 -1
  20. package/assets/skills/fimo-code/references/frameworks/next/pages-router.md +5 -5
  21. package/assets/skills/fimo-code/references/frameworks/next.md +41 -32
  22. package/assets/skills/fimo-code/references/frameworks/react-router.md +8 -6
  23. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +19 -10
  24. package/assets/skills/fimo-code/references/frameworks/vite-react.md +7 -5
  25. package/assets/skills/fimo-code/references/labels.md +4 -4
  26. package/assets/skills/fimo-code/references/ui.md +4 -4
  27. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +12 -15
  28. package/assets/skills/fimo-migration/references/media.md +4 -2
  29. package/assets/skills/fimo-migration/references/qa.md +10 -8
  30. package/assets/skills/fimo-migration/references/workers/content-planner.md +20 -10
  31. package/assets/skills/fimo-migration/references/workflow.md +8 -6
  32. package/assets/skills/fimo-migration/scripts/retrieval/strapi/public-content.mjs +243 -0
  33. package/assets/skills/fimo-migration/scripts/retrieval/strapi/source-schema.mjs +148 -0
  34. package/assets/skills/fimo-studio/SKILL.md +3 -1
  35. package/assets/skills/fimo-studio/references/command-palette.md +8 -3
  36. package/assets/skills/fimo-studio/references/connections.md +52 -0
  37. package/assets/skills/fimo-studio/references/webhooks.md +1 -1
  38. package/assets/starters/fimo-site/template/src/pages/Contact.tsx +1 -1
  39. package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +1 -1
  40. package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +3 -3
  41. package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +1 -1
  42. package/dist/build/astro/config.d.ts +13 -2
  43. package/dist/build/astro/config.js +9 -24
  44. package/dist/build/next/moved.d.ts +2 -0
  45. package/dist/build/next/moved.js +2 -0
  46. package/dist/build/react/router-moved.d.ts +2 -0
  47. package/dist/build/react/router-moved.js +2 -0
  48. package/dist/build/react/router-preset-moved.d.ts +2 -0
  49. package/dist/build/react/router-preset-moved.js +2 -0
  50. package/dist/build/react/router-routes-moved.d.ts +2 -0
  51. package/dist/build/react/router-routes-moved.js +2 -0
  52. package/dist/build/react/ui-moved.d.ts +2 -0
  53. package/dist/build/react/ui-moved.js +2 -0
  54. package/dist/build/react/vite-moved.d.ts +2 -0
  55. package/dist/build/react/vite-moved.js +2 -0
  56. package/dist/build/sveltekit/config.d.ts +5 -4
  57. package/dist/build/sveltekit/config.js +6 -15
  58. package/dist/build/sveltekit/moved.d.ts +13 -0
  59. package/dist/build/sveltekit/moved.js +3 -0
  60. package/dist/build/vite/data-id.d.ts +11 -0
  61. package/dist/build/vite/data-id.js +20 -0
  62. package/dist/build/vite/plugins/runtime-env.d.ts +1 -1
  63. package/dist/build/vite/plugins/runtime-env.js +6 -2
  64. package/dist/build/vite/runtime-env.d.ts +2 -0
  65. package/dist/build/vite/runtime-env.js +1 -0
  66. package/dist/cli/bundle.json +1 -1
  67. package/dist/cli/index.js +82 -86
  68. package/dist/runtime/content/client/internal.js +1 -1
  69. package/dist/runtime/content/index.d.ts +6 -1
  70. package/dist/runtime/content/index.js +6 -0
  71. package/dist/runtime/i18n/index.d.ts +2 -0
  72. package/dist/runtime/i18n/index.js +1 -0
  73. package/dist/runtime/labels/index.d.ts +3 -0
  74. package/dist/runtime/labels/index.js +2 -0
  75. package/dist/runtime/preview/index.d.ts +5 -0
  76. package/dist/runtime/preview/index.js +4 -0
  77. package/dist/runtime/primitives/lib/index.d.ts +2 -0
  78. package/dist/runtime/primitives/lib/index.js +2 -0
  79. package/dist/runtime/seo/index.d.ts +0 -8
  80. package/dist/runtime/seo/index.js +0 -8
  81. package/dist/runtime/shared/config.d.ts +6 -0
  82. package/dist/runtime/shared/config.js +4 -0
  83. package/dist/runtime/shared/local-runtime-env.d.ts +2 -2
  84. package/dist/runtime/shared/local-runtime-env.js +7 -5
  85. package/dist/runtime/templates.d.ts +21 -5
  86. package/dist/runtime/templates.js +61 -19
  87. package/dist/scripts/extract-translations.js +8 -3
  88. package/dist/scripts/index.d.ts +3 -0
  89. package/dist/scripts/index.js +2 -0
  90. package/dist/scripts/sync-forms.js +21 -9
  91. package/dist/scripts/sync-schemas.js +45 -21
  92. package/package.json +76 -82
  93. package/templates/astro/astro.config.mjs +1 -1
  94. package/templates/astro/package.json +2 -1
  95. package/templates/nextjs/AGENTS.md +1 -1
  96. package/templates/nextjs/next.config.ts +1 -1
  97. package/templates/nextjs/package.json +2 -1
  98. package/templates/nextjs/src/app/layout.tsx +1 -1
  99. package/templates/react-router/package.json +3 -1
  100. package/templates/react-router/react-router.config.ts +1 -1
  101. package/templates/react-router/src/pages/LocaleLayout.tsx +1 -1
  102. package/templates/react-router/src/pages/legal/LegalPage.tsx +1 -1
  103. package/templates/react-router/src/root.tsx +1 -1
  104. package/templates/react-router/vite.config.ts +1 -1
  105. package/templates/sveltekit/package.json +2 -1
  106. package/templates/sveltekit/src/error.html +51 -0
  107. package/templates/sveltekit/src/routes/+error.svelte +50 -0
  108. package/templates/sveltekit/src/routes/+layout.server.ts +1 -1
  109. package/templates/sveltekit/src/routes/+layout.svelte +1 -1
  110. package/templates/sveltekit/svelte.config.js +1 -1
  111. package/templates/sveltekit/vite.config.ts +1 -1
  112. package/templates/vite/.fimo/config.json +28 -0
  113. package/templates/vite/AGENTS.md +43 -0
  114. package/templates/vite/CLAUDE.md +5 -0
  115. package/templates/vite/_gitignore +13 -0
  116. package/templates/vite/index.html +12 -0
  117. package/templates/vite/package.json +32 -0
  118. package/templates/vite/pnpm-workspace.yaml +8 -0
  119. package/templates/vite/src/App.tsx +14 -0
  120. package/templates/vite/src/LocaleLayout.tsx +12 -0
  121. package/templates/vite/src/index.css +61 -0
  122. package/templates/vite/src/main.tsx +20 -0
  123. package/templates/vite/src/vite-env.d.ts +1 -0
  124. package/templates/vite/tsconfig.json +17 -0
  125. package/templates/vite/vite.config.ts +7 -0
  126. package/assets/sveltekit/components/Boolean.svelte +0 -19
  127. package/assets/sveltekit/components/Date.svelte +0 -33
  128. package/assets/sveltekit/components/DateTime.svelte +0 -35
  129. package/assets/sveltekit/components/FimoProvider.svelte +0 -35
  130. package/assets/sveltekit/components/Image.svelte +0 -80
  131. package/assets/sveltekit/components/Json.svelte +0 -18
  132. package/assets/sveltekit/components/Label.svelte +0 -16
  133. package/assets/sveltekit/components/Number.svelte +0 -21
  134. package/assets/sveltekit/components/RichText.svelte +0 -19
  135. package/assets/sveltekit/components/Text.svelte +0 -30
  136. package/assets/sveltekit/components/Video.svelte +0 -37
  137. package/assets/sveltekit/components/index.d.ts +0 -11
  138. package/assets/sveltekit/components/index.js +0 -11
  139. package/dist/build/next/config.d.ts +0 -17
  140. package/dist/build/next/config.js +0 -66
  141. package/dist/build/sveltekit/data-id.d.ts +0 -3
  142. package/dist/build/sveltekit/data-id.js +0 -171
  143. package/dist/build/sveltekit/files/edge.js +0 -68
  144. package/dist/build/sveltekit/files/serverless.js +0 -42
  145. package/dist/build/sveltekit/vite.d.ts +0 -12
  146. package/dist/build/sveltekit/vite.js +0 -14
  147. package/dist/build/vite/index.d.ts +0 -42
  148. package/dist/build/vite/index.js +0 -160
  149. package/dist/build/vite/plugins/content-sync.d.ts +0 -11
  150. package/dist/build/vite/plugins/content-sync.js +0 -41
  151. package/dist/build/vite/plugins/data-id.d.ts +0 -12
  152. package/dist/build/vite/plugins/data-id.js +0 -109
  153. package/dist/build/vite/plugins/fimo-config.d.ts +0 -12
  154. package/dist/build/vite/plugins/fimo-config.js +0 -68
  155. package/dist/build/vite/plugins/overlay.d.ts +0 -3
  156. package/dist/build/vite/plugins/overlay.js +0 -154
  157. package/dist/build/vite/plugins/robots.d.ts +0 -10
  158. package/dist/build/vite/plugins/robots.js +0 -56
  159. package/dist/build/vite/plugins/seo.d.ts +0 -3
  160. package/dist/build/vite/plugins/seo.js +0 -112
  161. package/dist/build/vite/plugins/server-config.d.ts +0 -3
  162. package/dist/build/vite/plugins/server-config.js +0 -36
  163. package/dist/build/vite/plugins/sitemap.d.ts +0 -3
  164. package/dist/build/vite/plugins/sitemap.js +0 -73
  165. package/dist/build/vite/plugins/translations.d.ts +0 -11
  166. package/dist/build/vite/plugins/translations.js +0 -601
  167. package/dist/runtime/app/FimoProviders.d.ts +0 -30
  168. package/dist/runtime/app/FimoProviders.js +0 -193
  169. package/dist/runtime/app/FimoScripts.d.ts +0 -13
  170. package/dist/runtime/app/FimoScripts.js +0 -45
  171. package/dist/runtime/app/index.d.ts +0 -8
  172. package/dist/runtime/app/index.js +0 -4
  173. package/dist/runtime/app/prefetch.d.ts +0 -9
  174. package/dist/runtime/app/prefetch.js +0 -39
  175. package/dist/runtime/content/DataSourcesProvider.d.ts +0 -4
  176. package/dist/runtime/content/DataSourcesProvider.js +0 -63
  177. package/dist/runtime/content/RefreshContentProvider.d.ts +0 -19
  178. package/dist/runtime/content/RefreshContentProvider.js +0 -71
  179. package/dist/runtime/content/client/createContentClient.d.ts +0 -7
  180. package/dist/runtime/content/client/createContentClient.js +0 -7
  181. package/dist/runtime/content/client/createSingletonClient.d.ts +0 -5
  182. package/dist/runtime/content/client/createSingletonClient.js +0 -6
  183. package/dist/runtime/content/client/react-content-client.d.ts +0 -10
  184. package/dist/runtime/content/client/react-content-client.js +0 -165
  185. package/dist/runtime/content/client/react-singleton-client.d.ts +0 -7
  186. package/dist/runtime/content/client/react-singleton-client.js +0 -38
  187. package/dist/runtime/content/client/types.d.ts +0 -42
  188. package/dist/runtime/content/client/types.js +0 -1
  189. package/dist/runtime/content/client/useQueryLocale.d.ts +0 -2
  190. package/dist/runtime/content/client/useQueryLocale.js +0 -5
  191. package/dist/runtime/content/client/vite-runtime.d.ts +0 -3
  192. package/dist/runtime/content/client/vite-runtime.js +0 -23
  193. package/dist/runtime/content/utils/retrieve-data-sources.d.ts +0 -29
  194. package/dist/runtime/content/utils/retrieve-data-sources.js +0 -107
  195. package/dist/runtime/core/AppErrorBoundary.d.ts +0 -10
  196. package/dist/runtime/core/AppErrorBoundary.js +0 -27
  197. package/dist/runtime/core/ViteLifecycles.d.ts +0 -5
  198. package/dist/runtime/core/ViteLifecycles.js +0 -35
  199. package/dist/runtime/i18n/FimoLocaleContext.d.ts +0 -9
  200. package/dist/runtime/i18n/FimoLocaleContext.js +0 -17
  201. package/dist/runtime/iframe/ConsoleErrorProvider.d.ts +0 -3
  202. package/dist/runtime/iframe/ConsoleErrorProvider.js +0 -103
  203. package/dist/runtime/iframe/ScreenshotProvider.d.ts +0 -3
  204. package/dist/runtime/iframe/ScreenshotProvider.js +0 -60
  205. package/dist/runtime/iframe/runtime/overlay-hmr.d.ts +0 -2
  206. package/dist/runtime/iframe/runtime/overlay-hmr.js +0 -27
  207. package/dist/runtime/iframe/runtime/overlay-runtime.d.ts +0 -2
  208. package/dist/runtime/iframe/runtime/overlay-runtime.js +0 -103
  209. package/dist/runtime/index.d.ts +0 -22
  210. package/dist/runtime/index.js +0 -23
  211. package/dist/runtime/next/client-runtime.d.ts +0 -3
  212. package/dist/runtime/next/client-runtime.js +0 -24
  213. package/dist/runtime/next/client.d.ts +0 -28
  214. package/dist/runtime/next/client.js +0 -25
  215. package/dist/runtime/next/facade.d.ts +0 -8
  216. package/dist/runtime/next/facade.js +0 -34
  217. package/dist/runtime/next/labels.d.ts +0 -7
  218. package/dist/runtime/next/labels.js +0 -9
  219. package/dist/runtime/next/preview.d.ts +0 -13
  220. package/dist/runtime/next/preview.js +0 -34
  221. package/dist/runtime/next/primitives/Text.d.ts +0 -10
  222. package/dist/runtime/next/primitives/Text.js +0 -18
  223. package/dist/runtime/next/primitives/server.d.ts +0 -11
  224. package/dist/runtime/next/primitives/server.js +0 -54
  225. package/dist/runtime/next/provider.d.ts +0 -13
  226. package/dist/runtime/next/provider.js +0 -54
  227. package/dist/runtime/next/server-runtime.d.ts +0 -3
  228. package/dist/runtime/next/server-runtime.js +0 -23
  229. package/dist/runtime/next/server.d.ts +0 -21
  230. package/dist/runtime/next/server.js +0 -16
  231. package/dist/runtime/primitives/index.d.ts +0 -16
  232. package/dist/runtime/primitives/index.js +0 -17
  233. package/dist/runtime/react/primitives/contracts.d.ts +0 -100
  234. package/dist/runtime/react/primitives/contracts.js +0 -1
  235. package/dist/runtime/react/primitives/editable/Boolean.d.ts +0 -5
  236. package/dist/runtime/react/primitives/editable/Boolean.js +0 -11
  237. package/dist/runtime/react/primitives/editable/Date.d.ts +0 -4
  238. package/dist/runtime/react/primitives/editable/Date.js +0 -12
  239. package/dist/runtime/react/primitives/editable/DateTime.d.ts +0 -4
  240. package/dist/runtime/react/primitives/editable/DateTime.js +0 -13
  241. package/dist/runtime/react/primitives/editable/Image.d.ts +0 -4
  242. package/dist/runtime/react/primitives/editable/Image.js +0 -10
  243. package/dist/runtime/react/primitives/editable/Json.d.ts +0 -5
  244. package/dist/runtime/react/primitives/editable/Json.js +0 -11
  245. package/dist/runtime/react/primitives/editable/RichText.d.ts +0 -4
  246. package/dist/runtime/react/primitives/editable/RichText.js +0 -11
  247. package/dist/runtime/react/primitives/editable/Text.d.ts +0 -20
  248. package/dist/runtime/react/primitives/editable/Text.js +0 -36
  249. package/dist/runtime/react/primitives/editable/Video.d.ts +0 -4
  250. package/dist/runtime/react/primitives/editable/Video.js +0 -10
  251. package/dist/runtime/react/primitives/renderers/DateRenderer.d.ts +0 -17
  252. package/dist/runtime/react/primitives/renderers/DateRenderer.js +0 -17
  253. package/dist/runtime/react/primitives/renderers/ImageRenderer.d.ts +0 -8
  254. package/dist/runtime/react/primitives/renderers/ImageRenderer.js +0 -31
  255. package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +0 -12
  256. package/dist/runtime/react/primitives/renderers/RichTextRenderer.js +0 -135
  257. package/dist/runtime/react/primitives/renderers/StaticImage.d.ts +0 -35
  258. package/dist/runtime/react/primitives/renderers/StaticImage.js +0 -58
  259. package/dist/runtime/react/primitives/renderers/VideoRenderer.d.ts +0 -8
  260. package/dist/runtime/react/primitives/renderers/VideoRenderer.js +0 -10
  261. package/dist/runtime/react/useFimoLiveValue.d.ts +0 -20
  262. package/dist/runtime/react/useFimoLiveValue.js +0 -43
  263. package/dist/runtime/react-router/active-routes.d.ts +0 -12
  264. package/dist/runtime/react-router/active-routes.js +0 -60
  265. package/dist/runtime/react-router/index.d.ts +0 -16
  266. package/dist/runtime/react-router/index.js +0 -20
  267. package/dist/runtime/react-router/legacy/routes.d.ts +0 -35
  268. package/dist/runtime/react-router/legacy/routes.js +0 -86
  269. package/dist/runtime/react-router/navigation-utils.d.ts +0 -8
  270. package/dist/runtime/react-router/navigation-utils.js +0 -36
  271. package/dist/runtime/react-router/navigation.d.ts +0 -12
  272. package/dist/runtime/react-router/navigation.js +0 -28
  273. package/dist/runtime/react-router/preset.d.ts +0 -30
  274. package/dist/runtime/react-router/preset.js +0 -33
  275. package/dist/runtime/routing/AppResetScrollOnNavigate.d.ts +0 -2
  276. package/dist/runtime/routing/AppResetScrollOnNavigate.js +0 -12
  277. package/dist/runtime/routing/AppRoutesProvider.d.ts +0 -25
  278. package/dist/runtime/routing/AppRoutesProvider.js +0 -112
  279. package/dist/runtime/seo/buildSeoForPath.d.ts +0 -74
  280. package/dist/runtime/seo/buildSeoForPath.js +0 -55
  281. package/dist/runtime/seo/htmlProps.d.ts +0 -13
  282. package/dist/runtime/seo/htmlProps.js +0 -15
  283. package/dist/runtime/sveltekit/content.d.ts +0 -25
  284. package/dist/runtime/sveltekit/content.js +0 -33
  285. package/dist/runtime/sveltekit/context-contract.d.ts +0 -5
  286. package/dist/runtime/sveltekit/context-contract.js +0 -2
  287. package/dist/runtime/sveltekit/context.d.ts +0 -8
  288. package/dist/runtime/sveltekit/context.js +0 -25
  289. package/dist/runtime/sveltekit/forms.d.ts +0 -15
  290. package/dist/runtime/sveltekit/forms.js +0 -15
  291. package/dist/runtime/sveltekit/index.d.ts +0 -9
  292. package/dist/runtime/sveltekit/index.js +0 -5
  293. package/dist/runtime/sveltekit/internal.d.ts +0 -6
  294. package/dist/runtime/sveltekit/internal.js +0 -12
  295. package/dist/runtime/sveltekit/labels.d.ts +0 -20
  296. package/dist/runtime/sveltekit/labels.js +0 -13
  297. package/dist/runtime/sveltekit/preview.d.ts +0 -27
  298. package/dist/runtime/sveltekit/preview.js +0 -69
  299. package/dist/runtime/sveltekit/runtime.d.ts +0 -9
  300. package/dist/runtime/sveltekit/runtime.js +0 -26
  301. package/dist/runtime/t/OptionalTracking.d.ts +0 -13
  302. package/dist/runtime/t/OptionalTracking.js +0 -28
  303. package/dist/runtime/t/Pageview.d.ts +0 -9
  304. package/dist/runtime/t/Pageview.js +0 -118
  305. package/dist/runtime/vite/Label.d.ts +0 -13
  306. package/dist/runtime/vite/Label.js +0 -16
  307. package/dist/runtime/vite/primitives/Images.d.ts +0 -4
  308. package/dist/runtime/vite/primitives/Images.js +0 -12
  309. package/dist/runtime/vite/translations.d.ts +0 -28
  310. package/dist/runtime/vite/translations.js +0 -103
@@ -4,11 +4,10 @@ Preserve the project's existing App Router structure. Fimo does not require a ro
4
4
 
5
5
  ## Root provider
6
6
 
7
- Resolve the locale using the application's existing strategy, fetch labels on the server, and pass the snapshot into the client provider:
7
+ Render the Server Component `FimoProvider` from `fimo-next` once in the root layout. Resolve the locale using the application's existing strategy, fetch labels on the server, and pass the snapshot:
8
8
 
9
9
  ```tsx
10
- import { getLabels } from 'fimo/next';
11
- import { FimoProvider } from 'fimo/next/client';
10
+ import { FimoProvider, getLabels } from 'fimo-next';
12
11
 
13
12
  export default async function RootLayout({ children }: { children: React.ReactNode }) {
14
13
  const locale = 'en'; // replace with the app's own resolver
@@ -24,14 +23,14 @@ export default async function RootLayout({ children }: { children: React.ReactNo
24
23
  }
25
24
  ```
26
25
 
27
- Do not hardcode a locale when the app already resolves one from route params, a cookie, headers/domain, middleware, or an i18n library. Load `references/frameworks/next/locales.md` for those cases.
26
+ The provider resolves the Fimo connection on the server and passes only public connection data to the client tree; no page or component receives a runtime prop and no `<script>` for the preview needs adding. Do not hardcode a locale when the app already resolves one from route params, a cookie, headers/domain, middleware, or an i18n library. Load `references/frameworks/next/locales.md` for those cases.
28
27
 
29
28
  ## Static generation and ISR
30
29
 
31
30
  Server Components may read generated clients directly. Omit `locale` to use the configured default or bind the application-resolved locale once with `createFimo`:
32
31
 
33
32
  ```tsx
34
- import { createFimo, RichText, Text } from 'fimo/next';
33
+ import { createFimo, RichText, Text } from 'fimo-next';
35
34
  import { content } from '@/schemas';
36
35
 
37
36
  export const revalidate = 60;
@@ -51,7 +50,7 @@ export default async function ArticlesPage() {
51
50
 
52
51
  `createFimo({ content, locale })` is a typed locale-bound facade over the generated registry. It does not own routing and does not force SSG.
53
52
 
54
- Static builds that read Fimo must receive the real build-time `FIMO_CONTENT_API_URL` and default locale environment. Do not switch a route to dynamic rendering merely to hide a missing build environment; choose SSG, ISR, or request-time rendering from the application's intended behavior.
53
+ Static builds read Fimo through the same server connection (linked project + branch locally, platform env when hosted). Do not switch a route to dynamic rendering merely to hide a missing connection; choose SSG, ISR, or request-time rendering from the application's intended behavior.
55
54
 
56
55
  ## Request-time rendering
57
56
 
@@ -59,7 +58,7 @@ Use normal Next request APIs and pass the resulting locale/query values to Fimo:
59
58
 
60
59
  ```tsx
61
60
  import { headers } from 'next/headers';
62
- import { createFimo, Text } from 'fimo/next';
61
+ import { createFimo, Text } from 'fimo-next';
63
62
  import { content } from '@/schemas';
64
63
 
65
64
  export const dynamic = 'force-dynamic';
@@ -82,12 +81,12 @@ hydrate with the matching generated `.client` module. Do not pass a raw Fimo
82
81
  value merely because its enumerable fields look JSON-safe. No conversion is
83
82
  needed while the value stays inside server rendering.
84
83
 
85
- Client Components use the generated `.client` module and `fimo/next/client`:
84
+ Client Components use the generated `.client` module and `fimo-next/client`:
86
85
 
87
86
  ```tsx
88
87
  'use client';
89
88
 
90
- import { Text, useLabels } from 'fimo/next/client';
89
+ import { Text, useLabels } from 'fimo-next/client';
91
90
  import * as Article from '@/schemas/Article.client';
92
91
 
93
92
  export function FeaturedArticles() {
@@ -15,7 +15,7 @@ If omitted, both use the configured default locale. Avoid request-global locale
15
15
 
16
16
  ## Client context
17
17
 
18
- Pass the same locale through `FimoProvider`. A matching label snapshot supplies it automatically:
18
+ Pass the same locale through the root `FimoProvider` (`fimo-next` in the App Router layout, `fimo-next/client` in `_app`). A matching label snapshot supplies it automatically:
19
19
 
20
20
  ```tsx
21
21
  const labels = await getLabels({ locale });
@@ -4,10 +4,10 @@ Preserve `pages/` or `src/pages/`. Pages Router sends props through JSON seriali
4
4
 
5
5
  ## Provider in `_app`
6
6
 
7
- Pass each page's label snapshot to one provider:
7
+ Pages Router has no Server Component above `_app`, so `FimoProvider` from `fimo-next/client` is the root integration: it resolves the connection while the server renders `_app`, writes the public connection into the document for the browser, and loads the Studio preview script. Pass each page's label snapshot to it:
8
8
 
9
9
  ```tsx
10
- import { FimoProvider, type LabelsSnapshot } from 'fimo/next/client';
10
+ import { FimoProvider, type LabelsSnapshot } from 'fimo-next/client';
11
11
  import type { AppProps } from 'next/app';
12
12
 
13
13
  type FimoPageProps = { fimoLabels: LabelsSnapshot };
@@ -26,7 +26,7 @@ If the application already has providers, compose Fimo with them; do not replace
26
26
  ## Static generation and ISR
27
27
 
28
28
  ```tsx
29
- import { createFimo, getLabels } from 'fimo/next';
29
+ import { createFimo, getLabels } from 'fimo-next';
30
30
  import type { GetStaticProps, InferGetStaticPropsType } from 'next';
31
31
 
32
32
  import { ArticleView } from '@/components/ArticleView';
@@ -61,7 +61,7 @@ export default function Page({ article: serialized }: InferGetStaticPropsType<ty
61
61
  ## Request-time rendering
62
62
 
63
63
  ```tsx
64
- import { getLabels } from 'fimo/next';
64
+ import { getLabels } from 'fimo-next';
65
65
  import type { GetServerSideProps, InferGetServerSidePropsType } from 'next';
66
66
  import * as Article from '@/schemas/Article';
67
67
  import * as ArticleClient from '@/schemas/Article.client';
@@ -86,7 +86,7 @@ Use the locale/router values Pages Router already supplies. Do not introduce App
86
86
  Interactive components import hooks and primitives from the client surfaces:
87
87
 
88
88
  ```tsx
89
- import { Text, useLabels } from 'fimo/next/client';
89
+ import { Text, useLabels } from 'fimo-next/client';
90
90
  import * as Article from '@/schemas/Article.client';
91
91
 
92
92
  export function SearchResults() {
@@ -21,14 +21,37 @@ hosted publish. Run `fimo validate`; load
21
21
  `references/frameworks/hosting.md` for the shared profile contract and command
22
22
  override rules.
23
23
 
24
+ ## Connection
25
+
26
+ Render `FimoProvider` once at the application root and nothing else: App Router
27
+ imports it from `fimo-next` in the root layout; Pages Router imports it from
28
+ `fimo-next/client` in `pages/_app.tsx`. It resolves the connection on the
29
+ server — explicit platform env first, else the linked project
30
+ (`.fimo/project.json`) plus the active git branch — and passes only the public
31
+ connection to the browser, where generated `.client` hooks, `useLabels`, form
32
+ submission, and the Studio preview script use it. Never add, read, or document
33
+ `FIMO_CONTENT_API_URL` / `NEXT_PUBLIC_FIMO_API_URL` in application code; the
34
+ platform and the provider own them. `FIMO_CONTENT_API_URL` set by a developer is
35
+ a deliberate host override and wins over derivation.
36
+
37
+ ### Edge routes
38
+
39
+ Fimo hosting injects the server connection for Edge routes. No application
40
+ configuration is needed. For a local or custom-hosted Edge route only, run
41
+ `fimo --json link` in the linked checkout and use its exact `tenant_api_url` as
42
+ `FIMO_CONTENT_API_URL` in the dev command or host configuration. Never construct
43
+ the URL, write it to a project env file, or add a `NEXT_PUBLIC_FIMO_*` variable.
44
+ Rerun the command after switching Git branches because each Fimo Branch has its
45
+ own tenant URL.
46
+
24
47
  ## Hosted preview config
25
48
 
26
- Wrap the existing Next config once so Fimo can connect its hosted development
27
- preview without exposing the active preview provider to the application:
49
+ Wrap the existing Next config once so `next dev` accepts Fimo's hosted preview
50
+ origins without exposing the active preview provider to the application:
28
51
 
29
52
  ```ts
30
53
  import type { NextConfig } from 'next';
31
- import { withFimo } from 'fimo/next/config';
54
+ import { withFimo } from 'fimo-next/config';
32
55
 
33
56
  const nextConfig: NextConfig = {};
34
57
  export default withFimo(nextConfig);
@@ -36,29 +59,15 @@ export default withFimo(nextConfig);
36
59
 
37
60
  Preserve all existing config fields or config-function logic. Do not hardcode a
38
61
  preview domain in `allowedDevOrigins`; Fimo supplies it to the development
39
- sandbox. The wrapper does not change production builds.
62
+ sandbox. The wrapper changes nothing outside `next dev` and is not the
63
+ application's Fimo connection.
40
64
 
41
65
  ## Client dependency
42
66
 
43
- Server-only Fimo reads need no client data library. If the app uses `FimoProvider`,
44
- `useLabels`, or generated `.client` hooks, add `@tanstack/react-query` using the
45
- project's package manager. It is an optional `fimo` peer so server-only projects
46
- do not install it automatically.
47
-
48
- ## Runtime URL
49
-
50
- Linked projects need the tenant content API in both Next runtimes:
51
-
52
- ```dotenv
53
- FIMO_CONTENT_API_URL=https://<tenant-api>
54
- NEXT_PUBLIC_FIMO_API_URL=https://<tenant-api>
55
- ```
56
-
57
- Current `fimo init` and `fimo clone` write these alongside `VITE_API_URL` while
58
- preserving user-owned values. `FIMO_API_URL` remains reserved for CLI/control API
59
- overrides. Keep the
60
- server variable private; only the public variable is compiled into Client
61
- Components.
67
+ `fimo-next` requires `@tanstack/react-query` as a peer; add it with the project's
68
+ package manager when it is missing. Generated `.client` hooks and `useLabels`
69
+ run on the React Query client `FimoProvider` supplies (or an application-owned
70
+ one already in context).
62
71
 
63
72
  ## Generate the content surface
64
73
 
@@ -114,10 +123,10 @@ export function ContactForm() {
114
123
  }
115
124
  ```
116
125
 
117
- Server Components, route handlers, `getStaticProps`, and `getServerSideProps` import from `fimo/next` and generated server modules:
126
+ Server Components, route handlers, `getStaticProps`, and `getServerSideProps` import from `fimo-next` and generated server modules:
118
127
 
119
128
  ```ts
120
- import { createFimo, getLabels, Text } from 'fimo/next';
129
+ import { createFimo, getLabels, Text } from 'fimo-next';
121
130
  import { content } from '@/schemas';
122
131
 
123
132
  const fimo = createFimo({ content, locale });
@@ -127,12 +136,12 @@ const [articles, labels] = await Promise.all([
127
136
  ]);
128
137
  ```
129
138
 
130
- Client Components import from `fimo/next/client` and generated `.client` modules:
139
+ Client Components import from `fimo-next/client` and generated `.client` modules:
131
140
 
132
141
  ```tsx
133
142
  'use client';
134
143
 
135
- import { Text, useLabels } from 'fimo/next/client';
144
+ import { Text, useLabels } from 'fimo-next/client';
136
145
  import * as Article from '@/schemas/Article.client';
137
146
 
138
147
  export function ArticleList() {
@@ -142,21 +151,21 @@ export function ArticleList() {
142
151
  }
143
152
  ```
144
153
 
145
- Do not import `fimo/next/client` into server-only modules. Do not import React Query hooks from `<Uid>.ts`.
154
+ Do not import `fimo-next/client` into server-only modules. Do not import React Query hooks from `<Uid>.ts`.
146
155
 
147
156
  ## Provider boundary
148
157
 
149
- Client hooks need one `FimoProvider` near the application root. The server may fetch a label snapshot and pass it across that boundary:
158
+ Client hooks need the one root `FimoProvider`. The server may fetch a label
159
+ snapshot and pass it across that boundary:
150
160
 
151
161
  ```tsx
152
- import { getLabels } from 'fimo/next';
153
- import { FimoProvider } from 'fimo/next/client';
162
+ import { FimoProvider, getLabels } from 'fimo-next';
154
163
 
155
164
  const labels = await getLabels({ locale });
156
165
  return <FimoProvider labels={labels.snapshot}>{children}</FimoProvider>;
157
166
  ```
158
167
 
159
- Passing `locale` without `labels` is valid when only content hooks need context. Passing a matching snapshot supplies both locale and labels. Never teach the unreleased `FimoNextProvider` name; the public component is `FimoProvider`.
168
+ Passing `locale` without `labels` is valid when only content hooks need context. Passing a matching snapshot supplies both locale and labels. A nested `FimoProvider` only narrows labels/locale for its subtree. Never teach the unreleased `FimoNextProvider` name; the public component is `FimoProvider`.
160
169
 
161
170
  ## Rendering modes
162
171
 
@@ -9,16 +9,18 @@ its routes, rendering choices, providers, and SEO.
9
9
  Install the peers the application uses:
10
10
 
11
11
  ```bash
12
- pnpm add fimo react react-dom react-router @tanstack/react-query
12
+ pnpm add fimo fimo-react fimo-react-router react react-dom react-router @tanstack/react-query
13
13
  pnpm add -D @react-router/dev @react-router/node vite
14
14
  ```
15
15
 
16
+ `fimo-react-router` carries `fimo-vite`; do not install it separately.
17
+
16
18
  Keep the project's React Router Vite plugin explicit:
17
19
 
18
20
  ```ts
19
21
  import { reactRouter } from '@react-router/dev/vite';
20
22
  import { defineConfig } from 'vite';
21
- import { fimo } from 'fimo/vite';
23
+ import { fimo } from 'fimo-react-router/vite';
22
24
 
23
25
  export default defineConfig({
24
26
  plugins: [reactRouter(), fimo({ sitemap: true })],
@@ -31,7 +33,7 @@ For the supported client-rendered setup, connect React Router's native build to
31
33
 
32
34
  ```ts
33
35
  import type { Config } from '@react-router/dev/config';
34
- import { fimoPreset } from 'fimo/react-router/preset';
36
+ import { fimoPreset } from 'fimo-react-router/preset';
35
37
 
36
38
  export default {
37
39
  appDirectory: 'src',
@@ -48,7 +50,7 @@ Do not change an existing SSR project to `ssr: false` merely to add Fimo. The cu
48
50
 
49
51
  ```tsx
50
52
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
51
- import { FimoProviders, FimoScripts } from 'fimo/react-router';
53
+ import { FimoProviders, FimoScripts } from 'fimo-react-router';
52
54
  import { Links, Meta, Outlet, Scripts, ScrollRestoration } from 'react-router';
53
55
 
54
56
  const queryClient = new QueryClient();
@@ -106,10 +108,10 @@ If an existing project imports `fimo/react-router/routes`, load `references/migr
106
108
 
107
109
  ## Content and labels
108
110
 
109
- Render tracked values with `fimo/ui`:
111
+ Render tracked values with `fimo-react`:
110
112
 
111
113
  ```tsx
112
- import { Image, Label, RichText, Text } from 'fimo/ui';
114
+ import { Image, Label, RichText, Text } from 'fimo-react';
113
115
 
114
116
  return <Label value="home.hero.title" as="h1" />;
115
117
  ```
@@ -10,13 +10,22 @@ The adapter targets SvelteKit 2 with Svelte 5. The acceptance baseline currently
10
10
  uses SvelteKit `2.70.2`, Svelte `5.56.8`, and Vite `8.2.0`; do not assume that
11
11
  SvelteKit 1 or Svelte 4 projects are compatible.
12
12
 
13
+ ## Install both packages
14
+
15
+ Every SvelteKit surface lives in `fimo-sveltekit`, installed at the same version
16
+ as `fimo`:
17
+
18
+ ```bash
19
+ npm install fimo fimo-sveltekit
20
+ ```
21
+
13
22
  ## Connect the Vite plugin
14
23
 
15
24
  Add Fimo's source-tagging plugin alongside SvelteKit's own plugin:
16
25
 
17
26
  ```ts
18
27
  import { sveltekit } from '@sveltejs/kit/vite';
19
- import { fimo } from 'fimo/sveltekit/vite';
28
+ import { fimo } from 'fimo-sveltekit/vite';
20
29
  import { defineConfig } from 'vite';
21
30
 
22
31
  export default defineConfig({ plugins: [fimo(), sveltekit()] });
@@ -27,11 +36,10 @@ elements back to source. It does not change production output or own routing.
27
36
 
28
37
  ## Hosted configuration
29
38
 
30
- For a new Fimo-hosted SvelteKit project, keep the hosting adapter behind Fimo's
31
- config seam:
39
+ Keep the hosting adapter behind Fimo's config seam:
32
40
 
33
41
  ```js
34
- import { fimo } from 'fimo/sveltekit/config';
42
+ import { fimo } from 'fimo-sveltekit/config';
35
43
 
36
44
  export default {
37
45
  kit: { adapter: fimo() },
@@ -49,7 +57,7 @@ SvelteKit's request-aware `fetch`:
49
57
 
50
58
  ```ts
51
59
  // src/routes/articles/+page.server.ts
52
- import { createFimo } from 'fimo/sveltekit';
60
+ import { createFimo } from 'fimo-sveltekit';
53
61
  import { content } from '../../../schemas';
54
62
 
55
63
  export async function load(event) {
@@ -72,7 +80,7 @@ do not import a Fimo environment variable or hardcode a tenant URL:
72
80
 
73
81
  ```ts
74
82
  // src/routes/+layout.server.ts
75
- import { getLabels } from 'fimo/sveltekit';
83
+ import { getLabels } from 'fimo-sveltekit';
76
84
 
77
85
  import { resolveLocale } from '../locales';
78
86
 
@@ -86,7 +94,7 @@ export async function load(event) {
86
94
  <!-- src/routes/+layout.svelte -->
87
95
  <script lang="ts">
88
96
  import { afterNavigate } from '$app/navigation';
89
- import { FimoProvider } from 'fimo/sveltekit/components';
97
+ import { FimoProvider } from 'fimo-sveltekit/components';
90
98
  import type { LayoutData } from './$types';
91
99
  import type { Snippet } from 'svelte';
92
100
 
@@ -104,7 +112,8 @@ export async function load(event) {
104
112
 
105
113
  Generated values are serialized at a `load` boundary and hydrated in the
106
114
  component that renders them. Use `Text`, `RichText`, `Image`, `Video`, `Date`,
107
- `DateTime`, `Boolean`, `Json`, and `Number` from `fimo/sveltekit/components`. `Number`
115
+ `DateTime`, `Boolean`, `Json`, and `Number` from
116
+ `fimo-sveltekit/components`. `Number`
108
117
  formats plain numeric values for display; numeric fields currently have no
109
118
  source metadata, so it is not a Studio-editable primitive.
110
119
 
@@ -114,7 +123,7 @@ Use a `+page.server` action so SvelteKit owns the request and redirect. Pass its
114
123
  event to `createFimoFormClient` and use the generated parser/helper:
115
124
 
116
125
  ```ts
117
- import { createFimoFormClient } from 'fimo/sveltekit';
126
+ import { createFimoFormClient } from 'fimo-sveltekit';
118
127
  import { parseContactUsFormData, submitContactUs } from '$lib/forms/contact-us';
119
128
 
120
129
  export const actions = {
@@ -134,7 +143,7 @@ component, read Fimo preview environment variables, or inject Fimo scripts.
134
143
  ## Boundaries
135
144
 
136
145
  - SvelteKit owns routing, history, 404s, locale URLs, and SEO.
137
- - `fimo/sveltekit/vite` owns dev source tagging only.
146
+ - `fimo-sveltekit/vite` owns dev source tagging only.
138
147
  - `FimoProvider` owns labels and the optional Studio preview bridge.
139
148
  - Do not add React, React Query, or a Vite SPA fallback to a SvelteKit project.
140
149
 
@@ -5,7 +5,7 @@ Use this reference for a Vite + React SPA without React Router framework mode. P
5
5
  ## Install and build
6
6
 
7
7
  ```bash
8
- pnpm add fimo react react-dom react-router @tanstack/react-query
8
+ pnpm add fimo fimo-react fimo-react-router react react-dom react-router @tanstack/react-query
9
9
  pnpm add -D vite @vitejs/plugin-react
10
10
  ```
11
11
 
@@ -14,7 +14,7 @@ Add Fimo's Vite plugins without replacing the application's existing plugins:
14
14
  ```ts
15
15
  import react from '@vitejs/plugin-react';
16
16
  import { defineConfig } from 'vite';
17
- import { fimo } from 'fimo/vite';
17
+ import { fimo } from 'fimo-react-router/vite';
18
18
 
19
19
  export default defineConfig({
20
20
  plugins: [react(), ...fimo({ seo: true })],
@@ -23,13 +23,15 @@ export default defineConfig({
23
23
 
24
24
  `fimo()` is synchronous and returns a `PluginOption[]`. `seo: true` updates the shared `index.html` at build time. Add `sitemap: true` or `robots: true` only when requested.
25
25
 
26
+ Import it from `fimo-react-router/vite` whenever the application renders through React Router, including a plain `BrowserRouter` SPA: it adds the React dependency pre-bundling those apps need. A Vite application with no React at all installs `fimo-vite` instead and imports `fimo` from there.
27
+
26
28
  ## Application root
27
29
 
28
30
  `FimoProviders` needs a React Router context for Studio navigation and pageview tracking. Keep the application's existing router type:
29
31
 
30
32
  ```tsx
31
33
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
32
- import { FimoProviders } from 'fimo/react-router';
34
+ import { FimoProviders } from 'fimo-react-router';
33
35
  import React from 'react';
34
36
  import { createRoot } from 'react-dom/client';
35
37
  import { BrowserRouter } from 'react-router';
@@ -55,10 +57,10 @@ An adopted SPA can omit the explicit `QueryClientProvider` when it does not need
55
57
 
56
58
  ## Content and labels
57
59
 
58
- Use `fimo/ui` for tracked values:
60
+ Use `fimo-react` for tracked values:
59
61
 
60
62
  ```tsx
61
- import { Label } from 'fimo/ui';
63
+ import { Label } from 'fimo-react';
62
64
 
63
65
  export function App() {
64
66
  return <Label value="home.hero.title" as="h1" />;
@@ -38,10 +38,10 @@ Missing keys render as an empty tracked value. Run `fimo validate`, then create
38
38
 
39
39
  The label contract is shared; acquisition differs by runtime:
40
40
 
41
- - Next server: `getLabels({ locale? })` from `fimo/next`.
42
- - Next client: `useLabels()` from `fimo/next/client`, under `FimoProvider`.
43
- - React Router/Vite client: `Label` and `useLabels()` from `fimo/ui`, under the existing framework integration.
44
- - SvelteKit: pass the application's resolved locale to `getLabels({ apiUrl, event, locale })`, or omit it to let the API choose the project default. Wrap the root layout with `FimoProvider` from `fimo/sveltekit/components`; the snapshot supplies its locale. Descendants use `Label` from that entrypoint or `useLabels().t()` from `fimo/sveltekit`. Apply the same explicit-or-omitted rule to `createFimo({ content, event, locale? })` in content loads.
41
+ - Next server: `getLabels({ locale? })` from `fimo-next`.
42
+ - Next client: `useLabels()` from `fimo-next/client`, under `FimoProvider`.
43
+ - React Router/Vite client: `Label` and `useLabels()` from `fimo-react`, under the existing framework integration.
44
+ - SvelteKit: pass the application's resolved locale to `getLabels({ apiUrl, event, locale })`, or omit it to let the API choose the project default. Wrap the root layout with `FimoProvider` from `fimo-sveltekit/components`; the snapshot supplies its locale. Descendants use `Label` from that entrypoint or `useLabels().t()` from `fimo-sveltekit`. Apply the same explicit-or-omitted rule to `createFimo({ content, event, locale? })` in content loads.
45
45
  - Astro server page: `getLabels({ locale? })` from `fimo/astro`; no provider.
46
46
 
47
47
  Load the matching framework reference before choosing a provider or server reader.
@@ -73,11 +73,11 @@ Never construct `FimoString`, `FimoRichText`, `FimoBoolean`, or `FimoMedia` manu
73
73
 
74
74
  Choose the framework surface:
75
75
 
76
- - Next Server Components and data functions → `fimo/next`
77
- - Next Client Components → `fimo/next/client`
78
- - React Router/Vite client → `fimo/ui`
76
+ - Next Server Components and data functions → `fimo-next`
77
+ - Next Client Components → `fimo-next/client`
78
+ - React Router/Vite client → `fimo-react`
79
79
  - Astro pages → `fimo/astro/components`
80
- - Svelte components → `fimo/sveltekit/components`
80
+ - Svelte components → `fimo-sveltekit/components`
81
81
 
82
82
  Load the framework reference before copying an example. Next server and client imports are deliberately separate so React Query/client code does not leak into server bundles. Astro uses native `.astro` components and does not require React.
83
83
 
@@ -86,21 +86,18 @@ behavior in place; when one cannot be preserved, record an explicit gap with
86
86
  the affected routes instead of shipping pages that silently lost their share
87
87
  metadata.
88
88
 
89
- ## Build-time and browser runtime
90
-
91
- The Next server runtime reads `FIMO_CONTENT_API_URL`; client components and
92
- generated client hooks read `NEXT_PUBLIC_FIMO_API_URL`. For a local production
93
- build or migration acceptance run, expose both names and point them at the
94
- same tenant content URL. `FIMO_API_URL` is the management/CLI API and is not a
95
- substitute for either content API variable.
96
-
97
- `withFimo` derives these aliases during `next dev` when the project is linked,
98
- so local development does not need hand-written values. A production build,
99
- however, compiles `NEXT_PUBLIC_*` values into the browser bundle and the
100
- adapter intentionally does not inject them outside the development phase.
101
- For `next build`/`next start`, set temporary values in the shell or an ignored
102
- `.env.local`; never commit secret values. In either mode, exercise at least one
103
- client-side data read after startup.
89
+ ## Fimo connection
90
+
91
+ Follow the target project's `fimo-code` Next.js reference and render its
92
+ `FimoProvider` once at the application root. The provider uses an explicit
93
+ host connection when one exists; otherwise it resolves the linked project and
94
+ active git branch on the server and passes only the public connection to the
95
+ browser. `withFimo` handles hosted preview origins, not the application
96
+ connection.
97
+
98
+ Do not create or edit `.env` / `.env.local` for a linked project's Fimo
99
+ connection. Run the project's normal `next dev`, `next build`, and `next start`
100
+ commands, then exercise at least one server read and one client-side data read.
104
101
 
105
102
  ## Preview embedding and response headers
106
103
 
@@ -53,8 +53,10 @@ sources point to one uploaded asset.
53
53
 
54
54
  ## Upload And Replacement
55
55
 
56
- Referenced media must be uploaded into the Fimo media library with
57
- `fimo assets upload`. Copying a file under `public/` so the deployed site can
56
+ Referenced media must be uploaded into the Fimo media library. Use
57
+ `fimo assets bulk-upload --file <manifest.json>` for a batch and keep one
58
+ unique `sourceId` per media item; use `fimo assets upload` for a single file.
59
+ Never encode paths or names in whitespace-delimited shell input. Copying a file under `public/` so the deployed site can
58
60
  serve it is **not** a completed import: it has no Fimo asset id/URL, editors
59
61
  cannot manage it, and the QA gate treats a referenced-but-not-uploaded asset as
60
62
  failing. Either upload it (and record the Fimo target), or mark it `unresolved`
@@ -86,11 +86,11 @@ items.
86
86
  used a user export or narrowly scoped server-side credential. Missing access
87
87
  is unresolved for that lane, and no content was guessed.
88
88
 
89
- For linked Next.js targets, `withFimo` derives `FIMO_CONTENT_API_URL` and
90
- `NEXT_PUBLIC_FIMO_API_URL` from `.fimo/project.json` during `next dev`,
91
- `next build`, and `next start`. Both aliases resolve to the same tenant API,
92
- while non-empty user overrides remain untouched; no committed env file is
93
- required.
89
+ For linked Next.js targets, the root `FimoProvider` resolves an explicit host
90
+ connection first, otherwise `.fimo/project.json` plus the active git branch,
91
+ and passes only the public connection to the browser. `withFimo` handles
92
+ hosted preview origins, not this connection. Run the normal `next dev`,
93
+ `next build`, and `next start` commands without creating a Fimo env file.
94
94
 
95
95
  ## Hosting
96
96
 
@@ -104,9 +104,9 @@ Owned by the runtime lane; verified here read-only.
104
104
  translation goes through `FIMO_PREVIEW_ALLOWED_ORIGINS`; `withFimo` alone
105
105
  does not solve headers — it only extends `allowedDevOrigins` during
106
106
  `next dev`.
107
- - The runtime report covers local startup, preview embedding, build, derived
108
- aliases, header translations, and integration env-key names, with every
109
- claim backed by evidence.
107
+ - The runtime report covers local startup, preview embedding, build, the
108
+ resolved Fimo connection, header translations, and integration env-key
109
+ names, with every claim backed by evidence.
110
110
  - With a browser available, record `browserProof` (rendered route plus console
111
111
  state) for startup and embedding. Without one, use deterministic HTTP
112
112
  status/header/process/log checks and mark visual proof explicitly
@@ -149,6 +149,8 @@ one bounded, scriptable browser pass (Playwright, agent-browser, or
149
149
  equivalent):
150
150
 
151
151
  1. Start the app and wait for hydration, not just the HTTP response.
152
+ Do not use `networkidle` against dev/HMR servers; wait for expected visible
153
+ content and image readiness.
152
154
  2. Open a representative set of pages: home, one collection listing, one
153
155
  collection detail, one static page.
154
156
  3. Exercise one representative interaction (open the nav menu, an accordion,
@@ -3,10 +3,9 @@
3
3
  Own semantic discovery, schema authoring, payload preparation, and the text
4
4
  handoff. Do not import entries or rewrite application consumers.
5
5
 
6
- 1. Inspect every content-bearing source and consumer: Markdown/MDX bodies and
7
- frontmatter, JSX/TSX modules, hardcoded arrays and objects, imports, data
8
- clients, and call sites. Identify whether each active source is a file,
9
- inline value, API, CMS, or a mix before designing schemas.
6
+ 1. Trace active source clients, endpoint/query declarations, frontend types,
7
+ and every consumer before designing schemas. Then inspect their
8
+ content-bearing files, inline values, APIs, or CMS sources.
10
9
  2. Classify each value as collection content, single content, an
11
10
  editor-visible label, or application-owned code. Repetition is evidence,
12
11
  not an automatic collection rule. Assistive text, identifiers, and values
@@ -62,11 +61,12 @@ data workers start:
62
61
  queries, pagination, locales, publication states, relations, media, and
63
62
  consuming call sites. Server rendering may hide requests from the browser,
64
63
  so browser traffic is fallback evidence rather than the source of truth.
65
- 2. Prove access with one read-only request. Read public APIs directly. Private
66
- APIs require an owner-provided export or narrowly scoped server-side
67
- credential; never recover, log, persist, or copy secret values. If the base
68
- URL or required access is missing or unreachable, stop and ask the user for
69
- it before planning schemas or payloads.
64
+ 2. Prefer authoritative backend schemas when source exists. Otherwise probe
65
+ public OpenAPI metadata, then GraphQL introspection, then only the selected
66
+ REST endpoints. Ask for an owner-provided export or narrowly scoped
67
+ server-side token only when website-required records are not public. Never
68
+ recover, log, persist, or copy secret values. If required access is missing
69
+ or unreachable, stop before planning schemas or payloads.
70
70
  3. Fetch every required page, locale, and referenced record. For a few bounded
71
71
  endpoints, direct requests are enough. For repeated or paginated reads,
72
72
  write a temporary source-specific read-only script under
@@ -75,7 +75,17 @@ data workers start:
75
75
  normalize transport details only. Do not create a provider registry or a
76
76
  universal CMS model.
77
77
  5. Design Fimo schemas from both the retrieved values and the code that uses
78
- them. Never invent replacement content when source access is unavailable.
78
+ them. Keep uncertain fields optional unless authoritative evidence requires
79
+ them; sampled enum-like values are strings, and private or absent fields
80
+ remain unknown. Never invent replacement content when access is unavailable.
81
+
82
+ For Strapi, the source and public-instance accelerators under
83
+ `scripts/retrieval/strapi/` accept only explicit backend roots, content types,
84
+ and endpoints. The worker may adapt or replace them; they preserve evidence but
85
+ never select content or decide the target schema. Preserve source record order
86
+ by importing in that order; do not add a source-ID or sort field solely to
87
+ recreate creation order. Add an explicit sort field only when the source has
88
+ editorial ordering or another consumer requires stable order.
79
89
 
80
90
  Once retrieval and consumer tracing are complete, push schemas, prepare
81
91
  payloads, and let the coordinator fan out assets and one data batch per
@@ -49,12 +49,14 @@ them into migration artifacts. If the source API URL or access is missing or
49
49
  unreachable, stop and ask the user for it; do not guess or continue with
50
50
  replacement content.
51
51
 
52
- For API-backed content, trace the active client and call sites in source code,
53
- prove one read, then retrieve all required pages, locales, relations, and media
54
- during content planning. Use direct requests for bounded endpoints or a
55
- temporary read-only script for repeated and paginated reads. Do not wait for
56
- schema or code workers, and do not rely on browser traffic when SSR or build
57
- time fetches may hide the requests.
52
+ For API-backed content, trace active clients, endpoints, frontend types, and
53
+ consumers first. Prefer backend source schemas; otherwise use public OpenAPI,
54
+ GraphQL introspection, then selected REST endpoints in that order. Request a
55
+ token or export only for website-required records that are not public. Retrieve
56
+ all required pages, locales, relations, and media during content planning.
57
+ Treat absent/private fields as unknown, keep uncertain fields optional, and do
58
+ not turn sampled values into enums. Bounded retrieval scripts are accelerators
59
+ the planner may adapt or replace, never schema decision makers.
58
60
 
59
61
  For URL-only migrations, run `fimo migrate <url> [dir]` and inspect the
60
62
  generated `.fimo/migrations/current/` files as source evidence. Do not copy