@actuate-media/cms-admin 0.9.0 → 0.11.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 (294) hide show
  1. package/dist/AdminRoot.d.ts.map +1 -1
  2. package/dist/AdminRoot.js +8 -5
  3. package/dist/AdminRoot.js.map +1 -1
  4. package/dist/__tests__/layout/primitives.test.d.ts +2 -0
  5. package/dist/__tests__/layout/primitives.test.d.ts.map +1 -0
  6. package/dist/__tests__/layout/primitives.test.js +34 -0
  7. package/dist/__tests__/layout/primitives.test.js.map +1 -0
  8. package/dist/__tests__/lib/cv.test.d.ts +2 -0
  9. package/dist/__tests__/lib/cv.test.d.ts.map +1 -0
  10. package/dist/__tests__/lib/cv.test.js +66 -0
  11. package/dist/__tests__/lib/cv.test.js.map +1 -0
  12. package/dist/actuate-admin.css +1 -1
  13. package/dist/assets/actuate-logo.d.ts +36 -0
  14. package/dist/assets/actuate-logo.d.ts.map +1 -0
  15. package/dist/assets/actuate-logo.js +15 -0
  16. package/dist/assets/actuate-logo.js.map +1 -0
  17. package/dist/components/Breadcrumbs.js +2 -2
  18. package/dist/components/CommandPalette.js +10 -10
  19. package/dist/components/ContentOverviewChart.js +3 -3
  20. package/dist/components/ErrorBoundary.js +1 -1
  21. package/dist/components/FocalPointPicker.js +2 -2
  22. package/dist/components/FolderTree.js +20 -20
  23. package/dist/components/LivePreview.js +3 -3
  24. package/dist/components/LocaleSwitcher.js +1 -1
  25. package/dist/components/MediaPickerModal.js +4 -4
  26. package/dist/components/PresenceIndicator.js +1 -1
  27. package/dist/components/SEOConfigPanel.d.ts +2 -0
  28. package/dist/components/SEOConfigPanel.d.ts.map +1 -0
  29. package/dist/components/SEOConfigPanel.js +174 -0
  30. package/dist/components/SEOConfigPanel.js.map +1 -0
  31. package/dist/components/SEOPanel.js +9 -9
  32. package/dist/components/SEOPerformance.js +2 -2
  33. package/dist/components/SchedulePublishDialog.d.ts +18 -0
  34. package/dist/components/SchedulePublishDialog.d.ts.map +1 -0
  35. package/dist/components/SchedulePublishDialog.js +106 -0
  36. package/dist/components/SchedulePublishDialog.js.map +1 -0
  37. package/dist/components/SharePreviewLinkDialog.d.ts +17 -0
  38. package/dist/components/SharePreviewLinkDialog.d.ts.map +1 -0
  39. package/dist/components/SharePreviewLinkDialog.js +83 -0
  40. package/dist/components/SharePreviewLinkDialog.js.map +1 -0
  41. package/dist/components/TipTapEditor.js +5 -5
  42. package/dist/components/VersionHistory.js +2 -2
  43. package/dist/components/ui/Badge.d.ts +33 -3
  44. package/dist/components/ui/Badge.d.ts.map +1 -1
  45. package/dist/components/ui/Badge.js +42 -8
  46. package/dist/components/ui/Badge.js.map +1 -1
  47. package/dist/components/ui/Button.d.ts +19 -8
  48. package/dist/components/ui/Button.d.ts.map +1 -1
  49. package/dist/components/ui/Button.js +35 -14
  50. package/dist/components/ui/Button.js.map +1 -1
  51. package/dist/components/ui/Card.d.ts +26 -0
  52. package/dist/components/ui/Card.d.ts.map +1 -0
  53. package/dist/components/ui/Card.js +45 -0
  54. package/dist/components/ui/Card.js.map +1 -0
  55. package/dist/components/ui/DataTable.js +1 -1
  56. package/dist/components/ui/Input.d.ts +15 -0
  57. package/dist/components/ui/Input.d.ts.map +1 -0
  58. package/dist/components/ui/Input.js +23 -0
  59. package/dist/components/ui/Input.js.map +1 -0
  60. package/dist/components/ui/SearchInput.js +1 -1
  61. package/dist/components/ui/Select.d.ts +16 -0
  62. package/dist/components/ui/Select.d.ts.map +1 -0
  63. package/dist/components/ui/Select.js +25 -0
  64. package/dist/components/ui/Select.js.map +1 -0
  65. package/dist/components/ui/Toast.js +1 -1
  66. package/dist/components/ui/index.d.ts +10 -4
  67. package/dist/components/ui/index.d.ts.map +1 -1
  68. package/dist/components/ui/index.js +5 -2
  69. package/dist/components/ui/index.js.map +1 -1
  70. package/dist/fields/BlockBuilderField.js +3 -3
  71. package/dist/fields/DateField.js +1 -1
  72. package/dist/fields/RelationshipField.js +3 -3
  73. package/dist/fields/TextField.js +1 -1
  74. package/dist/index.d.ts +6 -0
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +5 -0
  77. package/dist/index.js.map +1 -1
  78. package/dist/layout/Header.js +1 -1
  79. package/dist/layout/Layout.d.ts +14 -0
  80. package/dist/layout/Layout.d.ts.map +1 -1
  81. package/dist/layout/Layout.js +17 -11
  82. package/dist/layout/Layout.js.map +1 -1
  83. package/dist/layout/Sidebar.d.ts.map +1 -1
  84. package/dist/layout/Sidebar.js +21 -11
  85. package/dist/layout/Sidebar.js.map +1 -1
  86. package/dist/layout/primitives/AdminShell.d.ts +43 -0
  87. package/dist/layout/primitives/AdminShell.d.ts.map +1 -0
  88. package/dist/layout/primitives/AdminShell.js +51 -0
  89. package/dist/layout/primitives/AdminShell.js.map +1 -0
  90. package/dist/layout/primitives/Box.d.ts +19 -0
  91. package/dist/layout/primitives/Box.d.ts.map +1 -0
  92. package/dist/layout/primitives/Box.js +12 -0
  93. package/dist/layout/primitives/Box.js.map +1 -0
  94. package/dist/layout/primitives/Cluster.d.ts +27 -0
  95. package/dist/layout/primitives/Cluster.d.ts.map +1 -0
  96. package/dist/layout/primitives/Cluster.js +37 -0
  97. package/dist/layout/primitives/Cluster.js.map +1 -0
  98. package/dist/layout/primitives/Grid.d.ts +45 -0
  99. package/dist/layout/primitives/Grid.d.ts.map +1 -0
  100. package/dist/layout/primitives/Grid.js +59 -0
  101. package/dist/layout/primitives/Grid.js.map +1 -0
  102. package/dist/layout/primitives/PageContainer.d.ts +36 -0
  103. package/dist/layout/primitives/PageContainer.d.ts.map +1 -0
  104. package/dist/layout/primitives/PageContainer.js +41 -0
  105. package/dist/layout/primitives/PageContainer.js.map +1 -0
  106. package/dist/layout/primitives/Split.d.ts +34 -0
  107. package/dist/layout/primitives/Split.d.ts.map +1 -0
  108. package/dist/layout/primitives/Split.js +27 -0
  109. package/dist/layout/primitives/Split.js.map +1 -0
  110. package/dist/layout/primitives/Stack.d.ts +23 -0
  111. package/dist/layout/primitives/Stack.d.ts.map +1 -0
  112. package/dist/layout/primitives/Stack.js +34 -0
  113. package/dist/layout/primitives/Stack.js.map +1 -0
  114. package/dist/layout/primitives/index.d.ts +30 -0
  115. package/dist/layout/primitives/index.d.ts.map +1 -0
  116. package/dist/layout/primitives/index.js +22 -0
  117. package/dist/layout/primitives/index.js.map +1 -0
  118. package/dist/layout/primitives/tokens.d.ts +48 -0
  119. package/dist/layout/primitives/tokens.d.ts.map +1 -0
  120. package/dist/layout/primitives/tokens.js +54 -0
  121. package/dist/layout/primitives/tokens.js.map +1 -0
  122. package/dist/lib/cv.d.ts +53 -0
  123. package/dist/lib/cv.d.ts.map +1 -0
  124. package/dist/lib/cv.js +39 -0
  125. package/dist/lib/cv.js.map +1 -0
  126. package/dist/views/ApiKeys.d.ts.map +1 -1
  127. package/dist/views/ApiKeys.js +13 -11
  128. package/dist/views/ApiKeys.js.map +1 -1
  129. package/dist/views/CollectionList.js +8 -8
  130. package/dist/views/Dashboard.d.ts.map +1 -1
  131. package/dist/views/Dashboard.js +333 -78
  132. package/dist/views/Dashboard.js.map +1 -1
  133. package/dist/views/DocumentEdit.d.ts.map +1 -1
  134. package/dist/views/DocumentEdit.js +17 -5
  135. package/dist/views/DocumentEdit.js.map +1 -1
  136. package/dist/views/ForgotPassword.js +2 -2
  137. package/dist/views/FormEditor.js +5 -5
  138. package/dist/views/FormSubmissions.js +6 -6
  139. package/dist/views/Forms.js +2 -2
  140. package/dist/views/Login.d.ts +16 -1
  141. package/dist/views/Login.d.ts.map +1 -1
  142. package/dist/views/Login.js +17 -7
  143. package/dist/views/Login.js.map +1 -1
  144. package/dist/views/MediaBrowser.js +16 -16
  145. package/dist/views/PageEditor.js +2 -2
  146. package/dist/views/Pages.js +10 -10
  147. package/dist/views/PostEditor.js +2 -2
  148. package/dist/views/Posts.js +4 -4
  149. package/dist/views/Redirects.js +4 -4
  150. package/dist/views/ResetPassword.js +2 -2
  151. package/dist/views/SEO.js +6 -6
  152. package/dist/views/ScriptTagEditor.js +4 -4
  153. package/dist/views/ScriptTags.js +2 -2
  154. package/dist/views/Settings.d.ts.map +1 -1
  155. package/dist/views/Settings.js +9 -8
  156. package/dist/views/Settings.js.map +1 -1
  157. package/dist/views/SetupWizard.js +2 -2
  158. package/dist/views/Users.js +4 -4
  159. package/dist/views/page-builder/AIBlockAssist.js +1 -1
  160. package/dist/views/page-builder/AIGenerateDialog.js +10 -10
  161. package/dist/views/page-builder/BlockEditor.js +10 -10
  162. package/dist/views/page-builder/BlockPicker.js +4 -4
  163. package/dist/views/page-builder/BottomBar.js +1 -1
  164. package/dist/views/page-builder/BuilderToolbar.js +2 -2
  165. package/dist/views/page-builder/ContextPanel.js +2 -2
  166. package/dist/views/page-builder/DesignScore.js +9 -9
  167. package/dist/views/page-builder/NodeSettings.js +8 -8
  168. package/dist/views/page-builder/PageBuilder.js +3 -3
  169. package/dist/views/page-builder/PageSettings.js +1 -1
  170. package/dist/views/page-builder/PageTemplates.js +2 -2
  171. package/dist/views/page-builder/SEOPanel.js +13 -13
  172. package/dist/views/page-builder/SavedSections.js +5 -5
  173. package/dist/views/page-builder/TemplatePicker.js +2 -2
  174. package/dist/views/page-builder/block-renderers/CTAPreview.js +5 -5
  175. package/dist/views/page-builder/block-renderers/CardsPreview.js +1 -1
  176. package/dist/views/page-builder/block-renderers/CodePreview.js +1 -1
  177. package/dist/views/page-builder/block-renderers/FAQPreview.js +3 -3
  178. package/dist/views/page-builder/block-renderers/FallbackPreview.js +1 -1
  179. package/dist/views/page-builder/block-renderers/FormPreview.js +3 -3
  180. package/dist/views/page-builder/block-renderers/GalleryPreview.js +5 -5
  181. package/dist/views/page-builder/block-renderers/HeroPreview.js +3 -3
  182. package/dist/views/page-builder/block-renderers/ImagePreview.js +3 -3
  183. package/dist/views/page-builder/block-renderers/TextPreview.js +3 -3
  184. package/dist/views/page-builder/block-renderers/VideoPreview.js +4 -4
  185. package/dist/views/page-builder/canvas/BlockRenderer.js +1 -1
  186. package/dist/views/page-builder/canvas/BuilderCanvas.js +3 -3
  187. package/dist/views/page-builder/canvas/ColumnRenderer.js +2 -2
  188. package/dist/views/page-builder/canvas/ContainerRenderer.js +2 -2
  189. package/dist/views/page-builder/canvas/RowRenderer.js +2 -2
  190. package/dist/views/page-builder/canvas/SectionRenderer.js +2 -2
  191. package/package.json +6 -2
  192. package/src/AdminRoot.tsx +21 -11
  193. package/src/__tests__/layout/primitives.test.ts +37 -0
  194. package/src/__tests__/lib/cv.test.ts +74 -0
  195. package/src/assets/actuate-logo.tsx +72 -0
  196. package/src/components/Breadcrumbs.tsx +6 -6
  197. package/src/components/CommandPalette.tsx +34 -34
  198. package/src/components/ContentOverviewChart.tsx +3 -3
  199. package/src/components/ErrorBoundary.tsx +3 -3
  200. package/src/components/FocalPointPicker.tsx +4 -4
  201. package/src/components/FolderTree.tsx +38 -38
  202. package/src/components/LivePreview.tsx +16 -16
  203. package/src/components/LocaleSwitcher.tsx +7 -7
  204. package/src/components/MediaPickerModal.tsx +21 -21
  205. package/src/components/PresenceIndicator.tsx +2 -2
  206. package/src/components/SEOConfigPanel.tsx +582 -0
  207. package/src/components/SEOPanel.tsx +46 -46
  208. package/src/components/SEOPerformance.tsx +21 -21
  209. package/src/components/SchedulePublishDialog.tsx +241 -0
  210. package/src/components/SharePreviewLinkDialog.tsx +227 -0
  211. package/src/components/TipTapEditor.tsx +33 -33
  212. package/src/components/VersionHistory.tsx +16 -16
  213. package/src/components/ui/Badge.tsx +66 -14
  214. package/src/components/ui/Button.tsx +70 -33
  215. package/src/components/ui/Card.tsx +101 -0
  216. package/src/components/ui/DataTable.tsx +1 -1
  217. package/src/components/ui/Input.tsx +35 -0
  218. package/src/components/ui/SearchInput.tsx +4 -4
  219. package/src/components/ui/Select.tsx +56 -0
  220. package/src/components/ui/Toast.tsx +1 -1
  221. package/src/components/ui/index.ts +18 -4
  222. package/src/fields/BlockBuilderField.tsx +3 -3
  223. package/src/fields/DateField.tsx +1 -1
  224. package/src/fields/RelationshipField.tsx +10 -10
  225. package/src/fields/TextField.tsx +1 -1
  226. package/src/index.ts +32 -0
  227. package/src/layout/Header.tsx +28 -28
  228. package/src/layout/Layout.tsx +39 -46
  229. package/src/layout/Sidebar.tsx +37 -64
  230. package/src/layout/primitives/AdminShell.tsx +118 -0
  231. package/src/layout/primitives/Box.tsx +30 -0
  232. package/src/layout/primitives/Cluster.tsx +74 -0
  233. package/src/layout/primitives/Grid.tsx +120 -0
  234. package/src/layout/primitives/PageContainer.tsx +96 -0
  235. package/src/layout/primitives/Split.tsx +73 -0
  236. package/src/layout/primitives/Stack.tsx +67 -0
  237. package/src/layout/primitives/index.ts +36 -0
  238. package/src/layout/primitives/tokens.ts +76 -0
  239. package/src/lib/cv.ts +96 -0
  240. package/src/styles/build-input.css +1 -1
  241. package/src/views/ApiKeys.tsx +57 -57
  242. package/src/views/CollectionList.tsx +30 -30
  243. package/src/views/Dashboard.tsx +737 -186
  244. package/src/views/DocumentEdit.tsx +90 -10
  245. package/src/views/ForgotPassword.tsx +18 -18
  246. package/src/views/FormEditor.tsx +75 -75
  247. package/src/views/FormSubmissions.tsx +76 -76
  248. package/src/views/Forms.tsx +27 -27
  249. package/src/views/Login.tsx +65 -25
  250. package/src/views/MediaBrowser.tsx +127 -127
  251. package/src/views/PageEditor.tsx +25 -25
  252. package/src/views/Pages.tsx +59 -59
  253. package/src/views/PostEditor.tsx +37 -37
  254. package/src/views/Posts.tsx +48 -48
  255. package/src/views/Redirects.tsx +21 -21
  256. package/src/views/ResetPassword.tsx +28 -28
  257. package/src/views/SEO.tsx +144 -144
  258. package/src/views/ScriptTagEditor.tsx +24 -24
  259. package/src/views/ScriptTags.tsx +10 -10
  260. package/src/views/Settings.tsx +88 -80
  261. package/src/views/SetupWizard.tsx +28 -28
  262. package/src/views/Users.tsx +20 -20
  263. package/src/views/page-builder/AIBlockAssist.tsx +1 -1
  264. package/src/views/page-builder/AIGenerateDialog.tsx +63 -63
  265. package/src/views/page-builder/BlockEditor.tsx +26 -26
  266. package/src/views/page-builder/BlockPicker.tsx +22 -22
  267. package/src/views/page-builder/BottomBar.tsx +8 -8
  268. package/src/views/page-builder/BuilderToolbar.tsx +17 -17
  269. package/src/views/page-builder/ContextPanel.tsx +3 -3
  270. package/src/views/page-builder/DesignScore.tsx +21 -21
  271. package/src/views/page-builder/NodeSettings.tsx +27 -27
  272. package/src/views/page-builder/PageBuilder.tsx +11 -11
  273. package/src/views/page-builder/PageSettings.tsx +4 -4
  274. package/src/views/page-builder/PageTemplates.tsx +18 -18
  275. package/src/views/page-builder/SEOPanel.tsx +53 -53
  276. package/src/views/page-builder/SavedSections.tsx +37 -37
  277. package/src/views/page-builder/TemplatePicker.tsx +17 -17
  278. package/src/views/page-builder/block-renderers/CTAPreview.tsx +13 -13
  279. package/src/views/page-builder/block-renderers/CardsPreview.tsx +5 -5
  280. package/src/views/page-builder/block-renderers/CodePreview.tsx +6 -6
  281. package/src/views/page-builder/block-renderers/FAQPreview.tsx +13 -13
  282. package/src/views/page-builder/block-renderers/FallbackPreview.tsx +3 -3
  283. package/src/views/page-builder/block-renderers/FormPreview.tsx +20 -20
  284. package/src/views/page-builder/block-renderers/GalleryPreview.tsx +8 -8
  285. package/src/views/page-builder/block-renderers/HeroPreview.tsx +16 -16
  286. package/src/views/page-builder/block-renderers/ImagePreview.tsx +4 -4
  287. package/src/views/page-builder/block-renderers/TextPreview.tsx +14 -14
  288. package/src/views/page-builder/block-renderers/VideoPreview.tsx +12 -12
  289. package/src/views/page-builder/canvas/BlockRenderer.tsx +4 -4
  290. package/src/views/page-builder/canvas/BuilderCanvas.tsx +6 -6
  291. package/src/views/page-builder/canvas/ColumnRenderer.tsx +3 -3
  292. package/src/views/page-builder/canvas/ContainerRenderer.tsx +2 -2
  293. package/src/views/page-builder/canvas/RowRenderer.tsx +2 -2
  294. package/src/views/page-builder/canvas/SectionRenderer.tsx +2 -2
