@actuate-media/cms-admin 0.18.0 → 0.20.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 (167) hide show
  1. package/dist/AdminRoot.d.ts.map +1 -1
  2. package/dist/AdminRoot.js +9 -5
  3. package/dist/AdminRoot.js.map +1 -1
  4. package/dist/__tests__/lib/post-editor-service.test.js +75 -23
  5. package/dist/__tests__/lib/post-editor-service.test.js.map +1 -1
  6. package/dist/__tests__/lib/posts-service.test.js +132 -142
  7. package/dist/__tests__/lib/posts-service.test.js.map +1 -1
  8. package/dist/__tests__/views/posts-list-view.render.test.d.ts +2 -0
  9. package/dist/__tests__/views/posts-list-view.render.test.d.ts.map +1 -0
  10. package/dist/__tests__/views/posts-list-view.render.test.js +73 -0
  11. package/dist/__tests__/views/posts-list-view.render.test.js.map +1 -0
  12. package/dist/actuate-admin.css +1 -1
  13. package/dist/components/seo/Drawer.d.ts +11 -0
  14. package/dist/components/seo/Drawer.d.ts.map +1 -0
  15. package/dist/components/seo/Drawer.js +13 -0
  16. package/dist/components/seo/Drawer.js.map +1 -0
  17. package/dist/components/seo/RedirectEditorDrawer.d.ts +9 -0
  18. package/dist/components/seo/RedirectEditorDrawer.d.ts.map +1 -0
  19. package/dist/components/seo/RedirectEditorDrawer.js +94 -0
  20. package/dist/components/seo/RedirectEditorDrawer.js.map +1 -0
  21. package/dist/components/seo/SeoCopilotDrawer.d.ts +10 -0
  22. package/dist/components/seo/SeoCopilotDrawer.d.ts.map +1 -0
  23. package/dist/components/seo/SeoCopilotDrawer.js +34 -0
  24. package/dist/components/seo/SeoCopilotDrawer.js.map +1 -0
  25. package/dist/components/seo/SeoEditorDrawer.d.ts +8 -0
  26. package/dist/components/seo/SeoEditorDrawer.d.ts.map +1 -0
  27. package/dist/components/seo/SeoEditorDrawer.js +111 -0
  28. package/dist/components/seo/SeoEditorDrawer.js.map +1 -0
  29. package/dist/components/seo/SeoIssueFixDrawer.d.ts +8 -0
  30. package/dist/components/seo/SeoIssueFixDrawer.d.ts.map +1 -0
  31. package/dist/components/seo/SeoIssueFixDrawer.js +111 -0
  32. package/dist/components/seo/SeoIssueFixDrawer.js.map +1 -0
  33. package/dist/components/seo/primitives.d.ts +53 -0
  34. package/dist/components/seo/primitives.d.ts.map +1 -0
  35. package/dist/components/seo/primitives.js +100 -0
  36. package/dist/components/seo/primitives.js.map +1 -0
  37. package/dist/index.d.ts +0 -2
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +0 -2
  40. package/dist/index.js.map +1 -1
  41. package/dist/layout/Sidebar.d.ts.map +1 -1
  42. package/dist/layout/Sidebar.js +3 -0
  43. package/dist/layout/Sidebar.js.map +1 -1
  44. package/dist/lib/post-editor-service.d.ts +6 -4
  45. package/dist/lib/post-editor-service.d.ts.map +1 -1
  46. package/dist/lib/post-editor-service.js +32 -37
  47. package/dist/lib/post-editor-service.js.map +1 -1
  48. package/dist/lib/posts-service.d.ts.map +1 -1
  49. package/dist/lib/posts-service.js +91 -160
  50. package/dist/lib/posts-service.js.map +1 -1
  51. package/dist/lib/seo-service.d.ts +322 -0
  52. package/dist/lib/seo-service.d.ts.map +1 -0
  53. package/dist/lib/seo-service.js +295 -0
  54. package/dist/lib/seo-service.js.map +1 -0
  55. package/dist/router/index.d.ts.map +1 -1
  56. package/dist/router/index.js +4 -1
  57. package/dist/router/index.js.map +1 -1
  58. package/dist/views/MediaBrowser.d.ts.map +1 -1
  59. package/dist/views/MediaBrowser.js +36 -25
  60. package/dist/views/MediaBrowser.js.map +1 -1
  61. package/dist/views/Posts/NewPostPicker.d.ts +5 -4
  62. package/dist/views/Posts/NewPostPicker.d.ts.map +1 -1
  63. package/dist/views/Posts/NewPostPicker.js +5 -4
  64. package/dist/views/Posts/NewPostPicker.js.map +1 -1
  65. package/dist/views/Posts/NewPostTypeInstructions.js +2 -2
  66. package/dist/views/Posts/PostTypesView.d.ts +5 -4
  67. package/dist/views/Posts/PostTypesView.d.ts.map +1 -1
  68. package/dist/views/Posts/PostTypesView.js.map +1 -1
  69. package/dist/views/Posts/PostsListView.d.ts.map +1 -1
  70. package/dist/views/Posts/PostsListView.js +8 -0
  71. package/dist/views/Posts/PostsListView.js.map +1 -1
  72. package/dist/views/Posts/post-type-presets.d.ts +5 -0
  73. package/dist/views/Posts/post-type-presets.d.ts.map +1 -1
  74. package/dist/views/Posts/post-type-presets.js +10 -64
  75. package/dist/views/Posts/post-type-presets.js.map +1 -1
  76. package/dist/views/SEO.d.ts.map +1 -1
  77. package/dist/views/SEO.js +89 -132
  78. package/dist/views/SEO.js.map +1 -1
  79. package/dist/views/page-editor/sections/ArticleBodySection.d.ts +6 -2
  80. package/dist/views/page-editor/sections/ArticleBodySection.d.ts.map +1 -1
  81. package/dist/views/page-editor/sections/ArticleBodySection.js +8 -8
  82. package/dist/views/page-editor/sections/ArticleBodySection.js.map +1 -1
  83. package/dist/views/post-editor/PostEditorCanvas.js +7 -1
  84. package/dist/views/post-editor/PostEditorCanvas.js.map +1 -1
  85. package/dist/views/post-editor/PostFieldsModal.d.ts.map +1 -1
  86. package/dist/views/post-editor/PostFieldsModal.js +10 -4
  87. package/dist/views/post-editor/PostFieldsModal.js.map +1 -1
  88. package/dist/views/post-editor/PostHeader.d.ts.map +1 -1
  89. package/dist/views/post-editor/PostHeader.js +4 -3
  90. package/dist/views/post-editor/PostHeader.js.map +1 -1
  91. package/dist/views/post-editor/PostPreview.d.ts.map +1 -1
  92. package/dist/views/post-editor/PostPreview.js +11 -1
  93. package/dist/views/post-editor/PostPreview.js.map +1 -1
  94. package/dist/views/post-editor/PostSectionEditor.d.ts +22 -2
  95. package/dist/views/post-editor/PostSectionEditor.d.ts.map +1 -1
  96. package/dist/views/post-editor/PostSectionEditor.js +4 -1
  97. package/dist/views/post-editor/PostSectionEditor.js.map +1 -1
  98. package/dist/views/seo/AuditTab.d.ts +6 -0
  99. package/dist/views/seo/AuditTab.d.ts.map +1 -0
  100. package/dist/views/seo/AuditTab.js +57 -0
  101. package/dist/views/seo/AuditTab.js.map +1 -0
  102. package/dist/views/seo/ContentTab.d.ts +5 -0
  103. package/dist/views/seo/ContentTab.d.ts.map +1 -0
  104. package/dist/views/seo/ContentTab.js +27 -0
  105. package/dist/views/seo/ContentTab.js.map +1 -0
  106. package/dist/views/seo/OverviewTab.d.ts +8 -0
  107. package/dist/views/seo/OverviewTab.d.ts.map +1 -0
  108. package/dist/views/seo/OverviewTab.js +35 -0
  109. package/dist/views/seo/OverviewTab.js.map +1 -0
  110. package/dist/views/seo/RedirectsTab.d.ts +2 -0
  111. package/dist/views/seo/RedirectsTab.d.ts.map +1 -0
  112. package/dist/views/seo/RedirectsTab.js +124 -0
  113. package/dist/views/seo/RedirectsTab.js.map +1 -0
  114. package/dist/views/seo/TechnicalTab.d.ts +2 -0
  115. package/dist/views/seo/TechnicalTab.d.ts.map +1 -0
  116. package/dist/views/seo/TechnicalTab.js +102 -0
  117. package/dist/views/seo/TechnicalTab.js.map +1 -0
  118. package/dist/views/seo/useSeoResource.d.ts +8 -0
  119. package/dist/views/seo/useSeoResource.d.ts.map +1 -0
  120. package/dist/views/seo/useSeoResource.js +42 -0
  121. package/dist/views/seo/useSeoResource.js.map +1 -0
  122. package/package.json +2 -2
  123. package/src/AdminRoot.tsx +9 -5
  124. package/src/__tests__/lib/post-editor-service.test.ts +78 -23
  125. package/src/__tests__/lib/posts-service.test.ts +134 -163
  126. package/src/__tests__/views/posts-list-view.render.test.tsx +84 -0
  127. package/src/components/seo/Drawer.tsx +61 -0
  128. package/src/components/seo/RedirectEditorDrawer.tsx +235 -0
  129. package/src/components/seo/SeoCopilotDrawer.tsx +76 -0
  130. package/src/components/seo/SeoEditorDrawer.tsx +347 -0
  131. package/src/components/seo/SeoIssueFixDrawer.tsx +244 -0
  132. package/src/components/seo/primitives.tsx +237 -0
  133. package/src/index.ts +0 -2
  134. package/src/layout/Sidebar.tsx +3 -0
  135. package/src/lib/post-editor-service.ts +41 -40
  136. package/src/lib/posts-service.ts +109 -180
  137. package/src/lib/seo-service.ts +623 -0
  138. package/src/router/index.ts +4 -1
  139. package/src/views/MediaBrowser.tsx +89 -67
  140. package/src/views/Posts/NewPostPicker.tsx +5 -4
  141. package/src/views/Posts/NewPostTypeInstructions.tsx +2 -2
  142. package/src/views/Posts/PostTypesView.tsx +5 -4
  143. package/src/views/Posts/PostsListView.tsx +9 -0
  144. package/src/views/Posts/post-type-presets.ts +15 -64
  145. package/src/views/SEO.tsx +186 -863
  146. package/src/views/page-editor/sections/ArticleBodySection.tsx +12 -16
  147. package/src/views/post-editor/PostEditorCanvas.tsx +7 -1
  148. package/src/views/post-editor/PostFieldsModal.tsx +36 -21
  149. package/src/views/post-editor/PostHeader.tsx +4 -4
  150. package/src/views/post-editor/PostPreview.tsx +12 -1
  151. package/src/views/post-editor/PostSectionEditor.tsx +22 -5
  152. package/src/views/seo/AuditTab.tsx +229 -0
  153. package/src/views/seo/ContentTab.tsx +164 -0
  154. package/src/views/seo/OverviewTab.tsx +257 -0
  155. package/src/views/seo/RedirectsTab.tsx +392 -0
  156. package/src/views/seo/TechnicalTab.tsx +303 -0
  157. package/src/views/seo/useSeoResource.ts +52 -0
  158. package/dist/views/PostEditor.d.ts +0 -6
  159. package/dist/views/PostEditor.d.ts.map +0 -1
  160. package/dist/views/PostEditor.js +0 -79
  161. package/dist/views/PostEditor.js.map +0 -1
  162. package/dist/views/Posts.d.ts +0 -5
  163. package/dist/views/Posts.d.ts.map +0 -1
  164. package/dist/views/Posts.js +0 -73
  165. package/dist/views/Posts.js.map +0 -1
  166. package/src/views/PostEditor.tsx +0 -257
  167. package/src/views/Posts.tsx +0 -375
