@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.
- package/dist/AdminRoot.d.ts.map +1 -1
- package/dist/AdminRoot.js +8 -5
- package/dist/AdminRoot.js.map +1 -1
- package/dist/__tests__/layout/primitives.test.d.ts +2 -0
- package/dist/__tests__/layout/primitives.test.d.ts.map +1 -0
- package/dist/__tests__/layout/primitives.test.js +34 -0
- package/dist/__tests__/layout/primitives.test.js.map +1 -0
- package/dist/__tests__/lib/cv.test.d.ts +2 -0
- package/dist/__tests__/lib/cv.test.d.ts.map +1 -0
- package/dist/__tests__/lib/cv.test.js +66 -0
- package/dist/__tests__/lib/cv.test.js.map +1 -0
- package/dist/actuate-admin.css +1 -1
- package/dist/assets/actuate-logo.d.ts +36 -0
- package/dist/assets/actuate-logo.d.ts.map +1 -0
- package/dist/assets/actuate-logo.js +15 -0
- package/dist/assets/actuate-logo.js.map +1 -0
- package/dist/components/Breadcrumbs.js +2 -2
- package/dist/components/CommandPalette.js +10 -10
- package/dist/components/ContentOverviewChart.js +3 -3
- package/dist/components/ErrorBoundary.js +1 -1
- package/dist/components/FocalPointPicker.js +2 -2
- package/dist/components/FolderTree.js +20 -20
- package/dist/components/LivePreview.js +3 -3
- package/dist/components/LocaleSwitcher.js +1 -1
- package/dist/components/MediaPickerModal.js +4 -4
- package/dist/components/PresenceIndicator.js +1 -1
- package/dist/components/SEOConfigPanel.d.ts +2 -0
- package/dist/components/SEOConfigPanel.d.ts.map +1 -0
- package/dist/components/SEOConfigPanel.js +174 -0
- package/dist/components/SEOConfigPanel.js.map +1 -0
- package/dist/components/SEOPanel.js +9 -9
- package/dist/components/SEOPerformance.js +2 -2
- package/dist/components/SchedulePublishDialog.d.ts +18 -0
- package/dist/components/SchedulePublishDialog.d.ts.map +1 -0
- package/dist/components/SchedulePublishDialog.js +106 -0
- package/dist/components/SchedulePublishDialog.js.map +1 -0
- package/dist/components/SharePreviewLinkDialog.d.ts +17 -0
- package/dist/components/SharePreviewLinkDialog.d.ts.map +1 -0
- package/dist/components/SharePreviewLinkDialog.js +83 -0
- package/dist/components/SharePreviewLinkDialog.js.map +1 -0
- package/dist/components/TipTapEditor.js +5 -5
- package/dist/components/VersionHistory.js +2 -2
- package/dist/components/ui/Badge.d.ts +33 -3
- package/dist/components/ui/Badge.d.ts.map +1 -1
- package/dist/components/ui/Badge.js +42 -8
- package/dist/components/ui/Badge.js.map +1 -1
- package/dist/components/ui/Button.d.ts +19 -8
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/components/ui/Button.js +35 -14
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/Card.d.ts +26 -0
- package/dist/components/ui/Card.d.ts.map +1 -0
- package/dist/components/ui/Card.js +45 -0
- package/dist/components/ui/Card.js.map +1 -0
- package/dist/components/ui/DataTable.js +1 -1
- package/dist/components/ui/Input.d.ts +15 -0
- package/dist/components/ui/Input.d.ts.map +1 -0
- package/dist/components/ui/Input.js +23 -0
- package/dist/components/ui/Input.js.map +1 -0
- package/dist/components/ui/SearchInput.js +1 -1
- package/dist/components/ui/Select.d.ts +16 -0
- package/dist/components/ui/Select.d.ts.map +1 -0
- package/dist/components/ui/Select.js +25 -0
- package/dist/components/ui/Select.js.map +1 -0
- package/dist/components/ui/Toast.js +1 -1
- package/dist/components/ui/index.d.ts +10 -4
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +5 -2
- package/dist/components/ui/index.js.map +1 -1
- package/dist/fields/BlockBuilderField.js +3 -3
- package/dist/fields/DateField.js +1 -1
- package/dist/fields/RelationshipField.js +3 -3
- package/dist/fields/TextField.js +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/Header.js +1 -1
- package/dist/layout/Layout.d.ts +14 -0
- package/dist/layout/Layout.d.ts.map +1 -1
- package/dist/layout/Layout.js +17 -11
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/Sidebar.js +21 -11
- package/dist/layout/Sidebar.js.map +1 -1
- package/dist/layout/primitives/AdminShell.d.ts +43 -0
- package/dist/layout/primitives/AdminShell.d.ts.map +1 -0
- package/dist/layout/primitives/AdminShell.js +51 -0
- package/dist/layout/primitives/AdminShell.js.map +1 -0
- package/dist/layout/primitives/Box.d.ts +19 -0
- package/dist/layout/primitives/Box.d.ts.map +1 -0
- package/dist/layout/primitives/Box.js +12 -0
- package/dist/layout/primitives/Box.js.map +1 -0
- package/dist/layout/primitives/Cluster.d.ts +27 -0
- package/dist/layout/primitives/Cluster.d.ts.map +1 -0
- package/dist/layout/primitives/Cluster.js +37 -0
- package/dist/layout/primitives/Cluster.js.map +1 -0
- package/dist/layout/primitives/Grid.d.ts +45 -0
- package/dist/layout/primitives/Grid.d.ts.map +1 -0
- package/dist/layout/primitives/Grid.js +59 -0
- package/dist/layout/primitives/Grid.js.map +1 -0
- package/dist/layout/primitives/PageContainer.d.ts +36 -0
- package/dist/layout/primitives/PageContainer.d.ts.map +1 -0
- package/dist/layout/primitives/PageContainer.js +41 -0
- package/dist/layout/primitives/PageContainer.js.map +1 -0
- package/dist/layout/primitives/Split.d.ts +34 -0
- package/dist/layout/primitives/Split.d.ts.map +1 -0
- package/dist/layout/primitives/Split.js +27 -0
- package/dist/layout/primitives/Split.js.map +1 -0
- package/dist/layout/primitives/Stack.d.ts +23 -0
- package/dist/layout/primitives/Stack.d.ts.map +1 -0
- package/dist/layout/primitives/Stack.js +34 -0
- package/dist/layout/primitives/Stack.js.map +1 -0
- package/dist/layout/primitives/index.d.ts +30 -0
- package/dist/layout/primitives/index.d.ts.map +1 -0
- package/dist/layout/primitives/index.js +22 -0
- package/dist/layout/primitives/index.js.map +1 -0
- package/dist/layout/primitives/tokens.d.ts +48 -0
- package/dist/layout/primitives/tokens.d.ts.map +1 -0
- package/dist/layout/primitives/tokens.js +54 -0
- package/dist/layout/primitives/tokens.js.map +1 -0
- package/dist/lib/cv.d.ts +53 -0
- package/dist/lib/cv.d.ts.map +1 -0
- package/dist/lib/cv.js +39 -0
- package/dist/lib/cv.js.map +1 -0
- package/dist/views/ApiKeys.d.ts.map +1 -1
- package/dist/views/ApiKeys.js +13 -11
- package/dist/views/ApiKeys.js.map +1 -1
- package/dist/views/CollectionList.js +8 -8
- package/dist/views/Dashboard.d.ts.map +1 -1
- package/dist/views/Dashboard.js +333 -78
- package/dist/views/Dashboard.js.map +1 -1
- package/dist/views/DocumentEdit.d.ts.map +1 -1
- package/dist/views/DocumentEdit.js +17 -5
- package/dist/views/DocumentEdit.js.map +1 -1
- package/dist/views/ForgotPassword.js +2 -2
- package/dist/views/FormEditor.js +5 -5
- package/dist/views/FormSubmissions.js +6 -6
- package/dist/views/Forms.js +2 -2
- package/dist/views/Login.d.ts +16 -1
- package/dist/views/Login.d.ts.map +1 -1
- package/dist/views/Login.js +17 -7
- package/dist/views/Login.js.map +1 -1
- package/dist/views/MediaBrowser.js +16 -16
- package/dist/views/PageEditor.js +2 -2
- package/dist/views/Pages.js +10 -10
- package/dist/views/PostEditor.js +2 -2
- package/dist/views/Posts.js +4 -4
- package/dist/views/Redirects.js +4 -4
- package/dist/views/ResetPassword.js +2 -2
- package/dist/views/SEO.js +6 -6
- package/dist/views/ScriptTagEditor.js +4 -4
- package/dist/views/ScriptTags.js +2 -2
- package/dist/views/Settings.d.ts.map +1 -1
- package/dist/views/Settings.js +9 -8
- package/dist/views/Settings.js.map +1 -1
- package/dist/views/SetupWizard.js +2 -2
- package/dist/views/Users.js +4 -4
- package/dist/views/page-builder/AIBlockAssist.js +1 -1
- package/dist/views/page-builder/AIGenerateDialog.js +10 -10
- package/dist/views/page-builder/BlockEditor.js +10 -10
- package/dist/views/page-builder/BlockPicker.js +4 -4
- package/dist/views/page-builder/BottomBar.js +1 -1
- package/dist/views/page-builder/BuilderToolbar.js +2 -2
- package/dist/views/page-builder/ContextPanel.js +2 -2
- package/dist/views/page-builder/DesignScore.js +9 -9
- package/dist/views/page-builder/NodeSettings.js +8 -8
- package/dist/views/page-builder/PageBuilder.js +3 -3
- package/dist/views/page-builder/PageSettings.js +1 -1
- package/dist/views/page-builder/PageTemplates.js +2 -2
- package/dist/views/page-builder/SEOPanel.js +13 -13
- package/dist/views/page-builder/SavedSections.js +5 -5
- package/dist/views/page-builder/TemplatePicker.js +2 -2
- package/dist/views/page-builder/block-renderers/CTAPreview.js +5 -5
- package/dist/views/page-builder/block-renderers/CardsPreview.js +1 -1
- package/dist/views/page-builder/block-renderers/CodePreview.js +1 -1
- package/dist/views/page-builder/block-renderers/FAQPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/FallbackPreview.js +1 -1
- package/dist/views/page-builder/block-renderers/FormPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/GalleryPreview.js +5 -5
- package/dist/views/page-builder/block-renderers/HeroPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/ImagePreview.js +3 -3
- package/dist/views/page-builder/block-renderers/TextPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/VideoPreview.js +4 -4
- package/dist/views/page-builder/canvas/BlockRenderer.js +1 -1
- package/dist/views/page-builder/canvas/BuilderCanvas.js +3 -3
- package/dist/views/page-builder/canvas/ColumnRenderer.js +2 -2
- package/dist/views/page-builder/canvas/ContainerRenderer.js +2 -2
- package/dist/views/page-builder/canvas/RowRenderer.js +2 -2
- package/dist/views/page-builder/canvas/SectionRenderer.js +2 -2
- package/package.json +6 -2
- package/src/AdminRoot.tsx +21 -11
- package/src/__tests__/layout/primitives.test.ts +37 -0
- package/src/__tests__/lib/cv.test.ts +74 -0
- package/src/assets/actuate-logo.tsx +72 -0
- package/src/components/Breadcrumbs.tsx +6 -6
- package/src/components/CommandPalette.tsx +34 -34
- package/src/components/ContentOverviewChart.tsx +3 -3
- package/src/components/ErrorBoundary.tsx +3 -3
- package/src/components/FocalPointPicker.tsx +4 -4
- package/src/components/FolderTree.tsx +38 -38
- package/src/components/LivePreview.tsx +16 -16
- package/src/components/LocaleSwitcher.tsx +7 -7
- package/src/components/MediaPickerModal.tsx +21 -21
- package/src/components/PresenceIndicator.tsx +2 -2
- package/src/components/SEOConfigPanel.tsx +582 -0
- package/src/components/SEOPanel.tsx +46 -46
- package/src/components/SEOPerformance.tsx +21 -21
- package/src/components/SchedulePublishDialog.tsx +241 -0
- package/src/components/SharePreviewLinkDialog.tsx +227 -0
- package/src/components/TipTapEditor.tsx +33 -33
- package/src/components/VersionHistory.tsx +16 -16
- package/src/components/ui/Badge.tsx +66 -14
- package/src/components/ui/Button.tsx +70 -33
- package/src/components/ui/Card.tsx +101 -0
- package/src/components/ui/DataTable.tsx +1 -1
- package/src/components/ui/Input.tsx +35 -0
- package/src/components/ui/SearchInput.tsx +4 -4
- package/src/components/ui/Select.tsx +56 -0
- package/src/components/ui/Toast.tsx +1 -1
- package/src/components/ui/index.ts +18 -4
- package/src/fields/BlockBuilderField.tsx +3 -3
- package/src/fields/DateField.tsx +1 -1
- package/src/fields/RelationshipField.tsx +10 -10
- package/src/fields/TextField.tsx +1 -1
- package/src/index.ts +32 -0
- package/src/layout/Header.tsx +28 -28
- package/src/layout/Layout.tsx +39 -46
- package/src/layout/Sidebar.tsx +37 -64
- package/src/layout/primitives/AdminShell.tsx +118 -0
- package/src/layout/primitives/Box.tsx +30 -0
- package/src/layout/primitives/Cluster.tsx +74 -0
- package/src/layout/primitives/Grid.tsx +120 -0
- package/src/layout/primitives/PageContainer.tsx +96 -0
- package/src/layout/primitives/Split.tsx +73 -0
- package/src/layout/primitives/Stack.tsx +67 -0
- package/src/layout/primitives/index.ts +36 -0
- package/src/layout/primitives/tokens.ts +76 -0
- package/src/lib/cv.ts +96 -0
- package/src/styles/build-input.css +1 -1
- package/src/views/ApiKeys.tsx +57 -57
- package/src/views/CollectionList.tsx +30 -30
- package/src/views/Dashboard.tsx +737 -186
- package/src/views/DocumentEdit.tsx +90 -10
- package/src/views/ForgotPassword.tsx +18 -18
- package/src/views/FormEditor.tsx +75 -75
- package/src/views/FormSubmissions.tsx +76 -76
- package/src/views/Forms.tsx +27 -27
- package/src/views/Login.tsx +65 -25
- package/src/views/MediaBrowser.tsx +127 -127
- package/src/views/PageEditor.tsx +25 -25
- package/src/views/Pages.tsx +59 -59
- package/src/views/PostEditor.tsx +37 -37
- package/src/views/Posts.tsx +48 -48
- package/src/views/Redirects.tsx +21 -21
- package/src/views/ResetPassword.tsx +28 -28
- package/src/views/SEO.tsx +144 -144
- package/src/views/ScriptTagEditor.tsx +24 -24
- package/src/views/ScriptTags.tsx +10 -10
- package/src/views/Settings.tsx +88 -80
- package/src/views/SetupWizard.tsx +28 -28
- package/src/views/Users.tsx +20 -20
- package/src/views/page-builder/AIBlockAssist.tsx +1 -1
- package/src/views/page-builder/AIGenerateDialog.tsx +63 -63
- package/src/views/page-builder/BlockEditor.tsx +26 -26
- package/src/views/page-builder/BlockPicker.tsx +22 -22
- package/src/views/page-builder/BottomBar.tsx +8 -8
- package/src/views/page-builder/BuilderToolbar.tsx +17 -17
- package/src/views/page-builder/ContextPanel.tsx +3 -3
- package/src/views/page-builder/DesignScore.tsx +21 -21
- package/src/views/page-builder/NodeSettings.tsx +27 -27
- package/src/views/page-builder/PageBuilder.tsx +11 -11
- package/src/views/page-builder/PageSettings.tsx +4 -4
- package/src/views/page-builder/PageTemplates.tsx +18 -18
- package/src/views/page-builder/SEOPanel.tsx +53 -53
- package/src/views/page-builder/SavedSections.tsx +37 -37
- package/src/views/page-builder/TemplatePicker.tsx +17 -17
- package/src/views/page-builder/block-renderers/CTAPreview.tsx +13 -13
- package/src/views/page-builder/block-renderers/CardsPreview.tsx +5 -5
- package/src/views/page-builder/block-renderers/CodePreview.tsx +6 -6
- package/src/views/page-builder/block-renderers/FAQPreview.tsx +13 -13
- package/src/views/page-builder/block-renderers/FallbackPreview.tsx +3 -3
- package/src/views/page-builder/block-renderers/FormPreview.tsx +20 -20
- package/src/views/page-builder/block-renderers/GalleryPreview.tsx +8 -8
- package/src/views/page-builder/block-renderers/HeroPreview.tsx +16 -16
- package/src/views/page-builder/block-renderers/ImagePreview.tsx +4 -4
- package/src/views/page-builder/block-renderers/TextPreview.tsx +14 -14
- package/src/views/page-builder/block-renderers/VideoPreview.tsx +12 -12
- package/src/views/page-builder/canvas/BlockRenderer.tsx +4 -4
- package/src/views/page-builder/canvas/BuilderCanvas.tsx +6 -6
- package/src/views/page-builder/canvas/ColumnRenderer.tsx +3 -3
- package/src/views/page-builder/canvas/ContainerRenderer.tsx +2 -2
- package/src/views/page-builder/canvas/RowRenderer.tsx +2 -2
- package/src/views/page-builder/canvas/SectionRenderer.tsx +2 -2
|
@@ -29,11 +29,11 @@ function getScoreLabel(score) {
|
|
|
29
29
|
function StatusIcon({ status }) {
|
|
30
30
|
switch (status) {
|
|
31
31
|
case 'good':
|
|
32
|
-
return _jsx(CheckCircle2, { size: 14, className: "text-green-500
|
|
32
|
+
return _jsx(CheckCircle2, { size: 14, className: "shrink-0 text-green-500" });
|
|
33
33
|
case 'warning':
|
|
34
|
-
return _jsx(AlertCircle, { size: 14, className: "text-amber-500
|
|
34
|
+
return _jsx(AlertCircle, { size: 14, className: "shrink-0 text-amber-500" });
|
|
35
35
|
case 'error':
|
|
36
|
-
return _jsx(XCircle, { size: 14, className: "text-red-500
|
|
36
|
+
return _jsx(XCircle, { size: 14, className: "shrink-0 text-red-500" });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
function ScoreRing({ score }) {
|
|
@@ -49,13 +49,13 @@ function ScoreSummary({ checks }) {
|
|
|
49
49
|
const passed = checks.filter((c) => c.status === 'good').length;
|
|
50
50
|
const warnings = checks.filter((c) => c.status === 'warning').length;
|
|
51
51
|
const errors = checks.filter((c) => c.status === 'error').length;
|
|
52
|
-
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(CheckCircle2, { size: 12, className: "text-green-500" }), _jsxs("span", { className: "text-
|
|
52
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(CheckCircle2, { size: 12, className: "text-green-500" }), _jsxs("span", { className: "text-muted-foreground text-xs", children: [passed, " passed"] })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(AlertCircle, { size: 12, className: "text-amber-500" }), _jsxs("span", { className: "text-muted-foreground text-xs", children: [warnings, " warnings"] })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(XCircle, { size: 12, className: "text-red-500" }), _jsxs("span", { className: "text-muted-foreground text-xs", children: [errors, " issues"] })] })] }));
|
|
53
53
|
}
|
|
54
54
|
function CollapsibleSection({ title, icon: Icon, expanded, onToggle, children, }) {
|
|
55
|
-
return (_jsxs("div", { className: "border-
|
|
55
|
+
return (_jsxs("div", { className: "border-border border-b last:border-b-0", children: [_jsxs("button", { type: "button", className: "hover:bg-muted/50 flex w-full items-center justify-between px-4 py-3 text-left transition-colors", onClick: onToggle, "aria-expanded": expanded, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Icon, { size: 14, className: "text-muted-foreground" }), _jsx("span", { className: "text-foreground text-xs font-medium", children: title })] }), expanded ? (_jsx(ChevronUp, { size: 14, className: "text-muted-foreground" })) : (_jsx(ChevronDown, { size: 14, className: "text-muted-foreground" }))] }), expanded && _jsx("div", { className: "px-4 pb-4", children: children })] }));
|
|
56
56
|
}
|
|
57
57
|
function SEOChecksList({ checks }) {
|
|
58
|
-
return (_jsx("div", { className: "flex flex-col gap-2", children: checks.map((check) => (_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(StatusIcon, { status: check.status }), _jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-xs font-medium
|
|
58
|
+
return (_jsx("div", { className: "flex flex-col gap-2", children: checks.map((check) => (_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(StatusIcon, { status: check.status }), _jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-foreground text-xs font-medium", children: check.label }), _jsx("span", { className: "text-muted-foreground text-xs", children: check.detail })] })] }, check.id))) }));
|
|
59
59
|
}
|
|
60
60
|
function ReadabilityGrid({ readability }) {
|
|
61
61
|
const fleschLabel = readability.fleschScore >= 60
|
|
@@ -63,26 +63,26 @@ function ReadabilityGrid({ readability }) {
|
|
|
63
63
|
: readability.fleschScore >= 30
|
|
64
64
|
? 'Moderate'
|
|
65
65
|
: 'Difficult';
|
|
66
|
-
return (_jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { className: "bg-muted/50
|
|
66
|
+
return (_jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { className: "bg-muted/50 flex flex-col gap-1 rounded-md p-3", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(BarChart3, { size: 12, className: "text-muted-foreground" }), _jsx("span", { className: "text-muted-foreground text-xs", children: "Flesch Score" })] }), _jsx("span", { className: `text-sm font-medium ${getScoreColor(readability.fleschScore)}`, children: readability.fleschScore }), _jsx("span", { className: "text-muted-foreground text-xs", children: fleschLabel })] }), _jsxs("div", { className: "bg-muted/50 flex flex-col gap-1 rounded-md p-3", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Type, { size: 12, className: "text-muted-foreground" }), _jsx("span", { className: "text-muted-foreground text-xs", children: "Word Count" })] }), _jsx("span", { className: "text-foreground text-sm font-medium", children: readability.wordCount }), _jsx("span", { className: "text-muted-foreground text-xs", children: readability.wordCount >= 300 ? 'Good length' : 'Short' })] }), _jsxs("div", { className: "bg-muted/50 flex flex-col gap-1 rounded-md p-3", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(FileText, { size: 12, className: "text-muted-foreground" }), _jsx("span", { className: "text-muted-foreground text-xs", children: "Avg Sentence" })] }), _jsxs("span", { className: "text-foreground text-sm font-medium", children: [readability.avgSentenceLength, " words"] }), _jsx("span", { className: "text-muted-foreground text-xs", children: readability.avgSentenceLength <= 20 ? 'Good' : 'Long' })] }), _jsxs("div", { className: "bg-muted/50 flex flex-col gap-1 rounded-md p-3", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Clock, { size: 12, className: "text-muted-foreground" }), _jsx("span", { className: "text-muted-foreground text-xs", children: "Reading Time" })] }), _jsxs("span", { className: "text-foreground text-sm font-medium", children: [readability.readingTime, " min"] }), _jsxs("span", { className: "text-muted-foreground text-xs", children: ["~", readability.wordCount, " words"] })] })] }));
|
|
67
67
|
}
|
|
68
68
|
function PerBlockHints({ hints }) {
|
|
69
|
-
return (_jsx("div", { className: "flex flex-col gap-2", children: hints.map((hint, index) => (_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(StatusIcon, { status: hint.status }), _jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-xs font-medium
|
|
69
|
+
return (_jsx("div", { className: "flex flex-col gap-2", children: hints.map((hint, index) => (_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(StatusIcon, { status: hint.status }), _jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-foreground text-xs font-medium", children: hint.label }), _jsx("span", { className: "text-muted-foreground text-xs", children: hint.detail })] })] }, `${hint.id}-${index}`))) }));
|
|
70
70
|
}
|
|
71
71
|
function BasicSEOFields({ pageSettings, onPageSettingsChange, }) {
|
|
72
72
|
const metaTitleLength = (pageSettings.metaTitle || '').length;
|
|
73
73
|
const metaDescLength = (pageSettings.metaDescription || '').length;
|
|
74
|
-
return (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("label", { className: "text-xs font-medium
|
|
74
|
+
return (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("label", { className: "text-foreground text-xs font-medium", children: "Meta Title" }), _jsxs("span", { className: `text-xs ${metaTitleLength > 60 ? 'text-red-500' : metaTitleLength > 0 ? 'text-muted-foreground' : 'text-muted-foreground'}`, children: [metaTitleLength, "/60"] })] }), _jsx("input", { type: "text", value: pageSettings.metaTitle || '', onChange: (e) => onPageSettingsChange({ metaTitle: e.target.value }), placeholder: "Page title for search engines", className: "bg-input-background border-border text-foreground placeholder:text-muted-foreground focus:ring-primary w-full rounded-md border px-3 py-2 text-sm focus:ring-1 focus:outline-none" })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("label", { className: "text-foreground text-xs font-medium", children: "Meta Description" }), _jsxs("span", { className: `text-xs ${metaDescLength > 160 ? 'text-red-500' : metaDescLength > 0 ? 'text-muted-foreground' : 'text-muted-foreground'}`, children: [metaDescLength, "/160"] })] }), _jsx("textarea", { value: pageSettings.metaDescription || '', onChange: (e) => onPageSettingsChange({ metaDescription: e.target.value }), placeholder: "Brief description of the page content", rows: 3, className: "bg-input-background border-border text-foreground placeholder:text-muted-foreground focus:ring-primary w-full resize-none rounded-md border px-3 py-2 text-sm focus:ring-1 focus:outline-none" })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("label", { className: "text-foreground text-xs font-medium", children: "Focus Keyphrase" }), _jsx("input", { type: "text", value: pageSettings.focusKeyphrase || '', onChange: (e) => onPageSettingsChange({ focusKeyphrase: e.target.value }), placeholder: "Primary keyword or phrase", className: "bg-input-background border-border text-foreground placeholder:text-muted-foreground focus:ring-primary w-full rounded-md border px-3 py-2 text-sm focus:ring-1 focus:outline-none" })] })] }));
|
|
75
75
|
}
|
|
76
76
|
function SearchPreview({ pageSettings }) {
|
|
77
77
|
const title = pageSettings.metaTitle || pageSettings.title || 'Untitled Page';
|
|
78
78
|
const description = pageSettings.metaDescription || 'No description set';
|
|
79
79
|
const slug = pageSettings.slug || 'page';
|
|
80
|
-
return (_jsxs("div", { className: "bg-background rounded-md border
|
|
80
|
+
return (_jsxs("div", { className: "bg-background border-border rounded-md border p-4", children: [_jsx("p", { className: "text-muted-foreground mb-2 text-xs", children: "Google Search Preview" }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("p", { className: "text-primary truncate text-sm", children: title }), _jsxs("p", { className: "truncate text-xs text-green-600", children: ["example.com/", slug] }), _jsx("p", { className: "text-muted-foreground line-clamp-2 text-xs", children: description })] })] }));
|
|
81
81
|
}
|
|
82
82
|
function SocialPreview({ pageSettings }) {
|
|
83
83
|
const title = pageSettings.metaTitle || pageSettings.title || 'Untitled Page';
|
|
84
84
|
const description = pageSettings.metaDescription || 'No description set';
|
|
85
|
-
return (_jsxs("div", { className: "bg-background
|
|
85
|
+
return (_jsxs("div", { className: "bg-background border-border overflow-hidden rounded-md border", children: [_jsx("p", { className: "text-muted-foreground px-4 pt-3 pb-2 text-xs", children: "Open Graph Preview" }), pageSettings.ogImage && (_jsx("div", { className: "bg-muted flex h-32 w-full items-center justify-center overflow-hidden", children: _jsx("img", { src: pageSettings.ogImage, alt: "OG preview", className: "h-full w-full object-cover" }) })), !pageSettings.ogImage && (_jsx("div", { className: "bg-muted flex h-32 w-full items-center justify-center", children: _jsx(Globe, { size: 24, className: "text-muted-foreground" }) })), _jsxs("div", { className: "flex flex-col gap-1 p-3", children: [_jsx("p", { className: "text-muted-foreground text-xs uppercase", children: "example.com" }), _jsx("p", { className: "text-foreground truncate text-sm font-medium", children: title }), _jsx("p", { className: "text-muted-foreground line-clamp-2 text-xs", children: description })] })] }));
|
|
86
86
|
}
|
|
87
87
|
export function BuilderSEOPanel({ tree, pageSettings, onPageSettingsChange, selectedNodeId, }) {
|
|
88
88
|
const analysis = useMemo(() => analyzeSEO(tree, pageSettings), [tree, pageSettings]);
|
|
@@ -96,8 +96,8 @@ export function BuilderSEOPanel({ tree, pageSettings, onPageSettingsChange, sele
|
|
|
96
96
|
return analysis.perBlockHints.get(selectedNodeId) || [];
|
|
97
97
|
}, [analysis.perBlockHints, selectedNodeId]);
|
|
98
98
|
if (!tree.children || tree.children.length === 0) {
|
|
99
|
-
return (_jsxs("div", { className: "
|
|
99
|
+
return (_jsxs("div", { className: "flex min-h-[200px] flex-col items-center justify-center p-6 text-center", children: [_jsx(Search, { size: 32, className: "text-muted-foreground mb-3" }), _jsx("p", { className: "text-foreground mb-1 text-sm font-medium", children: "SEO Analysis" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Add content to your page to see SEO analysis" })] }));
|
|
100
100
|
}
|
|
101
|
-
return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-4 px-4 py-5
|
|
101
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "border-border flex items-center gap-4 border-b px-4 py-5", children: [_jsx(ScoreRing, { score: analysis.score }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-foreground text-xs font-medium", children: getScoreLabel(analysis.score) }), _jsx(ScoreSummary, { checks: analysis.checks })] })] }), _jsxs("div", { className: "flex flex-col", children: [_jsx(CollapsibleSection, { title: "SEO Checks", icon: Search, expanded: expandedSections.includes('checks'), onToggle: () => toggleSection('checks'), children: _jsx(SEOChecksList, { checks: analysis.checks }) }), _jsx(CollapsibleSection, { title: "Readability", icon: BarChart3, expanded: expandedSections.includes('readability'), onToggle: () => toggleSection('readability'), children: _jsx(ReadabilityGrid, { readability: analysis.readability }) }), blockHints.length > 0 && (_jsx(CollapsibleSection, { title: "Block Hints", icon: Target, expanded: expandedSections.includes('blockHints'), onToggle: () => toggleSection('blockHints'), children: _jsx(PerBlockHints, { hints: blockHints }) })), _jsx(CollapsibleSection, { title: "Basic SEO", icon: FileText, expanded: expandedSections.includes('basicSeo'), onToggle: () => toggleSection('basicSeo'), children: _jsx(BasicSEOFields, { pageSettings: pageSettings, onPageSettingsChange: onPageSettingsChange }) }), _jsx(CollapsibleSection, { title: "Search Preview", icon: Eye, expanded: expandedSections.includes('searchPreview'), onToggle: () => toggleSection('searchPreview'), children: _jsx(SearchPreview, { pageSettings: pageSettings }) }), _jsx(CollapsibleSection, { title: "Social Preview", icon: Globe, expanded: expandedSections.includes('socialPreview'), onToggle: () => toggleSection('socialPreview'), children: _jsx(SocialPreview, { pageSettings: pageSettings }) })] })] }));
|
|
102
102
|
}
|
|
103
103
|
//# sourceMappingURL=SEOPanel.js.map
|
|
@@ -116,14 +116,14 @@ export function SavedSections({ onNavigate, config }) {
|
|
|
116
116
|
}
|
|
117
117
|
}, onCancel: () => setViewState({ mode: 'list' }) }));
|
|
118
118
|
}
|
|
119
|
-
return (_jsxs("div", { className: "p-4 pr-8", children: [_jsxs("div", { className: "mb-6 flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-medium
|
|
119
|
+
return (_jsxs("div", { className: "p-4 pr-8", children: [_jsxs("div", { className: "mb-6 flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-foreground text-2xl font-medium", children: "Saved Sections" }), _jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: "Reusable sections for the page builder" })] }), _jsxs("button", { type: "button", onClick: () => setViewState({ mode: 'create' }), className: "bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", children: [_jsx(Plus, { size: 16 }), "Create Section"] })] }), _jsxs("div", { className: "border-border mb-4 flex items-center gap-1 border-b", children: [_jsx(CategoryTab, { label: "All", active: activeCategory === 'all', onClick: () => setActiveCategory('all') }), CATEGORIES.map((cat) => (_jsx(CategoryTab, { label: cat.charAt(0).toUpperCase() + cat.slice(1), active: activeCategory === cat, onClick: () => setActiveCategory(cat) }, cat)))] }), loading && (_jsx("div", { className: "flex items-center justify-center py-16", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })), error && !loading && (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [_jsx(AlertTriangle, { size: 24, className: "text-destructive mb-2" }), _jsx("p", { className: "text-muted-foreground mb-3 text-sm", children: error }), _jsx("button", { type: "button", onClick: fetchSections, className: "text-foreground border-border hover:bg-accent rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", children: "Retry" })] })), !loading && !error && filteredSections.length === 0 && (_jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [_jsx(Layers, { size: 32, className: "text-muted-foreground mb-3" }), _jsx("p", { className: "text-foreground mb-1 text-sm font-medium", children: "No saved sections" }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: activeCategory === 'all'
|
|
120
120
|
? 'Create your first reusable section to get started.'
|
|
121
|
-
: `No sections in the "${activeCategory}" category.` }), activeCategory === 'all' && (_jsxs("button", { type: "button", onClick: () => setViewState({ mode: 'create' }), className: "flex items-center gap-2 rounded-md
|
|
121
|
+
: `No sections in the "${activeCategory}" category.` }), activeCategory === 'all' && (_jsxs("button", { type: "button", onClick: () => setViewState({ mode: 'create' }), className: "bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2 rounded-md px-3 py-1.5 text-sm font-medium transition-colors", children: [_jsx(Plus, { size: 14 }), "Create Section"] }))] })), !loading && !error && filteredSections.length > 0 && (_jsx("div", { className: "grid grid-cols-1 gap-3 lg:grid-cols-2", children: filteredSections.map((section) => (_jsxs("div", { className: "border-border bg-card hover:border-primary/50 rounded-lg border p-4 transition-colors", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-foreground truncate text-sm font-medium", children: section.name }), section.description && (_jsx("p", { className: "text-muted-foreground mt-0.5 line-clamp-2 text-xs", children: section.description }))] }), _jsx("span", { className: `shrink-0 rounded-full px-2 py-0.5 text-xs ${CATEGORY_COLORS[section.category] ?? 'bg-muted text-muted-foreground'}`, children: section.category })] }), _jsxs("div", { className: "text-muted-foreground mt-3 flex items-center gap-4 text-xs", children: [_jsxs("span", { className: "flex items-center gap-1", children: [_jsx(Hash, { size: 12 }), section.usageCount, " use", section.usageCount !== 1 ? 's' : ''] }), _jsxs("span", { className: "flex items-center gap-1", children: [_jsx(Calendar, { size: 12 }), formatDate(section.createdAt)] }), section.tree && (_jsxs("span", { className: "flex items-center gap-1", children: [_jsx(Layers, { size: 12 }), JSON.stringify(section.tree).length > 1000 ? 'Complex' : 'Simple'] }))] }), _jsxs("div", { className: "border-border mt-3 flex items-center gap-1 border-t pt-3", children: [_jsxs("button", { type: "button", onClick: () => setViewState({ mode: 'edit', section }), className: "text-foreground hover:bg-accent flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors", "aria-label": `Edit ${section.name}`, children: [_jsx(Edit, { size: 13 }), "Edit"] }), _jsxs("button", { type: "button", onClick: () => handleDuplicate(section), className: "text-foreground hover:bg-accent flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors", "aria-label": `Duplicate ${section.name}`, children: [_jsx(Copy, { size: 13 }), "Duplicate"] }), deleteConfirmId === section.id ? (_jsxs("div", { className: "ml-auto flex items-center gap-1", children: [_jsx("span", { className: "text-destructive mr-1 text-xs", children: "Delete?" }), _jsx("button", { type: "button", onClick: () => handleDelete(section.id), className: "text-destructive-foreground bg-destructive hover:bg-destructive/90 rounded-md px-2 py-1 text-xs font-medium transition-colors", children: "Yes" }), _jsx("button", { type: "button", onClick: () => setDeleteConfirmId(null), className: "text-foreground border-border hover:bg-accent rounded-md border px-2 py-1 text-xs font-medium transition-colors", children: "No" })] })) : (_jsxs("button", { type: "button", onClick: () => setDeleteConfirmId(section.id), className: "text-destructive hover:bg-destructive/10 ml-auto flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors", "aria-label": `Delete ${section.name}`, children: [_jsx(Trash2, { size: 13 }), "Delete"] }))] })] }, section.id))) }))] }));
|
|
122
122
|
}
|
|
123
123
|
function CategoryTab({ label, active, onClick }) {
|
|
124
|
-
return (_jsx("button", { type: "button", onClick: onClick, className:
|
|
124
|
+
return (_jsx("button", { type: "button", onClick: onClick, className: `-mb-px border-b-2 px-3 py-2 text-sm transition-colors ${active
|
|
125
125
|
? 'border-primary text-foreground font-medium'
|
|
126
|
-
: '
|
|
126
|
+
: 'text-muted-foreground hover:text-foreground border-transparent'}`, children: label }));
|
|
127
127
|
}
|
|
128
128
|
function SectionForm({ initial, saving, onSave, onCancel }) {
|
|
129
129
|
const [name, setName] = useState(initial?.name ?? '');
|
|
@@ -136,6 +136,6 @@ function SectionForm({ initial, saving, onSave, onCancel }) {
|
|
|
136
136
|
onSave({ name: name.trim(), description: description.trim(), category });
|
|
137
137
|
}
|
|
138
138
|
const treeSize = initial?.tree ? JSON.stringify(initial.tree).length : null;
|
|
139
|
-
return (_jsxs("div", { className: "p-4 pr-8", children: [_jsxs("div", { className: "mb-6", children: [_jsxs("button", { type: "button", onClick: onCancel, className: "flex items-center gap-1.5 text-sm
|
|
139
|
+
return (_jsxs("div", { className: "p-4 pr-8", children: [_jsxs("div", { className: "mb-6", children: [_jsxs("button", { type: "button", onClick: onCancel, className: "text-muted-foreground hover:text-foreground mb-3 flex items-center gap-1.5 text-sm transition-colors", "aria-label": "Back to saved sections", children: [_jsx(ArrowLeft, { size: 16 }), "Back"] }), _jsx("h1", { className: "text-foreground text-2xl font-medium", children: initial ? `Edit: ${initial.name}` : 'Create Saved Section' })] }), _jsxs("form", { onSubmit: handleSubmit, className: "max-w-lg space-y-4", children: [_jsxs("div", { children: [_jsxs("label", { htmlFor: "section-name", className: "text-foreground mb-1 block text-sm font-medium", children: ["Name ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "section-name", type: "text", value: name, onChange: (e) => setName(e.target.value), required: true, placeholder: "e.g. Hero Banner", className: "bg-background border-input focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "section-description", className: "text-foreground mb-1 block text-sm font-medium", children: "Description" }), _jsx("textarea", { id: "section-description", value: description, onChange: (e) => setDescription(e.target.value), placeholder: "Optional description of this section...", rows: 3, className: "bg-background border-input focus:ring-ring w-full resize-none rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "section-category", className: "text-foreground mb-1 block text-sm font-medium", children: "Category" }), _jsx("select", { id: "section-category", value: category, onChange: (e) => setCategory(e.target.value), className: "bg-background border-input focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none", children: CATEGORIES.map((cat) => (_jsx("option", { value: cat, children: cat.charAt(0).toUpperCase() + cat.slice(1) }, cat))) })] }), treeSize !== null && (_jsx("div", { className: "border-border bg-muted rounded-md border p-3", children: _jsxs("p", { className: "text-muted-foreground text-xs", children: ["Section tree editing is available in the page builder. Current tree size:", ' ', (treeSize / 1024).toFixed(1), " KB"] }) })), _jsxs("div", { className: "flex items-center gap-3 pt-2", children: [_jsxs("button", { type: "submit", disabled: saving || !name.trim(), className: "bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [saving && _jsx(Loader2, { size: 14, className: "animate-spin" }), initial ? 'Save Changes' : 'Create Section'] }), _jsx("button", { type: "button", onClick: onCancel, disabled: saving, className: "text-foreground border-border hover:bg-accent rounded-lg border px-4 py-2 text-sm font-medium transition-colors disabled:opacity-50", children: "Cancel" })] })] })] }));
|
|
140
140
|
}
|
|
141
141
|
//# sourceMappingURL=SavedSections.js.map
|
|
@@ -59,10 +59,10 @@ export function TemplatePicker({ onSelect, onClose }) {
|
|
|
59
59
|
onSelect(template.tree);
|
|
60
60
|
onClose();
|
|
61
61
|
}
|
|
62
|
-
return (_jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", role: "dialog", "aria-modal": "true", "aria-label": "Choose a template", children: [_jsx("div", { className: "
|
|
62
|
+
return (_jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", role: "dialog", "aria-modal": "true", "aria-label": "Choose a template", children: [_jsx("div", { className: "motion-safe:animate-in motion-safe:fade-in-0 absolute inset-0 bg-black/50", onClick: onClose, "aria-hidden": "true" }), _jsxs("div", { className: "bg-card border-border relative z-10 flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border shadow-2xl", children: [_jsxs("div", { className: "flex items-center justify-between px-5 pt-5 pb-3", children: [_jsx("h2", { className: "text-foreground text-lg font-medium", children: "Choose a Template" }), _jsx("button", { type: "button", onClick: onClose, className: "text-muted-foreground hover:text-foreground hover:bg-accent rounded-md p-1.5 transition-colors", "aria-label": "Close", children: _jsx(X, { size: 18 }) })] }), _jsxs("div", { className: "flex-1 overflow-y-auto px-5 pb-5", children: [loading && (_jsx("div", { className: "flex items-center justify-center py-16", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })), error && !loading && (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [_jsx(AlertTriangle, { size: 24, className: "text-destructive mb-2" }), _jsx("p", { className: "text-muted-foreground mb-3 text-sm", children: error }), _jsx("button", { type: "button", onClick: fetchTemplates, className: "text-foreground border-border hover:bg-accent rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", children: "Retry" })] })), !loading && !error && (_jsxs("div", { className: "grid grid-cols-2 gap-3 md:grid-cols-3", role: "list", "aria-label": "Available templates", children: [_jsxs("button", { type: "button", role: "listitem", onClick: handleBlankPage, className: "border-border hover:border-primary bg-card group focus:ring-ring flex cursor-pointer flex-col items-center gap-2 rounded-lg border p-4 text-left transition-colors focus:ring-2 focus:outline-none", children: [_jsx("div", { className: "bg-muted text-muted-foreground group-hover:bg-primary/10 group-hover:text-primary flex h-10 w-10 items-center justify-center rounded-md transition-colors", children: _jsx(File, { size: 20 }) }), _jsx("p", { className: "text-foreground text-center text-sm font-medium", children: "Blank Page" }), _jsx("p", { className: "text-muted-foreground text-center text-xs", children: "Start from scratch" })] }), templates.map((template) => {
|
|
63
63
|
const Icon = resolveIcon(template.category);
|
|
64
64
|
const badgeColor = resolveBadgeColor(template.category);
|
|
65
|
-
return (_jsxs("button", { type: "button", role: "listitem", onClick: () => handleTemplateSelect(template), className: "
|
|
65
|
+
return (_jsxs("button", { type: "button", role: "listitem", onClick: () => handleTemplateSelect(template), className: "border-border hover:border-primary bg-card group focus:ring-ring flex cursor-pointer flex-col items-center gap-2 rounded-lg border p-4 text-left transition-colors focus:ring-2 focus:outline-none", children: [_jsx("div", { className: "bg-accent text-foreground group-hover:bg-primary/10 group-hover:text-primary flex h-10 w-10 items-center justify-center rounded-md transition-colors", children: _jsx(Icon, { size: 20 }) }), _jsx("p", { className: "text-foreground w-full truncate text-center text-sm font-medium", children: template.name }), template.description && (_jsx("p", { className: "text-muted-foreground line-clamp-2 text-center text-xs", children: template.description })), _jsx("span", { className: `inline-block rounded-full px-2 py-0.5 text-xs ${badgeColor}`, children: template.category })] }, template.id));
|
|
66
66
|
})] }))] })] })] }));
|
|
67
67
|
}
|
|
68
68
|
//# sourceMappingURL=TemplatePicker.js.map
|
|
@@ -4,16 +4,16 @@ export function CTAPreview({ data, variant = 'banner' }) {
|
|
|
4
4
|
const heading = data.heading || '';
|
|
5
5
|
const body = data.body || '';
|
|
6
6
|
const buttonText = data.buttonText || '';
|
|
7
|
-
const button = (_jsx("span", { className: "inline-block rounded-md
|
|
7
|
+
const button = (_jsx("span", { className: "bg-primary text-primary-foreground inline-block rounded-md px-4 py-2 text-sm", children: buttonText || 'Click Here' }));
|
|
8
8
|
if (variant === 'inline') {
|
|
9
|
-
return (_jsxs("div", { className: "flex items-center justify-between gap-4 rounded-md border
|
|
9
|
+
return (_jsxs("div", { className: "border-border flex items-center justify-between gap-4 rounded-md border p-4", children: [_jsxs("div", { className: "flex-1", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: heading || _jsx("span", { className: "text-muted-foreground", children: "CTA Heading" }) }), body && _jsx("p", { className: "text-muted-foreground mt-1 text-xs", children: body })] }), button] }));
|
|
10
10
|
}
|
|
11
11
|
if (variant === 'floating') {
|
|
12
|
-
return (_jsx("div", { className: "mx-auto max-w-md rounded-lg border
|
|
12
|
+
return (_jsx("div", { className: "border-border bg-card mx-auto max-w-md rounded-lg border p-6 shadow-md", children: _jsxs("div", { className: "text-center", children: [_jsx("h3", { className: "text-foreground text-lg font-medium", children: heading || _jsx("span", { className: "text-muted-foreground", children: "CTA Heading" }) }), (body || !heading) && (_jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: body || 'Supporting text for the call to action' })), _jsx("div", { className: "mt-4", children: button })] }) }));
|
|
13
13
|
}
|
|
14
14
|
if (variant === 'split') {
|
|
15
|
-
return (_jsxs("div", { className: "flex items-center gap-6 rounded-md border
|
|
15
|
+
return (_jsxs("div", { className: "border-border flex items-center gap-6 rounded-md border p-6", children: [_jsxs("div", { className: "flex-1", children: [_jsx("h3", { className: "text-foreground text-lg font-medium", children: heading || _jsx("span", { className: "text-muted-foreground", children: "CTA Heading" }) }), (body || !heading) && (_jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: body || 'Supporting text for the call to action' }))] }), _jsx("div", { className: "shrink-0", children: button })] }));
|
|
16
16
|
}
|
|
17
|
-
return (_jsxs("div", { className: "
|
|
17
|
+
return (_jsxs("div", { className: "border-border bg-accent rounded-md border p-6 text-center", children: [_jsx("h3", { className: "text-foreground text-lg font-medium", children: heading || _jsx("span", { className: "text-muted-foreground", children: "CTA Heading" }) }), (body || !heading) && (_jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: body || 'Supporting text for the call to action' })), _jsx("div", { className: "mt-4", children: button })] }));
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=CTAPreview.js.map
|
|
@@ -17,6 +17,6 @@ export function CardsPreview({ data, variant = 'grid-3' }) {
|
|
|
17
17
|
: variant === 'horizontal'
|
|
18
18
|
? 'flex gap-3 overflow-hidden'
|
|
19
19
|
: 'grid grid-cols-3 gap-3';
|
|
20
|
-
return (_jsx("div", { className: "rounded-md border
|
|
20
|
+
return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsx("div", { className: gridClass, children: placeholderItems.map((item, i) => (_jsxs("div", { className: `border-border bg-card flex flex-col overflow-hidden rounded-md border ${variant === 'horizontal' ? 'min-w-40' : ''}`, children: [_jsx("div", { className: "bg-muted flex h-20 items-center justify-center", children: item.image ? (_jsx("img", { src: item.image, alt: item.title || '', className: "h-full w-full object-cover" })) : (_jsx(Image, { size: 20, className: "text-muted-foreground" })) }), _jsxs("div", { className: "p-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: item.title || _jsx("span", { className: "text-muted-foreground", children: "Card Title" }) }), item.description && (_jsx("p", { className: "text-muted-foreground mt-1 line-clamp-2 text-xs", children: item.description }))] })] }, i))) }) }));
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=CardsPreview.js.map
|
|
@@ -7,6 +7,6 @@ export function CodePreview({ data, variant = 'embed' }) {
|
|
|
7
7
|
const sandboxed = data.sandboxed;
|
|
8
8
|
const truncated = content.length > 200 ? content.slice(0, 200) + '…' : content;
|
|
9
9
|
const icon = variant === 'html' ? (_jsx(Globe, { size: 14, className: "text-muted-foreground" })) : variant === 'script' ? (_jsx(Terminal, { size: 14, className: "text-muted-foreground" })) : (_jsx(Code, { size: 14, className: "text-muted-foreground" }));
|
|
10
|
-
return (_jsxs("div", { className: "overflow-hidden rounded-md border
|
|
10
|
+
return (_jsxs("div", { className: "border-border overflow-hidden rounded-md border", children: [_jsxs("div", { className: "border-border bg-card flex items-center gap-2 border-b px-3 py-2", children: [icon, _jsx("span", { className: "text-muted-foreground text-xs", children: language || variant }), sandboxed && (_jsx("span", { className: "bg-muted text-muted-foreground ml-auto rounded px-1.5 py-0.5 text-xs", children: "sandboxed" }))] }), _jsx("div", { className: "bg-card p-4", children: truncated ? (_jsx("pre", { className: "text-foreground overflow-hidden font-mono text-xs whitespace-pre-wrap", children: truncated })) : (_jsx("p", { className: "text-muted-foreground font-mono text-xs italic", children: "// Code content goes here\u2026" })) })] }));
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=CodePreview.js.map
|
|
@@ -17,11 +17,11 @@ export function FAQPreview({ data, variant = 'accordion' }) {
|
|
|
17
17
|
const mid = Math.ceil(placeholderItems.length / 2);
|
|
18
18
|
const col1 = placeholderItems.slice(0, mid);
|
|
19
19
|
const col2 = placeholderItems.slice(mid);
|
|
20
|
-
return (_jsx("div", { className: "rounded-md border
|
|
20
|
+
return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsx("div", { className: "grid grid-cols-2 gap-4", children: [col1, col2].map((column, colIdx) => (_jsx("div", { className: "flex flex-col gap-3", children: column.map((item, i) => (_jsxs("div", { className: "border-border rounded-md border p-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: item.question || 'Question?' }), _jsx("p", { className: "text-muted-foreground mt-1 line-clamp-2 text-xs", children: item.answer || 'Answer text…' })] }, i))) }, colIdx))) }) }));
|
|
21
21
|
}
|
|
22
22
|
if (variant === 'list') {
|
|
23
|
-
return (_jsx("div", { className: "rounded-md border
|
|
23
|
+
return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsx("div", { className: "flex flex-col gap-3", children: placeholderItems.map((item, i) => (_jsxs("div", { className: "border-border border-b pb-3 last:border-b-0 last:pb-0", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: item.question || 'Question?' }), _jsx("p", { className: "text-muted-foreground mt-1 line-clamp-2 text-xs", children: item.answer || 'Answer text…' })] }, i))) }) }));
|
|
24
24
|
}
|
|
25
|
-
return (_jsx("div", { className: "rounded-md border
|
|
25
|
+
return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsx("div", { className: "flex flex-col gap-2", children: placeholderItems.map((item, i) => (_jsxs("div", { className: "border-border rounded-md border p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: item.question || 'Question?' }), _jsx(ChevronDown, { size: 14, className: "text-muted-foreground shrink-0" })] }), i === 0 && (_jsx("p", { className: "text-muted-foreground mt-2 text-xs", children: item.answer || 'Answer text…' }))] }, i))) }) }));
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=FAQPreview.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Box } from 'lucide-react';
|
|
4
4
|
export function FallbackPreview({ blockType }) {
|
|
5
|
-
return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 rounded-md border border-dashed
|
|
5
|
+
return (_jsxs("div", { className: "border-border bg-muted/50 flex flex-col items-center justify-center gap-2 rounded-md border border-dashed p-8", children: [_jsx(Box, { size: 24, className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: blockType }), _jsx("p", { className: "text-muted-foreground text-xs", children: "No preview available" })] }));
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=FallbackPreview.js.map
|
|
@@ -4,11 +4,11 @@ import { FileText, Mail, Send } from 'lucide-react';
|
|
|
4
4
|
export function FormPreview({ data, variant = 'contact' }) {
|
|
5
5
|
const formId = data.formId || '';
|
|
6
6
|
if (variant === 'newsletter') {
|
|
7
|
-
return (_jsxs("div", { className: "rounded-md border
|
|
7
|
+
return (_jsxs("div", { className: "border-border rounded-md border p-6 text-center", children: [_jsx(Mail, { size: 24, className: "text-muted-foreground mx-auto" }), _jsx("p", { className: "text-foreground mt-3 text-sm font-medium", children: "Newsletter Signup" }), formId && _jsxs("p", { className: "text-muted-foreground mt-1 text-xs", children: ["Form: ", formId] }), _jsxs("div", { className: "mx-auto mt-4 flex max-w-xs gap-2", children: [_jsx("div", { className: "border-border bg-input-background h-9 flex-1 rounded-md border" }), _jsx("div", { className: "bg-primary flex h-9 items-center rounded-md px-3", children: _jsx(Send, { size: 14, className: "text-primary-foreground" }) })] })] }));
|
|
8
8
|
}
|
|
9
9
|
if (variant === 'custom') {
|
|
10
|
-
return (_jsxs("div", { className: "rounded-md border
|
|
10
|
+
return (_jsxs("div", { className: "border-border rounded-md border p-5", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { size: 16, className: "text-muted-foreground" }), _jsx("p", { className: "text-foreground text-sm font-medium", children: formId ? `Form: ${formId}` : 'Custom Form' })] }), _jsxs("div", { className: "mt-3 flex flex-col gap-2", children: [_jsx("div", { className: "border-border bg-input-background h-8 rounded-md border" }), _jsx("div", { className: "border-border bg-input-background h-8 rounded-md border" }), _jsx("div", { className: "border-border bg-input-background h-20 rounded-md border" })] }), _jsx("div", { className: "mt-3", children: _jsx("span", { className: "bg-primary text-primary-foreground inline-block rounded-md px-4 py-2 text-sm", children: "Submit" }) })] }));
|
|
11
11
|
}
|
|
12
|
-
return (_jsxs("div", { className: "rounded-md border
|
|
12
|
+
return (_jsxs("div", { className: "border-border rounded-md border p-5", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: "Contact Form" }), formId && _jsxs("p", { className: "text-muted-foreground mt-1 text-xs", children: ["Form: ", formId] }), _jsxs("div", { className: "mt-3 grid grid-cols-2 gap-2", children: [_jsx("div", { className: "border-border bg-input-background h-8 rounded-md border" }), _jsx("div", { className: "border-border bg-input-background h-8 rounded-md border" })] }), _jsx("div", { className: "border-border bg-input-background mt-2 h-8 rounded-md border" }), _jsx("div", { className: "border-border bg-input-background mt-2 h-20 rounded-md border" }), _jsx("div", { className: "mt-3", children: _jsx("span", { className: "bg-primary text-primary-foreground inline-block rounded-md px-4 py-2 text-sm", children: "Send Message" }) })] }));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=FormPreview.js.map
|
|
@@ -4,16 +4,16 @@ import { Image } from 'lucide-react';
|
|
|
4
4
|
export function GalleryPreview({ data, variant = 'grid' }) {
|
|
5
5
|
const images = data.images || [];
|
|
6
6
|
const placeholders = images.length > 0 ? images : Array.from({ length: 6 }, (_, i) => ({ alt: `Image ${i + 1}` }));
|
|
7
|
-
const Thumbnail = ({ item, className = '' }) => (_jsx("div", { className: `flex items-center justify-center overflow-hidden rounded-md
|
|
7
|
+
const Thumbnail = ({ item, className = '' }) => (_jsx("div", { className: `bg-muted flex items-center justify-center overflow-hidden rounded-md ${className}`, children: item.src ? (_jsx("img", { src: item.src, alt: item.alt || '', className: "h-full w-full object-cover" })) : (_jsx(Image, { size: 20, className: "text-muted-foreground" })) }));
|
|
8
8
|
if (variant === 'masonry') {
|
|
9
|
-
return (_jsx("div", { className: "rounded-md border
|
|
9
|
+
return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsx("div", { className: "columns-3 gap-3 space-y-3", children: placeholders.map((item, i) => (_jsx(Thumbnail, { item: item, className: i % 3 === 0 ? 'aspect-square' : i % 3 === 1 ? 'aspect-[3/4]' : 'aspect-[4/3]' }, i))) }) }));
|
|
10
10
|
}
|
|
11
11
|
if (variant === 'carousel') {
|
|
12
|
-
return (_jsx("div", { className: "overflow-hidden rounded-md border
|
|
12
|
+
return (_jsx("div", { className: "border-border overflow-hidden rounded-md border p-4", children: _jsxs("div", { className: "flex gap-3 overflow-hidden", children: [placeholders.slice(0, 4).map((item, i) => (_jsx(Thumbnail, { item: item, className: "aspect-square min-w-[120px] flex-1" }, i))), placeholders.length > 4 && (_jsx("div", { className: "bg-muted flex min-w-[120px] flex-1 items-center justify-center rounded-md", children: _jsxs("span", { className: "text-muted-foreground text-sm", children: ["+", placeholders.length - 4] }) }))] }) }));
|
|
13
13
|
}
|
|
14
14
|
if (variant === 'lightbox') {
|
|
15
|
-
return (_jsxs("div", { className: "rounded-md border
|
|
15
|
+
return (_jsxs("div", { className: "border-border rounded-md border p-4", children: [_jsx("div", { className: "grid grid-cols-3 gap-3", children: placeholders.map((item, i) => (_jsx(Thumbnail, { item: item, className: "aspect-square" }, i))) }), _jsx("p", { className: "text-muted-foreground mt-2 text-center text-xs", children: "Click to open lightbox" })] }));
|
|
16
16
|
}
|
|
17
|
-
return (_jsx("div", { className: "rounded-md border
|
|
17
|
+
return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsx("div", { className: "grid grid-cols-3 gap-3", children: placeholders.map((item, i) => (_jsx(Thumbnail, { item: item, className: "aspect-square" }, i))) }) }));
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=GalleryPreview.js.map
|
|
@@ -8,12 +8,12 @@ export function HeroPreview({ data, variant = 'centered' }) {
|
|
|
8
8
|
const ctaText = data.ctaText || '';
|
|
9
9
|
const overlayOpacity = data.overlayOpacity ?? 0.4;
|
|
10
10
|
if (variant === 'split-image') {
|
|
11
|
-
return (_jsxs("div", { className: "flex min-h-[200px] overflow-hidden rounded-md border
|
|
11
|
+
return (_jsxs("div", { className: "border-border flex min-h-[200px] overflow-hidden rounded-md border", children: [_jsxs("div", { className: "flex flex-1 flex-col justify-center gap-3 p-6", children: [_jsx("h2", { className: "text-foreground text-2xl font-medium", children: title || _jsx("span", { className: "text-muted-foreground", children: "Hero Title" }) }), (subtitle || !title) && (_jsx("p", { className: "text-muted-foreground text-sm", children: subtitle || 'Subtitle text goes here' })), ctaText && (_jsx("div", { className: "mt-2", children: _jsx("span", { className: "bg-primary text-primary-foreground inline-block rounded-md px-4 py-2 text-sm", children: ctaText }) }))] }), _jsx("div", { className: "bg-muted flex flex-1 items-center justify-center", children: image ? (_jsx("img", { src: image, alt: "", className: "h-full w-full object-cover" })) : (_jsx(Image, { size: 32, className: "text-muted-foreground" })) })] }));
|
|
12
12
|
}
|
|
13
13
|
if (variant === 'minimal') {
|
|
14
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 rounded-md border
|
|
14
|
+
return (_jsxs("div", { className: "border-border flex flex-col items-center gap-3 rounded-md border p-8", children: [_jsx("h2", { className: "text-foreground text-2xl font-medium", children: title || _jsx("span", { className: "text-muted-foreground", children: "Hero Title" }) }), (subtitle || !title) && (_jsx("p", { className: "text-muted-foreground text-sm", children: subtitle || 'Subtitle text goes here' })), ctaText && (_jsx("span", { className: "bg-primary text-primary-foreground mt-2 inline-block rounded-md px-4 py-2 text-sm", children: ctaText }))] }));
|
|
15
15
|
}
|
|
16
16
|
const isVideo = variant === 'video-bg';
|
|
17
|
-
return (_jsxs("div", { className: "relative flex min-h-[220px] flex-col items-center justify-center gap-3 overflow-hidden rounded-md border
|
|
17
|
+
return (_jsxs("div", { className: "border-border relative flex min-h-[220px] flex-col items-center justify-center gap-3 overflow-hidden rounded-md border p-8", children: [image ? (_jsx("img", { src: image, alt: "", className: "absolute inset-0 h-full w-full object-cover" })) : (_jsx("div", { className: "bg-muted absolute inset-0" })), _jsx("div", { className: "bg-background absolute inset-0", style: { opacity: overlayOpacity } }), _jsxs("div", { className: "relative z-10 flex flex-col items-center gap-3 text-center", children: [isVideo && (_jsx("div", { className: "bg-primary/90 mb-2 flex h-12 w-12 items-center justify-center rounded-full", children: _jsx(Play, { size: 20, className: "text-primary-foreground" }) })), _jsx("h2", { className: "text-foreground text-2xl font-medium", children: title || _jsx("span", { className: "text-muted-foreground", children: "Hero Title" }) }), (subtitle || !title) && (_jsx("p", { className: "text-muted-foreground text-sm", children: subtitle || 'Subtitle text goes here' })), ctaText && (_jsx("span", { className: "bg-primary text-primary-foreground mt-2 inline-block rounded-md px-4 py-2 text-sm", children: ctaText }))] })] }));
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=HeroPreview.js.map
|
|
@@ -7,11 +7,11 @@ export function ImagePreview({ data, variant = 'full-width' }) {
|
|
|
7
7
|
const caption = data.caption || '';
|
|
8
8
|
const aspectRatio = data.aspectRatio || '16/9';
|
|
9
9
|
const roundedClass = variant === 'rounded' ? 'rounded-xl' : 'rounded-md';
|
|
10
|
-
const ImagePlaceholder = ({ className = '' }) => (_jsx("div", { className: `flex items-center justify-center
|
|
10
|
+
const ImagePlaceholder = ({ className = '' }) => (_jsx("div", { className: `bg-muted flex items-center justify-center ${roundedClass} ${className}`, style: { aspectRatio }, children: _jsx(Image, { size: 32, className: "text-muted-foreground" }) }));
|
|
11
11
|
const ImageElement = ({ className = '' }) => src ? (_jsx("img", { src: src, alt: alt, className: `h-auto w-full object-cover ${roundedClass} ${className}`, style: { aspectRatio } })) : (_jsx(ImagePlaceholder, { className: className }));
|
|
12
12
|
if (variant === 'side-by-side') {
|
|
13
|
-
return (_jsxs("div", { className: "grid grid-cols-2 gap-3 rounded-md border
|
|
13
|
+
return (_jsxs("div", { className: "border-border grid grid-cols-2 gap-3 rounded-md border p-4", children: [_jsx(ImageElement, {}), _jsx(ImagePlaceholder, {})] }));
|
|
14
14
|
}
|
|
15
|
-
return (_jsxs("figure", { className: "overflow-hidden rounded-md border
|
|
15
|
+
return (_jsxs("figure", { className: "border-border overflow-hidden rounded-md border p-4", children: [_jsx(ImageElement, {}), (variant === 'captioned' || caption) && (_jsx("figcaption", { className: "text-muted-foreground mt-2 text-center text-sm", children: caption || 'Image caption' }))] }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=ImagePreview.js.map
|
|
@@ -12,11 +12,11 @@ export function TextPreview({ data, variant = 'prose' }) {
|
|
|
12
12
|
const midpoint = Math.ceil(truncatedBody.length / 2);
|
|
13
13
|
const col1 = truncatedBody.slice(0, midpoint);
|
|
14
14
|
const col2 = truncatedBody.slice(midpoint);
|
|
15
|
-
return (_jsxs("div", { className: "rounded-md border
|
|
15
|
+
return (_jsxs("div", { className: "border-border rounded-md border p-5", children: [heading && (_jsx(HeadingTag, { className: `${headingSizeClass} text-foreground mb-3 font-medium`, children: heading })), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: col1 || 'Column one text content…' }), _jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: col2 || 'Column two text content…' })] })] }));
|
|
16
16
|
}
|
|
17
17
|
if (variant === 'with-sidebar') {
|
|
18
|
-
return (_jsxs("div", { className: "grid grid-cols-[1fr_200px] gap-4 rounded-md border
|
|
18
|
+
return (_jsxs("div", { className: "border-border grid grid-cols-[1fr_200px] gap-4 rounded-md border p-5", children: [_jsxs("div", { children: [heading && (_jsx(HeadingTag, { className: `${headingSizeClass} text-foreground mb-3 font-medium`, children: heading })), _jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: truncatedBody || 'Body text content goes here…' })] }), _jsxs("aside", { className: "bg-muted rounded-md p-3", children: [_jsx("div", { className: "bg-border h-3 w-3/4 rounded" }), _jsx("div", { className: "bg-border mt-2 h-2 w-full rounded" }), _jsx("div", { className: "bg-border mt-1 h-2 w-2/3 rounded" })] })] }));
|
|
19
19
|
}
|
|
20
|
-
return (_jsxs("div", { className: "rounded-md border
|
|
20
|
+
return (_jsxs("div", { className: "border-border rounded-md border p-5", children: [heading && (_jsx(HeadingTag, { className: `${headingSizeClass} text-foreground mb-3 font-medium`, children: heading })), _jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: truncatedBody || _jsx("span", { className: "italic", children: "Body text content goes here\u2026" }) })] }));
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=TextPreview.js.map
|
|
@@ -6,13 +6,13 @@ export function VideoPreview({ data, variant = 'inline' }) {
|
|
|
6
6
|
const autoplay = data.autoplay;
|
|
7
7
|
const loop = data.loop;
|
|
8
8
|
const badges = [autoplay ? 'Autoplay' : '', loop ? 'Loop' : ''].filter((b) => b !== '');
|
|
9
|
-
const content = (_jsxs("div", { className: "relative flex aspect-video items-center justify-center overflow-hidden rounded-md
|
|
9
|
+
const content = (_jsxs("div", { className: "bg-muted relative flex aspect-video items-center justify-center overflow-hidden rounded-md", children: [poster ? (_jsx("img", { src: poster, alt: "", className: "absolute inset-0 h-full w-full object-cover" })) : (_jsx("div", { className: "bg-card absolute inset-0" })), _jsx("div", { className: "bg-primary/90 relative z-10 flex h-12 w-12 items-center justify-center rounded-full shadow-sm", children: _jsx(Play, { size: 20, className: "text-primary-foreground" }) }), badges.length > 0 && (_jsx("div", { className: "absolute right-2 bottom-2 z-10 flex gap-1", children: badges.map((badge) => (_jsx("span", { className: "bg-background/80 text-muted-foreground rounded px-1.5 py-0.5 text-xs", children: badge }, badge))) }))] }));
|
|
10
10
|
if (variant === 'background') {
|
|
11
|
-
return (_jsx("div", { className: "overflow-hidden rounded-md border
|
|
11
|
+
return (_jsx("div", { className: "border-border overflow-hidden rounded-md border", children: _jsxs("div", { className: "relative aspect-[21/9]", children: [poster ? (_jsx("img", { src: poster, alt: "", className: "absolute inset-0 h-full w-full object-cover" })) : (_jsx("div", { className: "bg-card absolute inset-0" })), _jsx("div", { className: "bg-background/30 absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "bg-primary/90 flex h-14 w-14 items-center justify-center rounded-full shadow-sm", children: _jsx(Play, { size: 24, className: "text-primary-foreground" }) }) })] }) }));
|
|
12
12
|
}
|
|
13
13
|
if (variant === 'lightbox') {
|
|
14
|
-
return (_jsx("div", { className: "rounded-md border
|
|
14
|
+
return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsxs("div", { className: "mx-auto max-w-sm", children: [content, _jsx("p", { className: "text-muted-foreground mt-2 text-center text-xs", children: "Click to play in lightbox" })] }) }));
|
|
15
15
|
}
|
|
16
|
-
return _jsx("div", { className: "rounded-md border
|
|
16
|
+
return _jsx("div", { className: "border-border rounded-md border p-4", children: content });
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=VideoPreview.js.map
|
|
@@ -21,6 +21,6 @@ export function BlockRenderer({ node, selectedNodeId, onSelectNode }) {
|
|
|
21
21
|
e.stopPropagation();
|
|
22
22
|
onSelectNode(node.id);
|
|
23
23
|
};
|
|
24
|
-
return (_jsxs("div", { "data-node-id": node.id, className: `relative min-h-[48px] transition-shadow ${isSelected ? 'ring-
|
|
24
|
+
return (_jsxs("div", { "data-node-id": node.id, className: `relative min-h-[48px] transition-shadow ${isSelected ? 'ring-primary ring-2 ring-offset-2' : hovered ? 'ring-primary/50 ring-1' : ''}`, onClick: handleClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [(hovered || isSelected) && (_jsx("span", { className: "bg-primary text-primary-foreground absolute -top-2 -left-1 z-10 rounded px-1.5 py-0.5 text-xs font-medium", children: label })), _jsxs("div", { className: "bg-muted/30 border-border flex items-center justify-center gap-2 rounded-md border border-dashed p-4", children: [_jsx(Icon, { size: 16, className: "text-muted-foreground" }), _jsx("span", { className: "text-muted-foreground text-sm", children: label })] })] }));
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=BlockRenderer.js.map
|
|
@@ -13,14 +13,14 @@ export function BuilderCanvas({ tree, selectedNodeId, showGridOverlay, deviceMod
|
|
|
13
13
|
onSelectNode(null);
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
return (_jsxs("div", { className: "relative flex-1 overflow-auto
|
|
16
|
+
return (_jsxs("div", { className: "bg-muted relative flex-1 overflow-auto p-6", onClick: handleCanvasClick, children: [showGridOverlay && _jsx(GridOverlay, { deviceMode: deviceMode }), _jsxs("div", { className: `bg-background relative min-h-full shadow-sm ${DEVICE_CLASSES[deviceMode]}`, onClick: handleCanvasClick, children: [tree.children.map((child) => {
|
|
17
17
|
if (child.type === 'section') {
|
|
18
18
|
return (_jsx(SectionRenderer, { node: child, selectedNodeId: selectedNodeId, onSelectNode: onSelectNode }, child.id));
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
|
-
}), tree.children.length === 0 && (_jsxs("div", { className: "flex flex-col items-center justify-center
|
|
21
|
+
}), tree.children.length === 0 && (_jsxs("div", { className: "flex min-h-[400px] flex-col items-center justify-center text-center", children: [_jsx(LayoutGrid, { size: 32, className: "text-muted-foreground mb-3" }), _jsx("p", { className: "text-foreground mb-1 text-sm font-medium", children: "No sections yet" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Click \"Add Section\" below to start building your page" })] }))] })] }));
|
|
22
22
|
}
|
|
23
23
|
function GridOverlay({ deviceMode }) {
|
|
24
|
-
return (_jsx("div", { className: `pointer-events-none absolute inset-0 z-50 p-6 ${deviceMode !== 'desktop' ? 'flex justify-center' : ''}`, "aria-hidden": "true", children: _jsx("div", { className: `grid grid-cols-12 gap-4
|
|
24
|
+
return (_jsx("div", { className: `pointer-events-none absolute inset-0 z-50 p-6 ${deviceMode !== 'desktop' ? 'flex justify-center' : ''}`, "aria-hidden": "true", children: _jsx("div", { className: `grid h-full grid-cols-12 gap-4 opacity-[0.08] ${DEVICE_CLASSES[deviceMode]}`, children: Array.from({ length: 12 }).map((_, i) => (_jsx("div", { className: "bg-primary h-full rounded-sm" }, i))) }) }));
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=BuilderCanvas.js.map
|
|
@@ -12,14 +12,14 @@ export function ColumnRenderer({ node, selectedNodeId, onSelectNode }) {
|
|
|
12
12
|
e.stopPropagation();
|
|
13
13
|
onSelectNode(node.id);
|
|
14
14
|
};
|
|
15
|
-
return (_jsxs("div", { "data-node-id": node.id, className: `relative transition-shadow ${isSelected ? 'ring-
|
|
15
|
+
return (_jsxs("div", { "data-node-id": node.id, className: `relative transition-shadow ${isSelected ? 'ring-primary ring-2 ring-offset-2' : hovered ? 'ring-primary/50 ring-1' : ''}`, style: {
|
|
16
16
|
gridColumn: `span ${width}`,
|
|
17
17
|
padding: node.settings.padding,
|
|
18
18
|
background: node.settings.background,
|
|
19
19
|
}, onClick: handleClick, onMouseEnter: (e) => {
|
|
20
20
|
e.stopPropagation();
|
|
21
21
|
setHovered(true);
|
|
22
|
-
}, onMouseLeave: () => setHovered(false), children: [(hovered || isSelected) && (_jsxs("span", { className: "absolute -top-2 -left-1
|
|
22
|
+
}, onMouseLeave: () => setHovered(false), children: [(hovered || isSelected) && (_jsxs("span", { className: "bg-primary text-primary-foreground absolute -top-2 -left-1 z-10 rounded px-1.5 py-0.5 text-xs font-medium", children: ["Col ", width] })), isEmpty ? (_jsx("div", { className: "border-border text-muted-foreground flex min-h-[64px] items-center justify-center rounded-md border-2 border-dashed text-sm", children: "Empty column" })) : (_jsx("div", { className: "flex flex-col gap-2", children: node.children.map((child) => {
|
|
23
23
|
if (child.type === 'block') {
|
|
24
24
|
return (_jsx(BlockRenderer, { node: child, selectedNodeId: selectedNodeId, onSelectNode: onSelectNode }, child.id));
|
|
25
25
|
}
|
|
@@ -17,13 +17,13 @@ export function ContainerRenderer({ node, selectedNodeId, onSelectNode }) {
|
|
|
17
17
|
e.stopPropagation();
|
|
18
18
|
onSelectNode(node.id);
|
|
19
19
|
};
|
|
20
|
-
return (_jsxs("div", { "data-node-id": node.id, className: `relative transition-shadow ${isSelected ? 'ring-
|
|
20
|
+
return (_jsxs("div", { "data-node-id": node.id, className: `relative transition-shadow ${isSelected ? 'ring-primary ring-2 ring-offset-2' : hovered ? 'ring-primary/50 ring-1' : ''}`, style: {
|
|
21
21
|
maxWidth,
|
|
22
22
|
margin: marginMap[alignment] ?? '0 auto',
|
|
23
23
|
padding,
|
|
24
24
|
}, onClick: handleClick, onMouseEnter: (e) => {
|
|
25
25
|
e.stopPropagation();
|
|
26
26
|
setHovered(true);
|
|
27
|
-
}, onMouseLeave: () => setHovered(false), children: [(hovered || isSelected) && (_jsx("span", { className: "absolute -top-2 -left-1
|
|
27
|
+
}, onMouseLeave: () => setHovered(false), children: [(hovered || isSelected) && (_jsx("span", { className: "bg-primary text-primary-foreground absolute -top-2 -left-1 z-10 rounded px-1.5 py-0.5 text-xs font-medium", children: "Container" })), _jsx("div", { className: "flex flex-col gap-4", children: node.children.map((row) => (_jsx(RowRenderer, { node: row, selectedNodeId: selectedNodeId, onSelectNode: onSelectNode }, row.id))) })] }));
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=ContainerRenderer.js.map
|