@phtngyn/cms 0.2.0-beta.7 → 0.3.0

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 (524) hide show
  1. package/LICENSE +18 -10
  2. package/README.md +59 -401
  3. package/drizzle/20261003215543_initial/migration.sql +251 -0
  4. package/drizzle/20261003215543_initial/snapshot.json +1941 -0
  5. package/package.json +75 -71
  6. package/src/Authoring.d.ts +41 -49
  7. package/src/Authoring.js +1 -1
  8. package/src/Blocks-BrxSemnd.js +40 -0
  9. package/src/Client.d.ts +8186 -0
  10. package/src/Client.js +41 -0
  11. package/src/Collections.d.ts +142 -0
  12. package/src/Collections.js +142 -0
  13. package/src/Config-CMiwciub.js +130 -0
  14. package/src/Config.d.ts +172 -0
  15. package/src/Config.js +2 -0
  16. package/src/Configuration-Dk2k3OIc.js +73 -0
  17. package/src/DataTransfer-BmECvPHB.js +488 -0
  18. package/src/Database-DSsNCGft.d.ts +3 -0
  19. package/src/Delivery.d.ts +28 -0
  20. package/src/Delivery.js +7 -0
  21. package/src/Document-CKXMSEf1.js +293 -0
  22. package/src/Document-TgwYKJZM.d.ts +220 -0
  23. package/src/DocumentRenderer-Wz2xaNyf.js +394 -0
  24. package/src/EditorSchema-wrDv-id6.js +296 -0
  25. package/src/Fields-BegSgYhj.d.ts +166 -0
  26. package/src/Fields-ioGaMEh9.js +130 -0
  27. package/src/Forms-BuKAXQxr.d.ts +203 -0
  28. package/src/Forms.d.ts +48 -11
  29. package/src/Forms.js +342 -7
  30. package/src/I18n-Ckf9h0rC.js +154 -0
  31. package/src/I18n.d.ts +45 -2
  32. package/src/I18n.js +2 -1
  33. package/src/Image-CJWPLnhP.js +110 -0
  34. package/src/Links-CJYyy7rC.js +28 -0
  35. package/src/Links-Dx1yOni8.d.ts +28 -0
  36. package/src/Locales-Ch7a5xuA.js +67 -0
  37. package/src/Locales-jwbmJaOp.d.ts +43 -0
  38. package/src/Locales.d.ts +3 -0
  39. package/src/Locales.js +3 -0
  40. package/src/Media-BQ0uL4w7.d.ts +15 -0
  41. package/src/Media-DSyvd14o.js +87 -0
  42. package/src/Module.d.ts +2 -10
  43. package/src/Module.js +1039 -162
  44. package/src/Operations.d.ts +57 -0
  45. package/src/Operations.js +263 -0
  46. package/src/People-DvNZauWw.js +69 -0
  47. package/src/PreviewFocus-C_EelZO5.js +104 -0
  48. package/src/Query-C0kGJF5_.d.ts +261 -0
  49. package/src/RevisionPreview-IVwbJ9Wy.js +133 -0
  50. package/src/Routes-BaZvm2LE.js +126 -0
  51. package/src/Routes-DM1rRp3r.d.ts +15 -0
  52. package/src/S3MediaObjects-y-WacEi9.js +193 -0
  53. package/src/Seo-BcpqxoAs.d.ts +57 -0
  54. package/src/Seo-CjNUtUkj.js +254 -0
  55. package/src/StudioApi-CXLwwocX.js +833 -0
  56. package/src/StudioErrors-T5zLGQ1M.js +117 -0
  57. package/src/StudioErrors-kq-E44lQ.d.ts +104 -0
  58. package/src/StudioServer.d.ts +20 -0
  59. package/src/StudioServer.js +34 -0
  60. package/src/answers-DcTg0Xv2.js +41 -0
  61. package/src/cli.js +681 -187
  62. package/src/contracts-rprW3ZOB.js +130 -0
  63. package/src/forms-3xuf0Ym7.d.ts +206 -0
  64. package/src/localeConfiguration-BPbkLi7-.js +32 -0
  65. package/src/localeContext-DhF3SPvM.js +59 -0
  66. package/src/locales-6OD4XGIZ.js +12 -0
  67. package/src/nuxtDelivery-BYX_Cddb.js +466 -0
  68. package/src/plugin-DTYuDaQu.js +7171 -0
  69. package/src/previewContext-dt3ZUh-w.js +4 -0
  70. package/src/previewRegions-CXjk5cbP.js +145 -0
  71. package/src/previewSource-fb-q3ESM.js +144 -0
  72. package/src/rendering-D9LVeEKX.js +47 -0
  73. package/src/rolldown-runtime-8H4AJuhK.js +14 -0
  74. package/src/runtime/CmsImage.js +38 -0
  75. package/src/runtime/DocumentPage.vue +10 -0
  76. package/src/runtime/DocumentPageContent.js +48 -0
  77. package/src/runtime/DocumentRenderer.d.ts +129 -0
  78. package/src/runtime/DocumentRenderer.js +2 -0
  79. package/src/runtime/api.js +48 -6
  80. package/src/runtime/delivery/useCmsDocument.js +2 -0
  81. package/src/runtime/delivery/useCmsDocumentQuery.js +2 -0
  82. package/src/runtime/delivery/useCmsDocumentSeo.js +2 -114
  83. package/src/runtime/delivery/useCmsLocale.js +10 -0
  84. package/src/runtime/plugin.js +2 -40
  85. package/src/runtime/preview.css +85 -0
  86. package/src/runtime/preview.js +277 -0
  87. package/src/runtime/previewSource.js +82 -0
  88. package/src/runtime/revisionPrivacy.js +13 -0
  89. package/src/runtime/studio.js +10 -0
  90. package/src/runtime/studioIcons.js +36 -0
  91. package/src/validation-3pggwcnm.js +396 -0
  92. package/src/validation-DpUwPC8Y.js +224 -0
  93. package/studio/THIRD-PARTY-LICENSES.md +2406 -0
  94. package/studio/chunks/AccountPage-DL3DitDM.js +288 -0
  95. package/studio/chunks/AccountPage-DL3DitDM.js.br +0 -0
  96. package/studio/chunks/AccountPage-DL3DitDM.js.gz +0 -0
  97. package/studio/chunks/ActivityPage-CLqVUqTh.js +584 -0
  98. package/studio/chunks/ActivityPage-CLqVUqTh.js.br +0 -0
  99. package/studio/chunks/ActivityPage-CLqVUqTh.js.gz +0 -0
  100. package/studio/chunks/Alert-D0D24z_a.js +335 -0
  101. package/studio/chunks/Alert-D0D24z_a.js.br +0 -0
  102. package/studio/chunks/Alert-D0D24z_a.js.gz +0 -0
  103. package/studio/chunks/Badge-BBFs88TI.js +346 -0
  104. package/studio/chunks/Badge-BBFs88TI.js.br +0 -0
  105. package/studio/chunks/Badge-BBFs88TI.js.gz +0 -0
  106. package/studio/chunks/Button-BT3ztSPx.js +14319 -0
  107. package/studio/chunks/Button-BT3ztSPx.js.br +0 -0
  108. package/studio/chunks/Button-BT3ztSPx.js.gz +0 -0
  109. package/studio/chunks/Collapsible-CKnEYIlp.js +246 -0
  110. package/studio/chunks/Collapsible-CKnEYIlp.js.br +0 -0
  111. package/studio/chunks/Collapsible-CKnEYIlp.js.gz +0 -0
  112. package/studio/chunks/ContentInventory-D7nsFA6U.js +1745 -0
  113. package/studio/chunks/ContentInventory-D7nsFA6U.js.br +0 -0
  114. package/studio/chunks/ContentInventory-D7nsFA6U.js.gz +0 -0
  115. package/studio/chunks/ContentPage-DCxt6BeD.js +18 -0
  116. package/studio/chunks/ContentPage-DCxt6BeD.js.br +0 -0
  117. package/studio/chunks/ContentPage-DCxt6BeD.js.gz +0 -0
  118. package/studio/chunks/DashboardSearch-DjyMjJwF.js +2413 -0
  119. package/studio/chunks/DashboardSearch-DjyMjJwF.js.br +0 -0
  120. package/studio/chunks/DashboardSearch-DjyMjJwF.js.gz +0 -0
  121. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js +26063 -0
  122. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.br +0 -0
  123. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.gz +0 -0
  124. package/studio/chunks/DropdownMenu-CA9fB0uZ.js +4400 -0
  125. package/studio/chunks/DropdownMenu-CA9fB0uZ.js.br +0 -0
  126. package/studio/chunks/DropdownMenu-CA9fB0uZ.js.gz +0 -0
  127. package/studio/chunks/EditorPage-D_PAYEE4.js +7799 -0
  128. package/studio/chunks/EditorPage-D_PAYEE4.js.br +0 -0
  129. package/studio/chunks/EditorPage-D_PAYEE4.js.gz +0 -0
  130. package/studio/chunks/FormField-CgM6l2Yn.js +198 -0
  131. package/studio/chunks/FormField-CgM6l2Yn.js.br +0 -0
  132. package/studio/chunks/FormField-CgM6l2Yn.js.gz +0 -0
  133. package/studio/chunks/HelpPage-C-vrFcT_.js +552 -0
  134. package/studio/chunks/HelpPage-C-vrFcT_.js.br +0 -0
  135. package/studio/chunks/HelpPage-C-vrFcT_.js.gz +0 -0
  136. package/studio/chunks/Kbd-Ot7TIhVZ.js +271 -0
  137. package/studio/chunks/Kbd-Ot7TIhVZ.js.br +0 -0
  138. package/studio/chunks/Kbd-Ot7TIhVZ.js.gz +0 -0
  139. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js +101 -0
  140. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.br +0 -0
  141. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.gz +0 -0
  142. package/studio/chunks/MediaPage-D-jaWtdl.js +923 -0
  143. package/studio/chunks/MediaPage-D-jaWtdl.js.br +0 -0
  144. package/studio/chunks/MediaPage-D-jaWtdl.js.gz +0 -0
  145. package/studio/chunks/MediaPicker-BZs2wUFz.js +837 -0
  146. package/studio/chunks/MediaPicker-BZs2wUFz.js.br +0 -0
  147. package/studio/chunks/MediaPicker-BZs2wUFz.js.gz +0 -0
  148. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js +1173 -0
  149. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.br +0 -0
  150. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.gz +0 -0
  151. package/studio/chunks/Modal-D6hSvxHd.js +265 -0
  152. package/studio/chunks/Modal-D6hSvxHd.js.br +0 -0
  153. package/studio/chunks/Modal-D6hSvxHd.js.gz +0 -0
  154. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js +277 -0
  155. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.br +0 -0
  156. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.gz +0 -0
  157. package/studio/chunks/Pagination-D9BSo5H2.js +573 -0
  158. package/studio/chunks/Pagination-D9BSo5H2.js.br +0 -0
  159. package/studio/chunks/Pagination-D9BSo5H2.js.gz +0 -0
  160. package/studio/chunks/PeoplePage-CWIXitBD.js +783 -0
  161. package/studio/chunks/PeoplePage-CWIXitBD.js.br +0 -0
  162. package/studio/chunks/PeoplePage-CWIXitBD.js.gz +0 -0
  163. package/studio/chunks/Popover-B63bkTMS.js +128 -0
  164. package/studio/chunks/Popover-B63bkTMS.js.br +0 -0
  165. package/studio/chunks/Popover-B63bkTMS.js.gz +0 -0
  166. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js +255 -0
  167. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.br +0 -0
  168. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.gz +0 -0
  169. package/studio/chunks/Routes-DLYHmulE.js +102 -0
  170. package/studio/chunks/Routes-DLYHmulE.js.br +0 -0
  171. package/studio/chunks/Routes-DLYHmulE.js.gz +0 -0
  172. package/studio/chunks/RovingFocusItem-QZNg-wWF.js +95 -0
  173. package/studio/chunks/RovingFocusItem-QZNg-wWF.js.br +0 -0
  174. package/studio/chunks/RovingFocusItem-QZNg-wWF.js.gz +0 -0
  175. package/studio/chunks/ScheduledPage-C0hqrkr5.js +332 -0
  176. package/studio/chunks/ScheduledPage-C0hqrkr5.js.br +0 -0
  177. package/studio/chunks/ScheduledPage-C0hqrkr5.js.gz +0 -0
  178. package/studio/chunks/Search-BEgCe9Aj.js +14646 -0
  179. package/studio/chunks/Search-BEgCe9Aj.js.br +0 -0
  180. package/studio/chunks/Search-BEgCe9Aj.js.gz +0 -0
  181. package/studio/chunks/Select-B50WZMW-.js +2145 -0
  182. package/studio/chunks/Select-B50WZMW-.js.br +0 -0
  183. package/studio/chunks/Select-B50WZMW-.js.gz +0 -0
  184. package/studio/chunks/SelectMenu-DSweWGMz.js +2109 -0
  185. package/studio/chunks/SelectMenu-DSweWGMz.js.br +0 -0
  186. package/studio/chunks/SelectMenu-DSweWGMz.js.gz +0 -0
  187. package/studio/chunks/SeoPage-CNNxGe4h.js +846 -0
  188. package/studio/chunks/SeoPage-CNNxGe4h.js.br +0 -0
  189. package/studio/chunks/SeoPage-CNNxGe4h.js.gz +0 -0
  190. package/studio/chunks/Skeleton-COz8dcrw.js +39 -0
  191. package/studio/chunks/Skeleton-COz8dcrw.js.br +2 -0
  192. package/studio/chunks/Skeleton-COz8dcrw.js.gz +0 -0
  193. package/studio/chunks/Slideover-QMMHAAys.js +289 -0
  194. package/studio/chunks/Slideover-QMMHAAys.js.br +0 -0
  195. package/studio/chunks/Slideover-QMMHAAys.js.gz +0 -0
  196. package/studio/chunks/StudioPage-ngEIDr5d.js +80 -0
  197. package/studio/chunks/StudioPage-ngEIDr5d.js.br +0 -0
  198. package/studio/chunks/StudioPage-ngEIDr5d.js.gz +0 -0
  199. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js +2524 -0
  200. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.br +0 -0
  201. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.gz +0 -0
  202. package/studio/chunks/Switch-qKl1aDn7.js +484 -0
  203. package/studio/chunks/Switch-qKl1aDn7.js.br +0 -0
  204. package/studio/chunks/Switch-qKl1aDn7.js.gz +0 -0
  205. package/studio/chunks/ToolPage-DxoVAJVk.js +29 -0
  206. package/studio/chunks/ToolPage-DxoVAJVk.js.br +0 -0
  207. package/studio/chunks/ToolPage-DxoVAJVk.js.gz +0 -0
  208. package/studio/chunks/Tooltip-Bu15m_DB.js +693 -0
  209. package/studio/chunks/Tooltip-Bu15m_DB.js.br +0 -0
  210. package/studio/chunks/Tooltip-Bu15m_DB.js.gz +0 -0
  211. package/studio/chunks/TrashPage-lhqLLdoG.js +12 -0
  212. package/studio/chunks/TrashPage-lhqLLdoG.js.br +0 -0
  213. package/studio/chunks/TrashPage-lhqLLdoG.js.gz +0 -0
  214. package/studio/chunks/VersionsPage-Cqy6UAp9.js +2349 -0
  215. package/studio/chunks/VersionsPage-Cqy6UAp9.js.br +0 -0
  216. package/studio/chunks/VersionsPage-Cqy6UAp9.js.gz +0 -0
  217. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js +113 -0
  218. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.br +0 -0
  219. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.gz +0 -0
  220. package/studio/chunks/arrays-CUJkmV4I.js +10 -0
  221. package/studio/chunks/arrays-CUJkmV4I.js.br +0 -0
  222. package/studio/chunks/arrays-CUJkmV4I.js.gz +0 -0
  223. package/studio/chunks/base-DkTekJe8.js +213 -0
  224. package/studio/chunks/base-DkTekJe8.js.br +0 -0
  225. package/studio/chunks/base-DkTekJe8.js.gz +0 -0
  226. package/studio/chunks/content-DUGl3N4d.js +6012 -0
  227. package/studio/chunks/content-DUGl3N4d.js.br +0 -0
  228. package/studio/chunks/content-DUGl3N4d.js.gz +0 -0
  229. package/studio/chunks/destinations-DPIQVQa6.js +227 -0
  230. package/studio/chunks/destinations-DPIQVQa6.js.br +0 -0
  231. package/studio/chunks/destinations-DPIQVQa6.js.gz +0 -0
  232. package/studio/chunks/en-073cjKW4.js +152 -0
  233. package/studio/chunks/en-073cjKW4.js.br +0 -0
  234. package/studio/chunks/en-073cjKW4.js.gz +0 -0
  235. package/studio/chunks/en-Bn8mxPuf.js +134 -0
  236. package/studio/chunks/en-Bn8mxPuf.js.br +0 -0
  237. package/studio/chunks/en-Bn8mxPuf.js.gz +0 -0
  238. package/studio/chunks/en-C9OiaUDZ.js +251 -0
  239. package/studio/chunks/en-C9OiaUDZ.js.br +0 -0
  240. package/studio/chunks/en-C9OiaUDZ.js.gz +0 -0
  241. package/studio/chunks/en-CHAR6jzx.js +147 -0
  242. package/studio/chunks/en-CHAR6jzx.js.br +0 -0
  243. package/studio/chunks/en-CHAR6jzx.js.gz +0 -0
  244. package/studio/chunks/en-Cq4N1vEF.js +93 -0
  245. package/studio/chunks/en-Cq4N1vEF.js.br +2 -0
  246. package/studio/chunks/en-Cq4N1vEF.js.gz +0 -0
  247. package/studio/chunks/en-D2hRqlse.js +140 -0
  248. package/studio/chunks/en-D2hRqlse.js.br +0 -0
  249. package/studio/chunks/en-D2hRqlse.js.gz +0 -0
  250. package/studio/chunks/en-DiUC3-j6.js +144 -0
  251. package/studio/chunks/en-DiUC3-j6.js.br +0 -0
  252. package/studio/chunks/en-DiUC3-j6.js.gz +0 -0
  253. package/studio/chunks/english-Cs_Adu-u.js +8 -0
  254. package/studio/chunks/english-Cs_Adu-u.js.br +0 -0
  255. package/studio/chunks/english-Cs_Adu-u.js.gz +0 -0
  256. package/studio/chunks/esm-D6DqSiL1.js +752 -0
  257. package/studio/chunks/esm-D6DqSiL1.js.br +0 -0
  258. package/studio/chunks/esm-D6DqSiL1.js.gz +0 -0
  259. package/studio/chunks/externalRequest-CTzr2nDq.js +23 -0
  260. package/studio/chunks/externalRequest-CTzr2nDq.js.br +0 -0
  261. package/studio/chunks/externalRequest-CTzr2nDq.js.gz +0 -0
  262. package/studio/chunks/iconify-DR9ryCPv.js +1007 -0
  263. package/studio/chunks/iconify-DR9ryCPv.js.br +0 -0
  264. package/studio/chunks/iconify-DR9ryCPv.js.gz +0 -0
  265. package/studio/chunks/icons-D2MsAaXq.js +183 -0
  266. package/studio/chunks/icons-D2MsAaXq.js.br +0 -0
  267. package/studio/chunks/icons-D2MsAaXq.js.gz +0 -0
  268. package/studio/chunks/leaveGuards-D22fTGgr.js +26 -0
  269. package/studio/chunks/leaveGuards-D22fTGgr.js.br +0 -0
  270. package/studio/chunks/leaveGuards-D22fTGgr.js.gz +0 -0
  271. package/studio/chunks/lucideIcons-EyqyPBsX.js +238 -0
  272. package/studio/chunks/lucideIcons-EyqyPBsX.js.br +0 -0
  273. package/studio/chunks/lucideIcons-EyqyPBsX.js.gz +0 -0
  274. package/studio/chunks/mediaRoute--8cY8rUe.js +17 -0
  275. package/studio/chunks/mediaRoute--8cY8rUe.js.br +0 -0
  276. package/studio/chunks/mediaRoute--8cY8rUe.js.gz +0 -0
  277. package/studio/chunks/newDocumentPlanning-C26DHpvh.js +77 -0
  278. package/studio/chunks/newDocumentPlanning-C26DHpvh.js.br +0 -0
  279. package/studio/chunks/newDocumentPlanning-C26DHpvh.js.gz +0 -0
  280. package/studio/chunks/notifications-OKOLc40v.js +110 -0
  281. package/studio/chunks/notifications-OKOLc40v.js.br +0 -0
  282. package/studio/chunks/notifications-OKOLc40v.js.gz +0 -0
  283. package/studio/chunks/operations-CjNHyrEX.js +57 -0
  284. package/studio/chunks/operations-CjNHyrEX.js.br +0 -0
  285. package/studio/chunks/operations-CjNHyrEX.js.gz +0 -0
  286. package/studio/chunks/overlay-DnqFLZTc.js +1733 -0
  287. package/studio/chunks/overlay-DnqFLZTc.js.br +0 -0
  288. package/studio/chunks/overlay-DnqFLZTc.js.gz +0 -0
  289. package/studio/chunks/presentation-DF83w0hE.js +57 -0
  290. package/studio/chunks/presentation-DF83w0hE.js.br +0 -0
  291. package/studio/chunks/presentation-DF83w0hE.js.gz +0 -0
  292. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js +4557 -0
  293. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.br +0 -0
  294. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.gz +0 -0
  295. package/studio/chunks/searchPresentation-DFwxQkt3.js +76 -0
  296. package/studio/chunks/searchPresentation-DFwxQkt3.js.br +0 -0
  297. package/studio/chunks/searchPresentation-DFwxQkt3.js.gz +0 -0
  298. package/studio/chunks/status-DQv6ihkU.js +38 -0
  299. package/studio/chunks/status-DQv6ihkU.js.br +0 -0
  300. package/studio/chunks/status-DQv6ihkU.js.gz +0 -0
  301. package/studio/chunks/studioContext-I8HozGU1.js +4953 -0
  302. package/studio/chunks/studioContext-I8HozGU1.js.br +0 -0
  303. package/studio/chunks/studioContext-I8HozGU1.js.gz +0 -0
  304. package/studio/chunks/studioQueries-BR-9NT5F.js +73 -0
  305. package/studio/chunks/studioQueries-BR-9NT5F.js.br +0 -0
  306. package/studio/chunks/studioQueries-BR-9NT5F.js.gz +0 -0
  307. package/studio/chunks/studioSearch-ByaL-QpM.js +1095 -0
  308. package/studio/chunks/studioSearch-ByaL-QpM.js.br +0 -0
  309. package/studio/chunks/studioSearch-ByaL-QpM.js.gz +0 -0
  310. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js +62 -0
  311. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.br +0 -0
  312. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.gz +0 -0
  313. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js +189 -0
  314. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.br +0 -0
  315. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.gz +0 -0
  316. package/studio/chunks/useDocumentMessage-BAWvc38w.js +16 -0
  317. package/studio/chunks/useDocumentMessage-BAWvc38w.js.br +3 -0
  318. package/studio/chunks/useDocumentMessage-BAWvc38w.js.gz +0 -0
  319. package/studio/chunks/useFilter-DzyiTR7f.js +87 -0
  320. package/studio/chunks/useFilter-DzyiTR7f.js.br +0 -0
  321. package/studio/chunks/useFilter-DzyiTR7f.js.gz +0 -0
  322. package/studio/chunks/useFormControl-CL7sSCUo.js +8 -0
  323. package/studio/chunks/useFormControl-CL7sSCUo.js.br +0 -0
  324. package/studio/chunks/useFormControl-CL7sSCUo.js.gz +0 -0
  325. package/studio/chunks/useGraceArea-Chcy25IQ.js +154 -0
  326. package/studio/chunks/useGraceArea-Chcy25IQ.js.br +0 -0
  327. package/studio/chunks/useGraceArea-Chcy25IQ.js.gz +0 -0
  328. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js +44 -0
  329. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.br +8 -0
  330. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.gz +0 -0
  331. package/studio/chunks/useLinkCopy-CMjQteCy.js +35 -0
  332. package/studio/chunks/useLinkCopy-CMjQteCy.js.br +0 -0
  333. package/studio/chunks/useLinkCopy-CMjQteCy.js.gz +0 -0
  334. package/studio/chunks/usePointerMotion-DwRcwBNQ.js +16 -0
  335. package/studio/chunks/usePointerMotion-DwRcwBNQ.js.br +0 -0
  336. package/studio/chunks/usePointerMotion-DwRcwBNQ.js.gz +0 -0
  337. package/studio/chunks/useStudioNavigation-CLwtSYpb.js +298 -0
  338. package/studio/chunks/useStudioNavigation-CLwtSYpb.js.br +0 -0
  339. package/studio/chunks/useStudioNavigation-CLwtSYpb.js.gz +0 -0
  340. package/studio/chunks/useStudioPages-DR9qmYLg.js +79 -0
  341. package/studio/chunks/useStudioPages-DR9qmYLg.js.br +0 -0
  342. package/studio/chunks/useStudioPages-DR9qmYLg.js.gz +0 -0
  343. package/studio/chunks/utils-mdScC0v0.js +59 -0
  344. package/studio/chunks/utils-mdScC0v0.js.br +0 -0
  345. package/studio/chunks/utils-mdScC0v0.js.gz +0 -0
  346. package/studio/chunks/virtualizer-D1S0bZ4t.js +781 -0
  347. package/studio/chunks/virtualizer-D1S0bZ4t.js.br +0 -0
  348. package/studio/chunks/virtualizer-D1S0bZ4t.js.gz +0 -0
  349. package/studio/help/64f767fe29c2-save-and-publish.svg +7 -0
  350. package/studio/host.css +1 -1
  351. package/studio/host.css.br +0 -0
  352. package/studio/host.css.gz +0 -0
  353. package/studio/host.js +8757 -39178
  354. package/studio/host.js.br +0 -0
  355. package/studio/host.js.gz +0 -0
  356. package/CHANGELOG.md +0 -13
  357. package/bin/cms.mjs +0 -2
  358. package/src/ApplicationTypes.d.ts +0 -84
  359. package/src/ApplicationTypes.js +0 -1
  360. package/src/Configuration-Da5B2PVH.js +0 -1191
  361. package/src/Configuration-Da5B2PVH.js.map +0 -1
  362. package/src/Configuration.d.ts +0 -82
  363. package/src/Configuration.js +0 -8
  364. package/src/Configuration.js.map +0 -1
  365. package/src/Content.d.ts +0 -68
  366. package/src/Content.js +0 -373
  367. package/src/Content.js.map +0 -1
  368. package/src/ContentTransfer-BxwswWn3.js +0 -86
  369. package/src/ContentTransfer-BxwswWn3.js.map +0 -1
  370. package/src/ContentTransfer-Z9FHyLez.d.ts +0 -72
  371. package/src/DocumentEngine-hh_IGPXO.js +0 -978
  372. package/src/DocumentEngine-hh_IGPXO.js.map +0 -1
  373. package/src/DocumentModel.d.ts +0 -52
  374. package/src/DocumentModel.js +0 -66
  375. package/src/DocumentModel.js.map +0 -1
  376. package/src/Forms-CX-hwmJF.js +0 -391
  377. package/src/Forms-CX-hwmJF.js.map +0 -1
  378. package/src/Forms-CfNPTiCr.js +0 -110
  379. package/src/Forms-CfNPTiCr.js.map +0 -1
  380. package/src/Forms-R0HoTR-o.d.ts +0 -92
  381. package/src/Forms.js.map +0 -1
  382. package/src/HttpPaths-c9nLZ9H2.js +0 -21
  383. package/src/HttpPaths-c9nLZ9H2.js.map +0 -1
  384. package/src/I18n-zbqpWxki.d.ts +0 -29
  385. package/src/Media-j1bTritO.js +0 -112
  386. package/src/Media-j1bTritO.js.map +0 -1
  387. package/src/Module.js.map +0 -1
  388. package/src/References-CCPDAPve.js +0 -45
  389. package/src/References-CCPDAPve.js.map +0 -1
  390. package/src/S3MediaObjects-Dwhl2deX.js +0 -2742
  391. package/src/S3MediaObjects-Dwhl2deX.js.map +0 -1
  392. package/src/Seo-402YumpT.d.ts +0 -198
  393. package/src/cli/content.js +0 -101
  394. package/src/cli/content.js.map +0 -1
  395. package/src/cli.js.map +0 -1
  396. package/src/connection-BP80q4d-.js +0 -92
  397. package/src/connection-BP80q4d-.js.map +0 -1
  398. package/src/dev-lifecycle-CjDq63Ft.js +0 -535
  399. package/src/dev-lifecycle-CjDq63Ft.js.map +0 -1
  400. package/src/installation-DYNQQBD3.js +0 -9114
  401. package/src/installation-DYNQQBD3.js.map +0 -1
  402. package/src/internal/application-types.js +0 -43
  403. package/src/internal/application-types.js.map +0 -1
  404. package/src/internal/authoring-catalog.js +0 -158
  405. package/src/internal/authoring-catalog.js.map +0 -1
  406. package/src/internal/authoring-compiler.js +0 -146
  407. package/src/internal/authoring-compiler.js.map +0 -1
  408. package/src/internal/authoring-metadata.js +0 -191
  409. package/src/internal/authoring-metadata.js.map +0 -1
  410. package/src/internal/cms-config.js +0 -45
  411. package/src/internal/cms-config.js.map +0 -1
  412. package/src/internal/configuration.js +0 -228
  413. package/src/internal/configuration.js.map +0 -1
  414. package/src/internal/dev-lifecycle.js +0 -3
  415. package/src/internal/diagnostics.js +0 -47
  416. package/src/internal/diagnostics.js.map +0 -1
  417. package/src/internal/document-model.js +0 -376
  418. package/src/internal/document-model.js.map +0 -1
  419. package/src/internal/field-metadata.js +0 -7
  420. package/src/internal/field-metadata.js.map +0 -1
  421. package/src/internal/form-capabilities.js +0 -12
  422. package/src/internal/form-capabilities.js.map +0 -1
  423. package/src/internal/i18n.js +0 -73
  424. package/src/internal/i18n.js.map +0 -1
  425. package/src/internal/studio-app.js +0 -68
  426. package/src/internal/studio-app.js.map +0 -1
  427. package/src/location-CMNGO3lU.js +0 -35
  428. package/src/location-CMNGO3lU.js.map +0 -1
  429. package/src/metadata-DN9_K6Yl.js +0 -201
  430. package/src/metadata-DN9_K6Yl.js.map +0 -1
  431. package/src/models-5j67LMqW.js +0 -131
  432. package/src/models-5j67LMqW.js.map +0 -1
  433. package/src/models-VmGmG19-.js +0 -628
  434. package/src/models-VmGmG19-.js.map +0 -1
  435. package/src/runtime/api.js.map +0 -1
  436. package/src/runtime/blocks.js +0 -30
  437. package/src/runtime/blocks.js.map +0 -1
  438. package/src/runtime/collaboration.js +0 -45
  439. package/src/runtime/collaboration.js.map +0 -1
  440. package/src/runtime/delivery/DocumentField.js +0 -23
  441. package/src/runtime/delivery/DocumentField.js.map +0 -1
  442. package/src/runtime/delivery/DocumentRenderer.js +0 -61
  443. package/src/runtime/delivery/DocumentRenderer.js.map +0 -1
  444. package/src/runtime/delivery/DocumentScope.js +0 -41
  445. package/src/runtime/delivery/DocumentScope.js.map +0 -1
  446. package/src/runtime/delivery/blocks.js +0 -8
  447. package/src/runtime/delivery/blocks.js.map +0 -1
  448. package/src/runtime/delivery/context.js +0 -12
  449. package/src/runtime/delivery/context.js.map +0 -1
  450. package/src/runtime/delivery/document-page.js +0 -21
  451. package/src/runtime/delivery/document-page.js.map +0 -1
  452. package/src/runtime/delivery/document.js +0 -43
  453. package/src/runtime/delivery/document.js.map +0 -1
  454. package/src/runtime/delivery/error.js +0 -11
  455. package/src/runtime/delivery/error.js.map +0 -1
  456. package/src/runtime/delivery/plugin.js +0 -99
  457. package/src/runtime/delivery/plugin.js.map +0 -1
  458. package/src/runtime/delivery/preview.d.ts +0 -11
  459. package/src/runtime/delivery/preview.js +0 -6
  460. package/src/runtime/delivery/preview.js.map +0 -1
  461. package/src/runtime/delivery/types.d.ts +0 -2
  462. package/src/runtime/delivery/types.js +0 -1
  463. package/src/runtime/delivery/useCmsDocumentSeo.d.ts +0 -67
  464. package/src/runtime/delivery/useCmsDocumentSeo.js.map +0 -1
  465. package/src/runtime/delivery/useDocument.d.ts +0 -6
  466. package/src/runtime/delivery/useDocument.js +0 -23
  467. package/src/runtime/delivery/useDocument.js.map +0 -1
  468. package/src/runtime/delivery/useDocumentQuery.d.ts +0 -7
  469. package/src/runtime/delivery/useDocumentQuery.js +0 -29
  470. package/src/runtime/delivery/useDocumentQuery.js.map +0 -1
  471. package/src/runtime/forms/document.js +0 -38
  472. package/src/runtime/forms/document.js.map +0 -1
  473. package/src/runtime/forms/useCmsForm.js +0 -257
  474. package/src/runtime/forms/useCmsForm.js.map +0 -1
  475. package/src/runtime/i18n/translator.js +0 -51
  476. package/src/runtime/i18n/translator.js.map +0 -1
  477. package/src/runtime/i18n/useCmsI18n.d.ts +0 -13
  478. package/src/runtime/i18n/useCmsI18n.js +0 -38
  479. package/src/runtime/i18n/useCmsI18n.js.map +0 -1
  480. package/src/runtime/installation.js +0 -3
  481. package/src/runtime/plugin.js.map +0 -1
  482. package/src/runtime/preview/CmsStudioPreviewMarker.js +0 -29
  483. package/src/runtime/preview/CmsStudioPreviewMarker.js.map +0 -1
  484. package/src/runtime/preview/comark-document.js +0 -37
  485. package/src/runtime/preview/comark-document.js.map +0 -1
  486. package/src/runtime/preview/connection.js +0 -3
  487. package/src/runtime/preview/controller.js +0 -265
  488. package/src/runtime/preview/controller.js.map +0 -1
  489. package/src/runtime/preview/crypto.js +0 -16
  490. package/src/runtime/preview/crypto.js.map +0 -1
  491. package/src/runtime/preview/overlay.js +0 -122
  492. package/src/runtime/preview/overlay.js.map +0 -1
  493. package/src/runtime/preview/plugin.client.js +0 -68
  494. package/src/runtime/preview/plugin.client.js.map +0 -1
  495. package/src/runtime/preview/preview.css +0 -91
  496. package/src/runtime/preview/protocol.d.ts +0 -16
  497. package/src/runtime/preview/protocol.js +0 -23
  498. package/src/runtime/preview/protocol.js.map +0 -1
  499. package/src/runtime/preview/regions.js +0 -142
  500. package/src/runtime/preview/regions.js.map +0 -1
  501. package/src/runtime/preview/store.js +0 -4
  502. package/src/runtime/sitemap-entries.js +0 -17
  503. package/src/runtime/sitemap-entries.js.map +0 -1
  504. package/src/runtime/sitemap.js +0 -23
  505. package/src/runtime/sitemap.js.map +0 -1
  506. package/src/runtime/studio-app.js +0 -17
  507. package/src/runtime/studio-app.js.map +0 -1
  508. package/src/runtime/studio-document.js +0 -46
  509. package/src/runtime/studio-document.js.map +0 -1
  510. package/src/runtime/studio-entry.js +0 -19
  511. package/src/runtime/studio-entry.js.map +0 -1
  512. package/src/runtime/studio-navigation.js +0 -11
  513. package/src/runtime/studio-navigation.js.map +0 -1
  514. package/src/scalars-CA6kyipS.d.ts +0 -7
  515. package/src/scalars-CVZqT3L0.js +0 -22
  516. package/src/scalars-CVZqT3L0.js.map +0 -1
  517. package/src/store-X1e1o_MF.js +0 -209
  518. package/src/store-X1e1o_MF.js.map +0 -1
  519. package/src/types-DZ0IV-Ow.d.ts +0 -101
  520. package/studio/CreateDocumentDialog-BpjBYGfI.js +0 -335
  521. package/studio/SelectMenu-KiXwx4Y_.js +0 -34032
  522. package/studio/collaboration-DcK2F6v9.js +0 -4566
  523. package/studio/editor-P2rB7Csp.js +0 -30128
  524. package/studio/rolldown-runtime-Dy4uBu1J.js +0 -11