package/dist/views/SEO.js CHANGED
@@ -1,143 +1,100 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * SEO Operations Center — five-tab workflow surface (Overview / Content /
5
+ * Technical / Redirects / Audit). Tab + deep-link state is driven by the
6
+ * `?tab=` query string so audits, issues, redirects, and content editors are
7
+ * all linkable. All data flows through `lib/seo-service.ts`.
8
+ */
3
9
  import * as Tabs from '@radix-ui/react-tabs';
4
- import { Search, Globe, FileCode2, BarChart3, AlertTriangle, CheckCircle2, XCircle, ArrowUpRight, RefreshCw, BookOpen, Link2, Bot, Plus, Pencil, Trash2, ExternalLink, ArrowRightLeft, Copy, ShieldCheck, Loader2, } from 'lucide-react';
5
- import { useState } from 'react';
10
+ import { LayoutDashboard, FileText, Settings2, ArrowRightLeft, ClipboardCheck, RefreshCw, Bot, } from 'lucide-react';
11
+ import { useCallback, useEffect, useMemo, useState } from 'react';
6
12
  import { toast } from 'sonner';
7
- import * as Dialog from '@radix-ui/react-dialog';
8
- import { useApiData } from '../lib/useApiData.js';
9
- import { cmsApi } from '../lib/api.js';
10
- export function SEO({ onNavigate, initialTab = 'pages' }) {
11
- const { data: seoData, loading: seoLoading, error: seoError, refetch: seoRefetch, } = useApiData('/seo/pages');
12
- const { data: redirectsData, loading: redirectsLoading, error: redirectsError, refetch: redirectsRefetch, } = useApiData('/redirects');
13
- const { data: linkHealthData, loading: linkHealthLoading } = useApiData('/seo/link-health');
14
- const [activeTab, setActiveTab] = useState(initialTab);
15
- const [searchQuery, setSearchQuery] = useState('');
16
- const [filterScore, setFilterScore] = useState('all');
17
- const [scanning, setScanning] = useState(false);
18
- const [showAddRedirect, setShowAddRedirect] = useState(false);
19
- const [newRedirect, setNewRedirect] = useState({
20
- source: '',
21
- destination: '',
22
- type: '301',
23
- });
24
- const [redirectSearch, setRedirectSearch] = useState('');
25
- const seoPages = seoData ?? [];
26
- const redirects = redirectsData ?? [];
27
- const linkHealth = linkHealthData?.issues ?? [];
28
- const handleTabChange = (tab) => {
29
- setActiveTab(tab);
30
- const path = tab === 'pages' ? '/seo' : `/seo/${tab}`;
31
- onNavigate?.(path);
32
- };
33
- // --- Pages tab data ---
34
- const filtered = seoPages
35
- .filter((page) => {
36
- const matchesSearch = (page.url ?? '').toLowerCase().includes(searchQuery.toLowerCase()) ||
37
- (page.title ?? '').toLowerCase().includes(searchQuery.toLowerCase());
38
- const matchesScore = filterScore === 'all' ||
39
- (filterScore === 'good' && page.score >= 80) ||
40
- (filterScore === 'warning' && page.score >= 50 && page.score < 80) ||
41
- (filterScore === 'critical' && page.score < 50);
42
- return matchesSearch && matchesScore;
43
- })
44
- .sort((a, b) => (!searchQuery ? b.issues - a.issues : 0));
45
- const totalIssues = seoPages.reduce((sum, p) => sum + p.issues, 0);
46
- const avgScore = seoPages.length > 0
47
- ? Math.round(seoPages.reduce((sum, p) => sum + p.score, 0) / seoPages.length)
48
- : 0;
49
- const missingMeta = seoPages.filter((p) => !p.metaTitle || !p.metaDescription).length;
50
- const missingSchema = seoPages.filter((p) => !p.schemaType).length;
51
- // --- Canonical data ---
52
- const missingCanonical = seoPages.filter((p) => !p.canonical);
53
- const allCanonicals = seoPages.filter((p) => p.canonical);
54
- const canonicalDomains = [
55
- ...new Set(allCanonicals
56
- .map((p) => {
57
- try {
58
- return new URL(p.canonical).hostname;
59
- }
60
- catch {
61
- return '';
62
- }
63
- })
64
- .filter(Boolean)),
65
- ];
66
- // --- Redirects data ---
67
- const filteredRedirects = redirects.filter((r) => (r.from ?? '').toLowerCase().includes(redirectSearch.toLowerCase()) ||
68
- (r.to ?? '').toLowerCase().includes(redirectSearch.toLowerCase()));
69
- const handleScan = async () => {
70
- setScanning(true);
71
- try {
72
- const res = await cmsApi('/seo/scan', { method: 'POST' });
73
- if (res.error) {
74
- toast.error(res.error);
75
- }
76
- else {
77
- const d = res.data;
78
- toast.success(`SEO scan complete — ${d.totalProblems} issues found across ${d.pagesWithIssues} of ${d.total} pages`);
79
- seoRefetch();
80
- }
81
- }
82
- catch {
83
- toast.error('SEO scan failed');
84
- }
85
- finally {
86
- setScanning(false);
87
- }
13
+ import { ErrorBoundary } from '../components/ErrorBoundary.js';
14
+ import { fetchSeoOverview, runSeoAudit } from '../lib/seo-service.js';
15
+ import { ScorePill, btnPrimary, btnSecondary } from '../components/seo/primitives.js';
16
+ import { SeoCopilotDrawer } from '../components/seo/SeoCopilotDrawer.js';
17
+ import { useSeoResource } from './seo/useSeoResource.js';
18
+ import { OverviewTab } from './seo/OverviewTab.js';
19
+ import { ContentTab } from './seo/ContentTab.js';
20
+ import { TechnicalTab } from './seo/TechnicalTab.js';
21
+ import { RedirectsTab } from './seo/RedirectsTab.js';
22
+ import { AuditTab } from './seo/AuditTab.js';
23
+ const TABS = [
24
+ { id: 'overview', label: 'Overview', icon: LayoutDashboard },
25
+ { id: 'content', label: 'Content SEO', icon: FileText },
26
+ { id: 'technical', label: 'Technical', icon: Settings2 },
27
+ { id: 'redirects', label: 'Redirects', icon: ArrowRightLeft },
28
+ { id: 'audit', label: 'Audit', icon: ClipboardCheck },
29
+ ];
30
+ function normalizeTab(tab) {
31
+ const valid = TABS.map((t) => t.id);
32
+ return (valid.includes(tab ?? '') ? tab : 'overview');
33
+ }
34
+ /** Read tab + deep-link query params from the current URL. */
35
+ function readUrlState() {
36
+ if (typeof window === 'undefined') {
37
+ return { tab: null, entityType: null, entityId: null, issueId: null };
38
+ }
39
+ const params = new URLSearchParams(window.location.search);
40
+ return {
41
+ tab: params.get('tab'),
42
+ entityType: params.get('entityType'),
43
+ entityId: params.get('entityId'),
44
+ issueId: params.get('issueId'),
88
45
  };
89
- const handleAddRedirect = async (e) => {
90
- e.preventDefault();
91
- const res = await cmsApi('/redirects', {
92
- method: 'POST',
93
- body: JSON.stringify({
94
- from: newRedirect.source,
95
- to: newRedirect.destination,
96
- type: newRedirect.type,
97
- }),
98
- });
99
- if (res.error) {
100
- toast.error(res.error);
101
- }
102
- else {
103
- toast.success('Redirect added');
104
- redirectsRefetch();
46
+ }
47
+ export function SEO({ onNavigate, initialTab = 'overview' }) {
48
+ const initialUrl = readUrlState();
49
+ const [activeTab, setActiveTab] = useState(normalizeTab(initialUrl.tab ?? initialTab));
50
+ const [refetchKey, setRefetchKey] = useState(0);
51
+ const [auditing, setAuditing] = useState(false);
52
+ const [copilotOpen, setCopilotOpen] = useState(false);
53
+ const [deepLink, setDeepLink] = useState(initialUrl);
54
+ // Overview resource is owned here so the header score pill and the Overview
55
+ // tab share a single request; `refetchKey` re-runs it after an audit.
56
+ const overviewResource = useSeoResource(fetchSeoOverview, [refetchKey]);
57
+ // Keep tab + deep links in sync with browser back/forward navigation.
58
+ useEffect(() => {
59
+ function sync() {
60
+ const url = readUrlState();
61
+ setActiveTab(normalizeTab(url.tab ?? initialTab));
62
+ setDeepLink(url);
105
63
  }
106
- setShowAddRedirect(false);
107
- setNewRedirect({ source: '', destination: '', type: '301' });
108
- };
109
- const handleDeleteRedirect = async (id) => {
110
- const res = await cmsApi(`/redirects/${id}`, { method: 'DELETE' });
64
+ window.addEventListener('popstate', sync);
65
+ return () => window.removeEventListener('popstate', sync);
66
+ }, [initialTab]);
67
+ useEffect(() => {
68
+ const url = readUrlState();
69
+ setActiveTab(normalizeTab(url.tab ?? initialTab));
70
+ setDeepLink(url);
71
+ }, [initialTab]);
72
+ const changeTab = useCallback((tab) => {
73
+ const next = normalizeTab(tab);
74
+ setActiveTab(next);
75
+ setDeepLink({ tab: next, entityType: null, entityId: null, issueId: null });
76
+ onNavigate?.(`/seo?tab=${next}`);
77
+ }, [onNavigate]);
78
+ const handleRunAudit = useCallback(async () => {
79
+ setAuditing(true);
80
+ const res = await runSeoAudit('full');
81
+ setAuditing(false);
111
82
  if (res.error) {
112
83
  toast.error(res.error);
84
+ return;
113
85
  }
114
- else {
115
- toast.success('Redirect deleted');
116
- redirectsRefetch();
117
- }
118
- };
119
- function scoreBadge(score) {
120
- if (score >= 80)
121
- return 'bg-green-100 text-green-800';
122
- if (score >= 50)
123
- return 'bg-yellow-100 text-yellow-800';
124
- return 'bg-red-100 text-red-800';
125
- }
126
- function scoreIcon(score) {
127
- if (score >= 80)
128
- return _jsx(CheckCircle2, { className: "h-4 w-4 text-green-600" });
129
- if (score >= 50)
130
- return _jsx(AlertTriangle, { className: "h-4 w-4 text-yellow-600" });
131
- return _jsx(XCircle, { className: "h-4 w-4 text-red-600" });
132
- }
133
- const tabClass = '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 shrink-0';
134
- const isLoading = seoLoading || redirectsLoading || linkHealthLoading;
135
- if (isLoading) {
136
- 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" }) }));
137
- }
138
- return (_jsxs("div", { className: "flex h-full flex-col p-3 pr-6 sm:p-4 sm:pr-8", children: [(seoError || redirectsError) && (_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: seoError || redirectsError }), _jsx("button", { onClick: () => {
139
- seoRefetch();
140
- redirectsRefetch();
141
- }, 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 flex-col justify-between gap-3 sm:flex-row sm:items-center", children: [_jsxs("div", { children: [_jsx("h1", { className: "mb-1 text-xl font-semibold text-gray-900 sm:text-2xl", children: "SEO & Redirects" }), _jsx("p", { className: "text-sm text-gray-600", children: "Search optimization, redirects, canonicalization, and link health" })] }), _jsxs("button", { onClick: handleScan, disabled: scanning, className: "flex items-center justify-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700 disabled:opacity-60", children: [_jsx(RefreshCw, { className: `h-4 w-4 ${scanning ? 'animate-spin' : ''}` }), scanning ? 'Scanning...' : 'Run SEO Scan'] })] }), _jsxs(Tabs.Root, { value: activeTab, onValueChange: handleTabChange, children: [_jsxs(Tabs.List, { className: "mb-4 flex gap-1 overflow-x-auto border-b border-gray-200", children: [_jsx(Tabs.Trigger, { value: "pages", className: tabClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(BarChart3, { className: "h-4 w-4" }), "Pages"] }) }), _jsx(Tabs.Trigger, { value: "redirects", className: tabClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(ArrowRightLeft, { className: "h-4 w-4" }), "Redirects"] }) }), _jsx(Tabs.Trigger, { value: "canonicals", className: tabClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Copy, { className: "h-4 w-4" }), "Canonicalization"] }) }), _jsx(Tabs.Trigger, { value: "links", className: tabClass, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Link2, { className: "h-4 w-4" }), "Link Health"] }) })] }), _jsxs(Tabs.Content, { value: "pages", className: "flex min-h-0 flex-1 flex-col", children: [_jsxs("div", { className: "mb-4 grid grid-cols-2 gap-3 lg:grid-cols-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(BarChart3, { className: "h-4 w-4 text-blue-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "Avg SEO Score" })] }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: avgScore }), _jsx("div", { className: `mt-1 text-xs ${avgScore >= 80 ? 'text-green-600' : avgScore >= 50 ? 'text-yellow-600' : 'text-red-600'}`, children: avgScore >= 80 ? 'Good' : avgScore >= 50 ? 'Needs improvement' : 'Critical' })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(AlertTriangle, { className: "h-4 w-4 text-yellow-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "Total Issues" })] }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: totalIssues }), _jsxs("div", { className: "mt-1 text-xs text-gray-500", children: ["Across ", seoPages.filter((p) => p.issues > 0).length, " pages"] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(FileCode2, { className: "h-4 w-4 text-purple-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "Missing Meta" })] }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: missingMeta }), _jsx("div", { className: "mt-1 text-xs text-gray-500", children: "Title or description" })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(Globe, { className: "h-4 w-4 text-green-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "Missing Schema" })] }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: missingSchema }), _jsx("div", { className: "mt-1 text-xs text-gray-500", children: "No Schema.org markup" })] })] }), _jsx("div", { className: "mb-4 rounded-lg border border-indigo-200 bg-linear-to-r from-indigo-50 to-purple-50 p-4", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx(Bot, { className: "mt-0.5 h-5 w-5 shrink-0 text-indigo-600" }), _jsxs("div", { className: "flex-1", children: [_jsx("h3", { className: "mb-1 text-sm font-semibold text-indigo-900", children: "AI SEO Recommendations" }), _jsxs("p", { className: "mb-2 text-sm text-indigo-700", children: [missingMeta, " pages missing meta descriptions. ", missingCanonical.length, " pages without canonical URLs. AI can auto-generate these from page content."] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { onClick: () => onNavigate?.('/settings'), className: "rounded-lg bg-indigo-600 px-3 py-1.5 text-xs text-white transition-colors hover:bg-indigo-700", children: "Configure AI" }), _jsx("button", { className: "rounded-lg border border-indigo-300 px-3 py-1.5 text-xs text-indigo-700 transition-colors hover:bg-indigo-50", children: "Auto-fix All" })] })] })] }) }), _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 pages by URL or title...", 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: filterScore, onChange: (e) => setFilterScore(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 Scores" }), _jsx("option", { value: "good", children: "Good (80+)" }), _jsx("option", { value: "warning", children: "Needs Work (50-79)" }), _jsx("option", { value: "critical", children: "Critical (<50)" })] })] }) }), _jsx("div", { className: "flex-1 overflow-hidden rounded-lg border border-gray-200 bg-white", children: _jsx("div", { className: "h-full overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "sticky top-0 border-b border-gray-200 bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Page" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Score" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Readability" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Schema" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Meta" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Issues" }), _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: filtered.map((page) => (_jsxs("tr", { className: "transition-colors hover:bg-gray-50", children: [_jsxs("td", { className: "px-4 py-3", children: [_jsx("div", { className: "text-sm font-medium text-gray-900", children: page.title }), _jsx("div", { className: "text-xs text-gray-500", children: page.url })] }), _jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-2", children: [scoreIcon(page.score), _jsx("span", { className: `rounded-full px-2 py-0.5 text-xs font-medium ${scoreBadge(page.score)}`, children: page.score })] }) }), _jsx("td", { className: "px-4 py-3", children: page.readability > 0 ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "h-3.5 w-3.5 text-gray-400" }), _jsx("span", { className: `text-sm ${page.readability >= 80 ? 'text-green-700' : page.readability >= 60 ? 'text-yellow-700' : 'text-red-700'}`, children: page.readability })] })) : (_jsx("span", { className: "text-xs text-gray-400", children: "\u2014" })) }), _jsx("td", { className: "px-4 py-3", children: page.schemaType ? (_jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-xs font-medium text-purple-800", children: page.schemaType })) : (_jsx("span", { className: "rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800", children: "Missing" })) }), _jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: `text-xs ${page.metaTitle ? 'text-green-700' : 'text-red-600'}`, children: page.metaTitle ? '✓ Title' : '✗ Title' }), _jsx("span", { className: `text-xs ${page.metaDescription ? 'text-green-700' : 'text-red-600'}`, children: page.metaDescription ? '✓ Desc' : '✗ Desc' })] }) }), _jsx("td", { className: "px-4 py-3", children: page.issues > 0 ? (_jsx("span", { className: "rounded-full bg-yellow-100 px-2 py-0.5 text-xs font-medium text-yellow-800", children: page.issues })) : (_jsx("span", { className: "rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-800", children: "\u2713" })) }), _jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-1", children: [_jsx("button", { onClick: () => onNavigate?.(`/pages/${page.id}`), className: "rounded p-1.5 transition-colors hover:bg-gray-100", title: "Edit", children: _jsx(ArrowUpRight, { className: "h-4 w-4 text-gray-600" }) }), _jsx("button", { className: "rounded p-1.5 transition-colors hover:bg-gray-100", title: "AI analyze", children: _jsx(Bot, { className: "h-4 w-4 text-indigo-600" }) })] }) })] }, page.id))) })] }) }) })] }), _jsxs(Tabs.Content, { value: "redirects", className: "flex min-h-0 flex-1 flex-col", children: [_jsxs("div", { className: "mb-4 grid grid-cols-2 gap-3 lg:grid-cols-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "Total Redirects" }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: redirects.length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "Active" }), _jsx("div", { className: "text-2xl font-semibold text-green-600", children: redirects.filter((r) => r.active).length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "Total Hits" }), _jsx("div", { className: "text-2xl font-semibold text-blue-600", children: redirects.reduce((s, r) => s + r.hits, 0).toLocaleString() })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "301 Permanent" }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: redirects.filter((r) => r.type === '301').length })] })] }), _jsxs("div", { className: "mb-4 flex items-center gap-3", children: [_jsxs("div", { className: "relative max-w-md 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 redirects...", value: redirectSearch, onChange: (e) => setRedirectSearch(e.target.value), className: "w-full rounded-lg border border-gray-300 bg-white py-2 pr-3 pl-9 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" })] }), _jsxs("button", { onClick: () => setShowAddRedirect(true), className: "flex shrink-0 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(Plus, { className: "h-4 w-4" }), "Add Redirect"] })] }), _jsx("div", { className: "flex-1 overflow-hidden rounded-lg border border-gray-200 bg-white", children: _jsx("div", { className: "h-full overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "sticky top-0 border-b border-gray-200 bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Source" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Destination" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Type" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Hits" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Status" }), _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: filteredRedirects.map((r) => (_jsxs("tr", { className: "transition-colors hover:bg-gray-50", children: [_jsx("td", { className: "px-4 py-3", children: _jsx("code", { className: "rounded bg-gray-100 px-2 py-1 text-xs text-gray-900", children: r.from }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("code", { className: "rounded bg-gray-100 px-2 py-1 text-xs text-gray-900", children: r.to }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `rounded-full px-2 py-0.5 text-xs font-medium ${r.type === '301' ? 'bg-blue-100 text-blue-800' : 'bg-purple-100 text-purple-800'}`, children: r.type }) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: r.hits.toLocaleString() }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `rounded-full px-2 py-0.5 text-xs font-medium ${r.active ? 'bg-green-100 text-green-800' : 'bg-gray-100 text-gray-800'}`, children: r.active ? 'Active' : 'Inactive' }) }), _jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { className: "rounded p-1.5 transition-colors hover:bg-gray-100", children: _jsx(Pencil, { className: "h-4 w-4 text-gray-600" }) }), _jsx("button", { onClick: () => handleDeleteRedirect(r.id), className: "rounded p-1.5 transition-colors hover:bg-gray-100", children: _jsx(Trash2, { className: "h-4 w-4 text-red-600" }) })] }) })] }, r.id))) })] }) }) }), _jsx(Dialog.Root, { open: showAddRedirect, onOpenChange: setShowAddRedirect, 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: "Add Redirect" }), _jsxs("form", { onSubmit: handleAddRedirect, className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Source URL" }), _jsx("input", { type: "text", value: newRedirect.source, onChange: (e) => setNewRedirect({ ...newRedirect, source: e.target.value }), placeholder: "/old-page", 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: "Destination URL" }), _jsx("input", { type: "text", value: newRedirect.destination, onChange: (e) => setNewRedirect({ ...newRedirect, destination: e.target.value }), placeholder: "/new-page", 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: "Type" }), _jsxs("select", { value: newRedirect.type, onChange: (e) => setNewRedirect({ ...newRedirect, type: 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: "301", children: "301 (Permanent)" }), _jsx("option", { value: "302", children: "302 (Temporary)" })] })] }), _jsxs("div", { className: "flex 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 hover:bg-gray-50", children: "Cancel" }) }), _jsx("button", { type: "submit", className: "rounded-lg bg-blue-600 px-4 py-2 text-sm text-white hover:bg-blue-700", children: "Add Redirect" })] })] })] })] }) })] }), _jsxs(Tabs.Content, { value: "canonicals", className: "flex min-h-0 flex-1 flex-col space-y-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-3 lg:grid-cols-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(ShieldCheck, { className: "h-4 w-4 text-green-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "With Canonical" })] }), _jsx("div", { className: "text-2xl font-semibold text-green-700", children: allCanonicals.length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(AlertTriangle, { className: "h-4 w-4 text-red-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "Missing Canonical" })] }), _jsx("div", { className: "text-2xl font-semibold text-red-700", children: missingCanonical.length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(Globe, { className: "h-4 w-4 text-blue-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "Canonical Domains" })] }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: canonicalDomains.length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 text-green-600" }), _jsx("span", { className: "text-xs font-medium text-gray-600", children: "Self-Referencing" })] }), _jsx("div", { className: "text-2xl font-semibold text-green-700", children: allCanonicals.length }), _jsx("div", { className: "mt-1 text-xs text-gray-500", children: "Correct pattern" })] })] }), missingCanonical.length > 0 && (_jsx("div", { className: "rounded-lg border border-yellow-200 bg-yellow-50 p-4", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0 text-yellow-600" }), _jsxs("div", { className: "flex-1", children: [_jsxs("h3", { className: "mb-1 text-sm font-semibold text-yellow-900", children: [missingCanonical.length, " page", missingCanonical.length !== 1 ? 's' : '', " missing canonical URLs"] }), _jsx("p", { className: "mb-2 text-sm text-yellow-700", children: "Without canonical tags, search engines may index duplicate versions of these pages, diluting your ranking signals." }), _jsx("div", { className: "flex flex-wrap gap-2", children: missingCanonical.map((p) => (_jsxs("button", { onClick: () => onNavigate?.(`/pages/${p.id}`), className: "rounded-lg bg-yellow-100 px-2.5 py-1 text-xs text-yellow-900 transition-colors hover:bg-yellow-200", children: [p.title, " (", p.url, ")"] }, p.id))) })] })] }) })), _jsx("div", { className: "flex-1 overflow-hidden rounded-lg border border-gray-200 bg-white", children: _jsx("div", { className: "h-full overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "sticky top-0 border-b border-gray-200 bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Page" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "URL" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Canonical URL" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Status" }), _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: seoPages.map((page) => (_jsxs("tr", { className: "transition-colors hover:bg-gray-50", children: [_jsx("td", { className: "px-4 py-3 text-sm font-medium text-gray-900", children: page.title }), _jsx("td", { className: "px-4 py-3", children: _jsx("code", { className: "rounded bg-gray-100 px-2 py-1 text-xs text-gray-700", children: page.url }) }), _jsx("td", { className: "px-4 py-3", children: page.canonical ? (_jsx("code", { className: "block max-w-[200px] truncate rounded bg-gray-100 px-2 py-1 text-xs text-gray-700", children: page.canonical })) : (_jsx("span", { className: "text-xs font-medium text-red-600", children: "Not set" })) }), _jsx("td", { className: "px-4 py-3", children: page.canonical ? (_jsx("span", { className: "rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-800", children: "\u2713 Set" })) : (_jsx("span", { className: "rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800", children: "Missing" })) }), _jsx("td", { className: "px-4 py-3", children: _jsx("button", { onClick: () => onNavigate?.(`/pages/${page.id}`), className: "rounded p-1.5 transition-colors hover:bg-gray-100", title: "Edit", children: _jsx(Pencil, { className: "h-4 w-4 text-gray-600" }) }) })] }, page.id))) })] }) }) })] }), _jsxs(Tabs.Content, { value: "links", className: "flex min-h-0 flex-1 flex-col space-y-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-3 lg:grid-cols-4", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "Broken Links" }), _jsx("div", { className: "text-2xl font-semibold text-red-600", children: linkHealth.filter((l) => l.status === 404).length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "Redirect Chains" }), _jsx("div", { className: "text-2xl font-semibold text-yellow-600", children: linkHealth.filter((l) => l.status === 301).length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "Internal Issues" }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: linkHealth.filter((l) => l.type === 'internal').length })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4", children: [_jsx("div", { className: "mb-1 text-xs text-gray-600", children: "External Issues" }), _jsx("div", { className: "text-2xl font-semibold text-gray-900", children: linkHealth.filter((l) => l.type === 'external').length })] })] }), _jsx("div", { className: "flex-1 overflow-hidden rounded-lg border border-gray-200 bg-white", children: _jsx("div", { className: "h-full overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "sticky top-0 border-b border-gray-200 bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Found On" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Broken URL" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Status" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Type" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Last Checked" }), _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: linkHealth.map((link) => (_jsxs("tr", { className: "transition-colors hover:bg-gray-50", children: [_jsx("td", { className: "px-4 py-3", children: _jsx("code", { className: "rounded bg-gray-100 px-2 py-1 text-xs text-gray-700", children: link.page }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("code", { className: "block max-w-[200px] truncate rounded bg-red-50 px-2 py-1 text-xs text-red-800", children: link.url }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `rounded-full px-2 py-0.5 text-xs font-medium ${link.status === 404 ? 'bg-red-100 text-red-800' : 'bg-yellow-100 text-yellow-800'}`, children: link.status }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `rounded-full px-2 py-0.5 text-xs font-medium ${link.type === 'internal' ? 'bg-blue-100 text-blue-800' : 'bg-gray-100 text-gray-800'}`, children: link.type }) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: link.lastChecked }), _jsx("td", { className: "px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-1", children: [_jsx("button", { className: "rounded p-1.5 transition-colors hover:bg-gray-100", title: "Create redirect", children: _jsx(ArrowRightLeft, { className: "h-4 w-4 text-gray-600" }) }), _jsx("button", { className: "rounded p-1.5 transition-colors hover:bg-gray-100", title: "Open URL", children: _jsx(ExternalLink, { className: "h-4 w-4 text-gray-600" }) })] }) })] }, link.id))) })] }) }) })] })] })] }));
86
+ toast.success('Audit complete.');
87
+ setRefetchKey((k) => k + 1);
88
+ }, []);
89
+ const score = overviewResource.data?.siteScore.score;
90
+ const badgeCounts = useMemo(() => {
91
+ const summary = overviewResource.data?.issuesSummary;
92
+ return { audit: summary ? summary.critical + summary.warning : 0 };
93
+ }, [overviewResource.data]);
94
+ return (_jsxs("div", { className: "space-y-6 p-6", children: [_jsxs("header", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-foreground text-2xl font-medium", children: "SEO Operations Center" }), _jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: "Monitor, fix, and automate SEO across your content, redirects, and technical setup." })] }), _jsxs("div", { className: "flex items-center gap-3", children: [typeof score === 'number' && (_jsxs("span", { className: "text-muted-foreground flex items-center gap-2 text-sm", children: ["Site score ", _jsx(ScorePill, { score: score })] })), _jsxs("button", { className: btnSecondary, onClick: () => setCopilotOpen(true), children: [_jsx(Bot, { className: "h-4 w-4", "aria-hidden": true }), "AI Copilot"] }), _jsxs("button", { className: btnPrimary, onClick: handleRunAudit, disabled: auditing, children: [_jsx(RefreshCw, { className: `h-4 w-4 ${auditing ? 'animate-spin' : ''}`, "aria-hidden": true }), auditing ? 'Running audit…' : 'Run audit'] })] })] }), _jsx(SeoCopilotDrawer, { open: copilotOpen, onOpenChange: setCopilotOpen }), _jsxs(Tabs.Root, { value: activeTab, onValueChange: changeTab, children: [_jsx(Tabs.List, { className: "border-border flex gap-1 overflow-x-auto border-b", "aria-label": "SEO sections", children: TABS.map((t) => {
95
+ const Icon = t.icon;
96
+ const badge = t.id === 'audit' ? badgeCounts.audit : 0;
97
+ return (_jsxs(Tabs.Trigger, { value: t.id, className: "text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary focus-visible:ring-ring -mb-px flex items-center gap-2 border-b-2 border-transparent px-3 py-2.5 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none", children: [_jsx(Icon, { className: "h-4 w-4", "aria-hidden": true }), t.label, badge > 0 && (_jsx("span", { className: "bg-destructive/10 text-destructive ml-1 rounded-full px-1.5 py-0.5 text-xs font-medium tabular-nums", children: badge }))] }, t.id));
98
+ }) }), _jsx("div", { className: "pt-6", children: _jsxs(ErrorBoundary, { children: [_jsx(Tabs.Content, { value: "overview", tabIndex: -1, children: activeTab === 'overview' && (_jsx(OverviewTab, { resource: overviewResource, onOpenIssue: (issueId) => onNavigate?.(`/seo?tab=audit&issueId=${issueId}`), onConnectSearchConsole: () => toast.info('Google Search Console integration is coming soon. Demo performance data is available in local development.') })) }), _jsx(Tabs.Content, { value: "content", tabIndex: -1, children: activeTab === 'content' && (_jsx(ContentTab, { initialEntityType: deepLink.entityType, initialEntityId: deepLink.entityId })) }), _jsx(Tabs.Content, { value: "technical", tabIndex: -1, children: activeTab === 'technical' && _jsx(TechnicalTab, {}) }), _jsx(Tabs.Content, { value: "redirects", tabIndex: -1, children: activeTab === 'redirects' && _jsx(RedirectsTab, {}) }), _jsx(Tabs.Content, { value: "audit", tabIndex: -1, children: activeTab === 'audit' && (_jsx(AuditTab, { refetchKey: refetchKey, initialIssueId: deepLink.issueId, onNavigate: onNavigate })) })] }) })] })] }));
142
99
  }
