@riverbankcms/sdk 0.129.0 → 0.129.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 (260) hide show
  1. package/README.md +19 -256
  2. package/dist/{PreviewEditorSidebar-B43CJ0g_.mjs → PreviewEditorSidebar-DceRseRV.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-DHirVkeM.mjs → PreviewEditorUI-BNunq3kk.mjs} +2 -2
  4. package/dist/{SdkPreviewModeRuntime-BJumZy1B.mjs → SdkPreviewModeRuntime-Bt87-62u.mjs} +3 -3
  5. package/dist/{SiteChromeCustomizeContext-D9SlpwEj.mjs → SiteChromeCustomizeContext-BLl-OlL4.mjs} +460 -393
  6. package/dist/_dts/ai/src/contracts/commandExposure.d.ts +1 -1
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +4897 -4897
  8. package/dist/_dts/api/src/index.d.ts +2 -1
  9. package/dist/_dts/api/src/sdk-event-management.d.ts +53 -0
  10. package/dist/_dts/api/src/sdk-event-schedule.d.ts +3 -6
  11. package/dist/_dts/api/src/sdkContracts.d.ts +37 -50
  12. package/dist/_dts/api/src/sdkThemeWire.d.ts +2595 -0
  13. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +13 -29
  14. package/dist/_dts/media-core/src/index.d.ts +1 -0
  15. package/dist/_dts/sdk/src/config/types.d.ts +4 -4
  16. package/dist/_dts/sdk/src/version.d.ts +1 -1
  17. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
  18. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -0
  19. package/dist/_dts/theme-core/src/site-styles/headerLayoutStyleCatalog.d.ts +254 -0
  20. package/dist/_dts/theme-core/src/site-styles/headerLegacyLooks.d.ts +372 -0
  21. package/dist/_dts/theme-core/src/site-styles/headerLookBranding.d.ts +106 -0
  22. package/dist/_dts/theme-core/src/site-styles/headerLookSelection.d.ts +2 -0
  23. package/dist/_dts/theme-core/src/site-styles/headerLookTypes.d.ts +212 -0
  24. package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +7 -841
  25. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +3 -0
  26. package/dist/_dts/theme-core/src/site-styles/headerStyleCompilerPrimitives.d.ts +23 -0
  27. package/dist/client/client.mjs +492 -426
  28. package/dist/client/hooks.mjs +59 -36
  29. package/dist/client/rendering/client.mjs +593 -547
  30. package/dist/client/rendering.mjs +491 -425
  31. package/dist/preview-next/client/runtime.mjs +3 -3
  32. package/dist/{sdk-runtime-CfZd5pAm.mjs → sdk-runtime-C20CVWbb.mjs} +1 -1
  33. package/dist/{separator-DkTe68HE.mjs → separator-BE3NCquy.mjs} +1 -1
  34. package/dist/server/components.mjs +72 -49
  35. package/dist/server/config-validation.mjs +59 -36
  36. package/dist/server/config.mjs +59 -36
  37. package/dist/server/data.mjs +59 -36
  38. package/dist/server/index.mjs +1 -1
  39. package/dist/server/manifest.mjs +4966 -0
  40. package/dist/server/next.mjs +73 -50
  41. package/dist/server/page-converter.mjs +40 -36
  42. package/dist/server/prebuild.mjs +1 -1
  43. package/dist/server/rendering/server.mjs +72 -49
  44. package/dist/server/rendering.mjs +72 -49
  45. package/dist/server/routing.mjs +472 -402
  46. package/dist/server/server.mjs +60 -37
  47. package/dist/server/theme-bridge.mjs +70 -66
  48. package/package.json +9 -12
  49. package/dist/_dts/api/src/event-presentation.d.ts +0 -14
  50. package/dist/_dts/blocks/src/definitions.d.ts +0 -14
  51. package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +0 -53
  52. package/dist/_dts/sdk/src/cli/commands/audit.d.ts +0 -101
  53. package/dist/_dts/sdk/src/cli/commands/block.d.ts +0 -24
  54. package/dist/_dts/sdk/src/cli/commands/compare.d.ts +0 -62
  55. package/dist/_dts/sdk/src/cli/commands/content-type.d.ts +0 -10
  56. package/dist/_dts/sdk/src/cli/commands/content.d.ts +0 -56
  57. package/dist/_dts/sdk/src/cli/commands/delete.d.ts +0 -14
  58. package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +0 -43
  59. package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +0 -18
  60. package/dist/_dts/sdk/src/cli/commands/entry.d.ts +0 -55
  61. package/dist/_dts/sdk/src/cli/commands/env.d.ts +0 -31
  62. package/dist/_dts/sdk/src/cli/commands/event.d.ts +0 -23
  63. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +0 -12
  64. package/dist/_dts/sdk/src/cli/commands/identifiers.d.ts +0 -10
  65. package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +0 -13
  66. package/dist/_dts/sdk/src/cli/commands/manifest.d.ts +0 -10
  67. package/dist/_dts/sdk/src/cli/commands/media-validation.d.ts +0 -3
  68. package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +0 -11
  69. package/dist/_dts/sdk/src/cli/commands/navigation.d.ts +0 -12
  70. package/dist/_dts/sdk/src/cli/commands/page.d.ts +0 -14
  71. package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +0 -50
  72. package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +0 -10
  73. package/dist/_dts/sdk/src/cli/commands/pull-dry-run.d.ts +0 -70
  74. package/dist/_dts/sdk/src/cli/commands/pull-scope-diff.d.ts +0 -8
  75. package/dist/_dts/sdk/src/cli/commands/pull.d.ts +0 -43
  76. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +0 -3
  77. package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +0 -19
  78. package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +0 -42
  79. package/dist/_dts/sdk/src/cli/commands/push/execute/localMediaReporting.d.ts +0 -23
  80. package/dist/_dts/sdk/src/cli/commands/push/execute/media.d.ts +0 -22
  81. package/dist/_dts/sdk/src/cli/commands/push/execute/metadata.d.ts +0 -1
  82. package/dist/_dts/sdk/src/cli/commands/push/execute/reporting.d.ts +0 -7
  83. package/dist/_dts/sdk/src/cli/commands/push/execute/theme.d.ts +0 -63
  84. package/dist/_dts/sdk/src/cli/commands/push/filter.d.ts +0 -15
  85. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +0 -29
  86. package/dist/_dts/sdk/src/cli/commands/push/normalizeLocalContent.d.ts +0 -2
  87. package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +0 -32
  88. package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +0 -15
  89. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +0 -25
  90. package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +0 -83
  91. package/dist/_dts/sdk/src/cli/commands/push/scopes/eventCategories.d.ts +0 -4
  92. package/dist/_dts/sdk/src/cli/commands/push/scopes/events.d.ts +0 -4
  93. package/dist/_dts/sdk/src/cli/commands/push/scopes/mediaPrep.d.ts +0 -14
  94. package/dist/_dts/sdk/src/cli/commands/push/scopes/pushScopeGeneric.d.ts +0 -6
  95. package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +0 -87
  96. package/dist/_dts/sdk/src/cli/commands/push/scopes/venues.d.ts +0 -4
  97. package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +0 -48
  98. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +0 -17
  99. package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +0 -56
  100. package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +0 -34
  101. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +0 -54
  102. package/dist/_dts/sdk/src/cli/commands/push.d.ts +0 -40
  103. package/dist/_dts/sdk/src/cli/commands/setup.d.ts +0 -3
  104. package/dist/_dts/sdk/src/cli/commands/style.d.ts +0 -60
  105. package/dist/_dts/sdk/src/cli/commands/verify.d.ts +0 -11
  106. package/dist/_dts/sdk/src/cli/commands/webhooks.d.ts +0 -44
  107. package/dist/_dts/sdk/src/cli/config-loader.d.ts +0 -47
  108. package/dist/_dts/sdk/src/cli/content/collectionWriters.d.ts +0 -23
  109. package/dist/_dts/sdk/src/cli/content/edit/format.d.ts +0 -2
  110. package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +0 -14
  111. package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +0 -46
  112. package/dist/_dts/sdk/src/cli/content/entryPaths.d.ts +0 -6
  113. package/dist/_dts/sdk/src/cli/content/footerFile.d.ts +0 -10
  114. package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +0 -39
  115. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +0 -5
  116. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +0 -17
  117. package/dist/_dts/sdk/src/cli/content/media-manifest.d.ts +0 -13
  118. package/dist/_dts/sdk/src/cli/content/metadataAfterPush.d.ts +0 -25
  119. package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +0 -29
  120. package/dist/_dts/sdk/src/cli/content/reader.d.ts +0 -488
  121. package/dist/_dts/sdk/src/cli/content/writer.d.ts +0 -142
  122. package/dist/_dts/sdk/src/cli/env-scope.d.ts +0 -2
  123. package/dist/_dts/sdk/src/cli/env.d.ts +0 -71
  124. package/dist/_dts/sdk/src/cli/errors.d.ts +0 -62
  125. package/dist/_dts/sdk/src/cli/helpers/ai-runtime.d.ts +0 -2
  126. package/dist/_dts/sdk/src/cli/helpers.d.ts +0 -399
  127. package/dist/_dts/sdk/src/cli/index.d.ts +0 -11
  128. package/dist/_dts/sdk/src/cli/init-docs/constants.d.ts +0 -16
  129. package/dist/_dts/sdk/src/cli/init-docs/index.d.ts +0 -12
  130. package/dist/_dts/sdk/src/cli/init-docs/templates.d.ts +0 -18
  131. package/dist/_dts/sdk/src/cli/init-docs/zod-to-markdown.d.ts +0 -28
  132. package/dist/_dts/sdk/src/cli/load-config.d.ts +0 -14
  133. package/dist/_dts/sdk/src/cli/media/identifiers.d.ts +0 -18
  134. package/dist/_dts/sdk/src/cli/media/local-media.d.ts +0 -14
  135. package/dist/_dts/sdk/src/cli/media/local-sync.d.ts +0 -91
  136. package/dist/_dts/sdk/src/cli/media/portable.d.ts +0 -11
  137. package/dist/_dts/sdk/src/cli/media/rich-text.d.ts +0 -12
  138. package/dist/_dts/sdk/src/cli/media/value-utils.d.ts +0 -15
  139. package/dist/_dts/sdk/src/cli/media/write-guard.d.ts +0 -52
  140. package/dist/_dts/sdk/src/cli/merge-remote/entryLocal.d.ts +0 -3
  141. package/dist/_dts/sdk/src/cli/merge-remote/entryMerge.d.ts +0 -78
  142. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePlan.d.ts +0 -45
  143. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +0 -24
  144. package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +0 -18
  145. package/dist/_dts/sdk/src/cli/merge-remote/entryRemote.d.ts +0 -9
  146. package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +0 -48
  147. package/dist/_dts/sdk/src/cli/merge-remote/mergeFieldChanges.d.ts +0 -22
  148. package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +0 -3
  149. package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +0 -78
  150. package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +0 -36
  151. package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +0 -23
  152. package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +0 -17
  153. package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +0 -46
  154. package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +0 -32
  155. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +0 -27
  156. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +0 -63
  157. package/dist/_dts/sdk/src/cli/migrations/entries.d.ts +0 -28
  158. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +0 -73
  159. package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +0 -11
  160. package/dist/_dts/sdk/src/cli/output.d.ts +0 -133
  161. package/dist/_dts/sdk/src/cli/program.d.ts +0 -29
  162. package/dist/_dts/sdk/src/cli/push-config.d.ts +0 -49
  163. package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +0 -51
  164. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +0 -13
  165. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +0 -170
  166. package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +0 -21
  167. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +0 -32
  168. package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +0 -53
  169. package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +0 -65
  170. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +0 -24
  171. package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +0 -68
  172. package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +0 -53
  173. package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +0 -8
  174. package/dist/_dts/sdk/src/cli/site-commands/localBlockManifestResolver.d.ts +0 -31
  175. package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +0 -57
  176. package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +0 -82
  177. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +0 -84
  178. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +0 -39
  179. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +0 -8
  180. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +0 -97
  181. package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +0 -15
  182. package/dist/_dts/sdk/src/cli/sync/diff.d.ts +0 -222
  183. package/dist/_dts/sdk/src/cli/sync/executor.d.ts +0 -84
  184. package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +0 -39
  185. package/dist/_dts/sdk/src/cli/sync/index.d.ts +0 -10
  186. package/dist/_dts/sdk/src/cli/sync/mapper.d.ts +0 -41
  187. package/dist/_dts/sdk/src/cli/sync/media-sync.d.ts +0 -15
  188. package/dist/_dts/sdk/src/cli/sync/media.d.ts +0 -158
  189. package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +0 -4
  190. package/dist/_dts/sdk/src/cli/sync/validation.d.ts +0 -68
  191. package/dist/_dts/sdk/src/cli/utils/checksum.d.ts +0 -1
  192. package/dist/_dts/sdk/src/client/management/blocks.d.ts +0 -19
  193. package/dist/_dts/sdk/src/client/management/catalog.d.ts +0 -10
  194. package/dist/_dts/sdk/src/client/management/entries.d.ts +0 -6
  195. package/dist/_dts/sdk/src/client/management/eventCategories.d.ts +0 -6
  196. package/dist/_dts/sdk/src/client/management/events.d.ts +0 -7
  197. package/dist/_dts/sdk/src/client/management/footer.d.ts +0 -9
  198. package/dist/_dts/sdk/src/client/management/forms.d.ts +0 -6
  199. package/dist/_dts/sdk/src/client/management/http.d.ts +0 -79
  200. package/dist/_dts/sdk/src/client/management/identifiers.d.ts +0 -11
  201. package/dist/_dts/sdk/src/client/management/index.d.ts +0 -41
  202. package/dist/_dts/sdk/src/client/management/media.d.ts +0 -72
  203. package/dist/_dts/sdk/src/client/management/navigation.d.ts +0 -6
  204. package/dist/_dts/sdk/src/client/management/pages.d.ts +0 -6
  205. package/dist/_dts/sdk/src/client/management/pull.d.ts +0 -6
  206. package/dist/_dts/sdk/src/client/management/settings-branding.d.ts +0 -32
  207. package/dist/_dts/sdk/src/client/management/settings.d.ts +0 -6
  208. package/dist/_dts/sdk/src/client/management/theme.d.ts +0 -8
  209. package/dist/_dts/sdk/src/client/management/types.d.ts +0 -1069
  210. package/dist/_dts/sdk/src/client/management/venues.d.ts +0 -6
  211. package/dist/_dts/sdk/src/client/management/webhooks.d.ts +0 -3
  212. package/dist/_dts/sdk/src/test/env.d.ts +0 -4
  213. package/dist/_dts/site-commands/src/adapter.d.ts +0 -23
  214. package/dist/_dts/site-commands/src/appointmentCommandSchemas.d.ts +0 -100
  215. package/dist/_dts/site-commands/src/capabilityGaps.d.ts +0 -8
  216. package/dist/_dts/site-commands/src/commandContract.d.ts +0 -1277
  217. package/dist/_dts/site-commands/src/commandDomain.d.ts +0 -20
  218. package/dist/_dts/site-commands/src/commandIdentifiers.d.ts +0 -7
  219. package/dist/_dts/site-commands/src/commandValidation.d.ts +0 -10
  220. package/dist/_dts/site-commands/src/commands.d.ts +0 -1983
  221. package/dist/_dts/site-commands/src/domain.d.ts +0 -104
  222. package/dist/_dts/site-commands/src/eventCommandContent.d.ts +0 -11
  223. package/dist/_dts/site-commands/src/exposure.d.ts +0 -41
  224. package/dist/_dts/site-commands/src/guards.d.ts +0 -1
  225. package/dist/_dts/site-commands/src/index.d.ts +0 -18
  226. package/dist/_dts/site-commands/src/metadata.d.ts +0 -555
  227. package/dist/_dts/site-commands/src/pagePaths.d.ts +0 -6
  228. package/dist/_dts/site-commands/src/planner.d.ts +0 -58
  229. package/dist/_dts/site-commands/src/refContributions.d.ts +0 -11
  230. package/dist/_dts/site-commands/src/refs.d.ts +0 -90
  231. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +0 -405
  232. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +0 -46
  233. package/dist/_dts/site-commands/src/stableJson.d.ts +0 -5
  234. package/dist/_dts/site-commands/src/staticExecutionGaps.d.ts +0 -10
  235. package/dist/_dts/site-commands/src/venueCommandMapping.d.ts +0 -21
  236. package/dist/_dts/theme-core/src/data.d.ts +0 -12
  237. package/dist/_dts/theme-core/src/site-styles/headerStyleParts.d.ts +0 -4
  238. package/dist/cli/index.mjs +0 -162988
  239. package/dist/cli/init-docs/content/agents-section.md +0 -67
  240. package/dist/cli/init-docs/content/cli-reference.md +0 -1238
  241. package/dist/cli/init-docs/content/content-management.md +0 -792
  242. package/dist/cli/init-docs/content/context-brand.md +0 -125
  243. package/dist/cli/init-docs/content/context-brief.md +0 -77
  244. package/dist/cli/init-docs/content/context-knowledge.md +0 -111
  245. package/dist/cli/init-docs/content/getting-started.md +0 -171
  246. package/dist/cli/init-docs/content/site-workflows-readme.md +0 -96
  247. package/dist/cli/init-docs/content/workflow-add-block.md +0 -299
  248. package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +0 -83
  249. package/dist/cli/init-docs/content/workflow-block-extensions.md +0 -370
  250. package/dist/cli/init-docs/content/workflow-cmsify-page.md +0 -357
  251. package/dist/cli/init-docs/content/workflow-content-types.md +0 -330
  252. package/dist/cli/init-docs/content/workflow-create-page.md +0 -212
  253. package/dist/cli/init-docs/content/workflow-custom-block.md +0 -470
  254. package/dist/cli/init-docs/content/workflow-editor-workflows.md +0 -130
  255. package/dist/cli/init-docs/content/workflow-isr-revalidation.md +0 -158
  256. package/dist/cli/init-docs/content/workflow-preview-mode.md +0 -252
  257. package/dist/cli/init-docs/content/workflow-publish.md +0 -285
  258. package/dist/cli/init-docs/content/workflow-remote-setup.md +0 -51
  259. package/dist/cli/init-docs/content/workflow-templates.md +0 -381
  260. /package/dist/_dts/{sdk/src/cli/utils/mime.d.ts → media-core/src/mimeType.d.ts} +0 -0
