convex-cms 0.0.2 → 0.0.5-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/README.md +109 -13
  2. package/admin-dist/nitro.json +15 -0
  3. package/admin-dist/public/assets/CmsEmptyState-CiMQwSQV.js +5 -0
  4. package/admin-dist/public/assets/CmsPageHeader-ohOq0luT.js +1 -0
  5. package/admin-dist/public/assets/CmsStatusBadge-BdNf0V9v.js +1 -0
  6. package/admin-dist/public/assets/CmsSurface-CWup6Jh7.js +1 -0
  7. package/admin-dist/public/assets/CmsToolbar-cEBlCHa3.js +1 -0
  8. package/admin-dist/public/assets/ContentEntryEditor-BY5ypfUs.js +4 -0
  9. package/admin-dist/public/assets/ErrorState-C4nJ-ml4.js +1 -0
  10. package/admin-dist/public/assets/TaxonomyFilter-BgE_SR_O.js +1 -0
  11. package/admin-dist/public/assets/_contentTypeId-DtZectcC.js +1 -0
  12. package/admin-dist/public/assets/_entryId-BpSmrfAm.js +1 -0
  13. package/admin-dist/public/assets/alert-Bf2l8kxw.js +1 -0
  14. package/admin-dist/public/assets/badge-qPrc4AUM.js +1 -0
  15. package/admin-dist/public/assets/circle-check-big-Dgozy3vV.js +1 -0
  16. package/admin-dist/public/assets/command-QOmNhlb0.js +1 -0
  17. package/admin-dist/public/assets/content-OEBGlxg1.js +1 -0
  18. package/admin-dist/public/assets/content-types-CjQliqVV.js +2 -0
  19. package/admin-dist/public/assets/globals-hAmgC66w.css +1 -0
  20. package/admin-dist/public/assets/index-BH_ECMhv.js +1 -0
  21. package/admin-dist/public/assets/label-DCsUdvFh.js +1 -0
  22. package/admin-dist/public/assets/link-2-Czw1N61H.js +1 -0
  23. package/admin-dist/public/assets/list-DtCsXj8-.js +1 -0
  24. package/admin-dist/public/assets/main-CXgkZMhe.js +97 -0
  25. package/admin-dist/public/assets/media-DTJ3-ViE.js +1 -0
  26. package/admin-dist/public/assets/new._contentTypeId-CoTDxKzf.js +1 -0
  27. package/admin-dist/public/assets/plus-xCFJK0RC.js +1 -0
  28. package/admin-dist/public/assets/rotate-ccw-DIqK63wY.js +1 -0
  29. package/admin-dist/public/assets/scroll-area-B-yrE66a.js +1 -0
  30. package/admin-dist/public/assets/search-CbCbboeU.js +1 -0
  31. package/admin-dist/public/assets/select-Co3TZFJb.js +1 -0
  32. package/admin-dist/public/assets/settings-BspTTv_o.js +1 -0
  33. package/admin-dist/public/assets/switch-CfavASmR.js +1 -0
  34. package/admin-dist/public/assets/tabs-CN5s5u2W.js +1 -0
  35. package/admin-dist/public/assets/tanstack-adapter-npeE3RdY.js +1 -0
  36. package/admin-dist/public/assets/taxonomies-CgG46fIF.js +1 -0
  37. package/admin-dist/public/assets/textarea-BJ0XFZpT.js +1 -0
  38. package/admin-dist/public/assets/trash-B3daldm5.js +1 -0
  39. package/admin-dist/public/assets/triangle-alert-BZRcqsUg.js +1 -0
  40. package/admin-dist/public/assets/useBreadcrumbLabel-DwZlwvFF.js +1 -0
  41. package/admin-dist/public/assets/usePermissions-C1JQhfqb.js +1 -0
  42. package/admin-dist/public/favicon.ico +0 -0
  43. package/admin-dist/server/_chunks/_libs/@date-fns/tz.mjs +217 -0
  44. package/admin-dist/server/_chunks/_libs/@floating-ui/core.mjs +719 -0
  45. package/admin-dist/server/_chunks/_libs/@floating-ui/dom.mjs +622 -0
  46. package/admin-dist/server/_chunks/_libs/@floating-ui/react-dom.mjs +292 -0
  47. package/admin-dist/server/_chunks/_libs/@floating-ui/utils.mjs +320 -0
  48. package/admin-dist/server/_chunks/_libs/@radix-ui/number.mjs +6 -0
  49. package/admin-dist/server/_chunks/_libs/@radix-ui/primitive.mjs +11 -0
  50. package/admin-dist/server/_chunks/_libs/@radix-ui/react-arrow.mjs +23 -0
  51. package/admin-dist/server/_chunks/_libs/@radix-ui/react-avatar.mjs +119 -0
  52. package/admin-dist/server/_chunks/_libs/@radix-ui/react-checkbox.mjs +270 -0
  53. package/admin-dist/server/_chunks/_libs/@radix-ui/react-collection.mjs +69 -0
  54. package/admin-dist/server/_chunks/_libs/@radix-ui/react-compose-refs.mjs +39 -0
  55. package/admin-dist/server/_chunks/_libs/@radix-ui/react-context.mjs +137 -0
  56. package/admin-dist/server/_chunks/_libs/@radix-ui/react-dialog.mjs +325 -0
  57. package/admin-dist/server/_chunks/_libs/@radix-ui/react-direction.mjs +9 -0
  58. package/admin-dist/server/_chunks/_libs/@radix-ui/react-dismissable-layer.mjs +210 -0
  59. package/admin-dist/server/_chunks/_libs/@radix-ui/react-dropdown-menu.mjs +253 -0
  60. package/admin-dist/server/_chunks/_libs/@radix-ui/react-focus-guards.mjs +29 -0
  61. package/admin-dist/server/_chunks/_libs/@radix-ui/react-focus-scope.mjs +206 -0
  62. package/admin-dist/server/_chunks/_libs/@radix-ui/react-id.mjs +14 -0
  63. package/admin-dist/server/_chunks/_libs/@radix-ui/react-label.mjs +23 -0
  64. package/admin-dist/server/_chunks/_libs/@radix-ui/react-menu.mjs +812 -0
  65. package/admin-dist/server/_chunks/_libs/@radix-ui/react-popover.mjs +300 -0
  66. package/admin-dist/server/_chunks/_libs/@radix-ui/react-popper.mjs +286 -0
  67. package/admin-dist/server/_chunks/_libs/@radix-ui/react-portal.mjs +16 -0
  68. package/admin-dist/server/_chunks/_libs/@radix-ui/react-presence.mjs +128 -0
  69. package/admin-dist/server/_chunks/_libs/@radix-ui/react-primitive.mjs +141 -0
  70. package/admin-dist/server/_chunks/_libs/@radix-ui/react-roving-focus.mjs +224 -0
  71. package/admin-dist/server/_chunks/_libs/@radix-ui/react-scroll-area.mjs +721 -0
  72. package/admin-dist/server/_chunks/_libs/@radix-ui/react-select.mjs +1163 -0
  73. package/admin-dist/server/_chunks/_libs/@radix-ui/react-separator.mjs +28 -0
  74. package/admin-dist/server/_chunks/_libs/@radix-ui/react-slot.mjs +601 -0
  75. package/admin-dist/server/_chunks/_libs/@radix-ui/react-switch.mjs +152 -0
  76. package/admin-dist/server/_chunks/_libs/@radix-ui/react-tabs.mjs +189 -0
  77. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-callback-ref.mjs +11 -0
  78. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-controllable-state.mjs +69 -0
  79. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-effect-event.mjs +1 -0
  80. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-escape-keydown.mjs +17 -0
  81. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-is-hydrated.mjs +15 -0
  82. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-layout-effect.mjs +6 -0
  83. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-previous.mjs +14 -0
  84. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-size.mjs +39 -0
  85. package/admin-dist/server/_chunks/_libs/@radix-ui/react-visually-hidden.mjs +33 -0
  86. package/admin-dist/server/_chunks/_libs/@tanstack/history.mjs +409 -0
  87. package/admin-dist/server/_chunks/_libs/@tanstack/react-router.mjs +1718 -0
  88. package/admin-dist/server/_chunks/_libs/@tanstack/react-store.mjs +56 -0
  89. package/admin-dist/server/_chunks/_libs/@tanstack/router-core.mjs +4829 -0
  90. package/admin-dist/server/_chunks/_libs/@tanstack/store.mjs +134 -0
  91. package/admin-dist/server/_chunks/_libs/react-dom.mjs +10781 -0
  92. package/admin-dist/server/_chunks/_libs/react.mjs +513 -0
  93. package/admin-dist/server/_libs/aria-hidden.mjs +122 -0
  94. package/admin-dist/server/_libs/class-variance-authority.mjs +44 -0
  95. package/admin-dist/server/_libs/clsx.mjs +16 -0
  96. package/admin-dist/server/_libs/cmdk.mjs +315 -0
  97. package/admin-dist/server/_libs/convex.mjs +4841 -0
  98. package/admin-dist/server/_libs/cookie-es.mjs +58 -0
  99. package/admin-dist/server/_libs/croner.mjs +1 -0
  100. package/admin-dist/server/_libs/crossws.mjs +1 -0
  101. package/admin-dist/server/_libs/date-fns.mjs +1716 -0
  102. package/admin-dist/server/_libs/detect-node-es.mjs +1 -0
  103. package/admin-dist/server/_libs/get-nonce.mjs +9 -0
  104. package/admin-dist/server/_libs/h3-v2.mjs +277 -0
  105. package/admin-dist/server/_libs/h3.mjs +401 -0
  106. package/admin-dist/server/_libs/hookable.mjs +1 -0
  107. package/admin-dist/server/_libs/isbot.mjs +20 -0
  108. package/admin-dist/server/_libs/lucide-react.mjs +850 -0
  109. package/admin-dist/server/_libs/ohash.mjs +1 -0
  110. package/admin-dist/server/_libs/react-day-picker.mjs +2201 -0
  111. package/admin-dist/server/_libs/react-remove-scroll-bar.mjs +82 -0
  112. package/admin-dist/server/_libs/react-remove-scroll.mjs +328 -0
  113. package/admin-dist/server/_libs/react-style-singleton.mjs +69 -0
  114. package/admin-dist/server/_libs/rou3.mjs +8 -0
  115. package/admin-dist/server/_libs/seroval-plugins.mjs +58 -0
  116. package/admin-dist/server/_libs/seroval.mjs +1765 -0
  117. package/admin-dist/server/_libs/srvx.mjs +719 -0
  118. package/admin-dist/server/_libs/tailwind-merge.mjs +3010 -0
  119. package/admin-dist/server/_libs/tiny-invariant.mjs +12 -0
  120. package/admin-dist/server/_libs/tiny-warning.mjs +5 -0
  121. package/admin-dist/server/_libs/tslib.mjs +39 -0
  122. package/admin-dist/server/_libs/ufo.mjs +54 -0
  123. package/admin-dist/server/_libs/unctx.mjs +1 -0
  124. package/admin-dist/server/_libs/unstorage.mjs +1 -0
  125. package/admin-dist/server/_libs/use-callback-ref.mjs +66 -0
  126. package/admin-dist/server/_libs/use-sidecar.mjs +106 -0
  127. package/admin-dist/server/_libs/use-sync-external-store.mjs +139 -0
  128. package/admin-dist/server/_libs/zod.mjs +4223 -0
  129. package/admin-dist/server/_ssr/CmsButton-B45JAKR1.mjs +125 -0
  130. package/admin-dist/server/_ssr/CmsEmptyState-D_BQFAVR.mjs +290 -0
  131. package/admin-dist/server/_ssr/CmsPageHeader-CrUZA59A.mjs +24 -0
  132. package/admin-dist/server/_ssr/CmsStatusBadge-B-sj6yaj.mjs +127 -0
  133. package/admin-dist/server/_ssr/CmsSurface-DKJZhpjk.mjs +44 -0
  134. package/admin-dist/server/_ssr/CmsToolbar-ByaW5iXf.mjs +49 -0
  135. package/admin-dist/server/_ssr/ContentEntryEditor-D3_Jb1dq.mjs +3720 -0
  136. package/admin-dist/server/_ssr/ErrorState-cI-bKLez.mjs +89 -0
  137. package/admin-dist/server/_ssr/TaxonomyFilter-BRJkuCtA.mjs +188 -0
  138. package/admin-dist/server/_ssr/_contentTypeId-B9kA6CaM.mjs +379 -0
  139. package/admin-dist/server/_ssr/_entryId-BddcMkZN.mjs +161 -0
  140. package/admin-dist/server/_ssr/_tanstack-start-manifest_v-Dd7AmelK.mjs +4 -0
  141. package/admin-dist/server/_ssr/command-CGtVr8Gb.mjs +128 -0
  142. package/admin-dist/server/_ssr/config.server-D7JHDcDv.mjs +117 -0
  143. package/admin-dist/server/_ssr/content-D1tbeOd0.mjs +647 -0
  144. package/admin-dist/server/_ssr/content-types-BZqY_BER.mjs +1342 -0
  145. package/admin-dist/server/_ssr/index-BIdq4xaC.mjs +264 -0
  146. package/admin-dist/server/_ssr/index.mjs +1275 -0
  147. package/admin-dist/server/_ssr/label-T-QNKAr6.mjs +22 -0
  148. package/admin-dist/server/_ssr/media-C-xqjBrl.mjs +1832 -0
  149. package/admin-dist/server/_ssr/new._contentTypeId-DWic9cRq.mjs +144 -0
  150. package/admin-dist/server/_ssr/router-D1BMAMJT.mjs +1556 -0
  151. package/admin-dist/server/_ssr/scroll-area-C0pic_WA.mjs +59 -0
  152. package/admin-dist/server/_ssr/select-CqmuN2F6.mjs +142 -0
  153. package/admin-dist/server/_ssr/settings-CAkncGGV.mjs +430 -0
  154. package/admin-dist/server/_ssr/start-HYkvq4Ni.mjs +4 -0
  155. package/admin-dist/server/_ssr/switch-CgmuJkT9.mjs +31 -0
  156. package/admin-dist/server/_ssr/tabs-CnMj0aRy.mjs +630 -0
  157. package/admin-dist/server/_ssr/tanstack-adapter-BXZrMauE.mjs +119 -0
  158. package/admin-dist/server/_ssr/taxonomies-thl3BfVm.mjs +1015 -0
  159. package/admin-dist/server/_ssr/textarea-4K5OJgeh.mjs +18 -0
  160. package/admin-dist/server/_ssr/trash-B40Gx5zP.mjs +411 -0
  161. package/admin-dist/server/_ssr/useBreadcrumbLabel-rn-fL4zV.mjs +16 -0
  162. package/admin-dist/server/_ssr/usePermissions-CKeM6_Vw.mjs +68 -0
  163. package/admin-dist/server/favicon.ico +0 -0
  164. package/admin-dist/server/index.mjs +641 -0
  165. package/dist/cli/commands/init.d.ts +6 -0
  166. package/dist/cli/commands/init.d.ts.map +1 -0
  167. package/dist/cli/commands/init.js +156 -0
  168. package/dist/cli/commands/init.js.map +1 -0
  169. package/dist/cli/index.js +6 -0
  170. package/dist/cli/index.js.map +1 -1
  171. package/dist/client/admin-config.d.ts +2 -3
  172. package/dist/client/admin-config.d.ts.map +1 -1
  173. package/dist/client/admin-config.js +2 -3
  174. package/dist/client/admin-config.js.map +1 -1
  175. package/dist/client/adminApi.d.ts +1877 -1851
  176. package/dist/client/adminApi.d.ts.map +1 -1
  177. package/dist/client/adminApi.js +649 -629
  178. package/dist/client/adminApi.js.map +1 -1
  179. package/dist/client/agentTools.d.ts +1231 -139
  180. package/dist/client/agentTools.d.ts.map +1 -1
  181. package/dist/client/agentTools.js +37 -13
  182. package/dist/client/agentTools.js.map +1 -1
  183. package/dist/client/index.d.ts +5 -5
  184. package/dist/client/index.d.ts.map +1 -1
  185. package/dist/client/index.js +4 -4
  186. package/dist/client/index.js.map +1 -1
  187. package/dist/client/schema/codegen.d.ts +2 -2
  188. package/dist/client/schema/codegen.d.ts.map +1 -1
  189. package/dist/client/schema/codegen.js +3 -3
  190. package/dist/client/schema/codegen.js.map +1 -1
  191. package/dist/client/schema/defineContentType.d.ts +3 -3
  192. package/dist/client/schema/defineContentType.js +3 -3
  193. package/dist/client/schema/index.d.ts +7 -7
  194. package/dist/client/schema/index.d.ts.map +1 -1
  195. package/dist/client/schema/index.js +5 -5
  196. package/dist/client/schema/index.js.map +1 -1
  197. package/dist/client/schema/schemaDrift.d.ts +1 -1
  198. package/dist/client/schema/schemaDrift.js +1 -1
  199. package/dist/client/schema/typedClient.d.ts +2 -2
  200. package/dist/client/schema/typedClient.js +2 -2
  201. package/dist/client/schema/types.d.ts +1 -1
  202. package/dist/client/schema/types.js +1 -1
  203. package/dist/client/wrapper.d.ts +108 -65
  204. package/dist/client/wrapper.d.ts.map +1 -1
  205. package/dist/client/wrapper.js +22 -22
  206. package/dist/client/wrapper.js.map +1 -1
  207. package/dist/component/_generated/component.d.ts +9 -0
  208. package/dist/component/_generated/component.d.ts.map +1 -1
  209. package/dist/component/convex.config.d.ts +2 -2
  210. package/dist/component/convex.config.js +2 -2
  211. package/dist/component/index.d.ts +1 -1
  212. package/dist/component/index.js +1 -1
  213. package/dist/component/lib/ragContentChunker.d.ts +1 -1
  214. package/dist/component/lib/ragContentChunker.js +1 -1
  215. package/dist/component/mediaAssets.d.ts +35 -0
  216. package/dist/component/mediaAssets.d.ts.map +1 -1
  217. package/dist/component/mediaAssets.js +81 -0
  218. package/dist/component/mediaAssets.js.map +1 -1
  219. package/dist/component/roles.d.ts +1 -1
  220. package/dist/component/roles.js +1 -1
  221. package/dist/react/index.d.ts +2 -2
  222. package/dist/react/index.d.ts.map +1 -1
  223. package/dist/react/index.js +13 -7
  224. package/dist/react/index.js.map +1 -1
  225. package/dist/test.d.ts +2 -2
  226. package/dist/test.d.ts.map +1 -1
  227. package/dist/test.js +4 -3
  228. package/dist/test.js.map +1 -1
  229. package/package.json +37 -13
  230. package/dist/component/auditLog.d.ts +0 -410
  231. package/dist/component/auditLog.d.ts.map +0 -1
  232. package/dist/component/auditLog.js +0 -607
  233. package/dist/component/auditLog.js.map +0 -1
  234. package/dist/component/types.d.ts +0 -4
  235. package/dist/component/types.d.ts.map +0 -1
  236. package/dist/component/types.js +0 -2
  237. package/dist/component/types.js.map +0 -1
  238. package/src/cli/commands/admin.ts +0 -104
  239. package/src/cli/index.ts +0 -21
  240. package/src/cli/utils/detectConvexUrl.ts +0 -54
  241. package/src/cli/utils/openBrowser.ts +0 -16
  242. package/src/client/admin-config.ts +0 -138
  243. package/src/client/adminApi.ts +0 -942
  244. package/src/client/agentTools.ts +0 -1311
  245. package/src/client/argTypes.ts +0 -316
  246. package/src/client/field-types.ts +0 -187
  247. package/src/client/index.ts +0 -1301
  248. package/src/client/queryBuilder.ts +0 -1100
  249. package/src/client/schema/codegen.ts +0 -500
  250. package/src/client/schema/defineContentType.ts +0 -501
  251. package/src/client/schema/index.ts +0 -169
  252. package/src/client/schema/schemaDrift.ts +0 -574
  253. package/src/client/schema/typedClient.ts +0 -688
  254. package/src/client/schema/types.ts +0 -666
  255. package/src/client/types.ts +0 -723
  256. package/src/client/workflows.ts +0 -141
  257. package/src/client/wrapper.ts +0 -4304
  258. package/src/component/_generated/api.ts +0 -140
  259. package/src/component/_generated/component.ts +0 -5029
  260. package/src/component/_generated/dataModel.ts +0 -60
  261. package/src/component/_generated/server.ts +0 -156
  262. package/src/component/authorization.ts +0 -647
  263. package/src/component/authorizationHooks.ts +0 -668
  264. package/src/component/bulkOperations.ts +0 -687
  265. package/src/component/contentEntries.ts +0 -1976
  266. package/src/component/contentEntryMutations.ts +0 -1223
  267. package/src/component/contentEntryValidation.ts +0 -707
  268. package/src/component/contentLock.ts +0 -550
  269. package/src/component/contentTypeMigration.ts +0 -1064
  270. package/src/component/contentTypeMutations.ts +0 -969
  271. package/src/component/contentTypes.ts +0 -346
  272. package/src/component/convex.config.ts +0 -44
  273. package/src/component/documentTypes.ts +0 -240
  274. package/src/component/eventEmitter.ts +0 -485
  275. package/src/component/exportImport.ts +0 -1169
  276. package/src/component/index.ts +0 -491
  277. package/src/component/lib/deepReferenceResolver.ts +0 -999
  278. package/src/component/lib/errors.ts +0 -816
  279. package/src/component/lib/index.ts +0 -145
  280. package/src/component/lib/mediaReferenceResolver.ts +0 -495
  281. package/src/component/lib/metadataExtractor.ts +0 -792
  282. package/src/component/lib/mutationAuth.ts +0 -199
  283. package/src/component/lib/queries.ts +0 -79
  284. package/src/component/lib/ragContentChunker.ts +0 -1371
  285. package/src/component/lib/referenceResolver.ts +0 -430
  286. package/src/component/lib/slugGenerator.ts +0 -262
  287. package/src/component/lib/slugUniqueness.ts +0 -333
  288. package/src/component/lib/softDelete.ts +0 -44
  289. package/src/component/localeFallbackChain.ts +0 -673
  290. package/src/component/localeFields.ts +0 -896
  291. package/src/component/mediaAssetMutations.ts +0 -725
  292. package/src/component/mediaAssets.ts +0 -932
  293. package/src/component/mediaFolderMutations.ts +0 -1046
  294. package/src/component/mediaUploadMutations.ts +0 -224
  295. package/src/component/mediaVariantMutations.ts +0 -900
  296. package/src/component/mediaVariants.ts +0 -793
  297. package/src/component/ragContentIndexer.ts +0 -1067
  298. package/src/component/rateLimitHooks.ts +0 -572
  299. package/src/component/roles.ts +0 -1360
  300. package/src/component/scheduledPublish.ts +0 -358
  301. package/src/component/schema.ts +0 -617
  302. package/src/component/taxonomies.ts +0 -949
  303. package/src/component/taxonomyMutations.ts +0 -1210
  304. package/src/component/trash.ts +0 -724
  305. package/src/component/userContext.ts +0 -898
  306. package/src/component/validation.ts +0 -1388
  307. package/src/component/validators.ts +0 -949
  308. package/src/component/versionMutations.ts +0 -392
  309. package/src/component/webhookTrigger.ts +0 -1922
  310. package/src/react/index.ts +0 -898
  311. package/src/test.ts +0 -1580