143
100
  //# sourceMappingURL=SEO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SEO.js","sourceRoot":"","sources":["../../src/views/SEO.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,MAAM,EACN,KAAK,EACL,SAAS,EACT,SAAS,EACT,aAAa,EACb,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,EACH,IAAI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AAC,QAAQ,EAAE,CAAC,CAAC,YACxC,SAAS,KAAK,UAAU,IAAI,CAC3B,KAAC,WAAW,IACV,QAAQ,EAAE,gBAAgB,EAC1B,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,0BAA0B,OAAO,EAAE,CAAC,EAC3E,sBAAsB,EAAE,GAAG,EAAE,CAC3B,KAAK,CAAC,IAAI,CACR,4GAA4G,CAC7G,GAEH,CACH,GACY,EACf,KAAC,IAAI,CAAC,OAAO,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAE,CAAC,CAAC,YACvC,SAAS,KAAK,SAAS,IAAI,CAC1B,KAAC,UAAU,IACT,iBAAiB,EAAE,QAAQ,CAAC,UAAU,EACtC,eAAe,EAAE,QAAQ,CAAC,QAAQ,GAClC,CACH,GACY,EACf,KAAC,IAAI,CAAC,OAAO,IAAC,KAAK,EAAC,WAAW,EAAC,QAAQ,EAAE,CAAC,CAAC,YACzC,SAAS,KAAK,WAAW,IAAI,KAAC,YAAY,KAAG,GACjC,EACf,KAAC,IAAI,CAAC,OAAO,IAAC,KAAK,EAAC,WAAW,EAAC,QAAQ,EAAE,CAAC,CAAC,YACzC,SAAS,KAAK,WAAW,IAAI,KAAC,YAAY,KAAG,GACjC,EACf,KAAC,IAAI,CAAC,OAAO,IAAC,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAE,CAAC,CAAC,YACrC,SAAS,KAAK,OAAO,IAAI,CACxB,KAAC,QAAQ,IACP,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,QAAQ,CAAC,OAAO,EAChC,UAAU,EAAE,UAAU,GACtB,CACH,GACY,IACD,GACZ,IACI,IACR,CACP,CAAA;AACH,CAAC"}