@@ -8,6 +8,7 @@ import { useApiData } from '../lib/useApiData.js';
8
8
  import { cmsApi } from '../lib/api.js';
9
9
  import { useTheme } from '../components/ThemeProvider.js';
10
10
  import { RelationshipField } from '../fields/RelationshipField.js';
11
+ import { SEOConfigPanel } from '../components/SEOConfigPanel.js';
11
12
  export function Settings({ config, ..._props } = {}) {
12
13
  const { data, loading, error, refetch } = useApiData('/globals/settings');
13
14
  const [siteTitle, setSiteTitle] = useState('My CMS');
@@ -115,9 +116,9 @@ export function Settings({ config, ..._props } = {}) {
115
116
  };
116
117
  const tabTriggerClass = 'px-4 py-2 text-sm font-medium text-gray-600 transition-colors hover:text-gray-900 data-[state=active]:border-b-2 data-[state=active]:border-blue-600 data-[state=active]:text-blue-600';
117
118
  if (loading) {
118
- return (_jsx("div", { className: "p-3 pr-6 sm:p-4 sm:pr-8 flex items-center justify-center h-64", children: _jsx(Loader2, { className: "w-6 h-6 animate-spin text-blue-600" }) }));
119
+ return (_jsx("div", { className: "flex h-64 items-center justify-center p-3 pr-6 sm:p-4 sm:pr-8", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-blue-600" }) }));
119
120
  }
120
- return (_jsxs("div", { className: "p-3 pr-6 sm:p-4 sm:pr-8", children: [error && (_jsxs("div", { className: "mb-4 flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "w-5 h-5 text-red-600 shrink-0" }), _jsx("span", { className: "text-sm text-red-800 flex-1", children: error }), _jsx("button", { onClick: refetch, className: "px-3 py-1 text-sm text-red-700 border border-red-300 rounded-lg hover:bg-red-100 transition-colors", children: "Retry" })] })), _jsxs("div", { className: "mb-4", children: [_jsx("h1", { className: "mb-1 text-2xl font-semibold text-gray-900", children: "Settings" }), _jsx("p", { className: "text-sm text-gray-600", children: "Manage your CMS configuration" })] }), _jsxs(Tabs.Root, { value: activeTab, onValueChange: setActiveTab, children: [_jsxs(Tabs.List, { className: "mb-4 flex gap-1 border-b border-gray-200 overflow-x-auto", children: [_jsx(Tabs.Trigger, { value: "general", className: tabTriggerClass, children: "General" }), _jsx(Tabs.Trigger, { value: "appearance", className: tabTriggerClass, children: "Appearance" }), hasLayoutRegions && (_jsx(Tabs.Trigger, { value: "layout", className: tabTriggerClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Layers, { className: "w-4 h-4" }), "Layout"] }) })), _jsx(Tabs.Trigger, { value: "security", className: tabTriggerClass, children: "Security" }), _jsx(Tabs.Trigger, { value: "ai", className: tabTriggerClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Bot, { className: "w-4 h-4" }), "AI"] }) }), _jsx(Tabs.Trigger, { value: "integrations", className: tabTriggerClass, children: "Integrations" }), _jsx(Tabs.Trigger, { value: "updates", className: tabTriggerClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Download, { className: "w-4 h-4" }), "Updates"] }) })] }), _jsxs(Tabs.Content, { value: "general", className: "space-y-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Site Information" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Site Title" }), _jsx("input", { type: "text", value: siteTitle, onChange: (e) => setSiteTitle(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Tagline" }), _jsx("input", { type: "text", value: tagline, onChange: (e) => setTagline(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Site URL" }), _jsx("input", { type: "url", value: siteUrl, onChange: (e) => setSiteUrl(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" })] })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Language & Region" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Language" }), _jsxs("select", { value: language, onChange: (e) => setLanguage(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "en", children: "English" }), _jsx("option", { value: "es", children: "Spanish" }), _jsx("option", { value: "fr", children: "French" }), _jsx("option", { value: "de", children: "German" })] })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Timezone" }), _jsxs("select", { value: timezone, onChange: (e) => setTimezone(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "UTC", children: "UTC" }), _jsx("option", { value: "America/New_York", children: "Eastern Time" }), _jsx("option", { value: "America/Chicago", children: "Central Time" }), _jsx("option", { value: "America/Denver", children: "Mountain Time" }), _jsx("option", { value: "America/Los_Angeles", children: "Pacific Time" })] })] })] })] }), _jsxs("div", { className: "rounded-lg border border-border bg-card p-4", children: [_jsx("h3", { className: "mb-1 text-sm font-medium text-foreground", children: "SEO & Robots Defaults" }), _jsx("p", { className: "mb-4 text-xs text-muted-foreground", children: "Set the site-wide default for search engine indexing. Individual pages can inherit or override these rules in their SEO panel." }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Default No Index", description: "Ask search engines not to index pages unless a page explicitly allows indexing", checked: defaultNoIndex, onChange: setDefaultNoIndex }), _jsx(ToggleSetting, { label: "Default No Follow", description: "Ask search engines not to follow page links unless a page explicitly allows following", checked: defaultNoFollow, onChange: setDefaultNoFollow }), _jsx(ToggleSetting, { label: "Noindex Non-Production Environments", description: "Force noindex when the deployed environment is not production", checked: noIndexNonProduction, onChange: setNoIndexNonProduction })] })] })] }), _jsx(Tabs.Content, { value: "appearance", className: "space-y-4", children: _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Theme" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Color Scheme" }), _jsx(ThemeSelect, {})] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Primary Color" }), _jsx("input", { type: "color", defaultValue: "#3b82f6", className: "h-10 w-full rounded-lg border border-gray-300 px-3 py-2" })] })] })] }) }), hasLayoutRegions && (_jsxs(Tabs.Content, { value: "layout", className: "space-y-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-1 text-sm font-semibold text-gray-900", children: "Default Layout Variants" }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "Select the default header, footer, and other layout variants used site-wide. Pages can override these individually or inherit from parent pages." }), _jsx("div", { className: "space-y-4", children: layoutRegions.map((region) => (_jsx(RelationshipField, { label: `Default ${region.label}`, value: defaultLayout[region.name] ?? '', onChange: (val) => {
121
+ return (_jsxs("div", { className: "p-3 pr-6 sm:p-4 sm:pr-8", children: [error && (_jsxs("div", { className: "mb-4 flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "h-5 w-5 shrink-0 text-red-600" }), _jsx("span", { className: "flex-1 text-sm text-red-800", children: error }), _jsx("button", { onClick: refetch, className: "rounded-lg border border-red-300 px-3 py-1 text-sm text-red-700 transition-colors hover:bg-red-100", children: "Retry" })] })), _jsxs("div", { className: "mb-4", children: [_jsx("h1", { className: "mb-1 text-2xl font-semibold text-gray-900", children: "Settings" }), _jsx("p", { className: "text-sm text-gray-600", children: "Manage your CMS configuration" })] }), _jsxs(Tabs.Root, { value: activeTab, onValueChange: setActiveTab, children: [_jsxs(Tabs.List, { className: "mb-4 flex gap-1 overflow-x-auto border-b border-gray-200", children: [_jsx(Tabs.Trigger, { value: "general", className: tabTriggerClass, children: "General" }), _jsx(Tabs.Trigger, { value: "appearance", className: tabTriggerClass, children: "Appearance" }), hasLayoutRegions && (_jsx(Tabs.Trigger, { value: "layout", className: tabTriggerClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Layers, { className: "h-4 w-4" }), "Layout"] }) })), _jsx(Tabs.Trigger, { value: "security", className: tabTriggerClass, children: "Security" }), _jsx(Tabs.Trigger, { value: "seo", className: tabTriggerClass, children: "SEO" }), _jsx(Tabs.Trigger, { value: "ai", className: tabTriggerClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Bot, { className: "h-4 w-4" }), "AI"] }) }), _jsx(Tabs.Trigger, { value: "integrations", className: tabTriggerClass, children: "Integrations" }), _jsx(Tabs.Trigger, { value: "updates", className: tabTriggerClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Download, { className: "h-4 w-4" }), "Updates"] }) })] }), _jsxs(Tabs.Content, { value: "general", className: "space-y-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Site Information" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Site Title" }), _jsx("input", { type: "text", value: siteTitle, onChange: (e) => setSiteTitle(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Tagline" }), _jsx("input", { type: "text", value: tagline, onChange: (e) => setTagline(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Site URL" }), _jsx("input", { type: "url", value: siteUrl, onChange: (e) => setSiteUrl(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" })] })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Language & Region" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Language" }), _jsxs("select", { value: language, onChange: (e) => setLanguage(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", children: [_jsx("option", { value: "en", children: "English" }), _jsx("option", { value: "es", children: "Spanish" }), _jsx("option", { value: "fr", children: "French" }), _jsx("option", { value: "de", children: "German" })] })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Timezone" }), _jsxs("select", { value: timezone, onChange: (e) => setTimezone(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", children: [_jsx("option", { value: "UTC", children: "UTC" }), _jsx("option", { value: "America/New_York", children: "Eastern Time" }), _jsx("option", { value: "America/Chicago", children: "Central Time" }), _jsx("option", { value: "America/Denver", children: "Mountain Time" }), _jsx("option", { value: "America/Los_Angeles", children: "Pacific Time" })] })] })] })] }), _jsxs("div", { className: "border-border bg-card rounded-lg border p-4", children: [_jsx("h3", { className: "text-foreground mb-1 text-sm font-medium", children: "SEO & Robots Defaults" }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Set the site-wide default for search engine indexing. Individual pages can inherit or override these rules in their SEO panel." }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Default No Index", description: "Ask search engines not to index pages unless a page explicitly allows indexing", checked: defaultNoIndex, onChange: setDefaultNoIndex }), _jsx(ToggleSetting, { label: "Default No Follow", description: "Ask search engines not to follow page links unless a page explicitly allows following", checked: defaultNoFollow, onChange: setDefaultNoFollow }), _jsx(ToggleSetting, { label: "Noindex Non-Production Environments", description: "Force noindex when the deployed environment is not production", checked: noIndexNonProduction, onChange: setNoIndexNonProduction })] })] })] }), _jsx(Tabs.Content, { value: "appearance", className: "space-y-4", children: _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Theme" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Color Scheme" }), _jsx(ThemeSelect, {})] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Primary Color" }), _jsx("input", { type: "color", defaultValue: "#3b82f6", className: "h-10 w-full rounded-lg border border-gray-300 px-3 py-2" })] })] })] }) }), hasLayoutRegions && (_jsxs(Tabs.Content, { value: "layout", className: "space-y-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-1 text-sm font-semibold text-gray-900", children: "Default Layout Variants" }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "Select the default header, footer, and other layout variants used site-wide. Pages can override these individually or inherit from parent pages." }), _jsx("div", { className: "space-y-4", children: layoutRegions.map((region) => (_jsx(RelationshipField, { label: `Default ${region.label}`, value: defaultLayout[region.name] ?? '', onChange: (val) => {
121
122
  setDefaultLayout((prev) => {
122
123
  const next = { ...prev };
123
124
  if (val && typeof val === 'string') {
@@ -128,26 +129,26 @@ export function Settings({ config, ..._props } = {}) {
128
129
  }
129
130
  return next;
130
131
  });
131
- }, relationTo: region.collection, helpText: `The ${region.label.toLowerCase()} variant used when no page in the ancestor chain specifies one` }, region.name))) })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-4", children: [_jsx("h3", { className: "text-sm font-semibold text-gray-700 mb-2", children: "How Layout Inheritance Works" }), _jsxs("ul", { className: "space-y-1.5 text-xs text-gray-600", children: [_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "w-4 h-4 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-[10px] font-bold shrink-0 mt-0.5", children: "1" }), _jsx("span", { children: "Each page can assign specific layout variants (header, footer, etc.) from the document editor." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "w-4 h-4 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-[10px] font-bold shrink-0 mt-0.5", children: "2" }), _jsxs("span", { children: ["Child pages automatically inherit their parent's layout. For example,", ' ', _jsx("code", { className: "font-mono bg-gray-200 px-1 rounded", children: "/hampton-roads/thank-you" }), ' ', "inherits from", ' ', _jsx("code", { className: "font-mono bg-gray-200 px-1 rounded", children: "/hampton-roads" }), "."] })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "w-4 h-4 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-[10px] font-bold shrink-0 mt-0.5", children: "3" }), _jsx("span", { children: "If no page in the ancestor chain sets a variant, the defaults configured above are used." })] })] })] })] })), _jsx(Tabs.Content, { value: "security", className: "space-y-4", children: _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Security Settings" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Two-Factor Authentication", description: "Require 2FA for all admin users", checked: twoFactorEnabled, onChange: setTwoFactorEnabled }), _jsx(ToggleSetting, { label: "Session Timeout", description: "Automatically log out inactive users after 30 minutes", checked: sessionTimeout, onChange: setSessionTimeout }), _jsx(ToggleSetting, { label: "IP Whitelist", description: "Only allow access from approved IP addresses", checked: ipWhitelist, onChange: setIpWhitelist })] })] }) }), _jsxs(Tabs.Content, { value: "ai", className: "space-y-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-1 text-sm font-semibold text-gray-900", children: "AI Provider & API Key" }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "Connect an AI provider to enable intelligent content features" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Provider" }), _jsxs("select", { value: aiProvider, onChange: (e) => setAiProvider(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "anthropic", children: "Anthropic (Claude)" }), _jsx("option", { value: "openai", children: "OpenAI (GPT)" }), _jsx("option", { value: "google", children: "Google (Gemini)" })] }), _jsxs("p", { className: "mt-1 text-xs text-gray-500", children: [aiProvider === 'anthropic' &&
132
+ }, relationTo: region.collection, helpText: `The ${region.label.toLowerCase()} variant used when no page in the ancestor chain specifies one` }, region.name))) })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-4", children: [_jsx("h3", { className: "mb-2 text-sm font-semibold text-gray-700", children: "How Layout Inheritance Works" }), _jsxs("ul", { className: "space-y-1.5 text-xs text-gray-600", children: [_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-blue-100 text-[10px] font-bold text-blue-600", children: "1" }), _jsx("span", { children: "Each page can assign specific layout variants (header, footer, etc.) from the document editor." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-blue-100 text-[10px] font-bold text-blue-600", children: "2" }), _jsxs("span", { children: ["Child pages automatically inherit their parent's layout. For example,", ' ', _jsx("code", { className: "rounded bg-gray-200 px-1 font-mono", children: "/hampton-roads/thank-you" }), ' ', "inherits from", ' ', _jsx("code", { className: "rounded bg-gray-200 px-1 font-mono", children: "/hampton-roads" }), "."] })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-blue-100 text-[10px] font-bold text-blue-600", children: "3" }), _jsx("span", { children: "If no page in the ancestor chain sets a variant, the defaults configured above are used." })] })] })] })] })), _jsx(Tabs.Content, { value: "security", className: "space-y-4", children: _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "Security Settings" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Two-Factor Authentication", description: "Require 2FA for all admin users", checked: twoFactorEnabled, onChange: setTwoFactorEnabled }), _jsx(ToggleSetting, { label: "Session Timeout", description: "Automatically log out inactive users after 30 minutes", checked: sessionTimeout, onChange: setSessionTimeout }), _jsx(ToggleSetting, { label: "IP Whitelist", description: "Only allow access from approved IP addresses", checked: ipWhitelist, onChange: setIpWhitelist })] })] }) }), _jsx(Tabs.Content, { value: "seo", className: "space-y-4", children: _jsx(SEOConfigPanel, {}) }), _jsxs(Tabs.Content, { value: "ai", className: "space-y-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-1 text-sm font-semibold text-gray-900", children: "AI Provider & API Key" }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "Connect an AI provider to enable intelligent content features" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Provider" }), _jsxs("select", { value: aiProvider, onChange: (e) => setAiProvider(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", children: [_jsx("option", { value: "anthropic", children: "Anthropic (Claude)" }), _jsx("option", { value: "openai", children: "OpenAI (GPT)" }), _jsx("option", { value: "google", children: "Google (Gemini)" })] }), _jsxs("p", { className: "mt-1 text-xs text-gray-500", children: [aiProvider === 'anthropic' &&
132
133
  'Recommended. Best for content analysis, brand voice learning, and nuanced writing.', aiProvider === 'openai' &&
133
134
  'Strong alternative. Good for general content generation and image understanding.', aiProvider === 'google' &&
134
135
  'Multimodal. Excellent for image analysis and multilingual content.'] })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "API Key" }), _jsxs("div", { className: "flex gap-2", children: [_jsxs("div", { className: "relative flex-1", children: [_jsx("input", { type: showApiKey ? 'text' : 'password', value: aiApiKey, onChange: (e) => setAiApiKey(e.target.value), placeholder: aiProvider === 'anthropic'
135
136
  ? 'sk-ant-...'
136
137
  : aiProvider === 'openai'
137
138
  ? 'sk-...'
138
- : 'AIza...', className: "w-full rounded-lg border border-gray-300 px-3 py-2 pr-10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" }), _jsx("button", { type: "button", onClick: () => setShowApiKey(!showApiKey), className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600", children: showApiKey ? _jsx(EyeOff, { className: "w-4 h-4" }) : _jsx(Eye, { className: "w-4 h-4" }) })] }), _jsx("button", { type: "button", onClick: () => {
139
+ : 'AIza...', className: "w-full rounded-lg border border-gray-300 px-3 py-2 pr-10 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" }), _jsx("button", { type: "button", onClick: () => setShowApiKey(!showApiKey), className: "absolute top-1/2 right-2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600", children: showApiKey ? _jsx(EyeOff, { className: "h-4 w-4" }) : _jsx(Eye, { className: "h-4 w-4" }) })] }), _jsx("button", { type: "button", onClick: () => {
139
140
  if (aiApiKey)
140
141
  toast.success('API key verified successfully');
141
142
  else
142
143
  toast.error('Please enter an API key first');
143
- }, className: "rounded-lg border border-gray-300 px-4 py-2 text-sm transition-colors hover:bg-gray-50", children: "Verify" })] }), _jsx("p", { className: "mt-1 text-xs text-gray-500", children: "Your key is encrypted at rest (AES-256-GCM) and never exposed to the client" })] })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "flex items-center gap-2 mb-1", children: [_jsx(Image, { className: "w-4 h-4 text-blue-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Media Intelligence" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "AI-powered image and media analysis" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Auto Alt-Tag Generation", description: "Scan uploaded images and automatically generate descriptive alt text for accessibility and SEO", checked: aiAltTags, onChange: setAiAltTags }), _jsx(ToggleSetting, { label: "Media Auto-Categorization", description: "Automatically tag and categorize uploaded media based on visual content analysis", checked: aiMediaCategorize, onChange: setAiMediaCategorize })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "flex items-center gap-2 mb-1", children: [_jsx(FileCode2, { className: "w-4 h-4 text-purple-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Content SEO" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "AI-driven SEO optimization for your content" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Meta Description Generation", description: "Auto-generate optimized meta descriptions by digesting page content", checked: aiMetaDescriptions, onChange: setAiMetaDescriptions }), _jsx(ToggleSetting, { label: "Readability Analysis", description: "Score content readability (Flesch-Kincaid, Gunning Fog) with improvement suggestions", checked: aiReadability, onChange: setAiReadability }), _jsx(ToggleSetting, { label: "Schema.org Enrichment", description: "Automatically detect content types and generate appropriate Schema.org JSON-LD markup", checked: aiSchema, onChange: setAiSchema })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "flex items-center gap-2 mb-1", children: [_jsx(MessageSquare, { className: "w-4 h-4 text-green-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Brand Voice & Writing" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "AI that understands and writes in your brand's voice" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Brand Voice Training", description: "Analyze existing content to learn your brand's tone, style, and vocabulary", checked: aiBrandVoice, onChange: setAiBrandVoice }), _jsx(ToggleSetting, { label: "AI Writing Assistant", description: "In-editor AI helper for drafting, rewriting, and expanding content in your brand voice", checked: aiWritingAssistant, onChange: setAiWritingAssistant })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "flex items-center gap-2 mb-1", children: [_jsx(Sparkles, { className: "w-4 h-4 text-yellow-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Content Quality" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "Automated quality scoring and content intelligence" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Content Scoring", description: "Automatically score content quality based on structure, readability, SEO, and completeness", checked: aiContentScoring, onChange: setAiContentScoring }), _jsx(ToggleSetting, { label: "AI-Powered Translation", description: "Translate content into target languages while preserving tone and meaning", checked: aiTranslation, onChange: setAiTranslation })] })] }), _jsxs("div", { className: "rounded-lg border border-indigo-200 bg-indigo-50 p-4", children: [_jsxs("div", { className: "flex items-center gap-2 mb-1", children: [_jsx(BookOpen, { className: "w-4 h-4 text-indigo-600" }), _jsx("h3", { className: "text-sm font-semibold text-indigo-900", children: "AI Usage This Month" })] }), _jsxs("div", { className: "grid grid-cols-3 gap-4 mt-3", children: [_jsxs("div", { children: [_jsx("div", { className: "text-lg font-semibold text-indigo-900", children: "0" }), _jsx("div", { className: "text-xs text-indigo-700", children: "API Calls" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-lg font-semibold text-indigo-900", children: "0" }), _jsx("div", { className: "text-xs text-indigo-700", children: "Tokens Used" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-lg font-semibold text-indigo-900", children: "$0.00" }), _jsx("div", { className: "text-xs text-indigo-700", children: "Estimated Cost" })] })] }), _jsx("p", { className: "mt-2 text-xs text-indigo-600", children: "Add an API key above to start using AI features" })] })] }), _jsx(Tabs.Content, { value: "integrations", className: "space-y-4", children: _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "API Keys" }), _jsx("div", { className: "space-y-4", children: _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "API Key" }), _jsxs("div", { className: "flex gap-2", children: [_jsx("input", { type: "text", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", readOnly: true, className: "flex-1 rounded-lg border border-gray-300 bg-gray-50 px-3 py-2 text-sm" }), _jsx("button", { type: "button", className: "rounded-lg border border-gray-300 px-4 py-2 text-sm transition-colors hover:bg-gray-50", children: "Regenerate" })] })] }) })] }) }), _jsx(Tabs.Content, { value: "updates", className: "space-y-4", children: _jsx(UpdatesPanel, {}) })] }), _jsx("div", { className: "mt-6 flex justify-end", children: _jsx("button", { type: "button", onClick: handleSave, disabled: saving, className: "rounded-lg bg-blue-600 px-6 py-2 text-sm text-white transition-colors hover:bg-blue-700 disabled:opacity-50", children: saving ? 'Saving...' : 'Save Changes' }) })] }));
144
+ }, className: "rounded-lg border border-gray-300 px-4 py-2 text-sm transition-colors hover:bg-gray-50", children: "Verify" })] }), _jsx("p", { className: "mt-1 text-xs text-gray-500", children: "Your key is encrypted at rest (AES-256-GCM) and never exposed to the client" })] })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-1 flex items-center gap-2", children: [_jsx(Image, { className: "h-4 w-4 text-blue-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Media Intelligence" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "AI-powered image and media analysis" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Auto Alt-Tag Generation", description: "Scan uploaded images and automatically generate descriptive alt text for accessibility and SEO", checked: aiAltTags, onChange: setAiAltTags }), _jsx(ToggleSetting, { label: "Media Auto-Categorization", description: "Automatically tag and categorize uploaded media based on visual content analysis", checked: aiMediaCategorize, onChange: setAiMediaCategorize })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-1 flex items-center gap-2", children: [_jsx(FileCode2, { className: "h-4 w-4 text-purple-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Content SEO" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "AI-driven SEO optimization for your content" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Meta Description Generation", description: "Auto-generate optimized meta descriptions by digesting page content", checked: aiMetaDescriptions, onChange: setAiMetaDescriptions }), _jsx(ToggleSetting, { label: "Readability Analysis", description: "Score content readability (Flesch-Kincaid, Gunning Fog) with improvement suggestions", checked: aiReadability, onChange: setAiReadability }), _jsx(ToggleSetting, { label: "Schema.org Enrichment", description: "Automatically detect content types and generate appropriate Schema.org JSON-LD markup", checked: aiSchema, onChange: setAiSchema })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-1 flex items-center gap-2", children: [_jsx(MessageSquare, { className: "h-4 w-4 text-green-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Brand Voice & Writing" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "AI that understands and writes in your brand's voice" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Brand Voice Training", description: "Analyze existing content to learn your brand's tone, style, and vocabulary", checked: aiBrandVoice, onChange: setAiBrandVoice }), _jsx(ToggleSetting, { label: "AI Writing Assistant", description: "In-editor AI helper for drafting, rewriting, and expanding content in your brand voice", checked: aiWritingAssistant, onChange: setAiWritingAssistant })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-1 flex items-center gap-2", children: [_jsx(Sparkles, { className: "h-4 w-4 text-yellow-600" }), _jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Content Quality" })] }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "Automated quality scoring and content intelligence" }), _jsxs("div", { className: "space-y-4", children: [_jsx(ToggleSetting, { label: "Content Scoring", description: "Automatically score content quality based on structure, readability, SEO, and completeness", checked: aiContentScoring, onChange: setAiContentScoring }), _jsx(ToggleSetting, { label: "AI-Powered Translation", description: "Translate content into target languages while preserving tone and meaning", checked: aiTranslation, onChange: setAiTranslation })] })] }), _jsxs("div", { className: "rounded-lg border border-indigo-200 bg-indigo-50 p-4", children: [_jsxs("div", { className: "mb-1 flex items-center gap-2", children: [_jsx(BookOpen, { className: "h-4 w-4 text-indigo-600" }), _jsx("h3", { className: "text-sm font-semibold text-indigo-900", children: "AI Usage This Month" })] }), _jsxs("div", { className: "mt-3 grid grid-cols-3 gap-4", children: [_jsxs("div", { children: [_jsx("div", { className: "text-lg font-semibold text-indigo-900", children: "0" }), _jsx("div", { className: "text-xs text-indigo-700", children: "API Calls" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-lg font-semibold text-indigo-900", children: "0" }), _jsx("div", { className: "text-xs text-indigo-700", children: "Tokens Used" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-lg font-semibold text-indigo-900", children: "$0.00" }), _jsx("div", { className: "text-xs text-indigo-700", children: "Estimated Cost" })] })] }), _jsx("p", { className: "mt-2 text-xs text-indigo-600", children: "Add an API key above to start using AI features" })] })] }), _jsx(Tabs.Content, { value: "integrations", className: "space-y-4", children: _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-4 text-sm font-semibold text-gray-900", children: "API Keys" }), _jsx("div", { className: "space-y-4", children: _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "API Key" }), _jsxs("div", { className: "flex gap-2", children: [_jsx("input", { type: "text", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", readOnly: true, className: "flex-1 rounded-lg border border-gray-300 bg-gray-50 px-3 py-2 text-sm" }), _jsx("button", { type: "button", className: "rounded-lg border border-gray-300 px-4 py-2 text-sm transition-colors hover:bg-gray-50", children: "Regenerate" })] })] }) })] }) }), _jsx(Tabs.Content, { value: "updates", className: "space-y-4", children: _jsx(UpdatesPanel, {}) })] }), _jsx("div", { className: "mt-6 flex justify-end", children: _jsx("button", { type: "button", onClick: handleSave, disabled: saving, className: "rounded-lg bg-blue-600 px-6 py-2 text-sm text-white transition-colors hover:bg-blue-700 disabled:opacity-50", children: saving ? 'Saving...' : 'Save Changes' }) })] }));
144
145
  }
145
146
  function ThemeSelect() {
146
147
  const { theme, setTheme } = useTheme();
147
- return (_jsxs("select", { value: theme, onChange: (e) => setTheme(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "light", children: "Light" }), _jsx("option", { value: "dark", children: "Dark" }), _jsx("option", { value: "system", children: "Auto (System)" })] }));
148
+ return (_jsxs("select", { value: theme, onChange: (e) => setTheme(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", children: [_jsx("option", { value: "light", children: "Light" }), _jsx("option", { value: "dark", children: "Dark" }), _jsx("option", { value: "system", children: "Auto (System)" })] }));
148
149
  }
149
150
  function ToggleSetting({ label, description, checked, onChange, }) {
150
- return (_jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsxs("div", { className: "flex-1", children: [_jsx("label", { className: "text-sm font-medium text-foreground", children: label }), _jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description })] }), _jsx("button", { type: "button", role: "switch", "aria-checked": checked, "aria-label": label, onClick: () => onChange(!checked), className: `relative h-6 w-11 shrink-0 rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-primary ${checked ? 'bg-primary' : 'bg-muted'}`, children: _jsx("span", { className: `absolute top-0.5 block h-5 w-5 rounded-full bg-white transition-transform ${checked ? 'translate-x-[22px]' : 'translate-x-0.5'}` }) })] }));
151
+ return (_jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsxs("div", { className: "flex-1", children: [_jsx("label", { className: "text-foreground text-sm font-medium", children: label }), _jsx("p", { className: "text-muted-foreground mt-0.5 text-xs", children: description })] }), _jsx("button", { type: "button", role: "switch", "aria-checked": checked, "aria-label": label, onClick: () => onChange(!checked), className: `focus:ring-primary relative h-6 w-11 shrink-0 rounded-full transition-colors focus:ring-2 focus:outline-none ${checked ? 'bg-primary' : 'bg-muted'}`, children: _jsx("span", { className: `absolute top-0.5 block h-5 w-5 rounded-full bg-white transition-transform ${checked ? 'translate-x-[22px]' : 'translate-x-0.5'}` }) })] }));
151
152
  }
