@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,166 @@
|
|
|
1
|
+
import "./Media-BQ0uL4w7.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
//#region ../model/src/Fields.d.ts
|
|
4
|
+
declare const ScalarField: Schema.Union<readonly [Schema.Struct<{
|
|
5
|
+
readonly kind: Schema.Literal<"text">;
|
|
6
|
+
readonly defaultValue: Schema.optionalKey<Schema.String>;
|
|
7
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
8
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
9
|
+
readonly name: Schema.NonEmptyString;
|
|
10
|
+
readonly label: Schema.NonEmptyString;
|
|
11
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
12
|
+
readonly required: Schema.Boolean;
|
|
13
|
+
}>, Schema.Struct<{
|
|
14
|
+
readonly kind: Schema.Literal<"textarea">;
|
|
15
|
+
readonly defaultValue: Schema.optionalKey<Schema.String>;
|
|
16
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
17
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
18
|
+
readonly name: Schema.NonEmptyString;
|
|
19
|
+
readonly label: Schema.NonEmptyString;
|
|
20
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
21
|
+
readonly required: Schema.Boolean;
|
|
22
|
+
}>, Schema.Struct<{
|
|
23
|
+
readonly kind: Schema.Literal<"date">;
|
|
24
|
+
readonly defaultValue: Schema.optionalKey<Schema.String>;
|
|
25
|
+
readonly name: Schema.NonEmptyString;
|
|
26
|
+
readonly label: Schema.NonEmptyString;
|
|
27
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
28
|
+
readonly required: Schema.Boolean;
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly kind: Schema.Literal<"icon">;
|
|
31
|
+
readonly defaultValue: Schema.optionalKey<Schema.String>;
|
|
32
|
+
readonly name: Schema.NonEmptyString;
|
|
33
|
+
readonly label: Schema.NonEmptyString;
|
|
34
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
35
|
+
readonly required: Schema.Boolean;
|
|
36
|
+
}>, Schema.Struct<{
|
|
37
|
+
readonly kind: Schema.Literal<"link">;
|
|
38
|
+
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
39
|
+
readonly kind: Schema.Literal<"url">;
|
|
40
|
+
readonly href: Schema.String;
|
|
41
|
+
}>, Schema.Struct<{
|
|
42
|
+
readonly kind: Schema.Literal<"document">;
|
|
43
|
+
readonly documentId: Schema.String;
|
|
44
|
+
readonly path: Schema.String;
|
|
45
|
+
}>]>>;
|
|
46
|
+
readonly name: Schema.NonEmptyString;
|
|
47
|
+
readonly label: Schema.NonEmptyString;
|
|
48
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
49
|
+
readonly required: Schema.Boolean;
|
|
50
|
+
}>, Schema.Struct<{
|
|
51
|
+
readonly kind: Schema.Literal<"media">;
|
|
52
|
+
readonly mediaKind: Schema.Literals<readonly ["image", "video"]>;
|
|
53
|
+
readonly defaultValue: Schema.optionalKey<Schema.Struct<{
|
|
54
|
+
readonly kind: Schema.Literal<"media">;
|
|
55
|
+
readonly mediaId: Schema.String;
|
|
56
|
+
readonly mediaKind: Schema.Literals<readonly ["image", "video"]>;
|
|
57
|
+
}>>;
|
|
58
|
+
readonly name: Schema.NonEmptyString;
|
|
59
|
+
readonly label: Schema.NonEmptyString;
|
|
60
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
61
|
+
readonly required: Schema.Boolean;
|
|
62
|
+
}>, Schema.Struct<{
|
|
63
|
+
readonly kind: Schema.Literal<"image">;
|
|
64
|
+
readonly defaultValue: Schema.optionalKey<Schema.Struct<{
|
|
65
|
+
readonly focalX: Schema.optionalKey<Schema.Int>;
|
|
66
|
+
readonly focalY: Schema.optionalKey<Schema.Int>;
|
|
67
|
+
readonly zoom: Schema.optionalKey<Schema.Finite>;
|
|
68
|
+
readonly kind: Schema.Literal<"image">;
|
|
69
|
+
readonly mediaId: Schema.String;
|
|
70
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
71
|
+
readonly frame: Schema.optionalKey<Schema.Literals<readonly ["square", "wide"]>>;
|
|
72
|
+
}>>;
|
|
73
|
+
readonly name: Schema.NonEmptyString;
|
|
74
|
+
readonly label: Schema.NonEmptyString;
|
|
75
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
76
|
+
readonly required: Schema.Boolean;
|
|
77
|
+
}>, Schema.Struct<{
|
|
78
|
+
readonly kind: Schema.Literal<"number">;
|
|
79
|
+
readonly defaultValue: Schema.optionalKey<Schema.Finite>;
|
|
80
|
+
readonly integer: Schema.optionalKey<Schema.Boolean>;
|
|
81
|
+
readonly min: Schema.optionalKey<Schema.Finite>;
|
|
82
|
+
readonly max: Schema.optionalKey<Schema.Finite>;
|
|
83
|
+
readonly name: Schema.NonEmptyString;
|
|
84
|
+
readonly label: Schema.NonEmptyString;
|
|
85
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
86
|
+
readonly required: Schema.Boolean;
|
|
87
|
+
}>, Schema.Struct<{
|
|
88
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
89
|
+
readonly defaultValue: Schema.optionalKey<Schema.Boolean>;
|
|
90
|
+
readonly name: Schema.NonEmptyString;
|
|
91
|
+
readonly label: Schema.NonEmptyString;
|
|
92
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
93
|
+
readonly required: Schema.Boolean;
|
|
94
|
+
}>, Schema.Struct<{
|
|
95
|
+
readonly kind: Schema.Literal<"select">;
|
|
96
|
+
readonly options: Schema.$Array<Schema.Struct<{
|
|
97
|
+
readonly value: Schema.NonEmptyString;
|
|
98
|
+
readonly label: Schema.NonEmptyString;
|
|
99
|
+
}>>;
|
|
100
|
+
readonly defaultValue: Schema.optionalKey<Schema.String>;
|
|
101
|
+
readonly name: Schema.NonEmptyString;
|
|
102
|
+
readonly label: Schema.NonEmptyString;
|
|
103
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
104
|
+
readonly required: Schema.Boolean;
|
|
105
|
+
}>, Schema.Struct<{
|
|
106
|
+
readonly kind: Schema.Literal<"multi-select">;
|
|
107
|
+
readonly options: Schema.$Array<Schema.Struct<{
|
|
108
|
+
readonly value: Schema.NonEmptyString;
|
|
109
|
+
readonly label: Schema.NonEmptyString;
|
|
110
|
+
}>>;
|
|
111
|
+
readonly defaultValue: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
112
|
+
readonly name: Schema.NonEmptyString;
|
|
113
|
+
readonly label: Schema.NonEmptyString;
|
|
114
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
115
|
+
readonly required: Schema.Boolean;
|
|
116
|
+
}>, Schema.Struct<{
|
|
117
|
+
readonly kind: Schema.Literal<"document">;
|
|
118
|
+
readonly collections: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
119
|
+
readonly name: Schema.NonEmptyString;
|
|
120
|
+
readonly label: Schema.NonEmptyString;
|
|
121
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
122
|
+
readonly required: Schema.Boolean;
|
|
123
|
+
}>]>;
|
|
124
|
+
type FieldDefinition = typeof ScalarField.Type | {
|
|
125
|
+
readonly name: string;
|
|
126
|
+
readonly label: string;
|
|
127
|
+
readonly description?: string;
|
|
128
|
+
readonly required: boolean;
|
|
129
|
+
readonly kind: 'object' | 'list';
|
|
130
|
+
readonly fields: ReadonlyArray<FieldDefinition>;
|
|
131
|
+
};
|
|
132
|
+
declare const FieldDefinition: Schema.Codec<FieldDefinition>;
|
|
133
|
+
declare const CollectionDefinition: Schema.Struct<{
|
|
134
|
+
readonly collection: Schema.NonEmptyString;
|
|
135
|
+
readonly label: Schema.NonEmptyString;
|
|
136
|
+
readonly pattern: Schema.NonEmptyString;
|
|
137
|
+
readonly fields: Schema.$Array<Schema.Codec<FieldDefinition, FieldDefinition, never, never>>;
|
|
138
|
+
readonly title: Schema.optionalKey<Schema.Struct<{
|
|
139
|
+
minLength: Schema.optionalKey<Schema.Int>;
|
|
140
|
+
maxLength: Schema.optionalKey<Schema.Int>;
|
|
141
|
+
}>>;
|
|
142
|
+
readonly templates: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
143
|
+
readonly id: Schema.NonEmptyString;
|
|
144
|
+
readonly label: Schema.NonEmptyString;
|
|
145
|
+
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
146
|
+
readonly body: Schema.Struct<{
|
|
147
|
+
readonly type: Schema.Literal<"doc">;
|
|
148
|
+
readonly content: Schema.$Array<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
149
|
+
}>;
|
|
150
|
+
}>>>;
|
|
151
|
+
readonly body: Schema.optionalKey<Schema.Struct<{
|
|
152
|
+
readonly blocks: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
153
|
+
readonly groups: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
154
|
+
readonly presets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
155
|
+
readonly id: Schema.NonEmptyString;
|
|
156
|
+
readonly label: Schema.NonEmptyString;
|
|
157
|
+
readonly body: Schema.Struct<{
|
|
158
|
+
readonly type: Schema.Literal<"doc">;
|
|
159
|
+
readonly content: Schema.$Array<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
160
|
+
}>;
|
|
161
|
+
}>>>;
|
|
162
|
+
}>>;
|
|
163
|
+
}>;
|
|
164
|
+
interface CollectionDefinition extends Schema.Schema.Type<typeof CollectionDefinition> {}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { FieldDefinition as n, CollectionDefinition as t };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { a as MediaKind, u as MediaSelection } from "./Media-DSyvd14o.js";
|
|
2
|
+
import { r as DocumentBody, t as CollectionName } from "./Document-CKXMSEf1.js";
|
|
3
|
+
import { t as LinkTarget } from "./Links-CJYyy7rC.js";
|
|
4
|
+
import { t as AuthoredImage } from "./Image-CJWPLnhP.js";
|
|
5
|
+
import { Schema } from "effect";
|
|
6
|
+
//#region ../model/src/Fields.ts
|
|
7
|
+
const base = {
|
|
8
|
+
name: Schema.NonEmptyString.check(Schema.isPattern(/^[a-z][a-zA-Z0-9]*$/u)),
|
|
9
|
+
label: Schema.NonEmptyString,
|
|
10
|
+
description: Schema.optionalKey(Schema.String),
|
|
11
|
+
required: Schema.Boolean
|
|
12
|
+
};
|
|
13
|
+
const TextConstraints = {
|
|
14
|
+
minLength: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
|
|
15
|
+
maxLength: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)))
|
|
16
|
+
};
|
|
17
|
+
const ScalarField = Schema.Union([
|
|
18
|
+
Schema.Struct({
|
|
19
|
+
...base,
|
|
20
|
+
...TextConstraints,
|
|
21
|
+
kind: Schema.Literal("text"),
|
|
22
|
+
defaultValue: Schema.optionalKey(Schema.String)
|
|
23
|
+
}),
|
|
24
|
+
Schema.Struct({
|
|
25
|
+
...base,
|
|
26
|
+
...TextConstraints,
|
|
27
|
+
kind: Schema.Literal("textarea"),
|
|
28
|
+
defaultValue: Schema.optionalKey(Schema.String)
|
|
29
|
+
}),
|
|
30
|
+
Schema.Struct({
|
|
31
|
+
...base,
|
|
32
|
+
kind: Schema.Literal("date"),
|
|
33
|
+
defaultValue: Schema.optionalKey(Schema.String)
|
|
34
|
+
}),
|
|
35
|
+
Schema.Struct({
|
|
36
|
+
...base,
|
|
37
|
+
kind: Schema.Literal("icon"),
|
|
38
|
+
defaultValue: Schema.optionalKey(Schema.String)
|
|
39
|
+
}),
|
|
40
|
+
Schema.Struct({
|
|
41
|
+
...base,
|
|
42
|
+
kind: Schema.Literal("link"),
|
|
43
|
+
defaultValue: Schema.optionalKey(LinkTarget)
|
|
44
|
+
}),
|
|
45
|
+
Schema.Struct({
|
|
46
|
+
...base,
|
|
47
|
+
kind: Schema.Literal("media"),
|
|
48
|
+
mediaKind: MediaKind,
|
|
49
|
+
defaultValue: Schema.optionalKey(MediaSelection)
|
|
50
|
+
}),
|
|
51
|
+
Schema.Struct({
|
|
52
|
+
...base,
|
|
53
|
+
kind: Schema.Literal("image"),
|
|
54
|
+
defaultValue: Schema.optionalKey(AuthoredImage)
|
|
55
|
+
}),
|
|
56
|
+
Schema.Struct({
|
|
57
|
+
...base,
|
|
58
|
+
kind: Schema.Literal("number"),
|
|
59
|
+
defaultValue: Schema.optionalKey(Schema.Finite),
|
|
60
|
+
integer: Schema.optionalKey(Schema.Boolean),
|
|
61
|
+
min: Schema.optionalKey(Schema.Finite),
|
|
62
|
+
max: Schema.optionalKey(Schema.Finite)
|
|
63
|
+
}),
|
|
64
|
+
Schema.Struct({
|
|
65
|
+
...base,
|
|
66
|
+
kind: Schema.Literal("boolean"),
|
|
67
|
+
defaultValue: Schema.optionalKey(Schema.Boolean)
|
|
68
|
+
}),
|
|
69
|
+
Schema.Struct({
|
|
70
|
+
...base,
|
|
71
|
+
kind: Schema.Literal("select"),
|
|
72
|
+
options: Schema.Array(Schema.Struct({
|
|
73
|
+
value: Schema.NonEmptyString,
|
|
74
|
+
label: Schema.NonEmptyString
|
|
75
|
+
})),
|
|
76
|
+
defaultValue: Schema.optionalKey(Schema.String)
|
|
77
|
+
}),
|
|
78
|
+
Schema.Struct({
|
|
79
|
+
...base,
|
|
80
|
+
kind: Schema.Literal("multi-select"),
|
|
81
|
+
options: Schema.Array(Schema.Struct({
|
|
82
|
+
value: Schema.NonEmptyString,
|
|
83
|
+
label: Schema.NonEmptyString
|
|
84
|
+
})),
|
|
85
|
+
defaultValue: Schema.optionalKey(Schema.Array(Schema.NonEmptyString))
|
|
86
|
+
}),
|
|
87
|
+
Schema.Struct({
|
|
88
|
+
...base,
|
|
89
|
+
kind: Schema.Literal("document"),
|
|
90
|
+
collections: Schema.optionalKey(Schema.Array(CollectionName))
|
|
91
|
+
})
|
|
92
|
+
]);
|
|
93
|
+
const FieldDefinition = Schema.Union([
|
|
94
|
+
ScalarField,
|
|
95
|
+
Schema.Struct({
|
|
96
|
+
...base,
|
|
97
|
+
kind: Schema.Literal("object"),
|
|
98
|
+
fields: Schema.Array(Schema.suspend(() => FieldDefinition))
|
|
99
|
+
}),
|
|
100
|
+
Schema.Struct({
|
|
101
|
+
...base,
|
|
102
|
+
kind: Schema.Literal("list"),
|
|
103
|
+
fields: Schema.Array(Schema.suspend(() => FieldDefinition))
|
|
104
|
+
})
|
|
105
|
+
]);
|
|
106
|
+
const CollectionDefinition = Schema.Struct({
|
|
107
|
+
collection: CollectionName,
|
|
108
|
+
label: Schema.NonEmptyString,
|
|
109
|
+
pattern: Schema.NonEmptyString,
|
|
110
|
+
fields: Schema.Array(FieldDefinition),
|
|
111
|
+
title: Schema.optionalKey(Schema.Struct(TextConstraints)),
|
|
112
|
+
templates: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
113
|
+
id: Schema.NonEmptyString,
|
|
114
|
+
label: Schema.NonEmptyString,
|
|
115
|
+
fields: Schema.JsonObject,
|
|
116
|
+
body: DocumentBody
|
|
117
|
+
}))),
|
|
118
|
+
body: Schema.optionalKey(Schema.Struct({
|
|
119
|
+
blocks: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),
|
|
120
|
+
groups: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),
|
|
121
|
+
presets: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
122
|
+
id: Schema.NonEmptyString,
|
|
123
|
+
label: Schema.NonEmptyString,
|
|
124
|
+
body: DocumentBody
|
|
125
|
+
})))
|
|
126
|
+
}))
|
|
127
|
+
});
|
|
128
|
+
const ListItemId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("ListItemId"));
|
|
129
|
+
//#endregion
|
|
130
|
+
export { FieldDefinition as n, ListItemId as r, CollectionDefinition as t };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import "./Media-BQ0uL4w7.js";
|
|
2
|
+
import "./Fields-BegSgYhj.js";
|
|
3
|
+
import "./Document-TgwYKJZM.js";
|
|
4
|
+
import { Result, Schema } from "effect";
|
|
5
|
+
import "@tiptap/pm/model";
|
|
6
|
+
//#region ../model/src/internal/forms/contracts.d.ts
|
|
7
|
+
declare const FormCapabilities: Schema.Struct<{
|
|
8
|
+
readonly label: Schema.NonEmptyString;
|
|
9
|
+
readonly fieldTypes: Schema.$Array<Schema.Literals<readonly ["text", "email", "textarea", "number", "checkbox", "select"]>>;
|
|
10
|
+
readonly rules: Schema.$Array<Schema.Literals<readonly ["required", "minLength", "maxLength", "min", "max"]>>;
|
|
11
|
+
}>;
|
|
12
|
+
interface FormCapabilities extends Schema.Schema.Type<typeof FormCapabilities> {}
|
|
13
|
+
declare const FormField: Schema.Union<readonly [Schema.Struct<{
|
|
14
|
+
readonly type: Schema.Literals<readonly ["text"]>;
|
|
15
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
16
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
17
|
+
readonly id: Schema.NonEmptyString;
|
|
18
|
+
readonly label: Schema.NonEmptyString;
|
|
19
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
20
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
21
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
22
|
+
}>, Schema.Struct<{
|
|
23
|
+
readonly type: Schema.Literals<readonly ["email"]>;
|
|
24
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
25
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
26
|
+
readonly id: Schema.NonEmptyString;
|
|
27
|
+
readonly label: Schema.NonEmptyString;
|
|
28
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
29
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
30
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
31
|
+
}>, Schema.Struct<{
|
|
32
|
+
readonly type: Schema.Literals<readonly ["textarea"]>;
|
|
33
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
34
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
35
|
+
readonly id: Schema.NonEmptyString;
|
|
36
|
+
readonly label: Schema.NonEmptyString;
|
|
37
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
38
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
39
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
40
|
+
}>, Schema.Struct<{
|
|
41
|
+
readonly type: Schema.Literal<"number">;
|
|
42
|
+
readonly min: Schema.optionalKey<Schema.Finite>;
|
|
43
|
+
readonly max: Schema.optionalKey<Schema.Finite>;
|
|
44
|
+
readonly id: Schema.NonEmptyString;
|
|
45
|
+
readonly label: Schema.NonEmptyString;
|
|
46
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
47
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
48
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
49
|
+
}>, Schema.Struct<{
|
|
50
|
+
readonly type: Schema.Literal<"checkbox">;
|
|
51
|
+
readonly id: Schema.NonEmptyString;
|
|
52
|
+
readonly label: Schema.NonEmptyString;
|
|
53
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
54
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
55
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
56
|
+
}>, Schema.Struct<{
|
|
57
|
+
readonly type: Schema.Literal<"select">;
|
|
58
|
+
readonly options: Schema.NonEmptyArray<Schema.Struct<{
|
|
59
|
+
readonly id: Schema.NonEmptyString;
|
|
60
|
+
readonly label: Schema.NonEmptyString;
|
|
61
|
+
}>>;
|
|
62
|
+
readonly id: Schema.NonEmptyString;
|
|
63
|
+
readonly label: Schema.NonEmptyString;
|
|
64
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
65
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
66
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
67
|
+
}>]>;
|
|
68
|
+
type FormField = typeof FormField.Type;
|
|
69
|
+
declare const FormStep: Schema.Struct<{
|
|
70
|
+
readonly id: Schema.NonEmptyString;
|
|
71
|
+
readonly title: Schema.NonEmptyString;
|
|
72
|
+
readonly fields: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
73
|
+
readonly type: Schema.Literals<readonly ["text"]>;
|
|
74
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
75
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
76
|
+
readonly id: Schema.NonEmptyString;
|
|
77
|
+
readonly label: Schema.NonEmptyString;
|
|
78
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
79
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
80
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
81
|
+
}>, Schema.Struct<{
|
|
82
|
+
readonly type: Schema.Literals<readonly ["email"]>;
|
|
83
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
84
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
85
|
+
readonly id: Schema.NonEmptyString;
|
|
86
|
+
readonly label: Schema.NonEmptyString;
|
|
87
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
88
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
89
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
90
|
+
}>, Schema.Struct<{
|
|
91
|
+
readonly type: Schema.Literals<readonly ["textarea"]>;
|
|
92
|
+
readonly minLength: Schema.optionalKey<Schema.Int>;
|
|
93
|
+
readonly maxLength: Schema.optionalKey<Schema.Int>;
|
|
94
|
+
readonly id: Schema.NonEmptyString;
|
|
95
|
+
readonly label: Schema.NonEmptyString;
|
|
96
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
97
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
98
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
99
|
+
}>, Schema.Struct<{
|
|
100
|
+
readonly type: Schema.Literal<"number">;
|
|
101
|
+
readonly min: Schema.optionalKey<Schema.Finite>;
|
|
102
|
+
readonly max: Schema.optionalKey<Schema.Finite>;
|
|
103
|
+
readonly id: Schema.NonEmptyString;
|
|
104
|
+
readonly label: Schema.NonEmptyString;
|
|
105
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
106
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
107
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
108
|
+
}>, Schema.Struct<{
|
|
109
|
+
readonly type: Schema.Literal<"checkbox">;
|
|
110
|
+
readonly id: Schema.NonEmptyString;
|
|
111
|
+
readonly label: Schema.NonEmptyString;
|
|
112
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
113
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
114
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
115
|
+
}>, Schema.Struct<{
|
|
116
|
+
readonly type: Schema.Literal<"select">;
|
|
117
|
+
readonly options: Schema.NonEmptyArray<Schema.Struct<{
|
|
118
|
+
readonly id: Schema.NonEmptyString;
|
|
119
|
+
readonly label: Schema.NonEmptyString;
|
|
120
|
+
}>>;
|
|
121
|
+
readonly id: Schema.NonEmptyString;
|
|
122
|
+
readonly label: Schema.NonEmptyString;
|
|
123
|
+
readonly answerKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
124
|
+
readonly help: Schema.optionalKey<Schema.String>;
|
|
125
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
126
|
+
}>]>>;
|
|
127
|
+
}>;
|
|
128
|
+
interface FormStep extends Schema.Schema.Type<typeof FormStep> {}
|
|
129
|
+
declare const FormReference: Schema.Struct<{
|
|
130
|
+
documentId: Schema.brand<Schema.String, "DocumentId">;
|
|
131
|
+
locale: Schema.optionalKey<Schema.String>;
|
|
132
|
+
blockId: Schema.String;
|
|
133
|
+
revision: Schema.String;
|
|
134
|
+
}>;
|
|
135
|
+
interface FormReference extends Schema.Schema.Type<typeof FormReference> {}
|
|
136
|
+
interface FormDefinition extends FormReference {
|
|
137
|
+
readonly name: string;
|
|
138
|
+
readonly steps: ReadonlyArray<FormStep>;
|
|
139
|
+
readonly preview: boolean;
|
|
140
|
+
}
|
|
141
|
+
type FormValues = Readonly<Record<string, string | number | boolean | null>>;
|
|
142
|
+
declare const FormValues: Schema.Codec<FormValues>;
|
|
143
|
+
declare const FormSubmission: Schema.Struct<{
|
|
144
|
+
readonly values: Schema.Codec<Readonly<Record<string, string | number | boolean | null>>, Readonly<Record<string, string | number | boolean | null>>, never, never>;
|
|
145
|
+
readonly documentId: Schema.brand<Schema.String, "DocumentId">;
|
|
146
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
147
|
+
readonly blockId: Schema.String;
|
|
148
|
+
readonly revision: Schema.String;
|
|
149
|
+
}>;
|
|
150
|
+
interface FormSubmission extends Schema.Schema.Type<typeof FormSubmission> {}
|
|
151
|
+
declare const FormIssue: Schema.Union<readonly [Schema.Struct<{
|
|
152
|
+
readonly code: Schema.Literals<readonly ["required", "unchecked", "boolean", "number", "text", "option", "email", "unknownAnswers", "rejected"]>;
|
|
153
|
+
}>, Schema.Struct<{
|
|
154
|
+
readonly code: Schema.Literals<readonly ["min", "max"]>;
|
|
155
|
+
readonly limit: Schema.Finite;
|
|
156
|
+
}>, Schema.Struct<{
|
|
157
|
+
readonly code: Schema.Literals<readonly ["minLength", "maxLength"]>;
|
|
158
|
+
readonly limit: Schema.Int;
|
|
159
|
+
}>, Schema.Struct<{
|
|
160
|
+
readonly code: Schema.Literal<"custom">;
|
|
161
|
+
readonly message: Schema.NonEmptyString;
|
|
162
|
+
}>]>;
|
|
163
|
+
type FormIssue = typeof FormIssue.Type;
|
|
164
|
+
declare const FormErrors: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
165
|
+
readonly code: Schema.Literals<readonly ["required", "unchecked", "boolean", "number", "text", "option", "email", "unknownAnswers", "rejected"]>;
|
|
166
|
+
}>, Schema.Struct<{
|
|
167
|
+
readonly code: Schema.Literals<readonly ["min", "max"]>;
|
|
168
|
+
readonly limit: Schema.Finite;
|
|
169
|
+
}>, Schema.Struct<{
|
|
170
|
+
readonly code: Schema.Literals<readonly ["minLength", "maxLength"]>;
|
|
171
|
+
readonly limit: Schema.Int;
|
|
172
|
+
}>, Schema.Struct<{
|
|
173
|
+
readonly code: Schema.Literal<"custom">;
|
|
174
|
+
readonly message: Schema.NonEmptyString;
|
|
175
|
+
}>]>>;
|
|
176
|
+
type FormErrors = typeof FormErrors.Type;
|
|
177
|
+
declare const FormResult: Schema.Union<readonly [Schema.Struct<{
|
|
178
|
+
readonly status: Schema.Literal<"accepted">;
|
|
179
|
+
readonly reference: Schema.optionalKey<Schema.NonEmptyString>;
|
|
180
|
+
}>, Schema.Struct<{
|
|
181
|
+
readonly status: Schema.Literal<"invalid">;
|
|
182
|
+
readonly errors: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
183
|
+
readonly code: Schema.Literals<readonly ["required", "unchecked", "boolean", "number", "text", "option", "email", "unknownAnswers", "rejected"]>;
|
|
184
|
+
}>, Schema.Struct<{
|
|
185
|
+
readonly code: Schema.Literals<readonly ["min", "max"]>;
|
|
186
|
+
readonly limit: Schema.Finite;
|
|
187
|
+
}>, Schema.Struct<{
|
|
188
|
+
readonly code: Schema.Literals<readonly ["minLength", "maxLength"]>;
|
|
189
|
+
readonly limit: Schema.Int;
|
|
190
|
+
}>, Schema.Struct<{
|
|
191
|
+
readonly code: Schema.Literal<"custom">;
|
|
192
|
+
readonly message: Schema.NonEmptyString;
|
|
193
|
+
}>]>>;
|
|
194
|
+
}>, Schema.Struct<{
|
|
195
|
+
readonly status: Schema.Literal<"stale">;
|
|
196
|
+
}>, Schema.Struct<{
|
|
197
|
+
readonly status: Schema.Literal<"unavailable">;
|
|
198
|
+
}>, Schema.Struct<{
|
|
199
|
+
readonly status: Schema.Literal<"failed">;
|
|
200
|
+
}>]>;
|
|
201
|
+
type FormResult = typeof FormResult.Type;
|
|
202
|
+
//#endregion
|
|
203
|
+
export { FormIssue as a, FormSubmission as c, FormField as i, FormValues as l, FormDefinition as n, FormResult as o, FormErrors as r, FormStep as s, FormCapabilities as t };
|
package/src/Forms.d.ts
CHANGED
|
@@ -1,17 +1,43 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as FormIssue, c as FormSubmission, i as FormField, l as FormValues, n as FormDefinition, o as FormResult, r as FormErrors, s as FormStep, t as FormCapabilities } from "./Forms-BuKAXQxr.js";
|
|
2
|
+
import "./Media-BQ0uL4w7.js";
|
|
3
|
+
import "./Fields-BegSgYhj.js";
|
|
4
|
+
import "./Document-TgwYKJZM.js";
|
|
5
|
+
import "./Locales-jwbmJaOp.js";
|
|
6
|
+
import "./Seo-BcpqxoAs.js";
|
|
7
|
+
import "./Query-C0kGJF5_.js";
|
|
8
|
+
import "./Routes-DM1rRp3r.js";
|
|
9
|
+
import "./Database-DSsNCGft.js";
|
|
10
|
+
import { Context, Crypto, Effect, Layer, Schema } from "effect";
|
|
2
11
|
import { ComputedRef, MaybeRefOrGetter, Ref } from "vue";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly
|
|
12
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
13
|
+
//#region ../server/src/Forms.d.ts
|
|
14
|
+
type FormSubmissionOutcome = {
|
|
15
|
+
readonly status: 'accepted';
|
|
16
|
+
readonly reference?: string;
|
|
17
|
+
} | {
|
|
18
|
+
readonly status: 'invalid';
|
|
19
|
+
readonly errors: FormErrors;
|
|
20
|
+
} | {
|
|
21
|
+
readonly status: 'unavailable';
|
|
22
|
+
};
|
|
23
|
+
interface FormSubmissionRequest {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly submittedAt: Date;
|
|
7
26
|
}
|
|
27
|
+
type FormSubmissionHandler = (submission: {
|
|
28
|
+
readonly form: FormDefinition;
|
|
29
|
+
readonly request: FormSubmissionRequest;
|
|
30
|
+
readonly values: FormValues;
|
|
31
|
+
}) => FormSubmissionOutcome | PromiseLike<FormSubmissionOutcome>;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/runtime/forms/internal/controls.d.ts
|
|
8
34
|
interface CmsFormControl {
|
|
9
35
|
readonly field: FormField;
|
|
10
36
|
value: FormValues[string];
|
|
11
37
|
readonly dirty: boolean;
|
|
12
38
|
readonly touched: boolean;
|
|
13
39
|
readonly valid: boolean;
|
|
14
|
-
readonly error:
|
|
40
|
+
readonly error: FormIssue | undefined;
|
|
15
41
|
readonly attrs: {
|
|
16
42
|
readonly id: string;
|
|
17
43
|
readonly name: string;
|
|
@@ -19,6 +45,9 @@ interface CmsFormControl {
|
|
|
19
45
|
readonly 'aria-invalid': 'true' | undefined;
|
|
20
46
|
readonly 'aria-describedby': string | undefined;
|
|
21
47
|
};
|
|
48
|
+
readonly previewAttrs: {
|
|
49
|
+
readonly 'data-cms-source'?: string;
|
|
50
|
+
};
|
|
22
51
|
readonly helpAttrs: {
|
|
23
52
|
readonly id: string;
|
|
24
53
|
};
|
|
@@ -28,11 +57,17 @@ interface CmsFormControl {
|
|
|
28
57
|
};
|
|
29
58
|
readonly touch: () => void;
|
|
30
59
|
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/runtime/forms/useCmsForm.d.ts
|
|
62
|
+
interface UseCmsFormOptions {
|
|
63
|
+
/** Replace the HTTP transport, retaining validation and submission state. */
|
|
64
|
+
readonly submit?: (submission: FormSubmission, signal: AbortSignal) => Promise<FormResult>;
|
|
65
|
+
}
|
|
31
66
|
interface UseCmsFormReturn {
|
|
32
67
|
readonly fields: ComputedRef<ReadonlyArray<FormField>>;
|
|
33
68
|
readonly steps: ComputedRef<ReadonlyArray<FormStep>>;
|
|
34
69
|
readonly values: Ref<Record<string, FormValues[string]>>;
|
|
35
|
-
readonly errors: Readonly<Ref<
|
|
70
|
+
readonly errors: Readonly<Ref<FormErrors>>;
|
|
36
71
|
readonly currentStep: ComputedRef<FormStep | undefined>;
|
|
37
72
|
readonly stepIndex: Readonly<Ref<number>>;
|
|
38
73
|
readonly isFirstStep: ComputedRef<boolean>;
|
|
@@ -40,11 +75,14 @@ interface UseCmsFormReturn {
|
|
|
40
75
|
readonly submitting: Readonly<Ref<boolean>>;
|
|
41
76
|
readonly isSuccess: Readonly<Ref<boolean>>;
|
|
42
77
|
readonly isPreview: ComputedRef<boolean>;
|
|
43
|
-
readonly submitError: Readonly<Ref<
|
|
78
|
+
readonly submitError: Readonly<Ref<'stale' | 'unavailable' | 'failed' | undefined>>;
|
|
44
79
|
readonly canSubmit: ComputedRef<boolean>;
|
|
45
80
|
readonly visibleControls: ComputedRef<ReadonlyArray<CmsFormControl>>;
|
|
46
81
|
readonly invalidControls: ComputedRef<ReadonlyArray<CmsFormControl>>;
|
|
47
82
|
readonly firstInvalidControlId: ComputedRef<string | undefined>;
|
|
83
|
+
readonly stepPreviewAttrs: ComputedRef<{
|
|
84
|
+
'data-cms-source'?: string;
|
|
85
|
+
}>;
|
|
48
86
|
readonly control: (field: string | FormField) => CmsFormControl;
|
|
49
87
|
readonly next: () => boolean;
|
|
50
88
|
readonly previous: () => void;
|
|
@@ -56,8 +94,7 @@ interface UseCmsFormReturn {
|
|
|
56
94
|
export declare function useCmsForm(input: MaybeRefOrGetter<FormDefinition>, options?: UseCmsFormOptions): UseCmsFormReturn;
|
|
57
95
|
//#endregion
|
|
58
96
|
//#region src/Forms.d.ts
|
|
59
|
-
/**
|
|
97
|
+
/** Declare the question types and rules Studio may author for this block. */
|
|
60
98
|
export declare function defineCmsForm<const Definition extends FormCapabilities>(definition: Definition): Definition;
|
|
61
99
|
//#endregion
|
|
62
|
-
export type { CmsFormControl, FormDefinition as CmsFormDefinition, FormField as CmsFormField, FormResult as CmsFormResult, FormStep as CmsFormStep, FormValues as CmsFormValues, UseCmsFormOptions, UseCmsFormReturn };
|
|
63
|
-
//# sourceMappingURL=Forms.d.ts.map
|
|
100
|
+
export type { CmsFormControl, FormDefinition as CmsFormDefinition, FormErrors as CmsFormErrors, FormField as CmsFormField, FormIssue as CmsFormIssue, FormResult as CmsFormResult, FormStep as CmsFormStep, FormValues as CmsFormValues, FormSubmissionHandler, FormSubmissionOutcome, UseCmsFormOptions, UseCmsFormReturn };
|