@@ -0,0 +1,59 @@
1
+ import { j as jsxRuntimeExports } from "../_chunks/_libs/react.mjs";
2
+ import { R as Root, V as Viewport, C as Corner, S as ScrollAreaScrollbar, a as ScrollAreaThumb } from "../_chunks/_libs/@radix-ui/react-scroll-area.mjs";
3
+ import { c as cn } from "./router-D1BMAMJT.mjs";
4
+ function ScrollArea({
5
+ className,
6
+ children,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
10
+ Root,
11
+ {
12
+ "data-slot": "scroll-area",
13
+ className: cn("relative", className),
14
+ ...props,
15
+ children: [
16
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
17
+ Viewport,
18
+ {
19
+ "data-slot": "scroll-area-viewport",
20
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
21
+ children
22
+ }
23
+ ),
24
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollBar, {}),
25
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Corner, {})
26
+ ]
27
+ }
28
+ );
29
+ }
30
+ function ScrollBar({
31
+ className,
32
+ orientation = "vertical",
33
+ ...props
34
+ }) {
35
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
36
+ ScrollAreaScrollbar,
37
+ {
38
+ "data-slot": "scroll-area-scrollbar",
39
+ orientation,
40
+ className: cn(
41
+ "flex touch-none p-px transition-colors select-none",
42
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
43
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
44
+ className
45
+ ),
46
+ ...props,
47
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
48
+ ScrollAreaThumb,
49
+ {
50
+ "data-slot": "scroll-area-thumb",
51
+ className: "bg-border relative flex-1 rounded-full"
52
+ }
53
+ )
54
+ }
55
+ );
56
+ }
57
+ export {
58
+ ScrollArea as S
59
+ };
@@ -0,0 +1,142 @@
1
+ import { j as jsxRuntimeExports } from "../_chunks/_libs/react.mjs";
2
+ import { R as Root2, T as Trigger, I as Icon, V as Value, P as Portal, C as Content2, a as Viewport, b as Item, c as ItemIndicator, d as ItemText, S as ScrollUpButton, e as ScrollDownButton } from "../_chunks/_libs/@radix-ui/react-select.mjs";
3
+ import { c as cn } from "./router-D1BMAMJT.mjs";
4
+ import { d as ChevronDown, Z as Check, ai as ChevronUp } from "../_libs/lucide-react.mjs";
5
+ function Select({
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2, { "data-slot": "select", ...props });
9
+ }
10
+ function SelectValue({
11
+ ...props
12
+ }) {
13
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Value, { "data-slot": "select-value", ...props });
14
+ }
15
+ function SelectTrigger({
16
+ className,
17
+ size = "default",
18
+ children,
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
22
+ Trigger,
23
+ {
24
+ "data-slot": "select-trigger",
25
+ "data-size": size,
26
+ className: cn(
27
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
28
+ className
29
+ ),
30
+ ...props,
31
+ children: [
32
+ children,
33
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-4 opacity-50" }) })
34
+ ]
35
+ }
36
+ );
37
+ }
38
+ function SelectContent({
39
+ className,
40
+ children,
41
+ position = "item-aligned",
42
+ align = "center",
43
+ ...props
44
+ }) {
45
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
46
+ Content2,
47
+ {
48
+ "data-slot": "select-content",
49
+ className: cn(
50
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
51
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
52
+ className
53
+ ),
54
+ position,
55
+ align,
56
+ ...props,
57
+ children: [
58
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectScrollUpButton, {}),
59
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
60
+ Viewport,
61
+ {
62
+ className: cn(
63
+ "p-1",
64
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
65
+ ),
66
+ children
67
+ }
68
+ ),
69
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectScrollDownButton, {})
70
+ ]
71
+ }
72
+ ) });
73
+ }
74
+ function SelectItem({
75
+ className,
76
+ children,
77
+ ...props
78
+ }) {
79
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
80
+ Item,
81
+ {
82
+ "data-slot": "select-item",
83
+ className: cn(
84
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
85
+ className
86
+ ),
87
+ ...props,
88
+ children: [
89
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
90
+ "span",
91
+ {
92
+ "data-slot": "select-item-indicator",
93
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
94
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ItemIndicator, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-4" }) })
95
+ }
96
+ ),
97
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ItemText, { children })
98
+ ]
99
+ }
100
+ );
101
+ }
102
+ function SelectScrollUpButton({
103
+ className,
104
+ ...props
105
+ }) {
106
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
107
+ ScrollUpButton,
108
+ {
109
+ "data-slot": "select-scroll-up-button",
110
+ className: cn(
111
+ "flex cursor-default items-center justify-center py-1",
112
+ className
113
+ ),
114
+ ...props,
115
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronUp, { className: "size-4" })
116
+ }
117
+ );
118
+ }
119
+ function SelectScrollDownButton({
120
+ className,
121
+ ...props
122
+ }) {
123
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
124
+ ScrollDownButton,
125
+ {
126
+ "data-slot": "select-scroll-down-button",
127
+ className: cn(
128
+ "flex cursor-default items-center justify-center py-1",
129
+ className
130
+ ),
131
+ ...props,
132
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-4" })
133
+ }
134
+ );
135
+ }
136
+ export {
137
+ Select as S,
138
+ SelectTrigger as a,
139
+ SelectValue as b,
140
+ SelectContent as c,
141
+ SelectItem as d
142
+ };
@@ -0,0 +1,430 @@
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-D1BMAMJT.mjs";
3
+ import { B as Badge, C as CmsButton } from "./CmsButton-B45JAKR1.mjs";
4
+ import { L as Label } from "./label-T-QNKAr6.mjs";
5
+ import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from "./select-CqmuN2F6.mjs";
6
+ import { u as usePermissions } from "./usePermissions-CKeM6_Vw.mjs";
7
+ import { C as CmsPageHeader } from "./CmsPageHeader-CrUZA59A.mjs";
8
+ import { C as CmsSurface } from "./CmsSurface-DKJZhpjk.mjs";
9
+ import { S as Switch } from "./switch-CgmuJkT9.mjs";
10
+ import { u as useTanStackNavigation, A as Alert, a as AlertDescription } from "./tanstack-adapter-BXZrMauE.mjs";
11
+ import { u as useQuery, d as useMutation } from "../_libs/convex.mjs";
12
+ import { O as TriangleAlert, Z as Check, X, _ as Sun, $ as Moon, a0 as Monitor } from "../_libs/lucide-react.mjs";
13
+ import "../_chunks/_libs/@tanstack/react-router.mjs";
14
+ import "../_libs/tiny-warning.mjs";
15
+ import "../_chunks/_libs/@tanstack/router-core.mjs";
16
+ import "../_libs/cookie-es.mjs";
17
+ import "../_chunks/_libs/@tanstack/store.mjs";
18
+ import "../_chunks/_libs/@tanstack/history.mjs";
19
+ import "../_libs/tiny-invariant.mjs";
20
+ import "../_libs/seroval.mjs";
21
+ import "../_libs/seroval-plugins.mjs";
22
+ import "node:stream/web";
23
+ import "node:stream";
24
+ import "../_chunks/_libs/react-dom.mjs";
25
+ import "util";
26
+ import "crypto";
27
+ import "async_hooks";
28
+ import "stream";
29
+ import "../_libs/isbot.mjs";
30
+ import "../_chunks/_libs/@tanstack/react-store.mjs";
31
+ import "../_libs/use-sync-external-store.mjs";
32
+ import "../_libs/clsx.mjs";
33
+ import "../_libs/tailwind-merge.mjs";
34
+ import "../_chunks/_libs/@radix-ui/react-slot.mjs";
35
+ import "../_chunks/_libs/@radix-ui/react-compose-refs.mjs";
36
+ import "../_chunks/_libs/@radix-ui/react-dropdown-menu.mjs";
37
+ import "../_chunks/_libs/@radix-ui/primitive.mjs";
38
+ import "../_chunks/_libs/@radix-ui/react-context.mjs";
39
+ import "../_chunks/_libs/@radix-ui/react-use-controllable-state.mjs";
40
+ import "../_chunks/_libs/@radix-ui/react-use-layout-effect.mjs";
41
+ import "../_chunks/_libs/@radix-ui/react-primitive.mjs";
42
+ import "../_chunks/_libs/@radix-ui/react-menu.mjs";
43
+ import "../_chunks/_libs/@radix-ui/react-collection.mjs";
44
+ import "../_chunks/_libs/@radix-ui/react-direction.mjs";
45
+ import "../_chunks/_libs/@radix-ui/react-dismissable-layer.mjs";
46
+ import "../_chunks/_libs/@radix-ui/react-use-callback-ref.mjs";
47
+ import "../_chunks/_libs/@radix-ui/react-use-escape-keydown.mjs";
48
+ import "../_chunks/_libs/@radix-ui/react-focus-guards.mjs";
49
+ import "../_chunks/_libs/@radix-ui/react-focus-scope.mjs";
50
+ import "../_chunks/_libs/@radix-ui/react-popper.mjs";
51
+ import "../_chunks/_libs/@floating-ui/react-dom.mjs";
52
+ import "../_chunks/_libs/@floating-ui/dom.mjs";
53
+ import "../_chunks/_libs/@floating-ui/core.mjs";
54
+ import "../_chunks/_libs/@floating-ui/utils.mjs";
55
+ import "../_chunks/_libs/@radix-ui/react-arrow.mjs";
56
+ import "../_chunks/_libs/@radix-ui/react-use-size.mjs";
57
+ import "../_chunks/_libs/@radix-ui/react-portal.mjs";
58
+ import "../_chunks/_libs/@radix-ui/react-presence.mjs";
59
+ import "../_chunks/_libs/@radix-ui/react-roving-focus.mjs";
60
+ import "../_chunks/_libs/@radix-ui/react-id.mjs";
61
+ import "../_libs/aria-hidden.mjs";
62
+ import "../_libs/react-remove-scroll.mjs";
63
+ import "../_libs/tslib.mjs";
64
+ import "../_libs/react-remove-scroll-bar.mjs";
65
+ import "../_libs/react-style-singleton.mjs";
66
+ import "../_libs/get-nonce.mjs";
67
+ import "../_libs/use-sidecar.mjs";
68
+ import "../_libs/use-callback-ref.mjs";
69
+ import "../_chunks/_libs/@radix-ui/react-avatar.mjs";
70
+ import "../_chunks/_libs/@radix-ui/react-use-is-hydrated.mjs";
71
+ import "../_libs/class-variance-authority.mjs";
72
+ import "../_chunks/_libs/@radix-ui/react-popover.mjs";
73
+ import "./index.mjs";
74
+ import "node:async_hooks";
75
+ import "../_libs/h3-v2.mjs";
76
+ import "../_libs/rou3.mjs";
77
+ import "../_libs/srvx.mjs";
78
+ import "node:http";
79
+ import "node:https";
80
+ import "node:http2";
81
+ import "../_libs/zod.mjs";
82
+ import "../_chunks/_libs/@radix-ui/react-label.mjs";
83
+ import "../_chunks/_libs/@radix-ui/react-select.mjs";
84
+ import "../_chunks/_libs/@radix-ui/number.mjs";
85
+ import "../_chunks/_libs/@radix-ui/react-use-previous.mjs";
86
+ import "../_chunks/_libs/@radix-ui/react-visually-hidden.mjs";
87
+ import "../_chunks/_libs/@radix-ui/react-switch.mjs";
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
+ ];
103
+ function AppearanceSection() {
104
+ const { theme, setTheme } = useTheme();
105
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(CmsSurface, { elevation: "base", className: "p-6", children: [
106
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-4 text-lg font-semibold text-foreground", children: "Appearance" }),
107
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
108
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
109
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Theme" }),
110
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Choose your preferred color theme for the admin interface." })
111
+ ] }),
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
+ )) })
128
+ ] }) })
129
+ ] });
130
+ }
131
+ function SettingsPage({ api: api2, navigation: _navigation }) {
132
+ const { canManageSettings } = usePermissions();
133
+ const canEdit = canManageSettings();
134
+ const { baseConfig } = useSettingsConfig();
135
+ const settings = useQuery(api2.settings.get);
136
+ const updateSettings = useMutation(api2.settings.update);
137
+ const resetSettings = useMutation(api2.settings.reset);
138
+ const [formData, setFormData] = reactExports.useState(null);
139
+ const [isDirty, setIsDirty] = reactExports.useState(false);
140
+ const [feedbackStatus, setFeedbackStatus] = reactExports.useState("idle");
141
+ const [errorMessage, setErrorMessage] = reactExports.useState(null);
142
+ reactExports.useEffect(() => {
143
+ if (settings && !formData) {
144
+ setFormData(settings);
145
+ }
146
+ }, [settings, formData]);
147
+ reactExports.useEffect(() => {
148
+ if (settings && !isDirty) {
149
+ setFormData(settings);
150
+ }
151
+ }, [settings, isDirty]);
152
+ const handleLocaleChange = reactExports.useCallback(
153
+ (value) => {
154
+ if (!formData) return;
155
+ setFormData({
156
+ ...formData,
157
+ defaultLocale: value
158
+ });
159
+ setIsDirty(true);
160
+ setFeedbackStatus("idle");
161
+ },
162
+ [formData]
163
+ );
164
+ const handleFeatureChange = reactExports.useCallback(
165
+ (feature) => {
166
+ if (!formData) return;
167
+ setFormData({
168
+ ...formData,
169
+ features: {
170
+ ...formData.features,
171
+ [feature]: !formData.features[feature]
172
+ }
173
+ });
174
+ setIsDirty(true);
175
+ setFeedbackStatus("idle");
176
+ },
177
+ [formData]
178
+ );
179
+ const handleSave = reactExports.useCallback(async () => {
180
+ if (!formData || !isDirty) return;
181
+ setFeedbackStatus("saving");
182
+ setErrorMessage(null);
183
+ try {
184
+ await updateSettings({
185
+ defaultLocale: formData.defaultLocale,
186
+ features: formData.features
187
+ });
188
+ setFeedbackStatus("saved");
189
+ setIsDirty(false);
190
+ setTimeout(() => {
191
+ setFeedbackStatus("idle");
192
+ }, 3e3);
193
+ } catch (error) {
194
+ setFeedbackStatus("error");
195
+ setErrorMessage(
196
+ error instanceof Error ? error.message : "Failed to save settings"
197
+ );
198
+ }
199
+ }, [formData, isDirty, updateSettings]);
200
+ const handleReset = reactExports.useCallback(async () => {
201
+ const confirmed = window.confirm(
202
+ "Are you sure you want to reset all settings to their defaults? This action cannot be undone."
203
+ );
204
+ if (!confirmed) return;
205
+ setFeedbackStatus("saving");
206
+ setErrorMessage(null);
207
+ try {
208
+ const newSettings = await resetSettings({});
209
+ setFormData(newSettings);
210
+ setFeedbackStatus("saved");
211
+ setIsDirty(false);
212
+ setTimeout(() => {
213
+ setFeedbackStatus("idle");
214
+ }, 3e3);
215
+ } catch (error) {
216
+ setFeedbackStatus("error");
217
+ setErrorMessage(
218
+ error instanceof Error ? error.message : "Failed to reset settings"
219
+ );
220
+ }
221
+ }, [resetSettings]);
222
+ const handleDiscard = reactExports.useCallback(() => {
223
+ if (settings) {
224
+ setFormData(settings);
225
+ setIsDirty(false);
226
+ setFeedbackStatus("idle");
227
+ setErrorMessage(null);
228
+ }
229
+ }, [settings]);
230
+ if (settings === void 0) {
231
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(RouteGuard, { requiredPermission: { resource: "settings", action: "manage" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
232
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
233
+ CmsPageHeader,
234
+ {
235
+ title: "Settings",
236
+ description: "Configure your CMS settings and preferences."
237
+ }
238
+ ),
239
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-12", children: [
240
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-8 animate-spin rounded-full border-2 border-muted border-t-primary" }),
241
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm text-muted-foreground", children: "Loading settings..." })
242
+ ] })
243
+ ] }) });
244
+ }
245
+ if (settings === null && !formData) {
246
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(RouteGuard, { requiredPermission: { resource: "settings", action: "manage" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
247
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
248
+ CmsPageHeader,
249
+ {
250
+ title: "Settings",
251
+ description: "Configure your CMS settings and preferences."
252
+ }
253
+ ),
254
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { variant: "destructive", children: [
255
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-4" }),
256
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDescription, { children: "Failed to load settings. Please try refreshing the page." })
257
+ ] })
258
+ ] }) });
259
+ }
260
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(RouteGuard, { requiredPermission: { resource: "settings", action: "manage" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
261
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between", children: [
262
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
263
+ CmsPageHeader,
264
+ {
265
+ title: "Settings",
266
+ description: "Configure your CMS settings and preferences."
267
+ }
268
+ ),
269
+ canEdit && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
270
+ feedbackStatus === "saved" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
271
+ Badge,
272
+ {
273
+ variant: "secondary",
274
+ className: "gap-1 bg-emerald-100 text-emerald-700",
275
+ children: [
276
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3" }),
277
+ "Settings saved successfully"
278
+ ]
279
+ }
280
+ ),
281
+ feedbackStatus === "error" && /* @__PURE__ */ jsxRuntimeExports.jsxs(Badge, { variant: "destructive", className: "gap-1", children: [
282
+ /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-3" }),
283
+ errorMessage || "An error occurred"
284
+ ] }),
285
+ isDirty && /* @__PURE__ */ jsxRuntimeExports.jsx(
286
+ CmsButton,
287
+ {
288
+ variant: "secondary",
289
+ onClick: handleDiscard,
290
+ disabled: feedbackStatus === "saving",
291
+ children: "Discard Changes"
292
+ }
293
+ ),
294
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
295
+ CmsButton,
296
+ {
297
+ onClick: handleSave,
298
+ disabled: !isDirty,
299
+ loading: feedbackStatus === "saving",
300
+ children: "Save Changes"
301
+ }
302
+ )
303
+ ] })
304
+ ] }),
305
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
306
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AppearanceSection, {}),
307
+ formData?.features.localization && /* @__PURE__ */ jsxRuntimeExports.jsxs(CmsSurface, { elevation: "base", className: "p-6", children: [
308
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-4 text-lg font-semibold text-foreground", children: "General" }),
309
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
310
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
311
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Default Locale" }),
312
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "The default language for new content entries." })
313
+ ] }),
314
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
315
+ Select,
316
+ {
317
+ value: formData?.defaultLocale || "en",
318
+ onValueChange: handleLocaleChange,
319
+ disabled: !canEdit || feedbackStatus === "saving",
320
+ children: [
321
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-48", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
322
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: LOCALE_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
323
+ ]
324
+ }
325
+ )
326
+ ] }) })
327
+ ] }),
328
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(CmsSurface, { elevation: "base", className: "p-6", children: [
329
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-4 text-lg font-semibold text-foreground", children: "Features" }),
330
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
331
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
332
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
333
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Versioning" }),
334
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Track content history and enable rollback to previous versions" })
335
+ ] }),
336
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
337
+ Switch,
338
+ {
339
+ checked: formData?.features.versioning ?? true,
340
+ onCheckedChange: () => handleFeatureChange("versioning"),
341
+ disabled: !canEdit || feedbackStatus === "saving"
342
+ }
343
+ )
344
+ ] }),
345
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
346
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
347
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Scheduling" }),
348
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Schedule content to publish at a future date and time" })
349
+ ] }),
350
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
351
+ Switch,
352
+ {
353
+ checked: formData?.features.scheduling ?? true,
354
+ onCheckedChange: () => handleFeatureChange("scheduling"),
355
+ disabled: !canEdit || feedbackStatus === "saving"
356
+ }
357
+ )
358
+ ] }),
359
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
360
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
361
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Localization" }),
362
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Support multiple languages for content entries" })
363
+ ] }),
364
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
365
+ Switch,
366
+ {
367
+ checked: formData?.features.localization ?? false,
368
+ onCheckedChange: () => handleFeatureChange("localization"),
369
+ disabled: !canEdit || feedbackStatus === "saving"
370
+ }
371
+ )
372
+ ] }),
373
+ baseConfig.navigation.showMedia && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
374
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
375
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Enable Media Management" }),
376
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Use the built-in media library for image and file uploads" })
377
+ ] }),
378
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
379
+ Switch,
380
+ {
381
+ checked: formData?.features.mediaManagement ?? true,
382
+ onCheckedChange: () => handleFeatureChange("mediaManagement"),
383
+ disabled: !canEdit || feedbackStatus === "saving"
384
+ }
385
+ )
386
+ ] })
387
+ ] })
388
+ ] }),
389
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(CmsSurface, { elevation: "base", className: "p-6", children: [
390
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-4 text-lg font-semibold text-foreground", children: "API" }),
391
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
392
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Convex Deployment URL" }),
393
+ /* @__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" })
394
+ ] }) })
395
+ ] }),
396
+ canEdit && /* @__PURE__ */ jsxRuntimeExports.jsxs(
397
+ CmsSurface,
398
+ {
399
+ elevation: "base",
400
+ className: "border-red-200 p-6 dark:border-red-900",
401
+ children: [
402
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "mb-4 text-lg font-semibold text-red-600", children: "Danger Zone" }),
403
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
404
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
405
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { className: "text-sm font-medium", children: "Reset to Defaults" }),
406
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Reset all settings to their default values. This cannot be undone." })
407
+ ] }),
408
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
409
+ CmsButton,
410
+ {
411
+ variant: "danger",
412
+ onClick: handleReset,
413
+ disabled: feedbackStatus === "saving",
414
+ children: "Reset Settings"
415
+ }
416
+ )
417
+ ] })
418
+ ]
419
+ }
420
+ )
421
+ ] })
422
+ ] }) });
423
+ }
424
+ function SettingsRoute() {
425
+ const navigation = useTanStackNavigation();
426
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsPage, { api, navigation });
427
+ }
428
+ export {
429
+ SettingsRoute as component
430
+ };
@@ -0,0 +1,4 @@
1
+ const startInstance = void 0;
2
+ export {
3
+ startInstance
4
+ };
@@ -0,0 +1,31 @@
1
+ import { j as jsxRuntimeExports } from "../_chunks/_libs/react.mjs";
2
+ import { R as Root, T as Thumb } from "../_chunks/_libs/@radix-ui/react-switch.mjs";
3
+ import { c as cn } from "./router-D1BMAMJT.mjs";
4
+ function Switch({
5
+ className,
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9
+ Root,
10
+ {
11
+ "data-slot": "switch",
12
+ className: cn(
13
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
14
+ className
15
+ ),
16
+ ...props,
17
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18
+ Thumb,
19
+ {
20
+ "data-slot": "switch-thumb",
21
+ className: cn(
22
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
23
+ )
24
+ }
25
+ )
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ Switch as S
31
+ };