@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
@@ -1 +0,0 @@
1
- {"version":3,"file":"models-VmGmG19-.js","names":[],"sources":["../../../../protocol/src/Identity.ts","../../../../protocol/src/internal/configuration/scalars.ts","../../../../protocol/src/AccessControl.ts","../../../../protocol/src/Seo.ts","../../../../protocol/src/internal/documents/models.ts"],"sourcesContent":["import { Schema } from 'effect'\n\nexport const RequestId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand('RequestId'))\n\nexport type RequestId = typeof RequestId.Type\n","import { Schema } from 'effect'\nimport { publicPathPattern } from '../scalars'\n\nconst collectionNamePattern = /^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$/u\n\nconst localePattern = /^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u\n\nexport const RoutePattern = Schema.String.check(Schema.isPattern(publicPathPattern)).pipe(Schema.brand('RoutePattern'))\n\nexport type RoutePattern = typeof RoutePattern.Type\n\nexport const CollectionName = Schema.String.check(Schema.isPattern(collectionNamePattern)).pipe(\n Schema.brand('CollectionName'),\n)\n\nexport type CollectionName = typeof CollectionName.Type\n\nexport const Locale = Schema.String.check(Schema.isPattern(localePattern)).pipe(Schema.brand('Locale'))\n\nexport type Locale = typeof Locale.Type\n","import { Schema } from 'effect'\nimport { RequestId } from './Identity'\nimport { CollectionName, Locale } from './internal/configuration/scalars'\nimport { DocumentId } from './internal/documents/scalars'\nimport { MediaFolder, MediaId } from './Media'\n\nexport const ROLES = ['administrator', 'editor', 'viewer'] as const\n\nexport const Role = Schema.Literals(ROLES)\n\nexport type Role = typeof Role.Type\n\nexport const StudioActor = Schema.Struct({\n id: Schema.NonEmptyString,\n email: Schema.NonEmptyString,\n name: Schema.NonEmptyString,\n // Provider roles remain visible, while access control recognizes only Role values.\n roles: Schema.Array(Schema.NonEmptyString),\n}).annotate({ identifier: 'StudioActor' })\n\nexport interface StudioActor extends Schema.Schema.Type<typeof StudioActor> {}\n\nexport const StudioRequestContext = Schema.Struct({\n actor: StudioActor,\n requestId: RequestId,\n}).annotate({ identifier: 'StudioRequestContext' })\n\nexport interface StudioRequestContext extends Schema.Schema.Type<typeof StudioRequestContext> {}\n\nexport const DOCUMENT_ACTIONS = [\n 'document.browse',\n 'document.read',\n 'document.trash',\n 'document.validate',\n 'document.create',\n 'document.update',\n 'document.move',\n 'document.remove',\n 'document.restore',\n 'document.undelete',\n 'document.publish',\n 'document.unpublish',\n 'document.duplicate',\n 'document.history',\n 'document.transfer',\n] as const\n\nconst DocumentAction = Schema.Literals(DOCUMENT_ACTIONS)\n\nconst DocumentCatalogResource = Schema.Struct({\n kind: Schema.tag('catalog'),\n})\n\nconst CollectionResource = Schema.Struct({\n kind: Schema.tag('collection'),\n collection: CollectionName,\n locale: Schema.optionalKey(Locale),\n})\n\nconst DocumentResource = Schema.Struct({\n kind: Schema.tag('document'),\n documentId: DocumentId,\n})\n\nconst DocumentAccessResource = Schema.Union([DocumentCatalogResource, CollectionResource, DocumentResource]).pipe(\n Schema.toTaggedUnion('kind'),\n)\n\nexport const DocumentAccessDecision = Schema.Struct({\n action: DocumentAction,\n resource: DocumentAccessResource,\n}).annotate({ identifier: 'DocumentAccessDecision' })\n\nexport interface DocumentAccessDecision extends Schema.Schema.Type<typeof DocumentAccessDecision> {}\n\nexport const MEDIA_ACTIONS = [\n 'media.read',\n 'media.search',\n 'media.integrity',\n 'media.upload',\n 'media.replace',\n 'media.remove',\n 'media.cleanup',\n] as const\n\nconst MediaAction = Schema.Literals(MEDIA_ACTIONS)\n\nconst MediaCatalogResource = Schema.Struct({\n kind: Schema.tag('media-catalog'),\n})\n\nconst MediaAssetResource = Schema.Struct({\n kind: Schema.tag('media-asset'),\n mediaId: MediaId,\n})\n\nconst MediaFolderResource = Schema.Struct({\n kind: Schema.tag('media-folder'),\n folder: MediaFolder,\n})\n\nconst MediaResource = Schema.Union([MediaCatalogResource, MediaAssetResource, MediaFolderResource]).pipe(\n Schema.toTaggedUnion('kind'),\n)\n\nexport const MediaAccessDecision = Schema.Struct({\n action: MediaAction,\n resource: MediaResource,\n}).annotate({ identifier: 'MediaAccessDecision' })\n\nexport interface MediaAccessDecision extends Schema.Schema.Type<typeof MediaAccessDecision> {}\n\nconst ActivityResource = Schema.Struct({\n kind: Schema.tag('activity'),\n})\n\nconst ActivityAccessDecision = Schema.Struct({\n action: Schema.Literal('activity.read'),\n resource: ActivityResource,\n}).annotate({ identifier: 'ActivityAccessDecision' })\n\nexport const SEO_ACTIONS = ['seo.read', 'seo.save', 'seo.publish'] as const\n\nconst SeoAction = Schema.Literals(SEO_ACTIONS)\n\nconst SeoResource = Schema.Struct({ kind: Schema.tag('seo') })\n\nexport const SeoAccessDecision = Schema.Struct({\n action: SeoAction,\n resource: SeoResource,\n}).annotate({ identifier: 'SeoAccessDecision' })\n\nexport interface SeoAccessDecision extends Schema.Schema.Type<typeof SeoAccessDecision> {}\n\nconst STUDIO_ACTIONS = [...DOCUMENT_ACTIONS, ...MEDIA_ACTIONS, ...SEO_ACTIONS, 'activity.read'] as const\n\nexport const StudioAction = Schema.Literals(STUDIO_ACTIONS)\n\nexport type StudioAction = typeof StudioAction.Type\n\nconst StudioResource = Schema.Union([DocumentAccessResource, MediaResource, ActivityResource, SeoResource])\n\nexport const StudioAccessDecision = Schema.Union([\n DocumentAccessDecision,\n MediaAccessDecision,\n ActivityAccessDecision,\n SeoAccessDecision,\n])\n\nexport type StudioAccessDecision = typeof StudioAccessDecision.Type\n\nexport class AuthenticationRequired extends Schema.TaggedError<AuthenticationRequired>()(\n 'Studio.AuthenticationRequired',\n {},\n) {}\n\nexport class StudioEntryDenied extends Schema.TaggedError<StudioEntryDenied>()('Studio.EntryDenied', {}) {}\n\nexport class AccessDenied extends Schema.TaggedError<AccessDenied>()('Studio.AccessDenied', {\n action: StudioAction,\n actorId: StudioActor.fields.id,\n resource: StudioResource,\n}) {}\n","import { DateTime, Option, Schema } from 'effect'\nimport { StudioActor } from './AccessControl'\nimport { MediaId } from './Media'\nimport { Locale } from './internal/configuration/scalars'\nimport { PublicPath } from './internal/documents/scalars'\n\nconst absoluteUrl = Schema.makeFilter<string>(\n (value) => {\n try {\n const url = new URL(value)\n\n return url.protocol === 'http:' || url.protocol === 'https:'\n } catch {\n return false\n }\n },\n { expected: 'an absolute HTTP or HTTPS URL' },\n)\n\nconst canonicalOrigin = Schema.makeFilter<string>(\n (value) => {\n try {\n const url = new URL(value)\n\n return (\n (url.protocol === 'http:' || url.protocol === 'https:') &&\n url.origin === value &&\n url.pathname === '/' &&\n url.search === '' &&\n url.hash === ''\n )\n } catch {\n return false\n }\n },\n { expected: 'an HTTP or HTTPS origin without a path, query, hash, or trailing slash' },\n)\n\nconst titleTemplate = Schema.makeFilter<string>((value) => value.includes('%s'), {\n expected: 'a title template containing %s',\n})\n\nconst calendarDate = Schema.makeFilter<string>(\n (value) => {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/u.test(value)) return false\n const parsed = DateTime.make(value)\n\n return Option.isSome(parsed) && DateTime.formatIsoDate(parsed.value) === value\n },\n { expected: 'a valid calendar date in YYYY-MM-DD format' },\n)\n\nexport const SeoUrl = Schema.NonEmptyString.check(absoluteUrl).pipe(Schema.brand('SeoUrl'))\n\nexport type SeoUrl = typeof SeoUrl.Type\n\nexport const SeoCanonicalOrigin = Schema.NonEmptyString.check(canonicalOrigin).pipe(Schema.brand('SeoCanonicalOrigin'))\n\nexport type SeoCanonicalOrigin = typeof SeoCanonicalOrigin.Type\n\nexport const SeoImage = Schema.Struct({\n mediaId: MediaId,\n url: SeoUrl,\n alt: Schema.NonEmptyString,\n}).annotate({ identifier: 'SeoImage' })\n\nexport interface SeoImage extends Schema.Schema.Type<typeof SeoImage> {}\n\nexport const StructuredDataType = Schema.Literals(['WebPage', 'Article'])\n\nexport type StructuredDataType = typeof StructuredDataType.Type\n\nconst WebPageStructuredData = Schema.Struct({\n type: Schema.tag('WebPage'),\n})\n\nconst ArticleStructuredData = Schema.Struct({\n type: Schema.tag('Article'),\n headline: Schema.optionalKey(Schema.NonEmptyString),\n datePublished: Schema.optionalKey(Schema.String.check(calendarDate)),\n dateModified: Schema.optionalKey(Schema.String.check(calendarDate)),\n})\n\nexport const DocumentStructuredData = Schema.Union([WebPageStructuredData, ArticleStructuredData]).pipe(\n Schema.toTaggedUnion('type'),\n)\n\nexport type DocumentStructuredData = typeof DocumentStructuredData.Type\n\nexport const IdentityType = Schema.Literals(['Person', 'Organization', 'LocalBusiness'])\n\nexport type IdentityType = typeof IdentityType.Type\n\nconst identityFields = {\n name: Schema.NonEmptyString,\n url: Schema.optionalKey(SeoUrl),\n}\n\nconst PersonIdentity = Schema.Struct({\n type: Schema.tag('Person'),\n ...identityFields,\n image: Schema.optionalKey(SeoImage),\n})\n\nconst OrganizationIdentity = Schema.Struct({\n type: Schema.tag('Organization'),\n ...identityFields,\n logo: Schema.optionalKey(SeoImage),\n})\n\nexport const PostalAddress = Schema.Struct({\n streetAddress: Schema.optionalKey(Schema.NonEmptyString),\n addressLocality: Schema.optionalKey(Schema.NonEmptyString),\n addressRegion: Schema.optionalKey(Schema.NonEmptyString),\n postalCode: Schema.optionalKey(Schema.NonEmptyString),\n addressCountry: Schema.optionalKey(Schema.NonEmptyString),\n}).annotate({ identifier: 'PostalAddress' })\n\nexport interface PostalAddress extends Schema.Schema.Type<typeof PostalAddress> {}\n\nconst LocalBusinessIdentity = Schema.Struct({\n type: Schema.tag('LocalBusiness'),\n ...identityFields,\n logo: Schema.optionalKey(SeoImage),\n image: Schema.optionalKey(SeoImage),\n telephone: Schema.optionalKey(Schema.NonEmptyString),\n address: Schema.optionalKey(PostalAddress),\n})\n\nexport const SiteIdentity = Schema.Union([PersonIdentity, OrganizationIdentity, LocalBusinessIdentity]).pipe(\n Schema.toTaggedUnion('type'),\n)\n\nexport type SiteIdentity = typeof SiteIdentity.Type\n\nexport const DocumentSeo = Schema.Struct({\n title: Schema.optionalKey(Schema.NonEmptyString),\n description: Schema.optionalKey(Schema.NonEmptyString),\n socialTitle: Schema.optionalKey(Schema.NonEmptyString),\n socialDescription: Schema.optionalKey(Schema.NonEmptyString),\n socialImage: Schema.optionalKey(SeoImage),\n index: Schema.optionalKey(Schema.Boolean),\n follow: Schema.optionalKey(Schema.Boolean),\n canonicalUrl: Schema.optionalKey(SeoUrl),\n structuredData: Schema.optionalKey(DocumentStructuredData),\n}).annotate({ identifier: 'DocumentSeo' })\n\nexport interface DocumentSeo extends Schema.Schema.Type<typeof DocumentSeo> {}\n\nexport const GlobalSeoSettings = Schema.Struct({\n siteName: Schema.NonEmptyString,\n defaultDescription: Schema.optionalKey(Schema.NonEmptyString),\n canonicalOrigin: SeoCanonicalOrigin,\n titleTemplate: Schema.optionalKey(Schema.NonEmptyString.check(titleTemplate)),\n socialTitle: Schema.optionalKey(Schema.NonEmptyString),\n socialDescription: Schema.optionalKey(Schema.NonEmptyString),\n socialImage: Schema.optionalKey(SeoImage),\n index: Schema.Boolean,\n follow: Schema.Boolean,\n identity: Schema.optionalKey(SiteIdentity),\n}).annotate({ identifier: 'GlobalSeoSettings' })\n\nexport interface GlobalSeoSettings extends Schema.Schema.Type<typeof GlobalSeoSettings> {}\n\nexport const SeoCapabilities = Schema.Struct({\n structuredDataTypes: Schema.Array(StructuredDataType),\n identityTypes: Schema.Array(IdentityType),\n generatedSocialImageTemplateIds: Schema.Array(Schema.NonEmptyString),\n}).annotate({ identifier: 'SeoCapabilities' })\n\nexport interface SeoCapabilities extends Schema.Schema.Type<typeof SeoCapabilities> {}\n\nexport const SeoConfiguration = Schema.Struct({\n defaults: GlobalSeoSettings,\n capabilities: SeoCapabilities,\n}).annotate({ identifier: 'SeoConfiguration' })\n\nexport interface SeoConfiguration extends Schema.Schema.Type<typeof SeoConfiguration> {}\n\nexport const ResolvedSeo = Schema.Struct({\n title: Schema.NonEmptyString,\n description: Schema.optionalKey(Schema.NonEmptyString),\n socialTitle: Schema.NonEmptyString,\n socialDescription: Schema.optionalKey(Schema.NonEmptyString),\n socialImage: Schema.optionalKey(SeoImage),\n canonicalUrl: SeoUrl,\n index: Schema.Boolean,\n follow: Schema.Boolean,\n structuredData: Schema.optionalKey(DocumentStructuredData),\n identity: Schema.optionalKey(SiteIdentity),\n}).annotate({ identifier: 'ResolvedSeo' })\n\nexport interface ResolvedSeo extends Schema.Schema.Type<typeof ResolvedSeo> {}\n\nexport const SeoVersion = Schema.NonEmptyString.pipe(Schema.brand('SeoVersion'))\n\nexport type SeoVersion = typeof SeoVersion.Type\n\nexport const SeoRevisionId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand('SeoRevisionId'))\n\nexport type SeoRevisionId = typeof SeoRevisionId.Type\n\nexport const SeoRevision = Schema.Struct({\n revisionId: SeoRevisionId,\n version: SeoVersion,\n settings: GlobalSeoSettings,\n editedBy: StudioActor,\n editedAt: Schema.DateTimeUtcFromString,\n}).annotate({ identifier: 'SeoRevision' })\n\nexport interface SeoRevision extends Schema.Schema.Type<typeof SeoRevision> {}\n\nexport const SeoState = Schema.Struct({\n working: SeoRevision,\n published: Schema.optionalKey(SeoRevision),\n capabilities: SeoCapabilities,\n}).annotate({ identifier: 'SeoState' })\n\nexport interface SeoState extends Schema.Schema.Type<typeof SeoState> {}\n\nexport const SeoSnapshot = Schema.Struct({\n revision: SeoRevision,\n capabilities: SeoCapabilities,\n}).annotate({ identifier: 'SeoSnapshot' })\n\nexport interface SeoSnapshot extends Schema.Schema.Type<typeof SeoSnapshot> {}\n\nconst mutationMetadata = {\n reason: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(1_000))),\n confirmedSiteWideChange: Schema.optionalKey(Schema.Boolean),\n}\n\nexport const SaveSeoInput = Schema.Struct({\n expectedVersion: SeoVersion,\n settings: GlobalSeoSettings,\n ...mutationMetadata,\n}).annotate({ identifier: 'SaveSeoInput' })\n\nexport interface SaveSeoInput extends Schema.Schema.Type<typeof SaveSeoInput> {}\n\nexport const PublishSeoInput = Schema.Struct({\n expectedVersion: SeoVersion,\n ...mutationMetadata,\n}).annotate({ identifier: 'PublishSeoInput' })\n\nexport interface PublishSeoInput extends Schema.Schema.Type<typeof PublishSeoInput> {}\n\nexport const SeoMutationResult = Schema.Struct({\n action: Schema.Literals(['seo.save', 'seo.publish']),\n state: SeoState,\n}).annotate({ identifier: 'SeoMutationResult' })\n\nexport interface SeoMutationResult extends Schema.Schema.Type<typeof SeoMutationResult> {}\n\nexport const SitemapAlternative = Schema.Struct({\n locale: Locale,\n loc: PublicPath,\n}).annotate({ identifier: 'SitemapAlternative' })\n\nexport interface SitemapAlternative extends Schema.Schema.Type<typeof SitemapAlternative> {}\n\nexport const SitemapEntry = Schema.Struct({\n loc: PublicPath,\n lastmod: Schema.DateTimeUtcFromString,\n alternatives: Schema.optionalKey(Schema.Array(SitemapAlternative)),\n}).annotate({ identifier: 'SitemapEntry' })\n\nexport interface SitemapEntry extends Schema.Schema.Type<typeof SitemapEntry> {}\n\nexport const SeoConfirmationChange = Schema.Literals(['canonicalOrigin', 'indexability'])\n\nexport type SeoConfirmationChange = typeof SeoConfirmationChange.Type\n\nexport class SeoVersionConflict extends Schema.TaggedError<SeoVersionConflict>()('Seo.VersionConflict', {\n expectedVersion: SeoVersion,\n actualVersion: SeoVersion,\n}) {}\n\nexport class SeoConfirmationRequired extends Schema.TaggedError<SeoConfirmationRequired>()('Seo.ConfirmationRequired', {\n changes: Schema.Array(SeoConfirmationChange),\n}) {}\n\nexport class SeoMediaUnavailable extends Schema.TaggedError<SeoMediaUnavailable>()('Seo.MediaUnavailable', {\n mediaId: MediaId,\n}) {}\n","import { Schema } from 'effect'\nimport { StudioActor } from '../../AccessControl'\nimport { CollectionName, Locale } from '../configuration/scalars'\nimport { nonNegativeInt } from '../scalars'\nimport { DocumentSeo, ResolvedSeo } from '../../Seo'\nimport { DocumentGeneration, DocumentVersion, DocumentId, PublicPath, RevisionId, Slug } from './scalars'\n\nexport const DocumentIssueCode = Schema.Literals([\n 'document.collision',\n 'document.id',\n 'document.invalid',\n 'i18n.missing-translation',\n 'markdown.parse',\n 'reference.document',\n 'reference.component',\n 'reference.media',\n 'seo.invalid',\n 'schema.option',\n 'schema.constraint',\n 'schema.required',\n 'schema.type',\n 'schema.unknown',\n])\n\nexport type DocumentIssueCode = typeof DocumentIssueCode.Type\n\nexport const DocumentIssue = Schema.Struct({\n code: DocumentIssueCode,\n severity: Schema.Literals(['error', 'warning']),\n message: Schema.NonEmptyString,\n component: Schema.optionalKey(Schema.NonEmptyString),\n documentId: Schema.optionalKey(DocumentId),\n collection: Schema.optionalKey(CollectionName),\n field: Schema.optionalKey(Schema.NonEmptyString),\n key: Schema.optionalKey(PublicPath),\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentIssue' })\n\nexport interface DocumentIssue extends Schema.Schema.Type<typeof DocumentIssue> {}\n\nexport const DocumentSourcePoint = Schema.Struct({\n offset: nonNegativeInt,\n line: nonNegativeInt,\n column: nonNegativeInt,\n})\n\nexport interface DocumentSourcePoint extends Schema.Schema.Type<typeof DocumentSourcePoint> {}\n\nexport const DocumentSourceRange = Schema.Struct({\n start: DocumentSourcePoint,\n end: DocumentSourcePoint,\n})\n\nexport interface DocumentSourceRange extends Schema.Schema.Type<typeof DocumentSourceRange> {}\n\nexport const DocumentSourceMapping = Schema.Struct({\n nodePath: Schema.Array(nonNegativeInt),\n range: DocumentSourceRange,\n})\n\nexport interface DocumentSourceMapping extends Schema.Schema.Type<typeof DocumentSourceMapping> {}\n\nexport type MarkdownNode =\n | string\n | readonly [null, Schema.JsonObject, string]\n | readonly [string, Schema.JsonObject, ...MarkdownNode[]]\n\nexport const MarkdownNode: Schema.Codec<MarkdownNode> = Schema.suspend(() =>\n Schema.Union([\n Schema.String,\n Schema.Tuple([Schema.Null, Schema.JsonObject, Schema.String]),\n Schema.TupleWithRest(Schema.Tuple([Schema.NonEmptyString, Schema.JsonObject]), [MarkdownNode]),\n ]),\n)\n\nexport const CmsMarkdownDocument = Schema.Struct({\n nodes: Schema.Array(MarkdownNode),\n frontmatter: Schema.JsonObject,\n meta: Schema.JsonObject,\n}).annotate({ identifier: 'CmsMarkdownDocument' })\n\nexport interface CmsMarkdownDocument extends Schema.Schema.Type<typeof CmsMarkdownDocument> {}\n\nexport const CmsDocumentHeading = Schema.Struct({\n depth: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 6 })),\n id: Schema.String,\n text: Schema.String,\n})\n\nexport interface CmsDocumentHeading extends Schema.Schema.Type<typeof CmsDocumentHeading> {}\n\nexport const CmsDocumentAnalysis = Schema.Struct({\n components: Schema.Array(Schema.NonEmptyString),\n headings: Schema.Array(CmsDocumentHeading),\n searchText: Schema.String,\n summary: Schema.String,\n})\n\nexport interface CmsDocumentAnalysis extends Schema.Schema.Type<typeof CmsDocumentAnalysis> {}\n\nexport const CompiledDocumentSource = Schema.Struct({\n mappings: Schema.Array(DocumentSourceMapping),\n publishedAt: Schema.optionalKey(Schema.DateTimeUtcFromString),\n})\n\nexport interface CompiledDocumentSource extends Schema.Schema.Type<typeof CompiledDocumentSource> {}\n\nexport const DocumentIdentity = Schema.Struct({\n documentId: DocumentId,\n collection: CollectionName,\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentIdentity' })\n\nexport interface DocumentIdentity extends Schema.Schema.Type<typeof DocumentIdentity> {}\n\nexport const HomeDocumentPlacement = Schema.Struct({\n kind: Schema.tag('home'),\n})\n\nexport interface HomeDocumentPlacement extends Schema.Schema.Type<typeof HomeDocumentPlacement> {}\n\nexport const NestedDocumentPlacement = Schema.Struct({\n kind: Schema.tag('entry'),\n parentDocumentId: DocumentId,\n slug: Slug,\n})\n\nexport interface NestedDocumentPlacement extends Schema.Schema.Type<typeof NestedDocumentPlacement> {}\n\nexport const DocumentPlacement = Schema.Union([HomeDocumentPlacement, NestedDocumentPlacement]).pipe(\n Schema.toTaggedUnion('kind'),\n)\n\nexport type DocumentPlacement = typeof DocumentPlacement.Type\n\nexport const DocumentAlternative = Schema.Struct({\n locale: Locale,\n path: PublicPath,\n})\n\nexport interface DocumentAlternative extends Schema.Schema.Type<typeof DocumentAlternative> {}\n\nexport const CompiledDocument = Schema.Struct({\n id: DocumentId,\n identity: DocumentIdentity,\n placement: DocumentPlacement,\n key: PublicPath,\n path: PublicPath,\n locale: Schema.optionalKey(Locale),\n collection: CollectionName,\n draft: Schema.Boolean,\n title: Schema.NonEmptyString,\n description: Schema.optionalKey(Schema.String),\n seo: Schema.optionalKey(DocumentSeo),\n resolvedSeo: Schema.optionalKey(ResolvedSeo),\n alternatives: Schema.optionalKey(Schema.Array(DocumentAlternative)),\n data: Schema.JsonObject,\n issues: Schema.Array(DocumentIssue),\n analysis: CmsDocumentAnalysis,\n body: CmsMarkdownDocument,\n engineFingerprint: Schema.NonEmptyString,\n source: CompiledDocumentSource,\n}).annotate({ identifier: 'CompiledDocument' })\n\nexport interface CompiledDocument extends Schema.Schema.Type<typeof CompiledDocument> {}\n\nexport const DocumentSummaryDocument = Schema.Struct({\n id: DocumentId,\n identity: DocumentIdentity,\n placement: DocumentPlacement,\n key: PublicPath,\n path: PublicPath,\n locale: Schema.optionalKey(Locale),\n collection: CollectionName,\n draft: Schema.Boolean,\n title: Schema.NonEmptyString,\n issues: Schema.Array(DocumentIssue),\n searchText: Schema.String,\n}).annotate({ identifier: 'DocumentSummaryDocument' })\n\nexport interface DocumentSummaryDocument extends Schema.Schema.Type<typeof DocumentSummaryDocument> {}\n\nconst documentAttribution = {\n createdBy: Schema.optionalKey(StudioActor),\n editedBy: Schema.optionalKey(StudioActor),\n editedAt: Schema.optionalKey(Schema.DateTimeUtcFromString),\n}\n\nexport const DocumentSource = Schema.Struct({\n ...documentAttribution,\n documentId: DocumentId,\n identity: DocumentIdentity,\n placement: DocumentPlacement,\n markdown: Schema.String,\n revisionId: RevisionId,\n version: DocumentVersion,\n publishedVersion: Schema.optionalKey(DocumentVersion),\n}).annotate({ identifier: 'DocumentSource' })\n\nexport interface DocumentSource extends Schema.Schema.Type<typeof DocumentSource> {}\n\nexport const DocumentSummary = Schema.Struct({\n ...documentAttribution,\n publishedVersion: Schema.optionalKey(DocumentVersion),\n publishedPath: Schema.optionalKey(PublicPath),\n version: DocumentVersion,\n document: DocumentSummaryDocument,\n}).annotate({ identifier: 'DocumentSummary' })\n\nexport interface DocumentSummary extends Schema.Schema.Type<typeof DocumentSummary> {}\n\nexport const DeletedDocument = Schema.Struct({\n title: Schema.optionalKey(Schema.String),\n path: Schema.optionalKey(PublicPath),\n trashBatchId: Schema.optionalKey(DocumentVersion),\n documentId: DocumentId,\n identity: DocumentIdentity,\n placement: DocumentPlacement,\n deletedAt: Schema.DateTimeUtcFromString,\n version: DocumentVersion,\n}).annotate({ identifier: 'DeletedDocument' })\n\nexport interface DeletedDocument extends Schema.Schema.Type<typeof DeletedDocument> {}\n\nexport const DocumentBrowseQuery = Schema.Struct({\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentBrowseQuery' })\n\nexport interface DocumentBrowseQuery extends Schema.Schema.Type<typeof DocumentBrowseQuery> {}\n\nexport const PublishedDocumentLookup = Schema.Union([\n Schema.Struct({\n kind: Schema.tag('id'),\n documentId: DocumentId,\n }),\n Schema.Struct({\n kind: Schema.tag('path'),\n path: PublicPath,\n }),\n Schema.Struct({\n kind: Schema.tag('key'),\n key: PublicPath,\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n }),\n]).pipe(Schema.toTaggedUnion('kind'))\n\nexport type PublishedDocumentLookup = typeof PublishedDocumentLookup.Type\n\nexport const DocumentQueryScalar = Schema.Union([Schema.String, Schema.Finite, Schema.Boolean, Schema.Null])\n\nexport type DocumentQueryScalar = typeof DocumentQueryScalar.Type\n\nconst validDocumentQueryField = Schema.makeFilter<string>(\n (field) => {\n const segments = field.split('.')\n\n return field.length <= 200 && segments.length <= 8 && segments.every((segment) => segment.length > 0)\n },\n { expected: 'a non-empty field path of at most 200 characters and eight non-empty segments' },\n)\n\nexport const DocumentQueryField = Schema.NonEmptyString.check(validDocumentQueryField)\n\nexport type DocumentQueryField = typeof DocumentQueryField.Type\n\nexport const DocumentQueryValue = Schema.Union([\n DocumentQueryScalar,\n Schema.Array(DocumentQueryScalar).check(Schema.isMaxLength(20)),\n])\n\nexport type DocumentQueryValue = typeof DocumentQueryValue.Type\n\nexport const DocumentQuerySort = Schema.Struct({\n field: DocumentQueryField,\n direction: Schema.optionalKey(Schema.Literals(['asc', 'desc'])),\n})\n\nexport interface DocumentQuerySort extends Schema.Schema.Type<typeof DocumentQuerySort> {}\n\nconst DocumentQueryWhere = Schema.Record(Schema.String, DocumentQueryValue).check(\n Schema.makeFilter((where) => Object.keys(where).every((field) => Schema.is(DocumentQueryField)(field)), {\n expected: 'document query keys with valid bounded field paths',\n }),\n Schema.makeFilter((where) => Object.keys(where).length <= 12, {\n expected: 'at most 12 document query filters',\n }),\n)\n\nexport const PublishedDocumentSelection = Schema.Struct({\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n where: Schema.optionalKey(DocumentQueryWhere),\n sort: Schema.optionalKey(Schema.Array(DocumentQuerySort).check(Schema.isMaxLength(4))),\n}).annotate({ identifier: 'PublishedDocumentSelection' })\n\nexport interface PublishedDocumentSelection extends Schema.Schema.Type<typeof PublishedDocumentSelection> {}\n\nexport const PublishedDocumentQuery = Schema.Struct({\n ...PublishedDocumentSelection.fields,\n offset: Schema.optionalKey(nonNegativeInt),\n limit: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 })),\n}).annotate({ identifier: 'PublishedDocumentQuery' })\n\nexport interface PublishedDocumentQuery extends Schema.Schema.Type<typeof PublishedDocumentQuery> {}\n\nexport const PublishedDocumentSurroundQuery = Schema.Struct({\n ...PublishedDocumentSelection.fields,\n}).annotate({ identifier: 'PublishedDocumentSurroundQuery' })\n\nexport interface PublishedDocumentSurroundQuery extends Schema.Schema.Type<typeof PublishedDocumentSurroundQuery> {}\n\nexport const PublishedDocumentPage = Schema.Struct({\n items: Schema.Array(CompiledDocument),\n total: nonNegativeInt,\n}).annotate({ identifier: 'PublishedDocumentPage' })\n\nexport interface PublishedDocumentPage extends Schema.Schema.Type<typeof PublishedDocumentPage> {}\n\nexport const DocumentNavigationQuery = Schema.Struct({\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentNavigationQuery' })\n\nexport interface DocumentNavigationQuery extends Schema.Schema.Type<typeof DocumentNavigationQuery> {}\n\nconst documentMutationMetadata = {\n reason: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(1_000))),\n}\n\nexport interface DocumentNavigationItem {\n readonly key: PublicPath\n readonly title: string\n readonly path?: PublicPath\n readonly locale?: Locale\n readonly documentId?: DocumentId\n readonly children: ReadonlyArray<DocumentNavigationItem>\n}\n\ninterface DocumentNavigationItemEncoded {\n readonly key: string\n readonly title: string\n readonly path?: string\n readonly locale?: string\n readonly documentId?: string\n readonly children: ReadonlyArray<DocumentNavigationItemEncoded>\n}\n\nexport const DocumentNavigationItem: Schema.Codec<DocumentNavigationItem, DocumentNavigationItemEncoded> =\n Schema.suspend(() =>\n Schema.Struct({\n key: PublicPath,\n title: Schema.NonEmptyString,\n path: Schema.optionalKey(PublicPath),\n locale: Schema.optionalKey(Locale),\n documentId: Schema.optionalKey(DocumentId),\n children: Schema.Array(DocumentNavigationItem),\n }),\n )\n\nexport const DocumentSurround = Schema.Struct({\n previous: Schema.NullOr(CompiledDocument),\n next: Schema.NullOr(CompiledDocument),\n}).annotate({ identifier: 'DocumentSurround' })\n\nexport interface DocumentSurround extends Schema.Schema.Type<typeof DocumentSurround> {}\n\nexport const CreateDocumentInput = Schema.Struct({\n collection: CollectionName,\n locale: Schema.optionalKey(Locale),\n placement: DocumentPlacement,\n title: Schema.NonEmptyString,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'CreateDocumentInput' })\n\nexport interface CreateDocumentInput extends Schema.Schema.Type<typeof CreateDocumentInput> {}\n\nexport const UpdateDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n markdown: Schema.String,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'UpdateDocumentInput' })\n\nexport interface UpdateDocumentInput extends Schema.Schema.Type<typeof UpdateDocumentInput> {}\n\nexport const MoveDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n placement: DocumentPlacement,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'MoveDocumentInput' })\n\nexport interface MoveDocumentInput extends Schema.Schema.Type<typeof MoveDocumentInput> {}\n\nexport const DuplicateDocumentInput = Schema.Struct({\n ...MoveDocumentInput.fields,\n includeChildren: Schema.Boolean,\n /** Copies into another independent locale variant when supplied. */\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DuplicateDocumentInput' })\n\nexport interface DuplicateDocumentInput extends Schema.Schema.Type<typeof DuplicateDocumentInput> {}\n\nexport const UnpublishDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'UnpublishDocumentInput' })\n\nexport interface UnpublishDocumentInput extends Schema.Schema.Type<typeof UnpublishDocumentInput> {}\n\nexport const RemoveDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'RemoveDocumentInput' })\n\nexport interface RemoveDocumentInput extends Schema.Schema.Type<typeof RemoveDocumentInput> {}\n\nexport const PublishDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'PublishDocumentInput' })\n\nexport interface PublishDocumentInput extends Schema.Schema.Type<typeof PublishDocumentInput> {}\n\nexport const RestoreDocumentInput = Schema.Struct({\n documentId: DocumentId,\n revisionId: RevisionId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'RestoreDocumentInput' })\n\nexport interface RestoreDocumentInput extends Schema.Schema.Type<typeof RestoreDocumentInput> {}\n\nexport const UndeleteDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'UndeleteDocumentInput' })\n\nexport interface UndeleteDocumentInput extends Schema.Schema.Type<typeof UndeleteDocumentInput> {}\n\nexport const DOCUMENT_REVISION_ACTIONS = [\n 'document.create',\n 'document.move',\n 'document.remove',\n 'document.restore',\n 'document.undelete',\n 'document.update',\n] as const\n\nexport const DocumentRevisionAction = Schema.Literals(DOCUMENT_REVISION_ACTIONS)\n\nexport type DocumentRevisionAction = typeof DocumentRevisionAction.Type\n\nexport const DocumentMutationAction = Schema.Literals([\n ...DOCUMENT_REVISION_ACTIONS,\n 'document.publish',\n 'document.unpublish',\n])\n\nexport type DocumentMutationAction = typeof DocumentMutationAction.Type\n\nexport const DocumentMutationResult = Schema.Struct({\n action: DocumentMutationAction,\n affectedDocumentIds: Schema.optionalKey(Schema.Array(DocumentId)),\n documentId: DocumentId,\n generation: DocumentGeneration,\n revisionId: RevisionId,\n version: DocumentVersion,\n entry: Schema.optionalKey(DocumentSummary),\n}).annotate({ identifier: 'DocumentMutationResult' })\n\nexport interface DocumentMutationResult extends Schema.Schema.Type<typeof DocumentMutationResult> {}\n\nexport const DocumentValidationResult = Schema.Struct({\n valid: Schema.Boolean,\n document: Schema.optionalKey(CompiledDocument),\n issues: Schema.Array(DocumentIssue),\n}).annotate({ identifier: 'DocumentValidationResult' })\n\nexport interface DocumentValidationResult extends Schema.Schema.Type<typeof DocumentValidationResult> {}\n"],"mappings":";;;;;AAEA,MAAa,YAAY,OAAO,OAAO,MAAM,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,WAAW,CAAC;;;;ACC5F,MAAM,wBAAwB;AAE9B,MAAM,gBAAgB;AAEtB,MAAa,eAAe,OAAO,OAAO,MAAM,OAAO,UAAU,iBAAiB,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,cAAc,CAAC;AAItH,MAAa,iBAAiB,OAAO,OAAO,MAAM,OAAO,UAAU,qBAAqB,CAAC,CAAC,CAAC,KACzF,OAAO,MAAM,gBAAgB,CAC/B;AAIA,MAAa,SAAS,OAAO,OAAO,MAAM,OAAO,UAAU,aAAa,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,QAAQ,CAAC;;;;ACXtG,MAAa,QAAQ;CAAC;CAAiB;CAAU;AAAQ;AAEzD,MAAa,OAAO,OAAO,SAAS,KAAK;AAIzC,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,MAAa,yBAAyB,OAAO,OAAO;CAClD,QAAQ;CACR,qBAAqB,OAAO,YAAY,OAAO,MAAM,UAAU,CAAC;CAChE,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,OAAO,OAAO,YAAY,eAAe;AAC3C,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,yBAAyB,CAAC;AAIpD,MAAa,2BAA2B,OAAO,OAAO;CACpD,OAAO,OAAO;CACd,UAAU,OAAO,YAAY,gBAAgB;CAC7C,QAAQ,OAAO,MAAM,aAAa;AACpC,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","names":[],"sources":["../../../../src/runtime/api.ts"],"sourcesContent":["import { defineEventHandler, toWebRequest } from 'h3'\nimport { useCmsInstallation } from './plugin'\n\nexport default defineEventHandler((event) =>\n useCmsInstallation().then((installation) => installation.fetch(toWebRequest(event))),\n)\n"],"mappings":";;;;AAGA,kBAAe,oBAAoB,UACjC,mBAAmB,CAAC,CAAC,MAAM,iBAAiB,aAAa,MAAM,aAAa,KAAK,CAAC,CAAC,CACrF"}
@@ -1,30 +0,0 @@
1
- import { usePreviewDelivery } from "./delivery/context.js";
2
- import { blockComponentsKey, formComponentsKey, formPreviewKey } from "./delivery/blocks.js";
3
- import { shallowRef } from "vue";
4
- import { defineNuxtPlugin } from "nuxt/app";
5
- import blocks from "#cms/blocks";
6
- import authoring from "#cms/authoring";
7
-
8
- //#region src/runtime/blocks.ts
9
- var blocks_default = defineNuxtPlugin({
10
- name: "cms-blocks",
11
- setup: (nuxtApp) => {
12
- nuxtApp.vueApp.provide(formPreviewKey, usePreviewDelivery());
13
- const components = shallowRef(blocks);
14
- const forms = shallowRef(authoring.components.filter((component) => component.authoring.form));
15
- nuxtApp.vueApp.provide(formComponentsKey, forms);
16
- nuxtApp.vueApp.provide(blockComponentsKey, components);
17
- if (import.meta.hot) {
18
- import.meta.hot.accept("#cms/authoring", (module) => {
19
- if (module) forms.value = module.default.components.filter((component) => component.authoring.form);
20
- });
21
- import.meta.hot.accept("#cms/blocks", (module) => {
22
- if (module) components.value = module.default;
23
- });
24
- }
25
- }
26
- });
27
-
28
- //#endregion
29
- export { blocks_default as default };
30
- //# sourceMappingURL=blocks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blocks.js","names":[],"sources":["../../../../src/runtime/blocks.ts"],"sourcesContent":["import { usePreviewDelivery } from './delivery/context'\nimport blocks from '#cms/blocks'\nimport authoring from '#cms/authoring'\nimport { defineNuxtPlugin } from 'nuxt/app'\nimport { shallowRef } from 'vue'\nimport { blockComponentsKey, formComponentsKey, formPreviewKey } from './delivery/blocks'\n\nexport default defineNuxtPlugin({\n name: 'cms-blocks',\n setup: (nuxtApp) => {\n nuxtApp.vueApp.provide(formPreviewKey, usePreviewDelivery())\n const components = shallowRef(blocks)\n const forms = shallowRef(authoring.components.filter((component) => component.authoring.form))\n nuxtApp.vueApp.provide(formComponentsKey, forms)\n nuxtApp.vueApp.provide(blockComponentsKey, components)\n\n if (import.meta.hot) {\n import.meta.hot.accept('#cms/authoring', (module) => {\n if (module)\n forms.value = module.default.components.filter(\n (component: import('@internal/protocol/Configuration').ComponentDefinition) => component.authoring.form,\n )\n })\n import.meta.hot.accept('#cms/blocks', (module) => {\n if (module) components.value = module.default\n })\n }\n },\n})\n"],"mappings":";;;;;;;;AAOA,qBAAe,iBAAiB;CAC9B,MAAM;CACN,QAAQ,YAAY;EAClB,QAAQ,OAAO,QAAQ,gBAAgB,mBAAmB,CAAC;EAC3D,MAAM,aAAa,WAAW,MAAM;EACpC,MAAM,QAAQ,WAAW,UAAU,WAAW,QAAQ,cAAc,UAAU,UAAU,IAAI,CAAC;EAC7F,QAAQ,OAAO,QAAQ,mBAAmB,KAAK;EAC/C,QAAQ,OAAO,QAAQ,oBAAoB,UAAU;EAErD,IAAI,YAAY,KAAK;GACnB,YAAY,IAAI,OAAO,mBAAmB,WAAW;IACnD,IAAI,QACF,MAAM,QAAQ,OAAO,QAAQ,WAAW,QACrC,cAA8E,UAAU,UAAU,IACrG;GACJ,CAAC;GACD,YAAY,IAAI,OAAO,gBAAgB,WAAW;IAChD,IAAI,QAAQ,WAAW,QAAQ,OAAO;GACxC,CAAC;EACH;CACF;AACF,CAAC"}
@@ -1,45 +0,0 @@
1
- import { useCmsInstallation } from "./plugin.js";
2
- import { defineWebSocketHandler } from "h3";
3
-
4
- //#region src/runtime/collaboration.ts
5
- const installations = /* @__PURE__ */ new WeakMap();
6
- var collaboration_default = defineWebSocketHandler({
7
- open(peer) {
8
- const installation = useCmsInstallation();
9
- installations.set(peer.websocket, installation);
10
- return installation.then((installation) => {
11
- const request = new Request(peer.request.url, { headers: peer.request.headers });
12
- installation.webSocket.open({
13
- request,
14
- socket: collaborationSocket(peer.websocket)
15
- });
16
- });
17
- },
18
- message(peer, message) {
19
- return installations.get(peer.websocket)?.then((installation) => {
20
- installation.webSocket.message(collaborationSocket(peer.websocket), message.uint8Array());
21
- });
22
- },
23
- close(peer, details) {
24
- const installation = installations.get(peer.websocket);
25
- installations.delete(peer.websocket);
26
- return installation?.then((installation) => {
27
- installation.webSocket.close(collaborationSocket(peer.websocket), {
28
- code: details.code,
29
- reason: details.reason
30
- });
31
- });
32
- },
33
- error(peer) {
34
- return installations.get(peer.websocket)?.then((installation) => {
35
- installation.webSocket.error(collaborationSocket(peer.websocket));
36
- });
37
- }
38
- });
39
- function collaborationSocket(socket) {
40
- return socket;
41
- }
42
-
43
- //#endregion
44
- export { collaboration_default as default };
45
- //# sourceMappingURL=collaboration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collaboration.js","names":[],"sources":["../../../../src/runtime/collaboration.ts"],"sourcesContent":["import type { CmsInstallation } from '@internal/platform-node/Installation'\nimport { defineWebSocketHandler } from 'h3'\nimport { useCmsInstallation } from './plugin'\n\ntype CollaborationSocket = Parameters<CmsInstallation['webSocket']['open']>[0]['socket']\n\ntype H3WebSocketHooks = Parameters<typeof defineWebSocketHandler>[0]\n\ntype H3Socket = Parameters<NonNullable<H3WebSocketHooks['open']>>[0]['websocket']\n\n// A socket belongs to the worker installation that accepted it, including during Nitro shutdown.\nconst installations = new WeakMap<H3Socket, Promise<CmsInstallation>>()\n\nexport default defineWebSocketHandler({\n open(peer) {\n const installation = useCmsInstallation()\n installations.set(peer.websocket, installation)\n\n return installation.then((installation) => {\n const request = new Request(peer.request.url, { headers: peer.request.headers })\n installation.webSocket.open({ request, socket: collaborationSocket(peer.websocket) })\n })\n },\n message(peer, message) {\n return installations.get(peer.websocket)?.then((installation) => {\n installation.webSocket.message(collaborationSocket(peer.websocket), message.uint8Array())\n })\n },\n close(peer, details) {\n const installation = installations.get(peer.websocket)\n installations.delete(peer.websocket)\n\n return installation?.then((installation) => {\n installation.webSocket.close(collaborationSocket(peer.websocket), {\n code: details.code,\n reason: details.reason,\n })\n })\n },\n error(peer) {\n return installations.get(peer.websocket)?.then((installation) => {\n installation.webSocket.error(collaborationSocket(peer.websocket))\n })\n },\n})\n\nfunction collaborationSocket(socket: H3Socket): CollaborationSocket {\n // SAFETY: crossws exposes the standard send/close/event WebSocket surface consumed by Hocuspocus.\n return socket as CollaborationSocket\n}\n"],"mappings":";;;;AAWA,MAAM,gCAAgB,IAAI,QAA4C;AAEtE,4BAAe,uBAAuB;CACpC,KAAK,MAAM;EACT,MAAM,eAAe,mBAAmB;EACxC,cAAc,IAAI,KAAK,WAAW,YAAY;EAE9C,OAAO,aAAa,MAAM,iBAAiB;GACzC,MAAM,UAAU,IAAI,QAAQ,KAAK,QAAQ,KAAK,EAAE,SAAS,KAAK,QAAQ,QAAQ,CAAC;GAC/E,aAAa,UAAU,KAAK;IAAE;IAAS,QAAQ,oBAAoB,KAAK,SAAS;GAAE,CAAC;EACtF,CAAC;CACH;CACA,QAAQ,MAAM,SAAS;EACrB,OAAO,cAAc,IAAI,KAAK,SAAS,CAAC,EAAE,MAAM,iBAAiB;GAC/D,aAAa,UAAU,QAAQ,oBAAoB,KAAK,SAAS,GAAG,QAAQ,WAAW,CAAC;EAC1F,CAAC;CACH;CACA,MAAM,MAAM,SAAS;EACnB,MAAM,eAAe,cAAc,IAAI,KAAK,SAAS;EACrD,cAAc,OAAO,KAAK,SAAS;EAEnC,OAAO,cAAc,MAAM,iBAAiB;GAC1C,aAAa,UAAU,MAAM,oBAAoB,KAAK,SAAS,GAAG;IAChE,MAAM,QAAQ;IACd,QAAQ,QAAQ;GAClB,CAAC;EACH,CAAC;CACH;CACA,MAAM,MAAM;EACV,OAAO,cAAc,IAAI,KAAK,SAAS,CAAC,EAAE,MAAM,iBAAiB;GAC/D,aAAa,UAAU,MAAM,oBAAoB,KAAK,SAAS,CAAC;EAClE,CAAC;CACH;AACF,CAAC;AAED,SAAS,oBAAoB,QAAuC;CAElE,OAAO;AACT"}
@@ -1,23 +0,0 @@
1
- import { defineComponent, h } from "vue";
2
-
3
- //#region src/runtime/delivery/DocumentField.ts
4
- var DocumentField_default = defineComponent({
5
- name: "DocumentField",
6
- props: {
7
- as: {
8
- default: "span",
9
- type: String
10
- },
11
- name: {
12
- required: true,
13
- type: String
14
- }
15
- },
16
- setup(props, { slots }) {
17
- return () => h(props.as, { "data-cms-field": props.name }, slots.default?.());
18
- }
19
- });
20
-
21
- //#endregion
22
- export { DocumentField_default as default };
23
- //# sourceMappingURL=DocumentField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentField.js","names":[],"sources":["../../../../../src/runtime/delivery/DocumentField.ts"],"sourcesContent":["import { defineComponent, h } from 'vue'\n\nexport default defineComponent({\n name: 'DocumentField',\n props: {\n as: { default: 'span', type: String },\n name: { required: true, type: String },\n },\n setup(props, { slots }) {\n return () => h(props.as, { 'data-cms-field': props.name }, slots.default?.())\n },\n})\n"],"mappings":";;;AAEA,4BAAe,gBAAgB;CAC7B,MAAM;CACN,OAAO;EACL,IAAI;GAAE,SAAS;GAAQ,MAAM;EAAO;EACpC,MAAM;GAAE,UAAU;GAAM,MAAM;EAAO;CACvC;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,aAAa,EAAE,MAAM,IAAI,EAAE,kBAAkB,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC;CAC9E;AACF,CAAC"}
@@ -1,61 +0,0 @@
1
- import { blockComponentsKey, formComponentsKey, formPreviewKey } from "./blocks.js";
2
- import { prepareFormDocument } from "../forms/document.js";
3
- import DocumentScope_default from "./DocumentScope.js";
4
- import CmsStudioPreviewMarker_default from "../preview/CmsStudioPreviewMarker.js";
5
- import { Predicate } from "effect";
6
- import { defineComponent, h, inject, shallowRef } from "vue";
7
- import { MarkdownDocument } from "@comark/vue";
8
-
9
- //#region src/runtime/delivery/DocumentRenderer.ts
10
- var DocumentRenderer_default = defineComponent({
11
- name: "DocumentRenderer",
12
- props: { value: {
13
- required: true,
14
- type: Object
15
- } },
16
- setup(props) {
17
- const formComponents = inject(formComponentsKey, shallowRef([]));
18
- const preview = inject(formPreviewKey, shallowRef(false));
19
- const components = inject(blockComponentsKey, shallowRef({}));
20
- return () => h(DocumentScope_default, {
21
- as: "article",
22
- role: "primary",
23
- value: props.value
24
- }, { default: ({ value }) => renderDocument(value, components.value, formComponents.value, preview.value) });
25
- }
26
- });
27
- function renderDocument(value, components = {}, forms = [], preview = false) {
28
- return h(MarkdownDocument, {
29
- components: preview ? {
30
- ...components,
31
- CmsStudioPreviewMarker: CmsStudioPreviewMarker_default
32
- } : components,
33
- documentKey: value.id,
34
- value: toComarkDocument(prepareFormDocument(value, forms, preview).body)
35
- });
36
- }
37
- function toComarkDocument(document) {
38
- return {
39
- frontmatter: { ...document.frontmatter },
40
- meta: { ...document.meta },
41
- nodes: document.nodes.map(toComarkNode)
42
- };
43
- }
44
- function toComarkNode(node) {
45
- if (Predicate.isString(node)) return node;
46
- if (node[0] === null) return [
47
- null,
48
- { ...node[1] },
49
- node[2]
50
- ];
51
- const [tag, attributes, ...children] = node;
52
- return [
53
- tag,
54
- { ...attributes },
55
- ...children.map(toComarkNode)
56
- ];
57
- }
58
-
59
- //#endregion
60
- export { DocumentRenderer_default as default, renderDocument };
61
- //# sourceMappingURL=DocumentRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentRenderer.js","names":["DocumentScope"],"sources":["../../../../../src/runtime/delivery/DocumentRenderer.ts"],"sourcesContent":["import { prepareFormDocument } from '../forms/document'\nimport type { ComponentDefinition } from '@internal/protocol/Configuration'\nimport type { Component, PropType } from 'vue'\nimport type { MarkdownDocument as ComarkDocument, Node as ComarkNode } from 'comark'\nimport type { DeliveryDocument, DeliveryMarkdownDocument, DeliveryMarkdownNode } from './types'\nimport { MarkdownDocument } from '@comark/vue'\nimport { Predicate } from 'effect'\nimport { defineComponent, h, inject, shallowRef } from 'vue'\nimport DocumentScope from './DocumentScope'\nimport CmsStudioPreviewMarker from '../preview/CmsStudioPreviewMarker'\nimport { blockComponentsKey, formComponentsKey, formPreviewKey } from './blocks'\n\nexport default defineComponent({\n name: 'DocumentRenderer',\n props: {\n // SAFETY: DeliveryDocument is an object contract, so Object is its matching Vue runtime constructor.\n value: { required: true, type: Object as PropType<DeliveryDocument> },\n },\n setup(props) {\n const formComponents = inject(formComponentsKey, shallowRef([]))\n const preview = inject(formPreviewKey, shallowRef(false))\n const components = inject(blockComponentsKey, shallowRef({}))\n\n return () =>\n h(\n DocumentScope,\n { as: 'article', role: 'primary', value: props.value },\n {\n default: ({ value }: { value: DeliveryDocument }) =>\n renderDocument(value, components.value, formComponents.value, preview.value),\n },\n )\n },\n})\n\nexport function renderDocument(\n value: DeliveryDocument,\n components: Record<string, Component> = {},\n forms: ReadonlyArray<ComponentDefinition> = [],\n preview = false,\n) {\n return h(MarkdownDocument, {\n components: preview ? { ...components, CmsStudioPreviewMarker } : components,\n documentKey: value.id,\n value: toComarkDocument(prepareFormDocument(value, forms, preview).body),\n })\n}\n\nfunction toComarkDocument(document: DeliveryMarkdownDocument): ComarkDocument {\n return {\n frontmatter: { ...document.frontmatter },\n meta: { ...document.meta },\n nodes: document.nodes.map(toComarkNode),\n }\n}\n\nfunction toComarkNode(node: DeliveryMarkdownNode): ComarkNode {\n if (Predicate.isString(node)) return node\n\n if (node[0] === null) return [null, { ...node[1] }, node[2]]\n const [tag, attributes, ...children] = node\n\n return [tag, { ...attributes }, ...children.map(toComarkNode)]\n}\n"],"mappings":";;;;;;;;;AAYA,+BAAe,gBAAgB;CAC7B,MAAM;CACN,OAAO,EAEL,OAAO;EAAE,UAAU;EAAM,MAAM;CAAqC,EACtE;CACA,MAAM,OAAO;EACX,MAAM,iBAAiB,OAAO,mBAAmB,WAAW,CAAC,CAAC,CAAC;EAC/D,MAAM,UAAU,OAAO,gBAAgB,WAAW,KAAK,CAAC;EACxD,MAAM,aAAa,OAAO,oBAAoB,WAAW,CAAC,CAAC,CAAC;EAE5D,aACE,EACEA,uBACA;GAAE,IAAI;GAAW,MAAM;GAAW,OAAO,MAAM;EAAM,GACrD,EACE,UAAU,EAAE,YACV,eAAe,OAAO,WAAW,OAAO,eAAe,OAAO,QAAQ,KAAK,EAC/E,CACF;CACJ;AACF,CAAC;AAED,SAAgB,eACd,OACA,aAAwC,CAAC,GACzC,QAA4C,CAAC,GAC7C,UAAU,OACV;CACA,OAAO,EAAE,kBAAkB;EACzB,YAAY,UAAU;GAAE,GAAG;GAAY;EAAuB,IAAI;EAClE,aAAa,MAAM;EACnB,OAAO,iBAAiB,oBAAoB,OAAO,OAAO,OAAO,CAAC,CAAC,IAAI;CACzE,CAAC;AACH;AAEA,SAAS,iBAAiB,UAAoD;CAC5E,OAAO;EACL,aAAa,EAAE,GAAG,SAAS,YAAY;EACvC,MAAM,EAAE,GAAG,SAAS,KAAK;EACzB,OAAO,SAAS,MAAM,IAAI,YAAY;CACxC;AACF;AAEA,SAAS,aAAa,MAAwC;CAC5D,IAAI,UAAU,SAAS,IAAI,GAAG,OAAO;CAErC,IAAI,KAAK,OAAO,MAAM,OAAO;EAAC;EAAM,EAAE,GAAG,KAAK,GAAG;EAAG,KAAK;CAAE;CAC3D,MAAM,CAAC,KAAK,YAAY,GAAG,YAAY;CAEvC,OAAO;EAAC;EAAK,EAAE,GAAG,WAAW;EAAG,GAAG,SAAS,IAAI,YAAY;CAAC;AAC/D"}
@@ -1,41 +0,0 @@
1
- import { documentPreviewStoreKey } from "./preview.js";
2
- import { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
3
-
4
- //#region src/runtime/delivery/DocumentScope.ts
5
- var DocumentScope_default = defineComponent({
6
- name: "DocumentScope",
7
- props: {
8
- as: {
9
- default: "div",
10
- type: String
11
- },
12
- role: {
13
- default: "embedded",
14
- type: String
15
- },
16
- value: {
17
- required: true,
18
- type: Object
19
- }
20
- },
21
- setup(props, { slots }) {
22
- const preview = inject(documentPreviewStoreKey, void 0);
23
- const stopRegistration = shallowRef();
24
- const value = computed(() => preview?.resolve(props.value) ?? props.value);
25
- function register() {
26
- stopRegistration.value?.();
27
- stopRegistration.value = preview?.register(props.value, props.role);
28
- }
29
- onMounted(register);
30
- watch(() => [props.value, props.role], register);
31
- onBeforeUnmount(() => stopRegistration.value?.());
32
- return () => h(props.as, {
33
- "data-cms-document": value.value.id,
34
- "data-cms-role": props.role
35
- }, slots.default?.({ value: value.value }));
36
- }
37
- });
38
-
39
- //#endregion
40
- export { DocumentScope_default as default };
41
- //# sourceMappingURL=DocumentScope.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentScope.js","names":[],"sources":["../../../../../src/runtime/delivery/DocumentScope.ts"],"sourcesContent":["import type { PropType } from 'vue'\nimport type { DeliveryDocument } from './types'\nimport type { DocumentPreviewStore, PreviewDocumentRole } from './preview'\nimport { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, shallowRef, watch } from 'vue'\nimport { documentPreviewStoreKey } from './preview'\n\nexport default defineComponent({\n name: 'DocumentScope',\n props: {\n as: { default: 'div', type: String },\n // SAFETY: PreviewDocumentRole is a string union, so String is its matching Vue runtime constructor.\n role: { default: 'embedded', type: String as PropType<PreviewDocumentRole> },\n // SAFETY: DeliveryDocument is an object contract, so Object is its matching Vue runtime constructor.\n value: { required: true, type: Object as PropType<DeliveryDocument> },\n },\n setup(props, { slots }) {\n const preview = inject<DocumentPreviewStore | undefined>(documentPreviewStoreKey, undefined)\n const stopRegistration = shallowRef<() => void>()\n const value = computed(() => preview?.resolve(props.value) ?? props.value)\n\n function register(): void {\n stopRegistration.value?.()\n stopRegistration.value = preview?.register(props.value, props.role)\n }\n\n onMounted(register)\n watch(() => [props.value, props.role] as const, register)\n onBeforeUnmount(() => stopRegistration.value?.())\n\n return () =>\n h(\n props.as,\n {\n 'data-cms-document': value.value.id,\n 'data-cms-role': props.role,\n },\n slots.default?.({ value: value.value }),\n )\n },\n})\n"],"mappings":";;;;AAMA,4BAAe,gBAAgB;CAC7B,MAAM;CACN,OAAO;EACL,IAAI;GAAE,SAAS;GAAO,MAAM;EAAO;EAEnC,MAAM;GAAE,SAAS;GAAY,MAAM;EAAwC;EAE3E,OAAO;GAAE,UAAU;GAAM,MAAM;EAAqC;CACtE;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,UAAU,OAAyC,yBAAyB,MAAS;EAC3F,MAAM,mBAAmB,WAAuB;EAChD,MAAM,QAAQ,eAAe,SAAS,QAAQ,MAAM,KAAK,KAAK,MAAM,KAAK;EAEzE,SAAS,WAAiB;GACxB,iBAAiB,QAAQ;GACzB,iBAAiB,QAAQ,SAAS,SAAS,MAAM,OAAO,MAAM,IAAI;EACpE;EAEA,UAAU,QAAQ;EAClB,YAAY,CAAC,MAAM,OAAO,MAAM,IAAI,GAAY,QAAQ;EACxD,sBAAsB,iBAAiB,QAAQ,CAAC;EAEhD,aACE,EACE,MAAM,IACN;GACE,qBAAqB,MAAM,MAAM;GACjC,iBAAiB,MAAM;EACzB,GACA,MAAM,UAAU,EAAE,OAAO,MAAM,MAAM,CAAC,CACxC;CACJ;AACF,CAAC"}
@@ -1,8 +0,0 @@
1
- //#region src/runtime/delivery/blocks.ts
2
- const blockComponentsKey = Symbol("cms-block-components");
3
- const formComponentsKey = Symbol("cms-form-components");
4
- const formPreviewKey = Symbol("cms-form-preview");
5
-
6
- //#endregion
7
- export { blockComponentsKey, formComponentsKey, formPreviewKey };
8
- //# sourceMappingURL=blocks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blocks.js","names":[],"sources":["../../../../../src/runtime/delivery/blocks.ts"],"sourcesContent":["import type { ComponentDefinition } from '@internal/protocol/Configuration'\nimport type { Component, InjectionKey, ShallowRef } from 'vue'\n\nexport const blockComponentsKey: InjectionKey<ShallowRef<Record<string, Component>>> = Symbol('cms-block-components')\n\nexport const formComponentsKey: InjectionKey<ShallowRef<ReadonlyArray<ComponentDefinition>>> =\n Symbol('cms-form-components')\n\nexport const formPreviewKey: InjectionKey<import('vue').Ref<boolean>> = Symbol('cms-form-preview')\n"],"mappings":";AAGA,MAAa,qBAA0E,OAAO,sBAAsB;AAEpH,MAAa,oBACX,OAAO,qBAAqB;AAE9B,MAAa,iBAA2D,OAAO,kBAAkB"}
@@ -1,12 +0,0 @@
1
- import { n as readPreviewLocation } from "../../location-CMNGO3lU.js";
2
- import { useRequestURL, useState } from "nuxt/app";
3
-
4
- //#region src/runtime/delivery/context.ts
5
- /** Per Nuxt app/request, serialized through hydration and retained during navigation. Access is checked by the preview API. */
6
- function usePreviewDelivery() {
7
- return useState("cms:preview-delivery", () => Boolean(readPreviewLocation(useRequestURL())));
8
- }
9
-
10
- //#endregion
11
- export { usePreviewDelivery };
12
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","names":[],"sources":["../../../../../src/runtime/delivery/context.ts"],"sourcesContent":["import { useRequestURL, useState } from 'nuxt/app'\nimport { readPreviewLocation } from '@internal/protocol/Preview'\n\n/** Per Nuxt app/request, serialized through hydration and retained during navigation. Access is checked by the preview API. */\nexport function usePreviewDelivery() {\n return useState('cms:preview-delivery', () => Boolean(readPreviewLocation(useRequestURL())))\n}\n"],"mappings":";;;;;AAIA,SAAgB,qBAAqB;CACnC,OAAO,SAAS,8BAA8B,QAAQ,oBAAoB,cAAc,CAAC,CAAC,CAAC;AAC7F"}
@@ -1,21 +0,0 @@
1
- import DocumentRenderer_default from "./DocumentRenderer.js";
2
- import { h } from "vue";
3
-
4
- //#region src/runtime/delivery/document-page.ts
5
- function resolveDocumentPage(request) {
6
- function render() {
7
- const error = request.error();
8
- const page = request.page();
9
- const failure = error ?? (!page ? request.notFound() : void 0);
10
- if (failure) {
11
- if (request.renderError) return request.renderError(failure)();
12
- throw failure;
13
- }
14
- return page ? h(DocumentRenderer_default, { value: page }) : void 0;
15
- }
16
- return request.ready.then(() => render);
17
- }
18
-
19
- //#endregion
20
- export { resolveDocumentPage };
21
- //# sourceMappingURL=document-page.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document-page.js","names":["DocumentRenderer"],"sources":["../../../../../src/runtime/delivery/document-page.ts"],"sourcesContent":["import type { VNode } from 'vue'\nimport type { DeliveryDocument } from './types'\nimport { h } from 'vue'\nimport DocumentRenderer from './DocumentRenderer'\n\nexport interface DocumentPageRequest {\n readonly error: () => Error | undefined\n readonly notFound: () => Error\n readonly page: () => DeliveryDocument | null\n readonly renderError?: ((error: Error) => () => VNode) | undefined\n readonly ready: Promise<unknown>\n}\n\nexport function resolveDocumentPage(request: DocumentPageRequest): Promise<() => VNode | undefined> {\n function render(): VNode | undefined {\n const error = request.error()\n const page = request.page()\n const failure = error ?? (!page ? request.notFound() : undefined)\n\n if (failure) {\n if (request.renderError) return request.renderError(failure)()\n throw failure\n }\n\n return page ? h(DocumentRenderer, { value: page }) : undefined\n }\n\n // Always resolve setup with a renderer. Throwing delivery failures from render\n // lets Nuxt set the HTTP status without making Vue report a missing renderer.\n return request.ready.then(() => render)\n}\n"],"mappings":";;;;AAaA,SAAgB,oBAAoB,SAAgE;CAClG,SAAS,SAA4B;EACnC,MAAM,QAAQ,QAAQ,MAAM;EAC5B,MAAM,OAAO,QAAQ,KAAK;EAC1B,MAAM,UAAU,UAAU,CAAC,OAAO,QAAQ,SAAS,IAAI;EAEvD,IAAI,SAAS;GACX,IAAI,QAAQ,aAAa,OAAO,QAAQ,YAAY,OAAO,CAAC,CAAC;GAC7D,MAAM;EACR;EAEA,OAAO,OAAO,EAAEA,0BAAkB,EAAE,OAAO,KAAK,CAAC,IAAI;CACvD;CAIA,OAAO,QAAQ,MAAM,WAAW,MAAM;AACxC"}
@@ -1,43 +0,0 @@
1
- import { usePreviewDelivery } from "./context.js";
2
- import { resolveDocumentPage } from "./document-page.js";
3
- import { previewErrorMessage } from "./error.js";
4
- import { useDocument } from "./useDocument.js";
5
- import { useCmsDocumentSeo } from "./useCmsDocumentSeo.js";
6
- import { h } from "vue";
7
- import { createError, defineNuxtComponent, useRoute, useState } from "nuxt/app";
8
-
9
- //#region src/runtime/delivery/document.ts
10
- var document_default = defineNuxtComponent({
11
- name: "CmsDocumentPage",
12
- setup() {
13
- const route = useRoute();
14
- const preview = usePreviewDelivery();
15
- const previewError = useState("cms:preview-error", () => null);
16
- const request = useDocument(() => route.path);
17
- useCmsDocumentSeo(() => request.data.value);
18
- return resolveDocumentPage({
19
- error: () => request.error.value,
20
- renderError: preview.value ? (error) => {
21
- const status = createError(error).statusCode ?? 500;
22
- previewError.value = previewErrorMessage(status);
23
- return () => h("p", {
24
- role: "alert",
25
- class: "p-6"
26
- }, previewError.value ?? "");
27
- } : void 0,
28
- notFound: () => createError({
29
- statusCode: 404,
30
- statusMessage: "Document not found"
31
- }),
32
- page: () => {
33
- if (request.data.value) previewError.value = null;
34
- return request.data.value;
35
- },
36
- ready: request
37
- });
38
- }
39
- });
40
-
41
- //#endregion
42
- export { document_default as default };
43
- //# sourceMappingURL=document.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document.js","names":[],"sources":["../../../../../src/runtime/delivery/document.ts"],"sourcesContent":["import { createError, defineNuxtComponent, useRoute, useState } from 'nuxt/app'\nimport { h } from 'vue'\nimport { usePreviewDelivery } from './context'\nimport { previewErrorMessage } from './error'\nimport { resolveDocumentPage } from './document-page'\nimport { useDocument } from './useDocument'\nimport { useCmsDocumentSeo } from './useCmsDocumentSeo'\n\nexport default defineNuxtComponent({\n name: 'CmsDocumentPage',\n setup() {\n const route = useRoute()\n const preview = usePreviewDelivery()\n const previewError = useState<string | null>('cms:preview-error', () => null)\n const request = useDocument(() => route.path)\n\n useCmsDocumentSeo(() => request.data.value)\n\n return resolveDocumentPage({\n error: () => request.error.value,\n renderError: preview.value\n ? (error) => {\n const status = createError(error).statusCode ?? 500\n previewError.value = previewErrorMessage(status)\n\n return () => h('p', { role: 'alert', class: 'p-6' }, previewError.value ?? '')\n }\n : undefined,\n notFound: () =>\n createError({\n statusCode: 404,\n statusMessage: 'Document not found',\n }),\n page: () => {\n if (request.data.value) previewError.value = null\n\n return request.data.value\n },\n ready: request,\n })\n },\n})\n"],"mappings":";;;;;;;;;AAQA,uBAAe,oBAAoB;CACjC,MAAM;CACN,QAAQ;EACN,MAAM,QAAQ,SAAS;EACvB,MAAM,UAAU,mBAAmB;EACnC,MAAM,eAAe,SAAwB,2BAA2B,IAAI;EAC5E,MAAM,UAAU,kBAAkB,MAAM,IAAI;EAE5C,wBAAwB,QAAQ,KAAK,KAAK;EAE1C,OAAO,oBAAoB;GACzB,aAAa,QAAQ,MAAM;GAC3B,aAAa,QAAQ,SAChB,UAAU;IACT,MAAM,SAAS,YAAY,KAAK,CAAC,CAAC,cAAc;IAChD,aAAa,QAAQ,oBAAoB,MAAM;IAE/C,aAAa,EAAE,KAAK;KAAE,MAAM;KAAS,OAAO;IAAM,GAAG,aAAa,SAAS,EAAE;GAC/E,IACA;GACJ,gBACE,YAAY;IACV,YAAY;IACZ,eAAe;GACjB,CAAC;GACH,YAAY;IACV,IAAI,QAAQ,KAAK,OAAO,aAAa,QAAQ;IAE7C,OAAO,QAAQ,KAAK;GACtB;GACA,OAAO;EACT,CAAC;CACH;AACF,CAAC"}
@@ -1,11 +0,0 @@
1
- //#region src/runtime/delivery/error.ts
2
- function previewErrorMessage(status) {
3
- if (status === 401) return "Your session has expired. Sign in to Studio and reload the preview.";
4
- if (status === 403) return "You do not have permission to preview this page.";
5
- if (status === 404) return "This page could not be found. It may have moved or been deleted.";
6
- return "The preview could not load. Try reloading the page.";
7
- }
8
-
9
- //#endregion
10
- export { previewErrorMessage };
11
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","names":[],"sources":["../../../../../src/runtime/delivery/error.ts"],"sourcesContent":["export function previewErrorMessage(status: number): string {\n if (status === 401) return 'Your session has expired. Sign in to Studio and reload the preview.'\n\n if (status === 403) return 'You do not have permission to preview this page.'\n\n if (status === 404) return 'This page could not be found. It may have moved or been deleted.'\n\n return 'The preview could not load. Try reloading the page.'\n}\n"],"mappings":";AAAA,SAAgB,oBAAoB,QAAwB;CAC1D,IAAI,WAAW,KAAK,OAAO;CAE3B,IAAI,WAAW,KAAK,OAAO;CAE3B,IAAI,WAAW,KAAK,OAAO;CAE3B,OAAO;AACT"}
@@ -1,99 +0,0 @@
1
- import { ownsCmsLocale } from "../../internal/i18n.js";
2
- import { n as readPreviewLocation, t as previewRedirect } from "../../location-CMNGO3lU.js";
3
- import { usePreviewDelivery } from "./context.js";
4
- import { installCmsDocumentSeoAdapters } from "./useCmsDocumentSeo.js";
5
- import { localeFromPath } from "../i18n/translator.js";
6
- import { computed, watch } from "vue";
7
- import { addRouteMiddleware, defineNuxtPlugin, useHead, useRequestURL, useResponseHeader, useRoute, useState } from "nuxt/app";
8
- import configuration from "#cms/i18n";
9
- import { updateSiteConfig, useRobotsRule, useSchemaOrg } from "#imports";
10
-
11
- //#region src/runtime/delivery/plugin.ts
12
- var plugin_default = defineNuxtPlugin(() => {
13
- const route = useRoute();
14
- const url = useRequestURL();
15
- const documentLocale = useState("cms-document-locale", () => void 0);
16
- if (configuration.defaultLocale) {
17
- const ownsRoute = computed(() => ownsCmsLocale(configuration, route.meta.cmsDocument === true));
18
- const locale = computed(() => documentLocale.value ?? localeFromPath(configuration, route.path));
19
- watch(() => route.fullPath, () => {
20
- documentLocale.value = void 0;
21
- }, { flush: "sync" });
22
- useHead({ htmlAttrs: { lang: computed(() => ownsRoute.value ? locale.value : void 0) } });
23
- updateSiteConfig({
24
- _context: "@phtngyn/cms",
25
- _priority: 0,
26
- currentLocale: computed(() => ownsRoute.value ? locale.value : void 0),
27
- defaultLocale: computed(() => ownsRoute.value ? configuration.defaultLocale : void 0),
28
- locales: computed(() => ownsRoute.value ? Object.entries(configuration.locales).map(([code, value]) => ({
29
- code,
30
- name: value.name
31
- })) : void 0)
32
- });
33
- }
34
- installCmsDocumentSeoAdapters({
35
- head: (input) => {
36
- useHead(input);
37
- },
38
- robots: (input) => {
39
- const robots = useRobotsRule(input);
40
- if (import.meta.server) watch(input, (value) => {
41
- robots.value = value;
42
- }, {
43
- flush: "sync",
44
- immediate: true
45
- });
46
- },
47
- schema: (input) => {
48
- useSchemaOrg(input);
49
- },
50
- seoMeta: (input) => {
51
- useHead(() => {
52
- const meta = [];
53
- const addName = (name, content) => {
54
- if (content) meta.push({
55
- content,
56
- name
57
- });
58
- };
59
- const addProperty = (property, content) => {
60
- if (content) meta.push({
61
- content,
62
- property
63
- });
64
- };
65
- addName("description", input.description());
66
- addName("robots", input.robots());
67
- addProperty("og:title", input.ogTitle());
68
- addProperty("og:description", input.ogDescription());
69
- addProperty("og:image", input.ogImage());
70
- addProperty("og:image:alt", input.ogImageAlt());
71
- addProperty("og:locale", input.ogLocale());
72
- addProperty("og:url", input.ogUrl() ?? (input.robots()?.startsWith("noindex") ? url.href : void 0));
73
- return {
74
- meta,
75
- title: input.title()
76
- };
77
- });
78
- },
79
- locale: (input) => {
80
- watch(input, (value) => documentLocale.value = value, {
81
- immediate: true,
82
- flush: "sync"
83
- });
84
- }
85
- });
86
- const parameters = readPreviewLocation(url);
87
- if (!usePreviewDelivery().value || !parameters) return;
88
- if (import.meta.server) {
89
- useResponseHeader("cache-control").value = "private, no-store";
90
- useResponseHeader("x-frame-options").value = "SAMEORIGIN";
91
- }
92
- addRouteMiddleware("cms-preview", (to) => {
93
- return previewRedirect(new URL(to.fullPath, url.origin), parameters);
94
- }, { global: true });
95
- });
96
-
97
- //#endregion
98
- export { plugin_default as default };
99
- //# sourceMappingURL=plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.js","names":[],"sources":["../../../../../src/runtime/delivery/plugin.ts"],"sourcesContent":["import configuration from '#cms/i18n'\nimport {\n addRouteMiddleware,\n defineNuxtPlugin,\n useHead,\n useRequestURL,\n useResponseHeader,\n useRoute,\n useState,\n} from 'nuxt/app'\nimport { updateSiteConfig, useRobotsRule, useSchemaOrg } from '#imports'\nimport { previewRedirect, readPreviewLocation } from '@internal/protocol/Preview'\nimport { computed, watch } from 'vue'\nimport { usePreviewDelivery } from './context'\nimport { installCmsDocumentSeoAdapters } from './useCmsDocumentSeo'\nimport { ownsCmsLocale } from '../../internal/i18n'\nimport { localeFromPath } from '../i18n/translator'\n\nexport default defineNuxtPlugin(() => {\n const route = useRoute()\n const url = useRequestURL()\n const documentLocale = useState<string | undefined>('cms-document-locale', () => undefined)\n\n if (configuration.defaultLocale) {\n const ownsRoute = computed(() => ownsCmsLocale(configuration, route.meta.cmsDocument === true))\n const locale = computed(() => documentLocale.value ?? localeFromPath(configuration, route.path))\n\n watch(\n () => route.fullPath,\n () => {\n documentLocale.value = undefined\n },\n { flush: 'sync' },\n )\n useHead({ htmlAttrs: { lang: computed(() => (ownsRoute.value ? locale.value : undefined)) } })\n updateSiteConfig({\n _context: '@phtngyn/cms',\n _priority: 0,\n currentLocale: computed(() => (ownsRoute.value ? locale.value : undefined)),\n defaultLocale: computed(() => (ownsRoute.value ? configuration.defaultLocale : undefined)),\n locales: computed(() =>\n ownsRoute.value\n ? Object.entries(configuration.locales).map(([code, value]) => ({ code, name: value.name }))\n : undefined,\n ),\n })\n }\n\n installCmsDocumentSeoAdapters({\n head: (input) => {\n useHead(input)\n },\n robots: (input) => {\n const robots = useRobotsRule(input)\n\n if (import.meta.server) {\n watch(\n input,\n (value) => {\n robots.value = value\n },\n { flush: 'sync', immediate: true },\n )\n }\n },\n schema: (input) => {\n useSchemaOrg(input)\n },\n seoMeta: (input) => {\n useHead(() => {\n const meta: Array<{ content: string; name: string } | { content: string; property: string }> = []\n\n const addName = (name: string, content: string | undefined) => {\n if (content) meta.push({ content, name })\n }\n\n const addProperty = (property: string, content: string | undefined) => {\n if (content) meta.push({ content, property })\n }\n\n addName('description', input.description())\n addName('robots', input.robots())\n addProperty('og:title', input.ogTitle())\n addProperty('og:description', input.ogDescription())\n addProperty('og:image', input.ogImage())\n addProperty('og:image:alt', input.ogImageAlt())\n addProperty('og:locale', input.ogLocale())\n addProperty('og:url', input.ogUrl() ?? (input.robots()?.startsWith('noindex') ? url.href : undefined))\n\n return { meta, title: input.title() }\n })\n },\n locale: (input) => {\n watch(input, (value) => (documentLocale.value = value), { immediate: true, flush: 'sync' })\n },\n })\n\n const parameters = readPreviewLocation(url)\n const preview = usePreviewDelivery()\n\n if (!preview.value || !parameters) return\n\n if (import.meta.server) {\n useResponseHeader('cache-control').value = 'private, no-store'\n useResponseHeader('x-frame-options').value = 'SAMEORIGIN'\n }\n\n addRouteMiddleware(\n 'cms-preview',\n (to) => {\n return previewRedirect(new URL(to.fullPath, url.origin), parameters)\n },\n { global: true },\n )\n})\n"],"mappings":";;;;;;;;;;;AAkBA,qBAAe,uBAAuB;CACpC,MAAM,QAAQ,SAAS;CACvB,MAAM,MAAM,cAAc;CAC1B,MAAM,iBAAiB,SAA6B,6BAA6B,MAAS;CAE1F,IAAI,cAAc,eAAe;EAC/B,MAAM,YAAY,eAAe,cAAc,eAAe,MAAM,KAAK,gBAAgB,IAAI,CAAC;EAC9F,MAAM,SAAS,eAAe,eAAe,SAAS,eAAe,eAAe,MAAM,IAAI,CAAC;EAE/F,YACQ,MAAM,gBACN;GACJ,eAAe,QAAQ;EACzB,GACA,EAAE,OAAO,O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S,IAAI,IAAI,OAAO,OAAU;IAErG,OAAO;KAAE;KAAM,OAAO,MAAM,MAAM;IAAE;GACtC,CAAC;EACH;EACA,SAAS,UAAU;GACjB,MAAM,QAAQ,UAAW,eAAe,QAAQ,OAAQ;IAAE,WAAW;IAAM,OAAO;GAAO,CAAC;EAC5F;CACF,CAAC;CAED,MAAM,aAAa,oBAAoB,GAAG;CAG1C,IAAI,CAFY,mBAEL,CAAC,CAAC,SAAS,CAAC,YAAY;CAEnC,IAAI,YAAY,QAAQ;EACtB,kBAAkB,eAAe,CAAC,CAAC,QAAQ;EAC3C,kBAAkB,iBAAiB,CAAC,CAAC,QAAQ;CAC/C;CAEA,mBACE,gBACC,OAAO;EACN,OAAO,gBAAgB,IAAI,IAAI,GAAG,UAAU,IAAI,MAAM,GAAG,UAAU;CACrE,GACA,EAAE,QAAQ,KAAK,CACjB;AACF,CAAC"}
@@ -1,11 +0,0 @@
1
- import { t as DeliveryDocument } from "../../types-DZ0IV-Ow.js";
2
- import { InjectionKey } from "vue";
3
- //#region src/runtime/delivery/preview.d.ts
4
- export type PreviewDocumentRole = 'embedded' | 'primary' | 'related' | 'summary';
5
- export interface DocumentPreviewStore {
6
- readonly register: (document: DeliveryDocument, role: PreviewDocumentRole) => () => void;
7
- readonly resolve: (document: DeliveryDocument) => DeliveryDocument;
8
- }
9
- export declare const documentPreviewStoreKey: InjectionKey<DocumentPreviewStore>;
10
- //#endregion
11
- //# sourceMappingURL=preview.d.ts.map