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,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { B as Badge, C as CmsButton } from "./
|
|
4
|
-
import { L as Label } from "./label-
|
|
5
|
-
import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from "./select-
|
|
6
|
-
import { u as usePermissions } from "./usePermissions-
|
|
7
|
-
import { C as CmsPageHeader } from "./CmsPageHeader-
|
|
8
|
-
import {
|
|
9
|
-
import { S as Switch } from "./switch-
|
|
1
|
+
import { j as jsxRuntimeExports, r as reactExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
+
import { a as api, u as useSettingsConfig, R as RouteGuard, b as useTheme, c as cn } from "./router-nSVkxb6Y.mjs";
|
|
3
|
+
import { B as Badge, C as CmsButton } from "./CmsButton-DOiTVKQq.mjs";
|
|
4
|
+
import { L as Label } from "./label-qn2Afwl4.mjs";
|
|
5
|
+
import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from "./select-BKQlQScw.mjs";
|
|
6
|
+
import { u as usePermissions } from "./usePermissions-C3nZ-Izm.mjs";
|
|
7
|
+
import { C as CmsPageHeader } from "./CmsPageHeader-DHRrdOZa.mjs";
|
|
8
|
+
import { C as CmsSurface } from "./CmsSurface-rFoYjb62.mjs";
|
|
9
|
+
import { S as Switch } from "./switch-BaOi42fE.mjs";
|
|
10
|
+
import { u as useTanStackNavigation, A as Alert, a as AlertDescription } from "./tanstack-adapter-Bsz8kha-.mjs";
|
|
10
11
|
import { u as useQuery, d as useMutation } from "../_libs/convex.mjs";
|
|
11
12
|
import { O as TriangleAlert, Z as Check, X, _ as Sun, $ as Moon, a0 as Monitor } from "../_libs/lucide-react.mjs";
|
|
12
13
|
import "../_chunks/_libs/@tanstack/react-router.mjs";
|
|
@@ -84,49 +85,23 @@ import "../_chunks/_libs/@radix-ui/number.mjs";
|
|
|
84
85
|
import "../_chunks/_libs/@radix-ui/react-use-previous.mjs";
|
|
85
86
|
import "../_chunks/_libs/@radix-ui/react-visually-hidden.mjs";
|
|
86
87
|
import "../_chunks/_libs/@radix-ui/react-switch.mjs";
|
|
87
|
-
const LOCALE_OPTIONS = [
|
|
88
|
-
value: "en",
|
|
89
|
-
label: "
|
|
90
|
-
},
|
|
91
|
-
value: "
|
|
92
|
-
label: "
|
|
93
|
-
},
|
|
94
|
-
value: "
|
|
95
|
-
label: "
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
label: "
|
|
99
|
-
|
|
100
|
-
value: "
|
|
101
|
-
|
|
102
|
-
}, {
|
|
103
|
-
value: "pt",
|
|
104
|
-
label: "Portuguese (pt)"
|
|
105
|
-
}, {
|
|
106
|
-
value: "zh",
|
|
107
|
-
label: "Chinese (zh)"
|
|
108
|
-
}, {
|
|
109
|
-
value: "ja",
|
|
110
|
-
label: "Japanese (ja)"
|
|
111
|
-
}];
|
|
112
|
-
const THEME_OPTIONS = [{
|
|
113
|
-
value: "light",
|
|
114
|
-
label: "Light",
|
|
115
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Sun, { className: "size-4" })
|
|
116
|
-
}, {
|
|
117
|
-
value: "dark",
|
|
118
|
-
label: "Dark",
|
|
119
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Moon, { className: "size-4" })
|
|
120
|
-
}, {
|
|
121
|
-
value: "system",
|
|
122
|
-
label: "System",
|
|
123
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Monitor, { className: "size-4" })
|
|
124
|
-
}];
|
|
88
|
+
const LOCALE_OPTIONS = [
|
|
89
|
+
{ value: "en", label: "English (en)" },
|
|
90
|
+
{ value: "es", label: "Spanish (es)" },
|
|
91
|
+
{ value: "fr", label: "French (fr)" },
|
|
92
|
+
{ value: "de", label: "German (de)" },
|
|
93
|
+
{ value: "it", label: "Italian (it)" },
|
|
94
|
+
{ value: "pt", label: "Portuguese (pt)" },
|
|
95
|
+
{ value: "zh", label: "Chinese (zh)" },
|
|
96
|
+
{ value: "ja", label: "Japanese (ja)" }
|
|
97
|
+
];
|
|
98
|
+
const THEME_OPTIONS = [
|
|
99
|
+
{ value: "light", label: "Light", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Sun, { className: "size-4" }) },
|
|
100
|
+
{ value: "dark", label: "Dark", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Moon, { className: "size-4" }) },
|
|
101
|
+
{ value: "system", label: "System", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Monitor, { className: "size-4" }) }
|
|
102
|
+
];
|
|
125
103
|
function AppearanceSection() {
|
|
126
|
-
const {
|
|
127
|
-
theme,
|
|
128
|
-
setTheme
|
|
129
|
-
} = useTheme();
|
|
104
|
+
const { theme, setTheme } = useTheme();
|
|
130
105
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(CmsSurface, { elevation: "base", className: "p-6", children: [
|
|
131
106
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-4 text-lg font-semibold text-foreground", children: "Appearance" }),
|
|
132
107
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -134,24 +109,35 @@ function AppearanceSection() {
|
|
|
134
109
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Theme" }),
|
|
135
110
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Choose your preferred color theme for the admin interface." })
|
|
136
111
|
] }),
|
|
137
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex gap-1 rounded-lg border bg-muted/50 p-1", children: THEME_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
112
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex gap-1 rounded-lg border bg-muted/50 p-1", children: THEME_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
113
|
+
"button",
|
|
114
|
+
{
|
|
115
|
+
type: "button",
|
|
116
|
+
onClick: () => setTheme(option.value),
|
|
117
|
+
className: cn(
|
|
118
|
+
"flex items-center gap-2 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
119
|
+
theme === option.value ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
120
|
+
),
|
|
121
|
+
children: [
|
|
122
|
+
option.icon,
|
|
123
|
+
option.label
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
option.value
|
|
127
|
+
)) })
|
|
141
128
|
] }) })
|
|
142
129
|
] });
|
|
143
130
|
}
|
|
144
|
-
function SettingsPage(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
131
|
+
function SettingsPage({
|
|
132
|
+
api: api2,
|
|
133
|
+
navigation: _navigation
|
|
134
|
+
}) {
|
|
135
|
+
const { canManageSettings } = usePermissions();
|
|
148
136
|
const canEdit = canManageSettings();
|
|
149
|
-
const {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
const updateSettings = useMutation(api.settings.update);
|
|
154
|
-
const resetSettings = useMutation(api.settings.reset);
|
|
137
|
+
const { baseConfig } = useSettingsConfig();
|
|
138
|
+
const settings = useQuery(api2.getSettings, {});
|
|
139
|
+
const updateSettings = useMutation(api2.updateSettings);
|
|
140
|
+
const resetSettings = useMutation(api2.resetSettings);
|
|
155
141
|
const [formData, setFormData] = reactExports.useState(null);
|
|
156
142
|
const [isDirty, setIsDirty] = reactExports.useState(false);
|
|
157
143
|
const [feedbackStatus, setFeedbackStatus] = reactExports.useState("idle");
|
|
@@ -166,27 +152,33 @@ function SettingsPage() {
|
|
|
166
152
|
setFormData(settings);
|
|
167
153
|
}
|
|
168
154
|
}, [settings, isDirty]);
|
|
169
|
-
const handleLocaleChange = reactExports.useCallback(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
155
|
+
const handleLocaleChange = reactExports.useCallback(
|
|
156
|
+
(value) => {
|
|
157
|
+
if (!formData) return;
|
|
158
|
+
setFormData({
|
|
159
|
+
...formData,
|
|
160
|
+
defaultLocale: value
|
|
161
|
+
});
|
|
162
|
+
setIsDirty(true);
|
|
163
|
+
setFeedbackStatus("idle");
|
|
164
|
+
},
|
|
165
|
+
[formData]
|
|
166
|
+
);
|
|
167
|
+
const handleFeatureChange = reactExports.useCallback(
|
|
168
|
+
(feature) => {
|
|
169
|
+
if (!formData) return;
|
|
170
|
+
setFormData({
|
|
171
|
+
...formData,
|
|
172
|
+
features: {
|
|
173
|
+
...formData.features,
|
|
174
|
+
[feature]: !formData.features[feature]
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
setIsDirty(true);
|
|
178
|
+
setFeedbackStatus("idle");
|
|
179
|
+
},
|
|
180
|
+
[formData]
|
|
181
|
+
);
|
|
190
182
|
const handleSave = reactExports.useCallback(async () => {
|
|
191
183
|
if (!formData || !isDirty) return;
|
|
192
184
|
setFeedbackStatus("saving");
|
|
@@ -203,11 +195,15 @@ function SettingsPage() {
|
|
|
203
195
|
}, 3e3);
|
|
204
196
|
} catch (error) {
|
|
205
197
|
setFeedbackStatus("error");
|
|
206
|
-
setErrorMessage(
|
|
198
|
+
setErrorMessage(
|
|
199
|
+
error instanceof Error ? error.message : "Failed to save settings"
|
|
200
|
+
);
|
|
207
201
|
}
|
|
208
202
|
}, [formData, isDirty, updateSettings]);
|
|
209
203
|
const handleReset = reactExports.useCallback(async () => {
|
|
210
|
-
const confirmed = window.confirm(
|
|
204
|
+
const confirmed = window.confirm(
|
|
205
|
+
"Are you sure you want to reset all settings to their defaults? This action cannot be undone."
|
|
206
|
+
);
|
|
211
207
|
if (!confirmed) return;
|
|
212
208
|
setFeedbackStatus("saving");
|
|
213
209
|
setErrorMessage(null);
|
|
@@ -221,7 +217,9 @@ function SettingsPage() {
|
|
|
221
217
|
}, 3e3);
|
|
222
218
|
} catch (error) {
|
|
223
219
|
setFeedbackStatus("error");
|
|
224
|
-
setErrorMessage(
|
|
220
|
+
setErrorMessage(
|
|
221
|
+
error instanceof Error ? error.message : "Failed to reset settings"
|
|
222
|
+
);
|
|
225
223
|
}
|
|
226
224
|
}, [resetSettings]);
|
|
227
225
|
const handleDiscard = reactExports.useCallback(() => {
|
|
@@ -233,46 +231,90 @@ function SettingsPage() {
|
|
|
233
231
|
}
|
|
234
232
|
}, [settings]);
|
|
235
233
|
if (settings === void 0) {
|
|
236
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
234
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
235
|
+
RouteGuard,
|
|
236
|
+
{
|
|
237
|
+
requiredPermission: { resource: "settings", action: "manage" },
|
|
238
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
239
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
240
|
+
CmsPageHeader,
|
|
241
|
+
{
|
|
242
|
+
title: "Settings",
|
|
243
|
+
description: "Configure your CMS settings and preferences."
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-12", children: [
|
|
247
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-8 animate-spin rounded-full border-2 border-muted border-t-primary" }),
|
|
248
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm text-muted-foreground", children: "Loading settings..." })
|
|
249
|
+
] })
|
|
250
|
+
] })
|
|
251
|
+
}
|
|
252
|
+
);
|
|
246
253
|
}
|
|
247
254
|
if (settings === null && !formData) {
|
|
248
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
256
|
+
RouteGuard,
|
|
257
|
+
{
|
|
258
|
+
requiredPermission: { resource: "settings", action: "manage" },
|
|
259
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
260
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
261
|
+
CmsPageHeader,
|
|
262
|
+
{
|
|
263
|
+
title: "Settings",
|
|
264
|
+
description: "Configure your CMS settings and preferences."
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { variant: "destructive", children: [
|
|
268
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-4" }),
|
|
269
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDescription, { children: "Failed to load settings. Please try refreshing the page." })
|
|
270
|
+
] })
|
|
271
|
+
] })
|
|
272
|
+
}
|
|
273
|
+
);
|
|
258
274
|
}
|
|
259
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(RouteGuard, { requiredPermission: {
|
|
260
|
-
resource: "settings",
|
|
261
|
-
action: "manage"
|
|
262
|
-
}, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
275
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RouteGuard, { requiredPermission: { resource: "settings", action: "manage" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
263
276
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between", children: [
|
|
264
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
277
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
278
|
+
CmsPageHeader,
|
|
279
|
+
{
|
|
280
|
+
title: "Settings",
|
|
281
|
+
description: "Configure your CMS settings and preferences."
|
|
282
|
+
}
|
|
283
|
+
),
|
|
265
284
|
canEdit && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
266
|
-
feedbackStatus === "saved" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
285
|
+
feedbackStatus === "saved" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
286
|
+
Badge,
|
|
287
|
+
{
|
|
288
|
+
variant: "secondary",
|
|
289
|
+
className: "gap-1 bg-emerald-100 text-emerald-700",
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3" }),
|
|
292
|
+
"Settings saved successfully"
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
),
|
|
270
296
|
feedbackStatus === "error" && /* @__PURE__ */ jsxRuntimeExports.jsxs(Badge, { variant: "destructive", className: "gap-1", children: [
|
|
271
297
|
/* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-3" }),
|
|
272
298
|
errorMessage || "An error occurred"
|
|
273
299
|
] }),
|
|
274
|
-
isDirty && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
275
|
-
|
|
300
|
+
isDirty && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
301
|
+
CmsButton,
|
|
302
|
+
{
|
|
303
|
+
variant: "secondary",
|
|
304
|
+
onClick: handleDiscard,
|
|
305
|
+
disabled: feedbackStatus === "saving",
|
|
306
|
+
children: "Discard Changes"
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
310
|
+
CmsButton,
|
|
311
|
+
{
|
|
312
|
+
onClick: handleSave,
|
|
313
|
+
disabled: !isDirty,
|
|
314
|
+
loading: feedbackStatus === "saving",
|
|
315
|
+
children: "Save Changes"
|
|
316
|
+
}
|
|
317
|
+
)
|
|
276
318
|
] })
|
|
277
319
|
] }),
|
|
278
320
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
|
|
@@ -284,10 +326,18 @@ function SettingsPage() {
|
|
|
284
326
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Default Locale" }),
|
|
285
327
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "The default language for new content entries." })
|
|
286
328
|
] }),
|
|
287
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
329
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
330
|
+
Select,
|
|
331
|
+
{
|
|
332
|
+
value: formData?.defaultLocale || "en",
|
|
333
|
+
onValueChange: handleLocaleChange,
|
|
334
|
+
disabled: !canEdit || feedbackStatus === "saving",
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-48", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
337
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: LOCALE_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
)
|
|
291
341
|
] }) })
|
|
292
342
|
] }),
|
|
293
343
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(CmsSurface, { elevation: "base", className: "p-6", children: [
|
|
@@ -298,28 +348,56 @@ function SettingsPage() {
|
|
|
298
348
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Versioning" }),
|
|
299
349
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Track content history and enable rollback to previous versions" })
|
|
300
350
|
] }),
|
|
301
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
351
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
352
|
+
Switch,
|
|
353
|
+
{
|
|
354
|
+
checked: formData?.features.versioning ?? true,
|
|
355
|
+
onCheckedChange: () => handleFeatureChange("versioning"),
|
|
356
|
+
disabled: !canEdit || feedbackStatus === "saving"
|
|
357
|
+
}
|
|
358
|
+
)
|
|
302
359
|
] }),
|
|
303
360
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
304
361
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
305
362
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Scheduling" }),
|
|
306
363
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Schedule content to publish at a future date and time" })
|
|
307
364
|
] }),
|
|
308
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
365
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
366
|
+
Switch,
|
|
367
|
+
{
|
|
368
|
+
checked: formData?.features.scheduling ?? true,
|
|
369
|
+
onCheckedChange: () => handleFeatureChange("scheduling"),
|
|
370
|
+
disabled: !canEdit || feedbackStatus === "saving"
|
|
371
|
+
}
|
|
372
|
+
)
|
|
309
373
|
] }),
|
|
310
374
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
311
375
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
312
376
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Localization" }),
|
|
313
377
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Support multiple languages for content entries" })
|
|
314
378
|
] }),
|
|
315
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
380
|
+
Switch,
|
|
381
|
+
{
|
|
382
|
+
checked: formData?.features.localization ?? false,
|
|
383
|
+
onCheckedChange: () => handleFeatureChange("localization"),
|
|
384
|
+
disabled: !canEdit || feedbackStatus === "saving"
|
|
385
|
+
}
|
|
386
|
+
)
|
|
316
387
|
] }),
|
|
317
388
|
baseConfig.navigation.showMedia && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
318
389
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
319
390
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Media Management" }),
|
|
320
391
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Use the built-in media library for image and file uploads" })
|
|
321
392
|
] }),
|
|
322
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
393
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
394
|
+
Switch,
|
|
395
|
+
{
|
|
396
|
+
checked: formData?.features.mediaManagement ?? true,
|
|
397
|
+
onCheckedChange: () => handleFeatureChange("mediaManagement"),
|
|
398
|
+
disabled: !canEdit || feedbackStatus === "saving"
|
|
399
|
+
}
|
|
400
|
+
)
|
|
323
401
|
] })
|
|
324
402
|
] })
|
|
325
403
|
] }),
|
|
@@ -330,19 +408,38 @@ function SettingsPage() {
|
|
|
330
408
|
/* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "mt-1 block rounded-md bg-muted px-3 py-2 text-sm", children: "https://majestic-beagle-49.convex.cloud" })
|
|
331
409
|
] }) })
|
|
332
410
|
] }),
|
|
333
|
-
canEdit && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
411
|
+
canEdit && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
412
|
+
CmsSurface,
|
|
413
|
+
{
|
|
414
|
+
elevation: "base",
|
|
415
|
+
className: "border-red-200 p-6 dark:border-red-900",
|
|
416
|
+
children: [
|
|
417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-4 text-lg font-semibold text-red-600", children: "Danger Zone" }),
|
|
418
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
419
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
420
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Reset to Defaults" }),
|
|
421
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Reset all settings to their default values. This cannot be undone." })
|
|
422
|
+
] }),
|
|
423
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
424
|
+
CmsButton,
|
|
425
|
+
{
|
|
426
|
+
variant: "danger",
|
|
427
|
+
onClick: handleReset,
|
|
428
|
+
disabled: feedbackStatus === "saving",
|
|
429
|
+
children: "Reset Settings"
|
|
430
|
+
}
|
|
431
|
+
)
|
|
432
|
+
] })
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
)
|
|
343
436
|
] })
|
|
344
437
|
] }) });
|
|
345
438
|
}
|
|
439
|
+
function SettingsRoute() {
|
|
440
|
+
const navigation = useTanStackNavigation();
|
|
441
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsPage, { api: api.admin, navigation });
|
|
442
|
+
}
|
|
346
443
|
export {
|
|
347
|
-
|
|
444
|
+
SettingsRoute as component
|
|
348
445
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../_chunks/_libs/react.mjs";
|
|
2
2
|
import { R as Root, T as Thumb } from "../_chunks/_libs/@radix-ui/react-switch.mjs";
|
|
3
|
-
import { c as cn } from "./router-
|
|
3
|
+
import { c as cn } from "./router-nSVkxb6Y.mjs";
|
|
4
4
|
function Switch({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports, r as reactExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
-
import { C as CmsButton } from "./
|
|
3
|
-
import { c as cn } from "./router-
|
|
2
|
+
import { C as CmsButton } from "./CmsButton-DOiTVKQq.mjs";
|
|
3
|
+
import { c as cn } from "./router-nSVkxb6Y.mjs";
|
|
4
4
|
import { R as Root2, L as List, T as Trigger, C as Content } from "../_chunks/_libs/@radix-ui/react-tabs.mjs";
|
|
5
5
|
import { g as CircleAlert, a3 as Upload, X, am as RefreshCw, Z as Check } from "../_libs/lucide-react.mjs";
|
|
6
6
|
import { d as useMutation } from "../_libs/convex.mjs";
|
|
@@ -54,7 +54,9 @@ function uploadWithXHR(url, file, signal, onProgress) {
|
|
|
54
54
|
reject(new Error("Invalid response from upload server"));
|
|
55
55
|
}
|
|
56
56
|
} else {
|
|
57
|
-
reject(
|
|
57
|
+
reject(
|
|
58
|
+
new Error(`Upload failed: ${xhr.statusText || `HTTP ${xhr.status}`}`)
|
|
59
|
+
);
|
|
58
60
|
}
|
|
59
61
|
};
|
|
60
62
|
xhr.onerror = () => {
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
+
import { c as cva } from "../_libs/class-variance-authority.mjs";
|
|
3
|
+
import { c as cn } from "./router-nSVkxb6Y.mjs";
|
|
4
|
+
import { d as useNavigate, e as useLocation, f as useParams } from "../_chunks/_libs/@tanstack/react-router.mjs";
|
|
5
|
+
const alertVariants = cva(
|
|
6
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-card text-card-foreground",
|
|
11
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "default"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
function Alert({
|
|
20
|
+
className,
|
|
21
|
+
variant,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
"data-slot": "alert",
|
|
28
|
+
role: "alert",
|
|
29
|
+
className: cn(alertVariants({ variant }), className),
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function AlertDescription({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "alert-description",
|
|
42
|
+
className: cn(
|
|
43
|
+
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
44
|
+
className
|
|
45
|
+
),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function useTanStackNavigation() {
|
|
51
|
+
const navigate = useNavigate();
|
|
52
|
+
const location = useLocation();
|
|
53
|
+
const params = useParams({ strict: false });
|
|
54
|
+
const handleNavigate = reactExports.useCallback(
|
|
55
|
+
(route, routeParams) => {
|
|
56
|
+
let path = route;
|
|
57
|
+
if (routeParams) {
|
|
58
|
+
for (const [key, value] of Object.entries(routeParams)) {
|
|
59
|
+
path = path.replace(`:${key}`, value).replace(`$${key}`, value);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
navigate({ to: path });
|
|
63
|
+
},
|
|
64
|
+
[navigate]
|
|
65
|
+
);
|
|
66
|
+
const navigateToEntry = reactExports.useCallback(
|
|
67
|
+
(entryId) => {
|
|
68
|
+
navigate({ to: "/entries/$entryId", params: { entryId } });
|
|
69
|
+
},
|
|
70
|
+
[navigate]
|
|
71
|
+
);
|
|
72
|
+
const navigateToContentType = reactExports.useCallback(
|
|
73
|
+
(contentTypeId) => {
|
|
74
|
+
navigate({
|
|
75
|
+
to: "/entries/type/$contentTypeId",
|
|
76
|
+
params: { contentTypeId }
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
[navigate]
|
|
80
|
+
);
|
|
81
|
+
const navigateToNewEntry = reactExports.useCallback(
|
|
82
|
+
(contentTypeId) => {
|
|
83
|
+
navigate({
|
|
84
|
+
to: "/entries/new/$contentTypeId",
|
|
85
|
+
params: { contentTypeId }
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
[navigate]
|
|
89
|
+
);
|
|
90
|
+
const goBack = reactExports.useCallback(() => {
|
|
91
|
+
window.history.back();
|
|
92
|
+
}, []);
|
|
93
|
+
return reactExports.useMemo(
|
|
94
|
+
() => ({
|
|
95
|
+
navigate: handleNavigate,
|
|
96
|
+
currentRoute: location.pathname,
|
|
97
|
+
params: params ?? {},
|
|
98
|
+
canGoBack: window.history.length > 1,
|
|
99
|
+
goBack,
|
|
100
|
+
navigateToEntry,
|
|
101
|
+
navigateToContentType,
|
|
102
|
+
navigateToNewEntry
|
|
103
|
+
}),
|
|
104
|
+
[
|
|
105
|
+
handleNavigate,
|
|
106
|
+
location.pathname,
|
|
107
|
+
params,
|
|
108
|
+
goBack,
|
|
109
|
+
navigateToEntry,
|
|
110
|
+
navigateToContentType,
|
|
111
|
+
navigateToNewEntry
|
|
112
|
+
]
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
Alert as A,
|
|
117
|
+
AlertDescription as a,
|
|
118
|
+
useTanStackNavigation as u
|
|
119
|
+
};
|