@@ -3,8 +3,12 @@ import { type PostRenderContext } from './parts.js';
3
3
  /**
4
4
  * Renders the post's main body. When `source === 'field'` it shows the
5
5
  * post's own Body field (passed via context); otherwise it renders the
6
- * section's own `body` copy. Body text is treated as plain paragraphs split
7
- * on blank lines — the renderer never injects raw HTML.
6
+ * section's own `body` copy.
7
+ *
8
+ * The Body field is a `richText` field (sanitized HTML on write), so this
9
+ * canvas preview renders it as HTML — exactly like the public site's
10
+ * article-body renderer — to stay WYSIWYG. It previews the author's own
11
+ * in-progress draft; the server sanitizes (sanitize-html) on save.
8
12
  */
9
13
  export declare function ArticleBodySection({ section, context, }: {
10
14
  section: PageSection;
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleBodySection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/ArticleBodySection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B,2CAyCA"}
1
+ {"version":3,"file":"ArticleBodySection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/ArticleBodySection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9D;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B,2CAiCA"}
@@ -3,20 +3,20 @@ import { bool, str } from './parts.js';
3
3
  /**
4
4
  * Renders the post's main body. When `source === 'field'` it shows the
5
5
  * post's own Body field (passed via context); otherwise it renders the
6
- * section's own `body` copy. Body text is treated as plain paragraphs split
7
- * on blank lines — the renderer never injects raw HTML.
6
+ * section's own `body` copy.
7
+ *
8
+ * The Body field is a `richText` field (sanitized HTML on write), so this
9
+ * canvas preview renders it as HTML — exactly like the public site's
10
+ * article-body renderer — to stay WYSIWYG. It previews the author's own
11
+ * in-progress draft; the server sanitizes (sanitize-html) on save.
8
12
  */
9
13
  export function ArticleBodySection({ section, context, }) {
10
14
  const c = section.content;
11
15
  const source = str(c, 'source', 'field');
12
- const raw = source === 'field' ? (context?.body ?? '') : str(c, 'body');
16
+ const html = source === 'field' ? (context?.body ?? '') : str(c, 'body');
13
17
  const wide = str(c, 'width', 'normal') === 'wide';
14
18
  const showToc = bool(c, 'showToc');
15
- const paragraphs = raw
16
- .split(/\n{2,}/)
17
- .map((p) => p.trim())
18
- .filter(Boolean);
19
- return (_jsxs("div", { className: `mx-auto px-6 ${wide ? 'max-w-4xl' : 'max-w-2xl'}`, children: [showToc && (_jsxs("div", { className: "mb-8 rounded-lg border border-zinc-200 bg-zinc-50 p-4", children: [_jsx("p", { className: "text-xs font-semibold tracking-wider text-zinc-500 uppercase", children: "On this page" }), _jsx("p", { className: "mt-1 text-sm text-zinc-400", children: "A table of contents will be generated from the body headings." })] })), paragraphs.length > 0 ? (_jsx("div", { className: "space-y-4", children: paragraphs.map((p, i) => (_jsx("p", { className: "text-base leading-relaxed text-zinc-700", children: p }, i))) })) : (_jsx("p", { className: "text-base leading-relaxed text-zinc-400 italic", children: source === 'field'
19
+ return (_jsxs("div", { className: `mx-auto px-6 ${wide ? 'max-w-4xl' : 'max-w-2xl'}`, children: [showToc && (_jsxs("div", { className: "mb-8 rounded-lg border border-zinc-200 bg-zinc-50 p-4", children: [_jsx("p", { className: "text-xs font-semibold tracking-wider text-zinc-500 uppercase", children: "On this page" }), _jsx("p", { className: "mt-1 text-sm text-zinc-400", children: "A table of contents will be generated from the body headings." })] })), html.trim() ? (_jsx("div", { className: "prose prose-zinc max-w-none text-base leading-relaxed text-zinc-700", dangerouslySetInnerHTML: { __html: html } })) : (_jsx("p", { className: "text-base leading-relaxed text-zinc-400 italic", children: source === 'field'
20
20
  ? "This will show the post's Body content."
21
21
  : 'Add body copy in the inspector.' }))] }));
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleBodySection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/ArticleBodySection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAA0B,MAAM,YAAY,CAAA;AAE9D;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,OAAO,EACP,OAAO,GAIR;IACC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACxC,MAAM,GAAG,GAAG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IACvE,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,KAAK,MAAM,CAAA;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAElC,MAAM,UAAU,GAAG,GAAG;SACnB,KAAK,CAAC,QAAQ,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,OAAO,CAAC,CAAA;IAElB,OAAO,CACL,eAAK,SAAS,EAAE,gBAAgB,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,aAC/D,OAAO,IAAI,CACV,eAAK,SAAS,EAAC,uDAAuD,aACpE,YAAG,SAAS,EAAC,8DAA8D,6BAEvE,EACJ,YAAG,SAAS,EAAC,4BAA4B,8EAErC,IACA,CACP,EACA,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACvB,cAAK,SAAS,EAAC,WAAW,YACvB,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACxB,YAAW,SAAS,EAAC,yCAAyC,YAC3D,CAAC,IADI,CAAC,CAEL,CACL,CAAC,GACE,CACP,CAAC,CAAC,CAAC,CACF,YAAG,SAAS,EAAC,gDAAgD,YAC1D,MAAM,KAAK,OAAO;oBACjB,CAAC,CAAC,yCAAyC;oBAC3C,CAAC,CAAC,iCAAiC,GACnC,CACL,IACG,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"ArticleBodySection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/ArticleBodySection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAA0B,MAAM,YAAY,CAAA;AAE9D;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,OAAO,EACP,OAAO,GAIR;IACC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACxC,MAAM,IAAI,GAAG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IACxE,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,KAAK,MAAM,CAAA;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAElC,OAAO,CACL,eAAK,SAAS,EAAE,gBAAgB,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,aAC/D,OAAO,IAAI,CACV,eAAK,SAAS,EAAC,uDAAuD,aACpE,YAAG,SAAS,EAAC,8DAA8D,6BAEvE,EACJ,YAAG,SAAS,EAAC,4BAA4B,8EAErC,IACA,CACP,EACA,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CACb,cACE,SAAS,EAAC,qEAAqE,EAC/E,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GACzC,CACH,CAAC,CAAC,CAAC,CACF,YAAG,SAAS,EAAC,gDAAgD,YAC1D,MAAM,KAAK,OAAO;oBACjB,CAAC,CAAC,yCAAyC;oBAC3C,CAAC,CAAC,iCAAiC,GACnC,CACL,IACG,CACP,CAAA;AACH,CAAC"}
@@ -53,6 +53,12 @@ export function PostEditorCanvas({ sections, header, context, selectedId, viewpo
53
53
  return (_jsx("div", { ref: containerRef, className: "bg-muted h-full overflow-auto p-6", children: _jsx("div", { className: "mx-auto", style: { width: vp.width * scale, height: surfaceHeight ?? undefined }, children: _jsxs("div", { ref: surfaceRef, className: "border-border origin-top overflow-hidden rounded-xl border bg-white shadow-sm", style: { width: vp.width, transform: `scale(${scale})`, transformOrigin: 'top left' }, children: [_jsx(PostHeader, { config: header, context: context }), sections.length === 0 ? (_jsx(EmptyBody, { onAddSection: onAddSection })) : (sections.map((section) => (_jsx(SectionRenderer, { section: section, context: context, editable: true, selected: section.id === selectedId, onSelect: onSelect, registerRef: registerRef }, section.id))))] }) }) }));
54
54
  }
55
55
  function EmptyBody({ onAddSection }) {
56
- return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-3 border-t border-zinc-100 px-6 py-16 text-center", children: [_jsx("span", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-zinc-100", children: _jsx(FileText, { className: "h-5 w-5 text-zinc-400", "aria-hidden": true }) }), _jsx("p", { className: "text-sm text-zinc-500", children: "The header is set by the template. Add body sections to build out this post." }), _jsxs("button", { type: "button", onClick: onAddSection, className: "inline-flex items-center gap-2 rounded-lg bg-violet-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-violet-700", children: [_jsx(Plus, { className: "h-4 w-4", "aria-hidden": true }), "Add Section"] })] }));
56
+ // This block sits inside the fixed-white preview surface, so the neutral
57
+ // greys intentionally match the website-preview palette used by PostHeader
58
+ // and the section renderers (not the admin theme tokens, which flip in dark
59
+ // mode and would lose contrast on the always-white surface). The CTA is the
60
+ // one true admin affordance here, so it uses the brand `primary` token,
61
+ // which carries a guaranteed-contrast foreground in both modes.
62
+ return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-3 border-t border-zinc-100 px-6 py-16 text-center", children: [_jsx("span", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-zinc-100", children: _jsx(FileText, { className: "h-5 w-5 text-zinc-400", "aria-hidden": true }) }), _jsx("p", { className: "text-sm text-zinc-500", children: "The header is set by the template. Add body sections to build out this post." }), _jsxs("button", { type: "button", onClick: onAddSection, className: "bg-primary text-primary-foreground hover:bg-primary/90 inline-flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", children: [_jsx(Plus, { className: "h-4 w-4", "aria-hidden": true }), "Add Section"] })] }));
57
63
  }