152
153
  function UpdatesPanel() {
153
154
  const [updateInfo, setUpdateInfo] = useState(null);
@@ -252,6 +253,6 @@ function UpdatesPanel() {
252
253
  },
253
254
  major: { bg: 'bg-red-50', text: 'text-red-700', border: 'border-red-200', label: 'Major' },
254
255
  };
255
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Actuate CMS" }), _jsxs("p", { className: "mt-1 text-sm text-gray-600", children: ["Current version:", ' ', _jsx("span", { className: "font-mono font-medium", children: updateInfo?.current ?? '...' })] })] }), _jsxs("button", { type: "button", onClick: checkForUpdates, disabled: checking, className: "flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 disabled:opacity-50", children: [_jsx(RefreshCw, { className: `w-4 h-4 ${checking ? 'animate-spin' : ''}` }), checking ? 'Checking...' : 'Check for Updates'] })] }) }), checkError && (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "w-5 h-5 text-red-600 shrink-0" }), _jsx("span", { className: "text-sm text-red-800 flex-1", children: checkError }), _jsx("button", { onClick: checkForUpdates, className: "px-3 py-1 text-sm text-red-700 border border-red-300 rounded-lg hover:bg-red-100 transition-colors", children: "Retry" })] })), hasChecked && updateInfo && !updateInfo.updateAvailable && !checkError && (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-green-200 bg-green-50 p-4", children: [_jsx(CheckCircle2, { className: "w-6 h-6 text-green-600 shrink-0" }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-green-900", children: "You're up to date!" }), _jsxs("p", { className: "text-sm text-green-700 mt-0.5", children: ["Actuate CMS ", _jsx("span", { className: "font-mono", children: updateInfo.current }), " is the latest version."] })] })] })), updateInfo?.updateAvailable && (_jsxs(_Fragment, { children: [_jsxs("div", { className: `rounded-lg border p-4 ${severityColors[updateInfo.severity ?? 'patch']?.border ?? 'border-blue-200'} ${severityColors[updateInfo.severity ?? 'patch']?.bg ?? 'bg-blue-50'}`, children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx(ArrowUpCircle, { className: `w-6 h-6 mt-0.5 shrink-0 ${severityColors[updateInfo.severity ?? 'patch']?.text ?? 'text-blue-700'}` }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("h3", { className: `text-sm font-semibold ${severityColors[updateInfo.severity ?? 'patch']?.text ?? 'text-blue-700'}`, children: "Update Available" }), _jsx("span", { className: `inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${severityColors[updateInfo.severity ?? 'patch']?.bg ?? 'bg-blue-50'} ${severityColors[updateInfo.severity ?? 'patch']?.text ?? 'text-blue-700'} border ${severityColors[updateInfo.severity ?? 'patch']?.border ?? 'border-blue-200'}`, children: severityColors[updateInfo.severity ?? 'patch']?.label ?? 'Update' })] }), _jsxs("p", { className: "text-sm mt-1", style: { color: 'inherit' }, children: [_jsx("span", { className: "font-mono", children: updateInfo.current }), " \u2192", ' ', _jsx("span", { className: "font-mono font-semibold", children: updateInfo.latest }), updateInfo.releaseDate && (_jsxs("span", { className: "text-xs ml-2 opacity-70", children: ["Released ", updateInfo.releaseDate] }))] })] })] }), _jsxs("div", { className: "mt-4 flex items-center gap-3", children: [_jsx("button", { type: "button", onClick: applyUpdate, disabled: applying, className: "flex items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:opacity-50", children: applying ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "w-4 h-4 animate-spin" }), "Creating PR..."] })) : (_jsxs(_Fragment, { children: [_jsx(GitPullRequest, { className: "w-4 h-4" }), "Create Update PR"] })) }), _jsx("span", { className: "text-xs text-gray-500", children: "Opens a pull request on your repository" })] }), updateInfo.updateCommand && (_jsxs("div", { className: "mt-3 rounded border border-gray-200 bg-white p-3", children: [_jsx("p", { className: "text-xs text-gray-500 mb-1", children: "Or update manually:" }), _jsx("code", { className: "block text-xs font-mono text-gray-800 bg-gray-50 rounded px-2 py-1.5 select-all", children: updateInfo.updateCommand })] }))] }), updateInfo.changelog && updateInfo.changelog.length > 0 && (_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Changelog" }), _jsx("div", { className: "space-y-2 max-h-64 overflow-y-auto", children: updateInfo.changelog.map((entry) => (_jsxs("div", { className: "flex items-baseline gap-3 text-sm", children: [_jsx("span", { className: "font-mono text-xs text-gray-500 shrink-0 w-14", children: entry.version }), _jsx("span", { className: "text-xs text-gray-400 shrink-0 w-20", children: entry.date }), _jsx("span", { className: "text-gray-700", children: entry.summary })] }, entry.version))) })] }))] })), prResult && (_jsx("div", { className: "rounded-lg border border-green-200 bg-green-50 p-4", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx(GitPullRequest, { className: "w-5 h-5 text-green-600 mt-0.5 shrink-0" }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-green-900", children: "Pull Request Created" }), _jsxs("p", { className: "text-sm text-green-700 mt-1", children: ["PR #", prResult.prNumber, " has been created on your repository. Review and merge it to apply the update, then run", ' ', _jsx("code", { className: "text-xs font-mono bg-green-100 px-1 rounded", children: "npx prisma migrate deploy" }), "."] }), _jsxs("a", { href: prResult.prUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1.5 mt-2 text-sm font-medium text-green-700 hover:text-green-800", children: [_jsx(ExternalLink, { className: "w-4 h-4" }), "View Pull Request"] })] })] }) })), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-1", children: "GitHub Integration" }), _jsx("p", { className: "text-xs text-gray-500 mb-4", children: "Connect your repository to enable one-click update PRs. Credentials are encrypted at rest (AES-256-GCM)." }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Repository" }), _jsx("input", { type: "text", value: ghRepo, onChange: (e) => setGhRepo(e.target.value), placeholder: "owner/repo", className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" }), _jsxs("p", { className: "mt-1 text-xs text-gray-500", children: ["e.g.", ' ', _jsx("code", { className: "font-mono bg-gray-100 px-1 rounded", children: "actuate-media/my-client-site" })] })] }), _jsxs("div", { children: [_jsxs("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: ["GitHub Token", updateInfo?.hasGithubToken && !ghToken && (_jsx("span", { className: "ml-2 text-xs font-normal text-green-600", children: "Saved" }))] }), _jsx("div", { className: "flex gap-2", children: _jsxs("div", { className: "relative flex-1", children: [_jsx("input", { type: showGhToken ? 'text' : 'password', value: ghToken, onChange: (e) => setGhToken(e.target.value), placeholder: updateInfo?.hasGithubToken ? '••••••••••••••••' : 'ghp_... or github_pat_...', className: "w-full rounded-lg border border-gray-300 px-3 py-2 pr-10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" }), _jsx("button", { type: "button", onClick: () => setShowGhToken(!showGhToken), className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600", children: showGhToken ? _jsx(EyeOff, { className: "w-4 h-4" }) : _jsx(Eye, { className: "w-4 h-4" }) })] }) }), _jsxs("p", { className: "mt-1 text-xs text-gray-500", children: ["Needs ", _jsx("code", { className: "font-mono bg-gray-100 px-1 rounded", children: "repo" }), " scope. Create at", ' ', _jsx("a", { href: "https://github.com/settings/tokens", target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:underline", children: "github.com/settings/tokens" })] })] }), _jsx("button", { type: "button", onClick: saveGitHubConfig, disabled: savingConfig || (!ghToken && !ghRepo), className: "flex items-center gap-2 rounded-lg bg-gray-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-gray-800 disabled:opacity-50", children: savingConfig ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "w-4 h-4 animate-spin" }), "Encrypting & Saving..."] })) : ('Save Configuration') })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-4", children: [_jsx("h3", { className: "text-sm font-semibold text-gray-700 mb-2", children: "How Updates Work" }), _jsxs("ul", { className: "space-y-1.5 text-xs text-gray-600", children: [_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "w-4 h-4 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-[10px] font-bold shrink-0 mt-0.5", children: "1" }), _jsx("span", { children: "Click \"Check for Updates\" to see if a new version is available on npm." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "w-4 h-4 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-[10px] font-bold shrink-0 mt-0.5", children: "2" }), _jsx("span", { children: "Add your GitHub token and repository above. They're encrypted at rest \u2014 never stored in plaintext." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "w-4 h-4 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-[10px] font-bold shrink-0 mt-0.5", children: "3" }), _jsx("span", { children: "Click \"Create Update PR\" to open a pull request that bumps your CMS packages automatically." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "w-4 h-4 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-[10px] font-bold shrink-0 mt-0.5", children: "4" }), _jsxs("span", { children: ["Review and merge the PR, then deploy. Database migrations run automatically via", ' ', _jsx("code", { className: "font-mono bg-gray-200 px-1 rounded", children: "prisma migrate deploy" }), "."] })] })] })] })] }));
256
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Actuate CMS" }), _jsxs("p", { className: "mt-1 text-sm text-gray-600", children: ["Current version:", ' ', _jsx("span", { className: "font-mono font-medium", children: updateInfo?.current ?? '...' })] })] }), _jsxs("button", { type: "button", onClick: checkForUpdates, disabled: checking, className: "flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 disabled:opacity-50", children: [_jsx(RefreshCw, { className: `h-4 w-4 ${checking ? 'animate-spin' : ''}` }), checking ? 'Checking...' : 'Check for Updates'] })] }) }), checkError && (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "h-5 w-5 shrink-0 text-red-600" }), _jsx("span", { className: "flex-1 text-sm text-red-800", children: checkError }), _jsx("button", { onClick: checkForUpdates, className: "rounded-lg border border-red-300 px-3 py-1 text-sm text-red-700 transition-colors hover:bg-red-100", children: "Retry" })] })), hasChecked && updateInfo && !updateInfo.updateAvailable && !checkError && (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-green-200 bg-green-50 p-4", children: [_jsx(CheckCircle2, { className: "h-6 w-6 shrink-0 text-green-600" }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-green-900", children: "You're up to date!" }), _jsxs("p", { className: "mt-0.5 text-sm text-green-700", children: ["Actuate CMS ", _jsx("span", { className: "font-mono", children: updateInfo.current }), " is the latest version."] })] })] })), updateInfo?.updateAvailable && (_jsxs(_Fragment, { children: [_jsxs("div", { className: `rounded-lg border p-4 ${severityColors[updateInfo.severity ?? 'patch']?.border ?? 'border-blue-200'} ${severityColors[updateInfo.severity ?? 'patch']?.bg ?? 'bg-blue-50'}`, children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx(ArrowUpCircle, { className: `mt-0.5 h-6 w-6 shrink-0 ${severityColors[updateInfo.severity ?? 'patch']?.text ?? 'text-blue-700'}` }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("h3", { className: `text-sm font-semibold ${severityColors[updateInfo.severity ?? 'patch']?.text ?? 'text-blue-700'}`, children: "Update Available" }), _jsx("span", { className: `inline-flex items-center rounded px-2 py-0.5 text-xs font-medium ${severityColors[updateInfo.severity ?? 'patch']?.bg ?? 'bg-blue-50'} ${severityColors[updateInfo.severity ?? 'patch']?.text ?? 'text-blue-700'} border ${severityColors[updateInfo.severity ?? 'patch']?.border ?? 'border-blue-200'}`, children: severityColors[updateInfo.severity ?? 'patch']?.label ?? 'Update' })] }), _jsxs("p", { className: "mt-1 text-sm", style: { color: 'inherit' }, children: [_jsx("span", { className: "font-mono", children: updateInfo.current }), " \u2192", ' ', _jsx("span", { className: "font-mono font-semibold", children: updateInfo.latest }), updateInfo.releaseDate && (_jsxs("span", { className: "ml-2 text-xs opacity-70", children: ["Released ", updateInfo.releaseDate] }))] })] })] }), _jsxs("div", { className: "mt-4 flex items-center gap-3", children: [_jsx("button", { type: "button", onClick: applyUpdate, disabled: applying, className: "flex items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:opacity-50", children: applying ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), "Creating PR..."] })) : (_jsxs(_Fragment, { children: [_jsx(GitPullRequest, { className: "h-4 w-4" }), "Create Update PR"] })) }), _jsx("span", { className: "text-xs text-gray-500", children: "Opens a pull request on your repository" })] }), updateInfo.updateCommand && (_jsxs("div", { className: "mt-3 rounded border border-gray-200 bg-white p-3", children: [_jsx("p", { className: "mb-1 text-xs text-gray-500", children: "Or update manually:" }), _jsx("code", { className: "block rounded bg-gray-50 px-2 py-1.5 font-mono text-xs text-gray-800 select-all", children: updateInfo.updateCommand })] }))] }), updateInfo.changelog && updateInfo.changelog.length > 0 && (_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-3 text-sm font-semibold text-gray-900", children: "Changelog" }), _jsx("div", { className: "max-h-64 space-y-2 overflow-y-auto", children: updateInfo.changelog.map((entry) => (_jsxs("div", { className: "flex items-baseline gap-3 text-sm", children: [_jsx("span", { className: "w-14 shrink-0 font-mono text-xs text-gray-500", children: entry.version }), _jsx("span", { className: "w-20 shrink-0 text-xs text-gray-400", children: entry.date }), _jsx("span", { className: "text-gray-700", children: entry.summary })] }, entry.version))) })] }))] })), prResult && (_jsx("div", { className: "rounded-lg border border-green-200 bg-green-50 p-4", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx(GitPullRequest, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-green-900", children: "Pull Request Created" }), _jsxs("p", { className: "mt-1 text-sm text-green-700", children: ["PR #", prResult.prNumber, " has been created on your repository. Review and merge it to apply the update, then run", ' ', _jsx("code", { className: "rounded bg-green-100 px-1 font-mono text-xs", children: "npx prisma migrate deploy" }), "."] }), _jsxs("a", { href: prResult.prUrl, target: "_blank", rel: "noopener noreferrer", className: "mt-2 inline-flex items-center gap-1.5 text-sm font-medium text-green-700 hover:text-green-800", children: [_jsx(ExternalLink, { className: "h-4 w-4" }), "View Pull Request"] })] })] }) })), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("h3", { className: "mb-1 text-sm font-semibold text-gray-900", children: "GitHub Integration" }), _jsx("p", { className: "mb-4 text-xs text-gray-500", children: "Connect your repository to enable one-click update PRs. Credentials are encrypted at rest (AES-256-GCM)." }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Repository" }), _jsx("input", { type: "text", value: ghRepo, onChange: (e) => setGhRepo(e.target.value), placeholder: "owner/repo", className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" }), _jsxs("p", { className: "mt-1 text-xs text-gray-500", children: ["e.g.", ' ', _jsx("code", { className: "rounded bg-gray-100 px-1 font-mono", children: "actuate-media/my-client-site" })] })] }), _jsxs("div", { children: [_jsxs("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: ["GitHub Token", updateInfo?.hasGithubToken && !ghToken && (_jsx("span", { className: "ml-2 text-xs font-normal text-green-600", children: "Saved" }))] }), _jsx("div", { className: "flex gap-2", children: _jsxs("div", { className: "relative flex-1", children: [_jsx("input", { type: showGhToken ? 'text' : 'password', value: ghToken, onChange: (e) => setGhToken(e.target.value), placeholder: updateInfo?.hasGithubToken ? '••••••••••••••••' : 'ghp_... or github_pat_...', className: "w-full rounded-lg border border-gray-300 px-3 py-2 pr-10 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" }), _jsx("button", { type: "button", onClick: () => setShowGhToken(!showGhToken), className: "absolute top-1/2 right-2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600", children: showGhToken ? _jsx(EyeOff, { className: "h-4 w-4" }) : _jsx(Eye, { className: "h-4 w-4" }) })] }) }), _jsxs("p", { className: "mt-1 text-xs text-gray-500", children: ["Needs ", _jsx("code", { className: "rounded bg-gray-100 px-1 font-mono", children: "repo" }), " scope. Create at", ' ', _jsx("a", { href: "https://github.com/settings/tokens", target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:underline", children: "github.com/settings/tokens" })] })] }), _jsx("button", { type: "button", onClick: saveGitHubConfig, disabled: savingConfig || (!ghToken && !ghRepo), className: "flex items-center gap-2 rounded-lg bg-gray-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-gray-800 disabled:opacity-50", children: savingConfig ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), "Encrypting & Saving..."] })) : ('Save Configuration') })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-4", children: [_jsx("h3", { className: "mb-2 text-sm font-semibold text-gray-700", children: "How Updates Work" }), _jsxs("ul", { className: "space-y-1.5 text-xs text-gray-600", children: [_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-blue-100 text-[10px] font-bold text-blue-600", children: "1" }), _jsx("span", { children: "Click \"Check for Updates\" to see if a new version is available on npm." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-blue-100 text-[10px] font-bold text-blue-600", children: "2" }), _jsx("span", { children: "Add your GitHub token and repository above. They're encrypted at rest \u2014 never stored in plaintext." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-blue-100 text-[10px] font-bold text-blue-600", children: "3" }), _jsx("span", { children: "Click \"Create Update PR\" to open a pull request that bumps your CMS packages automatically." })] }), _jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-blue-100 text-[10px] font-bold text-blue-600", children: "4" }), _jsxs("span", { children: ["Review and merge the PR, then deploy. Database migrations run automatically via", ' ', _jsx("code", { className: "rounded bg-gray-200 px-1 font-mono", children: "prisma migrate deploy" }), "."] })] })] })] })] }));
256
257
  }
