@phtngyn/cms 0.2.0-beta.8 → 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 -404
- 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 +1040 -152
- 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 +8793 -39395
- package/studio/host.js.br +0 -0
- package/studio/host.js.gz +0 -0
- package/CHANGELOG.md +0 -14
- package/bin/cms.mjs +0 -2
- package/src/ApplicationTypes.d.ts +0 -84
- package/src/ApplicationTypes.js +0 -1
- package/src/Configuration-CMweD9bn.js +0 -1191
- package/src/Configuration-CMweD9bn.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-tYtwbBjr.js +0 -978
- package/src/DocumentEngine-tYtwbBjr.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-Be3vshPJ.js +0 -20
- package/src/HttpPaths-Be3vshPJ.js.map +0 -1
- package/src/I18n-wxswIRyY.d.ts +0 -30
- 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-BXfjaZOu.js +0 -2756
- package/src/S3MediaObjects-BXfjaZOu.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-3I_pozUl.js +0 -535
- package/src/dev-lifecycle-3I_pozUl.js.map +0 -1
- package/src/installation-DxqSSVbH.js +0 -9105
- package/src/installation-DxqSSVbH.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 -104
- 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 -58
- 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-C4_JBo1w.js +0 -335
- package/studio/SelectMenu-wXqxymUw.js +0 -34045
- 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,130 @@
|
|
|
1
|
+
import { l as DocumentId } from "./Document-CKXMSEf1.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
//#region ../model/src/internal/forms/contracts.ts
|
|
4
|
+
const FORM_SUBMISSION_MAX_BYTES = 131072;
|
|
5
|
+
const FORM_REVISION_MAX_BYTES = 6e4;
|
|
6
|
+
const FormFieldType = Schema.Literals([
|
|
7
|
+
"text",
|
|
8
|
+
"email",
|
|
9
|
+
"textarea",
|
|
10
|
+
"number",
|
|
11
|
+
"checkbox",
|
|
12
|
+
"select"
|
|
13
|
+
]);
|
|
14
|
+
const FormRule = Schema.Literals([
|
|
15
|
+
"required",
|
|
16
|
+
"minLength",
|
|
17
|
+
"maxLength",
|
|
18
|
+
"min",
|
|
19
|
+
"max"
|
|
20
|
+
]);
|
|
21
|
+
const FormCapabilities = Schema.Struct({
|
|
22
|
+
label: Schema.NonEmptyString,
|
|
23
|
+
fieldTypes: Schema.Array(FormFieldType).check(Schema.isMinLength(1)),
|
|
24
|
+
rules: Schema.Array(FormRule)
|
|
25
|
+
});
|
|
26
|
+
const FormOption = Schema.Struct({
|
|
27
|
+
id: Schema.NonEmptyString,
|
|
28
|
+
label: Schema.NonEmptyString
|
|
29
|
+
});
|
|
30
|
+
const fieldBase = {
|
|
31
|
+
id: Schema.NonEmptyString,
|
|
32
|
+
label: Schema.NonEmptyString,
|
|
33
|
+
answerKey: Schema.optionalKey(Schema.NonEmptyString),
|
|
34
|
+
help: Schema.optionalKey(Schema.String),
|
|
35
|
+
required: Schema.optionalKey(Schema.Boolean)
|
|
36
|
+
};
|
|
37
|
+
const textField = (type) => Schema.Struct({
|
|
38
|
+
...fieldBase,
|
|
39
|
+
type: Schema.Literals([type]),
|
|
40
|
+
minLength: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
|
|
41
|
+
maxLength: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)))
|
|
42
|
+
});
|
|
43
|
+
const FormField = Schema.Union([
|
|
44
|
+
textField("text"),
|
|
45
|
+
textField("email"),
|
|
46
|
+
textField("textarea"),
|
|
47
|
+
Schema.Struct({
|
|
48
|
+
...fieldBase,
|
|
49
|
+
type: Schema.Literal("number"),
|
|
50
|
+
min: Schema.optionalKey(Schema.Finite),
|
|
51
|
+
max: Schema.optionalKey(Schema.Finite)
|
|
52
|
+
}),
|
|
53
|
+
Schema.Struct({
|
|
54
|
+
...fieldBase,
|
|
55
|
+
type: Schema.Literal("checkbox")
|
|
56
|
+
}),
|
|
57
|
+
Schema.Struct({
|
|
58
|
+
...fieldBase,
|
|
59
|
+
type: Schema.Literal("select"),
|
|
60
|
+
options: Schema.NonEmptyArray(FormOption)
|
|
61
|
+
})
|
|
62
|
+
]);
|
|
63
|
+
const FormStep = Schema.Struct({
|
|
64
|
+
id: Schema.NonEmptyString,
|
|
65
|
+
title: Schema.NonEmptyString,
|
|
66
|
+
fields: Schema.Array(FormField).check(Schema.isMinLength(1), Schema.isMaxLength(100))
|
|
67
|
+
});
|
|
68
|
+
const FormSteps = Schema.Array(FormStep).check(Schema.isMinLength(1), Schema.isMaxLength(20));
|
|
69
|
+
const referenceFields = {
|
|
70
|
+
documentId: DocumentId,
|
|
71
|
+
locale: Schema.optionalKey(Schema.String),
|
|
72
|
+
blockId: Schema.String.check(Schema.isUUID()),
|
|
73
|
+
revision: Schema.String.check(Schema.isMaxLength(FORM_REVISION_MAX_BYTES))
|
|
74
|
+
};
|
|
75
|
+
const FormReference = Schema.Struct(referenceFields);
|
|
76
|
+
const FormValues = Schema.Record(Schema.String, Schema.Union([
|
|
77
|
+
Schema.String,
|
|
78
|
+
Schema.Finite,
|
|
79
|
+
Schema.Boolean,
|
|
80
|
+
Schema.Null
|
|
81
|
+
]));
|
|
82
|
+
const FormSubmission = Schema.Struct({
|
|
83
|
+
...referenceFields,
|
|
84
|
+
values: FormValues
|
|
85
|
+
});
|
|
86
|
+
const FormIssue = Schema.Union([
|
|
87
|
+
Schema.Struct({ code: Schema.Literals([
|
|
88
|
+
"required",
|
|
89
|
+
"unchecked",
|
|
90
|
+
"boolean",
|
|
91
|
+
"number",
|
|
92
|
+
"text",
|
|
93
|
+
"option",
|
|
94
|
+
"email",
|
|
95
|
+
"unknownAnswers",
|
|
96
|
+
"rejected"
|
|
97
|
+
]) }),
|
|
98
|
+
Schema.Struct({
|
|
99
|
+
code: Schema.Literals(["min", "max"]),
|
|
100
|
+
limit: Schema.Finite
|
|
101
|
+
}),
|
|
102
|
+
Schema.Struct({
|
|
103
|
+
code: Schema.Literals(["minLength", "maxLength"]),
|
|
104
|
+
limit: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))
|
|
105
|
+
}),
|
|
106
|
+
Schema.Struct({
|
|
107
|
+
code: Schema.Literal("custom"),
|
|
108
|
+
message: Schema.NonEmptyString
|
|
109
|
+
})
|
|
110
|
+
]);
|
|
111
|
+
const FormErrors = Schema.Record(Schema.String, FormIssue);
|
|
112
|
+
const FormResult = Schema.Union([
|
|
113
|
+
Schema.Struct({
|
|
114
|
+
status: Schema.Literal("accepted"),
|
|
115
|
+
reference: Schema.optionalKey(Schema.NonEmptyString)
|
|
116
|
+
}),
|
|
117
|
+
Schema.Struct({
|
|
118
|
+
status: Schema.Literal("invalid"),
|
|
119
|
+
errors: FormErrors
|
|
120
|
+
}),
|
|
121
|
+
Schema.Struct({ status: Schema.Literal("stale") }),
|
|
122
|
+
Schema.Struct({ status: Schema.Literal("unavailable") }),
|
|
123
|
+
Schema.Struct({ status: Schema.Literal("failed") })
|
|
124
|
+
]);
|
|
125
|
+
/** The submission name is independent of the question's authoring identity. */
|
|
126
|
+
function formAnswerKey(field) {
|
|
127
|
+
return field.answerKey ?? field.id;
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
export { FormOption as a, FormSteps as c, FormFieldType as i, FormSubmission as l, FORM_SUBMISSION_MAX_BYTES as n, FormReference as o, FormCapabilities as r, FormResult as s, FORM_REVISION_MAX_BYTES as t, formAnswerKey as u };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { n as FormDefinition } from "./Forms-BuKAXQxr.js";
|
|
2
|
+
import "./Fields-BegSgYhj.js";
|
|
3
|
+
import { i as RevisionRenderNode, r as PublishedDocument } from "./Document-TgwYKJZM.js";
|
|
4
|
+
import { n as DocumentQueryItem, r as DocumentQueryPage } from "./Query-C0kGJF5_.js";
|
|
5
|
+
import { Schema } from "effect";
|
|
6
|
+
//#region ../model/src/RevisionPreview.d.ts
|
|
7
|
+
declare const RevisionPreviewDocument: Schema.Struct<{
|
|
8
|
+
readonly mode: Schema.Literal<"revision">;
|
|
9
|
+
readonly primary: Schema.Boolean;
|
|
10
|
+
readonly identity: Schema.Struct<{
|
|
11
|
+
readonly documentId: Schema.brand<Schema.String, "DocumentId">;
|
|
12
|
+
readonly collection: Schema.NonEmptyString;
|
|
13
|
+
}>;
|
|
14
|
+
readonly revision: Schema.Struct<{
|
|
15
|
+
readonly id: Schema.brand<Schema.String, "RevisionId">;
|
|
16
|
+
readonly number: Schema.Int;
|
|
17
|
+
readonly savedAt: Schema.String;
|
|
18
|
+
}>;
|
|
19
|
+
readonly expiresAt: Schema.NullOr<Schema.String>;
|
|
20
|
+
readonly previewPath: Schema.Literal<"/_cms/revision-preview">;
|
|
21
|
+
readonly logicalPath: Schema.NullOr<Schema.String>;
|
|
22
|
+
readonly livePath: Schema.NullOr<Schema.String>;
|
|
23
|
+
readonly locale: Schema.optionalKey<Schema.NonEmptyString>;
|
|
24
|
+
readonly requestedLocale: Schema.optionalKey<Schema.NonEmptyString>;
|
|
25
|
+
readonly settings: Schema.Struct<{
|
|
26
|
+
readonly placement: Schema.Union<readonly [Schema.Struct<{
|
|
27
|
+
readonly kind: Schema.Literal<"home">;
|
|
28
|
+
}>, Schema.Struct<{
|
|
29
|
+
readonly kind: Schema.Literal<"entry">;
|
|
30
|
+
readonly parentDocumentId: Schema.brand<Schema.String, "DocumentId">;
|
|
31
|
+
readonly slug: Schema.NonEmptyString;
|
|
32
|
+
}>]>;
|
|
33
|
+
readonly seo: Schema.optionalKey<Schema.Struct<{
|
|
34
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
35
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
36
|
+
readonly socialTitle: Schema.optionalKey<Schema.String>;
|
|
37
|
+
readonly socialDescription: Schema.optionalKey<Schema.String>;
|
|
38
|
+
readonly socialImage: Schema.optionalKey<Schema.Struct<{
|
|
39
|
+
readonly mediaId: Schema.brand<Schema.String, "MediaId">;
|
|
40
|
+
readonly alt: Schema.String;
|
|
41
|
+
}>>;
|
|
42
|
+
readonly index: Schema.optionalKey<Schema.Boolean>;
|
|
43
|
+
readonly follow: Schema.optionalKey<Schema.Boolean>;
|
|
44
|
+
readonly canonicalUrl: Schema.optionalKey<Schema.String>;
|
|
45
|
+
readonly structuredData: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
46
|
+
readonly type: Schema.Literal<"WebPage">;
|
|
47
|
+
}>, Schema.Struct<{
|
|
48
|
+
readonly type: Schema.Literal<"Article">;
|
|
49
|
+
readonly headline: Schema.optionalKey<Schema.String>;
|
|
50
|
+
readonly datePublished: Schema.optionalKey<Schema.String>;
|
|
51
|
+
readonly dateModified: Schema.optionalKey<Schema.String>;
|
|
52
|
+
}>]>>;
|
|
53
|
+
}>>;
|
|
54
|
+
readonly translatedSeo: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
55
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
56
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
57
|
+
readonly socialTitle: Schema.optionalKey<Schema.String>;
|
|
58
|
+
readonly socialDescription: Schema.optionalKey<Schema.String>;
|
|
59
|
+
readonly socialImage: Schema.optionalKey<Schema.Struct<{
|
|
60
|
+
readonly mediaId: Schema.brand<Schema.String, "MediaId">;
|
|
61
|
+
readonly alt: Schema.String;
|
|
62
|
+
}>>;
|
|
63
|
+
readonly index: Schema.optionalKey<Schema.Boolean>;
|
|
64
|
+
readonly follow: Schema.optionalKey<Schema.Boolean>;
|
|
65
|
+
readonly canonicalUrl: Schema.optionalKey<Schema.String>;
|
|
66
|
+
readonly structuredData: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
67
|
+
readonly type: Schema.Literal<"WebPage">;
|
|
68
|
+
}>, Schema.Struct<{
|
|
69
|
+
readonly type: Schema.Literal<"Article">;
|
|
70
|
+
readonly headline: Schema.optionalKey<Schema.String>;
|
|
71
|
+
readonly datePublished: Schema.optionalKey<Schema.String>;
|
|
72
|
+
readonly dateModified: Schema.optionalKey<Schema.String>;
|
|
73
|
+
}>]>>;
|
|
74
|
+
}>>>;
|
|
75
|
+
}>;
|
|
76
|
+
readonly content: Schema.Struct<{
|
|
77
|
+
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
78
|
+
readonly body: Schema.Struct<{
|
|
79
|
+
readonly type: Schema.Literal<"doc">;
|
|
80
|
+
readonly content: Schema.$Array<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
81
|
+
}>;
|
|
82
|
+
}>;
|
|
83
|
+
readonly renderPlan: Schema.Struct<{
|
|
84
|
+
readonly fields: Schema.Struct<{
|
|
85
|
+
readonly mode: Schema.Literals<readonly ["current", "readable"]>;
|
|
86
|
+
readonly values: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
87
|
+
}>;
|
|
88
|
+
readonly body: Schema.$Array<Schema.Codec<RevisionRenderNode, RevisionRenderNode, never, never>>;
|
|
89
|
+
}>;
|
|
90
|
+
readonly issues: Schema.$Array<Schema.Struct<{
|
|
91
|
+
readonly severity: Schema.Literal<"warning">;
|
|
92
|
+
readonly recovery: Schema.Literals<readonly ["render", "readable", "placeholder", "disabled"]>;
|
|
93
|
+
readonly code: Schema.String;
|
|
94
|
+
readonly location: Schema.Union<readonly [Schema.Struct<{
|
|
95
|
+
readonly kind: Schema.Literal<"field">;
|
|
96
|
+
readonly path: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Int]>>;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
readonly kind: Schema.Literal<"block">;
|
|
99
|
+
readonly blockId: Schema.optionalKey<Schema.String>;
|
|
100
|
+
readonly path: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Int]>>;
|
|
101
|
+
}>, Schema.Struct<{
|
|
102
|
+
readonly kind: Schema.Literal<"seo">;
|
|
103
|
+
readonly path: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Int]>>;
|
|
104
|
+
}>, Schema.Struct<{
|
|
105
|
+
readonly kind: Schema.Literal<"placement">;
|
|
106
|
+
}>, Schema.Struct<{
|
|
107
|
+
readonly kind: Schema.Literal<"body">;
|
|
108
|
+
readonly path: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Int]>>>;
|
|
109
|
+
}>, Schema.Struct<{
|
|
110
|
+
readonly kind: Schema.Literal<"document">;
|
|
111
|
+
}>]>;
|
|
112
|
+
readonly message: Schema.String;
|
|
113
|
+
readonly details: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
114
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
115
|
+
}>>;
|
|
116
|
+
/** null explicitly disables a destination; a renderer must never fall back to its stored old path. */
|
|
117
|
+
readonly referencePaths: Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>;
|
|
118
|
+
readonly forms: Schema.$Array<Schema.Struct<{
|
|
119
|
+
readonly name: Schema.String;
|
|
120
|
+
readonly steps: Schema.$Array<Schema.Struct<{
|
|
121
|
+
readonly id: Schema.NonEmptyString;
|
|
122
|
+
readonly title: Schema.NonEmptyString;
|
|
123
|
+
readonly fields: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
124
|
+
readonly type: Schema.Literals<readonly ["text"]>;
|
|
125
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
126
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
127
|
+
readonly id: Schema.NonEmptyString;
|
|
128
|
+
readonly label: Schema.NonEmptyString;
|
|
129
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
130
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
131
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
132
|
+
}>, Schema.Struct<{
|
|
133
|
+
readonly type: Schema.Literals<readonly ["email"]>;
|
|
134
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
135
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
136
|
+
readonly id: Schema.NonEmptyString;
|
|
137
|
+
readonly label: Schema.NonEmptyString;
|
|
138
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
139
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
140
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
141
|
+
}>, Schema.Struct<{
|
|
142
|
+
readonly type: Schema.Literals<readonly ["textarea"]>;
|
|
143
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
144
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
145
|
+
readonly id: Schema.NonEmptyString;
|
|
146
|
+
readonly label: Schema.NonEmptyString;
|
|
147
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
148
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
149
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
150
|
+
}>, Schema.Struct<{
|
|
151
|
+
readonly type: Schema.Literal<"number">;
|
|
152
|
+
readonly min: Schema.optionalKey<Schema.Finite>;
|
|
153
|
+
readonly max: Schema.optionalKey<Schema.Finite>;
|
|
154
|
+
readonly id: Schema.NonEmptyString;
|
|
155
|
+
readonly label: Schema.NonEmptyString;
|
|
156
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
157
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
158
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
159
|
+
}>, Schema.Struct<{
|
|
160
|
+
readonly type: Schema.Literal<"checkbox">;
|
|
161
|
+
readonly id: Schema.NonEmptyString;
|
|
162
|
+
readonly label: Schema.NonEmptyString;
|
|
163
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
164
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
165
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
166
|
+
}>, Schema.Struct<{
|
|
167
|
+
readonly type: Schema.Literal<"select">;
|
|
168
|
+
readonly options: Schema.NonEmptyArray<Schema.Struct<{
|
|
169
|
+
readonly id: Schema.NonEmptyString;
|
|
170
|
+
readonly label: Schema.NonEmptyString;
|
|
171
|
+
}>>;
|
|
172
|
+
readonly id: Schema.NonEmptyString;
|
|
173
|
+
readonly label: Schema.NonEmptyString;
|
|
174
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
175
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
176
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
177
|
+
}>]>>;
|
|
178
|
+
}>>;
|
|
179
|
+
readonly preview: Schema.Literal<true>;
|
|
180
|
+
readonly documentId: Schema.brand<Schema.String, "DocumentId">;
|
|
181
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
182
|
+
readonly blockId: Schema.String;
|
|
183
|
+
readonly revision: Schema.String;
|
|
184
|
+
}>>;
|
|
185
|
+
}>;
|
|
186
|
+
interface RevisionPreviewDocument extends Schema.Schema.Type<typeof RevisionPreviewDocument> {}
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/internal/forms.d.ts
|
|
189
|
+
interface RevisionRendering extends Pick<RevisionPreviewDocument, 'expiresAt' | 'primary' | 'livePath'> {}
|
|
190
|
+
interface DeliveredDocument extends PublishedDocument {
|
|
191
|
+
readonly forms?: ReadonlyArray<FormDefinition>;
|
|
192
|
+
readonly revisionPreview?: RevisionRendering;
|
|
193
|
+
/** SSR recovery is serialized so hydration renders the same readable regions. */
|
|
194
|
+
renderFailures?: string[];
|
|
195
|
+
}
|
|
196
|
+
interface DeliveredQueryItem extends DocumentQueryItem {
|
|
197
|
+
readonly forms?: ReadonlyArray<FormDefinition>;
|
|
198
|
+
readonly revisionPreview?: RevisionRendering;
|
|
199
|
+
/** SSR recovery is serialized so hydration renders the same readable regions. */
|
|
200
|
+
renderFailures?: string[];
|
|
201
|
+
}
|
|
202
|
+
interface DeliveredDocumentPage extends Omit<DocumentQueryPage, 'items'> {
|
|
203
|
+
readonly items: ReadonlyArray<DeliveredQueryItem>;
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
export { DeliveredDocumentPage as n, DeliveredQueryItem as r, DeliveredDocument as t };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { l as DocumentId } from "./Document-CKXMSEf1.js";
|
|
2
|
+
import { n as LocaleConfiguration } from "./Locales-Ch7a5xuA.js";
|
|
3
|
+
import { Option, Schema } from "effect";
|
|
4
|
+
//#region ../model/src/PreviewRoute.ts
|
|
5
|
+
const previewDocumentQueryKey = "__cms_preview";
|
|
6
|
+
/** A query marker chooses working delivery, never authorization. */
|
|
7
|
+
function previewDocumentId(value) {
|
|
8
|
+
const decoded = Schema.decodeUnknownOption(DocumentId)(value);
|
|
9
|
+
return Option.isSome(decoded) ? decoded.value : null;
|
|
10
|
+
}
|
|
11
|
+
/** Keep the browser on the site's route while Studio opens a working preview. */
|
|
12
|
+
function previewRouteLocation(path, documentId, version, browse) {
|
|
13
|
+
const url = new URL(path, "https://cms.invalid");
|
|
14
|
+
if (url.origin !== "https://cms.invalid") throw new Error("Preview path must belong to this site.");
|
|
15
|
+
url.searchParams.set(previewDocumentQueryKey, documentId);
|
|
16
|
+
url.searchParams.set("v", String(version));
|
|
17
|
+
if (browse) url.searchParams.set("mode", "browse");
|
|
18
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/internal/localeConfiguration.ts
|
|
22
|
+
/** Public runtime configuration is an external boundary; language registries remain strict objects. */
|
|
23
|
+
function decodeLocaleConfiguration(configured) {
|
|
24
|
+
if (configured === void 0) return void 0;
|
|
25
|
+
try {
|
|
26
|
+
return Schema.decodeUnknownSync(LocaleConfiguration)(configured);
|
|
27
|
+
} catch (cause) {
|
|
28
|
+
throw new Error("Invalid CMS locale configuration in public.cmsLocales.", { cause });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { previewRouteLocation as i, previewDocumentId as n, previewDocumentQueryKey as r, decodeLocaleConfiguration as t };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { a as resolveLocale, t as Locale } from "./Locales-Ch7a5xuA.js";
|
|
2
|
+
import { l as revisionPreviewNavigationLocation } from "./RevisionPreview-IVwbJ9Wy.js";
|
|
3
|
+
import { n as previewDocumentId, r as previewDocumentQueryKey } from "./localeConfiguration-BPbkLi7-.js";
|
|
4
|
+
import { i as localePath, o as switchLocalePath, r as localeFromPath, s as unlocalizedPath } from "./Routes-BaZvm2LE.js";
|
|
5
|
+
import { Schema } from "effect";
|
|
6
|
+
import { computed, toValue } from "vue";
|
|
7
|
+
//#region src/runtime/delivery/internal/localeContext.ts
|
|
8
|
+
function revisionPreviewLocale(route) {
|
|
9
|
+
return route.path === "/_cms/revision-preview" && Object.hasOwn(route.query, "locale") ? Schema.decodeUnknownSync(Locale)(route.query.locale) : void 0;
|
|
10
|
+
}
|
|
11
|
+
/** Content URLs select language; the reserved preview address can select a retained translation. */
|
|
12
|
+
function createLocaleContext(route, configuration) {
|
|
13
|
+
const locales = configuration?.supported.map((definition) => resolveLocale(definition.code, configuration)) ?? [];
|
|
14
|
+
const defaultLocale = configuration?.defaultLocale;
|
|
15
|
+
const locale = computed(() => {
|
|
16
|
+
const current = toValue(route);
|
|
17
|
+
return revisionPreviewLocale(current) ?? localeFromPath(current.path, configuration);
|
|
18
|
+
});
|
|
19
|
+
const direction = computed(() => locale.value ? resolveLocale(locale.value, configuration).dir : "ltr");
|
|
20
|
+
const sitePath = computed(() => unlocalizedPath(toValue(route).path, configuration));
|
|
21
|
+
function localePath$1(path, code = locales.some((definition) => definition.code === locale.value) ? locale.value : defaultLocale) {
|
|
22
|
+
return code ? localePath(path, code, configuration) : path;
|
|
23
|
+
}
|
|
24
|
+
function switchLocalePath$1(code, destination) {
|
|
25
|
+
const current = toValue(route);
|
|
26
|
+
if (current.path === "/_cms/revision-preview" && destination === void 0) {
|
|
27
|
+
Schema.decodeSync(Locale)(code);
|
|
28
|
+
return revisionPreviewNavigationLocation(current.fullPath, current, code) ?? current.fullPath;
|
|
29
|
+
}
|
|
30
|
+
const path = destination === void 0 ? switchLocalePath(current.fullPath, code, configuration) : localePath(destination, code, configuration);
|
|
31
|
+
const saved = revisionPreviewNavigationLocation(path, current);
|
|
32
|
+
if (saved) return saved;
|
|
33
|
+
if (destination !== void 0 && previewDocumentId(current.query["__cms_preview"])) {
|
|
34
|
+
const target = new URL(path, "https://cms.invalid");
|
|
35
|
+
const source = new URL(current.fullPath, "https://cms.invalid");
|
|
36
|
+
for (const key of [
|
|
37
|
+
previewDocumentQueryKey,
|
|
38
|
+
"v",
|
|
39
|
+
"mode"
|
|
40
|
+
]) {
|
|
41
|
+
target.searchParams.delete(key);
|
|
42
|
+
for (const value of source.searchParams.getAll(key)) target.searchParams.append(key, value);
|
|
43
|
+
}
|
|
44
|
+
return `${target.pathname}${target.search}${target.hash}`;
|
|
45
|
+
}
|
|
46
|
+
return path;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
locale,
|
|
50
|
+
locales,
|
|
51
|
+
defaultLocale,
|
|
52
|
+
direction,
|
|
53
|
+
sitePath,
|
|
54
|
+
localePath: localePath$1,
|
|
55
|
+
switchLocalePath: switchLocalePath$1
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { revisionPreviewLocale as n, createLocaleContext as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a as resolveLocale } from "./Locales-Ch7a5xuA.js";
|
|
2
|
+
//#region src/internal/locales.ts
|
|
3
|
+
const localeConfigurationKey = Symbol("CMS locales");
|
|
4
|
+
/** Delivered language describes the content, which can differ from the surrounding site's requested language. */
|
|
5
|
+
function contentLanguageAttributes(locale, configuration) {
|
|
6
|
+
return locale ? {
|
|
7
|
+
lang: locale,
|
|
8
|
+
dir: resolveLocale(locale, configuration).dir
|
|
9
|
+
} : void 0;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { localeConfigurationKey as n, contentLanguageAttributes as t };
|