@phtngyn/cms 0.2.0-beta.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -10
- package/README.md +59 -401
- package/drizzle/20261003215543_initial/migration.sql +251 -0
- package/drizzle/20261003215543_initial/snapshot.json +1941 -0
- package/package.json +75 -71
- package/src/Authoring.d.ts +41 -49
- package/src/Authoring.js +1 -1
- package/src/Blocks-BrxSemnd.js +40 -0
- package/src/Client.d.ts +8186 -0
- package/src/Client.js +41 -0
- package/src/Collections.d.ts +142 -0
- package/src/Collections.js +142 -0
- package/src/Config-CMiwciub.js +130 -0
- package/src/Config.d.ts +172 -0
- package/src/Config.js +2 -0
- package/src/Configuration-Dk2k3OIc.js +73 -0
- package/src/DataTransfer-BmECvPHB.js +488 -0
- package/src/Database-DSsNCGft.d.ts +3 -0
- package/src/Delivery.d.ts +28 -0
- package/src/Delivery.js +7 -0
- package/src/Document-CKXMSEf1.js +293 -0
- package/src/Document-TgwYKJZM.d.ts +220 -0
- package/src/DocumentRenderer-Wz2xaNyf.js +394 -0
- package/src/EditorSchema-wrDv-id6.js +296 -0
- package/src/Fields-BegSgYhj.d.ts +166 -0
- package/src/Fields-ioGaMEh9.js +130 -0
- package/src/Forms-BuKAXQxr.d.ts +203 -0
- package/src/Forms.d.ts +48 -11
- package/src/Forms.js +342 -7
- package/src/I18n-Ckf9h0rC.js +154 -0
- package/src/I18n.d.ts +45 -2
- package/src/I18n.js +2 -1
- package/src/Image-CJWPLnhP.js +110 -0
- package/src/Links-CJYyy7rC.js +28 -0
- package/src/Links-Dx1yOni8.d.ts +28 -0
- package/src/Locales-Ch7a5xuA.js +67 -0
- package/src/Locales-jwbmJaOp.d.ts +43 -0
- package/src/Locales.d.ts +3 -0
- package/src/Locales.js +3 -0
- package/src/Media-BQ0uL4w7.d.ts +15 -0
- package/src/Media-DSyvd14o.js +87 -0
- package/src/Module.d.ts +2 -10
- package/src/Module.js +1039 -162
- package/src/Operations.d.ts +57 -0
- package/src/Operations.js +263 -0
- package/src/People-DvNZauWw.js +69 -0
- package/src/PreviewFocus-C_EelZO5.js +104 -0
- package/src/Query-C0kGJF5_.d.ts +261 -0
- package/src/RevisionPreview-IVwbJ9Wy.js +133 -0
- package/src/Routes-BaZvm2LE.js +126 -0
- package/src/Routes-DM1rRp3r.d.ts +15 -0
- package/src/S3MediaObjects-y-WacEi9.js +193 -0
- package/src/Seo-BcpqxoAs.d.ts +57 -0
- package/src/Seo-CjNUtUkj.js +254 -0
- package/src/StudioApi-CXLwwocX.js +833 -0
- package/src/StudioErrors-T5zLGQ1M.js +117 -0
- package/src/StudioErrors-kq-E44lQ.d.ts +104 -0
- package/src/StudioServer.d.ts +20 -0
- package/src/StudioServer.js +34 -0
- package/src/answers-DcTg0Xv2.js +41 -0
- package/src/cli.js +681 -187
- package/src/contracts-rprW3ZOB.js +130 -0
- package/src/forms-3xuf0Ym7.d.ts +206 -0
- package/src/localeConfiguration-BPbkLi7-.js +32 -0
- package/src/localeContext-DhF3SPvM.js +59 -0
- package/src/locales-6OD4XGIZ.js +12 -0
- package/src/nuxtDelivery-BYX_Cddb.js +466 -0
- package/src/plugin-DTYuDaQu.js +7171 -0
- package/src/previewContext-dt3ZUh-w.js +4 -0
- package/src/previewRegions-CXjk5cbP.js +145 -0
- package/src/previewSource-fb-q3ESM.js +144 -0
- package/src/rendering-D9LVeEKX.js +47 -0
- package/src/rolldown-runtime-8H4AJuhK.js +14 -0
- package/src/runtime/CmsImage.js +38 -0
- package/src/runtime/DocumentPage.vue +10 -0
- package/src/runtime/DocumentPageContent.js +48 -0
- package/src/runtime/DocumentRenderer.d.ts +129 -0
- package/src/runtime/DocumentRenderer.js +2 -0
- package/src/runtime/api.js +48 -6
- package/src/runtime/delivery/useCmsDocument.js +2 -0
- package/src/runtime/delivery/useCmsDocumentQuery.js +2 -0
- package/src/runtime/delivery/useCmsDocumentSeo.js +2 -114
- package/src/runtime/delivery/useCmsLocale.js +10 -0
- package/src/runtime/plugin.js +2 -40
- package/src/runtime/preview.css +85 -0
- package/src/runtime/preview.js +277 -0
- package/src/runtime/previewSource.js +82 -0
- package/src/runtime/revisionPrivacy.js +13 -0
- package/src/runtime/studio.js +10 -0
- package/src/runtime/studioIcons.js +36 -0
- package/src/validation-3pggwcnm.js +396 -0
- package/src/validation-DpUwPC8Y.js +224 -0
- package/studio/THIRD-PARTY-LICENSES.md +2406 -0
- package/studio/chunks/AccountPage-DL3DitDM.js +288 -0
- package/studio/chunks/AccountPage-DL3DitDM.js.br +0 -0
- package/studio/chunks/AccountPage-DL3DitDM.js.gz +0 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js +584 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js.br +0 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js.gz +0 -0
- package/studio/chunks/Alert-D0D24z_a.js +335 -0
- package/studio/chunks/Alert-D0D24z_a.js.br +0 -0
- package/studio/chunks/Alert-D0D24z_a.js.gz +0 -0
- package/studio/chunks/Badge-BBFs88TI.js +346 -0
- package/studio/chunks/Badge-BBFs88TI.js.br +0 -0
- package/studio/chunks/Badge-BBFs88TI.js.gz +0 -0
- package/studio/chunks/Button-BT3ztSPx.js +14319 -0
- package/studio/chunks/Button-BT3ztSPx.js.br +0 -0
- package/studio/chunks/Button-BT3ztSPx.js.gz +0 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js +246 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js.br +0 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js.gz +0 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js +1745 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js.br +0 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js.gz +0 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js +18 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js.br +0 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js.gz +0 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js +2413 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js.br +0 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js.gz +0 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js +26063 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.br +0 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.gz +0 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js +4400 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js.br +0 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js.gz +0 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js +7799 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js.br +0 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js.gz +0 -0
- package/studio/chunks/FormField-CgM6l2Yn.js +198 -0
- package/studio/chunks/FormField-CgM6l2Yn.js.br +0 -0
- package/studio/chunks/FormField-CgM6l2Yn.js.gz +0 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js +552 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js.br +0 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js.gz +0 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js +271 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js.br +0 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js.gz +0 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js +101 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.br +0 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.gz +0 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js +923 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js.br +0 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js.gz +0 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js +837 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js.br +0 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js.gz +0 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js +1173 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.br +0 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.gz +0 -0
- package/studio/chunks/Modal-D6hSvxHd.js +265 -0
- package/studio/chunks/Modal-D6hSvxHd.js.br +0 -0
- package/studio/chunks/Modal-D6hSvxHd.js.gz +0 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js +277 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.br +0 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.gz +0 -0
- package/studio/chunks/Pagination-D9BSo5H2.js +573 -0
- package/studio/chunks/Pagination-D9BSo5H2.js.br +0 -0
- package/studio/chunks/Pagination-D9BSo5H2.js.gz +0 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js +783 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js.br +0 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js.gz +0 -0
- package/studio/chunks/Popover-B63bkTMS.js +128 -0
- package/studio/chunks/Popover-B63bkTMS.js.br +0 -0
- package/studio/chunks/Popover-B63bkTMS.js.gz +0 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js +255 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.br +0 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.gz +0 -0
- package/studio/chunks/Routes-DLYHmulE.js +102 -0
- package/studio/chunks/Routes-DLYHmulE.js.br +0 -0
- package/studio/chunks/Routes-DLYHmulE.js.gz +0 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js +95 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js.br +0 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js.gz +0 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js +332 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js.br +0 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js.gz +0 -0
- package/studio/chunks/Search-BEgCe9Aj.js +14646 -0
- package/studio/chunks/Search-BEgCe9Aj.js.br +0 -0
- package/studio/chunks/Search-BEgCe9Aj.js.gz +0 -0
- package/studio/chunks/Select-B50WZMW-.js +2145 -0
- package/studio/chunks/Select-B50WZMW-.js.br +0 -0
- package/studio/chunks/Select-B50WZMW-.js.gz +0 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js +2109 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js.br +0 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js.gz +0 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js +846 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js.br +0 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js.gz +0 -0
- package/studio/chunks/Skeleton-COz8dcrw.js +39 -0
- package/studio/chunks/Skeleton-COz8dcrw.js.br +2 -0
- package/studio/chunks/Skeleton-COz8dcrw.js.gz +0 -0
- package/studio/chunks/Slideover-QMMHAAys.js +289 -0
- package/studio/chunks/Slideover-QMMHAAys.js.br +0 -0
- package/studio/chunks/Slideover-QMMHAAys.js.gz +0 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js +80 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js.br +0 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js.gz +0 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js +2524 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.br +0 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.gz +0 -0
- package/studio/chunks/Switch-qKl1aDn7.js +484 -0
- package/studio/chunks/Switch-qKl1aDn7.js.br +0 -0
- package/studio/chunks/Switch-qKl1aDn7.js.gz +0 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js +29 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js.br +0 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js.gz +0 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js +693 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js.br +0 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js.gz +0 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js +12 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js.br +0 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js.gz +0 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js +2349 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js.br +0 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js.gz +0 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js +113 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.br +0 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.gz +0 -0
- package/studio/chunks/arrays-CUJkmV4I.js +10 -0
- package/studio/chunks/arrays-CUJkmV4I.js.br +0 -0
- package/studio/chunks/arrays-CUJkmV4I.js.gz +0 -0
- package/studio/chunks/base-DkTekJe8.js +213 -0
- package/studio/chunks/base-DkTekJe8.js.br +0 -0
- package/studio/chunks/base-DkTekJe8.js.gz +0 -0
- package/studio/chunks/content-DUGl3N4d.js +6012 -0
- package/studio/chunks/content-DUGl3N4d.js.br +0 -0
- package/studio/chunks/content-DUGl3N4d.js.gz +0 -0
- package/studio/chunks/destinations-DPIQVQa6.js +227 -0
- package/studio/chunks/destinations-DPIQVQa6.js.br +0 -0
- package/studio/chunks/destinations-DPIQVQa6.js.gz +0 -0
- package/studio/chunks/en-073cjKW4.js +152 -0
- package/studio/chunks/en-073cjKW4.js.br +0 -0
- package/studio/chunks/en-073cjKW4.js.gz +0 -0
- package/studio/chunks/en-Bn8mxPuf.js +134 -0
- package/studio/chunks/en-Bn8mxPuf.js.br +0 -0
- package/studio/chunks/en-Bn8mxPuf.js.gz +0 -0
- package/studio/chunks/en-C9OiaUDZ.js +251 -0
- package/studio/chunks/en-C9OiaUDZ.js.br +0 -0
- package/studio/chunks/en-C9OiaUDZ.js.gz +0 -0
- package/studio/chunks/en-CHAR6jzx.js +147 -0
- package/studio/chunks/en-CHAR6jzx.js.br +0 -0
- package/studio/chunks/en-CHAR6jzx.js.gz +0 -0
- package/studio/chunks/en-Cq4N1vEF.js +93 -0
- package/studio/chunks/en-Cq4N1vEF.js.br +2 -0
- package/studio/chunks/en-Cq4N1vEF.js.gz +0 -0
- package/studio/chunks/en-D2hRqlse.js +140 -0
- package/studio/chunks/en-D2hRqlse.js.br +0 -0
- package/studio/chunks/en-D2hRqlse.js.gz +0 -0
- package/studio/chunks/en-DiUC3-j6.js +144 -0
- package/studio/chunks/en-DiUC3-j6.js.br +0 -0
- package/studio/chunks/en-DiUC3-j6.js.gz +0 -0
- package/studio/chunks/english-Cs_Adu-u.js +8 -0
- package/studio/chunks/english-Cs_Adu-u.js.br +0 -0
- package/studio/chunks/english-Cs_Adu-u.js.gz +0 -0
- package/studio/chunks/esm-D6DqSiL1.js +752 -0
- package/studio/chunks/esm-D6DqSiL1.js.br +0 -0
- package/studio/chunks/esm-D6DqSiL1.js.gz +0 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js +23 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js.br +0 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js.gz +0 -0
- package/studio/chunks/iconify-DR9ryCPv.js +1007 -0
- package/studio/chunks/iconify-DR9ryCPv.js.br +0 -0
- package/studio/chunks/iconify-DR9ryCPv.js.gz +0 -0
- package/studio/chunks/icons-D2MsAaXq.js +183 -0
- package/studio/chunks/icons-D2MsAaXq.js.br +0 -0
- package/studio/chunks/icons-D2MsAaXq.js.gz +0 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js +26 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js.br +0 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js.gz +0 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js +238 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js.br +0 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js.gz +0 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js +17 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js.br +0 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js.gz +0 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js +77 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js.br +0 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js.gz +0 -0
- package/studio/chunks/notifications-OKOLc40v.js +110 -0
- package/studio/chunks/notifications-OKOLc40v.js.br +0 -0
- package/studio/chunks/notifications-OKOLc40v.js.gz +0 -0
- package/studio/chunks/operations-CjNHyrEX.js +57 -0
- package/studio/chunks/operations-CjNHyrEX.js.br +0 -0
- package/studio/chunks/operations-CjNHyrEX.js.gz +0 -0
- package/studio/chunks/overlay-DnqFLZTc.js +1733 -0
- package/studio/chunks/overlay-DnqFLZTc.js.br +0 -0
- package/studio/chunks/overlay-DnqFLZTc.js.gz +0 -0
- package/studio/chunks/presentation-DF83w0hE.js +57 -0
- package/studio/chunks/presentation-DF83w0hE.js.br +0 -0
- package/studio/chunks/presentation-DF83w0hE.js.gz +0 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js +4557 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.br +0 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.gz +0 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js +76 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js.br +0 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js.gz +0 -0
- package/studio/chunks/status-DQv6ihkU.js +38 -0
- package/studio/chunks/status-DQv6ihkU.js.br +0 -0
- package/studio/chunks/status-DQv6ihkU.js.gz +0 -0
- package/studio/chunks/studioContext-I8HozGU1.js +4953 -0
- package/studio/chunks/studioContext-I8HozGU1.js.br +0 -0
- package/studio/chunks/studioContext-I8HozGU1.js.gz +0 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js +73 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js.br +0 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js.gz +0 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js +1095 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js.br +0 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js.gz +0 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js +62 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.br +0 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.gz +0 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js +189 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.br +0 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.gz +0 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js +16 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js.br +3 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js.gz +0 -0
- package/studio/chunks/useFilter-DzyiTR7f.js +87 -0
- package/studio/chunks/useFilter-DzyiTR7f.js.br +0 -0
- package/studio/chunks/useFilter-DzyiTR7f.js.gz +0 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js +8 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js.br +0 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js.gz +0 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js +154 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js.br +0 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js.gz +0 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js +44 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.br +8 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.gz +0 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js +35 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js.br +0 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js.gz +0 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js +16 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js.br +0 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js.gz +0 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js +298 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js.br +0 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js.gz +0 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js +79 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js.br +0 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js.gz +0 -0
- package/studio/chunks/utils-mdScC0v0.js +59 -0
- package/studio/chunks/utils-mdScC0v0.js.br +0 -0
- package/studio/chunks/utils-mdScC0v0.js.gz +0 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js +781 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js.br +0 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js.gz +0 -0
- package/studio/help/64f767fe29c2-save-and-publish.svg +7 -0
- package/studio/host.css +1 -1
- package/studio/host.css.br +0 -0
- package/studio/host.css.gz +0 -0
- package/studio/host.js +8757 -39178
- package/studio/host.js.br +0 -0
- package/studio/host.js.gz +0 -0
- package/CHANGELOG.md +0 -13
- package/bin/cms.mjs +0 -2
- package/src/ApplicationTypes.d.ts +0 -84
- package/src/ApplicationTypes.js +0 -1
- package/src/Configuration-Da5B2PVH.js +0 -1191
- package/src/Configuration-Da5B2PVH.js.map +0 -1
- package/src/Configuration.d.ts +0 -82
- package/src/Configuration.js +0 -8
- package/src/Configuration.js.map +0 -1
- package/src/Content.d.ts +0 -68
- package/src/Content.js +0 -373
- package/src/Content.js.map +0 -1
- package/src/ContentTransfer-BxwswWn3.js +0 -86
- package/src/ContentTransfer-BxwswWn3.js.map +0 -1
- package/src/ContentTransfer-Z9FHyLez.d.ts +0 -72
- package/src/DocumentEngine-hh_IGPXO.js +0 -978
- package/src/DocumentEngine-hh_IGPXO.js.map +0 -1
- package/src/DocumentModel.d.ts +0 -52
- package/src/DocumentModel.js +0 -66
- package/src/DocumentModel.js.map +0 -1
- package/src/Forms-CX-hwmJF.js +0 -391
- package/src/Forms-CX-hwmJF.js.map +0 -1
- package/src/Forms-CfNPTiCr.js +0 -110
- package/src/Forms-CfNPTiCr.js.map +0 -1
- package/src/Forms-R0HoTR-o.d.ts +0 -92
- package/src/Forms.js.map +0 -1
- package/src/HttpPaths-c9nLZ9H2.js +0 -21
- package/src/HttpPaths-c9nLZ9H2.js.map +0 -1
- package/src/I18n-zbqpWxki.d.ts +0 -29
- package/src/Media-j1bTritO.js +0 -112
- package/src/Media-j1bTritO.js.map +0 -1
- package/src/Module.js.map +0 -1
- package/src/References-CCPDAPve.js +0 -45
- package/src/References-CCPDAPve.js.map +0 -1
- package/src/S3MediaObjects-Dwhl2deX.js +0 -2742
- package/src/S3MediaObjects-Dwhl2deX.js.map +0 -1
- package/src/Seo-402YumpT.d.ts +0 -198
- package/src/cli/content.js +0 -101
- package/src/cli/content.js.map +0 -1
- package/src/cli.js.map +0 -1
- package/src/connection-BP80q4d-.js +0 -92
- package/src/connection-BP80q4d-.js.map +0 -1
- package/src/dev-lifecycle-CjDq63Ft.js +0 -535
- package/src/dev-lifecycle-CjDq63Ft.js.map +0 -1
- package/src/installation-DYNQQBD3.js +0 -9114
- package/src/installation-DYNQQBD3.js.map +0 -1
- package/src/internal/application-types.js +0 -43
- package/src/internal/application-types.js.map +0 -1
- package/src/internal/authoring-catalog.js +0 -158
- package/src/internal/authoring-catalog.js.map +0 -1
- package/src/internal/authoring-compiler.js +0 -146
- package/src/internal/authoring-compiler.js.map +0 -1
- package/src/internal/authoring-metadata.js +0 -191
- package/src/internal/authoring-metadata.js.map +0 -1
- package/src/internal/cms-config.js +0 -45
- package/src/internal/cms-config.js.map +0 -1
- package/src/internal/configuration.js +0 -228
- package/src/internal/configuration.js.map +0 -1
- package/src/internal/dev-lifecycle.js +0 -3
- package/src/internal/diagnostics.js +0 -47
- package/src/internal/diagnostics.js.map +0 -1
- package/src/internal/document-model.js +0 -376
- package/src/internal/document-model.js.map +0 -1
- package/src/internal/field-metadata.js +0 -7
- package/src/internal/field-metadata.js.map +0 -1
- package/src/internal/form-capabilities.js +0 -12
- package/src/internal/form-capabilities.js.map +0 -1
- package/src/internal/i18n.js +0 -73
- package/src/internal/i18n.js.map +0 -1
- package/src/internal/studio-app.js +0 -68
- package/src/internal/studio-app.js.map +0 -1
- package/src/location-CMNGO3lU.js +0 -35
- package/src/location-CMNGO3lU.js.map +0 -1
- package/src/metadata-DN9_K6Yl.js +0 -201
- package/src/metadata-DN9_K6Yl.js.map +0 -1
- package/src/models-5j67LMqW.js +0 -131
- package/src/models-5j67LMqW.js.map +0 -1
- package/src/models-VmGmG19-.js +0 -628
- package/src/models-VmGmG19-.js.map +0 -1
- package/src/runtime/api.js.map +0 -1
- package/src/runtime/blocks.js +0 -30
- package/src/runtime/blocks.js.map +0 -1
- package/src/runtime/collaboration.js +0 -45
- package/src/runtime/collaboration.js.map +0 -1
- package/src/runtime/delivery/DocumentField.js +0 -23
- package/src/runtime/delivery/DocumentField.js.map +0 -1
- package/src/runtime/delivery/DocumentRenderer.js +0 -61
- package/src/runtime/delivery/DocumentRenderer.js.map +0 -1
- package/src/runtime/delivery/DocumentScope.js +0 -41
- package/src/runtime/delivery/DocumentScope.js.map +0 -1
- package/src/runtime/delivery/blocks.js +0 -8
- package/src/runtime/delivery/blocks.js.map +0 -1
- package/src/runtime/delivery/context.js +0 -12
- package/src/runtime/delivery/context.js.map +0 -1
- package/src/runtime/delivery/document-page.js +0 -21
- package/src/runtime/delivery/document-page.js.map +0 -1
- package/src/runtime/delivery/document.js +0 -43
- package/src/runtime/delivery/document.js.map +0 -1
- package/src/runtime/delivery/error.js +0 -11
- package/src/runtime/delivery/error.js.map +0 -1
- package/src/runtime/delivery/plugin.js +0 -99
- package/src/runtime/delivery/plugin.js.map +0 -1
- package/src/runtime/delivery/preview.d.ts +0 -11
- package/src/runtime/delivery/preview.js +0 -6
- package/src/runtime/delivery/preview.js.map +0 -1
- package/src/runtime/delivery/types.d.ts +0 -2
- package/src/runtime/delivery/types.js +0 -1
- package/src/runtime/delivery/useCmsDocumentSeo.d.ts +0 -67
- package/src/runtime/delivery/useCmsDocumentSeo.js.map +0 -1
- package/src/runtime/delivery/useDocument.d.ts +0 -6
- package/src/runtime/delivery/useDocument.js +0 -23
- package/src/runtime/delivery/useDocument.js.map +0 -1
- package/src/runtime/delivery/useDocumentQuery.d.ts +0 -7
- package/src/runtime/delivery/useDocumentQuery.js +0 -29
- package/src/runtime/delivery/useDocumentQuery.js.map +0 -1
- package/src/runtime/forms/document.js +0 -38
- package/src/runtime/forms/document.js.map +0 -1
- package/src/runtime/forms/useCmsForm.js +0 -257
- package/src/runtime/forms/useCmsForm.js.map +0 -1
- package/src/runtime/i18n/translator.js +0 -51
- package/src/runtime/i18n/translator.js.map +0 -1
- package/src/runtime/i18n/useCmsI18n.d.ts +0 -13
- package/src/runtime/i18n/useCmsI18n.js +0 -38
- package/src/runtime/i18n/useCmsI18n.js.map +0 -1
- package/src/runtime/installation.js +0 -3
- package/src/runtime/plugin.js.map +0 -1
- package/src/runtime/preview/CmsStudioPreviewMarker.js +0 -29
- package/src/runtime/preview/CmsStudioPreviewMarker.js.map +0 -1
- package/src/runtime/preview/comark-document.js +0 -37
- package/src/runtime/preview/comark-document.js.map +0 -1
- package/src/runtime/preview/connection.js +0 -3
- package/src/runtime/preview/controller.js +0 -265
- package/src/runtime/preview/controller.js.map +0 -1
- package/src/runtime/preview/crypto.js +0 -16
- package/src/runtime/preview/crypto.js.map +0 -1
- package/src/runtime/preview/overlay.js +0 -122
- package/src/runtime/preview/overlay.js.map +0 -1
- package/src/runtime/preview/plugin.client.js +0 -68
- package/src/runtime/preview/plugin.client.js.map +0 -1
- package/src/runtime/preview/preview.css +0 -91
- package/src/runtime/preview/protocol.d.ts +0 -16
- package/src/runtime/preview/protocol.js +0 -23
- package/src/runtime/preview/protocol.js.map +0 -1
- package/src/runtime/preview/regions.js +0 -142
- package/src/runtime/preview/regions.js.map +0 -1
- package/src/runtime/preview/store.js +0 -4
- package/src/runtime/sitemap-entries.js +0 -17
- package/src/runtime/sitemap-entries.js.map +0 -1
- package/src/runtime/sitemap.js +0 -23
- package/src/runtime/sitemap.js.map +0 -1
- package/src/runtime/studio-app.js +0 -17
- package/src/runtime/studio-app.js.map +0 -1
- package/src/runtime/studio-document.js +0 -46
- package/src/runtime/studio-document.js.map +0 -1
- package/src/runtime/studio-entry.js +0 -19
- package/src/runtime/studio-entry.js.map +0 -1
- package/src/runtime/studio-navigation.js +0 -11
- package/src/runtime/studio-navigation.js.map +0 -1
- package/src/scalars-CA6kyipS.d.ts +0 -7
- package/src/scalars-CVZqT3L0.js +0 -22
- package/src/scalars-CVZqT3L0.js.map +0 -1
- package/src/store-X1e1o_MF.js +0 -209
- package/src/store-X1e1o_MF.js.map +0 -1
- package/src/types-DZ0IV-Ow.d.ts +0 -101
- package/studio/CreateDocumentDialog-BpjBYGfI.js +0 -335
- package/studio/SelectMenu-KiXwx4Y_.js +0 -34032
- package/studio/collaboration-DcK2F6v9.js +0 -4566
- package/studio/editor-P2rB7Csp.js +0 -30128
- package/studio/rolldown-runtime-Dy4uBu1J.js +0 -11
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
//#region ../model/src/Links.ts
|
|
3
|
+
const LinkDocumentId = Schema.String.check(Schema.isUUID());
|
|
4
|
+
/** A URL or a stable page identity with the route last shown to its author. */
|
|
5
|
+
const LinkTarget = Schema.Union([Schema.Struct({
|
|
6
|
+
kind: Schema.Literal("url"),
|
|
7
|
+
href: Schema.String
|
|
8
|
+
}), Schema.Struct({
|
|
9
|
+
kind: Schema.Literal("document"),
|
|
10
|
+
documentId: LinkDocumentId,
|
|
11
|
+
path: Schema.String
|
|
12
|
+
})]);
|
|
13
|
+
function safeLinkHref(href) {
|
|
14
|
+
if (!href || href !== href.trim() || /\s|\\/u.test(href)) return false;
|
|
15
|
+
if (href.startsWith("/") && !href.startsWith("//")) return true;
|
|
16
|
+
if (href.startsWith("#")) return true;
|
|
17
|
+
if (/^mailto:[^\s@]+@[^\s@]+$/iu.test(href)) return true;
|
|
18
|
+
if (/^tel:[+\d][\d -]*$/u.test(href)) return true;
|
|
19
|
+
if (!/^https?:\/\//iu.test(href)) return false;
|
|
20
|
+
try {
|
|
21
|
+
const url = new URL(href);
|
|
22
|
+
return (url.protocol === "http:" || url.protocol === "https:") && !!url.hostname && !url.username && !url.password;
|
|
23
|
+
} catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { safeLinkHref as n, LinkTarget as t };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "./Media-BQ0uL4w7.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
//#region ../model/src/Image.d.ts
|
|
4
|
+
/** A framed image authored in a collection field or block property. */
|
|
5
|
+
declare const AuthoredImage: Schema.Struct<{
|
|
6
|
+
readonly focalX: Schema.optionalKey<Schema.Int>;
|
|
7
|
+
readonly focalY: Schema.optionalKey<Schema.Int>;
|
|
8
|
+
readonly zoom: Schema.optionalKey<Schema.Finite>;
|
|
9
|
+
readonly kind: Schema.Literal<"image">;
|
|
10
|
+
readonly mediaId: Schema.String;
|
|
11
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
12
|
+
readonly frame: Schema.optionalKey<Schema.Literals<readonly ["square", "wide"]>>;
|
|
13
|
+
}>;
|
|
14
|
+
type AuthoredImage = typeof AuthoredImage.Type;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region ../model/src/Links.d.ts
|
|
17
|
+
/** A URL or a stable page identity with the route last shown to its author. */
|
|
18
|
+
declare const LinkTarget: Schema.Union<readonly [Schema.Struct<{
|
|
19
|
+
readonly kind: Schema.Literal<"url">;
|
|
20
|
+
readonly href: Schema.String;
|
|
21
|
+
}>, Schema.Struct<{
|
|
22
|
+
readonly kind: Schema.Literal<"document">;
|
|
23
|
+
readonly documentId: Schema.String;
|
|
24
|
+
readonly path: Schema.String;
|
|
25
|
+
}>]>;
|
|
26
|
+
type LinkTarget = typeof LinkTarget.Type;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { AuthoredImage as n, LinkTarget as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { o as languageName, s as localeDirection, t as canonicalLocale } from "./I18n-Ckf9h0rC.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
//#region ../model/src/Locales.ts
|
|
4
|
+
function localeIssue(code) {
|
|
5
|
+
const canonical = canonicalLocale(code);
|
|
6
|
+
if (!canonical) return `Locale "${code}" must be a valid BCP 47 language code.`;
|
|
7
|
+
if (canonical !== code) return `Locale "${code}" must use its canonical base code "${canonical}" without extensions.`;
|
|
8
|
+
}
|
|
9
|
+
/** Durable language identities use one canonical BCP 47 base code everywhere. */
|
|
10
|
+
const Locale = Schema.NonEmptyString.check(Schema.makeFilter(localeIssue));
|
|
11
|
+
/** Reject invalid dictionary keys instead of discarding them as unmatched record patterns. */
|
|
12
|
+
function localizedValues(value) {
|
|
13
|
+
return Schema.Record(Schema.String, value).check(Schema.makeFilter((values) => Object.keys(values).flatMap((code) => {
|
|
14
|
+
const issue = localeIssue(code);
|
|
15
|
+
return issue ? [{
|
|
16
|
+
path: [code],
|
|
17
|
+
issue
|
|
18
|
+
}] : [];
|
|
19
|
+
})));
|
|
20
|
+
}
|
|
21
|
+
const LocaleDefinition = Schema.Struct({
|
|
22
|
+
code: Locale,
|
|
23
|
+
label: Schema.optionalKey(Schema.NonEmptyString),
|
|
24
|
+
dir: Schema.optionalKey(Schema.Literals(["ltr", "rtl"]))
|
|
25
|
+
});
|
|
26
|
+
/** Serializable site-owned languages and their shared URL-prefix policy. */
|
|
27
|
+
const LocaleConfiguration = Schema.Struct({
|
|
28
|
+
defaultLocale: Locale,
|
|
29
|
+
supported: Schema.Array(LocaleDefinition),
|
|
30
|
+
prefixDefault: Schema.Boolean
|
|
31
|
+
}).check(Schema.makeFilter((configuration) => {
|
|
32
|
+
const issues = [];
|
|
33
|
+
const codes = configuration.supported.map((locale) => locale.code);
|
|
34
|
+
if (codes.length === 0) issues.push({
|
|
35
|
+
path: ["supported"],
|
|
36
|
+
issue: "At least one supported locale is required."
|
|
37
|
+
});
|
|
38
|
+
if (!codes.includes(configuration.defaultLocale)) issues.push({
|
|
39
|
+
path: ["defaultLocale"],
|
|
40
|
+
issue: "The default locale must be configured."
|
|
41
|
+
});
|
|
42
|
+
if (new Set(codes).size !== codes.length) issues.push({
|
|
43
|
+
path: ["supported"],
|
|
44
|
+
issue: "Supported locales must be unique."
|
|
45
|
+
});
|
|
46
|
+
return issues;
|
|
47
|
+
}));
|
|
48
|
+
/** Validate canonical identities once; omitted prefixDefault keeps the default language unprefixed. */
|
|
49
|
+
function defineLocales(configuration) {
|
|
50
|
+
const complete = {
|
|
51
|
+
...configuration,
|
|
52
|
+
prefixDefault: configuration.prefixDefault ?? false
|
|
53
|
+
};
|
|
54
|
+
Schema.decodeSync(LocaleConfiguration)(complete);
|
|
55
|
+
return complete;
|
|
56
|
+
}
|
|
57
|
+
/** Resolve presentation metadata without matching a different content language. */
|
|
58
|
+
function resolveLocale(code, configuration, displayLocale = code) {
|
|
59
|
+
const configured = configuration?.supported.find((locale) => locale.code === code);
|
|
60
|
+
return {
|
|
61
|
+
code,
|
|
62
|
+
label: configured?.label ?? languageName(code, displayLocale),
|
|
63
|
+
dir: configured?.dir ?? localeDirection(code)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { resolveLocale as a, localizedValues as i, LocaleConfiguration as n, defineLocales as r, Locale as t };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
//#region ../model/src/Locales.d.ts
|
|
3
|
+
/** Durable language identities use one canonical BCP 47 base code everywhere. */
|
|
4
|
+
declare const Locale: Schema.NonEmptyString;
|
|
5
|
+
type Locale = typeof Locale.Type;
|
|
6
|
+
declare const LocaleDefinition: Schema.Struct<{
|
|
7
|
+
readonly code: Schema.NonEmptyString;
|
|
8
|
+
readonly label: Schema.optionalKey<Schema.NonEmptyString>;
|
|
9
|
+
readonly dir: Schema.optionalKey<Schema.Literals<readonly ["ltr", "rtl"]>>;
|
|
10
|
+
}>;
|
|
11
|
+
interface LocaleDefinition extends Schema.Schema.Type<typeof LocaleDefinition> {}
|
|
12
|
+
/** Serializable site-owned languages and their shared URL-prefix policy. */
|
|
13
|
+
declare const LocaleConfiguration: Schema.Struct<{
|
|
14
|
+
readonly defaultLocale: Schema.NonEmptyString;
|
|
15
|
+
readonly supported: Schema.$Array<Schema.Struct<{
|
|
16
|
+
readonly code: Schema.NonEmptyString;
|
|
17
|
+
readonly label: Schema.optionalKey<Schema.NonEmptyString>;
|
|
18
|
+
readonly dir: Schema.optionalKey<Schema.Literals<readonly ["ltr", "rtl"]>>;
|
|
19
|
+
}>>;
|
|
20
|
+
readonly prefixDefault: Schema.Boolean;
|
|
21
|
+
}>;
|
|
22
|
+
interface LocaleConfiguration extends Schema.Schema.Type<typeof LocaleConfiguration> {}
|
|
23
|
+
/** The enabled language-code union of a literal site configuration. */
|
|
24
|
+
type ConfiguredLocale<Configuration extends LocaleConfiguration> = Configuration['supported'][number]['code'];
|
|
25
|
+
/** Validate canonical identities once; omitted prefixDefault keeps the default language unprefixed. */
|
|
26
|
+
declare function defineLocales<const Supported extends ReadonlyArray<LocaleDefinition>>(configuration: {
|
|
27
|
+
readonly defaultLocale: NoInfer<Supported[number]['code']>;
|
|
28
|
+
readonly supported: Supported;
|
|
29
|
+
readonly prefixDefault?: boolean;
|
|
30
|
+
}): {
|
|
31
|
+
prefixDefault: boolean;
|
|
32
|
+
defaultLocale: NoInfer<Supported[number]["code"]>;
|
|
33
|
+
supported: Supported;
|
|
34
|
+
};
|
|
35
|
+
interface ResolvedLocaleDefinition {
|
|
36
|
+
readonly code: string;
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly dir: 'ltr' | 'rtl';
|
|
39
|
+
}
|
|
40
|
+
/** Resolve presentation metadata without matching a different content language. */
|
|
41
|
+
declare function resolveLocale(code: string, configuration?: LocaleConfiguration, displayLocale?: string): ResolvedLocaleDefinition;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { ResolvedLocaleDefinition as a, LocaleDefinition as i, Locale as n, defineLocales as o, LocaleConfiguration as r, resolveLocale as s, ConfiguredLocale as t };
|
package/src/Locales.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as ResolvedLocaleDefinition, i as LocaleDefinition, n as Locale, o as defineLocales, r as LocaleConfiguration, s as resolveLocale, t as ConfiguredLocale } from "./Locales-jwbmJaOp.js";
|
|
2
|
+
import { a as unlocalizedPath, i as switchLocalePath, n as localeFromPath, r as localePath, t as canonicalLocalePath } from "./Routes-DM1rRp3r.js";
|
|
3
|
+
export { type ConfiguredLocale, Locale, LocaleConfiguration, type LocaleDefinition, type ResolvedLocaleDefinition, canonicalLocalePath, defineLocales, localeFromPath, localePath, resolveLocale, switchLocalePath, unlocalizedPath };
|
package/src/Locales.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as resolveLocale, n as LocaleConfiguration, r as defineLocales, t as Locale } from "./Locales-Ch7a5xuA.js";
|
|
2
|
+
import { i as localePath, o as switchLocalePath, r as localeFromPath, s as unlocalizedPath, t as canonicalLocalePath } from "./Routes-BaZvm2LE.js";
|
|
3
|
+
export { Locale, LocaleConfiguration, canonicalLocalePath, defineLocales, localeFromPath, localePath, resolveLocale, switchLocalePath, unlocalizedPath };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
//#region ../model/src/Media.d.ts
|
|
3
|
+
declare const MediaId: Schema.brand<Schema.String, "MediaId">;
|
|
4
|
+
type MediaId = typeof MediaId.Type;
|
|
5
|
+
declare const MediaKind: Schema.Literals<readonly ["image", "video"]>;
|
|
6
|
+
type MediaKind = typeof MediaKind.Type;
|
|
7
|
+
/** A structured field's stable reference to an asset in the media library. */
|
|
8
|
+
declare const MediaSelection: Schema.Struct<{
|
|
9
|
+
readonly kind: Schema.Literal<"media">;
|
|
10
|
+
readonly mediaId: Schema.String;
|
|
11
|
+
readonly mediaKind: Schema.Literals<readonly ["image", "video"]>;
|
|
12
|
+
}>;
|
|
13
|
+
type MediaSelection = typeof MediaSelection.Type;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { MediaKind as n, MediaSelection as r, MediaId as t };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
//#region ../model/src/Media.ts
|
|
3
|
+
function safePath(value, allowEmpty) {
|
|
4
|
+
if (!value) return allowEmpty;
|
|
5
|
+
if (value !== value.trim() || value.startsWith("/") || value.endsWith("/")) return false;
|
|
6
|
+
return value.split("/").every((segment) => safeSegment(segment));
|
|
7
|
+
}
|
|
8
|
+
function safeSegment(value) {
|
|
9
|
+
if (!value || value === "." || value === "..") return false;
|
|
10
|
+
return !Array.from(value).some((character) => {
|
|
11
|
+
const code = character.codePointAt(0);
|
|
12
|
+
return character === "\\" || code !== void 0 && (code <= 31 || code === 127);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const MediaId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("MediaId"));
|
|
16
|
+
const MediaName = Schema.String.check(Schema.isMaxLength(255), Schema.makeFilter((value) => safeSegment(value) && !value.includes("/"), { expected: "a safe media name" }));
|
|
17
|
+
const MediaFolder = Schema.String.check(Schema.isMaxLength(512), Schema.makeFilter((value) => safePath(value, true), { expected: "a safe media folder" }));
|
|
18
|
+
const MediaMimeType = Schema.Literals([
|
|
19
|
+
"image/avif",
|
|
20
|
+
"image/gif",
|
|
21
|
+
"image/jpeg",
|
|
22
|
+
"image/png",
|
|
23
|
+
"image/webp",
|
|
24
|
+
"video/mp4",
|
|
25
|
+
"video/webm",
|
|
26
|
+
"application/pdf"
|
|
27
|
+
]);
|
|
28
|
+
/** Source bound for the memory-backed image transformer. Videos use the installation upload limit. */
|
|
29
|
+
const maxImageSourceBytes = 20971520;
|
|
30
|
+
function mediaUploadByteLimit(mimeType, maxUploadBytes) {
|
|
31
|
+
return mimeType.startsWith("image/") ? Math.min(maxUploadBytes, maxImageSourceBytes) : maxUploadBytes;
|
|
32
|
+
}
|
|
33
|
+
const MediaLibraryKind = Schema.Literals([
|
|
34
|
+
"image",
|
|
35
|
+
"video",
|
|
36
|
+
"document"
|
|
37
|
+
]);
|
|
38
|
+
const MediaSort = Schema.Literals([
|
|
39
|
+
"newest",
|
|
40
|
+
"name",
|
|
41
|
+
"size"
|
|
42
|
+
]);
|
|
43
|
+
const MediaFolderSummary = Schema.Struct({
|
|
44
|
+
folder: MediaFolder,
|
|
45
|
+
count: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))
|
|
46
|
+
});
|
|
47
|
+
const MediaKind = Schema.Literals(["image", "video"]);
|
|
48
|
+
/** A structured field's stable reference to an asset in the media library. */
|
|
49
|
+
const MediaSelection = Schema.Struct({
|
|
50
|
+
kind: Schema.Literal("media"),
|
|
51
|
+
mediaId: Schema.String.check(Schema.isUUID()),
|
|
52
|
+
mediaKind: MediaKind
|
|
53
|
+
});
|
|
54
|
+
const MediaLayout = Schema.Literals([
|
|
55
|
+
"natural",
|
|
56
|
+
"content",
|
|
57
|
+
"full"
|
|
58
|
+
]);
|
|
59
|
+
function mediaPath(id) {
|
|
60
|
+
return `/_cms/media/${id}`;
|
|
61
|
+
}
|
|
62
|
+
const MediaChecksum = Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/u));
|
|
63
|
+
const MediaAsset = Schema.Struct({
|
|
64
|
+
id: MediaId,
|
|
65
|
+
name: MediaName,
|
|
66
|
+
folder: MediaFolder,
|
|
67
|
+
mimeType: MediaMimeType,
|
|
68
|
+
byteSize: Schema.Int.check(Schema.isGreaterThan(0)),
|
|
69
|
+
sha256: MediaChecksum,
|
|
70
|
+
url: Schema.NonEmptyString,
|
|
71
|
+
createdAt: Schema.String,
|
|
72
|
+
updatedAt: Schema.String
|
|
73
|
+
});
|
|
74
|
+
const MediaUpload = Schema.Struct({
|
|
75
|
+
name: MediaName,
|
|
76
|
+
folder: MediaFolder,
|
|
77
|
+
declaredMimeType: MediaMimeType,
|
|
78
|
+
declaredByteSize: Schema.Int.check(Schema.isGreaterThan(0)),
|
|
79
|
+
expectedSha256: Schema.optionalKey(MediaChecksum)
|
|
80
|
+
});
|
|
81
|
+
const MediaPage = Schema.Struct({
|
|
82
|
+
assets: Schema.Array(MediaAsset),
|
|
83
|
+
folders: Schema.Array(MediaFolder),
|
|
84
|
+
total: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
export { MediaKind as a, MediaMimeType as c, MediaSort as d, MediaUpload as f, mediaUploadByteLimit as h, MediaId as i, MediaPage as l, mediaPath as m, MediaFolder as n, MediaLayout as o, maxImageSourceBytes as p, MediaFolderSummary as r, MediaLibraryKind as s, MediaAsset as t, MediaSelection as u };
|
package/src/Module.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import { HookResult } from "@nuxt/schema";
|
|
2
|
-
import { NitroConfig } from "nitropack/types";
|
|
3
1
|
//#region src/Module.d.ts
|
|
4
|
-
declare
|
|
5
|
-
interface NuxtHooks {
|
|
6
|
-
'nitro:config': (nitroConfig: NitroConfig) => HookResult;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
declare const cmsNuxtModule: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions, import("@nuxt/schema").ModuleOptions, false>;
|
|
2
|
+
declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions, import("@nuxt/schema").ModuleOptions, false>;
|
|
10
3
|
//#endregion
|
|
11
|
-
export {
|
|
12
|
-
//# sourceMappingURL=Module.d.ts.map
|
|
4
|
+
export { _default as default };
|