@jhits/plugin-blog 0.0.19 → 0.0.20

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 (291) hide show
  1. package/dist/api/categories.d.ts.map +1 -1
  2. package/dist/api/categories.js +42 -38
  3. package/dist/api/handler.d.ts +1 -26
  4. package/dist/api/handler.d.ts.map +1 -1
  5. package/dist/api/handler.js +81 -490
  6. package/dist/api/router.d.ts +0 -5
  7. package/dist/api/router.d.ts.map +1 -1
  8. package/dist/api/router.js +8 -35
  9. package/dist/api/service.d.ts +80 -0
  10. package/dist/api/service.d.ts.map +1 -0
  11. package/dist/api/service.js +219 -0
  12. package/dist/hooks/useAutoSave.d.ts +10 -0
  13. package/dist/hooks/useAutoSave.d.ts.map +1 -0
  14. package/dist/hooks/useAutoSave.js +57 -0
  15. package/dist/hooks/useCategories.d.ts +1 -1
  16. package/dist/hooks/useCategories.d.ts.map +1 -1
  17. package/dist/hooks/useCategories.js +15 -46
  18. package/dist/index.d.ts +24 -31
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +44 -201
  21. package/dist/init.d.ts +20 -7
  22. package/dist/init.d.ts.map +1 -1
  23. package/dist/init.js +8 -7
  24. package/dist/lib/blocks/BlockRenderer.d.ts.map +1 -1
  25. package/dist/lib/layouts/blocks/ColumnsBlock.d.ts.map +1 -1
  26. package/dist/lib/layouts/blocks/ColumnsBlock.js +30 -113
  27. package/dist/lib/layouts/blocks/SectionBlock.d.ts.map +1 -1
  28. package/dist/lib/layouts/blocks/SectionBlock.js +9 -21
  29. package/dist/lib/layouts/index.d.ts +3 -3
  30. package/dist/lib/layouts/index.js +4 -4
  31. package/dist/lib/mappers/apiMapper.d.ts +10 -0
  32. package/dist/lib/mappers/apiMapper.d.ts.map +1 -1
  33. package/dist/lib/mappers/apiMapper.js +47 -32
  34. package/dist/lib/rich-text/RichTextEditor.d.ts +4 -2
  35. package/dist/lib/rich-text/RichTextEditor.d.ts.map +1 -1
  36. package/dist/lib/rich-text/RichTextEditor.js +12 -9
  37. package/dist/lib/utils/config-resolver.d.ts +28 -0
  38. package/dist/lib/utils/config-resolver.d.ts.map +1 -0
  39. package/dist/lib/utils/config-resolver.js +46 -0
  40. package/dist/lib/utils/tree.d.ts +29 -0
  41. package/dist/lib/utils/tree.d.ts.map +1 -0
  42. package/dist/lib/utils/tree.js +129 -0
  43. package/dist/state/EditorContext.d.ts +3 -25
  44. package/dist/state/EditorContext.d.ts.map +1 -1
  45. package/dist/state/EditorContext.js +124 -174
  46. package/dist/state/reducer.d.ts +1 -5
  47. package/dist/state/reducer.d.ts.map +1 -1
  48. package/dist/state/reducer.js +128 -521
  49. package/dist/state/types.d.ts +12 -1
  50. package/dist/state/types.d.ts.map +1 -1
  51. package/dist/types/block.d.ts +9 -0
  52. package/dist/types/block.d.ts.map +1 -1
  53. package/dist/types/post.d.ts +17 -1
  54. package/dist/types/post.d.ts.map +1 -1
  55. package/dist/views/CanvasEditor/BlockWrapper.d.ts +5 -6
  56. package/dist/views/CanvasEditor/BlockWrapper.d.ts.map +1 -1
  57. package/dist/views/CanvasEditor/BlockWrapper.js +56 -264
  58. package/dist/views/CanvasEditor/CanvasEditorView.d.ts +5 -3
  59. package/dist/views/CanvasEditor/CanvasEditorView.d.ts.map +1 -1
  60. package/dist/views/CanvasEditor/CanvasEditorView.js +55 -315
  61. package/dist/views/CanvasEditor/EditorBody.d.ts +6 -8
  62. package/dist/views/CanvasEditor/EditorBody.d.ts.map +1 -1
  63. package/dist/views/CanvasEditor/EditorBody.js +34 -482
  64. package/dist/views/CanvasEditor/EditorHeader.d.ts.map +1 -1
  65. package/dist/views/CanvasEditor/EditorHeader.js +27 -63
  66. package/dist/views/CanvasEditor/LayoutContainer.d.ts.map +1 -1
  67. package/dist/views/CanvasEditor/LayoutContainer.js +49 -70
  68. package/dist/views/CanvasEditor/components/CustomBlockItem.js +1 -1
  69. package/dist/views/CanvasEditor/components/EditorCanvas.d.ts +15 -3
  70. package/dist/views/CanvasEditor/components/EditorCanvas.d.ts.map +1 -1
  71. package/dist/views/CanvasEditor/components/EditorCanvas.js +40 -18
  72. package/dist/views/CanvasEditor/components/EditorLibrary.d.ts +5 -1
  73. package/dist/views/CanvasEditor/components/EditorLibrary.d.ts.map +1 -1
  74. package/dist/views/CanvasEditor/components/EditorLibrary.js +11 -7
  75. package/dist/views/CanvasEditor/components/EditorSidebar.d.ts.map +1 -1
  76. package/dist/views/CanvasEditor/components/EditorSidebar.js +32 -14
  77. package/dist/views/CanvasEditor/components/FeaturedMediaSection.d.ts +0 -6
  78. package/dist/views/CanvasEditor/components/FeaturedMediaSection.d.ts.map +1 -1
  79. package/dist/views/CanvasEditor/components/FeaturedMediaSection.js +17 -128
  80. package/dist/views/CanvasEditor/components/JSONInspector.d.ts +9 -0
  81. package/dist/views/CanvasEditor/components/JSONInspector.d.ts.map +1 -0
  82. package/dist/views/CanvasEditor/components/JSONInspector.js +56 -0
  83. package/dist/views/CanvasEditor/components/LibraryItem.js +2 -2
  84. package/dist/views/CanvasEditor/components/PrivacySettingsSection.d.ts +0 -4
  85. package/dist/views/CanvasEditor/components/PrivacySettingsSection.d.ts.map +1 -1
  86. package/dist/views/CanvasEditor/components/PrivacySettingsSection.js +6 -28
  87. package/dist/views/CanvasEditor/components/index.d.ts +2 -0
  88. package/dist/views/CanvasEditor/components/index.d.ts.map +1 -1
  89. package/dist/views/CanvasEditor/components/index.js +1 -0
  90. package/dist/views/CanvasEditor/hooks/useHeroBlock.d.ts.map +1 -1
  91. package/dist/views/CanvasEditor/hooks/useHeroBlock.js +15 -18
  92. package/dist/views/CanvasEditor/hooks/usePostLoader.d.ts +3 -0
  93. package/dist/views/CanvasEditor/hooks/usePostLoader.d.ts.map +1 -1
  94. package/dist/views/CanvasEditor/hooks/usePostLoader.js +12 -13
  95. package/dist/views/CanvasEditor/hooks/useUnsavedChanges.js +0 -4
  96. package/dist/views/PostManager/EmptyState.d.ts +1 -1
  97. package/dist/views/PostManager/EmptyState.js +4 -4
  98. package/dist/views/PostManager/FilterDropdown.d.ts +21 -0
  99. package/dist/views/PostManager/FilterDropdown.d.ts.map +1 -0
  100. package/dist/views/PostManager/FilterDropdown.js +28 -0
  101. package/dist/views/PostManager/LanguageFlags.d.ts.map +1 -1
  102. package/dist/views/PostManager/LanguageFlags.js +4 -1
  103. package/dist/views/PostManager/PostCards.d.ts.map +1 -1
  104. package/dist/views/PostManager/PostCards.js +23 -40
  105. package/dist/views/PostManager/PostFilters.d.ts.map +1 -1
  106. package/dist/views/PostManager/PostFilters.js +34 -3
  107. package/dist/views/PostManager/PostManagerView.d.ts +1 -2
  108. package/dist/views/PostManager/PostManagerView.d.ts.map +1 -1
  109. package/dist/views/PostManager/PostManagerView.js +30 -96
  110. package/dist/views/PostManager/PostStats.d.ts.map +1 -1
  111. package/dist/views/PostManager/PostStats.js +10 -10
  112. package/dist/views/PostManager/PostTable.d.ts.map +1 -1
  113. package/dist/views/PostManager/PostTable.js +23 -40
  114. package/dist/views/Settings/SettingsView.d.ts +1 -1
  115. package/dist/views/Settings/SettingsView.d.ts.map +1 -1
  116. package/dist/views/Settings/SettingsView.js +12 -39
  117. package/dist/views/SlugSEO/SlugSEOManagerView.d.ts.map +1 -1
  118. package/dist/views/SlugSEO/SlugSEOManagerView.js +2 -2
  119. package/package.json +42 -6
  120. package/src/api/categories.ts +48 -52
  121. package/src/api/handler.ts +87 -594
  122. package/src/api/router.ts +15 -65
  123. package/src/api/service.ts +241 -0
  124. package/src/hooks/useAutoSave.ts +64 -0
  125. package/src/hooks/useCategories.ts +19 -47
  126. package/src/index.tsx +79 -293
  127. package/src/init.tsx +24 -11
  128. package/src/lib/blocks/BlockRenderer.tsx +1 -0
  129. package/src/lib/layouts/blocks/ColumnsBlock.tsx +60 -173
  130. package/src/lib/layouts/blocks/SectionBlock.tsx +22 -26
  131. package/src/lib/layouts/index.ts +4 -4
  132. package/src/lib/mappers/apiMapper.ts +63 -32
  133. package/src/lib/rich-text/RichTextEditor.tsx +16 -9
  134. package/src/lib/utils/config-resolver.ts +64 -0
  135. package/src/lib/utils/tree.ts +150 -0
  136. package/src/state/EditorContext.tsx +153 -232
  137. package/src/state/reducer.ts +141 -606
  138. package/src/state/types.ts +14 -1
  139. package/src/types/block.ts +10 -0
  140. package/src/types/post.ts +19 -1
  141. package/src/views/CanvasEditor/BlockWrapper.tsx +130 -460
  142. package/src/views/CanvasEditor/CanvasEditorView.tsx +145 -420
  143. package/src/views/CanvasEditor/EditorBody.tsx +98 -610
  144. package/src/views/CanvasEditor/EditorHeader.tsx +176 -196
  145. package/src/views/CanvasEditor/LayoutContainer.tsx +74 -89
  146. package/src/views/CanvasEditor/components/CustomBlockItem.tsx +7 -8
  147. package/src/views/CanvasEditor/components/EditorCanvas.tsx +139 -84
  148. package/src/views/CanvasEditor/components/EditorLibrary.tsx +25 -10
  149. package/src/views/CanvasEditor/components/EditorSidebar.tsx +196 -127
  150. package/src/views/CanvasEditor/components/FeaturedMediaSection.tsx +78 -210
  151. package/src/views/CanvasEditor/components/JSONInspector.tsx +125 -0
  152. package/src/views/CanvasEditor/components/LibraryItem.tsx +5 -6
  153. package/src/views/CanvasEditor/components/PrivacySettingsSection.tsx +73 -124
  154. package/src/views/CanvasEditor/components/index.ts +2 -1
  155. package/src/views/CanvasEditor/hooks/useHeroBlock.ts +15 -18
  156. package/src/views/CanvasEditor/hooks/usePostLoader.ts +21 -13
  157. package/src/views/CanvasEditor/hooks/useUnsavedChanges.ts +4 -4
  158. package/src/views/PostManager/EmptyState.tsx +9 -10
  159. package/src/views/PostManager/FilterDropdown.tsx +95 -0
  160. package/src/views/PostManager/LanguageFlags.tsx +6 -2
  161. package/src/views/PostManager/PostCards.tsx +127 -133
  162. package/src/views/PostManager/PostFilters.tsx +73 -68
  163. package/src/views/PostManager/PostManagerView.tsx +132 -179
  164. package/src/views/PostManager/PostStats.tsx +21 -20
  165. package/src/views/PostManager/PostTable.tsx +137 -165
  166. package/src/views/Settings/SettingsView.tsx +64 -180
  167. package/src/views/SlugSEO/SlugSEOManagerView.tsx +59 -44
  168. package/src/hooks/index.d.ts +0 -8
  169. package/src/hooks/index.d.ts.map +0 -1
  170. package/src/hooks/useBlog.d.ts +0 -31
  171. package/src/hooks/useBlog.d.ts.map +0 -1
  172. package/src/hooks/useBlogs.d.ts +0 -39
  173. package/src/hooks/useBlogs.d.ts.map +0 -1
  174. package/src/hooks/useCategories.d.ts +0 -9
  175. package/src/hooks/useCategories.d.ts.map +0 -1
  176. package/src/lib/blocks/BlockRenderer.d.ts +0 -54
  177. package/src/lib/blocks/BlockRenderer.d.ts.map +0 -1
  178. package/src/lib/config-storage.d.ts +0 -30
  179. package/src/lib/config-storage.d.ts.map +0 -1
  180. package/src/lib/layouts/blocks/ColumnsBlock.d.ts +0 -25
  181. package/src/lib/layouts/blocks/ColumnsBlock.d.ts.map +0 -1
  182. package/src/lib/layouts/blocks/SectionBlock.d.ts +0 -25
  183. package/src/lib/layouts/blocks/SectionBlock.d.ts.map +0 -1
  184. package/src/lib/layouts/index.d.ts +0 -23
  185. package/src/lib/layouts/index.d.ts.map +0 -1
  186. package/src/lib/layouts/registerLayoutBlocks.d.ts +0 -9
  187. package/src/lib/layouts/registerLayoutBlocks.d.ts.map +0 -1
  188. package/src/lib/mappers/apiMapper.d.ts +0 -66
  189. package/src/lib/mappers/apiMapper.d.ts.map +0 -1
  190. package/src/lib/rich-text/RichTextEditor.d.ts +0 -45
  191. package/src/lib/rich-text/RichTextEditor.d.ts.map +0 -1
  192. package/src/lib/rich-text/RichTextPreview.d.ts +0 -16
  193. package/src/lib/rich-text/RichTextPreview.d.ts.map +0 -1
  194. package/src/lib/rich-text/index.d.ts +0 -9
  195. package/src/lib/rich-text/index.d.ts.map +0 -1
  196. package/src/lib/utils/blockHelpers.d.ts +0 -23
  197. package/src/lib/utils/blockHelpers.d.ts.map +0 -1
  198. package/src/lib/utils/configValidation.d.ts +0 -23
  199. package/src/lib/utils/configValidation.d.ts.map +0 -1
  200. package/src/registry/BlockRegistry.d.ts +0 -62
  201. package/src/registry/BlockRegistry.d.ts.map +0 -1
  202. package/src/registry/index.d.ts +0 -6
  203. package/src/registry/index.d.ts.map +0 -1
  204. package/src/state/EditorContext.d.ts +0 -45
  205. package/src/state/EditorContext.d.ts.map +0 -1
  206. package/src/state/index.d.ts +0 -7
  207. package/src/state/index.d.ts.map +0 -1
  208. package/src/state/reducer.d.ts +0 -11
  209. package/src/state/reducer.d.ts.map +0 -1
  210. package/src/state/types.d.ts +0 -162
  211. package/src/state/types.d.ts.map +0 -1
  212. package/src/types/block.d.ts +0 -221
  213. package/src/types/block.d.ts.map +0 -1
  214. package/src/types/index.d.ts +0 -8
  215. package/src/types/index.d.ts.map +0 -1
  216. package/src/types/post.d.ts +0 -136
  217. package/src/types/post.d.ts.map +0 -1
  218. package/src/utils/client.d.ts +0 -48
  219. package/src/utils/client.d.ts.map +0 -1
  220. package/src/views/CanvasEditor/BlockWrapper.d.ts +0 -16
  221. package/src/views/CanvasEditor/BlockWrapper.d.ts.map +0 -1
  222. package/src/views/CanvasEditor/CanvasEditorView.d.ts +0 -14
  223. package/src/views/CanvasEditor/CanvasEditorView.d.ts.map +0 -1
  224. package/src/views/CanvasEditor/EditorBody.d.ts +0 -22
  225. package/src/views/CanvasEditor/EditorBody.d.ts.map +0 -1
  226. package/src/views/CanvasEditor/EditorHeader.d.ts +0 -18
  227. package/src/views/CanvasEditor/EditorHeader.d.ts.map +0 -1
  228. package/src/views/CanvasEditor/LayoutContainer.d.ts +0 -17
  229. package/src/views/CanvasEditor/LayoutContainer.d.ts.map +0 -1
  230. package/src/views/CanvasEditor/SaveConfirmationModal.d.ts +0 -13
  231. package/src/views/CanvasEditor/SaveConfirmationModal.d.ts.map +0 -1
  232. package/src/views/CanvasEditor/components/CustomBlockItem.d.ts +0 -14
  233. package/src/views/CanvasEditor/components/CustomBlockItem.d.ts.map +0 -1
  234. package/src/views/CanvasEditor/components/EditorCanvas.d.ts +0 -29
  235. package/src/views/CanvasEditor/components/EditorCanvas.d.ts.map +0 -1
  236. package/src/views/CanvasEditor/components/EditorLibrary.d.ts +0 -7
  237. package/src/views/CanvasEditor/components/EditorLibrary.d.ts.map +0 -1
  238. package/src/views/CanvasEditor/components/EditorSidebar.d.ts +0 -13
  239. package/src/views/CanvasEditor/components/EditorSidebar.d.ts.map +0 -1
  240. package/src/views/CanvasEditor/components/ErrorBanner.d.ts +0 -6
  241. package/src/views/CanvasEditor/components/ErrorBanner.d.ts.map +0 -1
  242. package/src/views/CanvasEditor/components/FeaturedMediaSection.d.ts +0 -25
  243. package/src/views/CanvasEditor/components/FeaturedMediaSection.d.ts.map +0 -1
  244. package/src/views/CanvasEditor/components/LibraryItem.d.ts +0 -14
  245. package/src/views/CanvasEditor/components/LibraryItem.d.ts.map +0 -1
  246. package/src/views/CanvasEditor/components/PrivacySettingsSection.d.ts +0 -15
  247. package/src/views/CanvasEditor/components/PrivacySettingsSection.d.ts.map +0 -1
  248. package/src/views/CanvasEditor/components/index.d.ts +0 -21
  249. package/src/views/CanvasEditor/components/index.d.ts.map +0 -1
  250. package/src/views/CanvasEditor/hooks/index.d.ts +0 -10
  251. package/src/views/CanvasEditor/hooks/index.d.ts.map +0 -1
  252. package/src/views/CanvasEditor/hooks/useHeroBlock.d.ts +0 -8
  253. package/src/views/CanvasEditor/hooks/useHeroBlock.d.ts.map +0 -1
  254. package/src/views/CanvasEditor/hooks/useKeyboardShortcuts.d.ts +0 -3
  255. package/src/views/CanvasEditor/hooks/useKeyboardShortcuts.d.ts.map +0 -1
  256. package/src/views/CanvasEditor/hooks/usePostLoader.d.ts +0 -5
  257. package/src/views/CanvasEditor/hooks/usePostLoader.d.ts.map +0 -1
  258. package/src/views/CanvasEditor/hooks/useRegisteredBlocks.d.ts +0 -2
  259. package/src/views/CanvasEditor/hooks/useRegisteredBlocks.d.ts.map +0 -1
  260. package/src/views/CanvasEditor/hooks/useUnsavedChanges.d.ts +0 -25
  261. package/src/views/CanvasEditor/hooks/useUnsavedChanges.d.ts.map +0 -1
  262. package/src/views/CanvasEditor/index.d.ts +0 -16
  263. package/src/views/CanvasEditor/index.d.ts.map +0 -1
  264. package/src/views/PostManager/EmptyState.d.ts +0 -10
  265. package/src/views/PostManager/EmptyState.d.ts.map +0 -1
  266. package/src/views/PostManager/PostActionsMenu.d.ts +0 -12
  267. package/src/views/PostManager/PostActionsMenu.d.ts.map +0 -1
  268. package/src/views/PostManager/PostCards.d.ts +0 -15
  269. package/src/views/PostManager/PostCards.d.ts.map +0 -1
  270. package/src/views/PostManager/PostFilters.d.ts +0 -16
  271. package/src/views/PostManager/PostFilters.d.ts.map +0 -1
  272. package/src/views/PostManager/PostManagerView.d.ts +0 -11
  273. package/src/views/PostManager/PostManagerView.d.ts.map +0 -1
  274. package/src/views/PostManager/PostStats.d.ts +0 -11
  275. package/src/views/PostManager/PostStats.d.ts.map +0 -1
  276. package/src/views/PostManager/PostTable.d.ts +0 -15
  277. package/src/views/PostManager/PostTable.d.ts.map +0 -1
  278. package/src/views/PostManager/index.d.ts +0 -12
  279. package/src/views/PostManager/index.d.ts.map +0 -1
  280. package/src/views/Preview/PreviewBridgeView.d.ts +0 -12
  281. package/src/views/Preview/PreviewBridgeView.d.ts.map +0 -1
  282. package/src/views/Preview/index.d.ts +0 -6
  283. package/src/views/Preview/index.d.ts.map +0 -1
  284. package/src/views/Settings/SettingsView.d.ts +0 -10
  285. package/src/views/Settings/SettingsView.d.ts.map +0 -1
  286. package/src/views/Settings/index.d.ts +0 -6
  287. package/src/views/Settings/index.d.ts.map +0 -1
  288. package/src/views/SlugSEO/SlugSEOManagerView.d.ts +0 -12
  289. package/src/views/SlugSEO/SlugSEOManagerView.d.ts.map +0 -1
  290. package/src/views/SlugSEO/index.d.ts +0 -6
  291. package/src/views/SlugSEO/index.d.ts.map +0 -1
