@actuate-media/cms-admin 0.14.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/AdminRoot.d.ts.map +1 -1
  2. package/dist/AdminRoot.js +148 -2
  3. package/dist/AdminRoot.js.map +1 -1
  4. package/dist/__tests__/components/posts-badges.test.d.ts +2 -0
  5. package/dist/__tests__/components/posts-badges.test.d.ts.map +1 -0
  6. package/dist/__tests__/components/posts-badges.test.js +68 -0
  7. package/dist/__tests__/components/posts-badges.test.js.map +1 -0
  8. package/dist/__tests__/layout/sidebar-posts.test.d.ts +2 -0
  9. package/dist/__tests__/layout/sidebar-posts.test.d.ts.map +1 -0
  10. package/dist/__tests__/layout/sidebar-posts.test.js +162 -0
  11. package/dist/__tests__/layout/sidebar-posts.test.js.map +1 -0
  12. package/dist/__tests__/lib/page-editor-service.test.d.ts +2 -0
  13. package/dist/__tests__/lib/page-editor-service.test.d.ts.map +1 -0
  14. package/dist/__tests__/lib/page-editor-service.test.js +137 -0
  15. package/dist/__tests__/lib/page-editor-service.test.js.map +1 -0
  16. package/dist/__tests__/lib/pages-service.test.d.ts +2 -0
  17. package/dist/__tests__/lib/pages-service.test.d.ts.map +1 -0
  18. package/dist/__tests__/lib/pages-service.test.js +140 -0
  19. package/dist/__tests__/lib/pages-service.test.js.map +1 -0
  20. package/dist/__tests__/lib/post-editor-service.test.d.ts +2 -0
  21. package/dist/__tests__/lib/post-editor-service.test.d.ts.map +1 -0
  22. package/dist/__tests__/lib/post-editor-service.test.js +185 -0
  23. package/dist/__tests__/lib/post-editor-service.test.js.map +1 -0
  24. package/dist/__tests__/lib/posts-service.test.d.ts +2 -0
  25. package/dist/__tests__/lib/posts-service.test.d.ts.map +1 -0
  26. package/dist/__tests__/lib/posts-service.test.js +244 -0
  27. package/dist/__tests__/lib/posts-service.test.js.map +1 -0
  28. package/dist/__tests__/views/posts-list-view.test.d.ts +2 -0
  29. package/dist/__tests__/views/posts-list-view.test.d.ts.map +1 -0
  30. package/dist/__tests__/views/posts-list-view.test.js +98 -0
  31. package/dist/__tests__/views/posts-list-view.test.js.map +1 -0
  32. package/dist/actuate-admin.css +1 -1
  33. package/dist/components/pages/tag-badges.d.ts +21 -0
  34. package/dist/components/pages/tag-badges.d.ts.map +1 -0
  35. package/dist/components/pages/tag-badges.js +56 -0
  36. package/dist/components/pages/tag-badges.js.map +1 -0
  37. package/dist/components/posts/badges.d.ts +25 -0
  38. package/dist/components/posts/badges.d.ts.map +1 -0
  39. package/dist/components/posts/badges.js +123 -0
  40. package/dist/components/posts/badges.js.map +1 -0
  41. package/dist/components/posts/icons.d.ts +12 -0
  42. package/dist/components/posts/icons.d.ts.map +1 -0
  43. package/dist/components/posts/icons.js +26 -0
  44. package/dist/components/posts/icons.js.map +1 -0
  45. package/dist/layout/Header.d.ts +14 -1
  46. package/dist/layout/Header.d.ts.map +1 -1
  47. package/dist/layout/Header.js +10 -3
  48. package/dist/layout/Header.js.map +1 -1
  49. package/dist/layout/Layout.d.ts.map +1 -1
  50. package/dist/layout/Layout.js +78 -2
  51. package/dist/layout/Layout.js.map +1 -1
  52. package/dist/layout/Sidebar.d.ts +16 -0
  53. package/dist/layout/Sidebar.d.ts.map +1 -1
  54. package/dist/layout/Sidebar.js +176 -49
  55. package/dist/layout/Sidebar.js.map +1 -1
  56. package/dist/lib/page-editor-service.d.ts +45 -0
  57. package/dist/lib/page-editor-service.d.ts.map +1 -0
  58. package/dist/lib/page-editor-service.js +153 -0
  59. package/dist/lib/page-editor-service.js.map +1 -0
  60. package/dist/lib/pages-service.d.ts +143 -0
  61. package/dist/lib/pages-service.d.ts.map +1 -0
  62. package/dist/lib/pages-service.js +444 -0
  63. package/dist/lib/pages-service.js.map +1 -0
  64. package/dist/lib/post-editor-service.d.ts +57 -0
  65. package/dist/lib/post-editor-service.d.ts.map +1 -0
  66. package/dist/lib/post-editor-service.js +234 -0
  67. package/dist/lib/post-editor-service.js.map +1 -0
  68. package/dist/lib/posts-service.d.ts +73 -0
  69. package/dist/lib/posts-service.d.ts.map +1 -0
  70. package/dist/lib/posts-service.js +245 -0
  71. package/dist/lib/posts-service.js.map +1 -0
  72. package/dist/lib/preview-link.d.ts +32 -0
  73. package/dist/lib/preview-link.d.ts.map +1 -0
  74. package/dist/lib/preview-link.js +40 -0
  75. package/dist/lib/preview-link.js.map +1 -0
  76. package/dist/router/index.d.ts +1 -0
  77. package/dist/router/index.d.ts.map +1 -1
  78. package/dist/router/index.js +9 -1
  79. package/dist/router/index.js.map +1 -1
  80. package/dist/views/Dashboard.d.ts.map +1 -1
  81. package/dist/views/Dashboard.js +147 -62
  82. package/dist/views/Dashboard.js.map +1 -1
  83. package/dist/views/Pages/PageTagManager.d.ts +14 -0
  84. package/dist/views/Pages/PageTagManager.d.ts.map +1 -0
  85. package/dist/views/Pages/PageTagManager.js +145 -0
  86. package/dist/views/Pages/PageTagManager.js.map +1 -0
  87. package/dist/views/Pages/PagesListView.d.ts +18 -0
  88. package/dist/views/Pages/PagesListView.d.ts.map +1 -0
  89. package/dist/views/Pages/PagesListView.js +287 -0
  90. package/dist/views/Pages/PagesListView.js.map +1 -0
  91. package/dist/views/Posts/NewPostPicker.d.ts +16 -0
  92. package/dist/views/Posts/NewPostPicker.d.ts.map +1 -0
  93. package/dist/views/Posts/NewPostPicker.js +59 -0
  94. package/dist/views/Posts/NewPostPicker.js.map +1 -0
  95. package/dist/views/Posts/NewPostTypeInstructions.d.ts +18 -0
  96. package/dist/views/Posts/NewPostTypeInstructions.d.ts.map +1 -0
  97. package/dist/views/Posts/NewPostTypeInstructions.js +147 -0
  98. package/dist/views/Posts/NewPostTypeInstructions.js.map +1 -0
  99. package/dist/views/Posts/PostTypesView.d.ts +26 -0
  100. package/dist/views/Posts/PostTypesView.d.ts.map +1 -0
  101. package/dist/views/Posts/PostTypesView.js +52 -0
  102. package/dist/views/Posts/PostTypesView.js.map +1 -0
  103. package/dist/views/Posts/PostsListView.d.ts +25 -0
  104. package/dist/views/Posts/PostsListView.d.ts.map +1 -0
  105. package/dist/views/Posts/PostsListView.js +239 -0
  106. package/dist/views/Posts/PostsListView.js.map +1 -0
  107. package/dist/views/Posts/post-type-presets.d.ts +32 -0
  108. package/dist/views/Posts/post-type-presets.d.ts.map +1 -0
  109. package/dist/views/Posts/post-type-presets.js +72 -0
  110. package/dist/views/Posts/post-type-presets.js.map +1 -0
  111. package/dist/views/page-builder/Widgets.d.ts +13 -0
  112. package/dist/views/page-builder/Widgets.d.ts.map +1 -0
  113. package/dist/views/page-builder/Widgets.js +15 -0
  114. package/dist/views/page-builder/Widgets.js.map +1 -0
  115. package/dist/views/page-editor/AddSectionModal.d.ts +20 -0
  116. package/dist/views/page-editor/AddSectionModal.d.ts.map +1 -0
  117. package/dist/views/page-editor/AddSectionModal.js +22 -0
  118. package/dist/views/page-editor/AddSectionModal.js.map +1 -0
  119. package/dist/views/page-editor/EditorCanvas.d.ts +18 -0
  120. package/dist/views/page-editor/EditorCanvas.d.ts.map +1 -0
  121. package/dist/views/page-editor/EditorCanvas.js +64 -0
  122. package/dist/views/page-editor/EditorCanvas.js.map +1 -0
  123. package/dist/views/page-editor/EditorTopBar.d.ts +30 -0
  124. package/dist/views/page-editor/EditorTopBar.d.ts.map +1 -0
  125. package/dist/views/page-editor/EditorTopBar.js +42 -0
  126. package/dist/views/page-editor/EditorTopBar.js.map +1 -0
  127. package/dist/views/page-editor/PagePreview.d.ts +13 -0
  128. package/dist/views/page-editor/PagePreview.d.ts.map +1 -0
  129. package/dist/views/page-editor/PagePreview.js +37 -0
  130. package/dist/views/page-editor/PagePreview.js.map +1 -0
  131. package/dist/views/page-editor/PageSectionEditor.d.ts +16 -0
  132. package/dist/views/page-editor/PageSectionEditor.d.ts.map +1 -0
  133. package/dist/views/page-editor/PageSectionEditor.js +272 -0
  134. package/dist/views/page-editor/PageSectionEditor.js.map +1 -0
  135. package/dist/views/page-editor/PageSettingsModal.d.ts +12 -0
  136. package/dist/views/page-editor/PageSettingsModal.d.ts.map +1 -0
  137. package/dist/views/page-editor/PageSettingsModal.js +52 -0
  138. package/dist/views/page-editor/PageSettingsModal.js.map +1 -0
  139. package/dist/views/page-editor/SectionInspector.d.ts +17 -0
  140. package/dist/views/page-editor/SectionInspector.d.ts.map +1 -0
  141. package/dist/views/page-editor/SectionInspector.js +98 -0
  142. package/dist/views/page-editor/SectionInspector.js.map +1 -0
  143. package/dist/views/page-editor/SectionsPanel.d.ts +15 -0
  144. package/dist/views/page-editor/SectionsPanel.d.ts.map +1 -0
  145. package/dist/views/page-editor/SectionsPanel.js +43 -0
  146. package/dist/views/page-editor/SectionsPanel.js.map +1 -0
  147. package/dist/views/page-editor/ValidationSummary.d.ts +9 -0
  148. package/dist/views/page-editor/ValidationSummary.d.ts.map +1 -0
  149. package/dist/views/page-editor/ValidationSummary.js +10 -0
  150. package/dist/views/page-editor/ValidationSummary.js.map +1 -0
  151. package/dist/views/page-editor/section-icons.d.ts +4 -0
  152. package/dist/views/page-editor/section-icons.d.ts.map +1 -0
  153. package/dist/views/page-editor/section-icons.js +20 -0
  154. package/dist/views/page-editor/section-icons.js.map +1 -0
  155. package/dist/views/page-editor/section-types.d.ts +11 -0
  156. package/dist/views/page-editor/section-types.d.ts.map +1 -0
  157. package/dist/views/page-editor/section-types.js +10 -0
  158. package/dist/views/page-editor/section-types.js.map +1 -0
  159. package/dist/views/page-editor/sections/ArticleBodySection.d.ts +13 -0
  160. package/dist/views/page-editor/sections/ArticleBodySection.d.ts.map +1 -0
  161. package/dist/views/page-editor/sections/ArticleBodySection.js +23 -0
  162. package/dist/views/page-editor/sections/ArticleBodySection.js.map +1 -0
  163. package/dist/views/page-editor/sections/AuthorBioSection.d.ts +8 -0
  164. package/dist/views/page-editor/sections/AuthorBioSection.d.ts.map +1 -0
  165. package/dist/views/page-editor/sections/AuthorBioSection.js +21 -0
  166. package/dist/views/page-editor/sections/AuthorBioSection.js.map +1 -0
  167. package/dist/views/page-editor/sections/ByTheNumbersSection.d.ts +5 -0
  168. package/dist/views/page-editor/sections/ByTheNumbersSection.d.ts.map +1 -0
  169. package/dist/views/page-editor/sections/ByTheNumbersSection.js +10 -0
  170. package/dist/views/page-editor/sections/ByTheNumbersSection.js.map +1 -0
  171. package/dist/views/page-editor/sections/CtaBannerSection.d.ts +5 -0
  172. package/dist/views/page-editor/sections/CtaBannerSection.d.ts.map +1 -0
  173. package/dist/views/page-editor/sections/CtaBannerSection.js +10 -0
  174. package/dist/views/page-editor/sections/CtaBannerSection.js.map +1 -0
  175. package/dist/views/page-editor/sections/FeatureHighlightSection.d.ts +5 -0
  176. package/dist/views/page-editor/sections/FeatureHighlightSection.d.ts.map +1 -0
  177. package/dist/views/page-editor/sections/FeatureHighlightSection.js +18 -0
  178. package/dist/views/page-editor/sections/FeatureHighlightSection.js.map +1 -0
  179. package/dist/views/page-editor/sections/GallerySection.d.ts +6 -0
  180. package/dist/views/page-editor/sections/GallerySection.d.ts.map +1 -0
  181. package/dist/views/page-editor/sections/GallerySection.js +17 -0
  182. package/dist/views/page-editor/sections/GallerySection.js.map +1 -0
  183. package/dist/views/page-editor/sections/HeroBannerSection.d.ts +5 -0
  184. package/dist/views/page-editor/sections/HeroBannerSection.d.ts.map +1 -0
  185. package/dist/views/page-editor/sections/HeroBannerSection.js +11 -0
  186. package/dist/views/page-editor/sections/HeroBannerSection.js.map +1 -0
  187. package/dist/views/page-editor/sections/MissionSection.d.ts +6 -0
  188. package/dist/views/page-editor/sections/MissionSection.d.ts.map +1 -0
  189. package/dist/views/page-editor/sections/MissionSection.js +12 -0
  190. package/dist/views/page-editor/sections/MissionSection.js.map +1 -0
  191. package/dist/views/page-editor/sections/PullQuoteSection.d.ts +6 -0
  192. package/dist/views/page-editor/sections/PullQuoteSection.d.ts.map +1 -0
  193. package/dist/views/page-editor/sections/PullQuoteSection.js +13 -0
  194. package/dist/views/page-editor/sections/PullQuoteSection.js.map +1 -0
  195. package/dist/views/page-editor/sections/RelatedPostsSection.d.ts +12 -0
  196. package/dist/views/page-editor/sections/RelatedPostsSection.d.ts.map +1 -0
  197. package/dist/views/page-editor/sections/RelatedPostsSection.js +23 -0
  198. package/dist/views/page-editor/sections/RelatedPostsSection.js.map +1 -0
  199. package/dist/views/page-editor/sections/SectionRenderer.d.ts +22 -0
  200. package/dist/views/page-editor/sections/SectionRenderer.d.ts.map +1 -0
  201. package/dist/views/page-editor/sections/SectionRenderer.js +52 -0
  202. package/dist/views/page-editor/sections/SectionRenderer.js.map +1 -0
  203. package/dist/views/page-editor/sections/index.d.ts +14 -0
  204. package/dist/views/page-editor/sections/index.d.ts.map +1 -0
  205. package/dist/views/page-editor/sections/index.js +12 -0
  206. package/dist/views/page-editor/sections/index.js.map +1 -0
  207. package/dist/views/page-editor/sections/parts.d.ts +55 -0
  208. package/dist/views/page-editor/sections/parts.d.ts.map +1 -0
  209. package/dist/views/page-editor/sections/parts.js +60 -0
  210. package/dist/views/page-editor/sections/parts.js.map +1 -0
  211. package/dist/views/page-editor/viewports.d.ts +14 -0
  212. package/dist/views/page-editor/viewports.d.ts.map +1 -0
  213. package/dist/views/page-editor/viewports.js +12 -0
  214. package/dist/views/page-editor/viewports.js.map +1 -0
  215. package/dist/views/post-editor/PostEditorCanvas.d.ts +21 -0
  216. package/dist/views/post-editor/PostEditorCanvas.d.ts.map +1 -0
  217. package/dist/views/post-editor/PostEditorCanvas.js +58 -0
  218. package/dist/views/post-editor/PostEditorCanvas.js.map +1 -0
  219. package/dist/views/post-editor/PostFieldsModal.d.ts +12 -0
  220. package/dist/views/post-editor/PostFieldsModal.d.ts.map +1 -0
  221. package/dist/views/post-editor/PostFieldsModal.js +53 -0
  222. package/dist/views/post-editor/PostFieldsModal.js.map +1 -0
  223. package/dist/views/post-editor/PostHeader.d.ts +15 -0
  224. package/dist/views/post-editor/PostHeader.d.ts.map +1 -0
  225. package/dist/views/post-editor/PostHeader.js +27 -0
  226. package/dist/views/post-editor/PostHeader.js.map +1 -0
  227. package/dist/views/post-editor/PostHeaderPanel.d.ts +11 -0
  228. package/dist/views/post-editor/PostHeaderPanel.d.ts.map +1 -0
  229. package/dist/views/post-editor/PostHeaderPanel.js +21 -0
  230. package/dist/views/post-editor/PostHeaderPanel.js.map +1 -0
  231. package/dist/views/post-editor/PostPreview.d.ts +14 -0
  232. package/dist/views/post-editor/PostPreview.d.ts.map +1 -0
  233. package/dist/views/post-editor/PostPreview.js +53 -0
  234. package/dist/views/post-editor/PostPreview.js.map +1 -0
  235. package/dist/views/post-editor/PostSectionEditor.d.ts +17 -0
  236. package/dist/views/post-editor/PostSectionEditor.d.ts.map +1 -0
  237. package/dist/views/post-editor/PostSectionEditor.js +290 -0
  238. package/dist/views/post-editor/PostSectionEditor.js.map +1 -0
  239. package/dist/views/post-editor/PostTemplateEditor.d.ts +9 -0
  240. package/dist/views/post-editor/PostTemplateEditor.d.ts.map +1 -0
  241. package/dist/views/post-editor/PostTemplateEditor.js +144 -0
  242. package/dist/views/post-editor/PostTemplateEditor.js.map +1 -0
  243. package/package.json +2 -2
  244. package/src/AdminRoot.tsx +213 -2
  245. package/src/__tests__/components/posts-badges.test.tsx +77 -0
  246. package/src/__tests__/layout/sidebar-posts.test.ts +179 -0
  247. package/src/__tests__/lib/page-editor-service.test.ts +173 -0
  248. package/src/__tests__/lib/pages-service.test.ts +157 -0
  249. package/src/__tests__/lib/post-editor-service.test.ts +215 -0
  250. package/src/__tests__/lib/posts-service.test.ts +279 -0
  251. package/src/__tests__/views/posts-list-view.test.ts +110 -0
  252. package/src/components/pages/tag-badges.tsx +104 -0
  253. package/src/components/posts/badges.tsx +170 -0
  254. package/src/components/posts/icons.ts +40 -0
  255. package/src/layout/Header.tsx +90 -43
  256. package/src/layout/Layout.tsx +166 -1
  257. package/src/layout/Sidebar.tsx +287 -101
  258. package/src/lib/page-editor-service.ts +233 -0
  259. package/src/lib/pages-service.ts +599 -0
  260. package/src/lib/post-editor-service.ts +342 -0
  261. package/src/lib/posts-service.ts +366 -0
  262. package/src/lib/preview-link.ts +63 -0
  263. package/src/router/index.ts +10 -1
  264. package/src/views/Dashboard.tsx +270 -131
  265. package/src/views/Pages/PageTagManager.tsx +436 -0
  266. package/src/views/Pages/PagesListView.tsx +944 -0
  267. package/src/views/Posts/NewPostPicker.tsx +147 -0
  268. package/src/views/Posts/NewPostTypeInstructions.tsx +344 -0
  269. package/src/views/Posts/PostTypesView.tsx +194 -0
  270. package/src/views/Posts/PostsListView.tsx +869 -0
  271. package/src/views/Posts/post-type-presets.ts +105 -0
  272. package/src/views/page-builder/Widgets.tsx +44 -0
  273. package/src/views/page-editor/AddSectionModal.tsx +56 -0
  274. package/src/views/page-editor/EditorCanvas.tsx +127 -0
  275. package/src/views/page-editor/EditorTopBar.tsx +233 -0
  276. package/src/views/page-editor/PagePreview.tsx +96 -0
  277. package/src/views/page-editor/PageSectionEditor.tsx +476 -0
  278. package/src/views/page-editor/PageSettingsModal.tsx +154 -0
  279. package/src/views/page-editor/SectionInspector.tsx +599 -0
  280. package/src/views/page-editor/SectionsPanel.tsx +270 -0
  281. package/src/views/page-editor/ValidationSummary.tsx +53 -0
  282. package/src/views/page-editor/section-icons.ts +33 -0
  283. package/src/views/page-editor/section-types.ts +27 -0
  284. package/src/views/page-editor/sections/ArticleBodySection.tsx +57 -0
  285. package/src/views/page-editor/sections/AuthorBioSection.tsx +61 -0
  286. package/src/views/page-editor/sections/ByTheNumbersSection.tsx +41 -0
  287. package/src/views/page-editor/sections/CtaBannerSection.tsx +29 -0
  288. package/src/views/page-editor/sections/FeatureHighlightSection.tsx +63 -0
  289. package/src/views/page-editor/sections/GallerySection.tsx +54 -0
  290. package/src/views/page-editor/sections/HeroBannerSection.tsx +44 -0
  291. package/src/views/page-editor/sections/MissionSection.tsx +22 -0
  292. package/src/views/page-editor/sections/PullQuoteSection.tsx +27 -0
  293. package/src/views/page-editor/sections/RelatedPostsSection.tsx +55 -0
  294. package/src/views/page-editor/sections/SectionRenderer.tsx +102 -0
  295. package/src/views/page-editor/sections/index.ts +13 -0
  296. package/src/views/page-editor/sections/parts.tsx +113 -0
  297. package/src/views/page-editor/viewports.ts +25 -0
  298. package/src/views/post-editor/PostEditorCanvas.tsx +123 -0
  299. package/src/views/post-editor/PostFieldsModal.tsx +196 -0
  300. package/src/views/post-editor/PostHeader.tsx +87 -0
  301. package/src/views/post-editor/PostHeaderPanel.tsx +107 -0
  302. package/src/views/post-editor/PostPreview.tsx +114 -0
  303. package/src/views/post-editor/PostSectionEditor.tsx +506 -0
  304. package/src/views/post-editor/PostTemplateEditor.tsx +347 -0