257
258
  //# sourceMappingURL=Settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../src/views/Settings.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,GAAG,EACH,GAAG,EACH,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,aAAa,EAEb,OAAO,EACP,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,cAAc,EACd,MAAM,GACP,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAOlE,MAAM,UAAU,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,KAAoB,EAAE;IAChE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,CAAM,mBAAmB,CAAC,CAAA;IAE9E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACpD,MAAM,CAAC,OAAO,EAAE,U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AS,EAAC,4BAA4B,uBACjC,eAAM,SAAS,EAAC,oCAAoC,qBAAY,uBACnE,GAAG,EACN,YACE,IAAI,EAAC,oCAAoC,EACzC,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,+BAA+B,2CAGvC,IACF,IACA,EAEN,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,YAAY,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,EAC/C,SAAS,EAAC,iJAAiJ,YAE1J,YAAY,CAAC,CAAC,CAAC,CACd,8BACE,KAAC,OAAO,IAAC,SAAS,EAAC,sBAAsB,GAAG,8BAE3C,CACJ,CAAC,CAAC,CAAC,CACF,oBAAoB,CACrB,GACM,IACL,IACF,EAGN,eAAK,SAAS,EAAC,kDAAkD,aAC/D,aAAI,SAAS,EAAC,0CAA0C,iCAAsB,EAC9E,cAAI,SAAS,EAAC,mCAAmC,aAC/C,cAAI,SAAS,EAAC,wBAAwB,aACpC,eAAM,SAAS,EAAC,uHAAuH,kBAEhI,EACP,sGAEO,IACJ,EACL,cAAI,SAAS,EAAC,wBAAwB,aACpC,eAAM,SAAS,EAAC,uHAAuH,kBAEhI,EACP,qIAGO,IACJ,EACL,cAAI,SAAS,EAAC,wBAAwB,aACpC,eAAM,SAAS,EAAC,uHAAuH,kBAEhI,EACP,2HAGO,IACJ,EACL,cAAI,SAAS,EAAC,wBAAwB,aACpC,eAAM,SAAS,EAAC,uHAAuH,kBAEhI,EACP,8GACkF,GAAG,EACnF,eAAM,SAAS,EAAC,oCAAoC,sCAA6B,SAC5E,IACJ,IACF,IACD,IACL,CACJ,CAAA;AACH,CAAC"}