@@ -3,7 +3,7 @@
3
3
  * Full-width wrapper with configurable padding and background
4
4
  */
5
5
  'use client';
6
- import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import React from 'react';
8
8
  import { LayoutContainer } from '../../../views/CanvasEditor/LayoutContainer';
9
9
  import { LAYOUT_BACKGROUNDS } from '../index';
@@ -12,33 +12,21 @@ import { LAYOUT_BACKGROUNDS } from '../index';
12
12
  */
13
13
  export const SectionEdit = ({ block, onUpdate, isSelected, childBlocks = [], onChildBlockAdd, onChildBlockUpdate, onChildBlockDelete, onChildBlockMove, }) => {
14
14
  const background = block.data.background || 'DEFAULT';
15
- return (_jsx("div", { className: `rounded-xl transition-all ${isSelected
16
- ? 'bg-primary/5'
17
- : ''} ${LAYOUT_BACKGROUNDS[background]}`, onDragStart: (e) => {
18
- // Prevent section from being dragged when dragging nested blocks
19
- // Check if the drag started on a nested block wrapper
20
- const nestedBlockWrapper = e.target.closest('[data-block-wrapper]');
21
- if (nestedBlockWrapper) {
22
- const nestedBlockId = nestedBlockWrapper.getAttribute('data-block-id');
23
- // If dragging a nested block, prevent the section's drag handler from firing
24
- if (nestedBlockId && nestedBlockId !== block.id) {
25
- e.stopPropagation();
26
- e.preventDefault();
27
- console.log('[SectionBlock] Preventing section drag, nested block is being dragged:', nestedBlockId);
28
- }
29
- }
30
- }, children: _jsx("div", { className: `px-8 py-4`, children: _jsx(LayoutContainer, { blocks: childBlocks, containerId: block.id, onBlockAdd: onChildBlockAdd, onBlockUpdate: onChildBlockUpdate, onBlockDelete: onChildBlockDelete, onBlockMove: onChildBlockMove, emptyLabel: "Drop blocks into section" }) }) }));
15
+ // Filter out hero block from being rendered inside containers
16
+ const blocks = childBlocks.filter(b => b.type !== 'hero');
17
+ return (_jsxs("div", { className: `rounded-3xl transition-all relative group/section ${isSelected ? 'ring-2 ring-primary/20 bg-primary/5' : 'border border-dashed border-neutral-200 dark:border-neutral-800'} ${LAYOUT_BACKGROUNDS[background]}`, children: [_jsx("div", { className: "absolute -top-3 left-8 px-2 py-0.5 bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-md z-20 pointer-events-none transition-opacity opacity-40 group-hover/section:opacity-100", children: _jsx("span", { className: "text-[8px] font-black uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Section Container" }) }), _jsx("div", { className: `px-8 py-6`, "data-layout-container": block.id, children: _jsx(LayoutContainer, { blocks: blocks, containerId: block.id, onBlockAdd: onChildBlockAdd, onBlockUpdate: onChildBlockUpdate, onBlockDelete: onChildBlockDelete, onBlockMove: onChildBlockMove, emptyLabel: "Drop blocks into section" }) })] }));
31
18
  };
