@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.
- package/LICENSE +18 -10
- package/README.md +59 -401
- package/drizzle/20261003215543_initial/migration.sql +251 -0
- package/drizzle/20261003215543_initial/snapshot.json +1941 -0
- package/package.json +75 -71
- package/src/Authoring.d.ts +41 -49
- package/src/Authoring.js +1 -1
- package/src/Blocks-BrxSemnd.js +40 -0
- package/src/Client.d.ts +8186 -0
- package/src/Client.js +41 -0
- package/src/Collections.d.ts +142 -0
- package/src/Collections.js +142 -0
- package/src/Config-CMiwciub.js +130 -0
- package/src/Config.d.ts +172 -0
- package/src/Config.js +2 -0
- package/src/Configuration-Dk2k3OIc.js +73 -0
- package/src/DataTransfer-BmECvPHB.js +488 -0
- package/src/Database-DSsNCGft.d.ts +3 -0
- package/src/Delivery.d.ts +28 -0
- package/src/Delivery.js +7 -0
- package/src/Document-CKXMSEf1.js +293 -0
- package/src/Document-TgwYKJZM.d.ts +220 -0
- package/src/DocumentRenderer-Wz2xaNyf.js +394 -0
- package/src/EditorSchema-wrDv-id6.js +296 -0
- package/src/Fields-BegSgYhj.d.ts +166 -0
- package/src/Fields-ioGaMEh9.js +130 -0
- package/src/Forms-BuKAXQxr.d.ts +203 -0
- package/src/Forms.d.ts +48 -11
- package/src/Forms.js +342 -7
- package/src/I18n-Ckf9h0rC.js +154 -0
- package/src/I18n.d.ts +45 -2
- package/src/I18n.js +2 -1
- package/src/Image-CJWPLnhP.js +110 -0
- package/src/Links-CJYyy7rC.js +28 -0
- package/src/Links-Dx1yOni8.d.ts +28 -0
- package/src/Locales-Ch7a5xuA.js +67 -0
- package/src/Locales-jwbmJaOp.d.ts +43 -0
- package/src/Locales.d.ts +3 -0
- package/src/Locales.js +3 -0
- package/src/Media-BQ0uL4w7.d.ts +15 -0
- package/src/Media-DSyvd14o.js +87 -0
- package/src/Module.d.ts +2 -10
- package/src/Module.js +1039 -162
- package/src/Operations.d.ts +57 -0
- package/src/Operations.js +263 -0
- package/src/People-DvNZauWw.js +69 -0
- package/src/PreviewFocus-C_EelZO5.js +104 -0
- package/src/Query-C0kGJF5_.d.ts +261 -0
- package/src/RevisionPreview-IVwbJ9Wy.js +133 -0
- package/src/Routes-BaZvm2LE.js +126 -0
- package/src/Routes-DM1rRp3r.d.ts +15 -0
- package/src/S3MediaObjects-y-WacEi9.js +193 -0
- package/src/Seo-BcpqxoAs.d.ts +57 -0
- package/src/Seo-CjNUtUkj.js +254 -0
- package/src/StudioApi-CXLwwocX.js +833 -0
- package/src/StudioErrors-T5zLGQ1M.js +117 -0
- package/src/StudioErrors-kq-E44lQ.d.ts +104 -0
- package/src/StudioServer.d.ts +20 -0
- package/src/StudioServer.js +34 -0
- package/src/answers-DcTg0Xv2.js +41 -0
- package/src/cli.js +681 -187
- package/src/contracts-rprW3ZOB.js +130 -0
- package/src/forms-3xuf0Ym7.d.ts +206 -0
- package/src/localeConfiguration-BPbkLi7-.js +32 -0
- package/src/localeContext-DhF3SPvM.js +59 -0
- package/src/locales-6OD4XGIZ.js +12 -0
- package/src/nuxtDelivery-BYX_Cddb.js +466 -0
- package/src/plugin-DTYuDaQu.js +7171 -0
- package/src/previewContext-dt3ZUh-w.js +4 -0
- package/src/previewRegions-CXjk5cbP.js +145 -0
- package/src/previewSource-fb-q3ESM.js +144 -0
- package/src/rendering-D9LVeEKX.js +47 -0
- package/src/rolldown-runtime-8H4AJuhK.js +14 -0
- package/src/runtime/CmsImage.js +38 -0
- package/src/runtime/DocumentPage.vue +10 -0
- package/src/runtime/DocumentPageContent.js +48 -0
- package/src/runtime/DocumentRenderer.d.ts +129 -0
- package/src/runtime/DocumentRenderer.js +2 -0
- package/src/runtime/api.js +48 -6
- package/src/runtime/delivery/useCmsDocument.js +2 -0
- package/src/runtime/delivery/useCmsDocumentQuery.js +2 -0
- package/src/runtime/delivery/useCmsDocumentSeo.js +2 -114
- package/src/runtime/delivery/useCmsLocale.js +10 -0
- package/src/runtime/plugin.js +2 -40
- package/src/runtime/preview.css +85 -0
- package/src/runtime/preview.js +277 -0
- package/src/runtime/previewSource.js +82 -0
- package/src/runtime/revisionPrivacy.js +13 -0
- package/src/runtime/studio.js +10 -0
- package/src/runtime/studioIcons.js +36 -0
- package/src/validation-3pggwcnm.js +396 -0
- package/src/validation-DpUwPC8Y.js +224 -0
- package/studio/THIRD-PARTY-LICENSES.md +2406 -0
- package/studio/chunks/AccountPage-DL3DitDM.js +288 -0
- package/studio/chunks/AccountPage-DL3DitDM.js.br +0 -0
- package/studio/chunks/AccountPage-DL3DitDM.js.gz +0 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js +584 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js.br +0 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js.gz +0 -0
- package/studio/chunks/Alert-D0D24z_a.js +335 -0
- package/studio/chunks/Alert-D0D24z_a.js.br +0 -0
- package/studio/chunks/Alert-D0D24z_a.js.gz +0 -0
- package/studio/chunks/Badge-BBFs88TI.js +346 -0
- package/studio/chunks/Badge-BBFs88TI.js.br +0 -0
- package/studio/chunks/Badge-BBFs88TI.js.gz +0 -0
- package/studio/chunks/Button-BT3ztSPx.js +14319 -0
- package/studio/chunks/Button-BT3ztSPx.js.br +0 -0
- package/studio/chunks/Button-BT3ztSPx.js.gz +0 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js +246 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js.br +0 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js.gz +0 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js +1745 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js.br +0 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js.gz +0 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js +18 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js.br +0 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js.gz +0 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js +2413 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js.br +0 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js.gz +0 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js +26063 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.br +0 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.gz +0 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js +4400 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js.br +0 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js.gz +0 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js +7799 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js.br +0 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js.gz +0 -0
- package/studio/chunks/FormField-CgM6l2Yn.js +198 -0
- package/studio/chunks/FormField-CgM6l2Yn.js.br +0 -0
- package/studio/chunks/FormField-CgM6l2Yn.js.gz +0 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js +552 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js.br +0 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js.gz +0 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js +271 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js.br +0 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js.gz +0 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js +101 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.br +0 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.gz +0 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js +923 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js.br +0 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js.gz +0 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js +837 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js.br +0 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js.gz +0 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js +1173 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.br +0 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.gz +0 -0
- package/studio/chunks/Modal-D6hSvxHd.js +265 -0
- package/studio/chunks/Modal-D6hSvxHd.js.br +0 -0
- package/studio/chunks/Modal-D6hSvxHd.js.gz +0 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js +277 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.br +0 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.gz +0 -0
- package/studio/chunks/Pagination-D9BSo5H2.js +573 -0
- package/studio/chunks/Pagination-D9BSo5H2.js.br +0 -0
- package/studio/chunks/Pagination-D9BSo5H2.js.gz +0 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js +783 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js.br +0 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js.gz +0 -0
- package/studio/chunks/Popover-B63bkTMS.js +128 -0
- package/studio/chunks/Popover-B63bkTMS.js.br +0 -0
- package/studio/chunks/Popover-B63bkTMS.js.gz +0 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js +255 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.br +0 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.gz +0 -0
- package/studio/chunks/Routes-DLYHmulE.js +102 -0
- package/studio/chunks/Routes-DLYHmulE.js.br +0 -0
- package/studio/chunks/Routes-DLYHmulE.js.gz +0 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js +95 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js.br +0 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js.gz +0 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js +332 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js.br +0 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js.gz +0 -0
- package/studio/chunks/Search-BEgCe9Aj.js +14646 -0
- package/studio/chunks/Search-BEgCe9Aj.js.br +0 -0
- package/studio/chunks/Search-BEgCe9Aj.js.gz +0 -0
- package/studio/chunks/Select-B50WZMW-.js +2145 -0
- package/studio/chunks/Select-B50WZMW-.js.br +0 -0
- package/studio/chunks/Select-B50WZMW-.js.gz +0 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js +2109 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js.br +0 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js.gz +0 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js +846 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js.br +0 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js.gz +0 -0
- package/studio/chunks/Skeleton-COz8dcrw.js +39 -0
- package/studio/chunks/Skeleton-COz8dcrw.js.br +2 -0
- package/studio/chunks/Skeleton-COz8dcrw.js.gz +0 -0
- package/studio/chunks/Slideover-QMMHAAys.js +289 -0
- package/studio/chunks/Slideover-QMMHAAys.js.br +0 -0
- package/studio/chunks/Slideover-QMMHAAys.js.gz +0 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js +80 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js.br +0 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js.gz +0 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js +2524 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.br +0 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.gz +0 -0
- package/studio/chunks/Switch-qKl1aDn7.js +484 -0
- package/studio/chunks/Switch-qKl1aDn7.js.br +0 -0
- package/studio/chunks/Switch-qKl1aDn7.js.gz +0 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js +29 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js.br +0 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js.gz +0 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js +693 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js.br +0 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js.gz +0 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js +12 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js.br +0 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js.gz +0 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js +2349 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js.br +0 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js.gz +0 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js +113 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.br +0 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.gz +0 -0
- package/studio/chunks/arrays-CUJkmV4I.js +10 -0
- package/studio/chunks/arrays-CUJkmV4I.js.br +0 -0
- package/studio/chunks/arrays-CUJkmV4I.js.gz +0 -0
- package/studio/chunks/base-DkTekJe8.js +213 -0
- package/studio/chunks/base-DkTekJe8.js.br +0 -0
- package/studio/chunks/base-DkTekJe8.js.gz +0 -0
- package/studio/chunks/content-DUGl3N4d.js +6012 -0
- package/studio/chunks/content-DUGl3N4d.js.br +0 -0
- package/studio/chunks/content-DUGl3N4d.js.gz +0 -0
- package/studio/chunks/destinations-DPIQVQa6.js +227 -0
- package/studio/chunks/destinations-DPIQVQa6.js.br +0 -0
- package/studio/chunks/destinations-DPIQVQa6.js.gz +0 -0
- package/studio/chunks/en-073cjKW4.js +152 -0
- package/studio/chunks/en-073cjKW4.js.br +0 -0
- package/studio/chunks/en-073cjKW4.js.gz +0 -0
- package/studio/chunks/en-Bn8mxPuf.js +134 -0
- package/studio/chunks/en-Bn8mxPuf.js.br +0 -0
- package/studio/chunks/en-Bn8mxPuf.js.gz +0 -0
- package/studio/chunks/en-C9OiaUDZ.js +251 -0
- package/studio/chunks/en-C9OiaUDZ.js.br +0 -0
- package/studio/chunks/en-C9OiaUDZ.js.gz +0 -0
- package/studio/chunks/en-CHAR6jzx.js +147 -0
- package/studio/chunks/en-CHAR6jzx.js.br +0 -0
- package/studio/chunks/en-CHAR6jzx.js.gz +0 -0
- package/studio/chunks/en-Cq4N1vEF.js +93 -0
- package/studio/chunks/en-Cq4N1vEF.js.br +2 -0
- package/studio/chunks/en-Cq4N1vEF.js.gz +0 -0
- package/studio/chunks/en-D2hRqlse.js +140 -0
- package/studio/chunks/en-D2hRqlse.js.br +0 -0
- package/studio/chunks/en-D2hRqlse.js.gz +0 -0
- package/studio/chunks/en-DiUC3-j6.js +144 -0
- package/studio/chunks/en-DiUC3-j6.js.br +0 -0
- package/studio/chunks/en-DiUC3-j6.js.gz +0 -0
- package/studio/chunks/english-Cs_Adu-u.js +8 -0
- package/studio/chunks/english-Cs_Adu-u.js.br +0 -0
- package/studio/chunks/english-Cs_Adu-u.js.gz +0 -0
- package/studio/chunks/esm-D6DqSiL1.js +752 -0
- package/studio/chunks/esm-D6DqSiL1.js.br +0 -0
- package/studio/chunks/esm-D6DqSiL1.js.gz +0 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js +23 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js.br +0 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js.gz +0 -0
- package/studio/chunks/iconify-DR9ryCPv.js +1007 -0
- package/studio/chunks/iconify-DR9ryCPv.js.br +0 -0
- package/studio/chunks/iconify-DR9ryCPv.js.gz +0 -0
- package/studio/chunks/icons-D2MsAaXq.js +183 -0
- package/studio/chunks/icons-D2MsAaXq.js.br +0 -0
- package/studio/chunks/icons-D2MsAaXq.js.gz +0 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js +26 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js.br +0 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js.gz +0 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js +238 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js.br +0 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js.gz +0 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js +17 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js.br +0 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js.gz +0 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js +77 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js.br +0 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js.gz +0 -0
- package/studio/chunks/notifications-OKOLc40v.js +110 -0
- package/studio/chunks/notifications-OKOLc40v.js.br +0 -0
- package/studio/chunks/notifications-OKOLc40v.js.gz +0 -0
- package/studio/chunks/operations-CjNHyrEX.js +57 -0
- package/studio/chunks/operations-CjNHyrEX.js.br +0 -0
- package/studio/chunks/operations-CjNHyrEX.js.gz +0 -0
- package/studio/chunks/overlay-DnqFLZTc.js +1733 -0
- package/studio/chunks/overlay-DnqFLZTc.js.br +0 -0
- package/studio/chunks/overlay-DnqFLZTc.js.gz +0 -0
- package/studio/chunks/presentation-DF83w0hE.js +57 -0
- package/studio/chunks/presentation-DF83w0hE.js.br +0 -0
- package/studio/chunks/presentation-DF83w0hE.js.gz +0 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js +4557 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.br +0 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.gz +0 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js +76 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js.br +0 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js.gz +0 -0
- package/studio/chunks/status-DQv6ihkU.js +38 -0
- package/studio/chunks/status-DQv6ihkU.js.br +0 -0
- package/studio/chunks/status-DQv6ihkU.js.gz +0 -0
- package/studio/chunks/studioContext-I8HozGU1.js +4953 -0
- package/studio/chunks/studioContext-I8HozGU1.js.br +0 -0
- package/studio/chunks/studioContext-I8HozGU1.js.gz +0 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js +73 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js.br +0 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js.gz +0 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js +1095 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js.br +0 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js.gz +0 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js +62 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.br +0 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.gz +0 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js +189 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.br +0 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.gz +0 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js +16 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js.br +3 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js.gz +0 -0
- package/studio/chunks/useFilter-DzyiTR7f.js +87 -0
- package/studio/chunks/useFilter-DzyiTR7f.js.br +0 -0
- package/studio/chunks/useFilter-DzyiTR7f.js.gz +0 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js +8 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js.br +0 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js.gz +0 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js +154 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js.br +0 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js.gz +0 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js +44 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.br +8 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.gz +0 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js +35 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js.br +0 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js.gz +0 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js +16 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js.br +0 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js.gz +0 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js +298 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js.br +0 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js.gz +0 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js +79 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js.br +0 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js.gz +0 -0
- package/studio/chunks/utils-mdScC0v0.js +59 -0
- package/studio/chunks/utils-mdScC0v0.js.br +0 -0
- package/studio/chunks/utils-mdScC0v0.js.gz +0 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js +781 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js.br +0 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js.gz +0 -0
- package/studio/help/64f767fe29c2-save-and-publish.svg +7 -0
- package/studio/host.css +1 -1
- package/studio/host.css.br +0 -0
- package/studio/host.css.gz +0 -0
- package/studio/host.js +8757 -39178
- package/studio/host.js.br +0 -0
- package/studio/host.js.gz +0 -0
- package/CHANGELOG.md +0 -13
- package/bin/cms.mjs +0 -2
- package/src/ApplicationTypes.d.ts +0 -84
- package/src/ApplicationTypes.js +0 -1
- package/src/Configuration-Da5B2PVH.js +0 -1191
- package/src/Configuration-Da5B2PVH.js.map +0 -1
- package/src/Configuration.d.ts +0 -82
- package/src/Configuration.js +0 -8
- package/src/Configuration.js.map +0 -1
- package/src/Content.d.ts +0 -68
- package/src/Content.js +0 -373
- package/src/Content.js.map +0 -1
- package/src/ContentTransfer-BxwswWn3.js +0 -86
- package/src/ContentTransfer-BxwswWn3.js.map +0 -1
- package/src/ContentTransfer-Z9FHyLez.d.ts +0 -72
- package/src/DocumentEngine-hh_IGPXO.js +0 -978
- package/src/DocumentEngine-hh_IGPXO.js.map +0 -1
- package/src/DocumentModel.d.ts +0 -52
- package/src/DocumentModel.js +0 -66
- package/src/DocumentModel.js.map +0 -1
- package/src/Forms-CX-hwmJF.js +0 -391
- package/src/Forms-CX-hwmJF.js.map +0 -1
- package/src/Forms-CfNPTiCr.js +0 -110
- package/src/Forms-CfNPTiCr.js.map +0 -1
- package/src/Forms-R0HoTR-o.d.ts +0 -92
- package/src/Forms.js.map +0 -1
- package/src/HttpPaths-c9nLZ9H2.js +0 -21
- package/src/HttpPaths-c9nLZ9H2.js.map +0 -1
- package/src/I18n-zbqpWxki.d.ts +0 -29
- package/src/Media-j1bTritO.js +0 -112
- package/src/Media-j1bTritO.js.map +0 -1
- package/src/Module.js.map +0 -1
- package/src/References-CCPDAPve.js +0 -45
- package/src/References-CCPDAPve.js.map +0 -1
- package/src/S3MediaObjects-Dwhl2deX.js +0 -2742
- package/src/S3MediaObjects-Dwhl2deX.js.map +0 -1
- package/src/Seo-402YumpT.d.ts +0 -198
- package/src/cli/content.js +0 -101
- package/src/cli/content.js.map +0 -1
- package/src/cli.js.map +0 -1
- package/src/connection-BP80q4d-.js +0 -92
- package/src/connection-BP80q4d-.js.map +0 -1
- package/src/dev-lifecycle-CjDq63Ft.js +0 -535
- package/src/dev-lifecycle-CjDq63Ft.js.map +0 -1
- package/src/installation-DYNQQBD3.js +0 -9114
- package/src/installation-DYNQQBD3.js.map +0 -1
- package/src/internal/application-types.js +0 -43
- package/src/internal/application-types.js.map +0 -1
- package/src/internal/authoring-catalog.js +0 -158
- package/src/internal/authoring-catalog.js.map +0 -1
- package/src/internal/authoring-compiler.js +0 -146
- package/src/internal/authoring-compiler.js.map +0 -1
- package/src/internal/authoring-metadata.js +0 -191
- package/src/internal/authoring-metadata.js.map +0 -1
- package/src/internal/cms-config.js +0 -45
- package/src/internal/cms-config.js.map +0 -1
- package/src/internal/configuration.js +0 -228
- package/src/internal/configuration.js.map +0 -1
- package/src/internal/dev-lifecycle.js +0 -3
- package/src/internal/diagnostics.js +0 -47
- package/src/internal/diagnostics.js.map +0 -1
- package/src/internal/document-model.js +0 -376
- package/src/internal/document-model.js.map +0 -1
- package/src/internal/field-metadata.js +0 -7
- package/src/internal/field-metadata.js.map +0 -1
- package/src/internal/form-capabilities.js +0 -12
- package/src/internal/form-capabilities.js.map +0 -1
- package/src/internal/i18n.js +0 -73
- package/src/internal/i18n.js.map +0 -1
- package/src/internal/studio-app.js +0 -68
- package/src/internal/studio-app.js.map +0 -1
- package/src/location-CMNGO3lU.js +0 -35
- package/src/location-CMNGO3lU.js.map +0 -1
- package/src/metadata-DN9_K6Yl.js +0 -201
- package/src/metadata-DN9_K6Yl.js.map +0 -1
- package/src/models-5j67LMqW.js +0 -131
- package/src/models-5j67LMqW.js.map +0 -1
- package/src/models-VmGmG19-.js +0 -628
- package/src/models-VmGmG19-.js.map +0 -1
- package/src/runtime/api.js.map +0 -1
- package/src/runtime/blocks.js +0 -30
- package/src/runtime/blocks.js.map +0 -1
- package/src/runtime/collaboration.js +0 -45
- package/src/runtime/collaboration.js.map +0 -1
- package/src/runtime/delivery/DocumentField.js +0 -23
- package/src/runtime/delivery/DocumentField.js.map +0 -1
- package/src/runtime/delivery/DocumentRenderer.js +0 -61
- package/src/runtime/delivery/DocumentRenderer.js.map +0 -1
- package/src/runtime/delivery/DocumentScope.js +0 -41
- package/src/runtime/delivery/DocumentScope.js.map +0 -1
- package/src/runtime/delivery/blocks.js +0 -8
- package/src/runtime/delivery/blocks.js.map +0 -1
- package/src/runtime/delivery/context.js +0 -12
- package/src/runtime/delivery/context.js.map +0 -1
- package/src/runtime/delivery/document-page.js +0 -21
- package/src/runtime/delivery/document-page.js.map +0 -1
- package/src/runtime/delivery/document.js +0 -43
- package/src/runtime/delivery/document.js.map +0 -1
- package/src/runtime/delivery/error.js +0 -11
- package/src/runtime/delivery/error.js.map +0 -1
- package/src/runtime/delivery/plugin.js +0 -99
- package/src/runtime/delivery/plugin.js.map +0 -1
- package/src/runtime/delivery/preview.d.ts +0 -11
- package/src/runtime/delivery/preview.js +0 -6
- package/src/runtime/delivery/preview.js.map +0 -1
- package/src/runtime/delivery/types.d.ts +0 -2
- package/src/runtime/delivery/types.js +0 -1
- package/src/runtime/delivery/useCmsDocumentSeo.d.ts +0 -67
- package/src/runtime/delivery/useCmsDocumentSeo.js.map +0 -1
- package/src/runtime/delivery/useDocument.d.ts +0 -6
- package/src/runtime/delivery/useDocument.js +0 -23
- package/src/runtime/delivery/useDocument.js.map +0 -1
- package/src/runtime/delivery/useDocumentQuery.d.ts +0 -7
- package/src/runtime/delivery/useDocumentQuery.js +0 -29
- package/src/runtime/delivery/useDocumentQuery.js.map +0 -1
- package/src/runtime/forms/document.js +0 -38
- package/src/runtime/forms/document.js.map +0 -1
- package/src/runtime/forms/useCmsForm.js +0 -257
- package/src/runtime/forms/useCmsForm.js.map +0 -1
- package/src/runtime/i18n/translator.js +0 -51
- package/src/runtime/i18n/translator.js.map +0 -1
- package/src/runtime/i18n/useCmsI18n.d.ts +0 -13
- package/src/runtime/i18n/useCmsI18n.js +0 -38
- package/src/runtime/i18n/useCmsI18n.js.map +0 -1
- package/src/runtime/installation.js +0 -3
- package/src/runtime/plugin.js.map +0 -1
- package/src/runtime/preview/CmsStudioPreviewMarker.js +0 -29
- package/src/runtime/preview/CmsStudioPreviewMarker.js.map +0 -1
- package/src/runtime/preview/comark-document.js +0 -37
- package/src/runtime/preview/comark-document.js.map +0 -1
- package/src/runtime/preview/connection.js +0 -3
- package/src/runtime/preview/controller.js +0 -265
- package/src/runtime/preview/controller.js.map +0 -1
- package/src/runtime/preview/crypto.js +0 -16
- package/src/runtime/preview/crypto.js.map +0 -1
- package/src/runtime/preview/overlay.js +0 -122
- package/src/runtime/preview/overlay.js.map +0 -1
- package/src/runtime/preview/plugin.client.js +0 -68
- package/src/runtime/preview/plugin.client.js.map +0 -1
- package/src/runtime/preview/preview.css +0 -91
- package/src/runtime/preview/protocol.d.ts +0 -16
- package/src/runtime/preview/protocol.js +0 -23
- package/src/runtime/preview/protocol.js.map +0 -1
- package/src/runtime/preview/regions.js +0 -142
- package/src/runtime/preview/regions.js.map +0 -1
- package/src/runtime/preview/store.js +0 -4
- package/src/runtime/sitemap-entries.js +0 -17
- package/src/runtime/sitemap-entries.js.map +0 -1
- package/src/runtime/sitemap.js +0 -23
- package/src/runtime/sitemap.js.map +0 -1
- package/src/runtime/studio-app.js +0 -17
- package/src/runtime/studio-app.js.map +0 -1
- package/src/runtime/studio-document.js +0 -46
- package/src/runtime/studio-document.js.map +0 -1
- package/src/runtime/studio-entry.js +0 -19
- package/src/runtime/studio-entry.js.map +0 -1
- package/src/runtime/studio-navigation.js +0 -11
- package/src/runtime/studio-navigation.js.map +0 -1
- package/src/scalars-CA6kyipS.d.ts +0 -7
- package/src/scalars-CVZqT3L0.js +0 -22
- package/src/scalars-CVZqT3L0.js.map +0 -1
- package/src/store-X1e1o_MF.js +0 -209
- package/src/store-X1e1o_MF.js.map +0 -1
- package/src/types-DZ0IV-Ow.d.ts +0 -101
- package/studio/CreateDocumentDialog-BpjBYGfI.js +0 -335
- package/studio/SelectMenu-KiXwx4Y_.js +0 -34032
- package/studio/collaboration-DcK2F6v9.js +0 -4566
- package/studio/editor-P2rB7Csp.js +0 -30128
- package/studio/rolldown-runtime-Dy4uBu1J.js +0 -11
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { n as createTranslator } from "./I18n-Ckf9h0rC.js";
|
|
2
|
+
import { Record, Schema } from "effect";
|
|
3
|
+
//#region ../model/src/StudioErrors.ts
|
|
4
|
+
/** Stable built-in failure reasons. Site-provided validation messages have no code. */
|
|
5
|
+
const studioErrorMessages = {
|
|
6
|
+
"errors.request.invalid": "Please check the request and try again.",
|
|
7
|
+
"errors.request.trashPlan": "Trash plan does not match the page.",
|
|
8
|
+
"errors.request.workingVector": "A valid working state vector is required.",
|
|
9
|
+
"errors.auth.required": "Authentication required.",
|
|
10
|
+
"errors.auth.sameOrigin": "Same-origin request required.",
|
|
11
|
+
"errors.auth.editorRequired": "Editor access required.",
|
|
12
|
+
"errors.auth.administratorRequired": "Administrator access required.",
|
|
13
|
+
"errors.auth.alreadyInitialized": "Studio has already been initialized.",
|
|
14
|
+
"errors.auth.invalidSecret": "Invalid installation secret.",
|
|
15
|
+
"errors.auth.secretLength": "The installation secret must have at least 32 characters.",
|
|
16
|
+
"errors.document.notFound": "Document not found.",
|
|
17
|
+
"errors.document.changed": "Document changed; refresh and try again.",
|
|
18
|
+
"errors.document.homeReplace": "A collection home cannot be replaced or moved.",
|
|
19
|
+
"errors.document.homeMove": "A collection home cannot be moved.",
|
|
20
|
+
"errors.document.homePlacement": "Only the collection home can use the home placement.",
|
|
21
|
+
"errors.document.homeOffline": "A collection home cannot be taken offline.",
|
|
22
|
+
"errors.document.homeTrash": "A collection home cannot be moved to Trash.",
|
|
23
|
+
"errors.document.starterUnavailable": "This starter is no longer available.",
|
|
24
|
+
"errors.document.restoreEarlier": "Select an earlier revision to restore.",
|
|
25
|
+
"errors.document.translationLanguage": "Choose a configured nondefault language.",
|
|
26
|
+
"errors.document.translationLocale": "Translation language \"{locale}\" must be a configured nondefault language.",
|
|
27
|
+
"errors.document.referencedInTrash": "Unpublish or update \"{title}\" before moving its referenced page to Trash.",
|
|
28
|
+
"errors.collection.notConfigured": "Collection \"{collection}\" is not configured.",
|
|
29
|
+
"errors.collection.unavailable": "Collection is not configured.",
|
|
30
|
+
"errors.language.notConfigured": "Language \"{locale}\" is not configured.",
|
|
31
|
+
"errors.route.collection": "Collection \"{collection}\" does not exist.",
|
|
32
|
+
"errors.route.pattern": "Collection \"{collection}\" has an invalid route pattern.",
|
|
33
|
+
"errors.route.cycle": "Document placement has a cycle.",
|
|
34
|
+
"errors.route.home": "Collection has more than one home document.",
|
|
35
|
+
"errors.route.parent": "Document parent is missing or belongs to another collection.",
|
|
36
|
+
"errors.route.locale": "Public route \"{path}\" conflicts with a configured locale prefix.",
|
|
37
|
+
"errors.route.collision": "Another page uses the public address \"{path}\". Choose a different address.",
|
|
38
|
+
"errors.form.structure": "Each form needs steps with a title and at least one valid question.",
|
|
39
|
+
"errors.form.size": "This form is too large. Reduce the number or size of questions.",
|
|
40
|
+
"errors.form.identity": "Steps and questions must have unique identities.",
|
|
41
|
+
"errors.form.answerKeys": "Questions must have unique answer keys.",
|
|
42
|
+
"errors.form.answerKeyReserved": "This question answer key is reserved.",
|
|
43
|
+
"errors.form.typeUnavailable": "{label}: this question type is unavailable.",
|
|
44
|
+
"errors.form.requiredUnavailable": "{label}: making a question required is unavailable.",
|
|
45
|
+
"errors.form.minLengthUnavailable": "{label}: a minimum character limit is unavailable.",
|
|
46
|
+
"errors.form.maxLengthUnavailable": "{label}: a maximum character limit is unavailable.",
|
|
47
|
+
"errors.form.minUnavailable": "{label}: a minimum value is unavailable.",
|
|
48
|
+
"errors.form.maxUnavailable": "{label}: a maximum value is unavailable.",
|
|
49
|
+
"errors.form.textLimits": "{label}: length limits require a text question.",
|
|
50
|
+
"errors.form.numberLimits": "{label}: numeric limits require a number question.",
|
|
51
|
+
"errors.form.range": "{label}: minimum exceeds maximum.",
|
|
52
|
+
"errors.form.lengthRange": "{label}: minimum length exceeds maximum length.",
|
|
53
|
+
"errors.form.options": "{label}: choices need unique identities and at least one option.",
|
|
54
|
+
"errors.form.selectOptions": "{label}: choices require a select question.",
|
|
55
|
+
"errors.publication.duplicate": "Choose each page only once.",
|
|
56
|
+
"errors.publication.revisionMissing": "Selected revision is missing.",
|
|
57
|
+
"errors.publication.alreadyOffline": "This page is already offline.",
|
|
58
|
+
"errors.publication.reviewChanged": "Content changed while you were reviewing. Check the publication impact again.",
|
|
59
|
+
"errors.schedule.name": "Give the release a name of at most 120 characters.",
|
|
60
|
+
"errors.schedule.actor": "A scheduling actor is required.",
|
|
61
|
+
"errors.schedule.future": "Choose a future publication time.",
|
|
62
|
+
"errors.schedule.planChanged": "The publication plan changed. Check again before scheduling.",
|
|
63
|
+
"errors.schedule.notPending": "This release is no longer pending.",
|
|
64
|
+
"errors.schedule.runTime": "Invalid publication run time.",
|
|
65
|
+
"errors.schedule.conflict": "The scheduled publication conflicts with the current live page.",
|
|
66
|
+
"errors.schedule.missingPage": "A selected page is no longer available. Review and schedule publication again.",
|
|
67
|
+
"errors.schedule.alreadyScheduled": "A selected page already has an outstanding publication schedule. Cancel it before scheduling another.",
|
|
68
|
+
"errors.revisionPreview.unavailable": "Revision preview unavailable.",
|
|
69
|
+
"errors.revisionPreview.expiry": "Expiry must be a future ISO timestamp within 24 hours.",
|
|
70
|
+
"errors.revisionPreview.path": "Invalid preview path.",
|
|
71
|
+
"errors.revisionPreview.language": "The requested language is unavailable in this revision.",
|
|
72
|
+
"errors.revisionPreview.query": "Invalid document query.",
|
|
73
|
+
"errors.media.notFound": "Media asset not found.",
|
|
74
|
+
"errors.media.changed": "This media asset changed; refresh and try again.",
|
|
75
|
+
"errors.media.upload": "Invalid media upload.",
|
|
76
|
+
"errors.media.uploadConfiguration": "The media upload limit must be a positive byte count.",
|
|
77
|
+
"errors.media.uploadLimit": "Media exceeds the {limit} byte upload limit.",
|
|
78
|
+
"errors.media.sizeExceeded": "Media body exceeds its declared size.",
|
|
79
|
+
"errors.media.sizeMismatch": "Media body size does not match its declaration.",
|
|
80
|
+
"errors.media.typeMismatch": "The upload is not a supported file of its declared media type.",
|
|
81
|
+
"errors.media.checksum": "Media body checksum does not match its declaration.",
|
|
82
|
+
"errors.media.folderInvalid": "Enter a valid folder name.",
|
|
83
|
+
"errors.media.folderRequired": "Enter a folder name.",
|
|
84
|
+
"errors.media.folderExists": "A folder with this name already exists.",
|
|
85
|
+
"errors.media.inUse": "This file is used by saved content, a working document, or site SEO settings.",
|
|
86
|
+
"errors.seo.changed": "Site SEO changed; refresh and try again.",
|
|
87
|
+
"errors.seo.confirmationRequired": "Confirmation required.",
|
|
88
|
+
"errors.activity.invalidCursor": "Invalid Activity cursor.",
|
|
89
|
+
"errors.people.notFound": "Person not found.",
|
|
90
|
+
"errors.people.emailExists": "A person with this email already exists.",
|
|
91
|
+
"errors.people.ownRole": "You cannot change your own role.",
|
|
92
|
+
"errors.people.ownAccount": "You cannot remove your own account.",
|
|
93
|
+
"errors.people.invalidRole": "Person has an invalid role.",
|
|
94
|
+
"errors.people.secureRandom": "Secure random generation is unavailable.",
|
|
95
|
+
"errors.people.failed": "User administration failed.",
|
|
96
|
+
"errors.content.duplicateDocument": "Duplicate document {documentId} in content bundle.",
|
|
97
|
+
"errors.content.plannedMissing": "Planned document is missing from the import.",
|
|
98
|
+
"errors.content.unchangedMissing": "Unchanged document is missing from the installation.",
|
|
99
|
+
"errors.content.changeMissing": "Planned document has no validated change.",
|
|
100
|
+
"errors.internal": "Internal server error."
|
|
101
|
+
};
|
|
102
|
+
const StudioErrorCode = Schema.Literals(Record.keys(studioErrorMessages));
|
|
103
|
+
const StudioErrorFields = {
|
|
104
|
+
code: Schema.optional(StudioErrorCode),
|
|
105
|
+
details: Schema.optional(Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Finite])))
|
|
106
|
+
};
|
|
107
|
+
const translate = createTranslator(studioErrorMessages, { fallbackLocale: "en" });
|
|
108
|
+
/** Creates typed reason metadata and the readable API fallback at the failure site. */
|
|
109
|
+
function studioErrorReason(code, ...args) {
|
|
110
|
+
return {
|
|
111
|
+
code,
|
|
112
|
+
details: args[0],
|
|
113
|
+
message: translate("en", code, ...args)
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { studioErrorReason as i, StudioErrorFields as n, studioErrorMessages as r, StudioErrorCode as t };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
//#region ../model/src/StudioErrors.d.ts
|
|
3
|
+
/** Stable built-in failure reasons. Site-provided validation messages have no code. */
|
|
4
|
+
declare const studioErrorMessages: {
|
|
5
|
+
readonly 'errors.request.invalid': "Please check the request and try again.";
|
|
6
|
+
readonly 'errors.request.trashPlan': "Trash plan does not match the page.";
|
|
7
|
+
readonly 'errors.request.workingVector': "A valid working state vector is required.";
|
|
8
|
+
readonly 'errors.auth.required': "Authentication required.";
|
|
9
|
+
readonly 'errors.auth.sameOrigin': "Same-origin request required.";
|
|
10
|
+
readonly 'errors.auth.editorRequired': "Editor access required.";
|
|
11
|
+
readonly 'errors.auth.administratorRequired': "Administrator access required.";
|
|
12
|
+
readonly 'errors.auth.alreadyInitialized': "Studio has already been initialized.";
|
|
13
|
+
readonly 'errors.auth.invalidSecret': "Invalid installation secret.";
|
|
14
|
+
readonly 'errors.auth.secretLength': "The installation secret must have at least 32 characters.";
|
|
15
|
+
readonly 'errors.document.notFound': "Document not found.";
|
|
16
|
+
readonly 'errors.document.changed': "Document changed; refresh and try again.";
|
|
17
|
+
readonly 'errors.document.homeReplace': "A collection home cannot be replaced or moved.";
|
|
18
|
+
readonly 'errors.document.homeMove': "A collection home cannot be moved.";
|
|
19
|
+
readonly 'errors.document.homePlacement': "Only the collection home can use the home placement.";
|
|
20
|
+
readonly 'errors.document.homeOffline': "A collection home cannot be taken offline.";
|
|
21
|
+
readonly 'errors.document.homeTrash': "A collection home cannot be moved to Trash.";
|
|
22
|
+
readonly 'errors.document.starterUnavailable': "This starter is no longer available.";
|
|
23
|
+
readonly 'errors.document.restoreEarlier': "Select an earlier revision to restore.";
|
|
24
|
+
readonly 'errors.document.translationLanguage': "Choose a configured nondefault language.";
|
|
25
|
+
readonly 'errors.document.translationLocale': "Translation language \"{locale}\" must be a configured nondefault language.";
|
|
26
|
+
readonly 'errors.document.referencedInTrash': "Unpublish or update \"{title}\" before moving its referenced page to Trash.";
|
|
27
|
+
readonly 'errors.collection.notConfigured': "Collection \"{collection}\" is not configured.";
|
|
28
|
+
readonly 'errors.collection.unavailable': "Collection is not configured.";
|
|
29
|
+
readonly 'errors.language.notConfigured': "Language \"{locale}\" is not configured.";
|
|
30
|
+
readonly 'errors.route.collection': "Collection \"{collection}\" does not exist.";
|
|
31
|
+
readonly 'errors.route.pattern': "Collection \"{collection}\" has an invalid route pattern.";
|
|
32
|
+
readonly 'errors.route.cycle': "Document placement has a cycle.";
|
|
33
|
+
readonly 'errors.route.home': "Collection has more than one home document.";
|
|
34
|
+
readonly 'errors.route.parent': "Document parent is missing or belongs to another collection.";
|
|
35
|
+
readonly 'errors.route.locale': "Public route \"{path}\" conflicts with a configured locale prefix.";
|
|
36
|
+
readonly 'errors.route.collision': "Another page uses the public address \"{path}\". Choose a different address.";
|
|
37
|
+
readonly 'errors.form.structure': "Each form needs steps with a title and at least one valid question.";
|
|
38
|
+
readonly 'errors.form.size': "This form is too large. Reduce the number or size of questions.";
|
|
39
|
+
readonly 'errors.form.identity': "Steps and questions must have unique identities.";
|
|
40
|
+
readonly 'errors.form.answerKeys': "Questions must have unique answer keys.";
|
|
41
|
+
readonly 'errors.form.answerKeyReserved': "This question answer key is reserved.";
|
|
42
|
+
readonly 'errors.form.typeUnavailable': "{label}: this question type is unavailable.";
|
|
43
|
+
readonly 'errors.form.requiredUnavailable': "{label}: making a question required is unavailable.";
|
|
44
|
+
readonly 'errors.form.minLengthUnavailable': "{label}: a minimum character limit is unavailable.";
|
|
45
|
+
readonly 'errors.form.maxLengthUnavailable': "{label}: a maximum character limit is unavailable.";
|
|
46
|
+
readonly 'errors.form.minUnavailable': "{label}: a minimum value is unavailable.";
|
|
47
|
+
readonly 'errors.form.maxUnavailable': "{label}: a maximum value is unavailable.";
|
|
48
|
+
readonly 'errors.form.textLimits': "{label}: length limits require a text question.";
|
|
49
|
+
readonly 'errors.form.numberLimits': "{label}: numeric limits require a number question.";
|
|
50
|
+
readonly 'errors.form.range': "{label}: minimum exceeds maximum.";
|
|
51
|
+
readonly 'errors.form.lengthRange': "{label}: minimum length exceeds maximum length.";
|
|
52
|
+
readonly 'errors.form.options': "{label}: choices need unique identities and at least one option.";
|
|
53
|
+
readonly 'errors.form.selectOptions': "{label}: choices require a select question.";
|
|
54
|
+
readonly 'errors.publication.duplicate': "Choose each page only once.";
|
|
55
|
+
readonly 'errors.publication.revisionMissing': "Selected revision is missing.";
|
|
56
|
+
readonly 'errors.publication.alreadyOffline': "This page is already offline.";
|
|
57
|
+
readonly 'errors.publication.reviewChanged': "Content changed while you were reviewing. Check the publication impact again.";
|
|
58
|
+
readonly 'errors.schedule.name': "Give the release a name of at most 120 characters.";
|
|
59
|
+
readonly 'errors.schedule.actor': "A scheduling actor is required.";
|
|
60
|
+
readonly 'errors.schedule.future': "Choose a future publication time.";
|
|
61
|
+
readonly 'errors.schedule.planChanged': "The publication plan changed. Check again before scheduling.";
|
|
62
|
+
readonly 'errors.schedule.notPending': "This release is no longer pending.";
|
|
63
|
+
readonly 'errors.schedule.runTime': "Invalid publication run time.";
|
|
64
|
+
readonly 'errors.schedule.conflict': "The scheduled publication conflicts with the current live page.";
|
|
65
|
+
readonly 'errors.schedule.missingPage': "A selected page is no longer available. Review and schedule publication again.";
|
|
66
|
+
readonly 'errors.schedule.alreadyScheduled': "A selected page already has an outstanding publication schedule. Cancel it before scheduling another.";
|
|
67
|
+
readonly 'errors.revisionPreview.unavailable': "Revision preview unavailable.";
|
|
68
|
+
readonly 'errors.revisionPreview.expiry': "Expiry must be a future ISO timestamp within 24 hours.";
|
|
69
|
+
readonly 'errors.revisionPreview.path': "Invalid preview path.";
|
|
70
|
+
readonly 'errors.revisionPreview.language': "The requested language is unavailable in this revision.";
|
|
71
|
+
readonly 'errors.revisionPreview.query': "Invalid document query.";
|
|
72
|
+
readonly 'errors.media.notFound': "Media asset not found.";
|
|
73
|
+
readonly 'errors.media.changed': "This media asset changed; refresh and try again.";
|
|
74
|
+
readonly 'errors.media.upload': "Invalid media upload.";
|
|
75
|
+
readonly 'errors.media.uploadConfiguration': "The media upload limit must be a positive byte count.";
|
|
76
|
+
readonly 'errors.media.uploadLimit': "Media exceeds the {limit} byte upload limit.";
|
|
77
|
+
readonly 'errors.media.sizeExceeded': "Media body exceeds its declared size.";
|
|
78
|
+
readonly 'errors.media.sizeMismatch': "Media body size does not match its declaration.";
|
|
79
|
+
readonly 'errors.media.typeMismatch': "The upload is not a supported file of its declared media type.";
|
|
80
|
+
readonly 'errors.media.checksum': "Media body checksum does not match its declaration.";
|
|
81
|
+
readonly 'errors.media.folderInvalid': "Enter a valid folder name.";
|
|
82
|
+
readonly 'errors.media.folderRequired': "Enter a folder name.";
|
|
83
|
+
readonly 'errors.media.folderExists': "A folder with this name already exists.";
|
|
84
|
+
readonly 'errors.media.inUse': "This file is used by saved content, a working document, or site SEO settings.";
|
|
85
|
+
readonly 'errors.seo.changed': "Site SEO changed; refresh and try again.";
|
|
86
|
+
readonly 'errors.seo.confirmationRequired': "Confirmation required.";
|
|
87
|
+
readonly 'errors.activity.invalidCursor': "Invalid Activity cursor.";
|
|
88
|
+
readonly 'errors.people.notFound': "Person not found.";
|
|
89
|
+
readonly 'errors.people.emailExists': "A person with this email already exists.";
|
|
90
|
+
readonly 'errors.people.ownRole': "You cannot change your own role.";
|
|
91
|
+
readonly 'errors.people.ownAccount': "You cannot remove your own account.";
|
|
92
|
+
readonly 'errors.people.invalidRole': "Person has an invalid role.";
|
|
93
|
+
readonly 'errors.people.secureRandom': "Secure random generation is unavailable.";
|
|
94
|
+
readonly 'errors.people.failed': "User administration failed.";
|
|
95
|
+
readonly 'errors.content.duplicateDocument': "Duplicate document {documentId} in content bundle.";
|
|
96
|
+
readonly 'errors.content.plannedMissing': "Planned document is missing from the import.";
|
|
97
|
+
readonly 'errors.content.unchangedMissing': "Unchanged document is missing from the installation.";
|
|
98
|
+
readonly 'errors.content.changeMissing': "Planned document has no validated change.";
|
|
99
|
+
readonly 'errors.internal': "Internal server error.";
|
|
100
|
+
};
|
|
101
|
+
declare const StudioErrorCode: Schema.Literals<("errors.request.invalid" | "errors.request.trashPlan" | "errors.request.workingVector" | "errors.auth.required" | "errors.auth.sameOrigin" | "errors.auth.editorRequired" | "errors.auth.administratorRequired" | "errors.auth.alreadyInitialized" | "errors.auth.invalidSecret" | "errors.auth.secretLength" | "errors.document.notFound" | "errors.document.changed" | "errors.document.homeReplace" | "errors.document.homeMove" | "errors.document.homePlacement" | "errors.document.homeOffline" | "errors.document.homeTrash" | "errors.document.starterUnavailable" | "errors.document.restoreEarlier" | "errors.document.translationLanguage" | "errors.document.translationLocale" | "errors.document.referencedInTrash" | "errors.collection.notConfigured" | "errors.collection.unavailable" | "errors.language.notConfigured" | "errors.route.collection" | "errors.route.pattern" | "errors.route.cycle" | "errors.route.home" | "errors.route.parent" | "errors.route.locale" | "errors.route.collision" | "errors.form.structure" | "errors.form.size" | "errors.form.identity" | "errors.form.answerKeys" | "errors.form.answerKeyReserved" | "errors.form.typeUnavailable" | "errors.form.requiredUnavailable" | "errors.form.minLengthUnavailable" | "errors.form.maxLengthUnavailable" | "errors.form.minUnavailable" | "errors.form.maxUnavailable" | "errors.form.textLimits" | "errors.form.numberLimits" | "errors.form.range" | "errors.form.lengthRange" | "errors.form.options" | "errors.form.selectOptions" | "errors.publication.duplicate" | "errors.publication.revisionMissing" | "errors.publication.alreadyOffline" | "errors.publication.reviewChanged" | "errors.schedule.name" | "errors.schedule.actor" | "errors.schedule.future" | "errors.schedule.planChanged" | "errors.schedule.notPending" | "errors.schedule.runTime" | "errors.schedule.conflict" | "errors.schedule.missingPage" | "errors.schedule.alreadyScheduled" | "errors.revisionPreview.unavailable" | "errors.revisionPreview.expiry" | "errors.revisionPreview.path" | "errors.revisionPreview.language" | "errors.revisionPreview.query" | "errors.media.notFound" | "errors.media.changed" | "errors.media.upload" | "errors.media.uploadConfiguration" | "errors.media.uploadLimit" | "errors.media.sizeExceeded" | "errors.media.sizeMismatch" | "errors.media.typeMismatch" | "errors.media.checksum" | "errors.media.folderInvalid" | "errors.media.folderRequired" | "errors.media.folderExists" | "errors.media.inUse" | "errors.seo.changed" | "errors.seo.confirmationRequired" | "errors.activity.invalidCursor" | "errors.people.notFound" | "errors.people.emailExists" | "errors.people.ownRole" | "errors.people.ownAccount" | "errors.people.invalidRole" | "errors.people.secureRandom" | "errors.people.failed" | "errors.content.duplicateDocument" | "errors.content.plannedMissing" | "errors.content.unchangedMissing" | "errors.content.changeMissing" | "errors.internal")[]>;
|
|
102
|
+
type StudioErrorCode = typeof StudioErrorCode.Type;
|
|
103
|
+
//#endregion
|
|
104
|
+
export { studioErrorMessages as n, StudioErrorCode as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./StudioErrors-kq-E44lQ.js";
|
|
2
|
+
import "./Database-DSsNCGft.js";
|
|
3
|
+
import { Context, Crypto, Effect, Layer, Schema } from "effect";
|
|
4
|
+
import { RequestEvent } from "nuxt/server";
|
|
5
|
+
//#region ../model/src/People.d.ts
|
|
6
|
+
declare const Role: Schema.Literals<readonly ["administrator", "editor", "viewer"]>;
|
|
7
|
+
type Role = typeof Role.Type;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region ../server/src/Authentication.d.ts
|
|
10
|
+
interface Actor {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly email: string;
|
|
14
|
+
readonly role: Role;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/StudioServer.d.ts
|
|
18
|
+
/** Authenticate a site-owned Studio endpoint with the CMS session. */
|
|
19
|
+
export declare function requireCmsStudioUser(event: RequestEvent, access?: 'administrator' | 'signed-in'): Promise<Actor>;
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as fetchCmsRequest } from "./plugin-DTYuDaQu.js";
|
|
2
|
+
import { o as Role } from "./People-DvNZauWw.js";
|
|
3
|
+
import { Result, Schema } from "effect";
|
|
4
|
+
import { createError, getRequestHeader, getRequestURL } from "nuxt/server";
|
|
5
|
+
//#region src/StudioServer.ts
|
|
6
|
+
const StudioActor = Schema.Struct({
|
|
7
|
+
id: Schema.NonEmptyString,
|
|
8
|
+
name: Schema.NonEmptyString,
|
|
9
|
+
email: Schema.NonEmptyString,
|
|
10
|
+
role: Role
|
|
11
|
+
});
|
|
12
|
+
/** Authenticate a site-owned Studio endpoint with the CMS session. */
|
|
13
|
+
async function requireCmsStudioUser(event, access = "signed-in") {
|
|
14
|
+
const url = new URL("/_cms/api/session", getRequestURL(event));
|
|
15
|
+
const cookie = getRequestHeader(event, "cookie");
|
|
16
|
+
const request = new Request(url, { headers: cookie ? { cookie } : void 0 });
|
|
17
|
+
const response = await fetchCmsRequest(request);
|
|
18
|
+
if (!response.ok) throw createError({
|
|
19
|
+
statusCode: response.status === 401 ? 401 : 503,
|
|
20
|
+
statusMessage: "Studio session unavailable."
|
|
21
|
+
});
|
|
22
|
+
const decoded = Schema.decodeUnknownResult(StudioActor)(await response.json());
|
|
23
|
+
if (Result.isFailure(decoded)) throw createError({
|
|
24
|
+
statusCode: 503,
|
|
25
|
+
statusMessage: "Invalid Studio session."
|
|
26
|
+
});
|
|
27
|
+
if (access === "administrator" && decoded.success.role !== "administrator") throw createError({
|
|
28
|
+
statusCode: 403,
|
|
29
|
+
statusMessage: "Administrator access required."
|
|
30
|
+
});
|
|
31
|
+
return decoded.success;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { requireCmsStudioUser };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { u as formAnswerKey } from "./contracts-rprW3ZOB.js";
|
|
2
|
+
import { Predicate } from "effect";
|
|
3
|
+
//#region ../model/src/internal/forms/answers.ts
|
|
4
|
+
function validateFormValues(fields, values) {
|
|
5
|
+
return Object.fromEntries(fields.flatMap((field) => {
|
|
6
|
+
const key = formAnswerKey(field);
|
|
7
|
+
const issue = fieldIssue(field, Object.hasOwn(values, key) ? values[key] : void 0);
|
|
8
|
+
return issue ? [[key, issue]] : [];
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
function fieldIssue(field, value) {
|
|
12
|
+
if (value === void 0 || value === null || value === "" || Predicate.isString(value) && !value.trim()) return field.required ? { code: "required" } : void 0;
|
|
13
|
+
if (field.type === "checkbox") return !Predicate.isBoolean(value) ? { code: "boolean" } : field.required && !value ? { code: "unchecked" } : void 0;
|
|
14
|
+
if (field.type === "number") {
|
|
15
|
+
if (!Predicate.isNumber(value) || !Number.isFinite(value)) return { code: "number" };
|
|
16
|
+
if (field.min !== void 0 && value < field.min) return {
|
|
17
|
+
code: "min",
|
|
18
|
+
limit: field.min
|
|
19
|
+
};
|
|
20
|
+
if (field.max !== void 0 && value > field.max) return {
|
|
21
|
+
code: "max",
|
|
22
|
+
limit: field.max
|
|
23
|
+
};
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (!Predicate.isString(value)) return { code: "text" };
|
|
27
|
+
if (field.type === "select" && !field.options.some((option) => option.id === value)) return { code: "option" };
|
|
28
|
+
if (field.type === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(value)) return { code: "email" };
|
|
29
|
+
if (field.type === "text" || field.type === "email" || field.type === "textarea") {
|
|
30
|
+
if (field.minLength !== void 0 && value.length < field.minLength) return {
|
|
31
|
+
code: "minLength",
|
|
32
|
+
limit: field.minLength
|
|
33
|
+
};
|
|
34
|
+
if (field.maxLength !== void 0 && value.length > field.maxLength) return {
|
|
35
|
+
code: "maxLength",
|
|
36
|
+
limit: field.maxLength
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { validateFormValues as t };
|