@@ -61,8 +61,8 @@ export function SetupWizard({ onComplete, siteName = 'Actuate CMS' }) {
61
61
  }
62
62
  };
63
63
  if (done) {
64
- return (_jsx("div", { className: "min-h-screen flex items-center justify-center bg-gray-50 px-4", children: _jsxs("div", { className: "w-full max-w-md text-center", children: [_jsx("div", { className: "mx-auto mb-6 w-16 h-16 bg-green-100 rounded-full flex items-center justify-center", children: _jsx(CheckCircle2, { className: "w-8 h-8 text-green-600" }) }), _jsx("h1", { className: "text-2xl font-bold text-gray-900 mb-2", children: "Setup Complete" }), _jsx("p", { className: "text-gray-600 mb-6", children: "Your admin account has been created. You can now sign in to manage your content." }), _jsx("button", { onClick: () => window.location.reload(), className: "w-full px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium", children: "Go to Login" })] }) }));
64
+ return (_jsx("div", { className: "flex min-h-screen items-center justify-center bg-gray-50 px-4", children: _jsxs("div", { className: "w-full max-w-md text-center", children: [_jsx("div", { className: "mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-green-100", children: _jsx(CheckCircle2, { className: "h-8 w-8 text-green-600" }) }), _jsx("h1", { className: "mb-2 text-2xl font-bold text-gray-900", children: "Setup Complete" }), _jsx("p", { className: "mb-6 text-gray-600", children: "Your admin account has been created. You can now sign in to manage your content." }), _jsx("button", { onClick: () => window.location.reload(), className: "w-full rounded-lg bg-blue-600 px-6 py-3 font-medium text-white transition-colors hover:bg-blue-700", children: "Go to Login" })] }) }));
65
65
  }