@@ -1,357 +0,0 @@
1
- # Workflow: CMS-ify a Page
2
-
3
- Convert a hard-coded page with static content into a CMS-driven page using blocks. This workflow takes you from React components with Tailwind styling to fully editable CMS content.
4
-
5
- ## Overview
6
-
7
- The typical workflow:
8
-
9
- 1. **Design first** - Build a hard-coded page with static content and Tailwind styling
10
- 2. **Identify sections** - Map each section to potential blocks
11
- 3. **Choose block approach** - For each section, decide: system block, block extension, or custom block
12
- 4. **Create overrides** - Build React components that render your blocks
13
- 5. **Convert content** - Transform static content to block JSON
14
- 6. **Push to CMS** - Sync everything to the CMS
15
-
16
- ## Prerequisites
17
-
18
- - Hard-coded page designed with static content + Tailwind CSS
19
- - `riverbank.config.ts` set up
20
- - Understanding of available system blocks (see `block-types.md`)
21
-
22
- ## Steps
23
-
24
- ### Step 1: Design with Hard-coded Content
25
-
26
- Start by building your page with static content. Focus on:
27
-
28
- - Visual design and layout
29
- - Responsive behavior
30
- - Tailwind styling
31
- - Interactive elements
32
-
33
- Example starting point:
34
-
35
- ```tsx
36
- // pages/services.tsx (hard-coded version)
37
- export default function ServicesPage() {
38
- return (
39
- <>
40
- <section className="py-24 bg-gradient-to-b from-teal-900 to-teal-700">
41
- <h1 className="text-5xl font-bold text-white">Our Services</h1>
42
- <p className="text-xl text-teal-100">We help businesses grow online</p>
43
- </section>
44
-
45
- <section className="py-16 bg-white">
46
- <h2 className="text-3xl font-bold">Our Approach</h2>
47
- <div className="grid grid-cols-2 gap-8">
48
- <div className="p-8 bg-green-50">
49
- <h3>Discovery</h3>
50
- <p>We learn about your business...</p>
51
- </div>
52
- <div className="p-8 bg-tan-50">
53
- <h3>Design</h3>
54
- <p>We create beautiful designs...</p>
55
- </div>
56
- </div>
57
- </section>
58
-
59
- <section className="py-16 bg-gray-900 text-white">
60
- <h2>Ready to get started?</h2>
61
- <a href="/contact" className="btn-primary">Contact Us</a>
62
- </section>
63
- </>
64
- );
65
- }
66
- ```
67
-
68
- ### Step 2: Identify Sections → Map to Blocks
69
-
70
- Analyze each section and determine what type of block it could be:
71
-
72
- | Page Section | Analysis | Potential Block |
73
- |--------------|----------|-----------------|
74
- | Hero with gradient | Heading + subheading + background | `block.hero` |
75
- | Approach tiles | Grid of colored cards | `custom.color-tiles` or `block.body-text` with layout |
76
- | CTA banner | Dark background with button | `block.cta-full` with layout variant |
77
-
78
- ### Step 3: Choose Block Approach
79
-
80
- For each section, decide which approach to use:
81
-
82
- ```
83
- Is this a standard content section?
84
- ├─ Yes → Can a system block handle it as-is?
85
- │ ├─ Yes → Use system block directly
86
- │ └─ No → Do you just need visual variants?
87
- │ ├─ Yes → Use block extension (add layout field)
88
- │ └─ No → Create custom block
89
- └─ No → Is it site-specific branding/interaction?
90
- ├─ Yes → Create custom block
91
- └─ No → Reconsider if block is needed
92
- ```
93
-
94
- **Decision matrix for our example:**
95
-
96
- | Section | Decision | Reason |
97
- |---------|----------|--------|
98
- | Hero | `block.hero` + layout extension | Standard hero, but needs custom background style |
99
- | Approach tiles | `custom.color-tiles` | Unique grid layout with colored backgrounds |
100
- | CTA banner | `block.cta-full` + layout extension | Standard CTA, but needs dark variant |
101
-
102
- ### Step 4: Implement Block Strategy
103
-
104
- Based on your decisions, implement each approach:
105
-
106
- #### 4a: System Block As-Is
107
-
108
- If a system block works without modification:
109
-
110
- ```bash
111
- riverbankcms block upsert services intro \
112
- --kind block.body-text \
113
- --data '{"content": "<p>Welcome to our services page...</p>"}'
114
- ```
115
-
116
- #### 4b: System Block + Layout Extension
117
-
118
- For blocks that need visual variants, add field extensions:
119
-
120
- ```typescript
121
- // riverbank.config.ts
122
- blockFieldExtensions: {
123
- 'block.hero': {
124
- fields: [
125
- {
126
- id: 'layout',
127
- type: 'select',
128
- label: 'Layout',
129
- options: [
130
- { value: 'default', label: 'Default' },
131
- { value: 'gradient', label: 'Gradient Background' },
132
- ],
133
- defaultValue: 'default',
134
- },
135
- ],
136
- },
137
- 'block.cta-full': {
138
- fields: [
139
- {
140
- id: 'layout',
141
- type: 'select',
142
- label: 'Layout',
143
- options: [
144
- { value: 'default', label: 'Default' },
145
- { value: 'dark', label: 'Dark Theme' },
146
- ],
147
- defaultValue: 'default',
148
- },
149
- ],
150
- },
151
- }
152
- ```
153
-
154
- Then create override components (see `block-extensions.md`).
155
-
156
- #### 4c: Custom Block
157
-
158
- For unique sections, define a custom block:
159
-
160
- ```typescript
161
- // riverbank.config.ts
162
- customBlocks: [
163
- {
164
- id: 'custom.color-tiles',
165
- title: 'Color Tiles',
166
- fields: [
167
- { id: 'heading', type: 'text', label: 'Heading' },
168
- {
169
- id: 'tiles',
170
- type: 'repeater',
171
- label: 'Tiles',
172
- schema: {
173
- fields: [
174
- { id: 'title', type: 'text', label: 'Title', required: true },
175
- { id: 'description', type: 'text', label: 'Description', multiline: true },
176
- ],
177
- },
178
- },
179
- ],
180
- },
181
- ]
182
- ```
183
-
184
- Then create an override component (see `custom-block.md`).
185
-
186
- ### Step 5: Create Block Overrides
187
-
188
- Register all your override components:
189
-
190
- ```typescript
191
- // src/lib/block-overrides.tsx
192
- import type { BlockOverrides } from '@riverbankcms/sdk/rendering';
193
- import { CustomHero } from '@/components/CustomHero';
194
- import { CustomCtaFull } from '@/components/CustomCtaFull';
195
- import { ColorTilesBlock } from '@/components/ColorTilesBlock';
196
-
197
- export const blockOverrides: BlockOverrides = {
198
- hero: CustomHero,
199
- ctaFull: CustomCtaFull,
200
- 'custom.color-tiles': ColorTilesBlock,
201
- };
202
- ```
203
-
204
- ### Step 6: Convert Content to Block JSON
205
-
206
- Transform your static content into block data:
207
-
208
- **Hero block:**
209
- ```json
210
- {
211
- "heading": "Our Services",
212
- "subheading": "We help businesses grow online",
213
- "layout": "gradient"
214
- }
215
- ```
216
-
217
- **Color tiles block:**
218
- ```json
219
- {
220
- "heading": "Our Approach",
221
- "tiles": [
222
- { "title": "Discovery", "description": "We learn about your business..." },
223
- { "title": "Design", "description": "We create beautiful designs..." }
224
- ]
225
- }
226
- ```
227
-
228
- **CTA block:**
229
- ```json
230
- {
231
- "heading": "Ready to get started?",
232
- "cta": { "text": "Contact Us", "url": "/contact" },
233
- "layout": "dark"
234
- }
235
- ```
236
-
237
- ### Step 7: Create Page and Push
238
-
239
- Create the page and add blocks:
240
-
241
- ```bash
242
- # Create the page
243
- riverbankcms page upsert services \
244
- --title "Our Services" \
245
- --path /services
246
-
247
- # Add blocks
248
- riverbankcms block upsert services hero \
249
- --kind block.hero \
250
- --data '{"heading": "Our Services", "subheading": "We help businesses grow online", "layout": "gradient"}'
251
-
252
- riverbankcms block upsert services approach \
253
- --kind custom.color-tiles \
254
- --file ./content/services-tiles.json
255
-
256
- riverbankcms block upsert services cta \
257
- --kind block.cta-full \
258
- --data '{"heading": "Ready to get started?", "layout": "dark"}'
259
-
260
- # Push everything
261
- riverbankcms push
262
- ```
263
-
264
- ## Complete Example
265
-
266
- Converting a services page from the Riverbank site:
267
-
268
- **Original hard-coded sections:**
269
- 1. Hero with animated canvas background
270
- 2. Color tiles grid (4 approach points)
271
- 3. Feature preview with parallax
272
- 4. Pricing tiers comparison
273
- 5. Dark CTA banner
274
-
275
- **Final block structure:**
276
-
277
- ```
278
- services.json
279
- ├── hero (block.hero + layout: 'topography')
280
- ├── approach (custom.color-tiles)
281
- ├── features (custom.feature-preview)
282
- ├── pricing (custom.pricing-tiers)
283
- └── cta (block.cta-full + layout: 'dark')
284
- ```
285
-
286
- **Config additions:**
287
-
288
- ```typescript
289
- // Block extensions for system blocks
290
- blockFieldExtensions: {
291
- 'block.hero': {
292
- fields: [
293
- { id: 'layout', type: 'select', options: [...], defaultValue: 'default' },
294
- { id: 'topographyColor', type: 'select', ... },
295
- ],
296
- },
297
- 'block.cta-full': {
298
- fields: [
299
- { id: 'layout', type: 'select', options: [...], defaultValue: 'default' },
300
- ],
301
- },
302
- }
303
-
304
- // Custom blocks for unique sections
305
- customBlocks: [
306
- { id: 'custom.color-tiles', ... },
307
- { id: 'custom.feature-preview', ... },
308
- { id: 'custom.pricing-tiers', ... },
309
- ]
310
- ```
311
-
312
- ## Verification
313
-
314
- 1. Preview blocks: `riverbankcms preview <kind> --data '...' --open`
315
- 2. Check page in local development: `npm run dev`, visit `/services`
316
- 3. Verify all sections render correctly
317
- 4. Test responsive behavior
318
- 5. Check CMS dashboard for editing experience
319
-
320
- ## Tips
321
-
322
- ### Preserving Design Fidelity
323
-
324
- - Keep your Tailwind styles in override components
325
- - Use theme tokens for colors when available
326
- - Test responsive behavior after CMS-ifying
327
-
328
- ### When to Create Custom Blocks vs Extensions
329
-
330
- | Scenario | Approach |
331
- |----------|----------|
332
- | Standard content with visual variants | Block extension |
333
- | Unique layout or structure | Custom block |
334
- | Site-specific interactions (animations, state) | Custom block |
335
- | Reusable across multiple sites | Consider extending system block |
336
-
337
- ### Gradual Migration
338
-
339
- You don't have to CMS-ify everything at once:
340
-
341
- 1. Start with content that changes frequently
342
- 2. Keep complex interactions as static components initially
343
- 3. Add more blocks over time as patterns emerge
344
-
345
- ### Maintaining Block Overrides
346
-
347
- - Keep override components focused and small
348
- - Extract shared logic into utility functions
349
- - Use TypeScript for content type safety
350
-
351
- ## Related Workflows
352
-
353
- - **Block Extensions** - Add layout variants to system blocks: see `block-extensions.md`
354
- - **Custom Blocks** - Create site-specific blocks: see `custom-block.md`
355
- - **Content Types** - Create reusable content entries: see `content-types.md`
356
- - **Create a Page** - Create pages via CLI: see `create-page.md`
357
- - **Add a Block** - Add blocks to pages: see `add-block.md`
@@ -1,330 +0,0 @@
1
- # Workflow: Content Types
2
-
3
- Define structured content like blog posts, products, testimonials, or services. Content types can generate pages or be embedded in existing pages.
4
-
5
- ## When to Use Content Types
6
-
7
- **Use content types for:**
8
- - Reusable content entries (testimonials, team members, products)
9
- - Collection-based content (blog posts, portfolio items, case studies)
10
- - Structured data that needs consistent fields across entries
11
-
12
- **Content types vs blocks:**
13
- - Content types define *data* (entries)
14
- - Blocks define *presentation* (how data appears on pages)
15
- - Use `block.embed` to display content type entries on pages
16
-
17
- ## Prerequisites
18
-
19
- - `riverbank.config.ts` exists
20
- - Understanding of your data structure needs
21
-
22
- ## Steps
23
-
24
- ### Step 1: Define Content Type in Config
25
-
26
- Add your content type to the `contentTypes` array in `riverbank.config.ts`:
27
-
28
- ```typescript
29
- import { defineConfig } from '@riverbankcms/sdk/config';
30
-
31
- export default defineConfig({
32
- siteId: '...',
33
-
34
- contentTypes: [
35
- {
36
- key: 'testimonial',
37
- name: 'Testimonial',
38
- description: 'Customer testimonials and reviews',
39
- hasPages: false,
40
- titleField: 'name',
41
- fields: [
42
- { id: 'name', type: 'text', label: 'Name', required: true },
43
- { id: 'jobTitle', type: 'text', label: 'Job Title' },
44
- { id: 'company', type: 'text', label: 'Company' },
45
- { id: 'body', type: 'richText', label: 'Quote', required: true, format: 'html' },
46
- ],
47
- },
48
- ],
49
- });
50
- ```
51
-
52
- ### Step 2: Choose hasPages Setting
53
-
54
- | Setting | Behavior |
55
- |---------|----------|
56
- | `hasPages: false` | Entries are only displayed via `block.embed` on other pages |
57
- | `hasPages: true` | Each entry gets its own page at the route pattern URL |
58
-
59
- For `hasPages: true`, also set `routePattern`:
60
-
61
- ```typescript
62
- {
63
- key: 'post',
64
- name: 'Blog Post',
65
- hasPages: true,
66
- routePattern: '/blog/{slug}', // Entry at /blog/my-post-title
67
- fields: [...],
68
- }
69
- ```
70
-
71
- ### Step 3: Push Configuration
72
-
73
- Push the content type to make it available in the CMS:
74
-
75
- ```bash
76
- riverbankcms push-config
77
- ```
78
-
79
- ### Step 4: Create Entries
80
-
81
- Create entries via CLI:
82
-
83
- ```bash
84
- # Testimonial (no pages)
85
- riverbankcms entry upsert testimonial john-smith \
86
- --data '{"name": "John Smith", "company": "Acme Corp", "body": "<p>Great service!</p>"}'
87
-
88
- # Blog post (with pages)
89
- riverbankcms entry upsert post first-post \
90
- --title "My First Post" \
91
- --data '{"excerpt": "A quick intro", "content": "<p>Hello world...</p>"}'
92
- ```
93
-
94
- Or create via the CMS dashboard.
95
-
96
- ### Step 5: Display with block.embed
97
-
98
- Add entries to pages using the embed block:
99
-
100
- ```bash
101
- # Embed all testimonials
102
- riverbankcms block upsert home testimonials-section \
103
- --kind block.embed \
104
- --data '{"contentType": "testimonial", "layout": "grid"}'
105
-
106
- # Embed specific entries
107
- riverbankcms block upsert home featured-reviews \
108
- --kind block.embed \
109
- --data '{"contentType": "testimonial", "mode": "manual", "entries": ["john-smith", "jane-doe"]}'
110
- ```
111
-
112
- ## Content Type Options
113
-
114
- ### Basic Options
115
-
116
- | Property | Description |
117
- |----------|-------------|
118
- | `key` | Unique identifier (e.g., `'testimonial'`, `'blog-post'`) |
119
- | `name` | Display name in CMS |
120
- | `description` | Helpful description for editors |
121
- | `fields` | Array of field definitions |
122
- | `titleField` | Which field to use as the entry title (defaults to `'title'`) |
123
-
124
- ### Page Options
125
-
126
- | Property | Description |
127
- |----------|-------------|
128
- | `hasPages` | `true` if entries should have their own pages |
129
- | `routePattern` | URL pattern with `{slug}` placeholder |
130
-
131
- ## Complete Examples
132
-
133
- ### Example 1: Testimonials (No Pages)
134
-
135
- Testimonials displayed via embed blocks, no individual pages:
136
-
137
- ```typescript
138
- {
139
- key: 'testimonial',
140
- name: 'Testimonial',
141
- description: 'Customer testimonials and reviews',
142
- hasPages: false,
143
- titleField: 'name',
144
- fields: [
145
- { id: 'name', type: 'text', label: 'Name', required: true },
146
- { id: 'jobTitle', type: 'text', label: 'Job Title' },
147
- { id: 'company', type: 'text', label: 'Company' },
148
- { id: 'body', type: 'richText', label: 'Quote', required: true, format: 'html' },
149
- ],
150
- }
151
- ```
152
-
153
- ### Example 2: Blog Posts (With Pages)
154
-
155
- Blog posts with individual pages at `/blog/{slug}`:
156
-
157
- ```typescript
158
- {
159
- key: 'post',
160
- name: 'Blog Post',
161
- description: 'Blog articles and news',
162
- hasPages: true,
163
- routePattern: '/blog/{slug}',
164
- fields: [
165
- { id: 'excerpt', type: 'text', label: 'Excerpt', multiline: true },
166
- { id: 'image', type: 'media', label: 'Featured Image', mediaKinds: ['image'] },
167
- { id: 'content', type: 'richText', label: 'Content', required: true, format: 'html' },
168
- { id: 'author', type: 'text', label: 'Author' },
169
- { id: 'publishedAt', type: 'datetime', label: 'Publish Date' },
170
- ],
171
- }
172
- ```
173
-
174
- ### Example 3: Portfolio Items (With Pages)
175
-
176
- Portfolio entries with case study pages:
177
-
178
- ```typescript
179
- {
180
- key: 'portfolio-item',
181
- name: 'Portfolio Item',
182
- description: 'Work portfolio entries with case study pages',
183
- hasPages: true,
184
- routePattern: '/work/{slug}',
185
- fields: [
186
- { id: 'short-description', type: 'text', label: 'Short Description', multiline: true },
187
- { id: 'full-description', type: 'richText', label: 'Full Description', format: 'html' },
188
- { id: 'image', type: 'media', label: 'Featured Image', mediaKinds: ['image'] },
189
- { id: 'content', type: 'richText', label: 'Case Study Content', format: 'html' },
190
- { id: 'link', type: 'link', label: 'External Link' },
191
- ],
192
- }
193
- ```
194
-
195
- ### Example 4: Service Tiles (No Pages, With Button Group)
196
-
197
- Services with grouped button fields:
198
-
199
- ```typescript
200
- {
201
- key: 'featured-service',
202
- name: 'Featured Service',
203
- description: 'Detailed service cards with CTA buttons',
204
- hasPages: false,
205
- titleField: 'title',
206
- fields: [
207
- { id: 'title', type: 'text', label: 'Title', required: true },
208
- { id: 'description', type: 'richText', label: 'Description', format: 'html' },
209
- { id: 'icon', type: 'media', label: 'Icon', mediaKinds: ['image'] },
210
- {
211
- id: 'button',
212
- type: 'group',
213
- label: 'Button',
214
- schema: {
215
- fields: [
216
- { id: 'label', type: 'text', label: 'Label', required: true },
217
- {
218
- id: 'variant',
219
- type: 'select',
220
- label: 'Style',
221
- options: [
222
- { value: 'primary', label: 'Primary' },
223
- { value: 'secondary', label: 'Secondary' },
224
- ],
225
- },
226
- { id: 'link', type: 'link', label: 'Link', required: true },
227
- ],
228
- },
229
- },
230
- ],
231
- }
232
- ```
233
-
234
- ## Configuring Embed Layout Options
235
-
236
- Customize how entries display in embed blocks by overriding layout options:
237
-
238
- ```typescript
239
- // In riverbank.config.ts
240
- blockFieldOptions: {
241
- 'block.embed': {
242
- layout: {
243
- options: [
244
- { value: 'showcase', label: 'Services Showcase' },
245
- { value: 'list', label: 'Simple List' },
246
- { value: 'grid', label: 'Grid Layout' },
247
- { value: 'carousel', label: 'Carousel' },
248
- ],
249
- },
250
- },
251
- }
252
- ```
253
-
254
- Then create an override component to render each layout:
255
-
256
- ```typescript
257
- // src/components/EmbedRenderer.tsx
258
- import type { BlockOverrideProps, EmbedContent } from '@riverbankcms/sdk/rendering';
259
-
260
- export function EmbedRenderer({ content, data }: BlockOverrideProps<EmbedContent>) {
261
- const layout = content.layout || 'list';
262
- const entries = data?.entries || [];
263
-
264
- switch (layout) {
265
- case 'showcase':
266
- return <ShowcaseLayout entries={entries} />;
267
- case 'grid':
268
- return <GridLayout entries={entries} />;
269
- case 'carousel':
270
- return <CarouselLayout entries={entries} />;
271
- default:
272
- return <ListLayout entries={entries} />;
273
- }
274
- }
275
- ```
276
-
277
- ## Entry CLI Commands
278
-
279
- ```bash
280
- # Create or update entry
281
- riverbankcms entry upsert <content-type> <identifier> --data '...'
282
-
283
- # With title (for entries with pages)
284
- riverbankcms entry upsert post my-post --title "My Post" --data '...'
285
-
286
- # List entries
287
- riverbankcms entry list <content-type>
288
-
289
- # Get single entry
290
- riverbankcms entry get <content-type> <identifier>
291
-
292
- # Publish entry
293
- riverbankcms entry publish <content-type> <identifier>
294
-
295
- # Delete entry
296
- riverbankcms delete entry <content-type> <identifier> --yes
297
- ```
298
-
299
- ## Verification
300
-
301
- 1. Check content type appears in CMS dashboard
302
- 2. Create an entry via CMS or CLI
303
- 3. For `hasPages: true`, verify the entry page loads at the route pattern URL
304
- 4. Add an embed block to a page and verify entries display
305
-
306
- ## Troubleshooting
307
-
308
- ### Content type not appearing in CMS
309
-
310
- - Run `riverbankcms push-config` to sync
311
- - Verify `key` is unique across all content types
312
- - Check for syntax errors in config
313
-
314
- ### Entry page not loading (hasPages: true)
315
-
316
- - Verify `routePattern` is correct (e.g., `/blog/{slug}`)
317
- - Check entry is published: `riverbankcms entry get <type> <id>`
318
- - Ensure your catch-all route handles content entries
319
-
320
- ### Embed block not showing entries
321
-
322
- - Verify `contentType` matches the content type key exactly
323
- - Check entries exist: `riverbankcms entry list <type>`
324
- - Ensure entries are published
325
-
326
- ### titleField not working
327
-
328
- - Verify `titleField` matches an existing field `id`
329
- - The field must be a text field
330
- - If not set, defaults to `'title'`