tinyzoo 0.0.0-stage → 0.2.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 (392) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +46 -2
  3. package/app/app.config.ts +35 -0
  4. package/app/assets/brand/characters/bright/bird.svg +1 -0
  5. package/app/assets/brand/characters/bright/bunny.svg +1 -0
  6. package/app/assets/brand/characters/bright/elephant.svg +1 -0
  7. package/app/assets/brand/characters/bright/fox.svg +1 -0
  8. package/app/assets/brand/characters/bright/frog.svg +1 -0
  9. package/app/assets/brand/characters/bright/octopus.svg +1 -0
  10. package/app/assets/brand/characters/muted/bee.svg +1 -0
  11. package/app/assets/brand/characters/muted/bird.svg +1 -0
  12. package/app/assets/brand/characters/muted/butterfly.svg +1 -0
  13. package/app/assets/brand/characters/muted/chick.svg +1 -0
  14. package/app/assets/brand/characters/muted/cow.svg +1 -0
  15. package/app/assets/brand/characters/muted/deer.svg +1 -0
  16. package/app/assets/brand/characters/muted/duck.svg +1 -0
  17. package/app/assets/brand/characters/muted/elephant.svg +1 -0
  18. package/app/assets/brand/characters/muted/fox.svg +1 -0
  19. package/app/assets/brand/characters/muted/hedgehog.svg +1 -0
  20. package/app/assets/brand/characters/muted/koala.svg +1 -0
  21. package/app/assets/brand/characters/muted/ladybug.svg +1 -0
  22. package/app/assets/brand/characters/muted/lion.svg +1 -0
  23. package/app/assets/brand/characters/muted/mouse.svg +1 -0
  24. package/app/assets/brand/characters/muted/octopus.svg +1 -0
  25. package/app/assets/brand/characters/muted/owl.svg +1 -0
  26. package/app/assets/brand/characters/muted/panda.svg +1 -0
  27. package/app/assets/brand/characters/muted/penguin.svg +1 -0
  28. package/app/assets/brand/characters/muted/pig.svg +1 -0
  29. package/app/assets/brand/characters/muted/poodle.svg +1 -0
  30. package/app/assets/brand/characters/muted/raccoon.svg +1 -0
  31. package/app/assets/brand/characters/muted/seal.svg +1 -0
  32. package/app/assets/brand/characters/muted/sheep.svg +1 -0
  33. package/app/assets/brand/characters/muted/snail.svg +1 -0
  34. package/app/assets/brand/characters/muted/turtle.svg +1 -0
  35. package/app/assets/brand/characters/muted/whale.svg +1 -0
  36. package/app/assets/brand/logo/favicon.svg +1 -0
  37. package/app/assets/brand/logo/logo-primary-reversed.svg +1 -0
  38. package/app/assets/brand/logo/logo-primary.svg +1 -0
  39. package/app/assets/brand/logo/mascot-reversed.svg +1 -0
  40. package/app/assets/brand/logo/mascot.svg +1 -0
  41. package/app/assets/brand/logo/wordmark-reversed.svg +1 -0
  42. package/app/assets/brand/logo/wordmark.svg +1 -0
  43. package/app/assets/css/cms-admin.css +607 -0
  44. package/app/components/CmsBlocks.vue +30 -0
  45. package/app/components/CmsCell.vue +16 -0
  46. package/app/components/CmsCellBadge.vue +18 -0
  47. package/app/components/CmsCellBlocks.vue +9 -0
  48. package/app/components/CmsCellBoolean.vue +12 -0
  49. package/app/components/CmsCellCode.vue +7 -0
  50. package/app/components/CmsCellColor.vue +13 -0
  51. package/app/components/CmsCellDate.vue +10 -0
  52. package/app/components/CmsCellExcerpt.vue +21 -0
  53. package/app/components/CmsCellGallery.vue +10 -0
  54. package/app/components/CmsCellGroup.vue +23 -0
  55. package/app/components/CmsCellNumber.vue +7 -0
  56. package/app/components/CmsCellRelation.vue +8 -0
  57. package/app/components/CmsCellText.vue +12 -0
  58. package/app/components/CmsCellThumb.vue +18 -0
  59. package/app/components/CmsConfirmDialog.vue +55 -0
  60. package/app/components/CmsContent.vue +103 -0
  61. package/app/components/CmsDayPicker.vue +44 -0
  62. package/app/components/CmsEmptyState.vue +35 -0
  63. package/app/components/CmsField.vue +111 -0
  64. package/app/components/CmsFieldBlocks.vue +353 -0
  65. package/app/components/CmsFieldBoolean.vue +8 -0
  66. package/app/components/CmsFieldColor.vue +42 -0
  67. package/app/components/CmsFieldDate.vue +131 -0
  68. package/app/components/CmsFieldGallery.vue +114 -0
  69. package/app/components/CmsFieldGroup.vue +53 -0
  70. package/app/components/CmsFieldMedia.vue +219 -0
  71. package/app/components/CmsFieldNumber.vue +11 -0
  72. package/app/components/CmsFieldRelationMany.vue +54 -0
  73. package/app/components/CmsFieldRelationOne.vue +47 -0
  74. package/app/components/CmsFieldRichText.vue +45 -0
  75. package/app/components/CmsFieldSelect.vue +41 -0
  76. package/app/components/CmsFieldSlug.vue +46 -0
  77. package/app/components/CmsFieldText.vue +75 -0
  78. package/app/components/CmsFormSections.vue +150 -0
  79. package/app/components/CmsHighlight.vue +22 -0
  80. package/app/components/CmsImage.vue +39 -0
  81. package/app/components/CmsLinkPicker.vue +122 -0
  82. package/app/components/CmsLinkTarget.vue +35 -0
  83. package/app/components/CmsListFilters.vue +107 -0
  84. package/app/components/CmsLiveNotice.vue +64 -0
  85. package/app/components/CmsLoadError.vue +24 -0
  86. package/app/components/CmsMascot.vue +10 -0
  87. package/app/components/CmsMediaLibrary.vue +114 -0
  88. package/app/components/CmsMediaPreview.vue +34 -0
  89. package/app/components/CmsMediaThumb.vue +22 -0
  90. package/app/components/CmsMoment.vue +42 -0
  91. package/app/components/CmsNav.vue +39 -0
  92. package/app/components/CmsPage.vue +86 -0
  93. package/app/components/CmsPasswordInput.vue +22 -0
  94. package/app/components/CmsPresence.vue +29 -0
  95. package/app/components/CmsPreviewPanel.vue +131 -0
  96. package/app/components/CmsPublishReview.vue +102 -0
  97. package/app/components/CmsRevisions.vue +195 -0
  98. package/app/components/CmsRichTextEditor.vue +290 -0
  99. package/app/components/CmsSearch.vue +99 -0
  100. package/app/components/CmsSection.vue +20 -0
  101. package/app/components/CmsSingletonForm.vue +283 -0
  102. package/app/components/CmsStatusBadge.vue +21 -0
  103. package/app/components/CmsTime.vue +16 -0
  104. package/app/components/CmsTranslationRef.vue +27 -0
  105. package/app/components/CmsTreeList.vue +453 -0
  106. package/app/components/CmsUnsavedText.vue +34 -0
  107. package/app/components/CmsWordmark.vue +10 -0
  108. package/app/composables/useCmsAdminHead.ts +18 -0
  109. package/app/composables/useCmsCollab.ts +165 -0
  110. package/app/composables/useCmsConfirm.ts +39 -0
  111. package/app/composables/useCmsEntryActions.ts +75 -0
  112. package/app/composables/useCmsFocus.ts +13 -0
  113. package/app/composables/useCmsForm.ts +273 -0
  114. package/app/composables/useCmsI18n.ts +185 -0
  115. package/app/composables/useCmsLinkTargets.ts +84 -0
  116. package/app/composables/useCmsLive.ts +199 -0
  117. package/app/composables/useCmsSearch.ts +62 -0
  118. package/app/composables/useCmsSeo.ts +99 -0
  119. package/app/composables/useCmsSignedIn.ts +24 -0
  120. package/app/composables/useCmsUiLocale.ts +24 -0
  121. package/app/i18n/cs.ts +781 -0
  122. package/app/i18n/de.ts +781 -0
  123. package/app/i18n/en.ts +782 -0
  124. package/app/i18n/types.ts +22 -0
  125. package/app/layouts/admin.vue +224 -0
  126. package/app/layouts/cms-auth.vue +37 -0
  127. package/app/middleware/cms-api-not-a-page.global.ts +10 -0
  128. package/app/middleware/cms-auth.global.ts +16 -0
  129. package/app/pages/admin/[entity]/[id].vue +1109 -0
  130. package/app/pages/admin/[entity]/index.vue +733 -0
  131. package/app/pages/admin/account.vue +117 -0
  132. package/app/pages/admin/forgot.vue +50 -0
  133. package/app/pages/admin/index.vue +184 -0
  134. package/app/pages/admin/invite/[token].vue +73 -0
  135. package/app/pages/admin/login.vue +84 -0
  136. package/app/pages/admin/media.vue +494 -0
  137. package/app/pages/admin/privacy.vue +193 -0
  138. package/app/pages/admin/reset/[token].vue +52 -0
  139. package/app/pages/admin/setup.vue +87 -0
  140. package/app/pages/admin/styleguide.vue +261 -0
  141. package/app/pages/admin/team.vue +258 -0
  142. package/app/plugins/cmsLivePreview.client.ts +20 -0
  143. package/app/plugins/cmsSignedOut.client.ts +31 -0
  144. package/app/utils/cmsBlockType.ts +11 -0
  145. package/app/utils/cmsBrand.ts +38 -0
  146. package/app/utils/cmsDiff.ts +83 -0
  147. package/app/utils/cmsFetch.ts +7 -0
  148. package/app/utils/cmsFocusInvalid.ts +22 -0
  149. package/app/utils/cmsIssues.ts +128 -0
  150. package/app/utils/cmsJson.ts +28 -0
  151. package/app/utils/cmsMedia.ts +63 -0
  152. package/app/utils/cmsSections.ts +154 -0
  153. package/app/utils/cmsTime.ts +41 -0
  154. package/cli/backup.ts +713 -0
  155. package/cli/breaking.ts +174 -0
  156. package/cli/content-migrate.ts +239 -0
  157. package/cli/db.ts +86 -0
  158. package/cli/export.ts +336 -0
  159. package/cli/generate.ts +146 -0
  160. package/cli/import.ts +643 -0
  161. package/cli/index.ts +140 -0
  162. package/cli/links-convert.ts +291 -0
  163. package/cli/seed-engine.ts +705 -0
  164. package/cli/seed.ts +339 -0
  165. package/cli/status.ts +49 -0
  166. package/cli/tar.ts +304 -0
  167. package/cli/transfer.ts +677 -0
  168. package/cli/up.ts +27 -0
  169. package/cli/upgrade.ts +60 -0
  170. package/cli/versions.ts +60 -0
  171. package/forms/components/CmsForm.vue +186 -0
  172. package/forms/index.ts +203 -0
  173. package/forms/messages.ts +104 -0
  174. package/forms/retention.ts +48 -0
  175. package/forms/server/form.get.ts +12 -0
  176. package/forms/server/form.post.ts +109 -0
  177. package/forms/server/formSettings.ts +12 -0
  178. package/forms/server/forms.ts +127 -0
  179. package/module.ts +373 -0
  180. package/nuxt.config.ts +43 -0
  181. package/package.json +98 -3
  182. package/server/api/cms/[entity]/[id]/revisions/[rev].get.ts +19 -0
  183. package/server/api/cms/[entity]/[id]/revisions/index.get.ts +14 -0
  184. package/server/api/cms/[entity]/[id].delete.ts +52 -0
  185. package/server/api/cms/[entity]/[id].get.ts +21 -0
  186. package/server/api/cms/[entity]/[id].patch.ts +116 -0
  187. package/server/api/cms/[entity]/_export.get.ts +69 -0
  188. package/server/api/cms/[entity]/_move.post.ts +81 -0
  189. package/server/api/cms/[entity]/_order.post.ts +49 -0
  190. package/server/api/cms/[entity]/_tree.get.ts +41 -0
  191. package/server/api/cms/[entity]/index.get.ts +62 -0
  192. package/server/api/cms/[entity]/index.post.ts +38 -0
  193. package/server/api/cms/[entity]/options.get.ts +55 -0
  194. package/server/api/cms/_auth/accept.post.ts +33 -0
  195. package/server/api/cms/_auth/forgot.post.ts +39 -0
  196. package/server/api/cms/_auth/invite/[token].get.ts +18 -0
  197. package/server/api/cms/_auth/login.post.ts +42 -0
  198. package/server/api/cms/_auth/logout.post.ts +7 -0
  199. package/server/api/cms/_auth/me.get.ts +5 -0
  200. package/server/api/cms/_auth/me.patch.ts +32 -0
  201. package/server/api/cms/_auth/password.post.ts +29 -0
  202. package/server/api/cms/_auth/reset.post.ts +34 -0
  203. package/server/api/cms/_auth/setup.post.ts +46 -0
  204. package/server/api/cms/_auth/status.get.ts +18 -0
  205. package/server/api/cms/_collab/session.get.ts +30 -0
  206. package/server/api/cms/_collab/socket.ts +51 -0
  207. package/server/api/cms/_collab/unsaved.delete.ts +16 -0
  208. package/server/api/cms/_graph.get.ts +20 -0
  209. package/server/api/cms/_links/resolve.post.ts +17 -0
  210. package/server/api/cms/_links.get.ts +81 -0
  211. package/server/api/cms/_live.ts +30 -0
  212. package/server/api/cms/_media/[id]/usage.get.ts +14 -0
  213. package/server/api/cms/_media/[id].delete.ts +29 -0
  214. package/server/api/cms/_media/[id].get.ts +13 -0
  215. package/server/api/cms/_media/[id].patch.ts +64 -0
  216. package/server/api/cms/_media/exists.post.ts +15 -0
  217. package/server/api/cms/_media/img/[id]/[file].get.ts +42 -0
  218. package/server/api/cms/_media/index.get.ts +44 -0
  219. package/server/api/cms/_media/index.post.ts +147 -0
  220. package/server/api/cms/_media/raw/[...key].get.ts +85 -0
  221. package/server/api/cms/_media/raw/[...key].head.ts +2 -0
  222. package/server/api/cms/_overview.get.ts +87 -0
  223. package/server/api/cms/_preview.post.ts +17 -0
  224. package/server/api/cms/_privacy/delete.post.ts +14 -0
  225. package/server/api/cms/_privacy/export.post.ts +25 -0
  226. package/server/api/cms/_privacy/lookup.post.ts +27 -0
  227. package/server/api/cms/_search.get.ts +17 -0
  228. package/server/api/cms/_singleton/[name].get.ts +19 -0
  229. package/server/api/cms/_singleton/[name].put.ts +76 -0
  230. package/server/api/cms/_users/[id]/resend.post.ts +25 -0
  231. package/server/api/cms/_users/[id].delete.ts +21 -0
  232. package/server/api/cms/_users/[id].patch.ts +45 -0
  233. package/server/api/cms/_users/index.get.ts +28 -0
  234. package/server/api/cms/_users/index.post.ts +39 -0
  235. package/server/api/content/[entity]/[slug].get.ts +74 -0
  236. package/server/api/content/[entity]/index.get.ts +100 -0
  237. package/server/api/content/_global/[name].get.ts +23 -0
  238. package/server/api/content/_search.get.ts +28 -0
  239. package/server/api/content/_sitemap.get.ts +8 -0
  240. package/server/api/content/_tree/[entity].get.ts +31 -0
  241. package/server/api/content-types.ts.get.ts +17 -0
  242. package/server/api/health/live.get.ts +10 -0
  243. package/server/api/health/ready.get.ts +21 -0
  244. package/server/api/openapi.get.ts +48 -0
  245. package/server/api/openapi.json.get.ts +32 -0
  246. package/server/db/driver.ts +8 -0
  247. package/server/mail/mailer.ts +43 -0
  248. package/server/middleware/cms-0-headers.ts +37 -0
  249. package/server/middleware/cms-0-migrate-gate.ts +14 -0
  250. package/server/middleware/cms-csrf.ts +28 -0
  251. package/server/middleware/cms-limits.ts +20 -0
  252. package/server/middleware/cms-redirects.ts +21 -0
  253. package/server/middleware/cms-session.ts +41 -0
  254. package/server/middleware/cms-z-plugin-access.ts +15 -0
  255. package/server/plugins/cms-0-config-check.ts +35 -0
  256. package/server/plugins/cms-changes.ts +53 -0
  257. package/server/plugins/cms-content-etag.ts +21 -0
  258. package/server/plugins/cms-errors.ts +45 -0
  259. package/server/plugins/cms-migrate.ts +5 -0
  260. package/server/plugins/cms-plugins.ts +17 -0
  261. package/server/plugins/cms-search.ts +12 -0
  262. package/server/plugins/cms-setup-code.ts +15 -0
  263. package/server/routes/sitemap.xml.get.ts +25 -0
  264. package/server/store/redis.ts +95 -0
  265. package/server/store/types.ts +21 -0
  266. package/server/tasks/cms/retention.ts +10 -0
  267. package/server/tasks/cms/scheduled.ts +10 -0
  268. package/server/tasks/cms/search-reindex.ts +12 -0
  269. package/server/utils/cmsAudit.ts +29 -0
  270. package/server/utils/cmsAuth.ts +143 -0
  271. package/server/utils/cmsBlocks.ts +47 -0
  272. package/server/utils/cmsChanges.ts +222 -0
  273. package/server/utils/cmsCollab.ts +286 -0
  274. package/server/utils/cmsCollabServer.ts +451 -0
  275. package/server/utils/cmsCollate.ts +27 -0
  276. package/server/utils/cmsContent.ts +376 -0
  277. package/server/utils/cmsCrud.ts +361 -0
  278. package/server/utils/cmsCsv.ts +24 -0
  279. package/server/utils/cmsDb.ts +23 -0
  280. package/server/utils/cmsDemo.ts +36 -0
  281. package/server/utils/cmsEmails.ts +125 -0
  282. package/server/utils/cmsErrors.ts +40 -0
  283. package/server/utils/cmsFold.ts +17 -0
  284. package/server/utils/cmsImageSizes.ts +51 -0
  285. package/server/utils/cmsJson.ts +6 -0
  286. package/server/utils/cmsLinkAddress.ts +50 -0
  287. package/server/utils/cmsLinks.ts +248 -0
  288. package/server/utils/cmsListQuery.ts +93 -0
  289. package/server/utils/cmsLive.ts +393 -0
  290. package/server/utils/cmsLocales.ts +96 -0
  291. package/server/utils/cmsMail.ts +28 -0
  292. package/server/utils/cmsMediaGc.ts +188 -0
  293. package/server/utils/cmsMediaKeys.ts +62 -0
  294. package/server/utils/cmsMigrate.ts +86 -0
  295. package/server/utils/cmsPreviewDraft.ts +72 -0
  296. package/server/utils/cmsPrivacy.ts +176 -0
  297. package/server/utils/cmsPublished.ts +57 -0
  298. package/server/utils/cmsRange.ts +38 -0
  299. package/server/utils/cmsRateLimit.ts +82 -0
  300. package/server/utils/cmsRedirects.ts +160 -0
  301. package/server/utils/cmsRetention.ts +61 -0
  302. package/server/utils/cmsRevisions.ts +103 -0
  303. package/server/utils/cmsScheduler.ts +45 -0
  304. package/server/utils/cmsScrub.ts +107 -0
  305. package/server/utils/cmsSearch.ts +354 -0
  306. package/server/utils/cmsSession.ts +102 -0
  307. package/server/utils/cmsSetupCode.ts +97 -0
  308. package/server/utils/cmsSitemap.ts +176 -0
  309. package/server/utils/cmsStorage.ts +580 -0
  310. package/server/utils/cmsStore.ts +109 -0
  311. package/server/utils/cmsTiming.ts +14 -0
  312. package/server/utils/cmsTooMany.ts +9 -0
  313. package/server/utils/cmsTranslationWrite.ts +186 -0
  314. package/server/utils/cmsTree.ts +251 -0
  315. package/server/utils/cmsTreeAddress.ts +65 -0
  316. package/server/utils/cmsUpload.ts +228 -0
  317. package/server/utils/cmsWebhooks.ts +104 -0
  318. package/shared/json.ts +11 -0
  319. package/shared/richtext-editor.ts +56 -0
  320. package/shared/richtext-normalize.ts +33 -0
  321. package/shared/richtext-paste.ts +151 -0
  322. package/shared/storage-delivery.ts +53 -0
  323. package/src/blocks.ts +624 -0
  324. package/src/changes.ts +54 -0
  325. package/src/content-shape.ts +340 -0
  326. package/src/deprecate.ts +64 -0
  327. package/src/descriptor.ts +149 -0
  328. package/src/docs.ts +27 -0
  329. package/src/emitter.ts +94 -0
  330. package/src/entity.ts +624 -0
  331. package/src/errorReport.ts +41 -0
  332. package/src/fields.ts +465 -0
  333. package/src/i18n.ts +26 -0
  334. package/src/index.ts +54 -0
  335. package/src/linkref.ts +31 -0
  336. package/src/links.ts +179 -0
  337. package/src/locales.ts +39 -0
  338. package/src/media.ts +48 -0
  339. package/src/migrate.ts +236 -0
  340. package/src/openapi.ts +377 -0
  341. package/src/paths.ts +88 -0
  342. package/src/plugin.ts +505 -0
  343. package/src/presets.ts +230 -0
  344. package/src/richtext.ts +88 -0
  345. package/src/sdk.ts +181 -0
  346. package/src/search.ts +312 -0
  347. package/src/seed.ts +225 -0
  348. package/src/setupCode.ts +30 -0
  349. package/src/system.ts +219 -0
  350. package/src/tree.ts +421 -0
  351. package/src/upgrades.ts +137 -0
  352. package/starter/.env.example +10 -0
  353. package/starter/README.md +65 -0
  354. package/starter/app/app.config.ts +10 -0
  355. package/starter/app/app.vue +12 -0
  356. package/starter/app/assets/css/main.css +15 -0
  357. package/starter/app/components/global/BlockContact.vue +15 -0
  358. package/starter/app/components/global/BlockCta.vue +15 -0
  359. package/starter/app/components/global/BlockHero.vue +23 -0
  360. package/starter/app/components/global/BlockImage.vue +13 -0
  361. package/starter/app/components/global/BlockText.vue +12 -0
  362. package/starter/app/composables/useSite.ts +77 -0
  363. package/starter/app/error.vue +28 -0
  364. package/starter/app/layouts/default.vue +106 -0
  365. package/starter/app/lib/cms-content.ts +152 -0
  366. package/starter/app/pages/[...slug].vue +66 -0
  367. package/starter/app/pages/hledat.vue +59 -0
  368. package/starter/app/pages/index.vue +20 -0
  369. package/starter/cms.config.ts +137 -0
  370. package/starter/compose.yaml +15 -0
  371. package/starter/drizzle.config.ts +8 -0
  372. package/starter/gitignore.txt +8 -0
  373. package/starter/nuxt.config.ts +13 -0
  374. package/starter/package.json +38 -0
  375. package/starter/scripts/typecheck.mjs +38 -0
  376. package/starter/seed/index.ts +297 -0
  377. package/starter/seed/media/about.jpg +0 -0
  378. package/starter/seed/media/hero.jpg +0 -0
  379. package/starter/seed/media/logo.png +0 -0
  380. package/starter/seed/media/news-bread.jpg +0 -0
  381. package/starter/seed/media/news-morning.jpg +0 -0
  382. package/starter/server/db/migrations/0000_init.sql +269 -0
  383. package/starter/server/db/migrations/0001_page_tree.sql +5 -0
  384. package/starter/server/db/migrations/0002_opening_hours_per_language.sql +1 -0
  385. package/starter/server/db/migrations/meta/0000_snapshot.json +1890 -0
  386. package/starter/server/db/migrations/meta/0001_snapshot.json +1887 -0
  387. package/starter/server/db/migrations/meta/0002_snapshot.json +1893 -0
  388. package/starter/server/db/migrations/meta/_journal.json +27 -0
  389. package/starter/server/db/schema.ts +253 -0
  390. package/starter/server/plugins/sitemap.ts +11 -0
  391. package/starter/server/routes/robots.txt.get.ts +12 -0
  392. package/starter/tsconfig.json +9 -0