66
- return (_jsx("div", { className: "min-h-screen flex items-center justify-center bg-gray-50 px-4", children: _jsxs("div", { className: "w-full max-w-md", children: [_jsxs("div", { className: "text-center mb-8", children: [_jsx("div", { className: "mx-auto mb-4 w-14 h-14 bg-blue-600 rounded-xl flex items-center justify-center", children: _jsx(Shield, { className: "w-7 h-7 text-white" }) }), _jsxs("h1", { className: "text-2xl font-bold text-gray-900", children: ["Welcome to ", siteName] }), _jsx("p", { className: "text-gray-600 mt-2", children: "Create your admin account to get started" })] }), _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 shadow-sm space-y-5", children: [error && (_jsxs("div", { className: "flex items-start gap-3 p-3 bg-red-50 border border-red-200 rounded-lg", children: [_jsx(AlertTriangle, { className: "w-5 h-5 text-red-600 mt-0.5 shrink-0" }), _jsx("p", { className: "text-sm text-red-800", children: error })] })), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-name", className: "block text-sm font-medium text-gray-700 mb-1.5", children: "Full Name" }), _jsx("input", { id: "setup-name", type: "text", value: name, onChange: (e) => setName(e.target.value), placeholder: "Jane Smith", className: "w-full px-3 py-2.5 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500", required: true, autoFocus: true, autoComplete: "name" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-email", className: "block text-sm font-medium text-gray-700 mb-1.5", children: "Email Address" }), _jsx("input", { id: "setup-email", type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: "admin@example.com", className: "w-full px-3 py-2.5 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500", required: true, autoComplete: "email" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-password", className: "block text-sm font-medium text-gray-700 mb-1.5", children: "Password" }), _jsxs("div", { className: "relative", children: [_jsx("input", { id: "setup-password", type: showPassword ? 'text' : 'password', value: password, onChange: (e) => setPassword(e.target.value), placeholder: "Minimum 12 characters", className: "w-full px-3 py-2.5 pr-10 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500", required: true, minLength: 12, autoComplete: "new-password" }), _jsx("button", { type: "button", onClick: () => setShowPassword(!showPassword), className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600", tabIndex: -1, children: showPassword ? _jsx(EyeOff, { className: "w-4 h-4" }) : _jsx(Eye, { className: "w-4 h-4" }) })] }), password && (_jsx("div", { className: "mt-2", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "flex-1 h-1.5 bg-gray-200 rounded-full overflow-hidden", children: _jsx("div", { className: `h-full rounded-full transition-all ${strength.color}`, style: { width: `${(strength.score / 6) * 100}%` } }) }), _jsx("span", { className: "text-xs text-gray-600", children: strength.label })] }) }))] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-confirm", className: "block text-sm font-medium text-gray-700 mb-1.5", children: "Confirm Password" }), _jsx("input", { id: "setup-confirm", type: showPassword ? 'text' : 'password', value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), placeholder: "Re-enter your password", className: `w-full px-3 py-2.5 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 ${confirmPassword && !passwordsMatch ? 'border-red-300' : 'border-gray-300'}`, required: true, autoComplete: "new-password" }), confirmPassword && !passwordsMatch && (_jsx("p", { className: "text-xs text-red-600 mt-1", children: "Passwords do not match" }))] }), _jsx("button", { type: "submit", disabled: !canSubmit, className: "w-full py-2.5 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed", children: submitting ? 'Creating Account...' : 'Create Admin Account' }), _jsx("p", { className: "text-xs text-gray-500 text-center", children: "This form is only available during initial setup. Once an admin account exists, it will be replaced by the login screen." })] })] }) }));
66
+ return (_jsx("div", { className: "flex min-h-screen items-center justify-center bg-gray-50 px-4", children: _jsxs("div", { className: "w-full max-w-md", children: [_jsxs("div", { className: "mb-8 text-center", children: [_jsx("div", { className: "mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-xl bg-blue-600", children: _jsx(Shield, { className: "h-7 w-7 text-white" }) }), _jsxs("h1", { className: "text-2xl font-bold text-gray-900", children: ["Welcome to ", siteName] }), _jsx("p", { className: "mt-2 text-gray-600", children: "Create your admin account to get started" })] }), _jsxs("form", { onSubmit: handleSubmit, className: "space-y-5 rounded-xl border border-gray-200 bg-white p-6 shadow-sm", children: [error && (_jsxs("div", { className: "flex items-start gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0 text-red-600" }), _jsx("p", { className: "text-sm text-red-800", children: error })] })), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-name", className: "mb-1.5 block text-sm font-medium text-gray-700", children: "Full Name" }), _jsx("input", { id: "setup-name", type: "text", value: name, onChange: (e) => setName(e.target.value), placeholder: "Jane Smith", className: "w-full rounded-lg border border-gray-300 px-3 py-2.5 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none", required: true, autoFocus: true, autoComplete: "name" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-email", className: "mb-1.5 block text-sm font-medium text-gray-700", children: "Email Address" }), _jsx("input", { id: "setup-email", type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: "admin@example.com", className: "w-full rounded-lg border border-gray-300 px-3 py-2.5 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none", required: true, autoComplete: "email" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-password", className: "mb-1.5 block text-sm font-medium text-gray-700", children: "Password" }), _jsxs("div", { className: "relative", children: [_jsx("input", { id: "setup-password", type: showPassword ? 'text' : 'password', value: password, onChange: (e) => setPassword(e.target.value), placeholder: "Minimum 12 characters", className: "w-full rounded-lg border border-gray-300 px-3 py-2.5 pr-10 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none", required: true, minLength: 12, autoComplete: "new-password" }), _jsx("button", { type: "button", onClick: () => setShowPassword(!showPassword), className: "absolute top-1/2 right-3 -translate-y-1/2 text-gray-400 hover:text-gray-600", tabIndex: -1, children: showPassword ? _jsx(EyeOff, { className: "h-4 w-4" }) : _jsx(Eye, { className: "h-4 w-4" }) })] }), password && (_jsx("div", { className: "mt-2", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-1.5 flex-1 overflow-hidden rounded-full bg-gray-200", children: _jsx("div", { className: `h-full rounded-full transition-all ${strength.color}`, style: { width: `${(strength.score / 6) * 100}%` } }) }), _jsx("span", { className: "text-xs text-gray-600", children: strength.label })] }) }))] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-confirm", className: "mb-1.5 block text-sm font-medium text-gray-700", children: "Confirm Password" }), _jsx("input", { id: "setup-confirm", type: showPassword ? 'text' : 'password', value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), placeholder: "Re-enter your password", className: `w-full rounded-lg border px-3 py-2.5 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none ${confirmPassword && !passwordsMatch ? 'border-red-300' : 'border-gray-300'}`, required: true, autoComplete: "new-password" }), confirmPassword && !passwordsMatch && (_jsx("p", { className: "mt-1 text-xs text-red-600", children: "Passwords do not match" }))] }), _jsx("button", { type: "submit", disabled: !canSubmit, className: "w-full rounded-lg bg-blue-600 py-2.5 font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-50", children: submitting ? 'Creating Account...' : 'Create Admin Account' }), _jsx("p", { className: "text-center text-xs text-gray-500", children: "This form is only available during initial setup. Once an admin account exists, it will be replaced by the login screen." })] })] }) }));
67
67
  }
68
68
  //# sourceMappingURL=SetupWizard.js.map
@@ -55,17 +55,17 @@ export function Users({ onNavigate }) {
55
55
  };
56
56
  function SortHeader({ label, sortKey }) {
57
57
  const active = sortConfig?.key === sortKey;
58
- return (_jsxs("button", { type: "button", onClick: () => setSortConfig(toggleSort(sortConfig, sortKey)), className: "flex items-center gap-1 text-xs font-medium text-gray-700 hover:text-gray-900 transition-colors", children: [label, active ? (sortConfig.direction === 'asc' ? (_jsx(ArrowUp, { className: "w-3 h-3" })) : (_jsx(ArrowDown, { className: "w-3 h-3" }))) : (_jsx(ArrowUpDown, { className: "w-3 h-3 text-gray-400" }))] }));
58
+ return (_jsxs("button", { type: "button", onClick: () => setSortConfig(toggleSort(sortConfig, sortKey)), className: "flex items-center gap-1 text-xs font-medium text-gray-700 transition-colors hover:text-gray-900", children: [label, active ? (sortConfig.direction === 'asc' ? (_jsx(ArrowUp, { className: "h-3 w-3" })) : (_jsx(ArrowDown, { className: "h-3 w-3" }))) : (_jsx(ArrowUpDown, { className: "h-3 w-3 text-gray-400" }))] }));
59
59
  }