package/src/Client.js ADDED
@@ -0,0 +1,41 @@
1
+ import { i as ClientError, n as make$1, o as layer, s as make, t as ImportError } from "./DataTransfer-BmECvPHB.js";
2
+ import { Cause, Effect, Exit, Layer, ManagedRuntime } from "effect";
3
+ import * as NodeServices from "@effect/platform-node/NodeServices";
4
+ import { FetchHttpClient } from "effect/http";
5
+ //#region ../cli/src/Client.ts
6
+ /** One run owns its in-memory session and request scopes. Consume streams inside run's callback. */
7
+ async function connectCms(options) {
8
+ const site = new URL(options.site);
9
+ const transport = options.fetch ? layer.pipe(Layer.provide(Layer.succeed(FetchHttpClient.Fetch, options.fetch))) : layer;
10
+ const runtime = ManagedRuntime.make(Layer.merge(NodeServices.layer, transport));
11
+ const result = async (operation) => {
12
+ const exit = await runtime.runPromiseExit(Effect.scoped(operation));
13
+ if (Exit.isSuccess(exit)) return exit.value;
14
+ throw Cause.squash(exit.cause);
15
+ };
16
+ try {
17
+ const connection = await runtime.runPromise(make(site, options.session));
18
+ const data = make$1(connection);
19
+ const client = {
20
+ site,
21
+ get session() {
22
+ return connection.session;
23
+ },
24
+ run: (operation) => result(operation(connection.api)),
25
+ signIn: (email, password) => result(connection.signIn(email, password)),
26
+ initialize: (input) => result(connection.initialize(input)),
27
+ signOut: () => result(connection.signOut()),
28
+ resetPassword: (token, newPassword) => result(connection.resetPassword(token, newPassword)),
29
+ export: (file, force) => result(data.export(file, force)),
30
+ import: (file, settings) => result(data.import(file, settings)),
31
+ close: () => runtime.dispose()
32
+ };
33
+ if (options.credentials) await client.signIn(options.credentials.email, options.credentials.password);
34
+ return client;
35
+ } catch (error) {
36
+ await runtime.dispose();
37
+ throw error;
38
+ }
39
+ }
40
+ //#endregion
41
+ export { ClientError, ImportError, connectCms };
@@ -0,0 +1,142 @@
1
+ import { n as MediaKind, r as MediaSelection } from "./Media-BQ0uL4w7.js";
2
+ import { n as FieldDefinition, t as CollectionDefinition } from "./Fields-BegSgYhj.js";
3
+ import { n as AuthoredImage, t as LinkTarget } from "./Links-Dx1yOni8.js";
4
+ import { Schema } from "effect";
5
+ import { StandardSchemaV1 } from "@standard-schema/spec";
6
+ declare namespace Field_d_exports {
7
+ export { Field, Fields, NumberOptions, Options, TextOptions, Value, Values, boolean, date, document, icon, image, link, list, media, multiSelect, number, object, select, text, textarea };
8
+ }
9
+ declare const valueType: unique symbol;
10
+ interface Options<Value extends Schema.Json, Required extends boolean = boolean> {
11
+ readonly label?: string;
12
+ readonly description?: string;
13
+ readonly required?: Required;
14
+ readonly defaultValue?: Value;
15
+ }
16
+ type TextConstraints = Pick<Extract<FieldDefinition, {
17
+ kind: 'text';
18
+ }>, 'minLength' | 'maxLength'>;
19
+ type NumberConstraints = Pick<Extract<FieldDefinition, {
20
+ kind: 'number';
21
+ }>, 'integer' | 'min' | 'max'>;
22
+ interface TextOptions<Required extends boolean> extends Options<string, Required>, TextConstraints {}
23
+ interface NumberOptions<Required extends boolean> extends Options<number, Required>, NumberConstraints {}
24
+ interface Field<Value extends Schema.Json = Schema.Json, Required extends boolean = boolean> {
25
+ readonly [valueType]?: Value;
26
+ readonly kind: FieldDefinition['kind'];
27
+ readonly options: Options<Value, Required> & TextConstraints & NumberConstraints;
28
+ readonly fields?: Fields;
29
+ readonly choices?: Readonly<Record<string, string>>;
30
+ readonly collections?: ReadonlyArray<string>;
31
+ readonly mediaKind?: MediaKind;
32
+ }
33
+ type Fields = Readonly<Record<string, Field>>;
34
+ type Value<F extends Field> = NonNullable<F[typeof valueType]>;
35
+ type RequiredNames<F extends Fields> = { [Name in keyof F]: F[Name]['options']['required'] extends true | undefined ? Name : never; }[keyof F];
36
+ type Values<F extends Fields> = { readonly [Name in RequiredNames<F>]: Value<F[Name]>; } & { readonly [Name in Exclude<keyof F, RequiredNames<F>>]?: Value<F[Name]>; };
37
+ declare function text<const Required extends boolean = false>(options?: TextOptions<Required>): Field<string, Required>;
38
+ declare function textarea<const Required extends boolean = false>(options?: TextOptions<Required>): Field<string, Required>;
39
+ declare function date<const Required extends boolean = false>(options?: Options<string, Required>): Field<string, Required>;
40
+ declare function icon<const Required extends boolean = false>(options?: Options<string, Required>): Field<string, Required>;
41
+ declare function number<const Required extends boolean = false>(options?: NumberOptions<Required>): Field<number, Required>;
42
+ declare function boolean<const Required extends boolean = false>(options?: Options<boolean, Required>): Field<boolean, Required>;
43
+ declare function select<const Choices extends Readonly<Record<string, string>>, const Required extends boolean = false>(choices: Choices, options?: Options<NoInfer<Extract<keyof Choices, string>>, Required>): {
44
+ choices: Choices;
45
+ kind: FieldDefinition["kind"];
46
+ options: Options<NoInfer<Extract<keyof Choices, string>>, Required> & TextConstraints & NumberConstraints;
47
+ fields?: Readonly<Record<string, Field<Schema.Json, boolean>>> | undefined;
48
+ collections?: ReadonlyArray<string>;
49
+ mediaKind?: MediaKind;
50
+ [valueType]?: NoInfer<Extract<keyof Choices, string>> | undefined;
51
+ };
52
+ declare function multiSelect<const Choices extends Readonly<Record<string, string>> = Readonly<Record<string, string>>, const Required extends boolean = false>(choices?: Choices, options?: Options<ReadonlyArray<NoInfer<Extract<keyof Choices, string>>>, Required>): {
53
+ choices: {
54
+ [x: string]: string;
55
+ };
56
+ kind: FieldDefinition["kind"];
57
+ options: Options<readonly NoInfer<Extract<keyof Choices, string>>[], Required> & TextConstraints & NumberConstraints;
58
+ fields?: Readonly<Record<string, Field<Schema.Json, boolean>>> | undefined;
59
+ collections?: ReadonlyArray<string>;
60
+ mediaKind?: MediaKind;
61
+ [valueType]?: readonly NoInfer<Extract<keyof Choices, string>>[] | undefined;
62
+ };
63
+ declare function document<const Required extends boolean = false>(options?: Omit<Options<string, Required>, 'defaultValue'> & {
64
+ readonly collections?: ReadonlyArray<string>;
65
+ }): {
66
+ collections: string[] | undefined;
67
+ kind: FieldDefinition["kind"];
68
+ options: Options<string, Required> & TextConstraints & NumberConstraints;
69
+ fields?: Readonly<Record<string, Field<Schema.Json, boolean>>> | undefined;
70
+ choices?: Readonly<Record<string, string>>;
71
+ mediaKind?: MediaKind;
72
+ [valueType]?: string | undefined;
73
+ };
74
+ declare function image<const Required extends boolean = false>(options?: Options<AuthoredImage, Required>): Field<{
75
+ readonly kind: "image";
76
+ readonly mediaId: string;
77
+ readonly alt?: string | undefined;
78
+ readonly frame?: "square" | "wide" | undefined;
79
+ readonly focalX?: number | undefined;
80
+ readonly focalY?: number | undefined;
81
+ readonly zoom?: number | undefined;
82
+ }, Required>;
83
+ declare function media<const Kind extends MediaKind, const Required extends boolean = false>(options: Options<MediaSelection & {
84
+ readonly mediaKind: NoInfer<Kind>;
85
+ }, Required> & {
86
+ readonly mediaKind: Kind;
87
+ }): {
88
+ mediaKind: Kind;
89
+ kind: FieldDefinition["kind"];
90
+ options: Options<{
91
+ readonly kind: "media";
92
+ readonly mediaId: string;
93
+ readonly mediaKind: "video" | "image";
94
+ } & {
95
+ readonly mediaKind: Kind;
96
+ }, Required> & TextConstraints & NumberConstraints;
97
+ fields?: Readonly<Record<string, Field<Schema.Json, boolean>>> | undefined;
98
+ choices?: Readonly<Record<string, string>>;
99
+ collections?: ReadonlyArray<string>;
100
+ [valueType]?: ({
101
+ readonly kind: "media";
102
+ readonly mediaId: string;
103
+ readonly mediaKind: "video" | "image";
104
+ } & {
105
+ readonly mediaKind: Kind;
106
+ }) | undefined;
107
+ };
108
+ declare function link<const Required extends boolean = false>(options?: Options<LinkTarget, Required>): Field<{
109
+ readonly kind: "url";
110
+ readonly href: string;
111
+ } | {
112
+ readonly kind: "document";
113
+ readonly documentId: string;
114
+ readonly path: string;
115
+ }, Required>;
116
+ declare function object<const F extends Fields, const Required extends boolean = false>(fields: F, options?: Omit<Options<Values<F>, Required>, 'defaultValue'>): Field<Values<F>, Required>;
117
+ declare function list<const F extends Fields, const Required extends boolean = false>(fields: F, options?: Omit<Options<ReadonlyArray<Values<F> & {
118
+ readonly id: string;
119
+ }>, Required>, 'defaultValue'>): Field<ReadonlyArray<Values<F> & {
120
+ readonly id: string;
121
+ }>, Required>;
122
+ //#endregion
123
+ //#region ../model/src/Collection.d.ts
124
+ declare const contentType: unique symbol;
125
+ interface Collection<Value extends Schema.JsonObject = Schema.JsonObject, Name extends string = string> extends CollectionDefinition {
126
+ readonly collection: Name;
127
+ readonly [contentType]?: Value;
128
+ /** Optional asynchronous business rules; their output is never persisted. */
129
+ readonly schema?: StandardSchemaV1<Value, unknown>;
130
+ }
131
+ type CollectionFields<C extends Collection> = NonNullable<C[typeof contentType]>;
132
+ declare function defineCollection<const Name extends string, const F extends Fields>(definition: Omit<CollectionDefinition, 'fields' | 'title'> & {
133
+ readonly collection: Name;
134
+ readonly fields: F;
135
+ readonly validate?: StandardSchemaV1<NoInfer<Values<F>>, unknown>;
136
+ }): Collection<Values<F>, Name>;
137
+ //#endregion
138
+ //#region src/Collections.d.ts
139
+ export type CmsCollection = Collection;
140
+ export declare function defineCmsCollections<const Collections extends ReadonlyArray<CmsCollection>>(collections: Collections): Collections;
141
+ //#endregion
142
+ export { type CollectionFields as CmsCollectionFields, defineCollection as defineCmsCollection, Field_d_exports as field };
@@ -0,0 +1,142 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
+ import { r as validateCollectionDefinition } from "./validation-DpUwPC8Y.js";
3
+ import { t as CollectionDefinition } from "./Fields-ioGaMEh9.js";
4
+ import { Schema } from "effect";
5
+ //#region ../model/src/Collection.ts
6
+ function defineCollection(definition) {
7
+ const { fields: declaredFields, validate, ...metadata } = definition;
8
+ const fields = structuredClone(declaredFields);
9
+ const title = fields.title;
10
+ if (!title || title.kind !== "text" || !title.options.required) throw new Error("A collection needs a required text title field.");
11
+ const catalog = Schema.decodeUnknownSync(CollectionDefinition)({
12
+ ...metadata,
13
+ fields: catalogFields(fields, true),
14
+ ...(title.options.minLength !== void 0 || title.options.maxLength !== void 0) && { title: {
15
+ ...title.options.minLength !== void 0 && { minLength: title.options.minLength },
16
+ ...title.options.maxLength !== void 0 && { maxLength: title.options.maxLength }
17
+ } }
18
+ });
19
+ const collection = Object.assign(catalog, {
20
+ collection: definition.collection,
21
+ fields: catalog.fields.filter((field) => field.name !== "title"),
22
+ ...validate && { schema: validate }
23
+ });
24
+ const problems = validateCollectionDefinition(collection);
25
+ if (problems.length) throw new Error(problems.join("\n"));
26
+ return collection;
27
+ }
28
+ function catalogFields(fields, root = false) {
29
+ return Object.entries(fields).map(([name, field]) => {
30
+ if (!/^[a-z][a-zA-Z0-9]*$/u.test(name) || !root && name === "id") throw new Error("Invalid or reserved field name \"" + name + "\".");
31
+ return {
32
+ ...field.options,
33
+ name,
34
+ kind: field.kind,
35
+ label: field.options.label ?? name.replaceAll(/([a-z])([A-Z])/gu, "$1 $2").replace(/^./u, (letter) => letter.toUpperCase()),
36
+ required: field.options.required ?? false,
37
+ ...field.fields && { fields: catalogFields(field.fields) },
38
+ ...field.choices && { options: Object.entries(field.choices).map(([value, label]) => ({
39
+ value,
40
+ label
41
+ })) },
42
+ ...field.collections && { collections: field.collections },
43
+ ...field.mediaKind && { mediaKind: field.mediaKind }
44
+ };
45
+ });
46
+ }
47
+ //#endregion
48
+ //#region ../model/src/Field.ts
49
+ var Field_exports = /* @__PURE__ */ __exportAll({
50
+ boolean: () => boolean,
51
+ date: () => date,
52
+ document: () => document,
53
+ icon: () => icon,
54
+ image: () => image,
55
+ link: () => link,
56
+ list: () => list,
57
+ media: () => media,
58
+ multiSelect: () => multiSelect,
59
+ number: () => number,
60
+ object: () => object,
61
+ select: () => select,
62
+ text: () => text,
63
+ textarea: () => textarea
64
+ });
65
+ function make(kind, options) {
66
+ if (options.defaultValue !== void 0 && [
67
+ "document",
68
+ "object",
69
+ "list"
70
+ ].includes(kind)) throw new Error("A " + kind + " field does not support a default value.");
71
+ return {
72
+ kind,
73
+ options: structuredClone(options)
74
+ };
75
+ }
76
+ function text(options = {}) {
77
+ return make("text", options);
78
+ }
79
+ function textarea(options = {}) {
80
+ return make("textarea", options);
81
+ }
82
+ function date(options = {}) {
83
+ return make("date", options);
84
+ }
85
+ function icon(options = {}) {
86
+ return make("icon", options);
87
+ }
88
+ function number(options = {}) {
89
+ return make("number", options);
90
+ }
91
+ function boolean(options = {}) {
92
+ return make("boolean", options);
93
+ }
94
+ function select(choices, options = {}) {
95
+ return {
96
+ ...make("select", options),
97
+ choices: { ...choices }
98
+ };
99
+ }
100
+ function multiSelect(choices, options = {}) {
101
+ return {
102
+ ...make("multi-select", options),
103
+ choices: { ...choices }
104
+ };
105
+ }
106
+ function document(options = {}) {
107
+ return {
108
+ ...make("document", options),
109
+ collections: options.collections?.slice()
110
+ };
111
+ }
112
+ function image(options = {}) {
113
+ return make("image", options);
114
+ }
115
+ function media(options) {
116
+ return {
117
+ ...make("media", options),
118
+ mediaKind: options.mediaKind
119
+ };
120
+ }
121
+ function link(options = {}) {
122
+ return make("link", options);
123
+ }
124
+ function object(fields, options = {}) {
125
+ return {
126
+ ...make("object", options),
127
+ fields: { ...fields }
128
+ };
129
+ }
130
+ function list(fields, options = {}) {
131
+ return {
132
+ ...make("list", options),
133
+ fields: { ...fields }
134
+ };
135
+ }
136
+ //#endregion
137
+ //#region src/Collections.ts
138
+ function defineCmsCollections(collections) {
139
+ return collections;
140
+ }
141
+ //#endregion
142
+ export { defineCollection as defineCmsCollection, defineCmsCollections, Field_exports as field };
@@ -0,0 +1,130 @@
1
+ import { i as SiteSeoSettings, n as SiteOrigin } from "./Seo-CjNUtUkj.js";
2
+ import { n as LocaleConfiguration } from "./Locales-Ch7a5xuA.js";
3
+ import { a as PersonEmail, s as StudioModule } from "./People-DvNZauWw.js";
4
+ import { Effect, Schema, SchemaTransformation } from "effect";
5
+ //#region ../cli/src/Config.ts
6
+ const BooleanFromEnvironment = Schema.Union([Schema.Boolean, Schema.Literals(["true", "false"]).pipe(Schema.decodeTo(Schema.Boolean, SchemaTransformation.transform({
7
+ decode: (value) => value === "true",
8
+ encode: (value) => value ? "true" : "false"
9
+ })))]);
10
+ const PositiveBytes = Schema.Int.check(Schema.isGreaterThan(0));
11
+ /** Serializable private values registered under Nuxt's runtimeConfig.cms. */
12
+ const RuntimeConfiguration = Schema.Struct({
13
+ origin: SiteOrigin,
14
+ databaseFile: Schema.NonEmptyString,
15
+ installationSecret: Schema.String,
16
+ trustedProxyIps: Schema.String,
17
+ s3: Schema.Struct({
18
+ bucket: Schema.String,
19
+ region: Schema.String,
20
+ prefix: Schema.String,
21
+ endpoint: Schema.String,
22
+ forcePathStyle: BooleanFromEnvironment,
23
+ accessKeyId: Schema.String,
24
+ secretAccessKey: Schema.String,
25
+ maxUploadBytes: Schema.Union([PositiveBytes, Schema.FiniteFromString.pipe(Schema.decodeTo(PositiveBytes))])
26
+ })
27
+ });
28
+ /** Convert flat runtime values to the connection shared by provisioning and media storage. */
29
+ function mediaStorageOptions(configuration) {
30
+ const { bucket, region, prefix, endpoint, forcePathStyle, accessKeyId, secretAccessKey } = configuration;
31
+ if (!bucket || !region) throw new Error("CMS media storage requires a bucket and region.");
32
+ if (!!accessKeyId !== !!secretAccessKey) throw new Error("CMS S3 access key and secret key must be configured together.");
33
+ return {
34
+ bucket,
35
+ region,
36
+ prefix,
37
+ endpoint: endpoint || void 0,
38
+ forcePathStyle,
39
+ credentials: accessKeyId ? {
40
+ accessKeyId,
41
+ secretAccessKey
42
+ } : void 0
43
+ };
44
+ }
45
+ const runtimeDefaults = {
46
+ origin: "http://127.0.0.1:3000",
47
+ databaseFile: ".data/cms.sqlite",
48
+ installationSecret: "",
49
+ trustedProxyIps: "",
50
+ s3: {
51
+ bucket: "",
52
+ region: "",
53
+ prefix: "",
54
+ endpoint: "",
55
+ forcePathStyle: false,
56
+ accessKeyId: "",
57
+ secretAccessKey: "",
58
+ maxUploadBytes: 25e7
59
+ }
60
+ };
61
+ const Account = Schema.Struct({
62
+ email: PersonEmail,
63
+ password: Schema.String.check(Schema.isMinLength(8))
64
+ });
65
+ const Administrator = Schema.Struct({
66
+ ...Account.fields,
67
+ name: Schema.NonEmptyString
68
+ });
69
+ const ResolvedConfiguration = Schema.Struct({
70
+ locales: Schema.optionalKey(LocaleConfiguration),
71
+ seo: Schema.Struct({
72
+ ...SiteSeoSettings.fields,
73
+ canonicalOrigin: Schema.optionalKey(Schema.Never)
74
+ }),
75
+ studio: Schema.Struct({ modules: Schema.Array(StudioModule.mapFields((fields) => ({
76
+ ...fields,
77
+ access: Schema.optionalKey(fields.access)
78
+ }))) }),
79
+ robots: Schema.Boolean,
80
+ sitemap: Schema.Boolean,
81
+ runtime: RuntimeConfiguration,
82
+ provision: Schema.optionalKey(Schema.Struct({
83
+ compose: Schema.optionalKey(Schema.Struct({
84
+ file: Schema.NonEmptyString,
85
+ service: Schema.NonEmptyString
86
+ })),
87
+ createBucket: Schema.Boolean.pipe(Schema.withDecodingDefaultKey(Effect.succeed(false)))
88
+ })),
89
+ bootstrap: Schema.optionalKey(Schema.Struct({
90
+ administrator: Schema.Struct({
91
+ email: Schema.String.pipe(Schema.withDecodingDefaultKey(Effect.succeed(""))),
92
+ password: Schema.String.pipe(Schema.withDecodingDefaultKey(Effect.succeed(""))),
93
+ name: Schema.NonEmptyString
94
+ }),
95
+ snapshot: Schema.optionalKey(Schema.NonEmptyString),
96
+ accounts: Schema.Array(Account).pipe(Schema.withDecodingDefaultKey(Effect.succeed([])))
97
+ }))
98
+ });
99
+ /** One site-owned configuration; profiles change values, commands choose actions. */
100
+ function defineCmsConfig(configuration) {
101
+ return configuration;
102
+ }
103
+ const configurationDefaults = {
104
+ runtime: runtimeDefaults,
105
+ seo: {
106
+ siteName: "CMS",
107
+ index: true,
108
+ follow: true
109
+ },
110
+ studio: { modules: [] },
111
+ robots: true,
112
+ sitemap: true
113
+ };
114
+ const overrides = (keys, prefix, environment) => Object.fromEntries(keys.flatMap((key) => {
115
+ const value = environment[`${prefix}${key.replace(/[A-Z]/gu, (letter) => `_${letter}`).toUpperCase()}`];
116
+ return value === void 0 ? [] : [[key, value]];
117
+ }));
118
+ /** Match Nuxt's fixed scalar environment keys without loading its framework in the CLI. */
119
+ function runtimeFromEnvironment(runtime, environment) {
120
+ return Schema.decodeSync(RuntimeConfiguration)({
121
+ ...runtime,
122
+ ...overrides(Object.keys(RuntimeConfiguration.fields).filter((key) => key !== "s3"), "NUXT_CMS_", environment),
123
+ s3: {
124
+ ...runtime.s3,
125
+ ...overrides(Object.keys(RuntimeConfiguration.fields.s3.fields), "NUXT_CMS_S3_", environment)
126
+ }
127
+ });
128
+ }
129
+ //#endregion
130
+ export { defineCmsConfig as a, configurationDefaults as i, ResolvedConfiguration as n, mediaStorageOptions as o, RuntimeConfiguration as r, runtimeFromEnvironment as s, Administrator as t };
@@ -0,0 +1,172 @@
1
+ import { r as LocaleConfiguration } from "./Locales-jwbmJaOp.js";
2
+ import { t as SiteSeoSettings } from "./Seo-BcpqxoAs.js";
3
+ import { Schema } from "effect";
4
+ //#region ../cli/src/Config.d.ts
5
+ /** Serializable private values registered under Nuxt's runtimeConfig.cms. */
6
+ declare const RuntimeConfiguration: Schema.Struct<{
7
+ readonly origin: Schema.String;
8
+ readonly databaseFile: Schema.NonEmptyString;
9
+ readonly installationSecret: Schema.String;
10
+ readonly trustedProxyIps: Schema.String;
11
+ readonly s3: Schema.Struct<{
12
+ readonly bucket: Schema.String;
13
+ readonly region: Schema.String;
14
+ readonly prefix: Schema.String;
15
+ readonly endpoint: Schema.String;
16
+ readonly forcePathStyle: Schema.Union<readonly [Schema.Boolean, Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>]>;
17
+ readonly accessKeyId: Schema.String;
18
+ readonly secretAccessKey: Schema.String;
19
+ readonly maxUploadBytes: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.FiniteFromString>]>;
20
+ }>;
21
+ }>;
22
+ interface RuntimeConfiguration extends Schema.Schema.Type<typeof RuntimeConfiguration> {}
23
+ declare const Account: Schema.Struct<{
24
+ readonly email: Schema.NonEmptyString;
25
+ readonly password: Schema.String;
26
+ }>;
27
+ declare const ResolvedConfiguration: Schema.Struct<{
28
+ readonly locales: Schema.optionalKey<Schema.Struct<{
29
+ readonly defaultLocale: Schema.NonEmptyString;
30
+ readonly supported: Schema.$Array<Schema.Struct<{
31
+ readonly code: Schema.NonEmptyString;
32
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
33
+ readonly dir: Schema.optionalKey<Schema.Literals<readonly ["ltr", "rtl"]>>;
34
+ }>>;
35
+ readonly prefixDefault: Schema.Boolean;
36
+ }>>;
37
+ readonly seo: Schema.Struct<{
38
+ readonly canonicalOrigin: Schema.optionalKey<Schema.Never>;
39
+ readonly siteName: Schema.String;
40
+ readonly defaultDescription: Schema.optionalKey<Schema.String>;
41
+ readonly titleTemplate: Schema.optionalKey<Schema.String>;
42
+ readonly socialTitle: Schema.optionalKey<Schema.String>;
43
+ readonly socialDescription: Schema.optionalKey<Schema.String>;
44
+ readonly socialImage: Schema.optionalKey<Schema.Struct<{
45
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
46
+ readonly alt: Schema.String;
47
+ }>>;
48
+ readonly index: Schema.Boolean;
49
+ readonly follow: Schema.Boolean;
50
+ readonly identity: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
51
+ readonly image: Schema.optionalKey<Schema.Struct<{
52
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
53
+ readonly alt: Schema.String;
54
+ }>>;
55
+ readonly name: Schema.String;
56
+ readonly url: Schema.optionalKey<Schema.String>;
57
+ readonly type: Schema.Literal<"Person">;
58
+ }>, Schema.Struct<{
59
+ readonly logo: Schema.optionalKey<Schema.Struct<{
60
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
61
+ readonly alt: Schema.String;
62
+ }>>;
63
+ readonly name: Schema.String;
64
+ readonly url: Schema.optionalKey<Schema.String>;
65
+ readonly type: Schema.Literal<"Organization">;
66
+ }>, Schema.Struct<{
67
+ readonly logo: Schema.optionalKey<Schema.Struct<{
68
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
69
+ readonly alt: Schema.String;
70
+ }>>;
71
+ readonly image: Schema.optionalKey<Schema.Struct<{
72
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
73
+ readonly alt: Schema.String;
74
+ }>>;
75
+ readonly telephone: Schema.optionalKey<Schema.String>;
76
+ readonly address: Schema.optionalKey<Schema.Struct<{
77
+ readonly streetAddress: Schema.optionalKey<Schema.String>;
78
+ readonly addressLocality: Schema.optionalKey<Schema.String>;
79
+ readonly addressRegion: Schema.optionalKey<Schema.String>;
80
+ readonly postalCode: Schema.optionalKey<Schema.String>;
81
+ readonly addressCountry: Schema.optionalKey<Schema.String>;
82
+ }>>;
83
+ readonly name: Schema.String;
84
+ readonly url: Schema.optionalKey<Schema.String>;
85
+ readonly type: Schema.Literal<"LocalBusiness">;
86
+ }>]>>;
87
+ }>;
88
+ readonly studio: Schema.Struct<{
89
+ readonly modules: Schema.$Array<Schema.Struct<{
90
+ readonly access: Schema.optionalKey<Schema.Literals<readonly ["administrator", "signed-in"]>>;
91
+ readonly id: Schema.NonEmptyString;
92
+ readonly label: Schema.NonEmptyString;
93
+ readonly icon: Schema.NonEmptyString;
94
+ readonly path: Schema.NonEmptyString;
95
+ }>>;
96
+ }>;
97
+ readonly robots: Schema.Boolean;
98
+ readonly sitemap: Schema.Boolean;
99
+ readonly runtime: Schema.Struct<{
100
+ readonly origin: Schema.String;
101
+ readonly databaseFile: Schema.NonEmptyString;
102
+ readonly installationSecret: Schema.String;
103
+ readonly trustedProxyIps: Schema.String;
104
+ readonly s3: Schema.Struct<{
105
+ readonly bucket: Schema.String;
106
+ readonly region: Schema.String;
107
+ readonly prefix: Schema.String;
108
+ readonly endpoint: Schema.String;
109
+ readonly forcePathStyle: Schema.Union<readonly [Schema.Boolean, Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>]>;
110
+ readonly accessKeyId: Schema.String;
111
+ readonly secretAccessKey: Schema.String;
112
+ readonly maxUploadBytes: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.FiniteFromString>]>;
113
+ }>;
114
+ }>;
115
+ readonly provision: Schema.optionalKey<Schema.Struct<{
116
+ readonly compose: Schema.optionalKey<Schema.Struct<{
117
+ readonly file: Schema.NonEmptyString;
118
+ readonly service: Schema.NonEmptyString;
119
+ }>>;
120
+ readonly createBucket: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
121
+ }>>;
122
+ readonly bootstrap: Schema.optionalKey<Schema.Struct<{
123
+ readonly administrator: Schema.Struct<{
124
+ readonly email: Schema.withDecodingDefaultKey<Schema.String, never>;
125
+ readonly password: Schema.withDecodingDefaultKey<Schema.String, never>;
126
+ readonly name: Schema.NonEmptyString;
127
+ }>;
128
+ readonly snapshot: Schema.optionalKey<Schema.NonEmptyString>;
129
+ readonly accounts: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
130
+ readonly email: Schema.NonEmptyString;
131
+ readonly password: Schema.String;
132
+ }>>, never>;
133
+ }>>;
134
+ }>;
135
+ interface ResolvedConfiguration extends Schema.Schema.Type<typeof ResolvedConfiguration> {}
136
+ interface CmsOptions {
137
+ readonly locales?: LocaleConfiguration;
138
+ readonly seo?: Partial<Omit<SiteSeoSettings, 'canonicalOrigin'>>;
139
+ readonly studio?: {
140
+ readonly modules?: ResolvedConfiguration['studio']['modules'];
141
+ };
142
+ readonly robots?: boolean;
143
+ readonly sitemap?: boolean;
144
+ readonly runtime?: Partial<Omit<RuntimeConfiguration, 's3'>> & {
145
+ readonly s3?: Partial<RuntimeConfiguration['s3']>;
146
+ };
147
+ readonly provision?: {
148
+ readonly compose?: {
149
+ readonly file: string;
150
+ readonly service: string;
151
+ };
152
+ readonly createBucket?: boolean;
153
+ };
154
+ readonly bootstrap?: {
155
+ readonly administrator: {
156
+ readonly name: string;
157
+ readonly email?: string;
158
+ readonly password?: string;
159
+ };
160
+ readonly snapshot?: string;
161
+ readonly accounts?: ReadonlyArray<typeof Account.Type>;
162
+ };
163
+ }
164
+ interface CmsConfig extends CmsOptions {
165
+ readonly $development?: CmsOptions;
166
+ readonly $production?: CmsOptions;
167
+ readonly $env?: Readonly<Record<string, CmsOptions>>;
168
+ }
169
+ /** One site-owned configuration; profiles change values, commands choose actions. */
170
+ export declare function defineCmsConfig(configuration: CmsConfig): CmsConfig;
171
+ //#endregion
172
+ export type { CmsConfig, CmsOptions };
package/src/Config.js ADDED
@@ -0,0 +1,2 @@
1
+ import { a as defineCmsConfig } from "./Config-CMiwciub.js";
2
+ export { defineCmsConfig };