32
19
  /**
33
20
  * Section Block Preview Component
34
21
  */
35
- export const SectionPreview = ({ block, childBlocks = [], renderChild, context }) => {
22
+ export const SectionPreview = ({ block, context, childBlocks = [], renderChild }) => {
36
23
  const background = block.data.background || 'DEFAULT';
37
- // If childBlocks are provided, use them; otherwise get from block.children
38
- const children = childBlocks.length > 0
24
+ // Filter out hero block from children
25
+ const rawChildren = childBlocks.length > 0
39
26
  ? childBlocks
40
27
  : (block.children && Array.isArray(block.children) && typeof block.children[0] === 'object'
41
28
  ? block.children
42
29
  : []);
43
- return (_jsx("section", { className: `w-full ${LAYOUT_BACKGROUNDS[background]}`, children: _jsx("div", { className: `max-w-7xl mx-auto px-6 py-2`, children: children.length > 0 && renderChild ? (children.map((childBlock) => (_jsx(React.Fragment, { children: renderChild(childBlock) }, childBlock.id)))) : (_jsx("div", { className: "text-gray-400 text-sm italic", children: "Empty section" })) }) }));
30
+ const children = rawChildren.filter(b => b.type !== 'hero');
31
+ return (_jsx("section", { className: `w-full ${LAYOUT_BACKGROUNDS[background]}`, children: _jsx("div", { className: `max-w-7xl mx-auto px-6 py-2`, children: children.length > 0 && renderChild ? (children.map((childBlock) => (_jsx(React.Fragment, { children: renderChild(childBlock) }, childBlock.id)))) : (children.length > 0 ? null : _jsx("div", { className: "text-gray-400 text-sm italic", children: "Empty section" })) }) }));
44
32
  };
@@ -10,10 +10,10 @@ export declare const LAYOUT_CONSTANTS: {
10
10
  readonly BORDER_RADIUS: "2rem";
11
11
  };
12
12
  export declare const LAYOUT_BACKGROUNDS: {
13
- readonly DEFAULT: "bg-white";
14
- readonly NEUTRAL: "bg-neutral-50";
13
+ readonly DEFAULT: "bg-transparent";
14
+ readonly NEUTRAL: "bg-neutral-50 dark:bg-neutral-900/50";
15
15
  readonly SAGE: "bg-primary/5";
16
- readonly CREAM: "bg-amber-50/50";
16
+ readonly CREAM: "bg-amber-50/50 dark:bg-orange-950/10";
17
17
  };
18
18
  export type ColumnLayout = '50-50' | '33-66' | '66-33' | '25-25-25-25' | '25-75' | '75-25';
19
19
  export declare const COLUMN_LAYOUTS: Record<ColumnLayout, {
@@ -10,12 +10,12 @@ export const LAYOUT_CONSTANTS = {
10
10
  SPACING_LG: '6rem', // 96px - Larger vertical padding
11
11
  BORDER_RADIUS: '2rem', // 32px - Consistent rounded corners
12
12
  };
13
- // Background Colors (Light mode only - matches client website theme)
13
+ // Background Colors (Theme-aware - integrates with client website theme)
14
14
  export const LAYOUT_BACKGROUNDS = {
15
- DEFAULT: 'bg-white',
16
- NEUTRAL: 'bg-neutral-50',
15
+ DEFAULT: 'bg-transparent',
16
+ NEUTRAL: 'bg-neutral-50 dark:bg-neutral-900/50',
17
17
  SAGE: 'bg-primary/5',
18
- CREAM: 'bg-amber-50/50',
18
+ CREAM: 'bg-amber-50/50 dark:bg-orange-950/10',
19
19
  };
20
20
  export const COLUMN_LAYOUTS = {
21
21
  '50-50': {
@@ -37,6 +37,11 @@ export interface APIBlogDocument {
37
37
  canonicalUrl?: string;
38
38
  };
39
39
  authorId?: string;
40
+ author?: {
41
+ name: string;
42
+ image?: string;
43
+ displayRole?: string;
44
+ };
40
45
  createdAt?: string | Date;
41
46
  updatedAt?: string | Date;
42
47
  languages?: {
@@ -54,6 +59,11 @@ export interface APIBlogDocument {
54
59
  };
55
60
  availableLanguages?: string[];
56
61
  lang?: string;
62
+ status?: PostStatus;
63
+ publication?: {
64
+ status: PostStatus;
65
+ date?: string | Date;
66
+ };
57
67
  metadata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AAC;IACb,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,GAAG,EAAE,WAAW,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAsFxE"}
@@ -9,7 +9,7 @@ export function apiToBlogPost(doc) {
9
9
  const id = doc._id?.toString() || doc.id || '';
10
10
  // Use contentBlocks if available, otherwise fallback to content (legacy)
11
11
  // Hero block is included in contentBlocks
12
- const blocks = doc.contentBlocks || [];
12
+ const blocks = doc.contentBlocks || doc.content || [];
13
13
  // Convert publication data
14
14
  const publicationDate = doc.publicationData?.date
15
15
  ? (typeof doc.publicationData.date === 'string'
@@ -39,9 +39,16 @@ export function apiToBlogPost(doc) {
39
39
  excerpt: doc.summary,
40
40
  privacy: undefined, // Privacy settings not in API yet
41
41
  };
42
- // Convert publication data - API uses 'concept' but we use 'draft'
43
- const apiStatus = doc.publicationData?.status || 'concept';
44
- const normalizedStatus = apiStatus === 'concept' ? 'draft' : apiStatus;
42
+ // Convert publication data - strictly isolate per-language status
43
+ // 1. Prefer specific language status from 'publication.status'
44
+ // 2. Fallback to top-level 'status' if provided by specific language endpoint
45
+ // 3. Defaults to 'draft'
46
+ let apiStatus = doc.publication?.status || doc.status || 'concept';
47
+ // If we're missing translation, force draft
48
+ if (apiStatus === 'not-translated' || apiStatus === 'concept') {
49
+ apiStatus = 'draft';
50
+ }
51
+ const normalizedStatus = apiStatus;
45
52
  const publication = {
46
53
  status: normalizedStatus,
47
54
  date: publicationDate,
@@ -50,6 +57,11 @@ export function apiToBlogPost(doc) {
50
57
  ? (typeof doc.updatedAt === 'string' ? doc.updatedAt : doc.updatedAt.toISOString())
51
58
  : undefined,
52
59
  };
60
+ const author = doc.author ? {
61
+ name: doc.author.name,
62
+ image: doc.author.image,
63
+ displayRole: doc.author.displayRole,
64
+ } : undefined;
53
65
  return {
54
66
  id,
55
67
  title: doc.title,
@@ -57,8 +69,10 @@ export function apiToBlogPost(doc) {
57
69
  blocks,
58
70
  seo,
59
71
  publication,
72
+ author,
60
73
  metadata,
61
74
  languages: doc.languages,
75
+ availableLanguages: doc.availableLanguages || (doc.languages ? Object.keys(doc.languages) : []),
62
76
  createdAt: doc.createdAt
63
77
  ? (typeof doc.createdAt === 'string' ? doc.createdAt : doc.createdAt.toISOString())
64
78
  : new Date().toISOString(),
@@ -112,11 +126,6 @@ export function blogPostToAPI(post, authorId) {
112
126
  export function editorStateToAPI(state, authorId, heroBlock) {
113
127
  // Map status: draft -> concept, published -> published, everything else stays as-is
114
128
  const apiStatus = state.status === 'draft' ? 'concept' : state.status;
115
- console.log('[editorStateToAPI] Mapping status:', {
116
- editorStatus: state.status,
117
- apiStatus: apiStatus,
118
- willBePublished: apiStatus === 'published'
119
- });
120
129
  // Try to get category from metadata first, then check hero block
121
130
  let category = undefined;
122
131
  if (state.metadata.categories && state.metadata.categories.length > 0 && state.metadata.categories[0]?.trim()) {
@@ -132,40 +141,46 @@ export function editorStateToAPI(state, authorId, heroBlock) {
132
141
  }
133
142
  }
134
143
  }
135
- console.log('[editorStateToAPI] Category resolution:', {
136
- fromMetadata: state.metadata.categories?.[0],
137
- fromHeroBlock: (heroBlock || state.blocks.find(b => b.type === 'hero'))?.data ? (heroBlock || state.blocks.find(b => b.type === 'hero')).data.category : undefined,
138
- finalCategory: category,
139
- hasHeroBlock: !!heroBlock,
140
- heroBlockImage: heroBlock?.data ? heroBlock.data?.image : undefined,
141
- });
142
144
  // Include hero block in contentBlocks if it exists
143
- // Filter out any existing hero blocks from state.blocks first, then add the current hero block
144
145
  const contentBlocksWithoutHero = state.blocks.filter(block => block.type !== 'hero');
145
146
  const allBlocks = heroBlock
146
147
  ? [heroBlock, ...contentBlocksWithoutHero]
147
148
  : contentBlocksWithoutHero;
148
- console.log('[editorStateToAPI] Hero block details:', {
149
- hasHeroBlock: !!heroBlock,
150
- heroBlockType: heroBlock?.type,
151
- heroBlockId: heroBlock?.id,
152
- heroBlockImage: heroBlock?.data ? heroBlock.data?.image : undefined,
153
- heroBlockImageSrc: heroBlock?.data ? heroBlock.data?.image?.src : undefined,
154
- contentBlocksCount: allBlocks.length,
155
- contentBlocksTypes: allBlocks.map(b => b.type),
156
- heroBlockInContentBlocks: allBlocks.find(b => b.type === 'hero')?.data ? allBlocks.find(b => b.type === 'hero').data?.image : undefined,
157
- });
149
+ // Try to get featured image from metadata first, then check hero block
150
+ let featuredImage = state.metadata.featuredImage;
151
+ if (!featuredImage?.id?.trim()) {
152
+ const heroBlockToCheck = heroBlock || state.blocks.find(block => block.type === 'hero');
153
+ if (heroBlockToCheck && heroBlockToCheck.data && typeof heroBlockToCheck.data === 'object') {
154
+ const heroImageId = heroBlockToCheck.data.imageId;
155
+ if (heroImageId && typeof heroImageId === 'string' && heroImageId.trim()) {
156
+ featuredImage = {
157
+ id: heroImageId.trim(),
158
+ alt: state.title,
159
+ isCustom: false
160
+ };
161
+ }
162
+ }
163
+ }
164
+ // Try to get summary from hero block first, then metadata
165
+ let summary = state.metadata.excerpt;
166
+ const heroBlockToCheck = heroBlock || state.blocks.find(block => block.type === 'hero');
167
+ if (heroBlockToCheck && heroBlockToCheck.data && typeof heroBlockToCheck.data === 'object') {
168
+ const heroDesc = heroBlockToCheck.data.description;
169
+ if (heroDesc && typeof heroDesc === 'string' && heroDesc.trim()) {
170
+ summary = heroDesc.trim();
171
+ }
172
+ }
158
173
  return {
159
174
  title: state.title,
160
175
  slug: state.slug,
161
176
  contentBlocks: allBlocks,
162
- summary: state.metadata.excerpt,
177
+ summary: summary,
163
178
  // Only save semantic ID (id) and alt - plugin-images handles transform data
164
179
  // Only create image object if id exists and is not empty
165
- image: state.metadata.featuredImage?.id?.trim() ? {
166
- id: state.metadata.featuredImage.id.trim(),
167
- alt: state.metadata.featuredImage.alt || '',
168
- isCustom: state.metadata.featuredImage.isCustom,
180
+ image: featuredImage?.id?.trim() ? {
181
+ id: featuredImage.id.trim(),
182
+ alt: featuredImage.alt || '',
183
+ isCustom: featuredImage.isCustom,
169
184
  // Don't save transform fields - plugin-images API handles those
170
185
  } : undefined,
171
186
  categoryTags: {
@@ -26,8 +26,10 @@ export interface RichTextFormattingConfig {
26
26
  };
27
27
  }
28
28
  export interface RichTextEditorProps {
29
+ /** HTML content value (alias for value) */
30
+ content?: string;
29
31
  /** HTML content value */
30
- value: string;
32
+ value?: string;
31
33
  /** Change handler */
32
34
  onChange: (html: string) => void;
33
35
  /** Placeholder text */
@@ -41,5 +43,5 @@ export interface RichTextEditorProps {
41
43
  /** Custom keydown handler (called before default handler) */
42
44
  onKeyDown?: (e: React.KeyboardEvent) => void;
43
45
  }
44
- export declare function RichTextEditor({ value, onChange, placeholder, formatting, className, isFocused, onKeyDown: customOnKeyDown, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function RichTextEditor({ content, value, onChange, placeholder, formatting, className, isFocused, onKeyDown: customOnKeyDown, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
45
47
  //# sourceMappingURL=RichTextEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../src/lib/rich-text/RichTextEditor.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,MAAM,WAAW,wBAAwB;IACrC,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4CAA4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C,EAAE,OAAO,CAAC;IAChB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,0CAA0C;QAC1C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACzC,CAAC;CACL;AAED,MAAM,WAAW,mBAAmB;IAChC,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;CAChD;AAED,wBAAgB,cAAc,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAA6B,EAC7B,UAAU,EACV,SAAc,EACd,SAAiB,EACjB,SAAS,EAAE,eAAe,GAC7B,EAAE,mBAAmB,2CAkwBrB"}
@@ -7,7 +7,7 @@
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import { useState, useRef, useEffect } from 'react';
9
9
  import { Bold, Italic, Underline, Link, Palette } from 'lucide-react';
10
- export function RichTextEditor({ value, onChange, placeholder = 'Enter text...', formatting, className = '', isFocused = false, onKeyDown: customOnKeyDown, }) {
10
+ export function RichTextEditor({ content, value, onChange, placeholder = 'Enter text...', formatting, className = '', isFocused = false, onKeyDown: customOnKeyDown, }) {
11
11
  const editorRef = useRef(null);
12
12
  const [showToolbar, setShowToolbar] = useState(false);
13
13
  const [toolbarPosition, setToolbarPosition] = useState({ top: 0, left: 0 });
@@ -16,6 +16,8 @@ export function RichTextEditor({ value, onChange, placeholder = 'Enter text...',
16
16
  const [showColorPicker, setShowColorPicker] = useState(false);
17
17
  const [selectedText, setSelectedText] = useState('');
18
18
  const [currentColor, setCurrentColor] = useState(null);
19
+ const isMounted = useRef(false);
20
+ const actualContent = content ?? value ?? '';
19
21
  // Check which formatting options are available
20
22
  const hasBold = formatting?.bold !== false;
21
23
  const hasItalic = formatting?.italic !== false;
@@ -24,18 +26,19 @@ export function RichTextEditor({ value, onChange, placeholder = 'Enter text...',
24
26
  const hasColors = formatting?.colors && formatting.colors.length > 0;
25
27
  // Initialize content when component mounts
26
28
  useEffect(() => {
27
- if (editorRef.current && !editorRef.current.innerHTML && value) {
28
- editorRef.current.innerHTML = value;
29
+ if (editorRef.current && !isMounted.current && actualContent) {
30
+ editorRef.current.innerHTML = actualContent;
31
+ isMounted.current = true;
29
32
  }
30
- }, []); // Only run on mount
31
- // Update content when value prop changes (but avoid if user is editing)
33
+ }, [actualContent]); // Run when content is available
34
+ // Update content when prop changes (but avoid if user is editing)
32
35
  useEffect(() => {
33
36
  if (editorRef.current && document.activeElement !== editorRef.current) {
34
- if (editorRef.current.innerHTML !== value) {
35
- editorRef.current.innerHTML = value || '';
37
+ if (editorRef.current.innerHTML !== actualContent) {
38
+ editorRef.current.innerHTML = actualContent;
36
39
  }
37
40
  }
38
- }, [value]);
41
+ }, [actualContent]);
39
42
  // Handle focus prop
40
43
  useEffect(() => {
41
44
  if (isFocused && editorRef.current) {
@@ -550,7 +553,7 @@ export function RichTextEditor({ value, onChange, placeholder = 'Enter text...',
550
553
  }
551
554
  }, 100); // Small delay to allow dropdown clicks
552
555
  }
553
- }, "data-placeholder": placeholder, className: `outline-none min-h-[24px] ${!value || value === '<br>' || value === '<div><br></div>'
556
+ }, "data-placeholder": placeholder, className: `outline-none min-h-[24px] ${!actualContent || actualContent === '<br>' || actualContent === '<div><br></div>'
554
557
  ? 'before:content-[attr(data-placeholder)] before:text-neutral-400 dark:before:text-neutral-500 before:pointer-events-none'
555
558
  : ''}`, style: { userSelect: 'text' } })] }));
556
559
  }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Plugin Configuration Resolver
3
+ * Centralizes the logic for resolving plugin settings from multiple sources
4
+ */
5
+ import { ClientBlockDefinition } from '../../types/block';
6
+ export interface ResolvedConfig {
7
+ customBlocks: ClientBlockDefinition[];
8
+ darkMode: boolean;
9
+ backgroundColors?: {
10
+ light: string;
11
+ dark?: string;
12
+ };
13
+ LayoutWrapper?: any;
14
+ translations?: Record<string, any>;
15
+ }
16
+ /**
17
+ * Resolves a specific configuration value from priority sources:
18
+ * 1. LocalStorage (Dev overrides)
19
+ * 2. Component Props
20
+ * 3. Window Global (__JHITS_PLUGIN_PROPS__)
21
+ * 4. Default Value
22
+ */
23
+ export declare function resolveConfigValue<T>(key: string, propValue: T | undefined, defaultValue: T): T;
24
+ /**
25
+ * Resolves all plugin configuration
26
+ */
27
+ export declare function resolvePluginConfig(props: any): ResolvedConfig;
28
+ //# sourceMappingURL=config-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-resolver.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/config-resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC3B,YAAY,EAAE,qBAAqB,EAAE,CAAC;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE;QACf,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAChC,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,CAAC,GAAG,SAAS,EACxB,YAAY,EAAE,CAAC,GAChB,CAAC,CAqBH;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,cAAc,CAQ9D"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Plugin Configuration Resolver
3
+ * Centralizes the logic for resolving plugin settings from multiple sources
4
+ */
5
+ /**
6
+ * Resolves a specific configuration value from priority sources:
7
+ * 1. LocalStorage (Dev overrides)
8
+ * 2. Component Props
9
+ * 3. Window Global (__JHITS_PLUGIN_PROPS__)
10
+ * 4. Default Value
11
+ */
12
+ export function resolveConfigValue(key, propValue, defaultValue) {
13
+ if (typeof window === 'undefined')
14
+ return propValue ?? defaultValue;
15
+ // 1. Check LocalStorage (Dev priority)
16
+ try {
17
+ const saved = localStorage.getItem('__JHITS_PLUGIN_BLOG_CONFIG__');
18
+ if (saved) {
19
+ const config = JSON.parse(saved);
20
+ if (config[key] !== undefined)
21
+ return config[key];
22
+ }
23
+ }
24
+ catch (e) { }
25
+ // 2. Check Props
26
+ if (propValue !== undefined)
27
+ return propValue;
28
+ // 3. Check Window Global
29
+ const globalProps = window.__JHITS_PLUGIN_PROPS__?.['plugin-blog'];
30
+ if (globalProps && globalProps[key] !== undefined)
31
+ return globalProps[key];
32
+ // 4. Default
33
+ return defaultValue;
34
+ }
35
+ /**
36
+ * Resolves all plugin configuration
37
+ */
38
+ export function resolvePluginConfig(props) {
39
+ return {
40
+ customBlocks: resolveConfigValue('customBlocks', props.customBlocks, []),
41
+ darkMode: resolveConfigValue('darkMode', props.darkMode, true),
42
+ backgroundColors: resolveConfigValue('backgroundColors', props.backgroundColors, undefined),
43
+ LayoutWrapper: resolveConfigValue('LayoutWrapper', props.LayoutWrapper, undefined),
44
+ translations: resolveConfigValue('translations', props.translations, undefined),
45
+ };
46
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Tree Utility Functions
3
+ * Generic functions for manipulating nested block trees
4
+ */
5
+ import { Block } from '../../types/block';
6
+ /**
7
+ * Find a node in the tree by ID
8
+ */
9
+ export declare function findNode(nodes: Block[], id: string): Block | null;
10
+ /**
11
+ * Map over a tree and update nodes
12
+ */
13
+ export declare function mapTree(nodes: Block[], mapper: (node: Block) => Block): Block[];
14
+ /**
15
+ * Filter a tree and remove nodes
16
+ */
17
+ export declare function filterTree(nodes: Block[], predicate: (node: Block) => boolean): Block[];
18
+ /**
19
+ * Remove a node and return both the new tree and the removed node
20
+ */
21
+ export declare function removeNode(nodes: Block[], id: string): {
22
+ updatedNodes: Block[];
23
+ removedNode: Block | null;
24
+ };
25
+ /**
26
+ * Add a node to a container at a specific index
27
+ */
28
+ export declare function addNodeToContainer(nodes: Block[], containerId: string, newNode: Block, index?: number): Block[];
29
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAc1C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CASjE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,KAAK,GAAG,KAAK,EAAE,CAW/E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,GAAG,KAAK,EAAE,CAYvF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG;IAAE,YAAY,EAAE,KAAK,EAAE,CAAC;IAAC,WAAW,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,CA4B3G;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,KAAK,EAAE,EACd,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,KAAK,EACd,KAAK,CAAC,EAAE,MAAM,GACf,KAAK,EAAE,CA0CT"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Tree Utility Functions
3
+ * Generic functions for manipulating nested block trees
4
+ */
5
+ /**
6
+ * Check if the children property contains actual Block objects (nested blocks)
7
+ * rather than just strings (like in the Recipe block)
8
+ */
9
+ function hasNestedBlocks(node) {
10
+ return !!(node.children &&
11
+ Array.isArray(node.children) &&
12
+ node.children.length > 0 &&
13
+ typeof node.children[0] === 'object' &&
14
+ node.children[0] !== null);
15
+ }
16
+ /**
17
+ * Find a node in the tree by ID
18
+ */
19
+ export function findNode(nodes, id) {
20
+ for (const node of nodes) {
21
+ if (node.id === id)
22
+ return node;
23
+ if (hasNestedBlocks(node)) {
24
+ const found = findNode(node.children, id);
25
+ if (found)
26
+ return found;
27
+ }
28
+ }
29
+ return null;
30
+ }
31
+ /**
32
+ * Map over a tree and update nodes
33
+ */
34
+ export function mapTree(nodes, mapper) {
35
+ return nodes.map(node => {
36
+ const mapped = mapper(node);
37
+ if (hasNestedBlocks(mapped)) {
38
+ return {
39
+ ...mapped,
40
+ children: mapTree(mapped.children, mapper),
41
+ };
42
+ }
43
+ return mapped;
44
+ });
45
+ }
46
+ /**
47
+ * Filter a tree and remove nodes
48
+ */
49
+ export function filterTree(nodes, predicate) {
50
+ return nodes
51
+ .filter(predicate)
52
+ .map(node => {
53
+ if (hasNestedBlocks(node)) {
54
+ return {
55
+ ...node,
56
+ children: filterTree(node.children, predicate),
57
+ };
58
+ }
59
+ return node;
60
+ });
61
+ }
62
+ /**
63
+ * Remove a node and return both the new tree and the removed node
64
+ */
65
+ export function removeNode(nodes, id) {
66
+ let removedNode = null;
67
+ // 1. Search at current level
68
+ const index = nodes.findIndex(n => n.id === id);
69
+ if (index !== -1) {
70
+ removedNode = nodes[index];
71
+ const updatedNodes = [...nodes];
72
+ updatedNodes.splice(index, 1);
73
+ return { updatedNodes, removedNode };
74
+ }
75
+ // 2. Search recursively in children
76
+ const updatedNodes = nodes.map(node => {
77
+ // If we already found the node in a previous iteration of this map, just return the node
78
+ if (removedNode)
79
+ return node;
80
+ if (hasNestedBlocks(node)) {
81
+ const { updatedNodes: newChildren, removedNode: found } = removeNode(node.children, id);
82
+ if (found) {
83
+ removedNode = found;
84
+ return { ...node, children: newChildren };
85
+ }
86
+ }
87
+ return node;
88
+ });
89
+ return { updatedNodes, removedNode };
90
+ }
91
+ /**
92
+ * Add a node to a container at a specific index
93
+ */
94
+ export function addNodeToContainer(nodes, containerId, newNode, index) {
95
+ // 1. Safety check: Can't add a node to itself
96
+ if (newNode.id === containerId)
97
+ return nodes;
98
+ // 2. Track if we found and updated the container
99
+ let found = false;
100
+ const result = mapTree(nodes, node => {
101
+ // Direct container match or column container match (e.g., "block-id-col-0")
102
+ const isMatch = node.id === containerId || containerId.startsWith(`${node.id}-col-`);
103
+ if (isMatch) {
104
+ found = true;
105
+ // If it's a column container, apply meta
106
+ if (containerId.startsWith(`${node.id}-col-`)) {
107
+ const columnIndex = parseInt(containerId.split('-col-')[1] || '0', 10);
108
+ newNode.meta = { ...newNode.meta, columnIndex };
109
+ }
110
+ const children = hasNestedBlocks(node)
111
+ ? [...node.children]
112
+ : [];
113
+ // Ensure we don't have duplicates of the same ID in the children
114
+ const filteredChildren = children.filter(c => c.id !== newNode.id);
115
+ if (index !== undefined && index >= 0 && index <= filteredChildren.length) {
116
+ filteredChildren.splice(index, 0, newNode);
117
+ }
118
+ else {
119
+ filteredChildren.push(newNode);
120
+ }
121
+ return { ...node, children: filteredChildren };
122
+ }
123
+ return node;
124
+ });
125
+ if (!found) {
126
+ throw new Error(`Container ${containerId} not found in the block tree.`);
127
+ }
128
+ return result;
129
+ }
@@ -1,45 +1,23 @@
1
1
  /**
2
2
  * Editor Context
3
- * React Context for managing editor state
4
- * Multi-Tenant: Accepts custom blocks from client applications
3
+ * Enhanced with language management and simplified state handling
5
4
  */
6
5
  import React from 'react';
7
6
  import { EditorContextValue, EditorState } from './types';
8
7
  import { Block } from '../types/block';
9
8
  import { ClientBlockDefinition } from '../types/block';
10
- /**
11
- * Editor Provider Props
12
- */
13
9
  export interface EditorProviderProps {
14
10
  children: React.ReactNode;
15
- /** Initial state (optional) */
16
11
  initialState?: Partial<EditorState>;
17
- /** Callback when save is triggered */
18
12
  onSave?: (state: EditorState, heroBlock?: Block | null) => Promise<void>;
19
- /**
20
- * Custom blocks from client application
21
- * These blocks will be registered in the BlockRegistry on mount
22
- */
23
13
  customBlocks?: ClientBlockDefinition[];
24
- /** Enable dark mode for content area and wrappers (default: true) */
25
14
  darkMode?: boolean;
26
- /** Background colors for the editor */
27
15
  backgroundColors?: {
28
- /** Background color for light mode (REQUIRED) */
29
16
  light: string;
30
- /** Background color for dark mode (optional) */
31
17
  dark?: string;
32
18
  };
19
+ translations?: Record<string, any>;
33
20
  }
34
- /**
35
- * Editor Provider
36
- * Provides editor state and actions to child components
37
- * Automatically registers client-provided blocks on mount
38
- */
39
- export declare function EditorProvider({ children, initialState, onSave, customBlocks, darkMode, backgroundColors }: EditorProviderProps): import("react/jsx-runtime").JSX.Element;
40
- /**
41
- * Hook to access editor context
42
- * @throws Error if used outside EditorProvider
43
- */
21
+ export declare function EditorProvider({ children, initialState, onSave, customBlocks, darkMode, backgroundColors, translations }: EditorProviderProps): import("react/jsx-runtime").JSX.Element;
44
22
  export declare function useEditor(): EditorContextValue;
45
23
  //# sourceMappingURL=EditorContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContext.d.ts","sourceRoot":"","sources":["../../src/state/EditorContext.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAmG,MAAM,OAAO,CAAC;AAExH,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAoC,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAMvD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+BAA+B;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACpC,sCAAsC;IACtC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE;;;OAGG;IACH,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACvC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE;QACf,iDAAiD;QACjD,KAAK,EAAE,MAAM,CAAC;QACd,gDAAgD;QAChD,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC3B,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,YAAiB,EACjB,QAAe,EACf,gBAAgB,EACnB,EAAE,mBAAmB,2CAqNrB;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,kBAAkB,CAM9C"}
1
+ {"version":3,"file":"EditorContext.d.ts","sourceRoot":"","sources":["../../src/state/EditorContext.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAmG,MAAM,OAAO,CAAC;AAExH,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAsB,MAAM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