58
64
  //# sourceMappingURL=PostEditorCanvas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PostEditorCanvas.js","sourceRoot":"","sources":["../../../src/views/post-editor/PostEditorCanvas.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,eAAe,EAA0B,MAAM,kCAAkC,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAmB,MAAM,6BAA6B,CAAA;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAY5C;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EACR,MAAM,EACN,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,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AAoB;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;CAC7C;AAcD,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAuK7F"}
1
+ {"version":3,"file":"PostFieldsModal.d.ts","sourceRoot":"","sources":["../../../src/views/post-editor/PostFieldsModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAElE,UAAU,oBAAoB;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;CAC7C;AAcD,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAoL7F"}
@@ -3,6 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useEffect, useState } from 'react';
4
4
  import { Modal } from '../../components/ui/Modal.js';
5
5
  import { Button } from '../../components/ui/Button.js';
6
+ import { MediaPickerModal } from '../../components/MediaPickerModal.js';
7
+ import { RichTextField } from '../../fields/RichTextField.js';
6
8
  const LABEL = 'text-foreground mb-1 block text-xs font-medium';
7
9
  const INPUT = 'border-input bg-input-background text-foreground focus-visible:ring-ring w-full rounded-md border px-2.5 py-1.5 text-sm focus-visible:ring-2 focus-visible:outline-none';