@@ -0,0 +1,607 @@
1
+ /*
2
+ * Admin design tokens — tinyzoo's look. See docs/ui-foundation.md.
3
+ *
4
+ * Light: a white workspace with true greys and ink text; charcoal for the one primary
5
+ * action; cream only for the brand's moments (the sign-in, the home welcome, empty
6
+ * states, the current page in the sidebar). Dark ("charcoal night"): every grey is
7
+ * tinted toward the mascot's charcoal, text is cream, and the primary flips to a
8
+ * cream button with ink text — the reversed logo, as an interface.
9
+ *
10
+ * Everything is scoped to html[data-cms-admin], which the admin layouts set on
11
+ * <html> while an admin page is shown. That keeps the admin's look independent of
12
+ * the host website's theme (the CMS runs inside the client's app), and covers
13
+ * everything Nuxt UI teleports to <body> (modals, menus, toasts).
14
+ *
15
+ * Nuxt UI reads its colours from --ui-color-{primary,neutral,…}-{50…950} and its
16
+ * roles (--ui-primary, --ui-text-muted, --ui-bg, …) from those. Overriding them at
17
+ * html[data-cms-admin] (specificity 0,1,1) beats Nuxt UI's :root (0,1,0).
18
+ *
19
+ * Re-skin for a client: set `cms.admin.accent` in app.config.ts to one of the
20
+ * built-in accents (mono — tinyzoo's charcoal, the default —, indigo, blue, violet,
21
+ * emerald), or override the variables below in the host's CSS under html[data-cms-admin].
22
+ */
23
+
24
+ /* Tailwind resets buttons to the arrow cursor; in the admin anything you can click
25
+ shows the hand (disabled controls keep their own cursor). In the base layer, so
26
+ specific cursors (resize handles, drag grips) still win. */
27
+ @layer base {
28
+ html[data-cms-admin] :is(button:not(:disabled), [role="button"]:not([aria-disabled="true"]), summary) { cursor: pointer; }
29
+ }
30
+
31
+ /* ── Light ── */
32
+ html[data-cms-admin] {
33
+ /* tinyzoo's brand (docs/brand/brand-guide.md) */
34
+ --tz-ink: #131313;
35
+ --tz-charcoal: #2E3035;
36
+ --tz-cream: #F9F5EF;
37
+
38
+ /* A true grey (no tint) — the workspace stays neutral; the brand is in the moments. */
39
+ --ui-color-neutral-50: oklch(98.5% 0 0);
40
+ --ui-color-neutral-100: oklch(96.7% 0 0);
41
+ --ui-color-neutral-200: oklch(92.2% 0 0);
42
+ --ui-color-neutral-300: oklch(87% 0 0);
43
+ --ui-color-neutral-400: oklch(70.8% 0 0);
44
+ --ui-color-neutral-500: oklch(55.6% 0 0);
45
+ --ui-color-neutral-600: oklch(43.9% 0 0);
46
+ --ui-color-neutral-700: oklch(37.1% 0 0);
47
+ --ui-color-neutral-800: oklch(26.9% 0 0);
48
+ --ui-color-neutral-900: oklch(20.5% 0 0);
49
+ --ui-color-neutral-950: oklch(14.5% 0 0);
50
+
51
+ /* Type: Inter for everything you operate, Manrope (the wordmark's face) for titles,
52
+ greetings and moments, Geist Mono for addresses. */
53
+ --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
54
+ --cms-font-display: 'Manrope', 'Inter', ui-sans-serif, system-ui, sans-serif;
55
+ --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
56
+
57
+ /* Roles. Every text role is AA (4.5:1) on white, on cream and on the hover grey
58
+ (test/unit/admin-contrast.spec.ts reads these values): "dimmed" is the quietest
59
+ text there is — placeholders, "Optional", counts — not a decoration, so it is
60
+ never lighter than 54 % grey (5.0:1 on white, 4.6:1 on cream). Muted is a step
61
+ darker; icons and hairlines that carry no words use the neutral ramp directly. */
62
+ --ui-text-dimmed: oklch(54% 0 0);
63
+ --ui-text-muted: oklch(50% 0 0);
64
+ --ui-text-toned: var(--ui-color-neutral-600);
65
+ --ui-text: oklch(30% 0 0);
66
+ /* Errors are text too (messages, "Remove", the soft red button): red-700 is 6.5:1 on
67
+ white and 5.5:1 on the soft tint; red-500 was 3.8:1 and 3.3:1. */
68
+ --ui-error: var(--ui-color-error-700);
69
+ /* The other status colours are text, rings and solid buttons too: the 500 shades Nuxt UI
70
+ uses by default are 1.8–3:1 on white. Green and amber also have to read on their own
71
+ 10 % tint (alerts, badges), so they go one shade deeper than blue. */
72
+ --ui-success: var(--ui-color-success-800);
73
+ --ui-warning: var(--ui-color-warning-800);
74
+ --ui-info: var(--ui-color-info-700);
75
+ --ui-secondary: var(--ui-color-secondary-700);
76
+ --ui-text-highlighted: var(--tz-ink);
77
+ --ui-border: var(--ui-color-neutral-200);
78
+ --ui-border-muted: var(--ui-color-neutral-100);
79
+ --ui-bg-elevated: var(--ui-color-neutral-100);
80
+
81
+ /* Surfaces */
82
+ --cms-page-bg: #fff;
83
+ --cms-surface: #fff; /* cards, tables */
84
+ --cms-sunken: oklch(98.5% 0.002 85); /* behind a preview, under a page of cards */
85
+ --cms-sidebar-bg: #fff;
86
+
87
+ /* Cream: the brand's moments. */
88
+ --cms-moment-bg: var(--tz-cream);
89
+ --cms-moment-strong: #F1EADF;
90
+ --cms-moment-line: #E7DDCD;
91
+ --cms-moment-text: #6E675D;
92
+ --cms-nav-active: var(--tz-cream);
93
+ --cms-auth-bg: var(--tz-cream);
94
+
95
+ /* Shape & chrome */
96
+ --ui-radius: 0.5rem;
97
+ --ui-header-height: 3.5rem;
98
+ --cms-content-max: 72rem;
99
+ }
100
+
101
+ /* ── Dark: charcoal night ── */
102
+ html[data-cms-admin].dark {
103
+ /* The grey ramp turns toward the mascot's charcoal at the dark end and toward cream
104
+ at the light end, so text is warm and surfaces are the brand's charcoal. */
105
+ --ui-color-neutral-50: #F9F5EF;
106
+ --ui-color-neutral-100: #EEEAE4;
107
+ --ui-color-neutral-200: #D8D4CD;
108
+ --ui-color-neutral-300: #C2BEB7;
109
+ --ui-color-neutral-400: #A09D97;
110
+ --ui-color-neutral-500: #77756F;
111
+ --ui-color-neutral-600: #4A4C52;
112
+ --ui-color-neutral-700: #3A3C42;
113
+ --ui-color-neutral-800: #2E3035;
114
+ --ui-color-neutral-900: #1E1F23;
115
+ --ui-color-neutral-950: #18191C;
116
+
117
+ --ui-error: var(--ui-color-error-400);
118
+ --ui-success: var(--ui-color-success-400);
119
+ --ui-warning: var(--ui-color-warning-400);
120
+ --ui-info: var(--ui-color-info-400);
121
+ --ui-secondary: var(--ui-color-secondary-400);
122
+ /* AA on page, cards, the raised grey and charcoal itself (#2E3035, the "current page"). */
123
+ --ui-text-dimmed: #A09D97;
124
+ --ui-text-muted: #B2AEA7;
125
+ --ui-text-toned: #C2BEB7;
126
+ --ui-text: #D8D4CD;
127
+ --ui-text-highlighted: var(--tz-cream);
128
+ --ui-text-inverted: var(--tz-ink);
129
+ --ui-bg: #18191C;
130
+ --ui-bg-muted: #1B1C1F;
131
+ --ui-bg-elevated: #26282C;
132
+ --ui-bg-accented: #2E3035;
133
+ --ui-bg-inverted: var(--tz-cream);
134
+ --ui-border: #2D2F34;
135
+ --ui-border-muted: #25272B;
136
+ --ui-border-accented: #3A3C42;
137
+
138
+ --cms-page-bg: #18191C;
139
+ --cms-surface: #1E1F23;
140
+ --cms-sunken: #1B1C1F;
141
+ --cms-sidebar-bg: #18191C;
142
+
143
+ --cms-moment-bg: var(--tz-charcoal);
144
+ --cms-moment-strong: #383B41;
145
+ --cms-moment-line: #43464D;
146
+ --cms-moment-text: #B2AEA7;
147
+ --cms-nav-active: var(--tz-charcoal);
148
+ --cms-auth-bg: var(--tz-charcoal);
149
+ }
150
+
151
+ /* ── Accent. Default "mono": tinyzoo's charcoal in light mode, cream in dark. Status
152
+ colours (green published, blue scheduled, red errors…) are then the only colour. ── */
153
+ html[data-cms-admin] {
154
+ --ui-color-primary-50: var(--ui-color-neutral-50);
155
+ --ui-color-primary-100: var(--ui-color-neutral-100);
156
+ --ui-color-primary-200: var(--ui-color-neutral-200);
157
+ --ui-color-primary-300: var(--ui-color-neutral-300);
158
+ --ui-color-primary-400: var(--ui-color-neutral-400);
159
+ --ui-color-primary-500: var(--ui-color-neutral-500);
160
+ --ui-color-primary-600: var(--ui-color-neutral-600);
161
+ --ui-color-primary-700: var(--ui-color-neutral-700);
162
+ --ui-color-primary-800: var(--ui-color-neutral-800);
163
+ --ui-color-primary-900: var(--ui-color-neutral-900);
164
+ --ui-color-primary-950: var(--ui-color-neutral-950);
165
+ --ui-primary: var(--tz-charcoal);
166
+ }
167
+ html[data-cms-admin].dark { --ui-primary: var(--tz-cream); }
168
+
169
+ /* Optional colour accents (cms.admin.accent). Solid buttons keep AA with white text. */
170
+ html[data-cms-admin][data-cms-accent='indigo'] {
171
+ --ui-color-primary-50: oklch(96.2% 0.018 272); --ui-color-primary-100: oklch(93% 0.034 272);
172
+ --ui-color-primary-200: oklch(87% 0.065 274); --ui-color-primary-300: oklch(78.5% 0.115 274);
173
+ --ui-color-primary-400: oklch(67.3% 0.182 276); --ui-color-primary-500: oklch(58.5% 0.233 277);
174
+ --ui-color-primary-600: oklch(51.1% 0.262 277); --ui-color-primary-700: oklch(45.7% 0.24 277);
175
+ --ui-color-primary-800: oklch(39.8% 0.195 277); --ui-color-primary-900: oklch(35.9% 0.144 278);
176
+ --ui-color-primary-950: oklch(25.7% 0.09 281);
177
+ --ui-primary: var(--ui-color-primary-600);
178
+ }
179
+ html[data-cms-admin][data-cms-accent='blue'] {
180
+ --ui-color-primary-50: oklch(97% 0.014 254); --ui-color-primary-100: oklch(93.2% 0.032 255);
181
+ --ui-color-primary-200: oklch(88.2% 0.059 254); --ui-color-primary-300: oklch(80.9% 0.105 251);
182
+ --ui-color-primary-400: oklch(70.7% 0.165 254); --ui-color-primary-500: oklch(62.3% 0.214 259);
183
+ --ui-color-primary-600: oklch(54.6% 0.245 262); --ui-color-primary-700: oklch(48.8% 0.243 264);
184
+ --ui-color-primary-800: oklch(42.4% 0.199 265); --ui-color-primary-900: oklch(37.9% 0.146 265);
185
+ --ui-color-primary-950: oklch(28.2% 0.091 267);
186
+ --ui-primary: var(--ui-color-primary-600);
187
+ }
188
+ html[data-cms-admin][data-cms-accent='violet'] {
189
+ --ui-color-primary-50: oklch(96.9% 0.016 293); --ui-color-primary-100: oklch(94.3% 0.029 295);
190
+ --ui-color-primary-200: oklch(89.4% 0.057 293); --ui-color-primary-300: oklch(81.1% 0.111 294);
191
+ --ui-color-primary-400: oklch(70.2% 0.183 294); --ui-color-primary-500: oklch(60.6% 0.25 293);
192
+ --ui-color-primary-600: oklch(54.1% 0.281 293); --ui-color-primary-700: oklch(49.1% 0.27 293);
193
+ --ui-color-primary-800: oklch(43.2% 0.232 293); --ui-color-primary-900: oklch(38% 0.189 294);
194
+ --ui-color-primary-950: oklch(28.3% 0.141 291);
195
+ --ui-primary: var(--ui-color-primary-600);
196
+ }
197
+ html[data-cms-admin][data-cms-accent='emerald'] {
198
+ --ui-color-primary-50: oklch(97.9% 0.021 166); --ui-color-primary-100: oklch(95% 0.052 163);
199
+ --ui-color-primary-200: oklch(90.5% 0.093 164); --ui-color-primary-300: oklch(84.5% 0.143 165);
200
+ --ui-color-primary-400: oklch(76.5% 0.177 163); --ui-color-primary-500: oklch(69.6% 0.17 162);
201
+ --ui-color-primary-600: oklch(59.6% 0.145 163); --ui-color-primary-700: oklch(50.8% 0.118 165);
202
+ --ui-color-primary-800: oklch(43.2% 0.095 166); --ui-color-primary-900: oklch(37.8% 0.077 168);
203
+ --ui-color-primary-950: oklch(26.2% 0.051 173);
204
+ --ui-primary: var(--ui-color-primary-700);
205
+ }
206
+ html[data-cms-admin].dark[data-cms-accent]:not([data-cms-accent='mono']) { --ui-primary: var(--ui-color-primary-400); --ui-text-inverted: #fff; }
207
+
208
+ /* ── Base ── */
209
+ html[data-cms-admin] body {
210
+ font-family: var(--font-sans);
211
+ background: var(--cms-page-bg);
212
+ color: var(--ui-text);
213
+ -webkit-font-smoothing: antialiased;
214
+ font-feature-settings: 'cv11', 'ss01';
215
+ }
216
+
217
+ /* Titles, greetings and moments: Manrope, heavier and tighter. */
218
+ html[data-cms-admin] .cms-display {
219
+ font-family: var(--cms-font-display);
220
+ font-weight: 700;
221
+ letter-spacing: -0.02em;
222
+ }
223
+
224
+ /* The one frame: a hairline border, no shadow. Never nested. */
225
+ html[data-cms-admin] .cms-card {
226
+ background: var(--cms-surface);
227
+ border: 1px solid var(--ui-border);
228
+ border-radius: calc(var(--ui-radius) * 1.5);
229
+ }
230
+
231
+ /* A brand moment: cream in light mode, charcoal in dark (welcome, empty states, hints). */
232
+ html[data-cms-admin] .cms-moment {
233
+ background: var(--cms-moment-bg);
234
+ border-radius: calc(var(--ui-radius) * 2);
235
+ color: var(--ui-text);
236
+ }
237
+ html[data-cms-admin] .cms-moment .cms-moment__muted { color: var(--cms-moment-text); }
238
+
239
+ /* Small uppercase-free section label ("Waiting for you", "Recently edited"). */
240
+ html[data-cms-admin] .cms-label {
241
+ font-size: 0.8125rem;
242
+ font-weight: 600;
243
+ color: var(--ui-text-highlighted);
244
+ }
245
+
246
+ /* The sidebar: the current page sits on cream (charcoal in dark). Nuxt UI's
247
+ navigation paints its active/hover pill with --ui-bg-elevated, so it is
248
+ re-pointed for the sidebar only. */
249
+ html[data-cms-admin] .cms-sidebar {
250
+ --ui-bg-elevated: var(--cms-nav-active);
251
+ }
252
+
253
+ /* Page content column (pages add no outer padding of their own). */
254
+ html[data-cms-admin] .cms-page {
255
+ width: 100%;
256
+ max-width: var(--cms-content-max);
257
+ margin-inline: auto;
258
+ padding: 1.25rem 1rem 3rem;
259
+ }
260
+ html[data-cms-admin] .cms-page--narrow { max-width: 48rem; }
261
+ html[data-cms-admin] .cms-page--flush { max-width: none; padding: 0; }
262
+ html[data-cms-admin] .cms-page--wide { max-width: none; }
263
+ @media (min-width: 640px) {
264
+ html[data-cms-admin] .cms-page { padding: 2rem 2rem 4rem; }
265
+ html[data-cms-admin] .cms-page--flush { padding: 0; }
266
+ }
267
+
268
+ /* ── Editors ──
269
+ One set of parts (title, fields, details), three arrangements, laid out on one
270
+ full-height grid so the details column's divider runs from the top bar to the
271
+ bottom of the window:
272
+ .cms-editor form — sectioned fields, a details column on the right
273
+ .cms-editor--write write — one calm, centred writing column; details on demand
274
+ .cms-editor--split preview — the form (and details) beside the live page */
275
+ html[data-cms-admin] .cms-page--flush { flex: 1 0 auto; display: flex; flex-direction: column; }
276
+ html[data-cms-admin] .cms-editor {
277
+ flex: 1 0 auto;
278
+ display: grid;
279
+ grid-template-columns: minmax(0, 1fr);
280
+ align-content: start;
281
+ }
282
+ html[data-cms-admin] .cms-editor__main { min-width: 0; padding: 1.25rem 1rem 2.5rem; }
283
+ html[data-cms-admin] .cms-editor__column { width: 100%; max-width: 40rem; margin-inline: auto; }
284
+ html[data-cms-admin] .cms-editor__aside { min-width: 0; padding: 1.5rem 1rem 2.5rem; border-top: 1px solid var(--ui-border); }
285
+ html[data-cms-admin] .cms-editor__preview { display: none; }
286
+ @media (min-width: 640px) {
287
+ html[data-cms-admin] .cms-editor__main { padding: 2rem 2rem 4rem; }
288
+ html[data-cms-admin] .cms-editor__aside { padding: 1.5rem 2rem 3rem; }
289
+ }
290
+ @media (min-width: 1024px) {
291
+ html[data-cms-admin] .cms-editor { grid-template-columns: minmax(0, 1fr) 19rem; align-content: stretch; }
292
+ html[data-cms-admin] .cms-editor__main { padding: 2.25rem 2.5rem 5rem; }
293
+ html[data-cms-admin] .cms-editor__aside { border-top: 0; border-left: 1px solid var(--ui-border); padding: 2rem 1.5rem 3rem; }
294
+ html[data-cms-admin] .cms-editor__aside-inner { position: sticky; top: 2rem; }
295
+ html[data-cms-admin] .cms-editor--no-aside { grid-template-columns: minmax(0, 1fr); }
296
+
297
+ /* Preview: form and details on the left, the live page filling the rest. */
298
+ html[data-cms-admin] .cms-editor--split {
299
+ grid-template-columns: minmax(22rem, 30rem) minmax(0, 1fr);
300
+ grid-template-rows: auto 1fr;
301
+ align-content: stretch;
302
+ }
303
+ html[data-cms-admin] .cms-editor--split .cms-editor__main { grid-column: 1; grid-row: 1; padding: 1.75rem 1.5rem 2rem 2rem; }
304
+ html[data-cms-admin] .cms-editor--split .cms-editor__aside { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid var(--ui-border); padding: 1.5rem 1.5rem 3rem 2rem; }
305
+ html[data-cms-admin] .cms-editor--split .cms-editor__aside-inner { position: static; }
306
+ html[data-cms-admin] .cms-editor--split .cms-editor__column { max-width: none; }
307
+ html[data-cms-admin] .cms-editor--split .cms-editor__preview { display: block; grid-column: 2; grid-row: 1 / span 2; min-width: 0; padding: 1.25rem 1.5rem 1.5rem 0; }
308
+ }
309
+ @media (min-width: 1536px) {
310
+ html[data-cms-admin] .cms-editor--split { grid-template-columns: minmax(24rem, 34rem) minmax(0, 1fr); }
311
+ }
312
+
313
+ /* Write: the text gets the room, in a slightly wider centred column. */
314
+ html[data-cms-admin] .cms-editor--write .cms-editor__column { max-width: 42rem; }
315
+ html[data-cms-admin] .cms-editor--write .cms-title-input { font-size: 2.25rem; }
316
+ html[data-cms-admin] .cms-editor--write .cms-prose { font-size: 1rem; line-height: 1.75; }
317
+
318
+ /* The summary under the title: large, muted, no box. */
319
+ html[data-cms-admin] .cms-lead-input {
320
+ width: 100%; border: 0; outline: none; background: transparent; padding: 0;
321
+ font-size: 1.1875rem; line-height: 1.55; color: var(--ui-text-muted);
322
+ }
323
+ html[data-cms-admin] .cms-lead-input::placeholder { color: var(--ui-text-dimmed); }
324
+ html[data-cms-admin] .cms-lead-input:focus { color: var(--ui-text); }
325
+
326
+ /* The text in the writing column: no box; the toolbar is a quiet line that stays in
327
+ view while writing. */
328
+ html[data-cms-admin] .cms-write-body .cms-rte { border: 0; border-radius: 0; background: transparent; overflow: visible; }
329
+ html[data-cms-admin] .cms-write-body .cms-rte__toolbar {
330
+ position: sticky; top: 0; z-index: 2;
331
+ background: var(--cms-page-bg); padding: 0.375rem 0;
332
+ border-top: 1px solid var(--ui-border); border-bottom: 1px solid var(--ui-border);
333
+ }
334
+ html[data-cms-admin] .cms-write-body .ProseMirror { padding: 1.25rem 0 2rem; min-height: 18rem; }
335
+
336
+ /* Details rows (the writing editor): label | quiet control. */
337
+ html[data-cms-admin] .cms-field-row {
338
+ display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); column-gap: 0.5rem; align-items: start;
339
+ }
340
+ html[data-cms-admin] .cms-field-row__label { padding-top: 0.4375rem; font-size: 0.875rem; color: var(--ui-text-muted); line-height: 1.3; overflow-wrap: break-word; hyphens: auto; }
341
+
342
+ /* ── Forms: sections ──
343
+ A form reads as a few titled sections, each a question with a cream icon tile.
344
+ Long forms get a section menu on the left (wide screens). */
345
+ html[data-cms-admin] .cms-form { width: 100%; }
346
+ html[data-cms-admin] .cms-form__menu { display: none; }
347
+ /* The menu needs room beside the column: it shows when the editor's main area is wide enough. */
348
+ html[data-cms-admin] .cms-editor__main:has(.cms-form--menu) { container-type: inline-size; }
349
+ @container (min-width: 58rem) {
350
+ html[data-cms-admin] .cms-editor__column:has(> .cms-form--menu) { max-width: 53.5rem; }
351
+ html[data-cms-admin] .cms-form--menu {
352
+ display: grid;
353
+ grid-template-columns: 11rem minmax(0, 40rem);
354
+ column-gap: 2.5rem;
355
+ }
356
+ html[data-cms-admin] .cms-form--menu .cms-form__menu {
357
+ display: block;
358
+ position: sticky;
359
+ top: 2rem;
360
+ align-self: start;
361
+ padding-top: 0.25rem;
362
+ }
363
+ }
364
+ html[data-cms-admin] .cms-form__menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
365
+ html[data-cms-admin] .cms-form__menu-item {
366
+ display: flex; align-items: flex-start; gap: 0.5rem; width: 100%;
367
+ padding: 0.4375rem 0.625rem; border-radius: var(--ui-radius);
368
+ font-size: 0.875rem; color: var(--ui-text-muted); text-align: left;
369
+ }
370
+ html[data-cms-admin] .cms-form__menu-item:hover { color: var(--ui-text-highlighted); background: var(--ui-bg-elevated); }
371
+ html[data-cms-admin] .cms-form__menu-item[aria-current] { color: var(--ui-text-highlighted); background: var(--cms-nav-active); font-weight: 500; }
372
+ html[data-cms-admin] .cms-section {
373
+ padding-block: 1.75rem;
374
+ border-top: 1px solid var(--ui-border);
375
+ scroll-margin-top: 1.5rem;
376
+ }
377
+ html[data-cms-admin] .cms-form__body > .cms-section:first-child,
378
+ html[data-cms-admin] .cms-form__top + .cms-section { border-top: 0; padding-top: 1.5rem; }
379
+ html[data-cms-admin] .cms-form__top + .cms-section:not(:has(.cms-section__head)) { padding-top: 1.75rem; }
380
+ html[data-cms-admin] .cms-section__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.125rem; }
381
+ html[data-cms-admin] .cms-section--folded .cms-section__head { margin-bottom: 0; cursor: pointer; }
382
+ html[data-cms-admin] .cms-section__tile {
383
+ width: 2rem; height: 2rem; flex: none;
384
+ border-radius: 0.5625rem;
385
+ background: var(--cms-moment-bg);
386
+ color: var(--ui-text-highlighted);
387
+ display: grid; place-items: center;
388
+ }
389
+ html[data-cms-admin] .cms-section__title {
390
+ margin: 0;
391
+ font-family: var(--cms-font-display);
392
+ font-weight: 700;
393
+ font-size: 1.0625rem;
394
+ line-height: 1.25;
395
+ letter-spacing: -0.01em;
396
+ color: var(--ui-text-highlighted);
397
+ }
398
+ html[data-cms-admin] .cms-section__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.375rem; }
399
+ html[data-cms-admin] .cms-section__fields > * { min-width: 0; }
400
+ @media (min-width: 640px) {
401
+ html[data-cms-admin] .cms-section__fields--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem; }
402
+ html[data-cms-admin] .cms-section__wide { grid-column: 1 / -1; }
403
+ }
404
+ html[data-cms-admin] .cms-section__add { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.125rem; }
405
+ html[data-cms-admin] .cms-section__fields:empty + .cms-section__add { margin-top: 0; }
406
+
407
+ /* The entry's title is the page heading: a large, borderless input in Manrope. */
408
+ html[data-cms-admin] .cms-title-input {
409
+ overflow: hidden; /* grows with its text (field-sizing), so never a scrollbar */
410
+ width: 100%;
411
+ border: 0;
412
+ outline: none;
413
+ background: transparent;
414
+ padding: 0;
415
+ font-family: var(--cms-font-display);
416
+ font-size: 1.875rem;
417
+ line-height: 1.2;
418
+ font-weight: 700;
419
+ letter-spacing: -0.02em;
420
+ color: var(--ui-text-highlighted);
421
+ }
422
+ html[data-cms-admin] .cms-title-input::placeholder { color: var(--ui-text-dimmed); }
423
+ html[data-cms-admin] .cms-title-input--address {
424
+ font-family: var(--font-mono); font-size: 1.0625rem; font-weight: 500; letter-spacing: 0;
425
+ padding: 0.5rem 0.75rem; border-radius: var(--ui-radius);
426
+ box-shadow: inset 0 0 0 1px var(--ui-border-accented); background: var(--ui-bg);
427
+ }
428
+ html[data-cms-admin] .cms-title-input--address:focus { box-shadow: inset 0 0 0 1px var(--ui-primary), 0 0 0 3px color-mix(in oklab, var(--ui-primary) 20%, transparent); }
429
+ @media (max-width: 639px) {
430
+ html[data-cms-admin] .cms-title-input,
431
+ html[data-cms-admin] .cms-editor--write .cms-title-input { font-size: 1.625rem; }
432
+ }
433
+
434
+ /* Rich text inside the editor: comfortable reading size, same typeface. */
435
+ html[data-cms-admin] .cms-prose {
436
+ font-size: 0.9375rem;
437
+ line-height: 1.7;
438
+ }
439
+
440
+ /* Properties as quiet label/value rows (status, address…). */
441
+ html[data-cms-admin] .cms-props {
442
+ display: grid;
443
+ grid-template-columns: 6rem minmax(0, 1fr);
444
+ column-gap: 0.75rem;
445
+ row-gap: 0.75rem;
446
+ font-size: 0.875rem;
447
+ align-items: baseline;
448
+ }
449
+ html[data-cms-admin] .cms-props dt { color: var(--ui-text-muted); }
450
+ html[data-cms-admin] .cms-props dd { margin: 0; color: var(--ui-text-highlighted); min-width: 0; }
451
+
452
+ html[data-cms-admin] .cms-preview {
453
+ /* sticky inside the page body, which scrolls under the top bar */
454
+ position: sticky;
455
+ top: 1.25rem;
456
+ height: calc(100dvh - var(--ui-header-height) - 2.5rem);
457
+ display: flex;
458
+ flex-direction: column;
459
+ }
460
+ html[data-cms-admin] .cms-preview--sheet { position: static; height: 100%; }
461
+ html[data-cms-admin] .cms-preview__stage {
462
+ flex: 1;
463
+ min-height: 20rem;
464
+ display: flex;
465
+ justify-content: center;
466
+ border: 1px solid var(--ui-border);
467
+ border-radius: calc(var(--ui-radius) * 1.5);
468
+ background: var(--cms-sunken);
469
+ overflow: hidden;
470
+ }
471
+ html[data-cms-admin] .cms-preview__frame { width: 100%; height: 100%; border: 0; background: white; }
472
+ html[data-cms-admin] .cms-preview__frame--phone { width: 390px; max-width: 100%; border-left: 1px solid var(--ui-border); border-right: 1px solid var(--ui-border); }
473
+
474
+ /* A date as a small calendar leaf (dated lists, "coming soon"). */
475
+ html[data-cms-admin] .cms-date {
476
+ width: 2.875rem;
477
+ flex: none;
478
+ text-align: center;
479
+ border: 1px solid var(--ui-border);
480
+ border-radius: var(--ui-radius);
481
+ padding: 0.1875rem 0;
482
+ line-height: 1.15;
483
+ background: var(--cms-surface);
484
+ }
485
+ html[data-cms-admin] .cms-date b { display: block; font: 700 1.0625rem var(--cms-font-display); color: var(--ui-text-highlighted); }
486
+ html[data-cms-admin] .cms-date span { font-size: 0.65625rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ui-text-muted); }
487
+
488
+ /* Colour ramps on the styleguide (fixed 11 columns; no dynamic class names). */
489
+ html[data-cms-admin] .cms-ramp {
490
+ display: grid;
491
+ grid-template-columns: repeat(11, minmax(0, 1fr));
492
+ }
493
+
494
+ /* Respect reduced motion across the admin. */
495
+ @media (prefers-reduced-motion: reduce) {
496
+ html[data-cms-admin] *, html[data-cms-admin] *::before, html[data-cms-admin] *::after {
497
+ transition-duration: 0.01ms !important;
498
+ animation-duration: 0.01ms !important;
499
+ }
500
+ }
501
+
502
+ /* A moment that arrives (the success card): a short rise, nothing bouncy. */
503
+ @keyframes cms-rise { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
504
+ html[data-cms-admin] .cms-rise { animation: cms-rise 220ms ease-out both; }
505
+
506
+ /* The time box has its own clock icon; the browser's picker button would repeat it
507
+ (typing works, and phones open their wheel on tap). */
508
+ html[data-cms-admin] .cms-time-input::-webkit-calendar-picker-indicator { display: none; }
509
+
510
+ /* ── Peek: an item open beside its list (the media library) ──
511
+ Docked, not over the page: the list stays usable and another click switches the
512
+ panel. Phones show the panel as a page of its own. */
513
+ html[data-cms-admin] .cms-media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
514
+ html[data-cms-admin] .cms-editor__aside.cms-peek { padding: 0; border-top: 0; }
515
+ html[data-cms-admin] .cms-peek__inner { display: flex; flex-direction: column; min-height: calc(100dvh - var(--ui-header-height)); }
516
+ html[data-cms-admin] .cms-peek__head {
517
+ position: sticky; top: 0; z-index: 2;
518
+ display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
519
+ padding: 0.625rem 0.75rem 0.625rem 1.25rem; border-bottom: 1px solid var(--ui-border); background: var(--cms-page-bg);
520
+ }
521
+ html[data-cms-admin] .cms-peek__body { flex: 1; padding: 1.25rem; }
522
+ html[data-cms-admin] .cms-peek__foot {
523
+ position: sticky; bottom: 0;
524
+ display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
525
+ padding: 0.75rem 1.25rem; border-top: 1px solid var(--ui-border); background: var(--cms-page-bg);
526
+ }
527
+ /* Toasts while the media panel is open: beside it, or above its buttons on phones. */
528
+ html[data-cms-admin]:has(.cms-peek) ol[data-slot="viewport"] { right: var(--cms-toast-right, 1rem); }
529
+ @media (max-width: 1023px) {
530
+ html[data-cms-admin]:has(.cms-peek) ol[data-slot="viewport"] { bottom: 4.75rem; }
531
+ }
532
+ @media (min-width: 1024px) {
533
+ html[data-cms-admin] .cms-editor--peek { grid-template-columns: minmax(0, 1fr) var(--cms-peek-w, 26rem); }
534
+ html[data-cms-admin] .cms-peek { position: relative; }
535
+ /* The panel's edge: a wide grab area over the divider, a line while dragging. */
536
+ html[data-cms-admin] .cms-peek__resize {
537
+ position: absolute; top: 0; bottom: 0; left: -4px; width: 8px; z-index: 5;
538
+ cursor: col-resize; touch-action: none;
539
+ }
540
+ html[data-cms-admin] .cms-peek__resize::after {
541
+ content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px;
542
+ background: transparent; transition: background-color .15s;
543
+ }
544
+ html[data-cms-admin] .cms-peek__resize:hover::after,
545
+ html[data-cms-admin] .cms-peek__resize:focus-visible::after,
546
+ html[data-cms-admin].cms-resizing .cms-peek__resize::after { background: var(--ui-border-accented); }
547
+ html[data-cms-admin] .cms-peek__resize:focus-visible { outline: none; }
548
+ html[data-cms-admin].cms-resizing, html[data-cms-admin].cms-resizing * { cursor: col-resize !important; user-select: none; }
549
+ html[data-cms-admin] .cms-editor--peek .cms-editor__aside { padding: 0; }
550
+ html[data-cms-admin] .cms-peek__inner {
551
+ position: sticky; top: 0;
552
+ height: calc(100dvh - var(--ui-header-height)); min-height: 0;
553
+ overflow-y: auto;
554
+ }
555
+ }
556
+
557
+ /* A row that may scroll sideways on a phone (list tabs): no scrollbar drawn, and no
558
+ vertical scroll from a tab indicator that sits a pixel low. */
559
+ html[data-cms-admin] .cms-scroll-x { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
560
+ html[data-cms-admin] .cms-scroll-x::-webkit-scrollbar { display: none; }
561
+
562
+ /* "Unsaved changes": the warning hue, dark enough to read on white (AA) and light
563
+ enough on charcoal night. */
564
+ html[data-cms-admin] .cms-unsaved { color: color-mix(in oklab, var(--ui-warning) 62%, #000); }
565
+ html[data-cms-admin].dark .cms-unsaved { color: color-mix(in oklab, var(--ui-warning) 70%, #fff); }
566
+
567
+ /* "Take me to the field" (publish review → Fix): a ring that fades. */
568
+ @keyframes cms-flash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--ui-error) 45%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
569
+ html[data-cms-admin] .cms-flash { animation: cms-flash 2s ease-out; border-radius: var(--ui-radius); }
570
+
571
+ /* Touch screens: every control is at least 44 px (WCAG 2.5.5, and what a thumb needs).
572
+ One rule for the whole admin instead of a class per button: on a coarse pointer buttons,
573
+ tabs, menu items, options, fields and the folded section headers get a 44 px minimum,
574
+ and a short button or tab is 44 px wide at least (an icon-only one is a 44 px square). A desktop keeps
575
+ its denser 28–32 px controls. Opt a control out with .cms-dense — only for something
576
+ inside a line of text or a chip, whose tap area is then widened with .cms-hit instead.
577
+ (.cms-touch, the sign-in and setup pages' own wrapper, keeps working: same numbers.) */
578
+ @media (pointer: coarse) {
579
+ html[data-cms-admin] :is(
580
+ button:not(.cms-dense), [role='button']:not(.cms-dense), [role='tab'], [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'], [role='option'], summary,
581
+ a.inline-flex.font-medium:not(.cms-dense),
582
+ input:not([type='checkbox'], [type='radio'], [type='hidden'], [type='range'], [type='file']), select, textarea
583
+ ) { min-height: 2.75rem; }
584
+ html[data-cms-admin] :is(button, [role='button'], [role='tab'], a.inline-flex.font-medium):not(.cms-dense) { min-width: 2.75rem; justify-content: center; }
585
+ /* A link that is a row's title: a full-height line, not 20 px of text. */
586
+ html[data-cms-admin] a.cms-row-link { display: flex; align-items: center; min-height: 2.75rem; }
587
+ /* A tap area wider than the thing drawn (the x on a chip): an invisible 44 px square around it. */
588
+ html[data-cms-admin] .cms-hit { position: relative; }
589
+ html[data-cms-admin] .cms-hit::after { content: ''; position: absolute; inset: 50% auto auto 50%; width: 2.75rem; height: 2.75rem; transform: translate(-50%, -50%); }
590
+ /* The editor toolbar: 44 px buttons in a row you swipe, not a wall of them. */
591
+ html[data-cms-admin] .cms-rte__toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
592
+ html[data-cms-admin] .cms-rte__toolbar::-webkit-scrollbar { display: none; }
593
+ html[data-cms-admin] .cms-rte__toolbar > * { flex: none; }
594
+ }
595
+
596
+ /* The skip link: out of sight until the keyboard lands on it, then the first thing on the page. */
597
+ html[data-cms-admin] .cms-skip-link {
598
+ position: fixed; left: 0.75rem; top: 0.75rem; z-index: 100;
599
+ transform: translateY(-200%);
600
+ padding: 0.5rem 0.875rem; border-radius: var(--ui-radius);
601
+ background: var(--ui-bg-inverted); color: var(--ui-text-inverted);
602
+ font-size: 0.875rem; font-weight: 500;
603
+ display: inline-flex; align-items: center; min-height: 2.75rem;
604
+ }
605
+ html[data-cms-admin] .cms-skip-link:focus { transform: none; }
606
+ /* <main> takes the focus when the skip link jumps to it; no ring around the whole page. */
607
+ html[data-cms-admin] main[tabindex='-1']:focus { outline: none; }
@@ -0,0 +1,30 @@
1
+ <script setup lang="ts">
2
+ // A page's blocks on the website, each drawn by the site's own component, by name:
3
+ // a block of type `hero` → <BlockHero :block="…" />, `text` → <BlockText>, and so on
4
+ // (components/blocks/Hero.vue gives BlockHero with Nuxt's default naming). A block
5
+ // with no component yet is skipped, with a note in development. Only a type spelled
6
+ // the way a definition spells it is drawn (not `Hero`, `_hero`, `-hero`), so a stray
7
+ // type never lands on the component of a known one.
8
+ //
9
+ // <CmsBlocks :blocks="page.sections" />
10
+ // <CmsBlocks :blocks="page.sections" prefix="Section" /> // → <SectionHero>
11
+ import { resolveDynamicComponent } from 'vue'
12
+
13
+ const props = withDefaults(defineProps<{ blocks: { id: string; type: string; [k: string]: unknown }[] | null | undefined; prefix?: string }>(), { prefix: 'Block' })
14
+ const pascal = (s: string) => s.replace(/(^|[-_])(\w)/g, (_m, _s, c: string) => c.toUpperCase())
15
+ function componentFor(type: string) {
16
+ if (!renderableBlockType(type)) return null
17
+ const name = props.prefix + pascal(type)
18
+ const c = resolveDynamicComponent(name)
19
+ if (typeof c === 'string') {
20
+ if (import.meta.dev) console.warn(`[CmsBlocks] no component "${name}" for block type "${type}" (add components/${props.prefix.toLowerCase()}s/${pascal(type)}.vue and make it global)`)
21
+ return null
22
+ }
23
+ return c
24
+ }
25
+ const items = computed(() => (props.blocks ?? []).map((block, index) => ({ block, index, is: componentFor(block.type) })).filter((x) => x.is))
26
+ </script>
27
+
28
+ <template>
29
+ <component :is="x.is" v-for="x in items" :key="x.block.id" :block="x.block" :index="x.index" />
30
+ </template>
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ // List-cell dispatcher. Same precedence as CmsField but for the `cell` slot:
3
+ // app.config `cms.fields[type].cell` → a plugin's renderer for the type → field.ui.cell → CmsCellText
4
+ const props = defineProps<{ field: any; row: any; entity: string }>()
5
+
6
+ const appConfig = useAppConfig()
7
+ const pluginFields = (useRuntimeConfig().public.cmsPlugins as any)?.fields as Record<string, { cell?: string }> | undefined
8
+ const component = computed(() => {
9
+ const override = (appConfig.cms as any)?.fields?.[props.field.type]?.cell ?? pluginFields?.[props.field.type]?.cell
10
+ return resolveComponent(override || props.field.ui?.cell || 'CmsCellText')
11
+ })
12
+ </script>
13
+
14
+ <template>
15
+ <component :is="component" :field="field" :row="row" :entity="entity" />
16
+ </template>
@@ -0,0 +1,18 @@
1
+ <script setup lang="ts">
2
+ // A select value in a list: a dot and its admin label. "Live" values get a green dot.
3
+ const props = defineProps<{ field: any; row: any; entity?: string }>()
4
+ const { t, tl } = useCmsI18n()
5
+ const live = new Set(['published', 'active', 'live', 'on'])
6
+ // Waiting for someone (a new form message): stands out until it is read.
7
+ const fresh = new Set(['new'])
8
+ const value = computed(() => props.row[props.field.key])
9
+ const label = computed(() => tl(props.field.meta?.labels?.[value.value], String(value.value)))
10
+ </script>
11
+
12
+ <template>
13
+ <span v-if="value" class="inline-flex items-center gap-1.5 whitespace-nowrap" :class="fresh.has(String(value)) ? 'font-medium text-highlighted' : live.has(String(value)) ? 'text-default' : 'text-muted'">
14
+ <span class="size-2 rounded-full shrink-0" :class="fresh.has(String(value)) ? 'bg-info' : live.has(String(value)) ? 'bg-success' : 'border border-(--ui-text-dimmed)'" aria-hidden="true" />
15
+ {{ label }}
16
+ </span>
17
+ <span v-else class="text-dimmed">{{ t('common.none') }}</span>
18
+ </template>