60
60
  if (loading) {
61
- return (_jsx("div", { className: "p-3 pr-6 sm:p-4 sm:pr-8 flex items-center justify-center h-64", children: _jsx(Loader2, { className: "w-6 h-6 animate-spin text-blue-600" }) }));
61
+ return (_jsx("div", { className: "flex h-64 items-center justify-center p-3 pr-6 sm:p-4 sm:pr-8", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-blue-600" }) }));
62
62
  }
63
- return (_jsxs("div", { className: "p-3 pr-6 sm:p-4 sm:pr-8", children: [error && (_jsxs("div", { className: "mb-4 flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "w-5 h-5 text-red-600 shrink-0" }), _jsx("span", { className: "text-sm text-red-800 flex-1", children: error }), _jsx("button", { onClick: refetch, className: "px-3 py-1 text-sm text-red-700 border border-red-300 rounded-lg hover:bg-red-100 transition-colors", children: "Retry" })] })), _jsxs("div", { className: "mb-4 flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "mb-1 text-2xl font-semibold text-gray-900", children: "Users" }), _jsxs("p", { className: "text-sm text-gray-600", children: [filteredAndSorted.length, " total users"] })] }), _jsxs("button", { type: "button", onClick: () => setShowInviteDialog(true), className: "flex items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700", children: [_jsx(UserPlus, { className: "h-4 w-4" }), "Invite User"] })] }), _jsx("div", { className: "bg-white rounded-lg border border-gray-200 mb-4", children: _jsxs("div", { className: "p-3 flex flex-col sm:flex-row gap-3", children: [_jsxs("div", { className: "relative flex-1", children: [_jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }), _jsx("input", { type: "text", placeholder: "Search users by name or email...", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), className: "w-full pl-9 pr-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" })] }), _jsxs("select", { value: filterRole, onChange: (e) => setFilterRole(e.target.value), className: "px-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "all", children: "All Roles" }), _jsx("option", { value: "admin", children: "Admin" }), _jsx("option", { value: "editor", children: "Editor" }), _jsx("option", { value: "author", children: "Author" }), _jsx("option", { value: "client", children: "Client" })] })] }) }), filteredAndSorted.length === 0 && !loading ? (_jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [_jsx("div", { className: "w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-4", children: _jsx(UserPlus, { className: "w-6 h-6 text-gray-400" }) }), _jsx("h3", { className: "text-sm font-medium text-gray-900 mb-1", children: "No users yet" }), _jsx("p", { className: "text-sm text-gray-500", children: "Invite your first user to get started." })] })) : (_jsx("div", { className: "rounded-lg border border-gray-200 bg-white", children: _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "border-b border-gray-200 bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "User", sortKey: "name" }) }), _jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "Role", sortKey: "role" }) }), _jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "Status", sortKey: "status" }) }), _jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "Last Active", sortKey: "lastLogin" }) }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Actions" })] }) }), _jsx("tbody", { className: "divide-y divide-gray-200", children: filteredAndSorted.map((user) => (_jsxs("tr", { className: "transition-colors hover:bg-gray-50", children: [_jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-linear-to-br from-blue-500 to-purple-600 text-sm font-medium text-white", children: user.name.charAt(0) }), _jsxs("div", { children: [_jsx("div", { className: "text-sm font-medium text-gray-900", children: user.name }), _jsx("div", { className: "text-xs text-gray-600", children: user.email })] })] }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${user.role === 'Admin'
63
+ return (_jsxs("div", { className: "p-3 pr-6 sm:p-4 sm:pr-8", children: [error && (_jsxs("div", { className: "mb-4 flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "h-5 w-5 shrink-0 text-red-600" }), _jsx("span", { className: "flex-1 text-sm text-red-800", children: error }), _jsx("button", { onClick: refetch, className: "rounded-lg border border-red-300 px-3 py-1 text-sm text-red-700 transition-colors hover:bg-red-100", children: "Retry" })] })), _jsxs("div", { className: "mb-4 flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "mb-1 text-2xl font-semibold text-gray-900", children: "Users" }), _jsxs("p", { className: "text-sm text-gray-600", children: [filteredAndSorted.length, " total users"] })] }), _jsxs("button", { type: "button", onClick: () => setShowInviteDialog(true), className: "flex items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700", children: [_jsx(UserPlus, { className: "h-4 w-4" }), "Invite User"] })] }), _jsx("div", { className: "mb-4 rounded-lg border border-gray-200 bg-white", children: _jsxs("div", { className: "flex flex-col gap-3 p-3 sm:flex-row", children: [_jsxs("div", { className: "relative flex-1", children: [_jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-gray-400" }), _jsx("input", { type: "text", placeholder: "Search users by name or email...", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), className: "w-full rounded-lg border border-gray-300 py-2 pr-3 pl-9 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" })] }), _jsxs("select", { value: filterRole, onChange: (e) => setFilterRole(e.target.value), className: "rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", children: [_jsx("option", { value: "all", children: "All Roles" }), _jsx("option", { value: "admin", children: "Admin" }), _jsx("option", { value: "editor", children: "Editor" }), _jsx("option", { value: "author", children: "Author" }), _jsx("option", { value: "client", children: "Client" })] })] }) }), filteredAndSorted.length === 0 && !loading ? (_jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [_jsx("div", { className: "mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-gray-100", children: _jsx(UserPlus, { className: "h-6 w-6 text-gray-400" }) }), _jsx("h3", { className: "mb-1 text-sm font-medium text-gray-900", children: "No users yet" }), _jsx("p", { className: "text-sm text-gray-500", children: "Invite your first user to get started." })] })) : (_jsx("div", { className: "rounded-lg border border-gray-200 bg-white", children: _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "border-b border-gray-200 bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "User", sortKey: "name" }) }), _jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "Role", sortKey: "role" }) }), _jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "Status", sortKey: "status" }) }), _jsx("th", { className: "px-4 py-2 text-left", children: _jsx(SortHeader, { label: "Last Active", sortKey: "lastLogin" }) }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Actions" })] }) }), _jsx("tbody", { className: "divide-y divide-gray-200", children: filteredAndSorted.map((user) => (_jsxs("tr", { className: "transition-colors hover:bg-gray-50", children: [_jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-linear-to-br from-blue-500 to-purple-600 text-sm font-medium text-white", children: user.name.charAt(0) }), _jsxs("div", { children: [_jsx("div", { className: "text-sm font-medium text-gray-900", children: user.name }), _jsx("div", { className: "text-xs text-gray-600", children: user.email })] })] }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${user.role === 'Admin'
64
64
  ? 'bg-purple-100 text-purple-800'
65
65
  : user.role === 'Editor'
66
66
  ? 'bg-blue-100 text-blue-800'
67
67
  : 'bg-gray-100 text-gray-800'}`, children: user.role }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${user.status === 'Active'
68
68
  ? 'bg-green-100 text-green-800'
69
- : 'bg-gray-100 text-gray-800'}`, children: user.status }) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: user.lastLogin }), _jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { type: "button", onClick: () => onNavigate?.(`/users/${user.id}`), className: "rounded p-1.5 transition-colors hover:bg-gray-100", "aria-label": `Edit ${user.name}`, children: _jsx(Pencil, { className: "h-4 w-4 text-gray-600" }) }), _jsx("button", { type: "button", onClick: () => handleDelete(user.id), className: "rounded p-1.5 transition-colors hover:bg-gray-100", "aria-label": `Remove ${user.name}`, children: _jsx(Trash2, { className: "h-4 w-4 text-red-600" }) })] }) })] }, user.id))) })] }) }) })), _jsx(Dialog.Root, { open: showInviteDialog, onOpenChange: setShowInviteDialog, children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-black/50" }), _jsxs(Dialog.Content, { className: "fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-lg", children: [_jsx(Dialog.Title, { className: "mb-4 text-lg font-semibold text-gray-900", children: "Invite User" }), _jsxs("form", { onSubmit: handleInvite, className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Email Address" }), _jsx("input", { type: "email", value: inviteEmail, onChange: (e) => setInviteEmail(e.target.value), placeholder: "user@example.com", className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500", required: true })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Role" }), _jsxs("select", { value: inviteRole, onChange: (e) => setInviteRole(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "viewer", children: "Viewer" }), _jsx("option", { value: "editor", children: "Editor" }), _jsx("option", { value: "admin", children: "Admin" })] })] }), _jsxs("div", { className: "flex items-center justify-end gap-3 pt-4", children: [_jsx(Dialog.Close, { asChild: true, children: _jsx("button", { type: "button", className: "rounded-lg border border-gray-300 px-4 py-2 text-sm transition-colors hover:bg-gray-50", children: "Cancel" }) }), _jsx("button", { type: "submit", className: "rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700", children: "Send Invite" })] })] })] })] }) })] }));
69
+ : 'bg-gray-100 text-gray-800'}`, children: user.status }) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: user.lastLogin }), _jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { type: "button", onClick: () => onNavigate?.(`/users/${user.id}`), className: "rounded p-1.5 transition-colors hover:bg-gray-100", "aria-label": `Edit ${user.name}`, children: _jsx(Pencil, { className: "h-4 w-4 text-gray-600" }) }), _jsx("button", { type: "button", onClick: () => handleDelete(user.id), className: "rounded p-1.5 transition-colors hover:bg-gray-100", "aria-label": `Remove ${user.name}`, children: _jsx(Trash2, { className: "h-4 w-4 text-red-600" }) })] }) })] }, user.id))) })] }) }) })), _jsx(Dialog.Root, { open: showInviteDialog, onOpenChange: setShowInviteDialog, children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-black/50" }), _jsxs(Dialog.Content, { className: "fixed top-1/2 left-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-lg", children: [_jsx(Dialog.Title, { className: "mb-4 text-lg font-semibold text-gray-900", children: "Invite User" }), _jsxs("form", { onSubmit: handleInvite, className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Email Address" }), _jsx("input", { type: "email", value: inviteEmail, onChange: (e) => setInviteEmail(e.target.value), placeholder: "user@example.com", className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", required: true })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Role" }), _jsxs("select", { value: inviteRole, onChange: (e) => setInviteRole(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", children: [_jsx("option", { value: "viewer", children: "Viewer" }), _jsx("option", { value: "editor", children: "Editor" }), _jsx("option", { value: "admin", children: "Admin" })] })] }), _jsxs("div", { className: "flex items-center justify-end gap-3 pt-4", children: [_jsx(Dialog.Close, { asChild: true, children: _jsx("button", { type: "button", className: "rounded-lg border border-gray-300 px-4 py-2 text-sm transition-colors hover:bg-gray-50", children: "Cancel" }) }), _jsx("button", { type: "submit", className: "rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700", children: "Send Invite" })] })] })] })] }) })] }));
70
70
  }
71
71
  //# sourceMappingURL=Users.js.map
@@ -35,6 +35,6 @@ export function AIBlockAssist({ block, pageTitle, businessName, onUpdateData, })
35
35
  setGenerating(false);
36
36
  }
37
37
  }, [block, pageTitle, businessName, onUpdateData]);
38
- return (_jsxs("button", { onClick: handleGenerate, disabled: generating, className: "flex items-center gap-1.5 px-2.5 py-1 text-xs text-primary hover:bg-primary/10 rounded-md transition-colors disabled:opacity-50", title: "Generate content with AI", children: [generating ? _jsx(Loader2, { size: 12, className: "animate-spin" }) : _jsx(Sparkles, { size: 12 }), generating ? 'Generating...' : 'AI Fill'] }));
38
+ return (_jsxs("button", { onClick: handleGenerate, disabled: generating, className: "text-primary hover:bg-primary/10 flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-50", title: "Generate content with AI", children: [generating ? _jsx(Loader2, { size: 12, className: "animate-spin" }) : _jsx(Sparkles, { size: 12 }), generating ? 'Generating...' : 'AI Fill'] }));
39
39
  }
40
40
  //# sourceMappingURL=AIBlockAssist.js.map
@@ -147,27 +147,27 @@ export function AIGenerateDialog({ open, onClose, onAccept }) {
147
147
  }, [result, onAccept, handleClose]);
148
148
  if (!open)
149
149
  return null;
150
- return (_jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [_jsx("div", { className: "absolute inset-0 bg-black/50", onClick: handleClose }), _jsxs("div", { className: "relative bg-card rounded-xl shadow-2xl border border-border w-full max-w-2xl max-h-[85vh] overflow-hidden flex flex-col", children: [_jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "p-1.5 rounded-lg bg-primary/10", children: _jsx(Sparkles, { size: 18, className: "text-primary" }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-base font-medium text-foreground", children: "AI Page Generator" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Describe your page and let AI build it" })] })] }), _jsx("button", { onClick: handleClose, className: "p-1.5 rounded-md hover:bg-muted transition-colors", "aria-label": "Close", children: _jsx(X, { size: 16, className: "text-muted-foreground" }) })] }), _jsxs("div", { className: "flex-1 overflow-y-auto p-6", children: [phase === 'prompt' && (_jsxs("div", { className: "space-y-5", children: [error && (_jsxs("div", { className: "flex items-start gap-2.5 p-3 rounded-lg bg-destructive/5 border border-destructive/20", children: [_jsx(AlertTriangle, { size: 16, className: "text-destructive shrink-0 mt-0.5" }), _jsx("p", { className: "text-sm text-destructive", children: error })] })), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-foreground mb-1.5", children: "Describe your page" }), _jsx("textarea", { value: prompt, onChange: (e) => setPrompt(e.target.value), placeholder: "e.g. A landing page for a plumbing company with a hero section, service cards, testimonials, and a contact form", rows: 4, className: "w-full px-3 py-2.5 text-sm bg-background border border-border rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-primary/40 text-foreground placeholder:text-muted-foreground", autoFocus: true })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-foreground mb-1.5", children: "Tone" }), _jsx("div", { className: "flex flex-wrap gap-2", children: TONES.map((t) => (_jsx("button", { onClick: () => setTone(t.value), className: `px-3 py-1.5 text-xs rounded-full border transition-colors ${tone === t.value
150
+ return (_jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [_jsx("div", { className: "absolute inset-0 bg-black/50", onClick: handleClose }), _jsxs("div", { className: "bg-card border-border relative flex max-h-[85vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border shadow-2xl", children: [_jsxs("div", { className: "border-border flex items-center justify-between border-b px-6 py-4", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "bg-primary/10 rounded-lg p-1.5", children: _jsx(Sparkles, { size: 18, className: "text-primary" }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-foreground text-base font-medium", children: "AI Page Generator" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Describe your page and let AI build it" })] })] }), _jsx("button", { onClick: handleClose, className: "hover:bg-muted rounded-md p-1.5 transition-colors", "aria-label": "Close", children: _jsx(X, { size: 16, className: "text-muted-foreground" }) })] }), _jsxs("div", { className: "flex-1 overflow-y-auto p-6", children: [phase === 'prompt' && (_jsxs("div", { className: "space-y-5", children: [error && (_jsxs("div", { className: "bg-destructive/5 border-destructive/20 flex items-start gap-2.5 rounded-lg border p-3", children: [_jsx(AlertTriangle, { size: 16, className: "text-destructive mt-0.5 shrink-0" }), _jsx("p", { className: "text-destructive text-sm", children: error })] })), _jsxs("div", { children: [_jsx("label", { className: "text-foreground mb-1.5 block text-sm font-medium", children: "Describe your page" }), _jsx("textarea", { value: prompt, onChange: (e) => setPrompt(e.target.value), placeholder: "e.g. A landing page for a plumbing company with a hero section, service cards, testimonials, and a contact form", rows: 4, className: "bg-background border-border focus:ring-primary/40 text-foreground placeholder:text-muted-foreground w-full resize-none rounded-lg border px-3 py-2.5 text-sm focus:ring-2 focus:outline-none", autoFocus: true })] }), _jsxs("div", { children: [_jsx("label", { className: "text-foreground mb-1.5 block text-sm font-medium", children: "Tone" }), _jsx("div", { className: "flex flex-wrap gap-2", children: TONES.map((t) => (_jsx("button", { onClick: () => setTone(t.value), className: `rounded-full border px-3 py-1.5 text-xs transition-colors ${tone === t.value
151
151
  ? 'border-primary bg-primary/10 text-primary'
152
- : 'border-border bg-background text-muted-foreground hover:border-primary/40'}`, children: t.label }, t.value))) })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-foreground mb-1.5", children: "Generation steps" }), _jsx("div", { className: "space-y-1.5", children: ALL_STEPS.map((step) => (_jsxs("label", { className: `flex items-center gap-3 p-2.5 rounded-lg border transition-colors cursor-pointer ${enabledSteps.has(step.key)
152
+ : 'border-border bg-background text-muted-foreground hover:border-primary/40'}`, children: t.label }, t.value))) })] }), _jsxs("div", { children: [_jsx("label", { className: "text-foreground mb-1.5 block text-sm font-medium", children: "Generation steps" }), _jsx("div", { className: "space-y-1.5", children: ALL_STEPS.map((step) => (_jsxs("label", { className: `flex cursor-pointer items-center gap-3 rounded-lg border p-2.5 transition-colors ${enabledSteps.has(step.key)
153
153
  ? 'border-primary/30 bg-primary/5'
154
- : 'border-border bg-background'} ${step.key === 'structure' ? 'opacity-70 cursor-not-allowed' : 'hover:border-primary/20'}`, children: [_jsx("input", { type: "checkbox", checked: enabledSteps.has(step.key), onChange: () => toggleStep(step.key), disabled: step.key === 'structure', className: "sr-only" }), _jsx("div", { className: `w-5 h-5 rounded flex items-center justify-center shrink-0 ${enabledSteps.has(step.key)
154
+ : 'border-border bg-background'} ${step.key === 'structure' ? 'cursor-not-allowed opacity-70' : 'hover:border-primary/20'}`, children: [_jsx("input", { type: "checkbox", checked: enabledSteps.has(step.key), onChange: () => toggleStep(step.key), disabled: step.key === 'structure', className: "sr-only" }), _jsx("div", { className: `flex h-5 w-5 shrink-0 items-center justify-center rounded ${enabledSteps.has(step.key)
155
155
  ? 'bg-primary text-white'
156
- : 'bg-muted border border-border'}`, children: enabledSteps.has(step.key) && _jsx(Check, { size: 12 }) }), _jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [_jsx("span", { className: "text-muted-foreground", children: step.icon }), _jsxs("div", { children: [_jsx("span", { className: "text-sm text-foreground", children: step.label }), _jsx("span", { className: "text-xs text-muted-foreground ml-2", children: step.description })] })] })] }, step.key))) })] }), _jsxs("div", { children: [_jsxs("button", { onClick: () => setShowContext(!showContext), className: "flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors", children: [showContext ? _jsx(ChevronUp, { size: 14 }) : _jsx(ChevronDown, { size: 14 }), "Business context (optional)"] }), showContext && (_jsxs("div", { className: "mt-3 space-y-3 p-4 bg-muted/50 rounded-lg border border-border", children: [_jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-xs text-muted-foreground mb-1", children: "Business name" }), _jsx("input", { type: "text", value: businessName, onChange: (e) => setBusiness(e.target.value), className: "w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary/40 text-foreground" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-xs text-muted-foreground mb-1", children: "Industry" }), _jsx("input", { type: "text", value: industry, onChange: (e) => setIndustry(e.target.value), className: "w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary/40 text-foreground" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-xs text-muted-foreground mb-1", children: "Phone" }), _jsx("input", { type: "text", value: phone, onChange: (e) => setPhone(e.target.value), className: "w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary/40 text-foreground" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-xs text-muted-foreground mb-1", children: "Address" }), _jsx("input", { type: "text", value: address, onChange: (e) => setAddress(e.target.value), className: "w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary/40 text-foreground" })] })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-xs text-muted-foreground mb-1", children: "Services (comma-separated)" }), _jsx("input", { type: "text", value: services, onChange: (e) => setServices(e.target.value), placeholder: "e.g. Web design, SEO, Content marketing", className: "w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary/40 text-foreground placeholder:text-muted-foreground" })] })] }))] })] })), phase === 'generating' && (_jsxs("div", { className: "py-8 space-y-6", children: [_jsxs("div", { className: "text-center", children: [_jsx(Loader2, { size: 32, className: "animate-spin text-primary mx-auto mb-3" }), _jsx("p", { className: "text-sm font-medium text-foreground", children: stepMessage || 'Generating...' }), _jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "This may take 15-30 seconds" })] }), _jsx("div", { className: "space-y-2", children: ALL_STEPS.filter((s) => enabledSteps.has(s.key)).map((step) => {
156
+ : 'bg-muted border-border border'}`, children: enabledSteps.has(step.key) && _jsx(Check, { size: 12 }) }), _jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground", children: step.icon }), _jsxs("div", { children: [_jsx("span", { className: "text-foreground text-sm", children: step.label }), _jsx("span", { className: "text-muted-foreground ml-2 text-xs", children: step.description })] })] })] }, step.key))) })] }), _jsxs("div", { children: [_jsxs("button", { onClick: () => setShowContext(!showContext), className: "text-muted-foreground hover:text-foreground flex items-center gap-1.5 text-sm transition-colors", children: [showContext ? _jsx(ChevronUp, { size: 14 }) : _jsx(ChevronDown, { size: 14 }), "Business context (optional)"] }), showContext && (_jsxs("div", { className: "bg-muted/50 border-border mt-3 space-y-3 rounded-lg border p-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsx("label", { className: "text-muted-foreground mb-1 block text-xs", children: "Business name" }), _jsx("input", { type: "text", value: businessName, onChange: (e) => setBusiness(e.target.value), className: "bg-background border-border focus:ring-primary/40 text-foreground w-full rounded-md border px-2.5 py-1.5 text-sm focus:ring-2 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { className: "text-muted-foreground mb-1 block text-xs", children: "Industry" }), _jsx("input", { type: "text", value: industry, onChange: (e) => setIndustry(e.target.value), className: "bg-background border-border focus:ring-primary/40 text-foreground w-full rounded-md border px-2.5 py-1.5 text-sm focus:ring-2 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { className: "text-muted-foreground mb-1 block text-xs", children: "Phone" }), _jsx("input", { type: "text", value: phone, onChange: (e) => setPhone(e.target.value), className: "bg-background border-border focus:ring-primary/40 text-foreground w-full rounded-md border px-2.5 py-1.5 text-sm focus:ring-2 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { className: "text-muted-foreground mb-1 block text-xs", children: "Address" }), _jsx("input", { type: "text", value: address, onChange: (e) => setAddress(e.target.value), className: "bg-background border-border focus:ring-primary/40 text-foreground w-full rounded-md border px-2.5 py-1.5 text-sm focus:ring-2 focus:outline-none" })] })] }), _jsxs("div", { children: [_jsx("label", { className: "text-muted-foreground mb-1 block text-xs", children: "Services (comma-separated)" }), _jsx("input", { type: "text", value: services, onChange: (e) => setServices(e.target.value), placeholder: "e.g. Web design, SEO, Content marketing", className: "bg-background border-border focus:ring-primary/40 text-foreground placeholder:text-muted-foreground w-full rounded-md border px-2.5 py-1.5 text-sm focus:ring-2 focus:outline-none" })] })] }))] })] })), phase === 'generating' && (_jsxs("div", { className: "space-y-6 py-8", children: [_jsxs("div", { className: "text-center", children: [_jsx(Loader2, { size: 32, className: "text-primary mx-auto mb-3 animate-spin" }), _jsx("p", { className: "text-foreground text-sm font-medium", children: stepMessage || 'Generating...' }), _jsx("p", { className: "text-muted-foreground mt-1 text-xs", children: "This may take 15-30 seconds" })] }), _jsx("div", { className: "space-y-2", children: ALL_STEPS.filter((s) => enabledSteps.has(s.key)).map((step) => {
157
157
  const isComplete = completedSteps.includes(step.key);
158
158
  const isCurrent = currentStep === step.key;
159
- return (_jsxs("div", { className: `flex items-center gap-3 p-3 rounded-lg border transition-colors ${isComplete
159
+ return (_jsxs("div", { className: `flex items-center gap-3 rounded-lg border p-3 transition-colors ${isComplete
160
160
  ? 'border-primary/30 bg-primary/5'
161
161
  : isCurrent
162
162
  ? 'border-primary/50 bg-primary/10'
163
- : 'border-border bg-muted/30'}`, children: [_jsx("div", { className: "w-6 h-6 rounded-full flex items-center justify-center shrink-0", children: isComplete ? (_jsx("div", { className: "w-6 h-6 rounded-full bg-primary flex items-center justify-center", children: _jsx(Check, { size: 12, className: "text-white" }) })) : isCurrent ? (_jsx(Loader2, { size: 16, className: "animate-spin text-primary" })) : (_jsx("div", { className: "w-6 h-6 rounded-full bg-muted border border-border" })) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground", children: step.icon }), _jsx("span", { className: `text-sm ${isCurrent || isComplete ? 'text-foreground' : 'text-muted-foreground'}`, children: step.label })] })] }, step.key));
164
- }) })] })), phase === 'review' && result && (_jsxs("div", { className: "space-y-5", children: [_jsxs("div", { className: "flex items-center gap-3 p-4 rounded-lg bg-primary/5 border border-primary/20", children: [_jsx("div", { className: "w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center shrink-0", children: _jsx(Sparkles, { size: 18, className: "text-primary" }) }), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium text-foreground", children: "Page generated successfully" }), _jsxs("p", { className: "text-xs text-muted-foreground mt-0.5", children: [result.totalTokensUsed.toLocaleString(), " tokens", ' \u00B7 ', (result.totalDurationMs / 1000).toFixed(1), "s", ' \u00B7 ', result.steps.length, " step", result.steps.length !== 1 ? 's' : ''] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("h3", { className: "text-sm font-medium text-foreground", children: "Generation steps" }), result.steps.map((step) => {
163
+ : 'border-border bg-muted/30'}`, children: [_jsx("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full", children: isComplete ? (_jsx("div", { className: "bg-primary flex h-6 w-6 items-center justify-center rounded-full", children: _jsx(Check, { size: 12, className: "text-white" }) })) : isCurrent ? (_jsx(Loader2, { size: 16, className: "text-primary animate-spin" })) : (_jsx("div", { className: "bg-muted border-border h-6 w-6 rounded-full border" })) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground", children: step.icon }), _jsx("span", { className: `text-sm ${isCurrent || isComplete ? 'text-foreground' : 'text-muted-foreground'}`, children: step.label })] })] }, step.key));
164
+ }) })] })), phase === 'review' && result && (_jsxs("div", { className: "space-y-5", children: [_jsxs("div", { className: "bg-primary/5 border-primary/20 flex items-center gap-3 rounded-lg border p-4", children: [_jsx("div", { className: "bg-primary/10 flex h-10 w-10 shrink-0 items-center justify-center rounded-full", children: _jsx(Sparkles, { size: 18, className: "text-primary" }) }), _jsxs("div", { children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: "Page generated successfully" }), _jsxs("p", { className: "text-muted-foreground mt-0.5 text-xs", children: [result.totalTokensUsed.toLocaleString(), " tokens", ' \u00B7 ', (result.totalDurationMs / 1000).toFixed(1), "s", ' \u00B7 ', result.steps.length, " step", result.steps.length !== 1 ? 's' : ''] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("h3", { className: "text-foreground text-sm font-medium", children: "Generation steps" }), result.steps.map((step) => {
165
165
  const info = ALL_STEPS.find((s) => s.key === step.step);
166
166
  const isExpanded = expandedStep === step.step;
167
- return (_jsxs("div", { className: "rounded-lg border border-border overflow-hidden", children: [_jsxs("button", { onClick: () => setExpandedStep(isExpanded ? null : step.step), className: "w-full flex items-center gap-3 p-3 hover:bg-muted/50 transition-colors text-left", children: [_jsx("div", { className: "w-6 h-6 rounded-full bg-primary flex items-center justify-center shrink-0", children: _jsx(Check, { size: 12, className: "text-white" }) }), _jsx("span", { className: "text-muted-foreground", children: info?.icon }), _jsx("span", { className: "text-sm text-foreground flex-1", children: info?.label }), _jsxs("span", { className: "text-xs text-muted-foreground", children: [(step.metadata.durationMs / 1000).toFixed(1), "s"] }), isExpanded ? (_jsx(ChevronUp, { size: 14, className: "text-muted-foreground" })) : (_jsx(ChevronDown, { size: 14, className: "text-muted-foreground" }))] }), isExpanded && (_jsxs("div", { className: "px-3 pb-3 border-t border-border pt-2", children: [_jsx("ul", { className: "space-y-1", children: step.metadata.changes.map((change, i) => (_jsxs("li", { className: "flex items-start gap-2 text-xs text-muted-foreground", children: [_jsx(ArrowRight, { size: 10, className: "shrink-0 mt-0.5" }), change] }, i))) }), _jsxs("p", { className: "text-xs text-muted-foreground mt-2", children: ["Tokens: ", step.metadata.tokensUsed.toLocaleString()] })] }))] }, step.step));
168
- })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Review the generated page in the canvas after accepting. You can always undo to revert." })] }))] }), _jsxs("div", { className: "px-6 py-4 border-t border-border flex items-center justify-end gap-3", children: [phase === 'prompt' && (_jsxs(_Fragment, { children: [_jsx("button", { onClick: handleClose, className: "px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors", children: "Cancel" }), _jsxs("button", { onClick: handleGenerate, disabled: !prompt.trim(), className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary rounded-lg hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed", children: [_jsx(Sparkles, { size: 14 }), "Generate Page"] })] })), phase === 'generating' && (_jsx("button", { onClick: handleClose, className: "px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors", children: "Cancel" })), phase === 'review' && (_jsxs(_Fragment, { children: [_jsx("button", { onClick: () => {
167
+ return (_jsxs("div", { className: "border-border overflow-hidden rounded-lg border", children: [_jsxs("button", { onClick: () => setExpandedStep(isExpanded ? null : step.step), className: "hover:bg-muted/50 flex w-full items-center gap-3 p-3 text-left transition-colors", children: [_jsx("div", { className: "bg-primary flex h-6 w-6 shrink-0 items-center justify-center rounded-full", children: _jsx(Check, { size: 12, className: "text-white" }) }), _jsx("span", { className: "text-muted-foreground", children: info?.icon }), _jsx("span", { className: "text-foreground flex-1 text-sm", children: info?.label }), _jsxs("span", { className: "text-muted-foreground text-xs", children: [(step.metadata.durationMs / 1000).toFixed(1), "s"] }), isExpanded ? (_jsx(ChevronUp, { size: 14, className: "text-muted-foreground" })) : (_jsx(ChevronDown, { size: 14, className: "text-muted-foreground" }))] }), isExpanded && (_jsxs("div", { className: "border-border border-t px-3 pt-2 pb-3", children: [_jsx("ul", { className: "space-y-1", children: step.metadata.changes.map((change, i) => (_jsxs("li", { className: "text-muted-foreground flex items-start gap-2 text-xs", children: [_jsx(ArrowRight, { size: 10, className: "mt-0.5 shrink-0" }), change] }, i))) }), _jsxs("p", { className: "text-muted-foreground mt-2 text-xs", children: ["Tokens: ", step.metadata.tokensUsed.toLocaleString()] })] }))] }, step.step));
168
+ })] }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Review the generated page in the canvas after accepting. You can always undo to revert." })] }))] }), _jsxs("div", { className: "border-border flex items-center justify-end gap-3 border-t px-6 py-4", children: [phase === 'prompt' && (_jsxs(_Fragment, { children: [_jsx("button", { onClick: handleClose, className: "text-muted-foreground hover:text-foreground px-4 py-2 text-sm transition-colors", children: "Cancel" }), _jsxs("button", { onClick: handleGenerate, disabled: !prompt.trim(), className: "bg-primary hover:bg-primary/90 flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [_jsx(Sparkles, { size: 14 }), "Generate Page"] })] })), phase === 'generating' && (_jsx("button", { onClick: handleClose, className: "text-muted-foreground hover:text-foreground px-4 py-2 text-sm transition-colors", children: "Cancel" })), phase === 'review' && (_jsxs(_Fragment, { children: [_jsx("button", { onClick: () => {
169
169
  setPhase('prompt');
170
170
  setResult(null);
171
- }, className: "px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors", children: "Regenerate" }), _jsxs("button", { onClick: handleAccept, className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary rounded-lg hover:bg-primary/90 transition-colors", children: [_jsx(Check, { size: 14 }), "Accept & Apply"] })] }))] })] })] }));
171
+ }, className: "text-muted-foreground hover:text-foreground px-4 py-2 text-sm transition-colors", children: "Regenerate" }), _jsxs("button", { onClick: handleAccept, className: "bg-primary hover:bg-primary/90 flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium text-white transition-colors", children: [_jsx(Check, { size: 14 }), "Accept & Apply"] })] }))] })] })] }));
172
172
  }
173
173
  //# sourceMappingURL=AIGenerateDialog.js.map