@actuate-media/cms-admin 0.15.0 → 0.16.1
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 +148 -2
- package/dist/AdminRoot.js.map +1 -1
- package/dist/__tests__/components/posts-badges.test.d.ts +2 -0
- package/dist/__tests__/components/posts-badges.test.d.ts.map +1 -0
- package/dist/__tests__/components/posts-badges.test.js +68 -0
- package/dist/__tests__/components/posts-badges.test.js.map +1 -0
- package/dist/__tests__/layout/sidebar-posts.test.d.ts +2 -0
- package/dist/__tests__/layout/sidebar-posts.test.d.ts.map +1 -0
- package/dist/__tests__/layout/sidebar-posts.test.js +162 -0
- package/dist/__tests__/layout/sidebar-posts.test.js.map +1 -0
- package/dist/__tests__/lib/page-editor-service.test.d.ts +2 -0
- package/dist/__tests__/lib/page-editor-service.test.d.ts.map +1 -0
- package/dist/__tests__/lib/page-editor-service.test.js +137 -0
- package/dist/__tests__/lib/page-editor-service.test.js.map +1 -0
- package/dist/__tests__/lib/pages-service.test.d.ts +2 -0
- package/dist/__tests__/lib/pages-service.test.d.ts.map +1 -0
- package/dist/__tests__/lib/pages-service.test.js +140 -0
- package/dist/__tests__/lib/pages-service.test.js.map +1 -0
- package/dist/__tests__/lib/post-editor-service.test.d.ts +2 -0
- package/dist/__tests__/lib/post-editor-service.test.d.ts.map +1 -0
- package/dist/__tests__/lib/post-editor-service.test.js +185 -0
- package/dist/__tests__/lib/post-editor-service.test.js.map +1 -0
- package/dist/__tests__/lib/posts-service.test.d.ts +2 -0
- package/dist/__tests__/lib/posts-service.test.d.ts.map +1 -0
- package/dist/__tests__/lib/posts-service.test.js +244 -0
- package/dist/__tests__/lib/posts-service.test.js.map +1 -0
- package/dist/__tests__/lib/useApiData.test.d.ts +2 -0
- package/dist/__tests__/lib/useApiData.test.d.ts.map +1 -0
- package/dist/__tests__/lib/useApiData.test.js +84 -0
- package/dist/__tests__/lib/useApiData.test.js.map +1 -0
- package/dist/__tests__/views/dashboard.test.d.ts +2 -0
- package/dist/__tests__/views/dashboard.test.d.ts.map +1 -0
- package/dist/__tests__/views/dashboard.test.js +138 -0
- package/dist/__tests__/views/dashboard.test.js.map +1 -0
- package/dist/__tests__/views/posts-list-view.test.d.ts +2 -0
- package/dist/__tests__/views/posts-list-view.test.d.ts.map +1 -0
- package/dist/__tests__/views/posts-list-view.test.js +98 -0
- package/dist/__tests__/views/posts-list-view.test.js.map +1 -0
- package/dist/actuate-admin.css +1 -1
- package/dist/components/pages/tag-badges.d.ts +21 -0
- package/dist/components/pages/tag-badges.d.ts.map +1 -0
- package/dist/components/pages/tag-badges.js +56 -0
- package/dist/components/pages/tag-badges.js.map +1 -0
- package/dist/components/posts/badges.d.ts +25 -0
- package/dist/components/posts/badges.d.ts.map +1 -0
- package/dist/components/posts/badges.js +123 -0
- package/dist/components/posts/badges.js.map +1 -0
- package/dist/components/posts/icons.d.ts +12 -0
- package/dist/components/posts/icons.d.ts.map +1 -0
- package/dist/components/posts/icons.js +26 -0
- package/dist/components/posts/icons.js.map +1 -0
- package/dist/layout/Layout.js +36 -8
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/Sidebar.d.ts +9 -0
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/Sidebar.js +100 -48
- package/dist/layout/Sidebar.js.map +1 -1
- package/dist/lib/page-editor-service.d.ts +45 -0
- package/dist/lib/page-editor-service.d.ts.map +1 -0
- package/dist/lib/page-editor-service.js +153 -0
- package/dist/lib/page-editor-service.js.map +1 -0
- package/dist/lib/pages-service.d.ts +143 -0
- package/dist/lib/pages-service.d.ts.map +1 -0
- package/dist/lib/pages-service.js +444 -0
- package/dist/lib/pages-service.js.map +1 -0
- package/dist/lib/post-editor-service.d.ts +57 -0
- package/dist/lib/post-editor-service.d.ts.map +1 -0
- package/dist/lib/post-editor-service.js +234 -0
- package/dist/lib/post-editor-service.js.map +1 -0
- package/dist/lib/posts-service.d.ts +73 -0
- package/dist/lib/posts-service.d.ts.map +1 -0
- package/dist/lib/posts-service.js +245 -0
- package/dist/lib/posts-service.js.map +1 -0
- package/dist/lib/preview-link.d.ts +32 -0
- package/dist/lib/preview-link.d.ts.map +1 -0
- package/dist/lib/preview-link.js +40 -0
- package/dist/lib/preview-link.js.map +1 -0
- package/dist/router/index.d.ts +1 -0
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js +9 -1
- package/dist/router/index.js.map +1 -1
- package/dist/views/Dashboard.d.ts.map +1 -1
- package/dist/views/Dashboard.js +64 -20
- package/dist/views/Dashboard.js.map +1 -1
- package/dist/views/Pages/PageTagManager.d.ts +14 -0
- package/dist/views/Pages/PageTagManager.d.ts.map +1 -0
- package/dist/views/Pages/PageTagManager.js +145 -0
- package/dist/views/Pages/PageTagManager.js.map +1 -0
- package/dist/views/Pages/PagesListView.d.ts +18 -0
- package/dist/views/Pages/PagesListView.d.ts.map +1 -0
- package/dist/views/Pages/PagesListView.js +287 -0
- package/dist/views/Pages/PagesListView.js.map +1 -0
- package/dist/views/Posts/NewPostPicker.d.ts +16 -0
- package/dist/views/Posts/NewPostPicker.d.ts.map +1 -0
- package/dist/views/Posts/NewPostPicker.js +59 -0
- package/dist/views/Posts/NewPostPicker.js.map +1 -0
- package/dist/views/Posts/NewPostTypeInstructions.d.ts +18 -0
- package/dist/views/Posts/NewPostTypeInstructions.d.ts.map +1 -0
- package/dist/views/Posts/NewPostTypeInstructions.js +147 -0
- package/dist/views/Posts/NewPostTypeInstructions.js.map +1 -0
- package/dist/views/Posts/PostTypesView.d.ts +26 -0
- package/dist/views/Posts/PostTypesView.d.ts.map +1 -0
- package/dist/views/Posts/PostTypesView.js +52 -0
- package/dist/views/Posts/PostTypesView.js.map +1 -0
- package/dist/views/Posts/PostsListView.d.ts +25 -0
- package/dist/views/Posts/PostsListView.d.ts.map +1 -0
- package/dist/views/Posts/PostsListView.js +239 -0
- package/dist/views/Posts/PostsListView.js.map +1 -0
- package/dist/views/Posts/post-type-presets.d.ts +32 -0
- package/dist/views/Posts/post-type-presets.d.ts.map +1 -0
- package/dist/views/Posts/post-type-presets.js +72 -0
- package/dist/views/Posts/post-type-presets.js.map +1 -0
- package/dist/views/page-builder/Widgets.d.ts +13 -0
- package/dist/views/page-builder/Widgets.d.ts.map +1 -0
- package/dist/views/page-builder/Widgets.js +15 -0
- package/dist/views/page-builder/Widgets.js.map +1 -0
- package/dist/views/page-editor/AddSectionModal.d.ts +20 -0
- package/dist/views/page-editor/AddSectionModal.d.ts.map +1 -0
- package/dist/views/page-editor/AddSectionModal.js +22 -0
- package/dist/views/page-editor/AddSectionModal.js.map +1 -0
- package/dist/views/page-editor/EditorCanvas.d.ts +18 -0
- package/dist/views/page-editor/EditorCanvas.d.ts.map +1 -0
- package/dist/views/page-editor/EditorCanvas.js +64 -0
- package/dist/views/page-editor/EditorCanvas.js.map +1 -0
- package/dist/views/page-editor/EditorTopBar.d.ts +30 -0
- package/dist/views/page-editor/EditorTopBar.d.ts.map +1 -0
- package/dist/views/page-editor/EditorTopBar.js +42 -0
- package/dist/views/page-editor/EditorTopBar.js.map +1 -0
- package/dist/views/page-editor/PagePreview.d.ts +13 -0
- package/dist/views/page-editor/PagePreview.d.ts.map +1 -0
- package/dist/views/page-editor/PagePreview.js +37 -0
- package/dist/views/page-editor/PagePreview.js.map +1 -0
- package/dist/views/page-editor/PageSectionEditor.d.ts +16 -0
- package/dist/views/page-editor/PageSectionEditor.d.ts.map +1 -0
- package/dist/views/page-editor/PageSectionEditor.js +272 -0
- package/dist/views/page-editor/PageSectionEditor.js.map +1 -0
- package/dist/views/page-editor/PageSettingsModal.d.ts +12 -0
- package/dist/views/page-editor/PageSettingsModal.d.ts.map +1 -0
- package/dist/views/page-editor/PageSettingsModal.js +52 -0
- package/dist/views/page-editor/PageSettingsModal.js.map +1 -0
- package/dist/views/page-editor/SectionInspector.d.ts +17 -0
- package/dist/views/page-editor/SectionInspector.d.ts.map +1 -0
- package/dist/views/page-editor/SectionInspector.js +98 -0
- package/dist/views/page-editor/SectionInspector.js.map +1 -0
- package/dist/views/page-editor/SectionsPanel.d.ts +15 -0
- package/dist/views/page-editor/SectionsPanel.d.ts.map +1 -0
- package/dist/views/page-editor/SectionsPanel.js +43 -0
- package/dist/views/page-editor/SectionsPanel.js.map +1 -0
- package/dist/views/page-editor/ValidationSummary.d.ts +9 -0
- package/dist/views/page-editor/ValidationSummary.d.ts.map +1 -0
- package/dist/views/page-editor/ValidationSummary.js +10 -0
- package/dist/views/page-editor/ValidationSummary.js.map +1 -0
- package/dist/views/page-editor/section-icons.d.ts +4 -0
- package/dist/views/page-editor/section-icons.d.ts.map +1 -0
- package/dist/views/page-editor/section-icons.js +20 -0
- package/dist/views/page-editor/section-icons.js.map +1 -0
- package/dist/views/page-editor/section-types.d.ts +11 -0
- package/dist/views/page-editor/section-types.d.ts.map +1 -0
- package/dist/views/page-editor/section-types.js +10 -0
- package/dist/views/page-editor/section-types.js.map +1 -0
- package/dist/views/page-editor/sections/ArticleBodySection.d.ts +13 -0
- package/dist/views/page-editor/sections/ArticleBodySection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/ArticleBodySection.js +23 -0
- package/dist/views/page-editor/sections/ArticleBodySection.js.map +1 -0
- package/dist/views/page-editor/sections/AuthorBioSection.d.ts +8 -0
- package/dist/views/page-editor/sections/AuthorBioSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/AuthorBioSection.js +21 -0
- package/dist/views/page-editor/sections/AuthorBioSection.js.map +1 -0
- package/dist/views/page-editor/sections/ByTheNumbersSection.d.ts +5 -0
- package/dist/views/page-editor/sections/ByTheNumbersSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/ByTheNumbersSection.js +10 -0
- package/dist/views/page-editor/sections/ByTheNumbersSection.js.map +1 -0
- package/dist/views/page-editor/sections/CtaBannerSection.d.ts +5 -0
- package/dist/views/page-editor/sections/CtaBannerSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/CtaBannerSection.js +10 -0
- package/dist/views/page-editor/sections/CtaBannerSection.js.map +1 -0
- package/dist/views/page-editor/sections/FeatureHighlightSection.d.ts +5 -0
- package/dist/views/page-editor/sections/FeatureHighlightSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/FeatureHighlightSection.js +18 -0
- package/dist/views/page-editor/sections/FeatureHighlightSection.js.map +1 -0
- package/dist/views/page-editor/sections/GallerySection.d.ts +6 -0
- package/dist/views/page-editor/sections/GallerySection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/GallerySection.js +17 -0
- package/dist/views/page-editor/sections/GallerySection.js.map +1 -0
- package/dist/views/page-editor/sections/HeroBannerSection.d.ts +5 -0
- package/dist/views/page-editor/sections/HeroBannerSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/HeroBannerSection.js +11 -0
- package/dist/views/page-editor/sections/HeroBannerSection.js.map +1 -0
- package/dist/views/page-editor/sections/MissionSection.d.ts +6 -0
- package/dist/views/page-editor/sections/MissionSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/MissionSection.js +12 -0
- package/dist/views/page-editor/sections/MissionSection.js.map +1 -0
- package/dist/views/page-editor/sections/PullQuoteSection.d.ts +6 -0
- package/dist/views/page-editor/sections/PullQuoteSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/PullQuoteSection.js +13 -0
- package/dist/views/page-editor/sections/PullQuoteSection.js.map +1 -0
- package/dist/views/page-editor/sections/RelatedPostsSection.d.ts +12 -0
- package/dist/views/page-editor/sections/RelatedPostsSection.d.ts.map +1 -0
- package/dist/views/page-editor/sections/RelatedPostsSection.js +23 -0
- package/dist/views/page-editor/sections/RelatedPostsSection.js.map +1 -0
- package/dist/views/page-editor/sections/SectionRenderer.d.ts +22 -0
- package/dist/views/page-editor/sections/SectionRenderer.d.ts.map +1 -0
- package/dist/views/page-editor/sections/SectionRenderer.js +52 -0
- package/dist/views/page-editor/sections/SectionRenderer.js.map +1 -0
- package/dist/views/page-editor/sections/index.d.ts +14 -0
- package/dist/views/page-editor/sections/index.d.ts.map +1 -0
- package/dist/views/page-editor/sections/index.js +12 -0
- package/dist/views/page-editor/sections/index.js.map +1 -0
- package/dist/views/page-editor/sections/parts.d.ts +55 -0
- package/dist/views/page-editor/sections/parts.d.ts.map +1 -0
- package/dist/views/page-editor/sections/parts.js +60 -0
- package/dist/views/page-editor/sections/parts.js.map +1 -0
- package/dist/views/page-editor/viewports.d.ts +14 -0
- package/dist/views/page-editor/viewports.d.ts.map +1 -0
- package/dist/views/page-editor/viewports.js +12 -0
- package/dist/views/page-editor/viewports.js.map +1 -0
- package/dist/views/post-editor/PostEditorCanvas.d.ts +21 -0
- package/dist/views/post-editor/PostEditorCanvas.d.ts.map +1 -0
- package/dist/views/post-editor/PostEditorCanvas.js +58 -0
- package/dist/views/post-editor/PostEditorCanvas.js.map +1 -0
- package/dist/views/post-editor/PostFieldsModal.d.ts +12 -0
- package/dist/views/post-editor/PostFieldsModal.d.ts.map +1 -0
- package/dist/views/post-editor/PostFieldsModal.js +53 -0
- package/dist/views/post-editor/PostFieldsModal.js.map +1 -0
- package/dist/views/post-editor/PostHeader.d.ts +15 -0
- package/dist/views/post-editor/PostHeader.d.ts.map +1 -0
- package/dist/views/post-editor/PostHeader.js +27 -0
- package/dist/views/post-editor/PostHeader.js.map +1 -0
- package/dist/views/post-editor/PostHeaderPanel.d.ts +11 -0
- package/dist/views/post-editor/PostHeaderPanel.d.ts.map +1 -0
- package/dist/views/post-editor/PostHeaderPanel.js +21 -0
- package/dist/views/post-editor/PostHeaderPanel.js.map +1 -0
- package/dist/views/post-editor/PostPreview.d.ts +14 -0
- package/dist/views/post-editor/PostPreview.d.ts.map +1 -0
- package/dist/views/post-editor/PostPreview.js +53 -0
- package/dist/views/post-editor/PostPreview.js.map +1 -0
- package/dist/views/post-editor/PostSectionEditor.d.ts +17 -0
- package/dist/views/post-editor/PostSectionEditor.d.ts.map +1 -0
- package/dist/views/post-editor/PostSectionEditor.js +290 -0
- package/dist/views/post-editor/PostSectionEditor.js.map +1 -0
- package/dist/views/post-editor/PostTemplateEditor.d.ts +9 -0
- package/dist/views/post-editor/PostTemplateEditor.d.ts.map +1 -0
- package/dist/views/post-editor/PostTemplateEditor.js +144 -0
- package/dist/views/post-editor/PostTemplateEditor.js.map +1 -0
- package/package.json +2 -2
- package/src/AdminRoot.tsx +214 -2
- package/src/__tests__/components/posts-badges.test.tsx +77 -0
- package/src/__tests__/layout/sidebar-posts.test.ts +179 -0
- package/src/__tests__/lib/page-editor-service.test.ts +173 -0
- package/src/__tests__/lib/pages-service.test.ts +157 -0
- package/src/__tests__/lib/post-editor-service.test.ts +215 -0
- package/src/__tests__/lib/posts-service.test.ts +279 -0
- package/src/__tests__/lib/useApiData.test.ts +105 -0
- package/src/__tests__/views/dashboard.test.tsx +180 -0
- package/src/__tests__/views/posts-list-view.test.ts +110 -0
- package/src/components/pages/tag-badges.tsx +104 -0
- package/src/components/posts/badges.tsx +170 -0
- package/src/components/posts/icons.ts +40 -0
- package/src/layout/Layout.tsx +66 -10
- package/src/layout/Sidebar.tsx +116 -50
- package/src/lib/page-editor-service.ts +233 -0
- package/src/lib/pages-service.ts +599 -0
- package/src/lib/post-editor-service.ts +342 -0
- package/src/lib/posts-service.ts +366 -0
- package/src/lib/preview-link.ts +63 -0
- package/src/router/index.ts +10 -1
- package/src/views/Dashboard.tsx +142 -89
- package/src/views/Pages/PageTagManager.tsx +436 -0
- package/src/views/Pages/PagesListView.tsx +944 -0
- package/src/views/Posts/NewPostPicker.tsx +147 -0
- package/src/views/Posts/NewPostTypeInstructions.tsx +344 -0
- package/src/views/Posts/PostTypesView.tsx +194 -0
- package/src/views/Posts/PostsListView.tsx +869 -0
- package/src/views/Posts/post-type-presets.ts +105 -0
- package/src/views/page-builder/Widgets.tsx +44 -0
- package/src/views/page-editor/AddSectionModal.tsx +56 -0
- package/src/views/page-editor/EditorCanvas.tsx +127 -0
- package/src/views/page-editor/EditorTopBar.tsx +233 -0
- package/src/views/page-editor/PagePreview.tsx +96 -0
- package/src/views/page-editor/PageSectionEditor.tsx +476 -0
- package/src/views/page-editor/PageSettingsModal.tsx +154 -0
- package/src/views/page-editor/SectionInspector.tsx +599 -0
- package/src/views/page-editor/SectionsPanel.tsx +270 -0
- package/src/views/page-editor/ValidationSummary.tsx +53 -0
- package/src/views/page-editor/section-icons.ts +33 -0
- package/src/views/page-editor/section-types.ts +27 -0
- package/src/views/page-editor/sections/ArticleBodySection.tsx +57 -0
- package/src/views/page-editor/sections/AuthorBioSection.tsx +61 -0
- package/src/views/page-editor/sections/ByTheNumbersSection.tsx +41 -0
- package/src/views/page-editor/sections/CtaBannerSection.tsx +29 -0
- package/src/views/page-editor/sections/FeatureHighlightSection.tsx +63 -0
- package/src/views/page-editor/sections/GallerySection.tsx +54 -0
- package/src/views/page-editor/sections/HeroBannerSection.tsx +44 -0
- package/src/views/page-editor/sections/MissionSection.tsx +22 -0
- package/src/views/page-editor/sections/PullQuoteSection.tsx +27 -0
- package/src/views/page-editor/sections/RelatedPostsSection.tsx +55 -0
- package/src/views/page-editor/sections/SectionRenderer.tsx +102 -0
- package/src/views/page-editor/sections/index.ts +13 -0
- package/src/views/page-editor/sections/parts.tsx +113 -0
- package/src/views/page-editor/viewports.ts +25 -0
- package/src/views/post-editor/PostEditorCanvas.tsx +123 -0
- package/src/views/post-editor/PostFieldsModal.tsx +196 -0
- package/src/views/post-editor/PostHeader.tsx +87 -0
- package/src/views/post-editor/PostHeaderPanel.tsx +107 -0
- package/src/views/post-editor/PostPreview.tsx +114 -0
- package/src/views/post-editor/PostSectionEditor.tsx +506 -0
- package/src/views/post-editor/PostTemplateEditor.tsx +347 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Copy, Eye, EyeOff, GripVertical, MoreVertical, Plus, Trash2, } from 'lucide-react';
|
|
4
|
+
import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors, } from '@dnd-kit/core';
|
|
5
|
+
import { SortableContext, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable';
|
|
6
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
7
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
8
|
+
import { sectionIconFor } from './section-icons.js';
|
|
9
|
+
export function SectionsPanel({ sections, selectedId, canEdit, onSelect, onReorder, onToggleVisibility, onDuplicate, onRequestDelete, onAdd, }) {
|
|
10
|
+
const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 4 } }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
|
|
11
|
+
function handleDragEnd(event) {
|
|
12
|
+
const { active, over } = event;
|
|
13
|
+
if (!over || active.id === over.id)
|
|
14
|
+
return;
|
|
15
|
+
const ids = sections.map((s) => s.id);
|
|
16
|
+
const from = ids.indexOf(String(active.id));
|
|
17
|
+
const to = ids.indexOf(String(over.id));
|
|
18
|
+
if (from === -1 || to === -1)
|
|
19
|
+
return;
|
|
20
|
+
const next = ids.slice();
|
|
21
|
+
const [moved] = next.splice(from, 1);
|
|
22
|
+
next.splice(to, 0, moved);
|
|
23
|
+
onReorder(next);
|
|
24
|
+
}
|
|
25
|
+
return (_jsxs("aside", { className: "bg-card border-border flex h-full w-72 shrink-0 flex-col border-r", "aria-label": "Page sections", children: [_jsx("div", { className: "border-border flex items-center justify-between border-b px-4 py-3", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("h2", { className: "text-foreground text-sm font-medium", children: "Sections" }), _jsx("span", { className: "bg-muted text-muted-foreground rounded-full px-2 py-0.5 text-xs font-medium tabular-nums", children: sections.length })] }) }), _jsx("div", { className: "flex-1 overflow-y-auto p-2", children: sections.length === 0 ? (_jsx("p", { className: "text-muted-foreground px-2 py-6 text-center text-sm", children: "No sections yet. Add one below to get started." })) : (_jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: _jsx(SortableContext, { items: sections.map((s) => s.id), strategy: verticalListSortingStrategy, children: _jsx("ul", { className: "space-y-1", children: sections.map((section) => (_jsx(SortableSectionItem, { section: section, selected: section.id === selectedId, canEdit: canEdit, onSelect: onSelect, onToggleVisibility: onToggleVisibility, onDuplicate: onDuplicate, onRequestDelete: onRequestDelete }, section.id))) }) }) })) }), _jsx("div", { className: "border-border border-t p-3", children: _jsxs("button", { type: "button", onClick: onAdd, disabled: !canEdit, className: "border-border text-foreground hover:bg-accent flex w-full items-center justify-center gap-2 rounded-lg border border-dashed px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [_jsx(Plus, { className: "h-4 w-4", "aria-hidden": true }), "Add Section"] }) })] }));
|
|
26
|
+
}
|
|
27
|
+
function SortableSectionItem({ section, selected, canEdit, onSelect, onToggleVisibility, onDuplicate, onRequestDelete, }) {
|
|
28
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
|
|
29
|
+
id: section.id,
|
|
30
|
+
disabled: !canEdit,
|
|
31
|
+
});
|
|
32
|
+
const Icon = sectionIconFor(section.sectionType);
|
|
33
|
+
const style = {
|
|
34
|
+
transform: CSS.Transform.toString(transform),
|
|
35
|
+
transition,
|
|
36
|
+
zIndex: isDragging ? 10 : undefined,
|
|
37
|
+
};
|
|
38
|
+
return (_jsx("li", { ref: setNodeRef, style: style, children: _jsxs("div", { className: `group flex items-center gap-2 rounded-lg border px-2 py-2 ${selected ? 'border-primary bg-accent' : 'hover:bg-accent/60 border-transparent'} ${isDragging ? 'shadow-md' : ''}`, children: [_jsx("button", { type: "button", className: "text-muted-foreground hover:text-foreground shrink-0 cursor-grab touch-none disabled:cursor-not-allowed disabled:opacity-40", "aria-label": `Drag to reorder ${section.name}`, disabled: !canEdit, ...attributes, ...listeners, children: _jsx(GripVertical, { className: "h-4 w-4", "aria-hidden": true }) }), _jsxs("button", { type: "button", onClick: () => onSelect(section.id), className: "flex min-w-0 flex-1 items-center gap-2 text-left", children: [_jsx("span", { className: "bg-muted text-muted-foreground flex h-7 w-7 shrink-0 items-center justify-center rounded-md", children: _jsx(Icon, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx("span", { className: `truncate text-sm ${section.visible ? 'text-foreground' : 'text-muted-foreground line-through'}`, children: section.name })] }), _jsx("button", { type: "button", onClick: () => onToggleVisibility(section.id), disabled: !canEdit, "aria-pressed": !section.visible, "aria-label": section.visible ? `Hide ${section.name}` : `Show ${section.name}`, className: "text-muted-foreground hover:text-foreground shrink-0 rounded p-1 disabled:opacity-40", children: section.visible ? (_jsx(Eye, { className: "h-4 w-4", "aria-hidden": true })) : (_jsx(EyeOff, { className: "h-4 w-4", "aria-hidden": true })) }), _jsxs(DropdownMenu.Root, { children: [_jsx(DropdownMenu.Trigger, { asChild: true, children: _jsx("button", { type: "button", disabled: !canEdit, "aria-label": `More actions for ${section.name}`, className: "text-muted-foreground hover:text-foreground shrink-0 rounded p-1 disabled:opacity-40", children: _jsx(MoreVertical, { className: "h-4 w-4", "aria-hidden": true }) }) }), _jsx(DropdownMenu.Portal, { children: _jsxs(DropdownMenu.Content, { align: "end", sideOffset: 4, className: "border-border bg-popover z-[70] min-w-44 rounded-lg border p-1 shadow-md", children: [_jsx(MenuItem, { onSelect: () => onDuplicate(section.id), icon: Copy, children: "Duplicate" }), _jsx(DropdownMenu.Separator, { className: "bg-border my-1 h-px" }), _jsx(MenuItem, { onSelect: () => onRequestDelete(section.id), icon: Trash2, destructive: true, children: "Delete" })] }) })] })] }) }));
|
|
39
|
+
}
|
|
40
|
+
function MenuItem({ children, icon: Icon, onSelect, destructive, }) {
|
|
41
|
+
return (_jsxs(DropdownMenu.Item, { onSelect: onSelect, className: `flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none ${destructive ? 'text-destructive focus:bg-destructive/10' : 'text-foreground focus:bg-accent'}`, children: [_jsx(Icon, { className: "h-4 w-4", "aria-hidden": true }), children] }));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=SectionsPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionsPanel.js","sourceRoot":"","sources":["../../../src/views/page-editor/SectionsPanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EACL,IAAI,EACJ,GAAG,EACH,MAAM,EACN,YAAY,EAEZ,YAAY,EACZ,IAAI,EACJ,MAAM,GACP,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,SAAS,EACT,UAAU,GAEX,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,WAAW,EACX,2BAA2B,GAC5B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AACxC,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAA;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAcnD,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,UAAU,EACV,OAAO,EACP,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,KAAK,GACc;IACnB,MAAM,OAAO,GAAG,UAAU,CACxB,SAAS,CAAC,aAAa,EAAE,EAAE,oBAAoB,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,EACnE,SAAS,CAAC,cAAc,EAAE,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,CAAC,CAC7E,CAAA;IAED,SAAS,aAAa,CAAC,KAAmB;QACxC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;QAC9B,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE;YAAE,OAAM;QAC1C,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,C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/** Inline banner listing blocking errors (and non-blocking warnings). */
|
|
7
|
+
export declare function ValidationSummary({ errors, warnings, onDismiss }: ValidationSummaryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ValidationSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationSummary.d.ts","sourceRoot":"","sources":["../../../src/views/page-editor/ValidationSummary.tsx"],"names":[],"mappings":"AAIA,UAAU,sBAAsB;IAC9B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,sBAAsB,kDAyCxF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { TriangleAlert, X } from 'lucide-react';
|
|
4
|
+
/** Inline banner listing blocking errors (and non-blocking warnings). */
|
|
5
|
+
export function ValidationSummary({ errors, warnings, onDismiss }) {
|
|
6
|
+
if (errors.length === 0 && warnings.length === 0)
|
|
7
|
+
return null;
|
|
8
|
+
return (_jsx("div", { role: "alert", className: "border-destructive/30 bg-destructive/5 mx-4 mt-3 rounded-lg border p-3", children: _jsxs("div", { className: "flex items-start gap-2", children: [_jsx(TriangleAlert, { className: "text-destructive mt-0.5 h-4 w-4 shrink-0", "aria-hidden": true }), _jsxs("div", { className: "min-w-0 flex-1", children: [errors.length > 0 && (_jsxs(_Fragment, { children: [_jsxs("p", { className: "text-foreground text-sm font-medium", children: ["Resolve ", errors.length, " issue", errors.length === 1 ? '' : 's', " before publishing"] }), _jsx("ul", { className: "text-muted-foreground mt-1 list-disc space-y-0.5 pl-4 text-xs", children: errors.map((e, i) => (_jsx("li", { children: e }, `e-${i}`))) })] })), warnings.length > 0 && (_jsx("ul", { className: "text-muted-foreground mt-2 list-disc space-y-0.5 pl-4 text-xs", children: warnings.map((w, i) => (_jsx("li", { children: w }, `w-${i}`))) }))] }), _jsx("button", { type: "button", onClick: onDismiss, "aria-label": "Dismiss", className: "text-muted-foreground hover:text-foreground rounded p-0.5", children: _jsx(X, { className: "h-4 w-4", "aria-hidden": true }) })] }) }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ValidationSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationSummary.js","sourceRoot":"","sources":["../../../src/views/page-editor/ValidationSummary.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAQ/C,yEAAyE;AACzE,MAAM,UAAU,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAA0B;IACvF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAC7D,OAAO,CACL,cACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,wEAAwE,YAElF,eAAK,SAAS,EAAC,wBAAwB,aACrC,KAAC,aAAa,IAAC,SAAS,EAAC,0CAA0C,wBAAe,EAClF,eAAK,SAAS,EAAC,gBAAgB,aAC5B,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CACpB,8BACE,aAAG,SAAS,EAAC,qCAAqC,yBACvC,MAAM,CAAC,MAAM,YAAQ,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,0BAC1D,EACJ,aAAI,SAAS,EAAC,+DAA+D,YAC1E,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACpB,uBAAoB,CAAC,IAAZ,KAAK,CAAC,EAAE,CAAU,CAC5B,CAAC,GACC,IACJ,CACJ,EACA,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,aAAI,SAAS,EAAC,+DAA+D,YAC1E,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,uBAAoB,CAAC,IAAZ,KAAK,CAAC,EAAE,CAAU,CAC5B,CAAC,GACC,CACN,IACG,EACN,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,gBACP,SAAS,EACpB,SAAS,EAAC,2DAA2D,YAErE,KAAC,CAAC,IAAC,SAAS,EAAC,SAAS,wBAAe,GAC9B,IACL,GACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-icons.d.ts","sourceRoot":"","sources":["../../../src/views/page-editor/section-icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,UAAU,EAMhB,MAAM,cAAc,CAAA;AAgBrB,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAG9D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AlignLeft, BarChart3, Images, LayoutGrid, LayoutTemplate, Megaphone, PanelsTopLeft, Quote, Type, User, } from 'lucide-react';
|
|
2
|
+
import { getSectionType } from './section-types.js';
|
|
3
|
+
const SECTION_ICONS = {
|
|
4
|
+
'layout-template': LayoutTemplate,
|
|
5
|
+
'align-left': AlignLeft,
|
|
6
|
+
'panels-top-left': PanelsTopLeft,
|
|
7
|
+
'bar-chart-3': BarChart3,
|
|
8
|
+
megaphone: Megaphone,
|
|
9
|
+
text: Type,
|
|
10
|
+
quote: Quote,
|
|
11
|
+
user: User,
|
|
12
|
+
'layout-grid': LayoutGrid,
|
|
13
|
+
images: Images,
|
|
14
|
+
};
|
|
15
|
+
/** Resolve a lucide icon for a section type id (with a safe fallback). */
|
|
16
|
+
export function sectionIconFor(sectionType) {
|
|
17
|
+
const name = getSectionType(sectionType)?.icon;
|
|
18
|
+
return (name && SECTION_ICONS[name]) || LayoutTemplate;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=section-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-icons.js","sourceRoot":"","sources":["../../../src/views/page-editor/section-icons.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,MAAM,EACN,UAAU,EACV,cAAc,EAEd,SAAS,EACT,aAAa,EACb,KAAK,EACL,IAAI,EACJ,IAAI,GACL,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,aAAa,GAA+B;IAChD,iBAAiB,EAAE,cAAc;IACjC,YAAY,EAAE,SAAS;IACvB,iBAAiB,EAAE,aAAa;IAChC,aAAa,EAAE,SAAS;IACxB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,IAAI;IACV,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE,MAAM;CACf,CAAA;AAED,0EAA0E;AAC1E,MAAM,UAAU,cAAc,CAAC,WAAmB;IAChD,MAAM,IAAI,GAAG,cAAc,CAAC,WAAW,CAAC,EAAE,IAAI,CAAA;IAC9C,OAAO,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,cAAc,CAAA;AACxD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section-type registry for the flat, section-based Page Editor.
|
|
3
|
+
*
|
|
4
|
+
* The definitions now live in `@actuate-media/cms-core/page-sections` so the
|
|
5
|
+
* admin editor, the REST API, and the MCP server validate against ONE source
|
|
6
|
+
* of truth. This module re-exports them to preserve the historical import
|
|
7
|
+
* path (`../views/page-editor/section-types.js`) used across the editor.
|
|
8
|
+
*/
|
|
9
|
+
export { SECTION_TYPES, SECTION_TYPE_LIST, getSectionType, getSectionTypesForScope, sectionTypeLabel, isKnownSectionType, } from '@actuate-media/cms-core/page-sections';
|
|
10
|
+
export type { SectionTypeId, SectionScope, SectionFieldType, SectionFieldDef, SectionSettings, SectionTypeDef, PostHeaderConfig, PostTemplate, } from '@actuate-media/cms-core/page-sections';
|
|
11
|
+
//# sourceMappingURL=section-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-types.d.ts","sourceRoot":"","sources":["../../../src/views/page-editor/section-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,uCAAuC,CAAA;AAE9C,YAAY,EACV,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,uCAAuC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section-type registry for the flat, section-based Page Editor.
|
|
3
|
+
*
|
|
4
|
+
* The definitions now live in `@actuate-media/cms-core/page-sections` so the
|
|
5
|
+
* admin editor, the REST API, and the MCP server validate against ONE source
|
|
6
|
+
* of truth. This module re-exports them to preserve the historical import
|
|
7
|
+
* path (`../views/page-editor/section-types.js`) used across the editor.
|
|
8
|
+
*/
|
|
9
|
+
export { SECTION_TYPES, SECTION_TYPE_LIST, getSectionType, getSectionTypesForScope, sectionTypeLabel, isKnownSectionType, } from '@actuate-media/cms-core/page-sections';
|
|
10
|
+
//# sourceMappingURL=section-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-types.js","sourceRoot":"","sources":["../../../src/views/page-editor/section-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,uCAAuC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PageSection } from '../../../lib/page-editor-service.js';
|
|
2
|
+
import { type PostRenderContext } from './parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the post's main body. When `source === 'field'` it shows the
|
|
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.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ArticleBodySection({ section, context, }: {
|
|
10
|
+
section: PageSection;
|
|
11
|
+
context?: PostRenderContext;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ArticleBodySection.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { bool, str } from './parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the post's main body. When `source === 'field'` it shows the
|
|
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.
|
|
8
|
+
*/
|
|
9
|
+
export function ArticleBodySection({ section, context, }) {
|
|
10
|
+
const c = section.content;
|
|
11
|
+
const source = str(c, 'source', 'field');
|
|
12
|
+
const raw = source === 'field' ? (context?.body ?? '') : str(c, 'body');
|
|
13
|
+
const wide = str(c, 'width', 'normal') === 'wide';
|
|
14
|
+
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'
|
|
20
|
+
? "This will show the post's Body content."
|
|
21
|
+
: 'Add body copy in the inspector.' }))] }));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ArticleBodySection.js.map
|
|
@@ -0,0 +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,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,8 @@
|
|
|
1
|
+
import type { PageSection } from '../../../lib/page-editor-service.js';
|
|
2
|
+
import { type PostRenderContext } from './parts.js';
|
|
3
|
+
/** A short author biography block, driven by the post's author context. */
|
|
4
|
+
export declare function AuthorBioSection({ section, context, }: {
|
|
5
|
+
section: PageSection;
|
|
6
|
+
context?: PostRenderContext;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=AuthorBioSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthorBioSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/AuthorBioSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9D,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B,2CAkDA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { bool, str } from './parts.js';
|
|
3
|
+
/** A short author biography block, driven by the post's author context. */
|
|
4
|
+
export function AuthorBioSection({ section, context, }) {
|
|
5
|
+
const c = section.content;
|
|
6
|
+
const heading = str(c, 'heading', 'About the author');
|
|
7
|
+
const showAvatar = bool(c, 'showAvatar', true);
|
|
8
|
+
const showSocial = bool(c, 'showSocial', true);
|
|
9
|
+
const name = context?.author?.name || 'Author name';
|
|
10
|
+
const bio = context?.author?.bio || "The author's bio will appear here once it is set on their profile.";
|
|
11
|
+
const avatarUrl = context?.author?.avatarUrl;
|
|
12
|
+
const initials = name
|
|
13
|
+
.split(/\s+/)
|
|
14
|
+
.map((p) => p[0] ?? '')
|
|
15
|
+
.join('')
|
|
16
|
+
.slice(0, 2)
|
|
17
|
+
.toUpperCase();
|
|
18
|
+
return (_jsx("div", { className: "mx-auto max-w-3xl px-6", children: _jsxs("div", { className: "flex items-start gap-4 rounded-xl border border-zinc-200 bg-zinc-50 p-5", children: [showAvatar &&
|
|
19
|
+
(avatarUrl ? (_jsx("img", { src: avatarUrl, alt: name, className: "h-14 w-14 shrink-0 rounded-full object-cover" })) : (_jsx("span", { className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-full bg-violet-100 text-sm font-medium text-violet-700", children: initials || '?' }))), _jsxs("div", { className: "min-w-0", children: [heading && (_jsx("p", { className: "text-xs font-semibold tracking-wider text-zinc-500 uppercase", children: heading })), _jsx("p", { className: "mt-0.5 text-base font-medium text-zinc-900", children: name }), _jsx("p", { className: "mt-1 text-sm leading-relaxed text-zinc-600", children: bio }), showSocial && (_jsxs("div", { className: "mt-2 flex gap-3 text-sm text-violet-600", children: [_jsx("span", { children: "Twitter" }), _jsx("span", { children: "LinkedIn" })] }))] })] }) }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=AuthorBioSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthorBioSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/AuthorBioSection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAA0B,MAAM,YAAY,CAAA;AAE9D,2EAA2E;AAC3E,MAAM,UAAU,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,GAIR;IACC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAA;IACrD,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;IAC9C,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;IAE9C,MAAM,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,IAAI,aAAa,CAAA;IACnD,MAAM,GAAG,GACP,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,oEAAoE,CAAA;IAC9F,MAAM,SAAS,GAAG,OAAO,EAAE,MAAM,EAAE,SAAS,CAAA;IAC5C,MAAM,QAAQ,GAAG,IAAI;SAClB,KAAK,CAAC,KAAK,CAAC;SACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACtB,IAAI,CAAC,EAAE,CAAC;SACR,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,WAAW,EAAE,CAAA;IAEhB,OAAO,CACL,cAAK,SAAS,EAAC,wBAAwB,YACrC,eAAK,SAAS,EAAC,yEAAyE,aACrF,UAAU;oBACT,CAAC,SAAS,CAAC,CAAC,CAAC,CACX,cACE,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,IAAI,EACT,SAAS,EAAC,8CAA8C,GACxD,CACH,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,oHAAoH,YACjI,QAAQ,IAAI,GAAG,GACX,CACR,CAAC,EACJ,eAAK,SAAS,EAAC,SAAS,aACrB,OAAO,IAAI,CACV,YAAG,SAAS,EAAC,8DAA8D,YACxE,OAAO,GACN,CACL,EACD,YAAG,SAAS,EAAC,4CAA4C,YAAE,IAAI,GAAK,EACpE,YAAG,SAAS,EAAC,4CAA4C,YAAE,GAAG,GAAK,EAClE,UAAU,IAAI,CACb,eAAK,SAAS,EAAC,yCAAyC,aACtD,qCAAoB,EACpB,sCAAqB,IACjB,CACP,IACG,IACF,GACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ByTheNumbersSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/ByTheNumbersSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAStE,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,2CA+BxE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { str } from './parts.js';
|
|
3
|
+
export function ByTheNumbersSection({ section }) {
|
|
4
|
+
const c = section.content;
|
|
5
|
+
const heading = str(c, 'heading');
|
|
6
|
+
const body = str(c, 'body');
|
|
7
|
+
const stats = Array.isArray(c.stats) ? c.stats : [];
|
|
8
|
+
return (_jsxs("div", { className: "mx-auto max-w-5xl px-6 text-center", children: [heading && (_jsx("h2", { className: "text-2xl font-semibold tracking-tight text-zinc-900 sm:text-3xl", children: heading })), body && _jsx("p", { className: "mx-auto mt-4 max-w-2xl text-base text-zinc-600", children: body }), stats.length > 0 && (_jsx("dl", { className: "mt-10 grid grid-cols-1 gap-8 sm:grid-cols-3", children: stats.map((s, i) => (_jsxs("div", { children: [_jsx("dt", { className: "text-4xl font-semibold tracking-tight text-violet-600", children: String(s.value ?? '') }), _jsx("dd", { className: "mt-2 text-sm font-medium text-zinc-700", children: String(s.label ?? '') }), s.description ? (_jsx("dd", { className: "mt-1 text-xs text-zinc-500", children: String(s.description) })) : null] }, i))) }))] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ByTheNumbersSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ByTheNumbersSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/ByTheNumbersSection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAQhC,MAAM,UAAU,mBAAmB,CAAC,EAAE,OAAO,EAA4B;IACvE,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,KAAgB,CAAC,CAAC,CAAC,EAAE,CAAA;IAE/D,OAAO,CACL,eAAK,SAAS,EAAC,oCAAoC,aAChD,OAAO,IAAI,CACV,aAAI,SAAS,EAAC,iEAAiE,YAC5E,OAAO,GACL,CACN,EACA,IAAI,IAAI,YAAG,SAAS,EAAC,gDAAgD,YAAE,IAAI,GAAK,EAChF,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACnB,aAAI,SAAS,EAAC,6CAA6C,YACxD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,0BACE,aAAI,SAAS,EAAC,uDAAuD,YAClE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,GACnB,EACL,aAAI,SAAS,EAAC,wCAAwC,YAAE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,GAAM,EAClF,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CACf,aAAI,SAAS,EAAC,4BAA4B,YAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,GAAM,CACxE,CAAC,CAAC,CAAC,IAAI,KAPA,CAAC,CAQL,CACP,CAAC,GACC,CACN,IACG,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CtaBannerSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/CtaBannerSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAGtE,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,2CAyBrE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PreviewButton, isDarkBackground, str } from './parts.js';
|
|
3
|
+
export function CtaBannerSection({ section }) {
|
|
4
|
+
const c = section.content;
|
|
5
|
+
const dark = isDarkBackground(section.settings);
|
|
6
|
+
const heading = str(c, 'heading');
|
|
7
|
+
const body = str(c, 'body');
|
|
8
|
+
return (_jsxs("div", { className: "mx-auto max-w-3xl px-6 text-center", children: [_jsx("h2", { className: "text-2xl font-semibold tracking-tight sm:text-3xl", children: heading }), body && (_jsx("p", { className: `mx-auto mt-3 max-w-xl text-base ${dark ? 'text-violet-100' : 'text-zinc-600'}`, children: body })), _jsx("div", { className: "mt-6 flex justify-center", children: _jsx(PreviewButton, { label: str(c, 'buttonLabel'), href: str(c, 'buttonUrl'), tone: dark ? 'onDark' : 'primary' }) })] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=CtaBannerSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CtaBannerSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/CtaBannerSection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEjE,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAA4B;IACpE,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC/C,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAE3B,OAAO,CACL,eAAK,SAAS,EAAC,oCAAoC,aACjD,aAAI,SAAS,EAAC,mDAAmD,YAAE,OAAO,GAAM,EAC/E,IAAI,IAAI,CACP,YACE,SAAS,EAAE,mCAAmC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,EAAE,YAEzF,IAAI,GACH,CACL,EACD,cAAK,SAAS,EAAC,0BAA0B,YACvC,KAAC,aAAa,IACZ,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,EAC5B,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,EACzB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,GACjC,GACE,IACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureHighlightSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/FeatureHighlightSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAGtE,wBAAgB,uBAAuB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,2CA0D5E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ImageIcon } from 'lucide-react';
|
|
3
|
+
import { PreviewButton, str } from './parts.js';
|
|
4
|
+
export function FeatureHighlightSection({ section }) {
|
|
5
|
+
const c = section.content;
|
|
6
|
+
const label = str(c, 'label');
|
|
7
|
+
const heading = str(c, 'heading');
|
|
8
|
+
const body = str(c, 'body');
|
|
9
|
+
const imageUrl = str(c, 'imageUrl');
|
|
10
|
+
const imageAlt = str(c, 'imageAlt');
|
|
11
|
+
const imageLeft = str(c, 'imagePosition', 'right') === 'left';
|
|
12
|
+
const text = (_jsxs("div", { className: "flex-1", children: [label && (_jsx("span", { className: "mb-3 inline-block rounded bg-violet-600 px-2 py-0.5 text-xs font-medium text-white", children: label })), _jsx("h2", { className: "text-2xl font-semibold tracking-tight text-zinc-900 sm:text-3xl", children: heading }), body && _jsx("p", { className: "mt-4 text-base leading-relaxed text-zinc-600", children: body }), _jsx("div", { className: "mt-6", children: _jsx(PreviewButton, { label: str(c, 'buttonLabel'), href: str(c, 'buttonUrl'), tone: "primary" }) })] }));
|
|
13
|
+
const media = (_jsx("div", { className: "flex-1", children: imageUrl ? (
|
|
14
|
+
// Admin-only preview; next/image isn't in scope here.
|
|
15
|
+
_jsx("img", { src: imageUrl, alt: imageAlt, className: "aspect-[4/3] w-full rounded-xl object-cover" })) : (_jsx("div", { className: "flex aspect-[4/3] w-full items-center justify-center rounded-xl bg-violet-50", children: _jsx(ImageIcon, { className: "h-10 w-10 text-violet-300", "aria-hidden": true }) })) }));
|
|
16
|
+
return (_jsx("div", { className: "mx-auto max-w-5xl px-6", children: _jsx("div", { className: "flex flex-col items-center gap-10 md:flex-row", children: imageLeft ? (_jsxs(_Fragment, { children: [media, text] })) : (_jsxs(_Fragment, { children: [text, media] })) }) }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=FeatureHighlightSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureHighlightSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/FeatureHighlightSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,UAAU,uBAAuB,CAAC,EAAE,OAAO,EAA4B;IAC3E,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;IAC7B,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACjC,M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,EACJ,KAAK,IACL,CACJ,GACG,GACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PageSection } from '../../../lib/page-editor-service.js';
|
|
2
|
+
/** A responsive image grid with captions. */
|
|
3
|
+
export declare function GallerySection({ section }: {
|
|
4
|
+
section: PageSection;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=GallerySection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GallerySection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/GallerySection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAStE,6CAA6C;AAC7C,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,2CA2CnE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { str } from './parts.js';
|
|
3
|
+
/** A responsive image grid with captions. */
|
|
4
|
+
export function GallerySection({ section }) {
|
|
5
|
+
const c = section.content;
|
|
6
|
+
const heading = str(c, 'heading');
|
|
7
|
+
const columns = Number.parseInt(str(c, 'columns', '3'), 10) || 3;
|
|
8
|
+
const images = Array.isArray(c.images) ? c.images : [];
|
|
9
|
+
const withUrl = images.filter((img) => img && typeof img.url === 'string' && img.url);
|
|
10
|
+
const cols = columns === 2
|
|
11
|
+
? 'sm:grid-cols-2'
|
|
12
|
+
: columns === 4
|
|
13
|
+
? 'sm:grid-cols-2 lg:grid-cols-4'
|
|
14
|
+
: 'sm:grid-cols-3';
|
|
15
|
+
return (_jsxs("div", { className: "mx-auto max-w-5xl px-6", children: [heading && (_jsx("h2", { className: "mb-6 text-2xl font-semibold tracking-tight text-zinc-900", children: heading })), withUrl.length > 0 ? (_jsx("div", { className: `grid grid-cols-1 gap-3 ${cols}`, children: withUrl.map((img, i) => (_jsxs("figure", { className: "overflow-hidden rounded-lg border border-zinc-200", children: [_jsx("img", { src: img.url, alt: img.alt ?? '', className: "aspect-square w-full object-cover" }), img.caption && (_jsx("figcaption", { className: "px-2 py-1.5 text-xs text-zinc-500", children: img.caption }))] }, i))) })) : (_jsx("div", { className: `grid grid-cols-1 gap-3 ${cols}`, children: Array.from({ length: columns }, (_, i) => (_jsx("div", { className: "aspect-square rounded-lg bg-zinc-100", "aria-hidden": true }, i))) }))] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=GallerySection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GallerySection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/GallerySection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAQhC,6CAA6C;AAC7C,MAAM,UAAU,cAAc,CAAC,EAAE,OAAO,EAA4B;IAClE,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACjC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;IAChE,MAAM,MAAM,GAAmB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,MAAyB,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1F,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IAErF,MAAM,IAAI,GACR,OAAO,KAAK,CAAC;QACX,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,OAAO,KAAK,CAAC;YACb,CAAC,CAAC,+BAA+B;YACjC,CAAC,CAAC,gBAAgB,CAAA;IAExB,OAAO,CACL,eAAK,SAAS,EAAC,wBAAwB,aACpC,OAAO,IAAI,CACV,aAAI,SAAS,EAAC,0DAA0D,YAAE,OAAO,GAAM,CACxF,EACA,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACpB,cAAK,SAAS,EAAE,0BAA0B,IAAI,EAAE,YAC7C,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,kBAAgB,SAAS,EAAC,mDAAmD,aAC3E,cACE,GAAG,EAAE,GAAG,CAAC,GAAG,EACZ,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,EAClB,SAAS,EAAC,mCAAmC,GAC7C,EACD,GAAG,CAAC,OAAO,IAAI,CACd,qBAAY,SAAS,EAAC,mCAAmC,YAAE,GAAG,CAAC,OAAO,GAAc,CACrF,KARU,CAAC,CASL,CACV,CAAC,GACE,CACP,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAE,0BAA0B,IAAI,EAAE,YAC7C,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACzC,cAAa,SAAS,EAAC,sCAAsC,yBAAnD,CAAC,CAAiE,CAC7E,CAAC,GACE,CACP,IACG,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeroBannerSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/HeroBannerSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAGtE,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,2CAwCtE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PreviewButton, isDarkBackground, str } from './parts.js';
|
|
3
|
+
export function HeroBannerSection({ section }) {
|
|
4
|
+
const c = section.content;
|
|
5
|
+
const dark = isDarkBackground(section.settings);
|
|
6
|
+
const eyebrow = str(c, 'eyebrow');
|
|
7
|
+
const heading = str(c, 'heading');
|
|
8
|
+
const body = str(c, 'body');
|
|
9
|
+
return (_jsxs("div", { className: "mx-auto max-w-3xl px-6 text-center", children: [eyebrow && (_jsx("p", { className: `mb-3 text-sm font-medium tracking-wide uppercase ${dark ? 'text-violet-200' : 'text-violet-600'}`, children: eyebrow })), _jsx("h1", { className: "text-3xl leading-tight font-semibold tracking-tight sm:text-5xl", children: heading || 'Your headline goes here' }), body && (_jsx("p", { className: `mx-auto mt-5 max-w-2xl text-base sm:text-lg ${dark ? 'text-violet-100' : 'text-zinc-600'}`, children: body })), _jsxs("div", { className: "mt-8 flex flex-wrap items-center justify-center gap-3", children: [_jsx(PreviewButton, { label: str(c, 'primaryButtonLabel'), href: str(c, 'primaryButtonUrl'), tone: dark ? 'onDark' : 'primary' }), _jsx(PreviewButton, { label: str(c, 'secondaryButtonLabel'), href: str(c, 'secondaryButtonUrl'), tone: "ghost" })] })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=HeroBannerSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeroBannerSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/HeroBannerSection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEjE,MAAM,UAAU,iBAAiB,CAAC,EAAE,OAAO,EAA4B;IACrE,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC/C,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACjC,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAE3B,OAAO,CACL,eAAK,SAAS,EAAC,oCAAoC,aAChD,OAAO,IAAI,CACV,YACE,SAAS,EAAE,oDAAoD,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,EAAE,YAE5G,OAAO,GACN,CACL,EACD,aAAI,SAAS,EAAC,iEAAiE,YAC5E,OAAO,IAAI,yBAAyB,GAClC,EACJ,IAAI,IAAI,CACP,YACE,SAAS,EAAE,+CAA+C,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,EAAE,YAErG,IAAI,GACH,CACL,EACD,eAAK,SAAS,EAAC,uDAAuD,aACpE,KAAC,aAAa,IACZ,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,EACnC,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAChC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,GACjC,EACF,KAAC,aAAa,IACZ,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC,EACrC,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,EAClC,IAAI,EAAC,OAAO,GACZ,IACE,IACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PageSection } from '../../../lib/page-editor-service.js';
|
|
2
|
+
/** Generic "Text Block" / mission statement section. */
|
|
3
|
+
export declare function MissionSection({ section }: {
|
|
4
|
+
section: PageSection;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=MissionSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MissionSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/MissionSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAGtE,wDAAwD;AACxD,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,2CAiBnE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { str } from './parts.js';
|
|
3
|
+
/** Generic "Text Block" / mission statement section. */
|
|
4
|
+
export function MissionSection({ section }) {
|
|
5
|
+
const c = section.content;
|
|
6
|
+
const alignment = str(c, 'alignment', 'center');
|
|
7
|
+
const align = alignment === 'left' ? 'text-left' : 'text-center mx-auto';
|
|
8
|
+
const heading = str(c, 'heading');
|
|
9
|
+
const body = str(c, 'body');
|
|
10
|
+
return (_jsxs("div", { className: `max-w-3xl px-6 ${align}`, children: [heading && (_jsx("h2", { className: "text-2xl font-semibold tracking-tight text-zinc-900 sm:text-3xl", children: heading })), body && _jsx("p", { className: "mt-4 text-base leading-relaxed text-zinc-600 sm:text-lg", children: body })] }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=MissionSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MissionSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/MissionSection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEhC,wDAAwD;AACxD,MAAM,UAAU,cAAc,CAAC,EAAE,OAAO,EAA4B;IAClE,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAA;IAC/C,MAAM,KAAK,GAAG,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,qBAAqB,CAAA;IACxE,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAE3B,OAAO,CACL,eAAK,SAAS,EAAE,kBAAkB,KAAK,EAAE,aACtC,OAAO,IAAI,CACV,aAAI,SAAS,EAAC,iEAAiE,YAC5E,OAAO,GACL,CACN,EACA,IAAI,IAAI,YAAG,SAAS,EAAC,yDAAyD,YAAE,IAAI,GAAK,IACtF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PageSection } from '../../../lib/page-editor-service.js';
|
|
2
|
+
/** A highlighted pull quote with optional attribution. */
|
|
3
|
+
export declare function PullQuoteSection({ section }: {
|
|
4
|
+
section: PageSection;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=PullQuoteSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PullQuoteSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/PullQuoteSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAGtE,0DAA0D;AAC1D,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,kDAsBrE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { str } from './parts.js';
|
|
3
|
+
/** A highlighted pull quote with optional attribution. */
|
|
4
|
+
export function PullQuoteSection({ section }) {
|
|
5
|
+
const c = section.content;
|
|
6
|
+
const quote = str(c, 'quote');
|
|
7
|
+
const attribution = str(c, 'attribution');
|
|
8
|
+
const role = str(c, 'role');
|
|
9
|
+
if (!quote)
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsxs("figure", { className: "mx-auto max-w-3xl px-6", children: [_jsx("blockquote", { className: "border-l-4 border-violet-500 pl-6", children: _jsxs("p", { className: "text-xl leading-relaxed font-medium text-zinc-800 sm:text-2xl", children: ["\u201C", quote, "\u201D"] }) }), (attribution || role) && (_jsxs("figcaption", { className: "mt-3 pl-6 text-sm text-zinc-500", children: [attribution && _jsx("span", { className: "font-medium text-zinc-700", children: attribution }), attribution && role && _jsx("span", { "aria-hidden": true, children: " \u00B7 " }), role] }))] }));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=PullQuoteSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PullQuoteSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/PullQuoteSection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEhC,0DAA0D;AAC1D,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAA4B;IACpE,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;IAC7B,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAA;IACzC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAE3B,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,OAAO,CACL,kBAAQ,SAAS,EAAC,wBAAwB,aACxC,qBAAY,SAAS,EAAC,mCAAmC,YACvD,aAAG,SAAS,EAAC,+DAA+D,uBAAG,KAAK,cAAM,GAC/E,EACZ,CAAC,WAAW,IAAI,IAAI,CAAC,IAAI,CACxB,sBAAY,SAAS,EAAC,iCAAiC,aACpD,WAAW,IAAI,eAAM,SAAS,EAAC,2BAA2B,YAAE,WAAW,GAAQ,EAC/E,WAAW,IAAI,IAAI,IAAI,2DAA4B,EACnD,IAAI,IACM,CACd,IACM,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PageSection } from '../../../lib/page-editor-service.js';
|
|
2
|
+
import { type PostRenderContext } from './parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* A grid of related posts. Uses resolved posts from context when available;
|
|
5
|
+
* otherwise renders placeholder cards so the layout reads correctly in the
|
|
6
|
+
* editor before data is wired up.
|
|
7
|
+
*/
|
|
8
|
+
export declare function RelatedPostsSection({ section, context, }: {
|
|
9
|
+
section: PageSection;
|
|
10
|
+
context?: PostRenderContext;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=RelatedPostsSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelatedPostsSection.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/RelatedPostsSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAO,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAExD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B,2CAwCA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { str } from './parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* A grid of related posts. Uses resolved posts from context when available;
|
|
5
|
+
* otherwise renders placeholder cards so the layout reads correctly in the
|
|
6
|
+
* editor before data is wired up.
|
|
7
|
+
*/
|
|
8
|
+
export function RelatedPostsSection({ section, context, }) {
|
|
9
|
+
const c = section.content;
|
|
10
|
+
const heading = str(c, 'heading', 'Related posts');
|
|
11
|
+
const count = Number.parseInt(str(c, 'count', '3'), 10) || 3;
|
|
12
|
+
const resolved = context?.relatedPosts ?? [];
|
|
13
|
+
const cards = resolved.length > 0
|
|
14
|
+
? resolved.slice(0, count)
|
|
15
|
+
: Array.from({ length: count }, (_, i) => ({
|
|
16
|
+
title: `Related post ${i + 1}`,
|
|
17
|
+
excerpt: 'A short summary of the related post will appear here.',
|
|
18
|
+
url: undefined,
|
|
19
|
+
}));
|
|
20
|
+
const cols = count >= 4 ? 'sm:grid-cols-2 lg:grid-cols-4' : 'sm:grid-cols-3';
|
|
21
|
+
return (_jsxs("div", { className: "mx-auto max-w-5xl px-6", children: [heading && (_jsx("h2", { className: "mb-6 text-2xl font-semibold tracking-tight text-zinc-900", children: heading })), _jsx("div", { className: `grid grid-cols-1 gap-4 ${cols}`, children: cards.map((post, i) => (_jsxs("div", { className: "overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-sm", children: [_jsx("div", { className: "aspect-[16/9] bg-zinc-100", "aria-hidden": true }), _jsxs("div", { className: "p-4", children: [_jsx("p", { className: "text-base font-medium text-zinc-900", children: post.title }), post.excerpt && (_jsx("p", { className: "mt-1 line-clamp-2 text-sm text-zinc-500", children: post.excerpt }))] })] }, i))) })] }));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=RelatedPostsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelatedPostsSection.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/RelatedPostsSection.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAA0B,MAAM,YAAY,CAAA;AAExD;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,OAAO,EACP,OAAO,GAIR;IACC,M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G,SAAS,EAAC,yCAAyC,YAAE,IAAI,CAAC,OAAO,GAAK,CAC1E,IACG,KATD,CAAC,CAUF,CACP,CAAC,GACE,IACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PageSection } from '../../../lib/page-editor-service.js';
|
|
2
|
+
import { type PostRenderContext } from './parts.js';
|
|
3
|
+
export interface SectionRendererProps {
|
|
4
|
+
section: PageSection;
|
|
5
|
+
/** Editor mode: adds click-to-select, the selection outline + label, and
|
|
6
|
+
* renders hidden sections muted instead of removing them. */
|
|
7
|
+
editable?: boolean;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
onSelect?: (id: string) => void;
|
|
10
|
+
/** Lets the canvas register the DOM node for scroll-to-section. */
|
|
11
|
+
registerRef?: (id: string, el: HTMLElement | null) => void;
|
|
12
|
+
/** Live post data for post-oriented section renderers (pages omit this). */
|
|
13
|
+
context?: PostRenderContext;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders one section with its background + padding, dispatching to the
|
|
17
|
+
* shared body component. In `editable` mode it layers editor-only chrome
|
|
18
|
+
* (outline + a small purple type label) on top of the same markup the
|
|
19
|
+
* public preview uses — so what you edit is what ships.
|
|
20
|
+
*/
|
|
21
|
+
export declare function SectionRenderer({ section, editable, selected, onSelect, registerRef, context, }: SectionRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=SectionRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionRenderer.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/SectionRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAiC,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAwClF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,WAAW,CAAA;IACpB;kEAC8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,mEAAmE;IACnE,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1D,4EAA4E;IAC5E,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,QAAQ,EACR,WAAW,EACX,OAAO,GACR,EAAE,oBAAoB,2CAgCtB"}
|