convex-cms 0.0.3 → 0.0.5-alpha.2
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/README.md +107 -60
- package/admin/README.md +99 -0
- package/admin/src/components/AdminLayout.tsx +22 -0
- package/admin/src/components/BreakingChangesWarningDialog.tsx +81 -0
- package/admin/src/components/BulkActionBar.tsx +190 -0
- package/admin/src/components/BulkOperationModal.tsx +177 -0
- package/admin/src/components/ContentEntryEditor.tsx +1104 -0
- package/admin/src/components/ContentTypeFormModal.tsx +1012 -0
- package/admin/src/components/ErrorBoundary.tsx +83 -0
- package/admin/src/components/ErrorState.tsx +147 -0
- package/admin/src/components/Header.tsx +294 -0
- package/admin/src/components/RouteGuard.tsx +264 -0
- package/admin/src/components/Sidebar.tsx +90 -0
- package/admin/src/components/TaxonomyEditor.tsx +348 -0
- package/admin/src/components/TermTree.tsx +533 -0
- package/admin/src/components/UploadDropzone.tsx +383 -0
- package/admin/src/components/VersionCompare.tsx +250 -0
- package/admin/src/components/VersionHistory.tsx +279 -0
- package/admin/src/components/VersionRollbackModal.tsx +79 -0
- package/admin/src/components/cmsds/CmsButton.tsx +101 -0
- package/admin/src/components/cmsds/CmsDialog.tsx +139 -0
- package/admin/src/components/cmsds/CmsDropdown.tsx +62 -0
- package/admin/src/components/cmsds/CmsEmptyState.tsx +54 -0
- package/admin/src/components/cmsds/CmsField.tsx +47 -0
- package/admin/src/components/cmsds/CmsPageHeader.tsx +35 -0
- package/admin/src/components/cmsds/CmsStatusBadge.tsx +153 -0
- package/admin/src/components/cmsds/CmsSurface.tsx +52 -0
- package/admin/src/components/cmsds/CmsTable.tsx +164 -0
- package/admin/src/components/cmsds/CmsToolbar.tsx +58 -0
- package/admin/src/components/cmsds/index.ts +10 -0
- package/admin/src/components/fields/BooleanField.tsx +74 -0
- package/admin/src/components/fields/CategoryField.tsx +394 -0
- package/admin/src/components/fields/DateField.tsx +173 -0
- package/admin/src/components/fields/DefaultFieldRenderer.tsx +74 -0
- package/admin/src/components/fields/FieldRenderer.tsx +180 -0
- package/admin/src/components/fields/FieldWrapper.tsx +57 -0
- package/admin/src/components/fields/JsonField.tsx +172 -0
- package/admin/src/components/fields/MediaField.tsx +367 -0
- package/admin/src/components/fields/MultiSelectField.tsx +118 -0
- package/admin/src/components/fields/NumberField.tsx +77 -0
- package/admin/src/components/fields/ReferenceField.tsx +386 -0
- package/admin/src/components/fields/RichTextField.tsx +171 -0
- package/admin/src/components/fields/SelectField.tsx +62 -0
- package/admin/src/components/fields/TagField.tsx +325 -0
- package/admin/src/components/fields/TextAreaField.tsx +68 -0
- package/admin/src/components/fields/TextField.tsx +56 -0
- package/admin/src/components/fields/index.ts +54 -0
- package/admin/src/components/fields/registry.ts +64 -0
- package/admin/src/components/fields/types.ts +217 -0
- package/admin/src/components/filters/TaxonomyFilter.tsx +254 -0
- package/admin/src/components/filters/index.ts +1 -0
- package/admin/src/components/index.ts +8 -0
- package/admin/src/components/media/MediaAssetActions.tsx +115 -0
- package/admin/src/components/media/MediaAssetEditDialog.tsx +217 -0
- package/admin/src/components/media/MediaBulkActionBar.tsx +51 -0
- package/admin/src/components/media/MediaFolderActions.tsx +69 -0
- package/admin/src/components/media/MediaFolderEditDialog.tsx +126 -0
- package/admin/src/components/media/MediaMoveModal.tsx +179 -0
- package/admin/src/components/media/MediaPreviewModal.tsx +370 -0
- package/admin/src/components/media/MediaTaxonomyPicker.tsx +304 -0
- package/admin/src/components/media/MediaTrashBulkActionBar.tsx +59 -0
- package/admin/src/components/ui/accordion.tsx +64 -0
- package/admin/src/components/ui/alert-dialog.tsx +155 -0
- package/admin/src/components/ui/alert.tsx +66 -0
- package/admin/src/components/ui/avatar.tsx +53 -0
- package/admin/src/components/ui/badge.tsx +46 -0
- package/admin/src/components/ui/breadcrumb.tsx +109 -0
- package/admin/src/components/ui/button.tsx +62 -0
- package/admin/src/components/ui/calendar.tsx +220 -0
- package/admin/src/components/ui/card.tsx +92 -0
- package/admin/src/components/ui/checkbox.tsx +30 -0
- package/admin/src/components/ui/command.tsx +182 -0
- package/admin/src/components/ui/dialog.tsx +143 -0
- package/admin/src/components/ui/dropdown-menu.tsx +257 -0
- package/admin/src/components/ui/form.tsx +167 -0
- package/admin/src/components/ui/input.tsx +21 -0
- package/admin/src/components/ui/label.tsx +24 -0
- package/admin/src/components/ui/popover.tsx +46 -0
- package/admin/src/components/ui/scroll-area.tsx +56 -0
- package/admin/src/components/ui/select.tsx +190 -0
- package/admin/src/components/ui/separator.tsx +26 -0
- package/admin/src/components/ui/sheet.tsx +137 -0
- package/admin/src/components/ui/sidebar.tsx +724 -0
- package/admin/src/components/ui/skeleton.tsx +13 -0
- package/admin/src/components/ui/sonner.tsx +38 -0
- package/admin/src/components/ui/switch.tsx +31 -0
- package/admin/src/components/ui/table.tsx +114 -0
- package/admin/src/components/ui/tabs.tsx +66 -0
- package/admin/src/components/ui/textarea.tsx +18 -0
- package/admin/src/components/ui/tooltip.tsx +61 -0
- package/admin/src/contexts/AdminConfigContext.tsx +30 -0
- package/admin/src/contexts/AuthContext.tsx +330 -0
- package/admin/src/contexts/BreadcrumbContext.tsx +49 -0
- package/admin/src/contexts/SettingsConfigContext.tsx +57 -0
- package/admin/src/contexts/ThemeContext.tsx +91 -0
- package/admin/src/contexts/index.ts +20 -0
- package/admin/src/embed/components/EmbedHeader.tsx +103 -0
- package/admin/src/embed/components/EmbedLayout.tsx +29 -0
- package/admin/src/embed/components/EmbedSidebar.tsx +119 -0
- package/admin/src/embed/components/index.ts +3 -0
- package/admin/src/embed/contexts/ApiContext.tsx +32 -0
- package/admin/src/embed/index.tsx +184 -0
- package/admin/src/embed/navigation.tsx +202 -0
- package/admin/src/embed/pages/Content.tsx +19 -0
- package/admin/src/embed/pages/ContentTypes.tsx +19 -0
- package/admin/src/embed/pages/Dashboard.tsx +19 -0
- package/admin/src/embed/pages/Media.tsx +19 -0
- package/admin/src/embed/pages/Settings.tsx +22 -0
- package/admin/src/embed/pages/Taxonomies.tsx +22 -0
- package/admin/src/embed/pages/Trash.tsx +22 -0
- package/admin/src/embed/pages/index.ts +7 -0
- package/admin/src/embed/types.ts +24 -0
- package/admin/src/hooks/index.ts +2 -0
- package/admin/src/hooks/use-mobile.ts +19 -0
- package/admin/src/hooks/useBreadcrumbLabel.ts +15 -0
- package/admin/src/hooks/usePermissions.ts +211 -0
- package/admin/src/lib/admin-config.ts +111 -0
- package/admin/src/lib/cn.ts +6 -0
- package/admin/src/lib/config.server.ts +56 -0
- package/admin/src/lib/convex.ts +26 -0
- package/admin/src/lib/embed-adapter.ts +80 -0
- package/admin/src/lib/icons.tsx +96 -0
- package/admin/src/lib/loadAdminConfig.ts +92 -0
- package/admin/src/lib/motion.ts +29 -0
- package/admin/src/lib/navigation.ts +43 -0
- package/admin/src/lib/tanstack-adapter.ts +82 -0
- package/admin/src/pages/ContentPage.tsx +337 -0
- package/admin/src/pages/ContentTypesPage.tsx +457 -0
- package/admin/src/pages/DashboardPage.tsx +163 -0
- package/admin/src/pages/MediaPage.tsx +34 -0
- package/admin/src/pages/SettingsPage.tsx +486 -0
- package/admin/src/pages/TaxonomiesPage.tsx +289 -0
- package/admin/src/pages/TrashPage.tsx +421 -0
- package/admin/src/pages/index.ts +14 -0
- package/admin/src/routeTree.gen.ts +262 -0
- package/admin/src/router.tsx +22 -0
- package/admin/src/routes/__root.tsx +250 -0
- package/admin/src/routes/content-types.tsx +20 -0
- package/admin/src/routes/content.tsx +20 -0
- package/admin/src/routes/entries/$entryId.tsx +107 -0
- package/admin/src/routes/entries/new.$contentTypeId.tsx +69 -0
- package/admin/src/routes/entries/type/$contentTypeId.tsx +503 -0
- package/admin/src/routes/index.tsx +20 -0
- package/admin/src/routes/media.tsx +1095 -0
- package/admin/src/routes/settings.tsx +20 -0
- package/admin/src/routes/taxonomies.tsx +20 -0
- package/admin/src/routes/trash.tsx +20 -0
- package/admin/src/styles/globals.css +69 -0
- package/admin/src/styles/tailwind-config.css +74 -0
- package/admin/src/styles/theme.css +73 -0
- package/admin/src/types/index.ts +221 -0
- package/admin/src/utils/errorParsing.ts +163 -0
- package/admin/src/utils/index.ts +5 -0
- package/admin/src/vite-env.d.ts +14 -0
- package/admin/tailwind.preset.cjs +102 -0
- package/admin-dist/nitro.json +1 -1
- package/admin-dist/public/assets/{CmsEmptyState-CRswfTzk.js → CmsEmptyState-CkqBIab3.js} +2 -2
- package/admin-dist/public/assets/{CmsPageHeader-CirpXndm.js → CmsPageHeader-CUtl5MMG.js} +1 -1
- package/admin-dist/public/assets/{CmsStatusBadge-CbEUpQu-.js → CmsStatusBadge-CUYFgEe-.js} +1 -1
- package/admin-dist/public/assets/CmsSurface-CsJfAVa3.js +1 -0
- package/admin-dist/public/assets/{CmsToolbar-BI2nZOXp.js → CmsToolbar-CnfbcxeP.js} +1 -1
- package/admin-dist/public/assets/{ContentEntryEditor-CBeCyK_m.js → ContentEntryEditor-BU220CCy.js} +1 -1
- package/admin-dist/public/assets/TaxonomyFilter-CWCxC5HZ.js +1 -0
- package/admin-dist/public/assets/_contentTypeId-DK8cskRt.js +1 -0
- package/admin-dist/public/assets/{_entryId-CKU_glsK.js → _entryId-CuVMExbb.js} +1 -1
- package/admin-dist/public/assets/alert-CF1BSzGR.js +1 -0
- package/admin-dist/public/assets/{badge-hvUOzpVZ.js → badge-CmuOIVKp.js} +1 -1
- package/admin-dist/public/assets/{circle-check-big-CF_pR17r.js → circle-check-big-BKDVG6DU.js} +1 -1
- package/admin-dist/public/assets/{command-DU82cJlt.js → command-XJxnF2Sd.js} +1 -1
- package/admin-dist/public/assets/content-QBUxdxbS.js +1 -0
- package/admin-dist/public/assets/content-types-CrNEm8Hf.js +2 -0
- package/admin-dist/public/assets/globals-B7Wsfh_v.css +1 -0
- package/admin-dist/public/assets/index-C7xOwudI.js +1 -0
- package/admin-dist/public/assets/{label-KNtpL71g.js → label-CHCnXeBk.js} +1 -1
- package/admin-dist/public/assets/{link-2-Bw2aI4V4.js → link-2-Bb34judH.js} +1 -1
- package/admin-dist/public/assets/{list-sYepHjt_.js → list-9Pzt48ld.js} +1 -1
- package/admin-dist/public/assets/{main-CKj5yfEi.js → main-CjQ2VI9L.js} +3 -3
- package/admin-dist/public/assets/media-Dc5PWt2Q.js +1 -0
- package/admin-dist/public/assets/{new._contentTypeId-C3LstjNs.js → new._contentTypeId-C_I4YxIa.js} +1 -1
- package/admin-dist/public/assets/{plus-DUn8v_Xf.js → plus-Ceef7DHk.js} +1 -1
- package/admin-dist/public/assets/{rotate-ccw-DJEoHcRI.js → rotate-ccw-7k7-4VUq.js} +1 -1
- package/admin-dist/public/assets/scroll-area-CC6wujnp.js +1 -0
- package/admin-dist/public/assets/{search-MuAUDJKR.js → search-DwoUV2pv.js} +1 -1
- package/admin-dist/public/assets/select-hOZTp8aC.js +1 -0
- package/admin-dist/public/assets/settings-t2PbCZh4.js +1 -0
- package/admin-dist/public/assets/switch-jX2pDaNU.js +1 -0
- package/admin-dist/public/assets/tabs-q4EbZk7c.js +1 -0
- package/admin-dist/public/assets/tanstack-adapter-B-Glm4kH.js +1 -0
- package/admin-dist/public/assets/taxonomies-kyk5P4ZW.js +1 -0
- package/admin-dist/public/assets/{textarea-BTy7nwzR.js → textarea-B6SfBmr0.js} +1 -1
- package/admin-dist/public/assets/trash-BOCnIznD.js +1 -0
- package/admin-dist/public/assets/{triangle-alert-E52Vfeuh.js → triangle-alert-CXFIO_Gu.js} +1 -1
- package/admin-dist/public/assets/useBreadcrumbLabel-_6qBagc3.js +1 -0
- package/admin-dist/public/assets/{usePermissions-Basjs9BT.js → usePermissions-M1ijZ7a6.js} +1 -1
- package/admin-dist/server/_chunks/_libs/@tanstack/react-router.mjs +7 -0
- package/admin-dist/server/_ssr/{badge-6BsP37vG.mjs → CmsButton-DOiTVKQq.mjs} +33 -33
- package/admin-dist/server/_ssr/{CmsEmptyState-DU7-7-mV.mjs → CmsEmptyState-fbnGt3LD.mjs} +2 -2
- package/admin-dist/server/_ssr/{CmsPageHeader-CseW0AHm.mjs → CmsPageHeader-DHRrdOZa.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsStatusBadge-B_pi4KCp.mjs → CmsStatusBadge-s7obWbKZ.mjs} +2 -2
- package/admin-dist/server/_ssr/CmsSurface-rFoYjb62.mjs +44 -0
- package/admin-dist/server/_ssr/{CmsToolbar-X75ex6ek.mjs → CmsToolbar-zTE45z2q.mjs} +2 -2
- package/admin-dist/server/_ssr/{ContentEntryEditor-CepusRsA.mjs → ContentEntryEditor-BLoEjT_m.mjs} +12 -12
- package/admin-dist/server/_ssr/{TaxonomyFilter-Bwrq0-cz.mjs → TaxonomyFilter-XAtaJC2z.mjs} +5 -5
- package/admin-dist/server/_ssr/{_contentTypeId-BqYKEcLr.mjs → _contentTypeId-Csl4822C.mjs} +13 -13
- package/admin-dist/server/_ssr/{_entryId-CRfnqeDf.mjs → _entryId-D8alLFBx.mjs} +15 -15
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-BffZedId.mjs +4 -0
- package/admin-dist/server/_ssr/{command-fy8epIKf.mjs → command-C0Di14--.mjs} +1 -1
- package/admin-dist/server/_ssr/{content-B5RhL7uW.mjs → content-CT-FPsmV.mjs} +170 -98
- package/admin-dist/server/_ssr/{content-types-BIOqCQYN.mjs → content-types-C8cBFdzE.mjs} +260 -115
- package/admin-dist/server/_ssr/{index-DHSHDPt1.mjs → index-BJtcrEc-.mjs} +88 -17
- package/admin-dist/server/_ssr/index.mjs +2 -2
- package/admin-dist/server/_ssr/{label-C8Dko1j7.mjs → label-qn2Afwl4.mjs} +1 -1
- package/admin-dist/server/_ssr/{media-CSx3XttC.mjs → media-qv5IAsMZ.mjs} +43 -43
- package/admin-dist/server/_ssr/{new._contentTypeId-DzanEZQM.mjs → new._contentTypeId-DdGyrhqs.mjs} +13 -13
- package/admin-dist/server/_ssr/{router-DDWcF-kt.mjs → router-nSVkxb6Y.mjs} +11 -11
- package/admin-dist/server/_ssr/{scroll-area-bjPYwhXN.mjs → scroll-area-BCinP455.mjs} +1 -1
- package/admin-dist/server/_ssr/{select-BUhDDf4T.mjs → select-BKQlQScw.mjs} +1 -1
- package/admin-dist/server/_ssr/{settings-DAsxnw2q.mjs → settings-BCr2KQlk.mjs} +236 -139
- package/admin-dist/server/_ssr/{switch-BgyRtQ1Z.mjs → switch-BaOi42fE.mjs} +1 -1
- package/admin-dist/server/_ssr/{tabs-DzMdRB1A.mjs → tabs-DYXEi9kq.mjs} +5 -3
- package/admin-dist/server/_ssr/tanstack-adapter-Bsz8kha-.mjs +119 -0
- package/admin-dist/server/_ssr/{taxonomies-C8j8g5Q5.mjs → taxonomies-CueMHTbE.mjs} +184 -73
- package/admin-dist/server/_ssr/{textarea-9jNeYJSc.mjs → textarea-CI0Jqx2x.mjs} +1 -1
- package/admin-dist/server/_ssr/{trash-DYMxwhZB.mjs → trash-DE6W8GoX.mjs} +211 -88
- package/admin-dist/server/_ssr/{useBreadcrumbLabel-FNSAr2Ha.mjs → useBreadcrumbLabel-B5Yi72lM.mjs} +1 -1
- package/admin-dist/server/_ssr/{usePermissions-BJGGahrJ.mjs → usePermissions-C3nZ-Izm.mjs} +1 -1
- package/admin-dist/server/index.mjs +189 -182
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +156 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/index.js +6 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/client/admin/bulk.d.ts +79 -0
- package/dist/client/admin/bulk.d.ts.map +1 -0
- package/dist/client/admin/bulk.js +72 -0
- package/dist/client/admin/bulk.js.map +1 -0
- package/dist/client/admin/contentLock.d.ts +118 -0
- package/dist/client/admin/contentLock.d.ts.map +1 -0
- package/dist/client/admin/contentLock.js +81 -0
- package/dist/client/admin/contentLock.js.map +1 -0
- package/dist/client/admin/contentTypes.d.ts +1204 -0
- package/dist/client/admin/contentTypes.d.ts.map +1 -0
- package/dist/client/admin/contentTypes.js +122 -0
- package/dist/client/admin/contentTypes.js.map +1 -0
- package/dist/client/admin/dashboard.d.ts +16 -0
- package/dist/client/admin/dashboard.d.ts.map +1 -0
- package/dist/client/admin/dashboard.js +33 -0
- package/dist/client/admin/dashboard.js.map +1 -0
- package/dist/client/admin/entries.d.ts +358 -0
- package/dist/client/admin/entries.d.ts.map +1 -0
- package/dist/client/admin/entries.js +220 -0
- package/dist/client/admin/entries.js.map +1 -0
- package/dist/client/admin/index.d.ts +6568 -0
- package/dist/client/admin/index.d.ts.map +1 -0
- package/dist/client/admin/index.js +305 -0
- package/dist/client/admin/index.js.map +1 -0
- package/dist/client/admin/media.d.ts +1038 -0
- package/dist/client/admin/media.d.ts.map +1 -0
- package/dist/client/admin/media.js +489 -0
- package/dist/client/admin/media.js.map +1 -0
- package/dist/client/admin/taxonomies.d.ts +339 -0
- package/dist/client/admin/taxonomies.d.ts.map +1 -0
- package/dist/client/admin/taxonomies.js +364 -0
- package/dist/client/admin/taxonomies.js.map +1 -0
- package/dist/client/admin/trash.d.ts +91 -0
- package/dist/client/admin/trash.d.ts.map +1 -0
- package/dist/client/admin/trash.js +71 -0
- package/dist/client/admin/trash.js.map +1 -0
- package/dist/client/admin/types.d.ts +320 -0
- package/dist/client/admin/types.d.ts.map +1 -0
- package/dist/client/admin/types.js +7 -0
- package/dist/client/admin/types.js.map +1 -0
- package/dist/client/admin/validators.d.ts +3886 -0
- package/dist/client/admin/validators.d.ts.map +1 -0
- package/dist/client/admin/validators.js +322 -0
- package/dist/client/admin/validators.js.map +1 -0
- package/dist/client/admin/versions.d.ts +106 -0
- package/dist/client/admin/versions.d.ts.map +1 -0
- package/dist/client/admin/versions.js +57 -0
- package/dist/client/admin/versions.js.map +1 -0
- package/dist/client/adminApiTypes.d.ts +27 -0
- package/dist/client/adminApiTypes.d.ts.map +1 -0
- package/dist/client/adminApiTypes.js +12 -0
- package/dist/client/adminApiTypes.js.map +1 -0
- package/dist/client/{admin-config.d.ts → adminConfig.d.ts} +4 -4
- package/dist/client/adminConfig.d.ts.map +1 -0
- package/dist/client/{admin-config.js → adminConfig.js} +3 -3
- package/dist/client/adminConfig.js.map +1 -0
- package/dist/client/agentTools.d.ts +11 -21
- package/dist/client/agentTools.d.ts.map +1 -1
- package/dist/client/agentTools.js +4 -4
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +19 -6
- package/dist/client/index.js.map +1 -1
- package/dist/client/schema/codegen.d.ts +2 -2
- package/dist/client/schema/codegen.d.ts.map +1 -1
- package/dist/client/schema/codegen.js +3 -3
- package/dist/client/schema/codegen.js.map +1 -1
- package/dist/client/schema/defineContentType.d.ts +3 -3
- package/dist/client/schema/defineContentType.js +3 -3
- package/dist/client/schema/index.d.ts +7 -7
- package/dist/client/schema/index.d.ts.map +1 -1
- package/dist/client/schema/index.js +5 -5
- package/dist/client/schema/index.js.map +1 -1
- package/dist/client/schema/schemaDrift.d.ts +1 -1
- package/dist/client/schema/schemaDrift.js +1 -1
- package/dist/client/schema/typedClient.d.ts +2 -2
- package/dist/client/schema/typedClient.js +2 -2
- package/dist/client/schema/types.d.ts +1 -1
- package/dist/client/schema/types.js +1 -1
- package/dist/client/wrapper.d.ts +108 -65
- package/dist/client/wrapper.d.ts.map +1 -1
- package/dist/client/wrapper.js +22 -22
- package/dist/client/wrapper.js.map +1 -1
- package/dist/component/contentEntries.d.ts +4 -4
- package/dist/component/contentEntryMutations.d.ts +46 -0
- package/dist/component/contentEntryMutations.d.ts.map +1 -1
- package/dist/component/contentEntryMutations.js +1 -1
- package/dist/component/contentEntryMutations.js.map +1 -1
- package/dist/component/contentTypeMigration.d.ts +1 -1
- package/dist/component/contentTypeMutations.d.ts +22 -0
- package/dist/component/contentTypeMutations.d.ts.map +1 -1
- package/dist/component/contentTypeMutations.js +1 -1
- package/dist/component/contentTypeMutations.js.map +1 -1
- package/dist/component/convex.config.d.ts +2 -2
- package/dist/component/convex.config.js +2 -2
- package/dist/component/index.d.ts +1 -1
- package/dist/component/index.js +1 -1
- package/dist/component/lib/ragContentChunker.d.ts +1 -1
- package/dist/component/lib/ragContentChunker.js +1 -1
- package/dist/component/mediaAssetMutations.d.ts +47 -0
- package/dist/component/mediaAssetMutations.d.ts.map +1 -1
- package/dist/component/mediaAssetMutations.js +1 -1
- package/dist/component/mediaAssetMutations.js.map +1 -1
- package/dist/component/roles.d.ts +1 -1
- package/dist/component/roles.js +1 -1
- package/dist/component/schema.d.ts +9 -0
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +1 -1
- package/dist/component/schema.js.map +1 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +13 -7
- package/dist/react/index.js.map +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.js +2 -2
- package/package.json +115 -13
- package/admin-dist/public/assets/ErrorState-BIVaWmom.js +0 -1
- package/admin-dist/public/assets/TaxonomyFilter-ChaY6Y_x.js +0 -1
- package/admin-dist/public/assets/_contentTypeId-DQ8k_Rvw.js +0 -1
- package/admin-dist/public/assets/alert-BXjTqrwQ.js +0 -1
- package/admin-dist/public/assets/content-_LXl3pp7.js +0 -1
- package/admin-dist/public/assets/content-types-KjxaXGxY.js +0 -2
- package/admin-dist/public/assets/globals-CS6BZ0zp.css +0 -1
- package/admin-dist/public/assets/index-DNGIZHL-.js +0 -1
- package/admin-dist/public/assets/media-Bkrkffm7.js +0 -1
- package/admin-dist/public/assets/scroll-area-DfIlT0in.js +0 -1
- package/admin-dist/public/assets/select-BD29IXCI.js +0 -1
- package/admin-dist/public/assets/settings-DmMyn_6A.js +0 -1
- package/admin-dist/public/assets/switch-h3Rrnl5i.js +0 -1
- package/admin-dist/public/assets/tabs-imc8h-Dp.js +0 -1
- package/admin-dist/public/assets/taxonomies-dAsrT65H.js +0 -1
- package/admin-dist/public/assets/trash-SAWKZZHv.js +0 -1
- package/admin-dist/public/assets/useBreadcrumbLabel-BECBMCzM.js +0 -1
- package/admin-dist/server/_ssr/ErrorState-cI-bKLez.mjs +0 -89
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-BwDlABVk.mjs +0 -4
- package/admin-dist/server/_ssr/alert-CVt45UUP.mjs +0 -92
- package/dist/client/admin-config.d.ts.map +0 -1
- package/dist/client/admin-config.js.map +0 -1
- package/dist/client/adminApi.d.ts +0 -2273
- package/dist/client/adminApi.d.ts.map +0 -1
- package/dist/client/adminApi.js +0 -716
- package/dist/client/adminApi.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { I as Input, a as Checkbox, C as CmsEmptyState, c as CmsDialog } from "./CmsEmptyState-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { C as CmsToolbar } from "./CmsToolbar-X75ex6ek.mjs";
|
|
1
|
+
import { j as jsxRuntimeExports, r as reactExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
+
import { a as api, c as cn } from "./router-nSVkxb6Y.mjs";
|
|
3
|
+
import { C as CmsButton, B as Badge } from "./CmsButton-DOiTVKQq.mjs";
|
|
4
|
+
import { I as Input, a as Checkbox, C as CmsEmptyState, c as CmsDialog } from "./CmsEmptyState-fbnGt3LD.mjs";
|
|
5
|
+
import { L as Label } from "./label-qn2Afwl4.mjs";
|
|
6
|
+
import { T as Textarea } from "./textarea-CI0Jqx2x.mjs";
|
|
7
|
+
import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from "./select-BKQlQScw.mjs";
|
|
8
|
+
import { C as CmsPageHeader } from "./CmsPageHeader-DHRrdOZa.mjs";
|
|
9
|
+
import { C as CmsToolbar } from "./CmsToolbar-zTE45z2q.mjs";
|
|
10
|
+
import { u as useTanStackNavigation } from "./tanstack-adapter-Bsz8kha-.mjs";
|
|
12
11
|
import { u as useQuery, d as useMutation } from "../_libs/convex.mjs";
|
|
13
12
|
import { ad as Grid3x3, ae as List, Q as Plus, N as Search, af as FileType, W as Pencil, ag as TextAlignStart, ah as FolderOpen, V as Tag, d as ChevronDown, p as Braces, I as Image, a8 as Link2, u as Calendar, T as ToggleLeft, r as Hash, ai as ChevronUp, X, O as TriangleAlert } from "../_libs/lucide-react.mjs";
|
|
13
|
+
import "../_chunks/_libs/@tanstack/react-router.mjs";
|
|
14
14
|
import "../_libs/tiny-warning.mjs";
|
|
15
15
|
import "../_chunks/_libs/@tanstack/router-core.mjs";
|
|
16
16
|
import "../_libs/cookie-es.mjs";
|
|
@@ -987,36 +987,35 @@ const FIELD_ICONS = {
|
|
|
987
987
|
tags: /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { className: "size-3" }),
|
|
988
988
|
category: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-3" })
|
|
989
989
|
};
|
|
990
|
-
function ContentTypesPage() {
|
|
990
|
+
function ContentTypesPage({ api: api2, navigation }) {
|
|
991
991
|
const [searchQuery, setSearchQuery] = reactExports.useState("");
|
|
992
992
|
const [viewMode, setViewMode] = reactExports.useState("grid");
|
|
993
993
|
const [showActiveOnly, setShowActiveOnly] = reactExports.useState(true);
|
|
994
994
|
const [showCreateModal, setShowCreateModal] = reactExports.useState(false);
|
|
995
|
-
const [
|
|
996
|
-
|
|
995
|
+
const [
|
|
996
|
+
editingContentType,
|
|
997
|
+
setEditingContentType
|
|
998
|
+
] = reactExports.useState(null);
|
|
997
999
|
const handleContentTypeCreated = reactExports.useCallback(() => {
|
|
998
1000
|
setShowCreateModal(false);
|
|
999
1001
|
}, []);
|
|
1000
1002
|
const handleContentTypeUpdated = reactExports.useCallback(() => {
|
|
1001
1003
|
setEditingContentType(null);
|
|
1002
1004
|
}, []);
|
|
1003
|
-
const contentTypesResult = useQuery(
|
|
1005
|
+
const contentTypesResult = useQuery(api2.listContentTypes, {
|
|
1004
1006
|
isActive: showActiveOnly ? true : void 0,
|
|
1005
1007
|
includeEntryCounts: true
|
|
1006
1008
|
});
|
|
1007
1009
|
const contentTypes = contentTypesResult?.page ?? [];
|
|
1008
1010
|
const isLoading = contentTypesResult === void 0;
|
|
1009
|
-
const error = contentTypesResult?.error;
|
|
1010
|
-
const handleRetry = reactExports.useCallback(() => {
|
|
1011
|
-
setDismissedError(false);
|
|
1012
|
-
window.location.reload();
|
|
1013
|
-
}, []);
|
|
1014
1011
|
const filteredContentTypes = reactExports.useMemo(() => {
|
|
1015
1012
|
if (!searchQuery.trim()) {
|
|
1016
1013
|
return contentTypes;
|
|
1017
1014
|
}
|
|
1018
1015
|
const query = searchQuery.toLowerCase();
|
|
1019
|
-
return contentTypes.filter(
|
|
1016
|
+
return contentTypes.filter(
|
|
1017
|
+
(type) => type.name.toLowerCase().includes(query) || type.displayName.toLowerCase().includes(query)
|
|
1018
|
+
);
|
|
1020
1019
|
}, [contentTypes, searchQuery]);
|
|
1021
1020
|
const formatDate = (timestamp) => {
|
|
1022
1021
|
return new Date(timestamp).toLocaleDateString("en-US", {
|
|
@@ -1044,78 +1043,173 @@ function ContentTypesPage() {
|
|
|
1044
1043
|
return "Just now";
|
|
1045
1044
|
}
|
|
1046
1045
|
};
|
|
1047
|
-
if (error && !isLoading) {
|
|
1048
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
1049
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(CmsPageHeader, { title: "Content Types", description: "Define the structure of your content with custom fields and validation rules." }),
|
|
1050
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { error, title: "Failed to load content types", onRetry: handleRetry })
|
|
1051
|
-
] });
|
|
1052
|
-
}
|
|
1053
1046
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
1054
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm text-muted-foreground", children: "Loading content types..." })
|
|
1078
|
-
] }) : filteredContentTypes.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(CmsEmptyState, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FileType, { className: "size-6" }), title: searchQuery ? "No content types match your search" : "No content types defined", description: searchQuery ? "Try adjusting your search query or filters." : "Content types define the schema for your content. Create one to get started." }) : viewMode === "grid" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: filteredContentTypes.map((contentType) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "group flex flex-col rounded-lg border bg-card p-4 transition-all hover:border-primary/50 hover:shadow-md", children: [
|
|
1079
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
1080
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-10 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileType, { className: "size-5" }) }),
|
|
1081
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
1082
|
-
!contentType.isActive && /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { variant: "secondary", className: "text-xs font-normal", children: "Inactive" }),
|
|
1083
|
-
contentType.singleton && /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { variant: "secondary", className: "border-amber-200 bg-amber-50 text-xs font-normal text-amber-700", children: "Singleton" }),
|
|
1084
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: () => setEditingContentType(contentType), className: "rounded p-1.5 text-muted-foreground opacity-0 transition-all hover:bg-muted hover:text-foreground group-hover:opacity-100", title: "Edit content type", "aria-label": "Edit content type", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "size-4" }) })
|
|
1085
|
-
] })
|
|
1086
|
-
] }),
|
|
1087
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Link, { to: "/entries/type/$contentTypeId", params: {
|
|
1088
|
-
contentTypeId: contentType._id
|
|
1089
|
-
}, className: "flex flex-1 flex-col", children: [
|
|
1090
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-base font-semibold text-foreground", children: contentType.displayName }),
|
|
1091
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: contentType.name }),
|
|
1092
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 flex items-center gap-4", children: [
|
|
1093
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
|
1094
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-lg font-semibold text-foreground", children: contentType.fields.length }),
|
|
1095
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: contentType.fields.length === 1 ? "Field" : "Fields" })
|
|
1047
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1048
|
+
CmsPageHeader,
|
|
1049
|
+
{
|
|
1050
|
+
title: "Content Types",
|
|
1051
|
+
description: "Define the structure of your content with custom fields and validation rules."
|
|
1052
|
+
}
|
|
1053
|
+
),
|
|
1054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1055
|
+
CmsToolbar,
|
|
1056
|
+
{
|
|
1057
|
+
left: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1058
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
1059
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
1060
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1061
|
+
Input,
|
|
1062
|
+
{
|
|
1063
|
+
type: "search",
|
|
1064
|
+
placeholder: "Search content types...",
|
|
1065
|
+
value: searchQuery,
|
|
1066
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
1067
|
+
className: "w-64 pl-9"
|
|
1068
|
+
}
|
|
1069
|
+
)
|
|
1096
1070
|
] }),
|
|
1097
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("
|
|
1098
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
] }, field.name)),
|
|
1107
|
-
contentType.fields.length > 4 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "rounded-md bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: [
|
|
1108
|
-
"+",
|
|
1109
|
-
contentType.fields.length - 4,
|
|
1110
|
-
" more"
|
|
1071
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "flex cursor-pointer items-center gap-2 text-sm", children: [
|
|
1072
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1073
|
+
Checkbox,
|
|
1074
|
+
{
|
|
1075
|
+
checked: showActiveOnly,
|
|
1076
|
+
onCheckedChange: (checked) => setShowActiveOnly(checked)
|
|
1077
|
+
}
|
|
1078
|
+
),
|
|
1079
|
+
"Active only"
|
|
1111
1080
|
] })
|
|
1112
1081
|
] }),
|
|
1113
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("
|
|
1114
|
-
"
|
|
1115
|
-
|
|
1082
|
+
right: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1083
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex rounded-md border bg-muted/30", children: [
|
|
1084
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1085
|
+
"button",
|
|
1086
|
+
{
|
|
1087
|
+
className: cn(
|
|
1088
|
+
"rounded-l-md p-2 transition-colors",
|
|
1089
|
+
viewMode === "grid" ? "bg-background shadow-sm" : "hover:bg-muted/50"
|
|
1090
|
+
),
|
|
1091
|
+
onClick: () => setViewMode("grid"),
|
|
1092
|
+
title: "Grid view",
|
|
1093
|
+
"aria-label": "Grid view",
|
|
1094
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid3x3, { className: "size-4" })
|
|
1095
|
+
}
|
|
1096
|
+
),
|
|
1097
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1098
|
+
"button",
|
|
1099
|
+
{
|
|
1100
|
+
className: cn(
|
|
1101
|
+
"rounded-r-md p-2 transition-colors",
|
|
1102
|
+
viewMode === "list" ? "bg-background shadow-sm" : "hover:bg-muted/50"
|
|
1103
|
+
),
|
|
1104
|
+
onClick: () => setViewMode("list"),
|
|
1105
|
+
title: "List view",
|
|
1106
|
+
"aria-label": "List view",
|
|
1107
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(List, { className: "size-4" })
|
|
1108
|
+
}
|
|
1109
|
+
)
|
|
1110
|
+
] }),
|
|
1111
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1112
|
+
CmsButton,
|
|
1113
|
+
{
|
|
1114
|
+
onClick: () => setShowCreateModal(true),
|
|
1115
|
+
"data-testid": "create-content-type-button",
|
|
1116
|
+
children: [
|
|
1117
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
|
|
1118
|
+
"Create Content Type"
|
|
1119
|
+
]
|
|
1120
|
+
}
|
|
1121
|
+
)
|
|
1116
1122
|
] })
|
|
1117
|
-
|
|
1118
|
-
|
|
1123
|
+
}
|
|
1124
|
+
),
|
|
1125
|
+
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-12", children: [
|
|
1126
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-8 animate-spin rounded-full border-2 border-muted border-t-primary" }),
|
|
1127
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm text-muted-foreground", children: "Loading content types..." })
|
|
1128
|
+
] }) : filteredContentTypes.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1129
|
+
CmsEmptyState,
|
|
1130
|
+
{
|
|
1131
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FileType, { className: "size-6" }),
|
|
1132
|
+
title: searchQuery ? "No content types match your search" : "No content types defined",
|
|
1133
|
+
description: searchQuery ? "Try adjusting your search query or filters." : "Content types define the schema for your content. Create one to get started."
|
|
1134
|
+
}
|
|
1135
|
+
) : viewMode === "grid" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: filteredContentTypes.map((contentType) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1136
|
+
"div",
|
|
1137
|
+
{
|
|
1138
|
+
className: "group flex flex-col rounded-lg border bg-card p-4 transition-all hover:border-primary/50 hover:shadow-md",
|
|
1139
|
+
children: [
|
|
1140
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
1141
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-10 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileType, { className: "size-5" }) }),
|
|
1142
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
1143
|
+
!contentType.isActive && /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { variant: "secondary", className: "text-xs font-normal", children: "Inactive" }),
|
|
1144
|
+
contentType.singleton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1145
|
+
Badge,
|
|
1146
|
+
{
|
|
1147
|
+
variant: "secondary",
|
|
1148
|
+
className: "border-amber-200 bg-amber-50 text-xs font-normal text-amber-700",
|
|
1149
|
+
children: "Singleton"
|
|
1150
|
+
}
|
|
1151
|
+
),
|
|
1152
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1153
|
+
"button",
|
|
1154
|
+
{
|
|
1155
|
+
onClick: () => setEditingContentType(contentType),
|
|
1156
|
+
className: "rounded p-1.5 text-muted-foreground opacity-0 transition-all hover:bg-muted hover:text-foreground group-hover:opacity-100",
|
|
1157
|
+
title: "Edit content type",
|
|
1158
|
+
"aria-label": "Edit content type",
|
|
1159
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "size-4" })
|
|
1160
|
+
}
|
|
1161
|
+
)
|
|
1162
|
+
] })
|
|
1163
|
+
] }),
|
|
1164
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1165
|
+
"button",
|
|
1166
|
+
{
|
|
1167
|
+
type: "button",
|
|
1168
|
+
onClick: () => navigation.navigateToContentType(contentType._id),
|
|
1169
|
+
className: "flex flex-1 flex-col text-left",
|
|
1170
|
+
children: [
|
|
1171
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-base font-semibold text-foreground", children: contentType.displayName }),
|
|
1172
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: contentType.name }),
|
|
1173
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 flex items-center gap-4", children: [
|
|
1174
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
|
1175
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-lg font-semibold text-foreground", children: contentType.fields.length }),
|
|
1176
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: contentType.fields.length === 1 ? "Field" : "Fields" })
|
|
1177
|
+
] }),
|
|
1178
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
|
1179
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-lg font-semibold text-foreground", children: contentType.entryCount ?? 0 }),
|
|
1180
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: contentType.entryCount === 1 ? "Entry" : "Entries" })
|
|
1181
|
+
] })
|
|
1182
|
+
] }),
|
|
1183
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 flex flex-wrap gap-1.5", children: [
|
|
1184
|
+
contentType.fields.slice(0, 4).map((field) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1185
|
+
"span",
|
|
1186
|
+
{
|
|
1187
|
+
className: "flex items-center gap-1 rounded-md bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
1188
|
+
title: field.label,
|
|
1189
|
+
children: [
|
|
1190
|
+
FIELD_ICONS[field.type] || /* @__PURE__ */ jsxRuntimeExports.jsx(TextAlignStart, { className: "size-3" }),
|
|
1191
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: field.label })
|
|
1192
|
+
]
|
|
1193
|
+
},
|
|
1194
|
+
field.name
|
|
1195
|
+
)),
|
|
1196
|
+
contentType.fields.length > 4 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "rounded-md bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: [
|
|
1197
|
+
"+",
|
|
1198
|
+
contentType.fields.length - 4,
|
|
1199
|
+
" more"
|
|
1200
|
+
] })
|
|
1201
|
+
] }),
|
|
1202
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "mt-auto pt-3 text-xs text-muted-foreground", children: [
|
|
1203
|
+
"Updated ",
|
|
1204
|
+
getRelativeTime(contentType._creationTime)
|
|
1205
|
+
] })
|
|
1206
|
+
]
|
|
1207
|
+
}
|
|
1208
|
+
)
|
|
1209
|
+
]
|
|
1210
|
+
},
|
|
1211
|
+
contentType._id
|
|
1212
|
+
)) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-lg border bg-card", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full", children: [
|
|
1119
1213
|
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "border-b", children: [
|
|
1120
1214
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "p-3 text-left text-sm font-medium text-muted-foreground", children: "Name" }),
|
|
1121
1215
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "p-3 text-left text-sm font-medium text-muted-foreground", children: "Fields" }),
|
|
@@ -1124,28 +1218,66 @@ function ContentTypesPage() {
|
|
|
1124
1218
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "p-3 text-left text-sm font-medium text-muted-foreground", children: "Last Updated" }),
|
|
1125
1219
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "p-3 text-left text-sm font-medium text-muted-foreground", children: "Actions" })
|
|
1126
1220
|
] }) }),
|
|
1127
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: filteredContentTypes.map((contentType) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1221
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: filteredContentTypes.map((contentType) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1222
|
+
"tr",
|
|
1223
|
+
{
|
|
1224
|
+
className: "border-b last:border-0 transition-colors hover:bg-muted/50",
|
|
1225
|
+
children: [
|
|
1226
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "p-3", children: [
|
|
1227
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-medium text-foreground", children: contentType.displayName }),
|
|
1228
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: contentType.name })
|
|
1229
|
+
] }),
|
|
1230
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3 text-sm text-muted-foreground", children: contentType.fields.length }),
|
|
1231
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3 text-sm text-muted-foreground", children: contentType.entryCount ?? 0 }),
|
|
1232
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
1233
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1234
|
+
Badge,
|
|
1235
|
+
{
|
|
1236
|
+
variant: contentType.isActive ? "default" : "secondary",
|
|
1237
|
+
className: cn(
|
|
1238
|
+
"text-xs font-normal",
|
|
1239
|
+
contentType.isActive && "border-emerald-200 bg-emerald-50 text-emerald-700"
|
|
1240
|
+
),
|
|
1241
|
+
children: contentType.isActive ? "Active" : "Inactive"
|
|
1242
|
+
}
|
|
1243
|
+
),
|
|
1244
|
+
contentType.singleton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1245
|
+
Badge,
|
|
1246
|
+
{
|
|
1247
|
+
variant: "secondary",
|
|
1248
|
+
className: "border-amber-200 bg-amber-50 text-xs font-normal text-amber-700",
|
|
1249
|
+
children: "Singleton"
|
|
1250
|
+
}
|
|
1251
|
+
)
|
|
1252
|
+
] }) }),
|
|
1253
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3 text-sm text-muted-foreground", children: formatDate(contentType._creationTime) }),
|
|
1254
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1255
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1256
|
+
CmsButton,
|
|
1257
|
+
{
|
|
1258
|
+
variant: "outline",
|
|
1259
|
+
size: "sm",
|
|
1260
|
+
onClick: () => setEditingContentType(contentType),
|
|
1261
|
+
children: [
|
|
1262
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "size-3.5" }),
|
|
1263
|
+
"Edit"
|
|
1264
|
+
]
|
|
1265
|
+
}
|
|
1266
|
+
),
|
|
1267
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1268
|
+
CmsButton,
|
|
1269
|
+
{
|
|
1270
|
+
variant: "outline",
|
|
1271
|
+
size: "sm",
|
|
1272
|
+
onClick: () => navigation.navigateToContentType(contentType._id),
|
|
1273
|
+
children: "View Entries"
|
|
1274
|
+
}
|
|
1275
|
+
)
|
|
1276
|
+
] }) })
|
|
1277
|
+
]
|
|
1278
|
+
},
|
|
1279
|
+
contentType._id
|
|
1280
|
+
)) })
|
|
1149
1281
|
] }) }),
|
|
1150
1282
|
!isLoading && filteredContentTypes.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-center text-sm text-muted-foreground", children: [
|
|
1151
1283
|
"Showing ",
|
|
@@ -1155,12 +1287,25 @@ function ContentTypesPage() {
|
|
|
1155
1287
|
" content type",
|
|
1156
1288
|
contentTypes.length !== 1 ? "s" : ""
|
|
1157
1289
|
] }),
|
|
1158
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1290
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1291
|
+
ContentTypeFormModal,
|
|
1292
|
+
{
|
|
1293
|
+
isOpen: showCreateModal || !!editingContentType,
|
|
1294
|
+
onClose: () => {
|
|
1295
|
+
setShowCreateModal(false);
|
|
1296
|
+
setEditingContentType(null);
|
|
1297
|
+
},
|
|
1298
|
+
contentType: editingContentType,
|
|
1299
|
+
onCreated: handleContentTypeCreated,
|
|
1300
|
+
onUpdated: handleContentTypeUpdated
|
|
1301
|
+
}
|
|
1302
|
+
)
|
|
1162
1303
|
] });
|
|
1163
1304
|
}
|
|
1305
|
+
function ContentTypesRoute() {
|
|
1306
|
+
const navigation = useTanStackNavigation();
|
|
1307
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ContentTypesPage, { api: api.admin, navigation });
|
|
1308
|
+
}
|
|
1164
1309
|
export {
|
|
1165
|
-
|
|
1310
|
+
ContentTypesRoute as component
|
|
1166
1311
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as api, c as cn } from "./router-nSVkxb6Y.mjs";
|
|
3
|
+
import { C as CmsPageHeader } from "./CmsPageHeader-DHRrdOZa.mjs";
|
|
4
|
+
import { u as useTanStackNavigation } from "./tanstack-adapter-Bsz8kha-.mjs";
|
|
5
5
|
import { u as useQuery } from "../_libs/convex.mjs";
|
|
6
6
|
import { J as FileText, I as Image, a as Layers, x as Settings, ak as TrendingUp } from "../_libs/lucide-react.mjs";
|
|
7
|
+
import "../_chunks/_libs/@tanstack/react-router.mjs";
|
|
7
8
|
import "../_libs/tiny-warning.mjs";
|
|
8
9
|
import "../_chunks/_libs/@tanstack/router-core.mjs";
|
|
9
10
|
import "../_libs/cookie-es.mjs";
|
|
@@ -138,17 +139,55 @@ function Skeleton({ className, ...props }) {
|
|
|
138
139
|
}
|
|
139
140
|
);
|
|
140
141
|
}
|
|
141
|
-
function DashboardPage() {
|
|
142
|
-
const stats = useQuery(
|
|
142
|
+
function DashboardPage({ api: api2, navigation }) {
|
|
143
|
+
const stats = useQuery(api2.getDashboardStats, {});
|
|
143
144
|
const isLoading = stats === void 0;
|
|
144
145
|
const hasError = stats === null;
|
|
145
146
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-8", children: [
|
|
146
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
148
|
+
CmsPageHeader,
|
|
149
|
+
{
|
|
150
|
+
title: "Dashboard",
|
|
151
|
+
description: "Welcome to Convex CMS Admin. Manage your content, media, and publishing workflows."
|
|
152
|
+
}
|
|
153
|
+
),
|
|
147
154
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: [
|
|
148
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
155
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
156
|
+
DashboardCard,
|
|
157
|
+
{
|
|
158
|
+
title: "Content Entries",
|
|
159
|
+
description: "Create and manage your content",
|
|
160
|
+
onClick: () => navigation.navigate("/content"),
|
|
161
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "size-5" })
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
165
|
+
DashboardCard,
|
|
166
|
+
{
|
|
167
|
+
title: "Media Library",
|
|
168
|
+
description: "Upload and organize media assets",
|
|
169
|
+
onClick: () => navigation.navigate("/media"),
|
|
170
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Image, { className: "size-5" })
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
174
|
+
DashboardCard,
|
|
175
|
+
{
|
|
176
|
+
title: "Content Types",
|
|
177
|
+
description: "Define content schemas and fields",
|
|
178
|
+
onClick: () => navigation.navigate("/content-types"),
|
|
179
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Layers, { className: "size-5" })
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
183
|
+
DashboardCard,
|
|
184
|
+
{
|
|
185
|
+
title: "Settings",
|
|
186
|
+
description: "Configure CMS settings",
|
|
187
|
+
onClick: () => navigation.navigate("/settings"),
|
|
188
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings, { className: "size-5" })
|
|
189
|
+
}
|
|
190
|
+
)
|
|
152
191
|
] }),
|
|
153
192
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "space-y-4", children: [
|
|
154
193
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -156,10 +195,38 @@ function DashboardPage() {
|
|
|
156
195
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold", children: "Quick Stats" })
|
|
157
196
|
] }),
|
|
158
197
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: [
|
|
159
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
198
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
199
|
+
StatCard,
|
|
200
|
+
{
|
|
201
|
+
label: "Content Types",
|
|
202
|
+
value: isLoading ? void 0 : hasError ? "—" : String(stats.contentTypes),
|
|
203
|
+
isLoading
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
207
|
+
StatCard,
|
|
208
|
+
{
|
|
209
|
+
label: "Content Entries",
|
|
210
|
+
value: isLoading ? void 0 : hasError ? "—" : String(stats.contentEntries),
|
|
211
|
+
isLoading
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
215
|
+
StatCard,
|
|
216
|
+
{
|
|
217
|
+
label: "Media Assets",
|
|
218
|
+
value: isLoading ? void 0 : hasError ? "—" : String(stats.mediaAssets),
|
|
219
|
+
isLoading
|
|
220
|
+
}
|
|
221
|
+
),
|
|
222
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
223
|
+
StatCard,
|
|
224
|
+
{
|
|
225
|
+
label: "Published",
|
|
226
|
+
value: isLoading ? void 0 : hasError ? "—" : String(stats.published),
|
|
227
|
+
isLoading
|
|
228
|
+
}
|
|
229
|
+
)
|
|
163
230
|
] })
|
|
164
231
|
] })
|
|
165
232
|
] });
|
|
@@ -167,10 +234,10 @@ function DashboardPage() {
|
|
|
167
234
|
function DashboardCard({
|
|
168
235
|
title,
|
|
169
236
|
description,
|
|
170
|
-
|
|
237
|
+
onClick,
|
|
171
238
|
icon
|
|
172
239
|
}) {
|
|
173
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
240
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", onClick, className: "text-left", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: "h-full transition-colors hover:bg-accent/50", children: [
|
|
174
241
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(CardHeader, { className: "pb-2", children: [
|
|
175
242
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-2 flex size-10 items-center justify-center rounded-lg bg-primary/10 text-primary", children: icon }),
|
|
176
243
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CardTitle, { className: "text-base", children: title })
|
|
@@ -188,6 +255,10 @@ function StatCard({
|
|
|
188
255
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground", children: label })
|
|
189
256
|
] }) });
|
|
190
257
|
}
|
|
258
|
+
function DashboardRoute() {
|
|
259
|
+
const navigation = useTanStackNavigation();
|
|
260
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardPage, { api: api.admin, navigation });
|
|
261
|
+
}
|
|
191
262
|
export {
|
|
192
|
-
|
|
263
|
+
DashboardRoute as component
|
|
193
264
|
};
|
|
@@ -440,7 +440,7 @@ function getResponse() {
|
|
|
440
440
|
return event.res;
|
|
441
441
|
}
|
|
442
442
|
async function getStartManifest(matchedRoutes) {
|
|
443
|
-
const { tsrStartManifest } = await import("./_tanstack-start-manifest_v-
|
|
443
|
+
const { tsrStartManifest } = await import("./_tanstack-start-manifest_v-BffZedId.mjs");
|
|
444
444
|
const startManifest = tsrStartManifest();
|
|
445
445
|
const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
|
|
446
446
|
rootRoute.assets = rootRoute.assets || [];
|
|
@@ -915,7 +915,7 @@ function getStartResponseHeaders(opts) {
|
|
|
915
915
|
let entriesPromise;
|
|
916
916
|
let manifestPromise;
|
|
917
917
|
async function loadEntries() {
|
|
918
|
-
const routerEntry = await import("./router-
|
|
918
|
+
const routerEntry = await import("./router-nSVkxb6Y.mjs").then((n) => n.s);
|
|
919
919
|
const startEntry = await import("./start-HYkvq4Ni.mjs");
|
|
920
920
|
return { startEntry, routerEntry };
|
|
921
921
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../_chunks/_libs/react.mjs";
|
|
2
2
|
import { R as Root } from "../_chunks/_libs/@radix-ui/react-label.mjs";
|
|
3
|
-
import { c as cn } from "./router-
|
|
3
|
+
import { c as cn } from "./router-nSVkxb6Y.mjs";
|
|
4
4
|
function Label({
|
|
5
5
|
className,
|
|
6
6
|
...props
|