@@ -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/HeroBanner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C,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,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;IACzB,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,eAAe,CAAC,CAAA;IAClD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;IAE5D,MAAM,QAAQ,GAAG,OAAO,EAAE,YAAY,IAAI,EAAE,CAAA;IAC5C,MAAM,KAAK,GACT,QAAQ,CAAC,MAAM,GAAG,CAAC;QACjB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;QAC1B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACvC,KAAK,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE;YAC9B,OAAO,EAAE,uDAAuD;YAChE,GAAG,EAAE,SAA+B;SACrC,CAAC,CAAC,CAAA;IAET,MAAM,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,gBAAgB,CAAA;IAE5E,OAAO,CACL,eAAK,SAAS,EAAC,wBAAwB,aACpC,OAAO,IAAI,CACV,aAAI,SAAS,EAAC,0DAA0D,YAAE,OAAO,GAAM,CACxF,EACD,cAAK,SAAS,EAAE,0BAA0B,IAAI,EAAE,YAC7C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,eAEE,SAAS,EAAC,sEAAsE,aAEhF,cAAK,SAAS,EAAC,2BAA2B,wBAAe,EACzD,eAAK,SAAS,EAAC,KAAK,aAClB,YAAG,SAAS,EAAC,qCAAqC,YAAE,IAAI,CAAC,KAAK,GAAK,EAClE,IAAI,CAAC,OAAO,IAAI,CACf,YAAG,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"}
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { backgroundClass, paddingClass } from './parts.js';
4
+ import { HeroBannerSection } from './HeroBannerSection.js';
5
+ import { MissionSection } from './MissionSection.js';
6
+ import { FeatureHighlightSection } from './FeatureHighlightSection.js';
7
+ import { ByTheNumbersSection } from './ByTheNumbersSection.js';
8
+ import { CtaBannerSection } from './CtaBannerSection.js';
9
+ import { ArticleBodySection } from './ArticleBodySection.js';
10
+ import { PullQuoteSection } from './PullQuoteSection.js';
11
+ import { AuthorBioSection } from './AuthorBioSection.js';
12
+ import { RelatedPostsSection } from './RelatedPostsSection.js';
13
+ import { GallerySection } from './GallerySection.js';
14
+ /** Dispatch a section's body component by type. Shared by editor + preview. */
15
+ function SectionBody({ section, context }) {
16
+ switch (section.sectionType) {
17
+ case 'hero':
18
+ return _jsx(HeroBannerSection, { section: section });
19
+ case 'text':
20
+ return _jsx(MissionSection, { section: section });
21
+ case 'feature':
22
+ return _jsx(FeatureHighlightSection, { section: section });
23
+ case 'stats':
24
+ return _jsx(ByTheNumbersSection, { section: section });
25
+ case 'cta':
26
+ return _jsx(CtaBannerSection, { section: section });
27
+ case 'article-body':
28
+ return _jsx(ArticleBodySection, { section: section, context: context });
29
+ case 'quote':
30
+ return _jsx(PullQuoteSection, { section: section });
31
+ case 'author-bio':
32
+ return _jsx(AuthorBioSection, { section: section, context: context });
33
+ case 'related-posts':
34
+ return _jsx(RelatedPostsSection, { section: section, context: context });
35
+ case 'gallery':
36
+ return _jsx(GallerySection, { section: section });
37
+ default:
38
+ return null;
39
+ }
40
+ }
41
+ /**
42
+ * Renders one section with its background + padding, dispatching to the
43
+ * shared body component. In `editable` mode it layers editor-only chrome
44
+ * (outline + a small purple type label) on top of the same markup the
45
+ * public preview uses — so what you edit is what ships.
46
+ */
47
+ export function SectionRenderer({ section, editable = false, selected = false, onSelect, registerRef, context, }) {
48
+ const settings = section.settings ?? {};
49
+ const hidden = editable && !section.visible;
50
+ return (_jsxs("section", { ref: (el) => registerRef?.(section.id, el), "data-section-id": section.id, id: settings.anchorId || undefined, className: `relative ${backgroundClass(settings)} ${paddingClass(settings)} ${settings.cssClass ?? ''} ${hidden ? 'opacity-40' : ''} ${editable ? 'cursor-pointer outline-2 -outline-offset-2 transition-[outline]' : ''} ${selected ? 'outline outline-violet-500' : 'outline-transparent'}`, onClick: editable ? () => onSelect?.(section.id) : undefined, "aria-label": editable ? `${section.name} section` : undefined, children: [editable && selected && (_jsx("span", { className: "pointer-events-none absolute top-0 left-0 z-10 rounded-br-md bg-violet-600 px-2 py-0.5 text-xs font-medium text-white", children: section.name })), editable && hidden && (_jsx("span", { className: "pointer-events-none absolute top-0 right-0 z-10 rounded-bl-md bg-zinc-700 px-2 py-0.5 text-xs font-medium text-white", children: "Hidden" })), _jsx(SectionBody, { section: section, context: context })] }));
51
+ }
52
+ //# sourceMappingURL=SectionRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionRenderer.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/SectionRenderer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,eAAe,EAAE,YAAY,EAA0B,MAAM,YAAY,CAAA;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,+EAA+E;AAC/E,SAAS,WAAW,CAAC,EAAE,OAAO,EAAE,OA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OAAO,CAAC,OAAO,CAAA;IAE3C,OAAO,CACL,mBACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,qBACzB,OAAO,CAAC,EAAE,EAC3B,EAAE,EAAE,QAAQ,CAAC,QAAQ,IAAI,SAAS,EAClC,SAAS,EAAE,YAAY,eAAe,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,IACxE,QAAQ,CAAC,QAAQ,IAAI,EACvB,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAC5B,QAAQ,CAAC,CAAC,CAAC,iEAAiE,CAAC,CAAC,CAAC,EACjF,IAAI,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,qBAAqB,EAAE,EACrE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,gBAGhD,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,SAAS,aAE3D,QAAQ,IAAI,QAAQ,IAAI,CACvB,eAAM,SAAS,EAAC,uHAAuH,YACpI,OAAO,CAAC,IAAI,GACR,CACR,EACA,QAAQ,IAAI,MAAM,IAAI,CACrB,eAAM,SAAS,EAAC,sHAAsH,uBAE/H,CACR,EACD,KAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAI,IAC3C,CACX,CAAA;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ export { SectionRenderer } from './SectionRenderer.js';
2
+ export type { SectionRendererProps } from './SectionRenderer.js';
3
+ export type { PostRenderContext } from './parts.js';
4
+ export { HeroBannerSection } from './HeroBannerSection.js';
5
+ export { MissionSection } from './MissionSection.js';
6
+ export { FeatureHighlightSection } from './FeatureHighlightSection.js';
7
+ export { ByTheNumbersSection } from './ByTheNumbersSection.js';
8
+ export { CtaBannerSection } from './CtaBannerSection.js';
9
+ export { ArticleBodySection } from './ArticleBodySection.js';
10
+ export { PullQuoteSection } from './PullQuoteSection.js';
11
+ export { AuthorBioSection } from './AuthorBioSection.js';
12
+ export { RelatedPostsSection } from './RelatedPostsSection.js';
13
+ export { GallerySection } from './GallerySection.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,12 @@
1
+ export { SectionRenderer } from './SectionRenderer.js';
2
+ export { HeroBannerSection } from './HeroBannerSection.js';
3
+ export { MissionSection } from './MissionSection.js';
4
+ export { FeatureHighlightSection } from './FeatureHighlightSection.js';
5
+ export { ByTheNumbersSection } from './ByTheNumbersSection.js';
6
+ export { CtaBannerSection } from './CtaBannerSection.js';
7
+ export { ArticleBodySection } from './ArticleBodySection.js';
8
+ export { PullQuoteSection } from './PullQuoteSection.js';
9
+ export { AuthorBioSection } from './AuthorBioSection.js';
10
+ export { RelatedPostsSection } from './RelatedPostsSection.js';
11
+ export { GallerySection } from './GallerySection.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Shared building blocks for the section renderers.
3
+ *
4
+ * NOTE ON STYLING: the components under `sections/` render the consumer's
5
+ * *public website* content (purple hero, white prose bands, etc.), not the
6
+ * admin chrome. They therefore use a small, fixed website palette (violet
7
+ * for primary, zinc for neutrals) instead of the admin theme tokens. This
8
+ * is deliberate and scoped to this folder so the preview looks like a real
9
+ * page; the surrounding editor UI still uses the admin design tokens.
10
+ */
11
+ import type { SectionSettings } from '../section-types.js';
12
+ /**
13
+ * Live post data passed to the post-oriented section renderers
14
+ * (article body, author bio, related posts). Pages never supply this, so
15
+ * every consumer treats it as optional and falls back to placeholder copy.
16
+ */
17
+ export interface PostRenderContext {
18
+ title?: string;
19
+ excerpt?: string;
20
+ /** the post's main body copy (rendered by the Article Body section) */
21
+ body?: string;
22
+ featuredImageUrl?: string;
23
+ publishDate?: string | null;
24
+ category?: string;
25
+ author?: {
26
+ name?: string;
27
+ bio?: string;
28
+ avatarUrl?: string;
29
+ };
30
+ /** resolved related posts for the Related Posts section */
31
+ relatedPosts?: Array<{
32
+ title: string;
33
+ url?: string;
34
+ excerpt?: string;
35
+ }>;
36
+ }
37
+ export declare function str(content: Record<string, unknown>, key: string, fallback?: string): string;
38
+ export declare function bool(content: Record<string, unknown>, key: string, fallback?: boolean): boolean;
39
+ /** Vertical padding scale for a section. */
40
+ export declare function paddingClass(settings: SectionSettings): string;
41
+ /** Returns true when the section background is the dark/purple treatment. */
42
+ export declare function isDarkBackground(settings: SectionSettings): boolean;
43
+ /** Background utility classes derived from settings. */
44
+ export declare function backgroundClass(settings: SectionSettings): string;
45
+ /**
46
+ * Preview-only button. `tone="onDark"` renders the white-on-purple button
47
+ * from the screenshot; `tone="primary"` renders a solid violet button for
48
+ * light backgrounds.
49
+ */
50
+ export declare function PreviewButton({ label, href, tone, }: {
51
+ label: string;
52
+ href?: string;
53
+ tone?: 'primary' | 'onDark' | 'ghost';
54
+ }): import("react/jsx-runtime").JSX.Element | null;
55
+ //# sourceMappingURL=parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/parts.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAA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GAAG,OAAO,CAAA;CACtC,kDAsBA"}
@@ -0,0 +1,60 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function str(content, key, fallback = '') {
3
+ const v = content[key];
4
+ return typeof v === 'string' ? v : fallback;
5
+ }
6
+ export function bool(content, key, fallback = false) {
7
+ const v = content[key];
8
+ return typeof v === 'boolean' ? v : fallback;
9
+ }
10
+ /** Vertical padding scale for a section. */
11
+ export function paddingClass(settings) {
12
+ switch (settings.paddingY) {
13
+ case 'sm':
14
+ return 'py-8';
15
+ case 'md':
16
+ return 'py-12';
17
+ case 'xl':
18
+ return 'py-20 sm:py-28';
19
+ case 'lg':
20
+ default:
21
+ return 'py-16 sm:py-20';
22
+ }
23
+ }
24
+ /** Returns true when the section background is the dark/purple treatment. */
25
+ export function isDarkBackground(settings) {
26
+ return ((settings.backgroundType === 'solid' || settings.backgroundType === 'gradient') &&
27
+ settings.backgroundColor === 'purple');
28
+ }
29
+ /** Background utility classes derived from settings. */
30
+ export function backgroundClass(settings) {
31
+ if (settings.backgroundType === 'gradient' && settings.backgroundColor === 'purple') {
32
+ return 'bg-gradient-to-br from-violet-600 to-violet-700 text-white';
33
+ }
34
+ if (settings.backgroundType === 'solid' && settings.backgroundColor === 'purple') {
35
+ return 'bg-violet-600 text-white';
36
+ }
37
+ if (settings.backgroundType === 'solid' && settings.backgroundColor === 'muted') {
38
+ return 'bg-zinc-50 text-zinc-900';
39
+ }
40
+ return 'bg-white text-zinc-900';
41
+ }
42
+ /**
43
+ * Preview-only button. `tone="onDark"` renders the white-on-purple button
44
+ * from the screenshot; `tone="primary"` renders a solid violet button for
45
+ * light backgrounds.
46
+ */
47
+ export function PreviewButton({ label, href, tone = 'primary', }) {
48
+ if (!label)
49
+ return null;
50
+ const base = 'inline-flex items-center justify-center rounded-lg px-5 py-2.5 text-sm font-medium transition-colors';
51
+ const toneClass = tone === 'onDark'
52
+ ? 'bg-white text-violet-700 hover:bg-violet-50'
53
+ : tone === 'ghost'
54
+ ? 'border border-zinc-300 text-zinc-700 hover:bg-zinc-50'
55
+ : 'bg-violet-600 text-white hover:bg-violet-700';
56
+ // Editor preview: links are inert (preventDefault) so clicking content
57
+ // selects the section instead of navigating away.
58
+ return (_jsx("a", { href: href || '#', onClick: (e) => e.preventDefault(), className: `${base} ${toneClass}`, tabIndex: -1, children: label }));
59
+ }
60
+ //# sourceMappingURL=parts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../../src/views/page-editor/sections/parts.tsx"],"names":[],"mappings":";AA8BA,MAAM,UAAU,GAAG,CAAC,OAAgC,EAAE,GAAW,EAAE,QAAQ,GAAG,EAAE;IAC9E,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACtB,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;AAC7C,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAgC,EAAE,GAAW,EAAE,QAAQ,GAAG,KAAK;IAClF,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACtB,OAAO,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;AAC9C,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,YAAY,CAAC,QAAyB;IACpD,QAAQ,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC1B,KAAK,IAAI;YACP,OAAO,MAAM,CAAA;QACf,KAAK,IAAI;YACP,OAAO,OAAO,CAAA;QAChB,KAAK,IAAI;YACP,OAAO,gBAAgB,CAAA;QACzB,KAAK,IAAI,CAAC;QACV;YACE,OAAO,gBAAgB,CAAA;IAC3B,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,gBAAgB,CAAC,QAAyB;IACxD,OAAO,CACL,CAAC,QAAQ,CAAC,cAAc,KAAK,OAAO,IAAI,QA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port presets for the page editor canvas. */
2
+ export type ViewportId = '4k' | '1080p' | 'laptop' | 'tablet' | 'mobile';
3
+ export interface Viewport {
4
+ id: ViewportId;
5
+ label: string;
6
+ /** lucide-react icon name */
7
+ icon: string;
8
+ /** logical CSS width of the preview surface, in px */
9
+ width: number;
10
+ }
11
+ export declare const VIEWPORTS: Viewport[];
12
+ export declare const DEFAULT_VIEWPORT: ViewportId;
13
+ export declare function getViewport(id: ViewportId): Viewport;
14
+ //# sourceMappingURL=viewports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewports.d.ts","sourceRoot":"","sources":["../../../src/views/page-editor/viewports.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAExE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,UAAU,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,EAM/B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,UAAoB,CAAA;AAEnD,wBAAgB,WAAW,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAEpD"}
@@ -0,0 +1,12 @@
1
+ export const VIEWPORTS = [
2
+ { id: '4k', label: '4K', icon: 'monitor', width: 1920 },
3
+ { id: '1080p', label: '1080p', icon: 'monitor', width: 1440 },
4
+ { id: 'laptop', label: 'Laptop', icon: 'laptop', width: 1280 },
5
+ { id: 'tablet', label: 'Tablet', icon: 'tablet', width: 768 },
6
+ { id: 'mobile', label: 'Mobile', icon: 'smartphone', width: 390 },
7
+ ];
8
+ export const DEFAULT_VIEWPORT = '1080p';
9
+ export function getViewport(id) {
10
+ return VIEWPORTS.find((v) => v.id === id) ?? VIEWPORTS[1];
11
+ }
12
+ //# sourceMappingURL=viewports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewports.js","sourceRoot":"","sources":["../../../src/views/page-editor/viewports.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE;IACvD,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE;IAC7D,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;IAC9D,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IAC7D,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE;CAClE,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAe,OAAO,CAAA;AAEnD,MAAM,UAAU,WAAW,CAAC,EAAc;IACxC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,CAAE,CAAA;AAC5D,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { PageSection, PostHeaderConfig } from '../../lib/post-editor-service.js';
2
+ import { type PostRenderContext } from '../page-editor/sections/index.js';
3
+ import { type ViewportId } from '../page-editor/viewports.js';
4
+ interface PostEditorCanvasProps {
5
+ sections: PageSection[];
6
+ header: PostHeaderConfig;
7
+ context: PostRenderContext;
8
+ selectedId: string | null;
9
+ viewport: ViewportId;
10
+ onSelect: (id: string) => void;
11
+ onAddSection: () => void;
12
+ }
13
+ /**
14
+ * Post preview canvas. Mirrors the Page editor canvas (scaled surface that
15
+ * fits the selected viewport) but renders the post header above the section
16
+ * list so the editor shows the full post layout — header regions plus body
17
+ * sections — exactly as it will ship.
18
+ */
19
+ export declare function PostEditorCanvas({ sections, header, context, selectedId, viewport, onSelect, onAddSection, }: PostEditorCanvasProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
21
+ //# sourceMappingURL=PostEditorCanvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostEditorCanvas.d.ts","sourceRoot":"","sources":["../../../src/views/post-editor/PostEditorCanvas.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAC1F,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAG1E,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,MAAM,EAAE,gBAAgB,CAAA;IACxB,OAAO,EAAE,iBAAiB,CAAA;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,EAAE,UAAU,CAAA;IACpB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,YAAY,EAAE,MAAM,IAAI,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,MAAM,EACN,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,GACb,EAAE,qBAAqB,2CAoEvB"}
@@ -0,0 +1,58 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
4
+ import { FileText, Plus } from 'lucide-react';
5
+ import { SectionRenderer } from '../page-editor/sections/index.js';
6
+ import { getViewport } from '../page-editor/viewports.js';
7
+ import { PostHeader } from './PostHeader.js';
8
+ /**
9
+ * Post preview canvas. Mirrors the Page editor canvas (scaled surface that
10
+ * fits the selected viewport) but renders the post header above the section
11
+ * list so the editor shows the full post layout — header regions plus body
12
+ * sections — exactly as it will ship.
13
+ */
14
+ export function PostEditorCanvas({ sections, header, context, selectedId, viewport, onSelect, onAddSection, }) {
15
+ const vp = getViewport(viewport);
16
+ const containerRef = useRef(null);
17
+ const surfaceRef = useRef(null);
18
+ const sectionRefs = useRef(new Map());
19
+ const [scale, setScale] = useState(1);
20
+ const [surfaceHeight, setSurfaceHeight] = useState(null);
21
+ const registerRef = useCallback((id, el) => {
22
+ if (el)
23
+ sectionRefs.current.set(id, el);
24
+ else
25
+ sectionRefs.current.delete(id);
26
+ }, []);
27
+ useLayoutEffect(() => {
28
+ const container = containerRef.current;
29
+ if (!container)
30
+ return;
31
+ const recompute = () => {
32
+ const available = container.clientWidth - 48;
33
+ const next = Math.min(1, available / vp.width);
34
+ setScale(next > 0 ? next : 1);
35
+ if (surfaceRef.current) {
36
+ setSurfaceHeight(surfaceRef.current.offsetHeight * (next > 0 ? next : 1));
37
+ }
38
+ };
39
+ recompute();
40
+ const ro = new ResizeObserver(recompute);
41
+ ro.observe(container);
42
+ if (surfaceRef.current)
43
+ ro.observe(surfaceRef.current);
44
+ return () => ro.disconnect();
45
+ }, [vp.width, sections, header, context]);
46
+ useEffect(() => {
47
+ if (!selectedId)
48
+ return;
49
+ const el = sectionRefs.current.get(selectedId);
50
+ if (el)
51
+ el.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
52
+ }, [selectedId]);
53
+ return (_jsx("div", { ref: containerRef, className: "bg-muted h-full overflow-auto p-6", children: _jsx("div", { className: "mx-auto", style: { width: vp.width * scale, height: surfaceHeight ?? undefined }, children: _jsxs("div", { ref: surfaceRef, className: "border-border origin-top overflow-hidden rounded-xl border bg-white shadow-sm", style: { width: vp.width, transform: `scale(${scale})`, transformOrigin: 'top left' }, children: [_jsx(PostHeader, { config: header, context: context }), sections.length === 0 ? (_jsx(EmptyBody, { onAddSection: onAddSection })) : (sections.map((section) => (_jsx(SectionRenderer, { section: section, context: context, editable: true, selected: section.id === selectedId, onSelect: onSelect, registerRef: registerRef }, section.id))))] }) }) }));
54
+ }
55
+ function EmptyBody({ onAddSection }) {
56
+ return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-3 border-t border-zinc-100 px-6 py-16 text-center", children: [_jsx("span", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-zinc-100", children: _jsx(FileText, { className: "h-5 w-5 text-zinc-400", "aria-hidden": true }) }), _jsx("p", { className: "text-sm text-zinc-500", children: "The header is set by the template. Add body sections to build out this post." }), _jsxs("button", { type: "button", onClick: onAddSection, className: "inline-flex items-center gap-2 rounded-lg bg-violet-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-violet-700", children: [_jsx(Plus, { className: "h-4 w-4", "aria-hidden": true }), "Add Section"] })] }));
57
+ }
58
+ //# sourceMappingURL=PostEditorCanvas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostEditorCanvas.js","sourceRoot":"","sources":["../../../src/views/post-editor/PostEditorCanvas.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,eAAe,EAA0B,MAAM,kCAAkC,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAmB,MAAM,6BAA6B,CAAA;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAY5C;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EACR,MAAM,EACN,O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EAAE,OAAO,EAAE,OAAO,GAAI,EAC/C,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACvB,KAAC,SAAS,IAAC,YAAY,EAAE,YAAY,GAAI,CAC1C,CAAC,CAAC,CAAC,CACF,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACxB,KAAC,eAAe,IAEd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,QACR,QAAQ,EAAE,OAAO,CAAC,EAAE,KAAK,UAAU,EACnC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,IANnB,OAAO,CAAC,EAAE,CAOf,CACH,CAAC,CACH,IACG,GACF,GACF,CACP,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,YAAY,EAAgC;IAC/D,OAAO,CACL,eAAK,SAAS,EAAC,iGAAiG,aAC9G,eAAM,SAAS,EAAC,qEAAqE,YACnF,KAAC,QAAQ,IAAC,SAAS,EAAC,uBAAuB,wBAAe,GACrD,EACP,YAAG,SAAS,EAAC,uBAAuB,6FAEhC,EACJ,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,YAAY,EACrB,SAAS,EAAC,wIAAwI,aAElJ,KAAC,IAAI,IAAC,SAAS,EAAC,SAAS,wBAAe,mBAEjC,IACL,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { EditorPost } from '../../lib/post-editor-service.js';
2
+ interface PostFieldsModalProps {
3
+ open: boolean;
4
+ post: EditorPost;
5
+ canEdit: boolean;
6
+ onClose: () => void;
7
+ onSave: (patch: Partial<EditorPost>) => void;
8
+ }
9
+ /** Edits post-level fields: title, slug, excerpt, featured image, category, body, SEO. */
10
+ export declare function PostFieldsModal({ open, post, canEdit, onClose, onSave }: PostFieldsModalProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=PostFieldsModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostFieldsModal.d.ts","sourceRoot":"","sources":["../../../src/views/post-editor/PostFieldsModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAElE,UAAU,oBAAoB;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;CAC7C;AAcD,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAuK7F"}
@@ -0,0 +1,53 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useEffect, useState } from 'react';
4
+ import { Modal } from '../../components/ui/Modal.js';
5
+ import { Button } from '../../components/ui/Button.js';
6
+ const LABEL = 'text-foreground mb-1 block text-xs font-medium';
7
+ const INPUT = 'border-input bg-input-background text-foreground focus-visible:ring-ring w-full rounded-md border px-2.5 py-1.5 text-sm focus-visible:ring-2 focus-visible:outline-none';
8
+ function slugify(value) {
9
+ return value
10
+ .toLowerCase()
11
+ .trim()
12
+ .replace(/[^a-z0-9]+/g, '-')
13
+ .replace(/^-+|-+$/g, '');
14
+ }
15
+ /** Edits post-level fields: title, slug, excerpt, featured image, category, body, SEO. */
16
+ export function PostFieldsModal({ open, post, canEdit, onClose, onSave }) {
17
+ const [title, setTitle] = useState(post.title);
18
+ const [slug, setSlug] = useState(post.slug);
19
+ const [excerpt, setExcerpt] = useState(post.excerpt);
20
+ const [featuredImage, setFeaturedImage] = useState(post.featuredImage);
21
+ const [category, setCategory] = useState(post.category);
22
+ const [body, setBody] = useState(post.body);
23
+ const [seoTitle, setSeoTitle] = useState(post.seoTitle);
24
+ const [seoDescription, setSeoDescription] = useState(post.seoDescription);
25
+ const [slugTouched, setSlugTouched] = useState(Boolean(post.slug));
26
+ useEffect(() => {
27
+ if (!open)
28
+ return;
29
+ setTitle(post.title);
30
+ setSlug(post.slug);
31
+ setExcerpt(post.excerpt);
32
+ setFeaturedImage(post.featuredImage);
33
+ setCategory(post.category);
34
+ setBody(post.body);
35
+ setSeoTitle(post.seoTitle);
36
+ setSeoDescription(post.seoDescription);
37
+ setSlugTouched(Boolean(post.slug));
38
+ }, [open, post]);
39
+ function handleTitle(next) {
40
+ setTitle(next);
41
+ if (!slugTouched)
42
+ setSlug(slugify(next));
43
+ }
44
+ function handleSave() {
45
+ onSave({ title, slug, excerpt, featuredImage, category, body, seoTitle, seoDescription });
46
+ onClose();
47
+ }
48
+ return (_jsx(Modal, { open: open, onClose: onClose, title: "Post details", actions: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", onClick: onClose, children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: handleSave, disabled: !canEdit, children: "Done" })] }), children: _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsxs("label", { className: LABEL, htmlFor: "pf-title", children: ["Title ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "pf-title", className: INPUT, value: title, disabled: !canEdit, onChange: (e) => handleTitle(e.target.value) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsxs("label", { className: LABEL, htmlFor: "pf-slug", children: ["Slug ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "pf-slug", className: INPUT, value: slug, disabled: !canEdit, onChange: (e) => {
49
+ setSlugTouched(true);
50
+ setSlug(slugify(e.target.value));
51
+ } })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-category", children: "Category" }), _jsx("input", { id: "pf-category", className: INPUT, value: category, disabled: !canEdit, placeholder: "e.g. Product", onChange: (e) => setCategory(e.target.value) })] })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-excerpt", children: "Excerpt" }), _jsx("textarea", { id: "pf-excerpt", className: `${INPUT} min-h-[60px] resize-y`, value: excerpt, disabled: !canEdit, placeholder: "A short summary shown in listings and the header.", onChange: (e) => setExcerpt(e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-image", children: "Featured image URL" }), _jsx("input", { id: "pf-image", className: INPUT, value: featuredImage, disabled: !canEdit, placeholder: "https://\u2026", onChange: (e) => setFeaturedImage(e.target.value) }), featuredImage && (_jsx("div", { className: "border-border bg-muted mt-2 overflow-hidden rounded-md border", children: _jsx("img", { src: featuredImage, alt: "", className: "h-28 w-full object-cover" }) }))] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-body", children: "Body" }), _jsx("textarea", { id: "pf-body", className: `${INPUT} min-h-[120px] resize-y`, value: body, disabled: !canEdit, placeholder: "The main post content. Shown by the Article Body section.", onChange: (e) => setBody(e.target.value) }), _jsx("p", { className: "text-muted-foreground mt-1 text-xs", children: "Rendered by the Article Body section when its source is set to the post Body field." })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-seo-title", children: "SEO title" }), _jsx("input", { id: "pf-seo-title", className: INPUT, value: seoTitle, disabled: !canEdit, onChange: (e) => setSeoTitle(e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: LABEL, htmlFor: "pf-seo-desc", children: "SEO description" }), _jsx("textarea", { id: "pf-seo-desc", className: `${INPUT} min-h-[60px] resize-y`, value: seoDescription, disabled: !canEdit, onChange: (e) => setSeoDescription(e.target.value) })] })] }) }));
52
+ }
53
+ //# sourceMappingURL=PostFieldsModal.js.map