8
10
  function slugify(value) {
@@ -23,6 +25,7 @@ export function PostFieldsModal({ open, post, canEdit, onClose, onSave }) {
23
25
  const [seoTitle, setSeoTitle] = useState(post.seoTitle);
24
26
  const [seoDescription, setSeoDescription] = useState(post.seoDescription);
25
27
  const [slugTouched, setSlugTouched] = useState(Boolean(post.slug));
28
+ const [mediaOpen, setMediaOpen] = useState(false);
26
29
  useEffect(() => {
27
30
  if (!open)
28
31
  return;
@@ -45,9 +48,12 @@ export function PostFieldsModal({ open, post, canEdit, onClose, onSave }) {
45
48
  onSave({ title, slug, excerpt, featuredImage, category, body, seoTitle, seoDescription });
46
49
  onClose();
47
50
  }
48
- return (_jsx(Modal, { open: open, onClose: onClose, title: "Post details", actions: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", onClick: onClose, children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: handleSave, disabled: !canEdit, children: "Done" })] }), children: _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsxs("label", { className: LABEL, htmlFor: "pf-title", children: ["Title ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "pf-title", className: INPUT, value: title, disabled: !canEdit, onChange: (e) => handleTitle(e.target.value) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsxs("label", { className: LABEL, htmlFor: "pf-slug", children: ["Slug ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "pf-slug", className: INPUT, value: slug, disabled: !canEdit, onChange: (e) => {
49
- setSlugTouched(true);
50
- setSlug(slugify(e.target.value));
51
- } })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-category", children: "Category" }), _jsx("input", { id: "pf-category", className: INPUT, value: category, disabled: !canEdit, placeholder: "e.g. Product", onChange: (e) => setCategory(e.target.value) })] })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-excerpt", children: "Excerpt" }), _jsx("textarea", { id: "pf-excerpt", className: `${INPUT} min-h-[60px] resize-y`, value: excerpt, disabled: !canEdit, placeholder: "A short summary shown in listings and the header.", onChange: (e) => setExcerpt(e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-image", children: "Featured image URL" }), _jsx("input", { id: "pf-image", className: INPUT, value: featuredImage, disabled: !canEdit, placeholder: "https://\u2026", onChange: (e) => setFeaturedImage(e.target.value) }), featuredImage && (_jsx("div", { className: "border-border bg-muted mt-2 overflow-hidden rounded-md border", children: _jsx("img", { src: featuredImage, alt: "", className: "h-28 w-full object-cover" }) }))] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-body", children: "Body" }), _jsx("textarea", { id: "pf-body", className: `${INPUT} min-h-[120px] resize-y`, value: body, disabled: !canEdit, placeholder: "The main post content. Shown by the Article Body section.", onChange: (e) => setBody(e.target.value) }), _jsx("p", { className: "text-muted-foreground mt-1 text-xs", children: "Rendered by the Article Body section when its source is set to the post Body field." })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-seo-title", children: "SEO title" }), _jsx("input", { id: "pf-seo-title", className: INPUT, value: seoTitle, disabled: !canEdit, onChange: (e) => setSeoTitle(e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-seo-desc", children: "SEO description" }), _jsx("textarea", { id: "pf-seo-desc", className: `${INPUT} min-h-[60px] resize-y`, value: seoDescription, disabled: !canEdit, onChange: (e) => setSeoDescription(e.target.value) })] })] }) }));
51
+ return (_jsxs(Modal, { open: open, onClose: onClose, title: "Post details", actions: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", onClick: onClose, children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: handleSave, disabled: !canEdit, children: "Done" })] }), children: [_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsxs("label", { className: LABEL, htmlFor: "pf-title", children: ["Title ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "pf-title", className: INPUT, value: title, disabled: !canEdit, onChange: (e) => handleTitle(e.target.value) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsxs("label", { className: LABEL, htmlFor: "pf-slug", children: ["Slug ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "pf-slug", className: INPUT, value: slug, disabled: !canEdit, onChange: (e) => {
52
+ setSlugTouched(true);
53
+ setSlug(slugify(e.target.value));
54
+ } })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-category", children: "Category" }), _jsx("input", { id: "pf-category", className: INPUT, value: category, disabled: !canEdit, placeholder: "e.g. Product", onChange: (e) => setCategory(e.target.value) })] })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-excerpt", children: "Excerpt" }), _jsx("textarea", { id: "pf-excerpt", className: `${INPUT} min-h-[60px] resize-y`, value: excerpt, disabled: !canEdit, placeholder: "A short summary shown in listings and the header.", onChange: (e) => setExcerpt(e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-image", children: "Featured image" }), _jsxs("div", { className: "flex gap-2", children: [_jsx("input", { id: "pf-image", className: `${INPUT} flex-1`, value: featuredImage, disabled: !canEdit, placeholder: "https://\u2026 or pick from the media library", onChange: (e) => setFeaturedImage(e.target.value) }), _jsx("button", { type: "button", disabled: !canEdit, onClick: () => setMediaOpen(true), className: "bg-accent text-foreground border-border hover:bg-accent/80 shrink-0 rounded-md border px-3 py-1.5 text-xs font-medium disabled:opacity-50", children: "Browse" })] }), featuredImage && (_jsx("div", { className: "border-border bg-muted mt-2 overflow-hidden rounded-md border", children: _jsx("img", { src: featuredImage, alt: "", className: "h-28 w-full object-cover" }) }))] }), _jsx("div", { children: _jsx(RichTextField, { label: "Body", value: body, onChange: canEdit ? setBody : () => { }, helpText: "Rendered by the Article Body section when its source is set to the post Body field." }) }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-seo-title", children: "SEO title" }), _jsx("input", { id: "pf-seo-title", className: INPUT, value: seoTitle, disabled: !canEdit, onChange: (e) => setSeoTitle(e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-seo-desc", children: "SEO description" }), _jsx("textarea", { id: "pf-seo-desc", className: `${INPUT} min-h-[60px] resize-y`, value: seoDescription, disabled: !canEdit, onChange: (e) => setSeoDescription(e.target.value) })] })] }), _jsx(MediaPickerModal, { open: mediaOpen, onClose: () => setMediaOpen(false), onSelect: (url) => {
55
+ setFeaturedImage(url);
56
+ setMediaOpen(false);
57
+ }, accept: "image/*" })] }));
52
58
  }
53
59
  //# sourceMappingURL=PostFieldsModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PostFieldsModal.js","sourceRoot":"","sources":["../../../src/views/post-editor/PostFieldsModal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAWtD,MAAM,KAAK,GAAG,gDAAgD,CAAA;AAC9D,MAAM,KAAK,GACT,yKAAyK,CAAA;AAE3K,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,KAAK;SACT,WAAW,EAAE;SACb,IAAI,EAAE;SACN,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AAC5B,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAwB;IAC5F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC9C,MAAM,CAAC,IAAI,EAA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AM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,UAAU,eAAe;IACvB,MAAM,EAAE,gBAAgB,CAAA;IACxB,OAAO,EAAE,iBAAiB,CAAA;CAC3B;AASD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,eAAe,2CAiE9D"}
1
+ {"version":3,"file":"PostHeader.d.ts","sourceRoot":"","sources":["../../../src/views/post-editor/PostHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,UAAU,eAAe;IACvB,MAAM,EAAE,gBAAgB,CAAA;IACxB,OAAO,EAAE,iBAAiB,CAAA;CAC3B;AASD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,eAAe,2CAgE9D"}