@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
|
@@ -1,114 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/runtime/delivery/useCmsDocumentSeo.ts
|
|
4
|
-
let installedAdapters;
|
|
5
|
-
/** Installs Nuxt's composables once before document page setup. */
|
|
6
|
-
function installCmsDocumentSeoAdapters(adapters) {
|
|
7
|
-
installedAdapters = adapters;
|
|
8
|
-
}
|
|
9
|
-
function useCmsDocumentSeo(document) {
|
|
10
|
-
const adapters = installedCmsDocumentSeoAdapters();
|
|
11
|
-
const current = computed(() => toValue(document));
|
|
12
|
-
const seo = computed(() => resolvedSeo(current.value));
|
|
13
|
-
adapters.seoMeta({
|
|
14
|
-
title: () => seo.value?.title,
|
|
15
|
-
description: () => seo.value?.description,
|
|
16
|
-
ogTitle: () => seo.value?.socialTitle,
|
|
17
|
-
ogDescription: () => seo.value?.socialDescription || (current.value?.draft ? seo.value?.title : void 0),
|
|
18
|
-
ogImage: () => seo.value?.socialImage?.url,
|
|
19
|
-
ogImageAlt: () => seo.value?.socialImage?.alt,
|
|
20
|
-
ogLocale: () => current.value?.locale,
|
|
21
|
-
ogUrl: () => seo.value?.canonicalUrl,
|
|
22
|
-
robots: () => seo.value && !current.value?.draft ? `${seo.value.index ? "index" : "noindex"}, ${seo.value.follow ? "follow" : "nofollow"}` : "noindex, nofollow"
|
|
23
|
-
});
|
|
24
|
-
adapters.locale(computed(() => current.value?.locale));
|
|
25
|
-
adapters.head(() => ({
|
|
26
|
-
...current.value?.locale ? { htmlAttrs: { lang: current.value.locale } } : void 0,
|
|
27
|
-
link: links(current.value, seo.value?.canonicalUrl),
|
|
28
|
-
titleTemplate: null
|
|
29
|
-
}));
|
|
30
|
-
adapters.robots(computed(() => ({
|
|
31
|
-
follow: current.value?.draft ? false : seo.value?.follow ?? false,
|
|
32
|
-
index: current.value?.draft ? false : seo.value?.index ?? false
|
|
33
|
-
})));
|
|
34
|
-
adapters.schema(computed(() => seo.value ? schemaNodes(seo.value, current.value?.locale) : []));
|
|
35
|
-
}
|
|
36
|
-
function links(document, canonicalUrl) {
|
|
37
|
-
const canonical = canonicalUrl ? [{
|
|
38
|
-
href: canonicalUrl,
|
|
39
|
-
rel: "canonical"
|
|
40
|
-
}] : [];
|
|
41
|
-
if (!canonicalUrl || !document?.alternatives) return canonical;
|
|
42
|
-
return [...canonical, ...document.alternatives.map((alternative) => ({
|
|
43
|
-
href: new URL(alternative.path, canonicalUrl).href,
|
|
44
|
-
hreflang: alternative.locale,
|
|
45
|
-
rel: "alternate"
|
|
46
|
-
}))];
|
|
47
|
-
}
|
|
48
|
-
function installedCmsDocumentSeoAdapters() {
|
|
49
|
-
if (!installedAdapters) throw new Error("The CMS document SEO adapter has not been installed.");
|
|
50
|
-
return installedAdapters;
|
|
51
|
-
}
|
|
52
|
-
function resolvedSeo(document) {
|
|
53
|
-
if (!document) return void 0;
|
|
54
|
-
if (document.resolvedSeo) return document.resolvedSeo;
|
|
55
|
-
return {
|
|
56
|
-
description: document.description,
|
|
57
|
-
follow: true,
|
|
58
|
-
index: true,
|
|
59
|
-
socialDescription: document.description,
|
|
60
|
-
socialTitle: document.title,
|
|
61
|
-
structuredData: { type: "WebPage" },
|
|
62
|
-
title: document.title
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function schemaNodes(seo, locale) {
|
|
66
|
-
const identity = seo.identity ? [identityNode(seo.identity)] : [];
|
|
67
|
-
if (!seo.structuredData) return identity;
|
|
68
|
-
const common = {
|
|
69
|
-
name: seo.title,
|
|
70
|
-
...seo.description ? { description: seo.description } : void 0,
|
|
71
|
-
...seo.socialImage ? { image: seo.socialImage.url } : void 0,
|
|
72
|
-
...seo.canonicalUrl ? { url: seo.canonicalUrl } : void 0,
|
|
73
|
-
...locale ? { inLanguage: locale } : void 0
|
|
74
|
-
};
|
|
75
|
-
if (seo.structuredData.type === "Article") return [...identity, {
|
|
76
|
-
"@type": "Article",
|
|
77
|
-
...common,
|
|
78
|
-
headline: seo.structuredData.headline ?? seo.title,
|
|
79
|
-
...seo.structuredData.datePublished ? { datePublished: seo.structuredData.datePublished } : void 0,
|
|
80
|
-
...seo.structuredData.dateModified ? { dateModified: seo.structuredData.dateModified } : void 0
|
|
81
|
-
}];
|
|
82
|
-
return [...identity, {
|
|
83
|
-
"@type": "WebPage",
|
|
84
|
-
...common
|
|
85
|
-
}];
|
|
86
|
-
}
|
|
87
|
-
function identityNode(identity) {
|
|
88
|
-
const common = {
|
|
89
|
-
"@type": identity.type,
|
|
90
|
-
name: identity.name,
|
|
91
|
-
...identity.url ? { url: identity.url } : void 0
|
|
92
|
-
};
|
|
93
|
-
switch (identity.type) {
|
|
94
|
-
case "Person": return {
|
|
95
|
-
...common,
|
|
96
|
-
...identity.image ? { image: identity.image.url } : void 0
|
|
97
|
-
};
|
|
98
|
-
case "Organization": return {
|
|
99
|
-
...common,
|
|
100
|
-
...identity.logo ? { logo: identity.logo.url } : void 0
|
|
101
|
-
};
|
|
102
|
-
case "LocalBusiness": return {
|
|
103
|
-
...common,
|
|
104
|
-
...identity.address ? { address: identity.address } : void 0,
|
|
105
|
-
...identity.image ? { image: identity.image.url } : void 0,
|
|
106
|
-
...identity.logo ? { logo: identity.logo.url } : void 0,
|
|
107
|
-
...identity.telephone ? { telephone: identity.telephone } : void 0
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
//#endregion
|
|
113
|
-
export { installCmsDocumentSeoAdapters, useCmsDocumentSeo };
|
|
114
|
-
//# sourceMappingURL=useCmsDocumentSeo.js.map
|
|
1
|
+
import { r as useCmsDocumentSeo } from "../../nuxtDelivery-BYX_Cddb.js";
|
|
2
|
+
export { useCmsDocumentSeo };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as decodeLocaleConfiguration } from "../../localeConfiguration-BPbkLi7-.js";
|
|
2
|
+
import { t as createLocaleContext } from "../../localeContext-DhF3SPvM.js";
|
|
3
|
+
import { useRouter, useRuntimeConfig } from "nuxt/app";
|
|
4
|
+
//#region src/runtime/delivery/useCmsLocale.ts
|
|
5
|
+
/** URL locale and site-path helpers; UI message catalogs belong to the Nuxt site. */
|
|
6
|
+
function useCmsLocale() {
|
|
7
|
+
return createLocaleContext(useRouter().currentRoute, decodeLocaleConfiguration(useRuntimeConfig().public.cmsLocales));
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useCmsLocale };
|
package/src/runtime/plugin.js
CHANGED
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { diagnosticFromCause, renderDiagnostic } from "../internal/diagnostics.js";
|
|
4
|
-
import { Effect } from "effect";
|
|
5
|
-
import { defineNitroPlugin, useNitroApp, useRuntimeConfig } from "nitropack/runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/runtime/plugin.ts
|
|
8
|
-
function createInstallationPlugin(authored, authoring) {
|
|
9
|
-
return defineNitroPlugin((nitro) => {
|
|
10
|
-
if (nitro.cmsInstallation) throw new Error("The CMS installation is already registered with Nitro.");
|
|
11
|
-
let configuration;
|
|
12
|
-
try {
|
|
13
|
-
configuration = resolveCmsInstallation(authored, useRuntimeConfig().cms, authoring);
|
|
14
|
-
} catch (cause) {
|
|
15
|
-
throw new Error(renderDiagnostic(diagnosticFromCause("startup.configuration", cause), false), { cause });
|
|
16
|
-
}
|
|
17
|
-
const installation = Effect.runPromise(installCms(configuration)).catch((cause) => {
|
|
18
|
-
throw new Error(renderDiagnostic(diagnosticFromCause("startup.installation", cause), false), { cause });
|
|
19
|
-
});
|
|
20
|
-
nitro.cmsInstallation = installation;
|
|
21
|
-
installation.catch((cause) => {
|
|
22
|
-
nitro.captureError(cause instanceof Error ? cause : new Error(String(cause)), {
|
|
23
|
-
fatal: true,
|
|
24
|
-
tags: ["cms"]
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
nitro.hooks.hook("close", () => installation.then((current) => current.close(), () => void 0).finally(() => {
|
|
28
|
-
if (nitro.cmsInstallation === installation) nitro.cmsInstallation = void 0;
|
|
29
|
-
}));
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function useCmsInstallation() {
|
|
33
|
-
const installation = useNitroApp().cmsInstallation;
|
|
34
|
-
if (!installation) throw new Error("The CMS installation has not been registered with Nitro.");
|
|
35
|
-
return installation;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
export { createInstallationPlugin, useCmsInstallation };
|
|
40
|
-
//# sourceMappingURL=plugin.js.map
|
|
1
|
+
import { n as fetchCmsRequest, t as createCmsPlugin } from "../plugin-DTYuDaQu.js";
|
|
2
|
+
export { createCmsPlugin, fetchCmsRequest };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
[data-cms-preview-overlay] {
|
|
2
|
+
pointer-events: none !important;
|
|
3
|
+
position: fixed;
|
|
4
|
+
inset: 0;
|
|
5
|
+
z-index: 2147483647;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-cms-selection-outline],
|
|
9
|
+
[data-cms-hover-outline] {
|
|
10
|
+
all: initial;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
position: fixed;
|
|
13
|
+
pointer-events: none !important;
|
|
14
|
+
border-radius: 6px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[data-cms-selection-outline] {
|
|
18
|
+
border: 1px solid rgb(99 102 241 / 55%);
|
|
19
|
+
box-shadow: 0 0 0 1px rgb(255 255 255 / 65%);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-cms-selection-outline]::before {
|
|
23
|
+
--cms-corner: linear-gradient(#6366f1, #6366f1);
|
|
24
|
+
content: '';
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: -1px;
|
|
27
|
+
border-radius: inherit;
|
|
28
|
+
background:
|
|
29
|
+
var(--cms-corner) left top / 10px 2px,
|
|
30
|
+
var(--cms-corner) left top / 2px 10px,
|
|
31
|
+
var(--cms-corner) right top / 10px 2px,
|
|
32
|
+
var(--cms-corner) right top / 2px 10px,
|
|
33
|
+
var(--cms-corner) left bottom / 10px 2px,
|
|
34
|
+
var(--cms-corner) left bottom / 2px 10px,
|
|
35
|
+
var(--cms-corner) right bottom / 10px 2px,
|
|
36
|
+
var(--cms-corner) right bottom / 2px 10px;
|
|
37
|
+
background-repeat: no-repeat;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-cms-selection-outline][data-cms-fallback] {
|
|
41
|
+
border-style: dashed;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-cms-hover-outline] {
|
|
45
|
+
border: 1px dashed #71717a;
|
|
46
|
+
box-shadow: 0 0 0 1px rgb(255 255 255 / 65%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-cms-selection-outline][hidden],
|
|
50
|
+
[data-cms-hover-outline][hidden] {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-cms-selection-label] {
|
|
55
|
+
all: initial;
|
|
56
|
+
position: absolute;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 6px;
|
|
61
|
+
max-width: min(240px, calc(100vw - 8px));
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
height: 24px;
|
|
64
|
+
padding: 0 9px;
|
|
65
|
+
border: 1px solid rgb(0 0 0 / 10%);
|
|
66
|
+
border-radius: 999px;
|
|
67
|
+
background: #fff;
|
|
68
|
+
box-shadow:
|
|
69
|
+
0 2px 6px rgb(0 0 0 / 12%),
|
|
70
|
+
0 0 0 1px rgb(255 255 255 / 65%);
|
|
71
|
+
color: #27272a;
|
|
72
|
+
font:
|
|
73
|
+
500 11px/16px system-ui,
|
|
74
|
+
sans-serif;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-cms-selection-label]::before {
|
|
79
|
+
content: '';
|
|
80
|
+
flex: 0 0 12px;
|
|
81
|
+
height: 12px;
|
|
82
|
+
background: #52525b;
|
|
83
|
+
mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="m16 3 5 5M3 21l4-1L21 6a2.8 2.8 0 0 0-4-4L3 16z"/%3E%3C/svg%3E')
|
|
84
|
+
center / contain no-repeat;
|
|
85
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { _ as savedRevisionPreviewSelection, f as revisionPreviewRequested, l as revisionPreviewNavigationLocation, p as revisionPreviewToken } from "../RevisionPreview-IVwbJ9Wy.js";
|
|
2
|
+
import { i as StudioPreviewModeMessage, r as StudioFocusMessage } from "../PreviewFocus-C_EelZO5.js";
|
|
3
|
+
import { a as blockRenderingKey, i as blockRenderingCatalog, n as previewSourceAt, r as revealPreviewElement, t as previewMatchForSource } from "../previewRegions-CXjk5cbP.js";
|
|
4
|
+
import { t as previewContextKey } from "../previewContext-dt3ZUh-w.js";
|
|
5
|
+
import { n as createPreviewSources } from "../previewSource-fb-q3ESM.js";
|
|
6
|
+
import { n as localeConfigurationKey } from "../locales-6OD4XGIZ.js";
|
|
7
|
+
import { i as previewRouteLocation, n as previewDocumentId, r as previewDocumentQueryKey, t as decodeLocaleConfiguration } from "../localeConfiguration-BPbkLi7-.js";
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
import { computed, nextTick, shallowRef, watch } from "vue";
|
|
10
|
+
import { defineNuxtPlugin, onNuxtReady, useHead, useResponseHeader, useRoute, useRouter, useRuntimeConfig, useState } from "nuxt/app";
|
|
11
|
+
import { useEventListener } from "@vueuse/core";
|
|
12
|
+
//#region src/internal/previewLinks.ts
|
|
13
|
+
/** Select mode consumes link activation even outside authored content. */
|
|
14
|
+
function preventPreviewLinkNavigation(event) {
|
|
15
|
+
if (!(event.target instanceof Element) || !event.target.closest("a[href]")) return;
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
event.stopPropagation();
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/internal/previewOverlay.ts
|
|
21
|
+
const outlineOutset = 3;
|
|
22
|
+
const viewportInset = 4;
|
|
23
|
+
const labelHeight = 24;
|
|
24
|
+
const labelGap = 8;
|
|
25
|
+
/** Preview chrome lives above the site so selecting content never changes its layout. */
|
|
26
|
+
function mountPreviewOverlay(root, view) {
|
|
27
|
+
const host = root.createElement("div");
|
|
28
|
+
host.setAttribute("data-cms-preview-overlay", "");
|
|
29
|
+
host.setAttribute("aria-hidden", "true");
|
|
30
|
+
const selection = root.createElement("div");
|
|
31
|
+
selection.setAttribute("data-cms-selection-outline", "");
|
|
32
|
+
selection.hidden = true;
|
|
33
|
+
const label = root.createElement("span");
|
|
34
|
+
label.setAttribute("data-cms-selection-label", "");
|
|
35
|
+
selection.append(label);
|
|
36
|
+
const hover = root.createElement("div");
|
|
37
|
+
hover.setAttribute("data-cms-hover-outline", "");
|
|
38
|
+
hover.hidden = true;
|
|
39
|
+
host.append(selection, hover);
|
|
40
|
+
root.documentElement.append(host);
|
|
41
|
+
let selected = null;
|
|
42
|
+
let hovered = null;
|
|
43
|
+
let frame = 0;
|
|
44
|
+
function position(outline, target) {
|
|
45
|
+
const rect = target?.isConnected ? target.getBoundingClientRect() : null;
|
|
46
|
+
if (!rect || rect.width <= 0 || rect.height <= 0 || rect.bottom <= 0 || rect.top >= view.innerHeight || rect.right <= 0 || rect.left >= view.innerWidth) {
|
|
47
|
+
outline.hidden = true;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
outline.hidden = false;
|
|
51
|
+
const left = Math.max(2, rect.left - outlineOutset);
|
|
52
|
+
const right = Math.min(view.innerWidth - 2, rect.right + outlineOutset);
|
|
53
|
+
outline.style.left = `${left}px`;
|
|
54
|
+
const top = rect.top - outlineOutset;
|
|
55
|
+
outline.style.top = `${top}px`;
|
|
56
|
+
outline.style.width = `${Math.max(0, right - left)}px`;
|
|
57
|
+
outline.style.height = `${rect.height + 6}px`;
|
|
58
|
+
if (outline !== selection) return;
|
|
59
|
+
const labelWidth = label.offsetWidth;
|
|
60
|
+
label.style.left = `${Math.max(viewportInset - left, Math.min(0, view.innerWidth - viewportInset - labelWidth - left))}px`;
|
|
61
|
+
const labelTop = rect.top >= 36 ? rect.top - labelHeight - labelGap : Math.max(viewportInset, top + labelGap);
|
|
62
|
+
label.style.top = `${labelTop - top}px`;
|
|
63
|
+
}
|
|
64
|
+
function positionAll() {
|
|
65
|
+
position(selection, selected);
|
|
66
|
+
position(hover, hovered === selected ? null : hovered);
|
|
67
|
+
}
|
|
68
|
+
function tick() {
|
|
69
|
+
frame = 0;
|
|
70
|
+
positionAll();
|
|
71
|
+
if (selected || hovered) frame = view.requestAnimationFrame(tick);
|
|
72
|
+
}
|
|
73
|
+
function update() {
|
|
74
|
+
positionAll();
|
|
75
|
+
if (!frame && (selected || hovered)) frame = view.requestAnimationFrame(tick);
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
select(target, text = "Content", fallback = false) {
|
|
79
|
+
selected = target;
|
|
80
|
+
label.textContent = fallback ? `Approximate · ${text}` : text;
|
|
81
|
+
selection.toggleAttribute("data-cms-fallback", fallback);
|
|
82
|
+
update();
|
|
83
|
+
},
|
|
84
|
+
hover(target) {
|
|
85
|
+
hovered = target;
|
|
86
|
+
update();
|
|
87
|
+
},
|
|
88
|
+
clear() {
|
|
89
|
+
selected = null;
|
|
90
|
+
hovered = null;
|
|
91
|
+
update();
|
|
92
|
+
},
|
|
93
|
+
destroy() {
|
|
94
|
+
if (frame) view.cancelAnimationFrame(frame);
|
|
95
|
+
host.remove();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/runtime/revisionPreview.ts
|
|
101
|
+
/** Saved previews browse the normal website, independently in each request and browser tab. */
|
|
102
|
+
function setupRevisionPreview() {
|
|
103
|
+
const router = useRouter();
|
|
104
|
+
const token = computed(() => revisionPreviewToken(router.currentRoute.value));
|
|
105
|
+
const selection = computed(() => savedRevisionPreviewSelection(router.currentRoute.value));
|
|
106
|
+
const requested = computed(() => revisionPreviewRequested(router.currentRoute.value));
|
|
107
|
+
const scope = useState("cms-revision-scope", () => crypto.randomUUID());
|
|
108
|
+
watch(() => [
|
|
109
|
+
token.value,
|
|
110
|
+
selection.value?.documentId,
|
|
111
|
+
selection.value?.revisionId
|
|
112
|
+
], () => {
|
|
113
|
+
scope.value = crypto.randomUUID();
|
|
114
|
+
}, { flush: "sync" });
|
|
115
|
+
useHead(() => requested.value ? { meta: [{
|
|
116
|
+
name: "robots",
|
|
117
|
+
content: "noindex, nofollow"
|
|
118
|
+
}, {
|
|
119
|
+
name: "referrer",
|
|
120
|
+
content: "no-referrer"
|
|
121
|
+
}] } : {});
|
|
122
|
+
router.beforeEach((to, from) => {
|
|
123
|
+
const destination = revisionPreviewNavigationLocation(to.fullPath, from);
|
|
124
|
+
if (!destination || revisionPreviewRequested(to) || to.path === "/_cms" || to.path.startsWith("/_cms/")) return;
|
|
125
|
+
return destination;
|
|
126
|
+
});
|
|
127
|
+
if (import.meta.client) useEventListener(document, ["click", "auxclick"], (event) => {
|
|
128
|
+
const current = router.currentRoute.value;
|
|
129
|
+
const link = event.target instanceof Element ? event.target.closest("a[href]") : null;
|
|
130
|
+
if (!revisionPreviewRequested(current) || !(link instanceof HTMLAnchorElement) || link.hasAttribute("download") || link.getAttribute("href")?.startsWith("#")) return;
|
|
131
|
+
const destination = new URL(link.href);
|
|
132
|
+
if (destination.origin !== location.origin || destination.pathname === "/_cms" || destination.pathname.startsWith("/_cms/")) return;
|
|
133
|
+
const preview = revisionPreviewNavigationLocation(`${destination.pathname}${destination.search}${destination.hash}`, current);
|
|
134
|
+
if (preview) link.href = preview;
|
|
135
|
+
}, { capture: true });
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/runtime/preview.ts
|
|
139
|
+
/** Keep preview delivery, focus, and privacy attached to the site's own route. */
|
|
140
|
+
function createCmsPreviewPlugin(collections, blocks) {
|
|
141
|
+
const rendering = blockRenderingCatalog(blocks);
|
|
142
|
+
return defineNuxtPlugin((nuxtApp) => {
|
|
143
|
+
nuxtApp.vueApp.provide(blockRenderingKey, rendering);
|
|
144
|
+
nuxtApp.vueApp.provide(localeConfigurationKey, decodeLocaleConfiguration(useRuntimeConfig().public.cmsLocales));
|
|
145
|
+
setupRevisionPreview();
|
|
146
|
+
const route = useRoute();
|
|
147
|
+
const documentId = computed(() => revisionPreviewRequested(route) ? null : previewDocumentId(route.query[previewDocumentQueryKey]));
|
|
148
|
+
const mode = shallowRef(route.query.mode === "browse" ? "browse" : "edit");
|
|
149
|
+
const active = computed(() => documentId.value !== null);
|
|
150
|
+
const interactive = computed(() => active.value && mode.value === "edit");
|
|
151
|
+
const mapped = interactive;
|
|
152
|
+
nuxtApp.vueApp.provide(previewContextKey, {
|
|
153
|
+
documentId,
|
|
154
|
+
interactive,
|
|
155
|
+
mapped,
|
|
156
|
+
sources: createPreviewSources(collections, blocks)
|
|
157
|
+
});
|
|
158
|
+
useHead(() => active.value ? { meta: [{
|
|
159
|
+
name: "robots",
|
|
160
|
+
content: "noindex, nofollow"
|
|
161
|
+
}] } : {});
|
|
162
|
+
if (import.meta.server && active.value) {
|
|
163
|
+
useResponseHeader("cache-control").value = "private, no-store";
|
|
164
|
+
useResponseHeader("x-frame-options").value = "SAMEORIGIN";
|
|
165
|
+
}
|
|
166
|
+
if (import.meta.client) {
|
|
167
|
+
let overlay = documentId.value ? mountPreviewOverlay(document, window) : null;
|
|
168
|
+
let pointerFrame = 0;
|
|
169
|
+
let pointerTarget = null;
|
|
170
|
+
watch(documentId, (id) => {
|
|
171
|
+
overlay?.clear();
|
|
172
|
+
if (id) overlay ??= mountPreviewOverlay(document, window);
|
|
173
|
+
else {
|
|
174
|
+
overlay?.destroy();
|
|
175
|
+
overlay = null;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
watch(() => route.query.mode, (value) => {
|
|
179
|
+
mode.value = value === "browse" ? "browse" : "edit";
|
|
180
|
+
});
|
|
181
|
+
watch(interactive, (value) => {
|
|
182
|
+
if (!value) overlay?.clear();
|
|
183
|
+
});
|
|
184
|
+
useEventListener(window, "message", async (event) => {
|
|
185
|
+
const id = documentId.value;
|
|
186
|
+
if (!id || event.origin !== window.location.origin || event.source !== window.parent) return;
|
|
187
|
+
if (Schema.is(StudioPreviewModeMessage)(event.data) && event.data.documentId === id) {
|
|
188
|
+
mode.value = event.data.mode;
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if (!mapped.value || !Schema.is(StudioFocusMessage)(event.data) || event.data.documentId !== id) return;
|
|
192
|
+
const target = event.data.target;
|
|
193
|
+
await nextTick();
|
|
194
|
+
if (!mapped.value || documentId.value !== id) return;
|
|
195
|
+
const match = previewMatchForSource(document, event.data.documentId, target);
|
|
196
|
+
overlay?.select(match?.element ?? null, previewSelectionLabel(target), match?.exact === false);
|
|
197
|
+
if (match && event.data.reveal) revealPreviewElement(match.element, window);
|
|
198
|
+
});
|
|
199
|
+
useEventListener(document, "pointermove", (event) => {
|
|
200
|
+
pointerTarget = event.target instanceof Element ? event.target : null;
|
|
201
|
+
if (pointerFrame) return;
|
|
202
|
+
pointerFrame = window.requestAnimationFrame(() => {
|
|
203
|
+
pointerFrame = 0;
|
|
204
|
+
const id = documentId.value;
|
|
205
|
+
const target = pointerTarget;
|
|
206
|
+
if (!interactive.value || !id || !target) {
|
|
207
|
+
overlay?.hover(null);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const source = previewSourceAt(document, target, id);
|
|
211
|
+
const match = source ? previewMatchForSource(document, source.documentId, source.target) : null;
|
|
212
|
+
overlay?.hover(match?.element ?? null);
|
|
213
|
+
});
|
|
214
|
+
}, { capture: true });
|
|
215
|
+
useEventListener(document, "pointerout", (event) => {
|
|
216
|
+
if (!(event.relatedTarget instanceof Element)) {
|
|
217
|
+
pointerTarget = null;
|
|
218
|
+
overlay?.hover(null);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
useEventListener(window, "pagehide", () => {
|
|
222
|
+
if (pointerFrame) window.cancelAnimationFrame(pointerFrame);
|
|
223
|
+
overlay?.destroy();
|
|
224
|
+
overlay = null;
|
|
225
|
+
});
|
|
226
|
+
useEventListener(document, ["click", "auxclick"], (event) => {
|
|
227
|
+
const id = documentId.value;
|
|
228
|
+
if (!id || !(event.target instanceof Element)) return;
|
|
229
|
+
if (!interactive.value) {
|
|
230
|
+
if (event.type !== "click") return;
|
|
231
|
+
const link = event.target.closest("a[href]");
|
|
232
|
+
if (!(link instanceof HTMLAnchorElement) || link.target || link.hasAttribute("download") || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
233
|
+
const destination = new URL(link.href, window.location.href);
|
|
234
|
+
if (destination.origin !== window.location.origin || destination.pathname === "/_cms" || destination.pathname.startsWith("/_cms/")) return;
|
|
235
|
+
if (destination.pathname === window.location.pathname && destination.search === window.location.search && destination.hash) return;
|
|
236
|
+
event.preventDefault();
|
|
237
|
+
event.stopPropagation();
|
|
238
|
+
window.location.assign(previewRouteLocation(`${destination.pathname}${destination.search}${destination.hash}`, id, 0, true));
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
preventPreviewLinkNavigation(event);
|
|
242
|
+
if (event.type !== "click" || event.button !== 0) return;
|
|
243
|
+
const source = previewSourceAt(document, event.target, id);
|
|
244
|
+
if (!source) return;
|
|
245
|
+
event.preventDefault();
|
|
246
|
+
event.stopPropagation();
|
|
247
|
+
const match = previewMatchForSource(document, source.documentId, source.target);
|
|
248
|
+
overlay?.select(match?.element ?? null, previewSelectionLabel(source.target), source.approximate || match?.exact === false);
|
|
249
|
+
window.parent.postMessage({
|
|
250
|
+
type: "cms-preview:activate",
|
|
251
|
+
...source
|
|
252
|
+
}, window.location.origin);
|
|
253
|
+
}, { capture: true });
|
|
254
|
+
const announceReady = () => {
|
|
255
|
+
const id = documentId.value;
|
|
256
|
+
if (!id) return;
|
|
257
|
+
window.parent.postMessage({
|
|
258
|
+
type: "cms-preview:ready",
|
|
259
|
+
documentId: id
|
|
260
|
+
}, window.location.origin);
|
|
261
|
+
window.parent.postMessage({
|
|
262
|
+
type: "cms-preview:navigate",
|
|
263
|
+
path: route.path
|
|
264
|
+
}, window.location.origin);
|
|
265
|
+
};
|
|
266
|
+
onNuxtReady(announceReady);
|
|
267
|
+
nuxtApp.hook("page:finish", announceReady);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
function previewSelectionLabel(target) {
|
|
272
|
+
if (target.kind === "title") return "Title";
|
|
273
|
+
if (target.kind === "field" || target.kind === "blockField") return "Field";
|
|
274
|
+
return "Content";
|
|
275
|
+
}
|
|
276
|
+
//#endregion
|
|
277
|
+
export { createCmsPreviewPlugin };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { a as encodePreviewSource, n as PreviewSource } from "../PreviewFocus-C_EelZO5.js";
|
|
2
|
+
import { t as previewContextKey } from "../previewContext-dt3ZUh-w.js";
|
|
3
|
+
import { t as combinePreviewSources } from "../previewSource-fb-q3ESM.js";
|
|
4
|
+
import { Schema } from "effect";
|
|
5
|
+
import { Fragment, cloneVNode, createCommentVNode, defineComponent, getCurrentInstance, h, inject } from "vue";
|
|
6
|
+
//#region src/runtime/previewSource.ts
|
|
7
|
+
const componentSourcesKey = Symbol("cms-component-sources");
|
|
8
|
+
const ComponentSources = Schema.Record(Schema.String, Schema.NullOr(PreviewSource));
|
|
9
|
+
/** Fragment markers survive site components which intentionally discard inherited attributes. */
|
|
10
|
+
const CmsPreviewRegion = defineComponent({
|
|
11
|
+
name: "CmsPreviewRegion",
|
|
12
|
+
inheritAttrs: false,
|
|
13
|
+
props: {
|
|
14
|
+
source: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: null
|
|
17
|
+
},
|
|
18
|
+
properties: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(props, { slots }) {
|
|
24
|
+
const preview = inject(previewContextKey, null);
|
|
25
|
+
return () => {
|
|
26
|
+
const children = slots.default?.() ?? [];
|
|
27
|
+
const source = preview?.mapped.value ? props.source : null;
|
|
28
|
+
const rendered = preview?.mapped.value ? children.map((child) => {
|
|
29
|
+
const node = cloneVNode(child);
|
|
30
|
+
node.props = Object.assign({}, node.props, { [componentSourcesKey]: props.properties });
|
|
31
|
+
node.key = `${String(node.key ?? "")}:cms:${JSON.stringify(props.properties)}`;
|
|
32
|
+
return node;
|
|
33
|
+
}) : children;
|
|
34
|
+
if (!source) return rendered;
|
|
35
|
+
const encoded = encodePreviewSource(source);
|
|
36
|
+
return h(Fragment, null, [
|
|
37
|
+
createCommentVNode(`cms-source:${encoded}:start`),
|
|
38
|
+
...rendered,
|
|
39
|
+
createCommentVNode(`cms-source:${encoded}:end`)
|
|
40
|
+
]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
/** Called only by generated site-template bindings, with provenance from delivery and block metadata. */
|
|
45
|
+
function useCmsPreviewSource() {
|
|
46
|
+
const preview = inject(previewContextKey, null);
|
|
47
|
+
const instance = getCurrentInstance();
|
|
48
|
+
function property(value, name) {
|
|
49
|
+
return preview?.mapped.value ? preview.sources?.property(value, name) ?? null : null;
|
|
50
|
+
}
|
|
51
|
+
function prop(name) {
|
|
52
|
+
if (!preview?.mapped.value) return null;
|
|
53
|
+
let component = instance;
|
|
54
|
+
while (component) {
|
|
55
|
+
const properties = Object.getOwnPropertyDescriptor(component.vnode?.props ?? {}, componentSourcesKey)?.value;
|
|
56
|
+
if (Schema.is(ComponentSources)(properties)) return properties[name] ?? null;
|
|
57
|
+
const parent = component.parent;
|
|
58
|
+
if (!parent || !Object.hasOwn(parent.type, "__asyncLoader")) break;
|
|
59
|
+
component = parent;
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function object(value) {
|
|
64
|
+
return preview?.mapped.value ? preview.sources?.object(value) ?? null : null;
|
|
65
|
+
}
|
|
66
|
+
function combine(sources) {
|
|
67
|
+
return preview?.mapped.value ? combinePreviewSources(sources) : null;
|
|
68
|
+
}
|
|
69
|
+
function encode(sources) {
|
|
70
|
+
const source = combine(sources);
|
|
71
|
+
return source ? encodePreviewSource(source) : void 0;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
property,
|
|
75
|
+
prop,
|
|
76
|
+
object,
|
|
77
|
+
combine,
|
|
78
|
+
encode
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { CmsPreviewRegion, useCmsPreviewSource };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../RevisionPreview-IVwbJ9Wy.js";
|
|
2
|
+
import { defineEventHandler } from "nuxt/server";
|
|
3
|
+
//#region src/runtime/revisionPrivacy.ts
|
|
4
|
+
/** Apply privacy before SSR or a redirect, including malformed-link and rendering failures. */
|
|
5
|
+
var revisionPrivacy_default = defineEventHandler((event) => {
|
|
6
|
+
const url = new URL(event.req.url);
|
|
7
|
+
if (url.pathname !== "/_cms/revision-preview" && !url.pathname.startsWith(`/_cms/revision-preview/`) && !url.pathname.startsWith("/_cms/api/revision-preview/") && !url.searchParams.has("__cms_revision") && !url.searchParams.has("__cms_saved_document") && !url.searchParams.has("__cms_saved_revision")) return;
|
|
8
|
+
event.res.headers.set("cache-control", "private, no-store");
|
|
9
|
+
event.res.headers.set("referrer-policy", "no-referrer");
|
|
10
|
+
event.res.headers.set("x-robots-tag", "noindex, nofollow");
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { revisionPrivacy_default as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineEventHandler } from "nuxt/server";
|
|
2
|
+
//#region src/runtime/studio.ts
|
|
3
|
+
const shell = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Studio</title><link rel="stylesheet" href="/_cms/assets/host.css"></head><body><div id="cms-studio"></div><script type="module" src="/_cms/assets/host.js"><\/script></body></html>`;
|
|
4
|
+
var studio_default = defineEventHandler((event) => {
|
|
5
|
+
event.res.headers.set("content-type", "text/html; charset=utf-8");
|
|
6
|
+
event.res.headers.set("cache-control", "no-store");
|
|
7
|
+
return shell;
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { studio_default as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineEventHandler } from "nuxt/server";
|
|
2
|
+
import lucide from "@iconify-json/lucide/icons.json" with { type: "json" };
|
|
3
|
+
//#region src/internal/studioIcons.ts
|
|
4
|
+
const availableIcons = lucide.icons;
|
|
5
|
+
const availableAliases = lucide.aliases;
|
|
6
|
+
/** Preserve aliases and their parents so Iconify applies the original geometry. */
|
|
7
|
+
function studioIcons(names) {
|
|
8
|
+
const icons = {};
|
|
9
|
+
const aliases = {};
|
|
10
|
+
function include(name) {
|
|
11
|
+
if (Object.hasOwn(icons, name) || Object.hasOwn(aliases, name)) return;
|
|
12
|
+
if (Object.hasOwn(availableIcons, name)) icons[name] = availableIcons[name];
|
|
13
|
+
else if (Object.hasOwn(availableAliases, name)) {
|
|
14
|
+
const alias = availableAliases[name];
|
|
15
|
+
aliases[name] = alias;
|
|
16
|
+
include(alias.parent);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
for (const name of names) include(name);
|
|
20
|
+
return {
|
|
21
|
+
prefix: lucide.prefix,
|
|
22
|
+
width: lucide.width,
|
|
23
|
+
height: lucide.height,
|
|
24
|
+
icons,
|
|
25
|
+
aliases
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/runtime/studioIcons.ts
|
|
30
|
+
var studioIcons_default = defineEventHandler((event) => {
|
|
31
|
+
const names = new URL(event.req.url).searchParams.get("names")?.split(",") ?? [];
|
|
32
|
+
event.res.headers.set("cache-control", "public, max-age=3600");
|
|
33
|
+
return studioIcons(names);
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { studioIcons_default as default };
|